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/Makefile30
-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.c743
-rw-r--r--src/interfaces/ecpg/ecpglib/data.c968
-rw-r--r--src/interfaces/ecpg/ecpglib/descriptor.c997
-rw-r--r--src/interfaces/ecpg/ecpglib/ecpglib_extern.h254
-rw-r--r--src/interfaces/ecpg/ecpglib/error.c348
-rw-r--r--src/interfaces/ecpg/ecpglib/execute.c2308
-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.c587
-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/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.po208
-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.po201
-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.po204
-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.c3002
-rw-r--r--src/interfaces/ecpg/pgtypeslib/exports.txt48
-rw-r--r--src/interfaces/ecpg/pgtypeslib/interval.c1092
-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.c355
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.addons520
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c493
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header599
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.tokens26
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.trailer1888
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.type144
-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.c260
-rw-r--r--src/interfaces/ecpg/preproc/parse.pl693
-rw-r--r--src/interfaces/ecpg/preproc/parser.c231
-rw-r--r--src/interfaces/ecpg/preproc/pgc.c5001
-rw-r--r--src/interfaces/ecpg/preproc/pgc.l1736
-rw-r--r--src/interfaces/ecpg/preproc/po/cs.po695
-rw-r--r--src/interfaces/ecpg/preproc/po/de.po686
-rw-r--r--src/interfaces/ecpg/preproc/po/es.po691
-rw-r--r--src/interfaces/ecpg/preproc/po/fr.po736
-rw-r--r--src/interfaces/ecpg/preproc/po/it.po679
-rw-r--r--src/interfaces/ecpg/preproc/po/ja.po709
-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.po687
-rw-r--r--src/interfaces/ecpg/preproc/po/ru.po722
-rw-r--r--src/interfaces/ecpg/preproc/po/sv.po677
-rw-r--r--src/interfaces/ecpg/preproc/po/tr.po699
-rw-r--r--src/interfaces/ecpg/preproc/po/uk.po663
-rw-r--r--src/interfaces/ecpg/preproc/po/vi.po684
-rw-r--r--src/interfaces/ecpg/preproc/po/zh_CN.po674
-rw-r--r--src/interfaces/ecpg/preproc/po/zh_TW.po645
-rw-r--r--src/interfaces/ecpg/preproc/preproc.c60436
-rw-r--r--src/interfaces/ecpg/preproc/preproc.h645
-rw-r--r--src/interfaces/ecpg/preproc/preproc.y17123
-rw-r--r--src/interfaces/ecpg/preproc/preproc_extern.h127
-rw-r--r--src/interfaces/ecpg/preproc/type.c748
-rw-r--r--src/interfaces/ecpg/preproc/type.h203
-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_schedule60
-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.stderr78
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.c124
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test1.stderr78
-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.c162
-rw-r--r--src/interfaces/ecpg/test/expected/connect-test5.stderr92
-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.c185
-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-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.c181
-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.pgc79
-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/.gitignore48
-rw-r--r--src/interfaces/ecpg/test/sql/Makefile35
-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/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/Makefile133
-rw-r--r--src/interfaces/libpq/README3
-rw-r--r--src/interfaces/libpq/exports.txt181
-rw-r--r--src/interfaces/libpq/fe-auth-scram.c860
-rw-r--r--src/interfaces/libpq/fe-auth.c1280
-rw-r--r--src/interfaces/libpq/fe-auth.h36
-rw-r--r--src/interfaces/libpq/fe-connect.c7255
-rw-r--r--src/interfaces/libpq/fe-exec.c3860
-rw-r--r--src/interfaces/libpq/fe-gssapi-common.c131
-rw-r--r--src/interfaces/libpq/fe-gssapi-common.h28
-rw-r--r--src/interfaces/libpq/fe-lobj.c1102
-rw-r--r--src/interfaces/libpq/fe-misc.c1314
-rw-r--r--src/interfaces/libpq/fe-print.c782
-rw-r--r--src/interfaces/libpq/fe-protocol2.c1612
-rw-r--r--src/interfaces/libpq/fe-protocol3.c2178
-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.c1790
-rw-r--r--src/interfaces/libpq/fe-secure.c555
-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.h632
-rw-r--r--src/interfaces/libpq/libpq-int.h823
-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.po1273
-rw-r--r--src/interfaces/libpq/po/es.po1290
-rw-r--r--src/interfaces/libpq/po/fr.po1399
-rw-r--r--src/interfaces/libpq/po/it.po1148
-rw-r--r--src/interfaces/libpq/po/ja.po1272
-rw-r--r--src/interfaces/libpq/po/ko.po1340
-rw-r--r--src/interfaces/libpq/po/ru.po1402
-rw-r--r--src/interfaces/libpq/po/sv.po1294
-rw-r--r--src/interfaces/libpq/po/tr.po1247
-rw-r--r--src/interfaces/libpq/po/uk.po1273
-rw-r--r--src/interfaces/libpq/po/zh_CN.po1280
-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.pl63
-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.h34
450 files changed, 200996 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..41460a1
--- /dev/null
+++ b/src/interfaces/ecpg/Makefile
@@ -0,0 +1,30 @@
+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
+# http://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
+
+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..806d292
--- /dev/null
+++ b/src/interfaces/ecpg/compatlib/Makefile
@@ -0,0 +1,59 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for ecpg compatibility library
+#
+# Portions Copyright (c) 1996-2020, 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..2053c60
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/Makefile
@@ -0,0 +1,70 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for ecpg library
+#
+# Portions Copyright (c) 1996-2020, 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..1cb5211
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/connect.c
@@ -0,0 +1,743 @@
+/* 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 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
+ 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 then we got the connection from TSD */
+ if (NULL == ret)
+ /* 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
+ 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 then we got the connection from TSD */
+ if (NULL == ret)
+ /* 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|:/unixsocket/path:]
+ * [/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 or Unix socket path given */
+ {
+ char *tmp2;
+
+ *tmp = '\0';
+ if ((tmp2 = strchr(tmp + 1, ':')) != NULL)
+ {
+ *tmp2 = '\0';
+ host = ecpg_strdup(tmp + 1, lineno);
+ connect_params++;
+ if (strncmp(dbname, "unix:", 5) != 0)
+ {
+ ecpg_log("ECPGconnect: socketname %s given for TCP connection on line %d\n", host, lineno);
+ ecpg_raise(lineno, ECPG_CONNECT, ECPG_SQLSTATE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION, realname ? realname : ecpg_gettext("<DEFAULT>"));
+ if (host)
+ ecpg_free(host);
+
+ /*
+ * port not set yet 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
+ {
+ port = ecpg_strdup(tmp + 1, lineno);
+ connect_params++;
+ }
+ }
+
+ if (strncmp(dbname, "unix:", 5) == 0)
+ {
+ 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;
+
+ /* add connection to our list */
+#ifdef ENABLE_THREAD_SAFETY
+ pthread_mutex_lock(&connections_mutex);
+#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 : "");
+
+ /* count options (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 */
+ 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;
+ }
+
+ 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>");
+
+ ecpg_log("ECPGconnect: could not open database: %s\n", 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..369c2f0
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/descriptor.c
@@ -0,0 +1,997 @@
+/* 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
+ stmt.clocale = newlocale(LC_NUMERIC_MASK, "C", (locale_t) 0);
+ if (stmt.clocale != (locale_t) 0)
+ stmt.oldlocale = uselocale(stmt.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);
+ if (stmt.clocale)
+ freelocale(stmt.clocale);
+#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..1a98dea
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/ecpglib_extern.h
@@ -0,0 +1,254 @@
+/* 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;
+};
+
+/* 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 clocale;
+ 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..a4e3c0d
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/error.c
@@ -0,0 +1,348 @@
+/* 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;
+ }
+
+ if (result)
+ {
+ sqlstate = PQresultErrorField(result, PG_DIAG_SQLSTATE);
+ if (sqlstate == NULL)
+ sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
+ message = PQresultErrorField(result, PG_DIAG_MESSAGE_PRIMARY);
+ }
+ else
+ {
+ sqlstate = ECPG_SQLSTATE_ECPG_INTERNAL_ERROR;
+ 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;
+
+ /* %.*s is safe here as long as sqlstate is all-ASCII */
+ 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..9d61ae7
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/execute.c
@@ -0,0 +1,2308 @@
+/* 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);
+#ifdef HAVE_USELOCALE
+ if (stmt->clocale)
+ freelocale(stmt->clocale);
+#else
+ 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), CASHOID, 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;
+ }
+
+ 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
+ stmt->clocale = newlocale(LC_NUMERIC_MASK, "C", (locale_t) 0);
+ if (stmt->clocale == (locale_t) 0)
+ {
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+ stmt->oldlocale = uselocale(stmt->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
+
+#ifdef ENABLE_THREAD_SAFETY
+ ecpg_pthreads_init();
+#endif
+
+ con = ecpg_get_connection(connection_name);
+
+ if (!ecpg_init(con, connection_name, lineno))
+ {
+ ecpg_do_epilogue(stmt);
+ return false;
+ }
+
+ /*
+ * 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..1feb5c0
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/misc.c
@@ -0,0 +1,587 @@
+/* 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)
+{
+ static 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;
+
+ already_bound = true;
+ /* No relocatable lookup here because the binary could be anywhere */
+ ldir = getenv("PGLOCALEDIR");
+ if (!ldir)
+ ldir = LOCALEDIR;
+ bindtextdomain(PG_TEXTDOMAIN("ecpglib"), ldir);
+#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..3223a03
--- /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 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/es.po b/src/interfaces/ecpg/ecpglib/po/es.po
new file mode 100644
index 0000000..ad56d88
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/es.po
@@ -0,0 +1,200 @@
+# Spanish message translation file for ecpglib
+#
+# Copyright (c) 2009-2019, 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) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-09-13 10:39+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:237
+msgid "empty message text"
+msgstr "mensaje de texto vacío"
+
+#: connect.c:401 connect.c:430 connect.c:653
+msgid "<DEFAULT>"
+msgstr "<POR OMISIÓN>"
+
+#: 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 "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:254
+msgid "the connection to the server was lost"
+msgstr "se ha perdido la conexión al servidor"
+
+#: error.c:347
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "error SQL: %s\n"
+
+#: execute.c:2196 execute.c:2203
+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..4852efe
--- /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 12\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..8cd6def
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/ja.po
@@ -0,0 +1,208 @@
+# Japanese message translation file for ecpglib
+# Copyright (C) 2019 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 12 beta 1)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-06-11 09:00+0900\n"
+"PO-Revision-Date: 2019-06-11 09:04+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.5.4\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "メッセージテキストが空です"
+
+#: connect.c:403 connect.c:432 connect.c:640
+msgid "<DEFAULT>"
+msgstr "<デフォルト>"
+
+#: descriptor.c:887 misc.c:120
+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"
+msgid "The cursor is invalid on line %d"
+msgstr "行番号%dにおいて、カーソルが不正です"
+
+#. 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において、SQLエラー%1$dがあります"
+
+#: error.c:261
+msgid "the connection to the server was lost"
+msgstr "サーバへの接続が切れました"
+
+#: error.c:354
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQLエラー: %s\n"
+
+#: execute.c:2187 execute.c:2194
+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..90f3482
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/pt_BR.po
@@ -0,0 +1,201 @@
+# Brazilian Portuguese message translation file for ecpglib
+#
+# Copyright (C) 2009-2020 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 <euler@eulerto.com>, 2010-2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-05-09 10:51-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 <pgsql-translators@postgresql.org>\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:653
+msgid "<DEFAULT>"
+msgstr "<PADRÃO>"
+
+#: 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 "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:2196 execute.c:2203
+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..18f185a
--- /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: 2020-09-03 11:22+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:401 connect.c:430 connect.c:653
+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:347
+#, 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..246e7ad
--- /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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-04-10 02:39+0000\n"
+"PO-Revision-Date: 2020-04-10 07:44+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"
+
+#: 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..2310334
--- /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: 2020-09-21 21:09+0000\n"
+"PO-Revision-Date: 2020-09-22 13:43\n"
+"Last-Translator: pasha_golub\n"
+"Language-Team: Ukrainian\n"
+"Language: uk\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: /DEV_13/ecpglib.pot\n"
+"X-Crowdin-File-ID: 482\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "пусте повідомлення"
+
+#: connect.c:401 connect.c:430 connect.c:653
+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:347
+#, 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..37e14bc
--- /dev/null
+++ b/src/interfaces/ecpg/ecpglib/po/zh_CN.po
@@ -0,0 +1,204 @@
+# 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) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-05-22 17:56+0800\n"
+"PO-Revision-Date: 2019-05-24 18:50+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@cn.fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@cn.fujitsu.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: zh_CN\n"
+
+#: connect.c:237
+msgid "empty message text"
+msgstr "消息文本为空"
+
+#: connect.c:403 connect.c:432 connect.c:640
+msgid "<DEFAULT>"
+msgstr "<DEFAULT>"
+
+#: 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行上没有找到数据"
+
+#. 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 "The cursor is invalid on line %d"
+msgstr "游标在第%d行无效"
+
+#. 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行上的SQL命令发生错误 代码%1$d"
+
+#: error.c:261
+msgid "the connection to the server was lost"
+msgstr "与服务器的连接丢失"
+
+#: error.c:354
+#, c-format
+msgid "SQL error: %s\n"
+msgstr "SQL语句错误: %s\n"
+
+#: execute.c:2174 execute.c:2181
+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..67d3c7b
--- /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 less 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..ae79ead
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/Makefile
@@ -0,0 +1,54 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for ecpg pgtypes library
+#
+# Portions Copyright (c) 1996-2020, 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..81bd7aa
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c
@@ -0,0 +1,3002 @@
+/* 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. 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
+ */
+ StrNCpy(*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
+ */
+ StrNCpy(*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..1a31e3d
--- /dev/null
+++ b/src/interfaces/ecpg/pgtypeslib/interval.c
@@ -0,0 +1,1092 @@
+/* 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);
+ 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..c4fc23f
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/Makefile
@@ -0,0 +1,102 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/interfaces/ecpg/preproc
+#
+# Copyright (c) 1998-2020, 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..8bf0199
--- /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-2020, 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..df7d1c4
--- /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-2020, 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] = {
+ 24, 14, 0, 10, 19, 2, 11, 3,
+ 6, 127, 127, 127, 127, 2, 0, 127,
+ 0, 9, 127, 127, 127, 127, 17, 127,
+ 0, 1, 5, 0, 0, -12, 21, 13,
+ 127, 127, 0, 127, 127, 0, 127, 7,
+ 127, 16, 2, 0, 10, 0, 0, 3,
+ 0, 4, 0, 18, 20,
+ };
+
+ const unsigned char *k = (const unsigned char *) key;
+ uint32 a = 1;
+ uint32 b = 2;
+
+ while (keylen--)
+ {
+ unsigned char c = *k++;
+
+ a = a * 31 + c;
+ b = b * 127 + 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..6843f90
--- /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-2020, 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..a29f530
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/descriptor.c
@@ -0,0 +1,355 @@
+/*
+ * 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;
+ }
+ }
+ }
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor \"%s\" 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;
+ }
+ }
+ mmerror(PARSE_ERROR, ET_WARNING, "descriptor \"%s\" 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..300381e
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.addons
@@ -0,0 +1,520 @@
+/* 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
+ {
+ 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
+ {
+ 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: 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);
+ }
+ | 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
+ {
+ fprintf(base_yyout, "{ ECPGdescribe(__LINE__, %d, %s,", compat, $1);
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ fprintf(base_yyout, "}");
+ output_line_number();
+
+ free($1);
+ }
+ | 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
+ add_additional_variables($1, false);
+ if ($1[0] == ':')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+ECPG: fetch_argsfrom_incursor_name addon
+ add_additional_variables($2, false);
+ 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
+ add_additional_variables($3, false);
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+ECPG: fetch_argsSignedIconstopt_from_incursor_name addon
+ add_additional_variables($3, false);
+ 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
+ add_additional_variables($4, false);
+ 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
+ add_additional_variables($4, false);
+ 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);
+
+ 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;
+ 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;
+ $$ = 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;
+ add_additional_variables($3, false);
+ $$ = 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;
+ add_additional_variables($4, false);
+ $$ = 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;
+ add_additional_variables($3, false);
+ $$ = 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;
+ add_additional_variables($4, false);
+ $$ = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
+ }
+ | MOVE FORWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ add_additional_variables($3, false);
+ $$ = cat_str(2, mm_strdup("move forward"), cursor_marker);
+ }
+ | MOVE FORWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ add_additional_variables($4, false);
+ $$ = cat_str(2, mm_strdup("move forward from"), cursor_marker);
+ }
+ | MOVE BACKWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ add_additional_variables($3, false);
+ $$ = cat_str(2, mm_strdup("move backward"), cursor_marker);
+ }
+ | MOVE BACKWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ add_additional_variables($4, false);
+ $$ = 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..44a6d51
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -0,0 +1,493 @@
+/* src/interfaces/ecpg/preproc/ecpg.c */
+
+/* Main for ecpg, the PostgreSQL embedded SQL precompiler. */
+/* Copyright (c) 1996-2020, 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;
+
+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;
+
+ /* 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 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..f37112d
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -0,0 +1,599 @@
+/* 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);
+
+/*
+ * 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;
+ }
+}
+%}
+
+%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;
+}
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..769265b
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.trailer
@@ -0,0 +1,1888 @@
+/* src/interfaces/ecpg/preproc/ecpg.trailer */
+
+statements: /*EMPTY*/
+ | statements statement
+ ;
+
+statement: ecpgstart at stmt ';' { connection = NULL; }
+ | ecpgstart stmt ';'
+ | 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: database_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 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));
+ const char *con = connection ? connection : "NULL";
+ char *comment;
+
+ 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;
+ 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: database_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
+ {
+ const char *con = connection ? connection : "NULL";
+ mmerror(PARSE_ERROR, ET_WARNING, "using unsupported DESCRIBE statement");
+ $$ = (char *) mm_alloc(sizeof("1, , ") + strlen(con) + strlen($3));
+ sprintf($$, "1, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE opt_output prepared_name using_descriptor
+ {
+ const char *con = connection ? connection : "NULL";
+ struct variable *var;
+
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+
+ $$ = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen($3));
+ sprintf($$, "0, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_descriptor
+ {
+ const char *con = connection ? connection : "NULL";
+ $$ = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen($3));
+ sprintf($$, "0, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE INPUT_P prepared_name into_sqlda
+ {
+ const char *con = connection ? connection : "NULL";
+ mmerror(PARSE_ERROR, ET_WARNING, "using unsupported DESCRIBE statement");
+ $$ = (char *) mm_alloc(sizeof("1, , ") + strlen(con) + strlen($3));
+ sprintf($$, "1, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_sqlda
+ {
+ const char *con = connection ? connection : "NULL";
+ $$ = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen($3));
+ sprintf($$, "0, %s, %s", con, $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 { $$ = $2; }
+ | DEALLOCATE PREPARE prepared_name { $$ = $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..eca298b
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/ecpg.type
@@ -0,0 +1,144 @@
+/* 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> ECPGDescribe
+%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
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..0170bfe
--- /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-2020, 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..1e68111
--- /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-2020, 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 int16 h[83] = {
+ 0, 26, -15, 29, 8, 35, -6, 32767,
+ 11, 20, 0, 25, 4, 32767, 27, 0,
+ 32767, 32767, 32767, 32767, 0, 32767, 6, 32767,
+ -87, 43, 32767, 0, 32767, 12, 32767, 7,
+ 0, 32767, 0, 30, 38, 23, -68, 0,
+ 32767, 9, 32767, 32767, 32767, 0, 16, -18,
+ -7, 32767, 19, 0, 68, 0, 96, 32767,
+ 32767, 14, 0, -18, 32767, -13, 32767, 32,
+ 0, 29, -6, 78, 32767, 32767, 39, 18,
+ -41, 32767, 0, 40, -63, 22, 31, 0,
+ 32767, 32767, 32767,
+ };
+
+ const unsigned char *k = (const unsigned char *) key;
+ uint32 a = 0;
+ uint32 b = 3;
+
+ while (keylen--)
+ {
+ unsigned char c = *k++ | 0x20;
+
+ a = a * 31 + c;
+ b = b * 127 + 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..f82764a
--- /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-2020, 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) 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..98ce9c0
--- /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 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..65d06d5
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -0,0 +1,260 @@
+/* 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);
+ if (connection != NULL)
+ free(connection);
+ connection = NULL;
+}
+
+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);
+ if (connection != NULL)
+ free(connection);
+ connection = NULL;
+}
+
+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);
+ if (connection != NULL)
+ free(connection);
+ connection = NULL;
+}
+
+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..52ba7df
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/parse.pl
@@ -0,0 +1,693 @@
+#!/usr/bin/perl
+# src/interfaces/ecpg/preproc/parse.pl
+# parser generator for ecpg version 2
+# call with backend parser as stdin
+#
+# Copyright (c) 2007-2020, 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
+ 'stmtblock' => 'ignore',
+ 'stmtmulti' => 'ignore',
+ 'CreateAsStmt' => 'ignore',
+ 'DeallocateStmt' => 'ignore',
+ 'ColId' => 'ignore',
+ 'type_function_name' => 'ignore',
+ 'ColLabel' => 'ignore',
+ 'Sconst' => '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..a2eeeba
--- /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-2020, 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..c457808
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/pgc.c
@@ -0,0 +1,5001 @@
+#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-2020, 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"
+{ addlitchar('\''); }
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 630 "pgc.l"
+{
+ addlitchar('\\');
+ addlitchar('\'');
+ }
+ YY_BREAK
+case 23:
+/* rule 23 can match eol */
+YY_RULE_SETUP
+#line 634 "pgc.l"
+{ addlit(yytext, yyleng); }
+ YY_BREAK
+case 24:
+/* rule 24 can match eol */
+YY_RULE_SETUP
+#line 635 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 638 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 26:
+/* rule 26 can match eol */
+YY_RULE_SETUP
+#line 641 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 644 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 647 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 650 "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 654 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated quoted string"); }
+ YY_BREAK
+
+case 30:
+YY_RULE_SETUP
+#line 657 "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 666 "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 674 "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 695 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 698 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 701 "pgc.l"
+{
+ /* single quote or dollar sign */
+ addlitchar(yytext[0]);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xdolq):
+#line 705 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated dollar-quoted string"); }
+ YY_BREAK
+
+case 36:
+YY_RULE_SETUP
+#line 708 "pgc.l"
+{
+ state_before_str_start = YYSTATE;
+ BEGIN(xd);
+ startlit();
+ }
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 713 "pgc.l"
+{
+ state_before_str_start = YYSTATE;
+ BEGIN(xui);
+ startlit();
+ }
+ YY_BREAK
+/* <SQL> */
+case 38:
+YY_RULE_SETUP
+#line 720 "pgc.l"
+{
+ BEGIN(state_before_str_start);
+ if (literallen == 0)
+ 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 = mm_strdup(literalbuf);
+ return CSTRING;
+ }
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 728 "pgc.l"
+{
+ BEGIN(state_before_str_start);
+ base_yylval.str = mm_strdup(literalbuf);
+ return CSTRING;
+ }
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 733 "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 741 "pgc.l"
+{
+ addlitchar('"');
+ }
+ YY_BREAK
+case 42:
+/* rule 42 can match eol */
+YY_RULE_SETUP
+#line 744 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xd):
+case YY_STATE_EOF(xui):
+#line 747 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated quoted identifier"); }
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 748 "pgc.l"
+{
+ state_before_str_start = YYSTATE;
+ BEGIN(xdc);
+ startlit();
+ }
+ YY_BREAK
+case 44:
+/* rule 44 can match eol */
+YY_RULE_SETUP
+#line 753 "pgc.l"
+{
+ addlit(yytext, yyleng);
+ }
+ YY_BREAK
+case YY_STATE_EOF(xdc):
+#line 756 "pgc.l"
+{ mmfatal(PARSE_ERROR, "unterminated quoted string"); }
+ YY_BREAK
+
+case 45:
+YY_RULE_SETUP
+#line 759 "pgc.l"
+{
+ return TYPECAST;
+ }
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 763 "pgc.l"
+{
+ return DOT_DOT;
+ }
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 767 "pgc.l"
+{
+ return COLON_EQUALS;
+ }
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 771 "pgc.l"
+{
+ return EQUALS_GREATER;
+ }
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 775 "pgc.l"
+{
+ return LESS_EQUALS;
+ }
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 779 "pgc.l"
+{
+ return GREATER_EQUALS;
+ }
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 783 "pgc.l"
+{
+ /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
+ return NOT_EQUALS;
+ }
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 788 "pgc.l"
+{
+ /* We accept both "<>" and "!=" as meaning NOT_EQUALS */
+ return NOT_EQUALS;
+ }
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 793 "pgc.l"
+{
+ /* are we simulating Informix? */
+ if (INFORMIX_MODE)
+ {
+ unput(':');
+ }
+ else
+ return yytext[0];
+ }
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 803 "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 814 "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 911 "pgc.l"
+{
+ base_yylval.ival = atol(yytext+1);
+ return PARAM;
+ }
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 916 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return IP;
+ }
+ YY_BREAK
+/* <SQL> */
+
+case 58:
+YY_RULE_SETUP
+#line 923 "pgc.l"
+{
+ return process_integer_literal(yytext, &base_yylval);
+ }
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 926 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return FCONST;
+ }
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 930 "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 935 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return FCONST;
+ }
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 939 "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 947 "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 955 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext+1);
+ return CVARIABLE;
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 960 "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 988 "pgc.l"
+{
+ return yytext[0];
+ }
+ YY_BREAK
+/* <SQL> */
+/*
+ * Begin ECPG-specific rules
+ */
+case 67:
+/* rule 67 can match eol */
+YY_RULE_SETUP
+#line 997 "pgc.l"
+{ BEGIN(SQL); return SQL_START; }
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 998 "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 1008 "pgc.l"
+{ ECHO; }
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 1009 "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 1022 "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 1034 "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 1046 "pgc.l"
+{
+ base_yylval.str = mm_strdup(yytext);
+ return CPP_LINE;
+ }
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 1050 "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 1078 "pgc.l"
+{ mmerror(PARSE_ERROR, ET_ERROR, "nested /* ... */ comments"); }
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 1079 "pgc.l"
+{ return ':'; }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 1080 "pgc.l"
+{ return ';'; }
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 1081 "pgc.l"
+{ return ','; }
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 1082 "pgc.l"
+{ return '*'; }
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 1083 "pgc.l"
+{ return '%'; }
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 1084 "pgc.l"
+{ return '/'; }
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 1085 "pgc.l"
+{ return '+'; }
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 1086 "pgc.l"
+{ return '-'; }
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 1087 "pgc.l"
+{ parenths_open++; return '('; }
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 1088 "pgc.l"
+{ parenths_open--; return ')'; }
+ YY_BREAK
+case 86:
+/* rule 86 can match eol */
+YY_RULE_SETUP
+#line 1089 "pgc.l"
+{ ECHO; }
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 1090 "pgc.l"
+{ return '{'; }
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 1091 "pgc.l"
+{ return '}'; }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 1092 "pgc.l"
+{ return '['; }
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 1093 "pgc.l"
+{ return ']'; }
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 1094 "pgc.l"
+{ return '='; }
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 1095 "pgc.l"
+{ return S_MEMBER; }
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+#line 1096 "pgc.l"
+{ return S_RSHIFT; }
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+#line 1097 "pgc.l"
+{ return S_LSHIFT; }
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+#line 1098 "pgc.l"
+{ return S_OR; }
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+#line 1099 "pgc.l"
+{ return S_AND; }
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 1100 "pgc.l"
+{ return S_INC; }
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+#line 1101 "pgc.l"
+{ return S_DEC; }
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+#line 1102 "pgc.l"
+{ return S_EQUAL; }
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+#line 1103 "pgc.l"
+{ return S_NEQUAL; }
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+#line 1104 "pgc.l"
+{ return S_ADD; }
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 1105 "pgc.l"
+{ return S_SUB; }
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+#line 1106 "pgc.l"
+{ return S_MUL; }
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+#line 1107 "pgc.l"
+{ return S_DIV; }
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+#line 1108 "pgc.l"
+{ return S_MOD; }
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+#line 1109 "pgc.l"
+{ return S_MEMPOINT; }
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+#line 1110 "pgc.l"
+{ return S_DOTPOINT; }
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+#line 1111 "pgc.l"
+{ return S_ANYTHING; }
+ YY_BREAK
+case 109:
+/* rule 109 can match eol */
+YY_RULE_SETUP
+#line 1112 "pgc.l"
+{ BEGIN(def_ident); }
+ YY_BREAK
+case 110:
+/* rule 110 can match eol */
+YY_RULE_SETUP
+#line 1113 "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 1125 "pgc.l"
+{ BEGIN(undef); }
+ YY_BREAK
+case 112:
+/* rule 112 can match eol */
+YY_RULE_SETUP
+#line 1126 "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 1138 "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 1170 "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 1174 "pgc.l"
+{ BEGIN(incl); }
+ YY_BREAK
+case 116:
+/* rule 116 can match eol */
+YY_RULE_SETUP
+#line 1175 "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 1187 "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 1197 "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 1216 "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 1226 "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 1245 "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 1253 "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 1271 "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 1290 "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 1318 "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 1329 "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 1350 "pgc.l"
+{ /* ignore */ }
+ YY_BREAK
+case 128:
+/* rule 128 can match eol */
+YY_RULE_SETUP
+#line 1352 "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 1388 "pgc.l"
+{
+ mmfatal(PARSE_ERROR, "missing identifier in EXEC SQL IFDEF command");
+ yyterminate();
+ }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+#line 1392 "pgc.l"
+{
+ old = mm_strdup(yytext);
+ BEGIN(def);
+ startlit();
+ }
+ YY_BREAK
+case 131:
+/* rule 131 can match eol */
+YY_RULE_SETUP
+#line 1397 "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 1401 "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 1426 "pgc.l"
+{ addlit(yytext, yyleng); }
+ YY_BREAK
+case 134:
+/* rule 134 can match eol */
+YY_RULE_SETUP
+#line 1427 "pgc.l"
+{ parse_include(); }
+ YY_BREAK
+case 135:
+/* rule 135 can match eol */
+YY_RULE_SETUP
+#line 1428 "pgc.l"
+{ parse_include(); }
+ YY_BREAK
+case 136:
+/* rule 136 can match eol */
+YY_RULE_SETUP
+#line 1429 "pgc.l"
+{ parse_include(); }
+ YY_BREAK
+case 137:
+/* rule 137 can match eol */
+YY_RULE_SETUP
+#line 1430 "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 1435 "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 1481 "pgc.l"
+{ mmfatal(PARSE_ERROR, "internal error: unreachable state; please report this to <%s>", PACKAGE_BUGREPORT); }
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+#line 1483 "pgc.l"
+YY_FATAL_ERROR( "flex scanner jammed" );
+ YY_BREAK
+#line 3730 "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 1483 "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..a6ef1ac
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/pgc.l
@@ -0,0 +1,1736 @@
+%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-2020, 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} { addlitchar('\''); }
+<xqc>{xqcquote} {
+ addlitchar('\\');
+ addlitchar('\'');
+ }
+<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 backend will truncate the identifier here. We do not as it does not change the result. */
+ 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} {
+ addlitchar('"');
+ }
+<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..e7d2c0c
--- /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: 2020-10-31 21:47+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"
+
+#: 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..f4ae05d
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/de.po
@@ -0,0 +1,686 @@
+# German message translation file for ecpg
+# Copyright (C) 2009-2020 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Peter Eisentraut <peter@eisentraut.org>, 2009-2020.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-11-08 07:09+0000\n"
+"PO-Revision-Date: 2020-11-08 09:03+0100\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:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "Deskriptor »%s« existiert nicht"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "Deskriptorkopfelement »%d« existiert nicht"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable ist immer 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member ist immer 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "Deskriptorelement »%s« ist nicht implementiert"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "Deskriptorelement »%s« kann nicht gesetzt werden"
+
+#: ecpg.c:35
+#, 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:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Aufruf:\n"
+" %s [OPTION]... DATEI...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Optionen:\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 automatisch C-Code aus eingebettetem SQL-Code erzeugen;\n"
+" betrifft 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 MODUS Kompatibilitätsmodus setzen; MODUS kann sein:\n"
+" »INFORMIX«, »INFORMIX_SE«, »ORACLE«\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d Parser-Debug-Ausgabe erzeugen\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL SYMBOL definieren\n"
+
+#: ecpg.c:49
+#, 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:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i Systemheaderdateien ebenfalls parsen\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I VERZ VERZ nach Include-Dateien durchsuchen\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o DATEI Ausgabe in DATEI schreiben\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 Laufzeitverhalten bestimmen; OPTION kann sein:\n"
+" »no_indicator«, »prepare«, »questionmarks«\n"
+
+#: ecpg.c:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression Regressiontestmodus verwenden\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t Autocommit von Transaktionen anschalten\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version Versionsinformationen anzeigen, dann beenden\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help diese Hilfe anzeigen, dann beenden\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"
+"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:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Berichten Sie Fehler an <%s>.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "%s Homepage: <%s>\n"
+
+#: ecpg.c:140
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: konnte Pfad des eigenen Programs nicht finden\n"
+
+#: ecpg.c:175 ecpg.c:332 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: konnte Datei »%s« nicht öffnen: %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 "Versuchen Sie »%s --help« für weitere Informationen.\n"
+
+#: ecpg.c:242
+#, 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:261
+#, 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:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... Suche beginnt hier:\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "Ende der Suchliste\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: keine Eingabedateien angegeben\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "Cursor »%s« wurde deklariert aber nicht geöffnet"
+
+#: ecpg.c:479 preproc.y:128
+#, 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:654 pgc.l:756
+#, c-format
+msgid "unterminated quoted string"
+msgstr "Zeichenkette in Anführungszeichen nicht abgeschlossen"
+
+#: pgc.l:705
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "Dollar-Quotes nicht abgeschlossen"
+
+#: pgc.l:723 pgc.l:736
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "Bezeichner in Anführungszeichen hat Länge null"
+
+#: pgc.l:747
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "Bezeichner in Anführungszeichen nicht abgeschlossen"
+
+#: pgc.l:1078
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "geschachtelte /* ... */-Kommentare"
+
+#: pgc.l:1171
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "fehlender Bezeichner im Befehl EXEC SQL UNDEF"
+
+#: pgc.l:1189 pgc.l:1202 pgc.l:1218 pgc.l:1231
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "zu viele verschachtelte EXEC SQL IFDEF-Bedingungen"
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "passendes »EXEC SQL IFDEF« / »EXEC SQL IFNDEF« fehlt"
+
+#: pgc.l:1249 pgc.l:1260 pgc.l:1441
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "»EXEC SQL ENDIF;« fehlt"
+
+#: pgc.l:1275 pgc.l:1297
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "mehr als ein EXEC SQL ENDIF"
+
+#: pgc.l:1320 pgc.l:1334
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "unzusammenhängendes EXEC SQL ENDIF"
+
+#: pgc.l:1389
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "fehlender Bezeichner im Befehl EXEC SQL IFDEF"
+
+#: pgc.l:1398
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "fehlender Bezeichner im Befehl EXEC SQL DEFINE"
+
+#: pgc.l:1431
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "Syntaxfehler im Befehl EXEC SQL INCLUDE"
+
+#: pgc.l:1481
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "interner Fehler: unerreichbarer Zustand; bitte an <%s> berichten"
+
+#: pgc.l:1633
+#, 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:1656
+#, 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:82
+#, c-format
+msgid "WARNING: "
+msgstr "WARNUNG: "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "FEHLER: "
+
+#: preproc.y:512
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "Cursor »%s« existiert nicht"
+
+#: preproc.y:541
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "Initialisierungswert nicht erlaubt in Typdefinition"
+
+#: preproc.y:543
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "Typname »string« ist im Informix-Modus reserviert"
+
+#: preproc.y:550 preproc.y:15962
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "Typ »%s« ist bereits definiert"
+
+#: preproc.y:575 preproc.y:16605 preproc.y:16930 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:1706
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl CLOSE DATABASE"
+
+#: preproc.y:1954
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl CONNECT"
+
+#: preproc.y:1988
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl DISCONNECT"
+
+#: preproc.y:2043
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "AT-Option ist nicht erlaubt im Befehl SET CONNECTION"
+
+#: preproc.y:2065
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "AT-Option ist nicht erlaubt im TYPE-Befehl"
+
+#: preproc.y:2074
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "AT-Option ist nicht erlaubt im VAR-Befehl"
+
+#: preproc.y:2081
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "AT-Option ist nicht erlaubt im WHENEVER-Befehl"
+
+#: preproc.y:2158 preproc.y:2330 preproc.y:2335 preproc.y:2458 preproc.y:4036
+#: preproc.y:4684 preproc.y:5626 preproc.y:5926 preproc.y:7544 preproc.y:9083
+#: preproc.y:9088 preproc.y:11923
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "nicht mehr unterstütztes Feature wird an Server weitergereicht werden"
+
+#: preproc.y:2716
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL ist nicht implementiert"
+
+#: preproc.y:3384
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN ist nicht implementiert"
+
+#: preproc.y:10062 preproc.y:15547
+#, 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:10064 preproc.y:15549
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "Cursor »%s« ist bereits definiert"
+
+#: preproc.y:10504
+#, 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:10837 preproc.y:10844
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "Unteranfrage in FROM muss Aliasnamen erhalten"
+
+#: preproc.y:15270 preproc.y:15277
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS kann INTO nicht verwenden"
+
+#: preproc.y:15313
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "»@« erwartet, »%s« gefunden"
+
+#: preproc.y:15325
+#, 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:15328
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "»://« erwartet, »%s« gefunden"
+
+#: preproc.y:15333
+#, 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:15359
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "»postgresql« erwartet, »%s« gefunden"
+
+#: preproc.y:15362
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "ungültiger Verbindungstyp: %s"
+
+#: preproc.y:15371
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "»@« oder »://« erwartet, »%s« gefunden"
+
+#: preproc.y:15446 preproc.y:15464
+#, c-format
+msgid "invalid data type"
+msgstr "ungültiger Datentyp"
+
+#: preproc.y:15475 preproc.y:15492
+#, c-format
+msgid "incomplete statement"
+msgstr "unvollständige Anweisung"
+
+#: preproc.y:15478 preproc.y:15495
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "nicht erkanntes Token »%s«"
+
+#: preproc.y:15765
+#, 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:15777
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "Intervallangabe hier nicht erlaubt"
+
+#: preproc.y:15937 preproc.y:15989
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "zu viele Ebenen in verschachtelter Definition von Struktur/Union"
+
+#: preproc.y:16112
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "Zeiger auf varchar sind nicht implementiert"
+
+#: preproc.y:16299 preproc.y:16324
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "nicht unterstützter DESCRIBE-Befehl wird verwendet"
+
+#: preproc.y:16571
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "Initialisierungswert nicht erlaubt in Befehl EXEC SQL VAR"
+
+#: preproc.y:16888
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "Array aus Indikatoren bei der Eingabe nicht erlaubt"
+
+#: preproc.y:17075
+#, 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:17116
+#, 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/es.po b/src/interfaces/ecpg/preproc/po/es.po
new file mode 100644
index 0000000..11b8929
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/es.po
@@ -0,0 +1,691 @@
+# Spanish translation file for ecpg
+#
+# Copyright (c) 2009-2019, 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
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-05-13 13:53+0000\n"
+"PO-Revision-Date: 2021-05-13 16:14-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: Poedit 2.4.2\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:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "no existe el descriptor «%s»"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "no existe el descriptor del elemento de cabecera «%d»"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable es siempre 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member es siempre 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "elemento del descriptor «%s» no está implementado"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "no se puede establecer el elemento del descriptor «%s»"
+
+#: ecpg.c:35
+#, 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:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Empleo:\n"
+" %s [OPCIÓN]... ARCHIVO...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Opciones:\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 automáticamente código en C desde código SQL\n"
+" incrustado; esto afecta 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 establece el modo de compatibilidad;\n"
+" MODO puede ser \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d genera salida depurada del analizador\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL define SYMBOL\n"
+
+#: ecpg.c:49
+#, 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:50
+#, 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:51
+#, 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:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o ARCHIVO escribe la salida en ARCHIVO\n"
+
+#: ecpg.c:53
+#, 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:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression ejecuta en modo de prueba de regresión\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t activa el compromiso (commit) automático de transacciones\n"
+
+#: ecpg.c:57
+#, 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:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help muestra esta ayuda, luego sale\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"
+"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:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Reporte errores a <%s>.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "Sitio web de %s: <%s>\n"
+
+#: ecpg.c:140
+#, 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:175 ecpg.c:332 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: no se pudo abrir el archivo «%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 "Utilice «%s --help» para obtener mayor información.\n"
+
+#: ecpg.c:242
+#, 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:261
+#, 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:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... la búsqueda comienza aquí:\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "fin de la lista de búsqueda\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: no se especificaron archivos de entrada\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "el cursor «%s» fue declarado pero no abierto"
+
+#: ecpg.c:479 preproc.y:128
+#, 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:654 pgc.l:756
+#, c-format
+msgid "unterminated quoted string"
+msgstr "una cadena en comillas está inconclusa"
+
+#: pgc.l:705
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "una cadena separada por $ está inconclusa"
+
+#: pgc.l:723 pgc.l:736
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identificador delimitado de longitud cero"
+
+#: pgc.l:747
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "un identificador en comillas está inconcluso"
+
+#: pgc.l:1078
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "comentarios /* ... */ anidados"
+
+#: pgc.l:1171
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "falta un identificador en la orden EXEC SQL UNDEF"
+
+#: pgc.l:1189 pgc.l:1202 pgc.l:1218 pgc.l:1231
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "demasiadas condiciones EXEC SQL IFDEF anidadas"
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "falta el «EXEC SQL IFDEF» / «EXEC SQL IFNDEF»"
+
+#: pgc.l:1249 pgc.l:1260 pgc.l:1441
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "falta el «EXEC SQL ENDIF;»"
+
+#: pgc.l:1275 pgc.l:1297
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "hay más de un EXEC SQL ELSE"
+
+#: pgc.l:1320 pgc.l:1334
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF sin coincidencia"
+
+#: pgc.l:1389
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "identificador faltante en la orden EXEC SQL IFDEF"
+
+#: pgc.l:1398
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "identificador faltante en la orden EXEC SQL DEFINE"
+
+#: pgc.l:1431
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "error de sintaxis en orden EXEC SQL INCLUDE"
+
+#: pgc.l:1481
+#, 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:1633
+#, 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:1656
+#, 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:82
+#, c-format
+msgid "WARNING: "
+msgstr "ATENCIÓN: "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "ERROR: "
+
+#: preproc.y:512
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "no existe el cursor «%s»"
+
+#: preproc.y:541
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "inicializador no permitido en definición de tipo"
+
+#: preproc.y:543
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "el nombre de tipo «string» está reservado en modo Informix"
+
+#: preproc.y:550 preproc.y:15962
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "el tipo «%s» ya está definido"
+
+#: preproc.y:575 preproc.y:16605 preproc.y:16930 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:1706
+#, 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:1954
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "la opción AT no está permitida en la sentencia CONNECT"
+
+#: preproc.y:1988
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "la opción AT no está permitida en la sentencia DISCONNECT"
+
+#: preproc.y:2043
+#, 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:2065
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "la opción AT no está permitida en la sentencia TYPE"
+
+#: preproc.y:2074
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "la opción AT no está permitida en la sentencia VAR"
+
+#: preproc.y:2081
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "la opción AT no está permitida en la sentencia WHENEVER"
+
+#: preproc.y:2158 preproc.y:2330 preproc.y:2335 preproc.y:2458 preproc.y:4036
+#: preproc.y:4684 preproc.y:5626 preproc.y:5926 preproc.y:7544 preproc.y:9083
+#: preproc.y:9088 preproc.y:11923
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "característica no soportada será pasada al servidor"
+
+#: preproc.y:2716
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL no está implementado"
+
+#: preproc.y:3384
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN no está implementado"
+
+#: preproc.y:10062 preproc.y:15547
+#, 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:10064 preproc.y:15549
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "el cursor «%s» ya está definido"
+
+#: preproc.y:10504
+#, 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:10837 preproc.y:10844
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "las subconsultas en FROM deben tener un alias"
+
+#: preproc.y:15270 preproc.y:15277
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS no puede especificar INTO"
+
+#: preproc.y:15313
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "se esperaba «@», se encontró «%s»"
+
+#: preproc.y:15325
+#, 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:15328
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "se esperaba «://», se encontró «%s»"
+
+#: preproc.y:15333
+#, 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:15359
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "se esperaba «postgresql», se encontró «%s»"
+
+#: preproc.y:15362
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "tipo de conexión no válido: %s"
+
+#: preproc.y:15371
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "se esperaba «@» o «://», se encontró «%s»"
+
+#: preproc.y:15446 preproc.y:15464
+#, c-format
+msgid "invalid data type"
+msgstr "tipo de dato no válido"
+
+#: preproc.y:15475 preproc.y:15492
+#, c-format
+msgid "incomplete statement"
+msgstr "sentencia incompleta"
+
+#: preproc.y:15478 preproc.y:15495
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "elemento «%s» no reconocido"
+
+#: preproc.y:15765
+#, 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:15777
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "la especificación de intervalo no está permitida aquí"
+
+#: preproc.y:15937 preproc.y:15989
+#, 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:16112
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "los punteros a varchar no están implementados"
+
+#: preproc.y:16299 preproc.y:16324
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "utilizando sentencia DESCRIBE no soportada"
+
+#: preproc.y:16571
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "inicializador no permitido en la orden EXEC SQL VAR"
+
+#: preproc.y:16888
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "no se permiten los arrays de indicadores en la entrada"
+
+#: preproc.y:17075
+#, 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:17116
+#, 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..1ad637c
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/fr.po
@@ -0,0 +1,736 @@
+# 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 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-11-08 08:39+0000\n"
+"PO-Revision-Date: 2020-11-08 11:48+0100\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 2.4.1\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:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "le descripteur « %s » n'existe pas"
+
+#: descriptor.c:161 descriptor.c:213
+#, 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:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable vaut toujours 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member vaut toujours 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "l'élément du descripteur « %s » n'est pas implanté"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "l'élément du descripteur « %s » ne peut pas être initialisé"
+
+#: ecpg.c:35
+#, 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:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Usage:\n"
+" %s [OPTION]... FICHIER...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Options:\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 produit automatiquement le code C à partir du code SQL embarqué ;\n"
+" ceci affecte 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 configure le mode de compatibilité ; MODE peut être\n"
+" « INFORMIX », « INFORMIX_SE » ou « ORACLE »\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d produit la sortie de débogage de l'analyseur\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOLE définit SYMBOLE\n"
+
+#: ecpg.c:49
+#, 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 « -c »\n"
+
+#: ecpg.c:50
+#, 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:51
+#, 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:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o FICHIER écrit le résultat dans FICHIER\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 indique le comportement à l'exécution ; OPTION peut valoir :\n"
+" « no_indicator », « prepare », « questionmarks »\n"
+
+#: ecpg.c:55
+#, 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:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t active la validation automatique des transactions\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version affiche la version et quitte\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help affiche cette aide et quitte\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"
+"Si aucun nom de fichier en sortie n'est fourni, le nom est formaté en\n"
+"ajoutant le suffixe .c au nom du fichier en entrée après avoir supprimé le\n"
+"suffixe .pgc s'il est présent\n"
+
+#: ecpg.c:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr ""
+"\n"
+"Rapporter les bogues à <%s>.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "page d'accueil de %s : <%s>\n"
+
+#: ecpg.c:140
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s : n'a pas pu localiser mon propre exécutable\n"
+
+#: ecpg.c:175 ecpg.c:332 ecpg.c:343
+#, 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:218 ecpg.c:231 ecpg.c:247 ecpg.c:273
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Essayer « %s --help » pour plus d'informations.\n"
+
+#: ecpg.c:242
+#, 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:261
+#, 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:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "la recherche EXEC SQL INCLUDE ... commence ici :\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "fin de la liste de recherche\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s : aucun fichier précisé en entrée\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "le curseur « %s » est déclaré mais non ouvert"
+
+#: ecpg.c:479 preproc.y:128
+#, 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éralle 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:654 pgc.l:756
+#, c-format
+msgid "unterminated quoted string"
+msgstr "chaîne entre guillemets non terminée"
+
+#: pgc.l:705
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "chaîne entre guillemets dollars non terminée"
+
+#: pgc.l:723 pgc.l:736
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identifiant délimité de taille zéro"
+
+#: pgc.l:747
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "identifiant entre guillemet non terminé"
+
+#: pgc.l:1078
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "commentaires /* ... */ imbriqués"
+
+#: pgc.l:1171
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "identifiant manquant dans la commande EXEC SQL UNDEF"
+
+#: pgc.l:1189 pgc.l:1202 pgc.l:1218 pgc.l:1231
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "trop de conditions EXEC SQL IFDEF imbriquées"
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "correspondance manquante « EXEC SQL IFDEF » / « EXEC SQL IFNDEF »"
+
+#: pgc.l:1249 pgc.l:1260 pgc.l:1441
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "« EXEC SQL ENDIF; » manquant"
+
+#: pgc.l:1275 pgc.l:1297
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "plusieurs EXEC SQL ELSE"
+
+#: pgc.l:1320 pgc.l:1334
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF différent"
+
+#: pgc.l:1389
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "identifiant manquant dans la commande EXEC SQL IFDEF"
+
+#: pgc.l:1398
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "identifiant manquant dans la commande EXEC SQL DEFINE"
+
+#: pgc.l:1431
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "erreur de syntaxe dans la commande EXEC SQL INCLUDE"
+
+#: pgc.l:1481
+#, 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:1633
+#, 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:1656
+#, 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:82
+#, c-format
+msgid "WARNING: "
+msgstr "ATTENTION : "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "ERREUR : "
+
+#: preproc.y:512
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "le curseur « %s » n'existe pas"
+
+#: preproc.y:541
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "initialiseur non autorisé dans la définition du type"
+
+#: preproc.y:543
+#, 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:550 preproc.y:15962
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "le type « %s » est déjà défini"
+
+#: preproc.y:575 preproc.y:16605 preproc.y:16930 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:1706
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "option AT non autorisée dans une instruction CLOSE DATABASE"
+
+#: preproc.y:1954
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "option AT non autorisée dans une instruction CONNECT"
+
+#: preproc.y:1988
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "option AT non autorisée dans une instruction DISCONNECT"
+
+#: preproc.y:2043
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "option AT non autorisée dans une instruction SET CONNECTION"
+
+#: preproc.y:2065
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "option AT non autorisée dans une instruction TYPE"
+
+#: preproc.y:2074
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "option AT non autorisée dans une instruction VAR"
+
+#: preproc.y:2081
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "option AT non autorisée dans une instruction WHENEVER"
+
+#: preproc.y:2158 preproc.y:2330 preproc.y:2335 preproc.y:2458 preproc.y:4036 preproc.y:4684
+#: preproc.y:5626 preproc.y:5926 preproc.y:7544 preproc.y:9083 preproc.y:9088 preproc.y:11923
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "la fonctionnalité non supportée sera passée au serveur"
+
+#: preproc.y:2716
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL n'est pas implanté"
+
+#: preproc.y:3384
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN n'est pas implanté"
+
+#: preproc.y:10062 preproc.y:15547
+#, 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:10064 preproc.y:15549
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "le curseur « %s » est déjà défini"
+
+#: preproc.y:10504
+#, 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:10837 preproc.y:10844
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "la sous-requête du FROM doit avoir un alias"
+
+#: preproc.y:15270 preproc.y:15277
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS ne peut pas indiquer INTO"
+
+#: preproc.y:15313
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "« @ » attendu, « %s » trouvé"
+
+#: preproc.y:15325
+#, 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:15328
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "« :// » attendu, « %s » trouvé"
+
+#: preproc.y:15333
+#, 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:15359
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "« postgresql » attendu, « %s » trouvé"
+
+#: preproc.y:15362
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "type de connexion invalide : %s"
+
+#: preproc.y:15371
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "« @ » ou « :// » attendu, « %s » trouvé"
+
+#: preproc.y:15446 preproc.y:15464
+#, c-format
+msgid "invalid data type"
+msgstr "type de données invalide"
+
+#: preproc.y:15475 preproc.y:15492
+#, c-format
+msgid "incomplete statement"
+msgstr "instruction incomplète"
+
+#: preproc.y:15478 preproc.y:15495
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "jeton « %s » non reconnu"
+
+#: preproc.y:15765
+#, 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:15777
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "interval de spécification non autorisé ici"
+
+#: preproc.y:15937 preproc.y:15989
+#, 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:16112
+#, 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:16299 preproc.y:16324
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "utilisation de l'instruction DESCRIBE non supporté"
+
+#: preproc.y:16571
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "initialiseur non autorisé dans la commande EXEC SQL VAR"
+
+#: preproc.y:16888
+#, 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:17075
+#, 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:17116
+#, 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 ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@lists.postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Rapporter les bogues à <pgsql-bugs@lists.postgresql.org>.\n"
+
+#~ msgid "declared name \"%s\" is already defined"
+#~ msgstr "le nom déclaré « %s » est déjà défini"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version affiche la version et quitte\n"
+
+#~ msgid "AT option not allowed in DEALLOCATE statement"
+#~ msgstr "option AT non autorisée dans une instruction DEALLOCATE"
+
+#~ msgid "constraint declared INITIALLY DEFERRED must be DEFERRABLE"
+#~ msgstr "une contrainte déclarée INITIALLY DEFERRED doit être DEFERRABLE"
+
+#~ 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 "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 "COPY FROM STDOUT is not possible"
+#~ msgstr "COPY FROM STDOUT n'est pas possible"
+
+#~ msgid "COPY TO STDIN is not possible"
+#~ msgstr "COPY TO STDIN n'est pas possible"
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..81b0626
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/ja.po
@@ -0,0 +1,709 @@
+# Japanese message translation file for ecpg-preproc
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_archivecleanup (PostgreSQL) package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg-preproc (PostgreSQL 12 beta 1)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-06-11 09:06+0900\n"
+"PO-Revision-Date: 2019-06-11 09:10+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.5.4\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 "nullableは常に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: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 <pgsql-bugs@lists.postgresql.org>.\n"
+msgstr ""
+"\n"
+"不具合は<pgsql-bugs@lists.postgresql.org>まで報告してください。\n"
+
+#: ecpg.c:182
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: 自身の実行ファイルの場所がわかりません\n"
+
+#: ecpg.c:217 ecpg.c:374 ecpg.c:385
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: ファイル\"%s\"をオープンできませんでした: %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 "詳細は\"%s --help\"を実行してください。\n"
+
+#: ecpg.c:284
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: パーサデバッグのサポート(-d)を利用できません\n"
+
+#: ecpg.c:303
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL埋込みC言語プリプロセッサ, バージョン%s\n"
+
+#: ecpg.c:305
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... 検索が始まります\n"
+
+#: ecpg.c:308
+#, c-format
+msgid "end of search list\n"
+msgstr "検索リストの終端です\n"
+
+#: ecpg.c:314
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: 入力ファイルが指定されていません\n"
+
+#: ecpg.c:497
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "カーソル%sは宣言されましたが、オープンされていません"
+
+#: ecpg.c:510 preproc.y:129
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "出力ファイル\"%s\"を削除できませんでした\n"
+
+#: pgc.l:472
+#, c-format
+msgid "unterminated /* comment"
+msgstr "/*コメントが閉じていません"
+
+#: pgc.l:490
+#, c-format
+msgid "invalid bit string literal"
+msgstr "無効なビット列リテラルです"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "ビット文字列リテラルの終端がありません"
+
+#: pgc.l:518
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "16進数文字列リテラルの終端がありません"
+
+#: pgc.l:614 pgc.l:718
+#, c-format
+msgid "unterminated quoted string"
+msgstr "文字列の引用符が閉じていません"
+
+#: pgc.l:665
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "文字列のドル引用符が閉じていません"
+
+#: pgc.l:684 pgc.l:697
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "区切りつき識別子の長さがゼロです"
+
+#: pgc.l:709
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "識別子の引用符が閉じていません"
+
+#: pgc.l:1040
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "入れ子状の /* ... */ コメント"
+
+#: pgc.l:1133
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "EXEC SQL UNDEFコマンドにおいて識別子がありません"
+
+#: pgc.l:1179 pgc.l:1193
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "対応する\"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\"がありません"
+
+#: pgc.l:1182 pgc.l:1195 pgc.l:1373
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "\"EXEC SQL ENDIF;\"がありません"
+
+#: pgc.l:1211 pgc.l:1230
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "1つ以上のEXEC SQL ELSE\"が存在します"
+
+#: pgc.l:1252 pgc.l:1266
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIFに対応するものがありません"
+
+#: pgc.l:1286
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "入れ子状のEXEC SQL IFDEF条件が多すぎます"
+
+#: pgc.l:1321
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "EXEC SQL IFDEFコマンドにおいて識別子がありません"
+
+#: pgc.l:1330
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "EXEC SQL DEFINEコマンドにおいて識別子がありません"
+
+#: pgc.l:1363
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "EXEC SQL INCLUDEコマンドにおいて構文エラーがあります"
+
+#: pgc.l:1413
+#, c-format
+#| msgid ""
+#| "internal error: unreachable state; please report this to <pgsql-"
+#| "bugs@postgresql.org>"
+msgid ""
+"internal error: unreachable state; please report this to <pgsql-bugs@lists."
+"postgresql.org>"
+msgstr ""
+"内部エラー: 到達しないはずの状態です。<pgsql-bugs@lists.postgresql.org>まで報"
+"告してください"
+
+#: pgc.l:1564
+#, 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:1587
+#, 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:83
+#, c-format
+msgid "WARNING: "
+msgstr "警告: "
+
+#: preproc.y:86
+#, c-format
+msgid "ERROR: "
+msgstr "エラー: "
+
+#: preproc.y:510
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "カーソル\"%s\"は存在しません"
+
+#: preproc.y:539
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "型定義では初期化子は許されません"
+
+#: preproc.y:541
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "型名\"string\"はInformixモードですでに予約されています"
+
+#: preproc.y:548 preproc.y:15877
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "\"%s\"型はすでに定義されています"
+
+#: preproc.y:573 preproc.y:16548 preproc.y:16873 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "単純なデータ型の多次元配列はサポートされていません"
+
+#: preproc.y:1938
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "CONNECT文ではATオプションは許されません"
+
+#: preproc.y:1976
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "DISCONNECT文ではATオプションは許されません"
+
+#: preproc.y:2038
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "SET CONNECTION文ではATオプションは許されません"
+
+#: preproc.y:2060
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "TYPE文ではATオプションは許されません"
+
+#: preproc.y:2069
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "VAR文ではATオプションは許されません"
+
+#: preproc.y:2076
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "WHENEVER文ではATオプションは許されません"
+
+#: preproc.y:2153 preproc.y:2325 preproc.y:2330 preproc.y:2453 preproc.y:4046
+#: preproc.y:5635 preproc.y:5935 preproc.y:7563 preproc.y:9075 preproc.y:9080
+#: preproc.y:11880
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "非サポートの機能がサーバに渡されます"
+
+#: preproc.y:2711
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALLは実装されていません"
+
+#: preproc.y:3369
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "CLOSE DATABASE文ではATオプションは許されません"
+
+#: preproc.y:3394
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDINは実装されていません"
+
+#: preproc.y:10026 preproc.y:15460
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr ""
+"異なったdeclareステートメントにおける変数\"%s\"の使用はサポートされていません"
+
+#: preproc.y:10028 preproc.y:15462
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "カーソル\"%s\"はすでに定義されています"
+
+#: preproc.y:10469
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "サーバに渡されるLIMIT #,#構文はもはやサポートされていません"
+
+#: preproc.y:10794 preproc.y:10801
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "FROM句の副問い合わせは別名を持たなければなりません"
+
+#: preproc.y:15151 preproc.y:15158
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE ASはINTOを指定できません"
+
+#: preproc.y:15194
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "想定では\"@\"、結果では\"%s\""
+
+#: preproc.y:15206
+#, c-format
+msgid ""
+"only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are "
+"supported"
+msgstr ""
+"プロトコルでは\"tcp\"および\"unix\"のみ、データベースの種類では\"postgresql"
+"\"のみがサポートされています"
+
+#: preproc.y:15209
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "想定では\"://\"、結果では\"%s\""
+
+#: preproc.y:15214
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr ""
+"Unixドメインソケットは\"localhost\"でのみで動作し、\"%s\"では動作しません"
+
+#: preproc.y:15240
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "想定では\"postgresql\"、結果では\"%s\""
+
+#: preproc.y:15243
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "無効な接続種類: %s"
+
+#: preproc.y:15252
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "想定では\"@または\"\"://\"、結果では\"%s\""
+
+#: preproc.y:15327 preproc.y:15345
+#, c-format
+msgid "invalid data type"
+msgstr "無効なデータ型"
+
+#: preproc.y:15356 preproc.y:15373
+#, c-format
+msgid "incomplete statement"
+msgstr "不完全な文"
+
+#: preproc.y:15359 preproc.y:15376
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "認識できないトークン\"%s\""
+
+#: preproc.y:15422
+#, c-format
+#| msgid "cursor \"%s\" is already defined"
+msgid "declared name %s is already defined"
+msgstr "宣言名\"%s\"はすでに定義されています"
+
+#: preproc.y:15680
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr ""
+"数値データ型または10進数データ型のみが精度/位取り引数と取ることができます"
+
+#: preproc.y:15692
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "時間間隔の指定はここでは許されません"
+
+#: preproc.y:15852 preproc.y:15904
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "構造体/ユニオンの定義の入れ子レベルが深すぎます"
+
+#: preproc.y:16055
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "varcharを指し示すポインタは実装されていません"
+
+#: preproc.y:16242 preproc.y:16267
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "未サポートのDESCRIBE文の使用"
+
+#: preproc.y:16514
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "EXEC SQL VARコマンドでは初期化子は許されません"
+
+#: preproc.y:16831
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "指示子配列は入力として許されません"
+
+#: preproc.y:17052
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "変数定義では演算子は許されません"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:17093
+#, 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] ""
+"複数レベルのポインタ(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 "構造体の多次元配列はサポートされていません"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to <pgsql-bugs@postgresql.org>.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "不具合は<pgsql-bugs@postgresql.org>に報告してください。\n"
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..1938e06
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/pt_BR.po
@@ -0,0 +1,687 @@
+# Brazilian Portuguese message translation file for ecpg
+#
+# Copyright (C) 2009-2020 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 <euler@eulerto.com>, 2010-2021.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-05-09 10:51-0300\n"
+"PO-Revision-Date: 2018-06-25 08:59+0200\n"
+"Last-Translator: Euler Taveira <euler@eulerto.com>\n"
+"Language-Team: Brazilian Portuguese <pgsql-translators@postgresql.org>\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:213
+#, 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:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "item do descritor \"%s\" não está implementado"
+
+#: descriptor.c:290
+#, 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\", \"ORACLE\"\n"
+msgstr ""
+" -C mode define o modo de compatilidade; MODE pode ser um de\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\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 <%s>.\n"
+msgstr ""
+"\n"
+"Relate erros a <%s>.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "página web do %s: <%s>\n"
+
+#: ecpg.c:140
+#, 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:332 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: não pôde abrir arquivo \"%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 "Tente \"%s --help\" para obter informações adicionais.\n"
+
+#: ecpg.c:242
+#, 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:261
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, the pré-processador C embutido do PostgreSQL, versão %s\n"
+
+#: ecpg.c:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... pesquisa inicia aqui:\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "fim da lista de pesquisa\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: nenhum arquivo de entrada foi especificado\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "cursor \"%s\" foi declarado mas não foi aberto"
+
+#: ecpg.c:479 preproc.y:128
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "não pôde remover arquivo de saída \"%s\"\n"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated /* comment"
+msgstr "comentário /* não foi terminado"
+
+#: pgc.l:519
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "cadeia de bits não foi terminada"
+
+#: pgc.l:527
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "cadeia de caracteres hexadecimal não foi terminada"
+
+#: pgc.l:602
+#, c-format
+msgid "invalid bit string literal"
+msgstr "cadeia de bits inválida"
+
+#: pgc.l:607
+#, c-format
+msgid "invalid hex string literal"
+msgstr "cadeia de hexadecimais inválida"
+
+#: pgc.l:625
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "estado anterior não tratado em xqs\n"
+
+#: pgc.l:654 pgc.l:756
+#, c-format
+msgid "unterminated quoted string"
+msgstr "cadeia de caracteres entre aspas não foi terminada"
+
+#: pgc.l:705
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "cadeia de caracteres entre dólares não foi terminada"
+
+#: pgc.l:723 pgc.l:736
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "identificador delimitado tem tamanho zero"
+
+#: pgc.l:747
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "identificador entre aspas não foi terminado"
+
+#: pgc.l:1078
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "comentários /* ... */ aninhados"
+
+#: pgc.l:1171
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "faltando identificador no comando EXEC SQL UNDEF"
+
+#: pgc.l:1189 pgc.l:1202 pgc.l:1218 pgc.l:1231
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "muitas condições EXEC SQL IFDEF aninhadas"
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "faltando correspondente \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1249 pgc.l:1260 pgc.l:1441
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "faltando \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1275 pgc.l:1297
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "mais de um EXEC SQL ELSE"
+
+#: pgc.l:1320 pgc.l:1334
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF não tem correspondente"
+
+#: pgc.l:1389
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "faltando identificador no comando EXEC SQL IFDEF"
+
+#: pgc.l:1398
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "faltando identificador no comando EXEC SQL IFDEF"
+
+#: pgc.l:1431
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "erro de sintaxe no comando EXEC SQL INCLUDE"
+
+#: pgc.l:1481
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "erro interno: estado inacessível; por favor relato isso a <%s>"
+
+#: pgc.l:1633
+#, 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:1656
+#, 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:82
+#, c-format
+msgid "WARNING: "
+msgstr "AVISO: "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "ERRO: "
+
+#: preproc.y:512
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "cursor \"%s\" não existe"
+
+#: preproc.y:541
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "inicializador não é permitido na definição do tipo"
+
+#: preproc.y:543
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "nome de tipo \"string\" é reservado no modo Informix"
+
+#: preproc.y:550 preproc.y:15962
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "tipo \"%s\" já está definido"
+
+#: preproc.y:575 preproc.y:16605 preproc.y:16930 variable.c:621
+#, 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:1706
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "opção AT não é permitida no comando CLOSE DATABASE"
+
+#: preproc.y:1954
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "opção AT não é permitida no comando CONNECT"
+
+#: preproc.y:1988
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "opção AT não é permitida no comando DISCONNECT"
+
+#: preproc.y:2043
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "opção AT não é permitida no comando SET CONNECTION"
+
+#: preproc.y:2065
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "opção AT não é permitida no comando TYPE"
+
+#: preproc.y:2074
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "opção AT não é permitida no comando VAR"
+
+#: preproc.y:2081
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "opção AT não é permitida no comando WHENEVER"
+
+#: preproc.y:2158 preproc.y:2330 preproc.y:2335 preproc.y:2458 preproc.y:4036
+#: preproc.y:4684 preproc.y:5626 preproc.y:5926 preproc.y:7544 preproc.y:9083
+#: preproc.y:9088 preproc.y:11923
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "funcionalidade não suportada será enviada ao servidor"
+
+#: preproc.y:2716
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL não está implementado"
+
+#: preproc.y:3384
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN não está implementado"
+
+#: preproc.y:10062 preproc.y:15547
+#, 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:10064 preproc.y:15549
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "cursor \"%s\" já está definido"
+
+#: preproc.y:10504
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "sintaxe LIMIT #,# que não é suportada foi enviada ao servidor"
+
+#: preproc.y:10837 preproc.y:10844
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "subconsulta no FROM deve ter um aliás"
+
+#: preproc.y:15270 preproc.y:15277
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS não pode especificar INTO"
+
+#: preproc.y:15313
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "esperado \"@\", encontrado \"%s\""
+
+#: preproc.y:15325
+#, 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:15328
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "esperado \"://\", encontrado \"%s\""
+
+#: preproc.y:15333
+#, 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:15359
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "esperado \"postgresql\", encontrado \"%s\""
+
+#: preproc.y:15362
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "tipo de conexão inválido: %s"
+
+#: preproc.y:15371
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "esperado \"@\" ou \"://\", encontrado \"%s\""
+
+#: preproc.y:15446 preproc.y:15464
+#, c-format
+msgid "invalid data type"
+msgstr "tipo de dado inválido"
+
+#: preproc.y:15475 preproc.y:15492
+#, c-format
+msgid "incomplete statement"
+msgstr "comando incompleto"
+
+#: preproc.y:15478 preproc.y:15495
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "informação desconhecida \"%s\""
+
+#: preproc.y:15765
+#, 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:15777
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "especificação de intervalo não é permitida aqui"
+
+#: preproc.y:15937 preproc.y:15989
+#, 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:16112
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "ponteiros para varchar não estão implentados"
+
+#: preproc.y:16299 preproc.y:16324
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "utilizando comando DESCRIBE que não é suportado"
+
+#: preproc.y:16571
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "inicilização não é permitido no comando EXEC SQL VAR"
+
+#: preproc.y:16888
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "matrizes do indicadores não são permitidas na entrada"
+
+#: preproc.y:17075
+#, 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:17116
+#, 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:214 type.c:685
+#, c-format
+msgid "unrecognized variable type code %d"
+msgstr "tipo de código de variável %d é desconhecido"
+
+#: type.c:263
+#, 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:265
+#, c-format
+msgid "variable \"%s\" is hidden by a local variable"
+msgstr "variável \"%s\" está escondida por uma variável local"
+
+#: type.c:277
+#, 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:279
+#, 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:287
+#, c-format
+msgid "indicator for array/pointer has to be array/pointer"
+msgstr "indicador para matriz/ponteiro tem de ser matriz/ponteiro"
+
+#: type.c:291
+#, c-format
+msgid "nested arrays are not supported (except strings)"
+msgstr "matrizes aninhadas não são suportadas (exceto cadeia de caracteres)"
+
+#: type.c:333
+#, c-format
+msgid "indicator for struct has to be a struct"
+msgstr "indicador para struct tem que ser struct"
+
+#: type.c:353 type.c:374 type.c:394
+#, 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:625
+#, c-format
+msgid "indicator struct \"%s\" has too few members"
+msgstr "indicador struct \"%s\" tem poucos membros"
+
+#: type.c:633
+#, c-format
+msgid "indicator struct \"%s\" has too many members"
+msgstr "indicador struct \"%s\" tem muitos membros"
+
+#: type.c:744
+#, 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..79b69b0
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/ru.po
@@ -0,0 +1,722 @@
+# 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.
+msgid ""
+msgstr ""
+"Project-Id-Version: ecpg (PostgreSQL current)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-11-09 07:34+0300\n"
+"PO-Revision-Date: 2020-11-09 08:27+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: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 "NULLABLE всегда равно 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 - препроцессор SQL-вставок в программах на C для PostgreSQL.\n"
+"\n"
+
+#: ecpg.c:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Использование:\n"
+" %s [ПАРАМЕТР]... ФАЙЛ...\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 автоматически генерировать код C из внедрённого SQL-кода;\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 РЕЖИМ установить режим совместимости; допустимый РЕЖИМ:\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 СИМВОЛ определить (define) СИМВОЛ\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 " -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"
+
+# skip-rule: space-before-period
+#: 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, версия %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 "оборванная шестнадцатеричная строка"
+
+#: 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:654 pgc.l:756
+#, c-format
+msgid "unterminated quoted string"
+msgstr "незавершённая строка в кавычках"
+
+#: pgc.l:705
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "незавершённая строка в долларах"
+
+#: pgc.l:723 pgc.l:736
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "пустой идентификатор в кавычках"
+
+#: pgc.l:747
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "незавершённый идентификатор в кавычках"
+
+#: pgc.l:1078
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "вложенные комментарии /* ... */"
+
+#: pgc.l:1171
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "в команде EXEC SQL UNDEF отсутствует идентификатор"
+
+#: pgc.l:1189 pgc.l:1202 pgc.l:1218 pgc.l:1231
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "слишком много вложенных условий EXEC SQL IFDEF"
+
+#: pgc.l:1247 pgc.l:1258 pgc.l:1273 pgc.l:1295
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "нет соответствующего \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1249 pgc.l:1260 pgc.l:1441
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "отсутствует \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1275 pgc.l:1297
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "неоднократная команда EXEC SQL ELSE"
+
+#: pgc.l:1320 pgc.l:1334
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "непарная команда EXEC SQL ENDIF"
+
+#: pgc.l:1389
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "в команде EXEC SQL IFDEF отсутствует идентификатор"
+
+#: pgc.l:1398
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "в команде EXEC SQL DEFINE отсутствует идентификатор"
+
+#: pgc.l:1431
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "ошибка синтаксиса в команде EXEC SQL INCLUDE"
+
+#: pgc.l:1481
+#, c-format
+msgid "internal error: unreachable state; please report this to <%s>"
+msgstr "внутренняя ошибка: недостижимое состояние; пожалуйста, сообщите в <%s>"
+
+#: pgc.l:1633
+#, c-format
+msgid "Error: include path \"%s/%s\" is too long on line %d, skipping\n"
+msgstr ""
+"Ошибка: путь включаемых файлов \"%s/%s\" в строке %d слишком длинный, "
+"пропускается\n"
+
+#: pgc.l:1656
+#, 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\" в режиме Informix зарезервировано"
+
+#: preproc.y:550 preproc.y:15962
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "тип \"%s\" уже определён"
+
+#: preproc.y:575 preproc.y:16605 preproc.y:16930 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "многомерные массивы с простыми типами данных не поддерживаются"
+
+#: preproc.y:1706
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "оператор CLOSE DATABASE с параметром AT не поддерживается"
+
+#: preproc.y:1954
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "оператор CONNECT с параметром AT не поддерживается"
+
+#: preproc.y:1988
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "оператор DISCONNECT с параметром AT не поддерживается"
+
+#: preproc.y:2043
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "оператор SET CONNECTION с параметром AT не поддерживается"
+
+#: preproc.y:2065
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "оператор TYPE с параметром AT не поддерживается"
+
+#: preproc.y:2074
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "оператор VAR с параметром AT не поддерживается"
+
+#: preproc.y:2081
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "оператор WHENEVER с параметром AT не поддерживается"
+
+#: preproc.y:2158 preproc.y:2330 preproc.y:2335 preproc.y:2458 preproc.y:4036
+#: preproc.y:4684 preproc.y:5626 preproc.y:5926 preproc.y:7544 preproc.y:9083
+#: preproc.y:9088 preproc.y:11923
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "неподдерживаемая функция будет передана серверу"
+
+#: preproc.y:2716
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL не реализовано"
+
+#: preproc.y:3384
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "операция COPY FROM STDIN не реализована"
+
+#: preproc.y:10062 preproc.y:15547
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr ""
+"использование переменной \"%s\" в разных операторах DECLARE не поддерживается"
+
+#: preproc.y:10064 preproc.y:15549
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "курсор \"%s\" уже определён"
+
+#: preproc.y:10504
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "не поддерживаемое более предложение LIMIT #,# передано на сервер"
+
+#: preproc.y:10837 preproc.y:10844
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "подзапрос во FROM должен иметь псевдоним"
+
+#: preproc.y:15270 preproc.y:15277
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "в CREATE TABLE AS нельзя указать INTO"
+
+#: preproc.y:15313
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "ожидался знак \"@\", но на этом месте \"%s\""
+
+#: preproc.y:15325
+#, c-format
+msgid ""
+"only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are "
+"supported"
+msgstr ""
+"поддерживаются только протоколы \"tcp\" и \"unix\", а тип базы данных - "
+"\"postgresql\""
+
+#: preproc.y:15328
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "ожидалось \"://\", но на этом месте \"%s\""
+
+#: preproc.y:15333
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-сокеты работают только с \"localhost\", но не с адресом \"%s\""
+
+#: preproc.y:15359
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "ожидался тип \"postgresql\", но на этом месте \"%s\""
+
+#: preproc.y:15362
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "неверный тип подключения: %s"
+
+#: preproc.y:15371
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "ожидалось \"@\" или \"://\", но на этом месте \"%s\""
+
+#: preproc.y:15446 preproc.y:15464
+#, c-format
+msgid "invalid data type"
+msgstr "неверный тип данных"
+
+#: preproc.y:15475 preproc.y:15492
+#, c-format
+msgid "incomplete statement"
+msgstr "неполный оператор"
+
+#: preproc.y:15478 preproc.y:15495
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "нераспознанное ключевое слово \"%s\""
+
+#: preproc.y:15765
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr ""
+"точность/масштаб можно указать только для типов данных numeric и decimal"
+
+#: preproc.y:15777
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "определение интервала здесь не допускается"
+
+#: preproc.y:15937 preproc.y:15989
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "слишком много уровней в определении вложенной структуры/объединения"
+
+#: preproc.y:16112
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "указатели на varchar не реализованы"
+
+#: preproc.y:16299 preproc.y:16324
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "используется неподдерживаемый оператор DESCRIBE"
+
+#: preproc.y:16571
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "команда EXEC SQL VAR не может включать инициализатор"
+
+#: preproc.y:16888
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "массивы индикаторов на входе недопустимы"
+
+#: preproc.y:17075
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "недопустимый оператор в определении переменной"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:17116
+#, 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 ""
+#~ "\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..6703c2d
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/sv.po
@@ -0,0 +1,677 @@
+# 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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-04-10 02:39+0000\n"
+"PO-Revision-Date: 2020-04-10 07:48+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"
+
+#: descriptor.c:64
+#, c-format
+msgid "variable \"%s\" must have a numeric type"
+msgstr "variabel \"%s\" måste ha en numerisk typ"
+
+#: descriptor.c:124 descriptor.c:146
+#, c-format
+msgid "descriptor \"%s\" does not exist"
+msgstr "deskriptor \"%s\" finns inte"
+
+#: descriptor.c:161 descriptor.c:213
+#, c-format
+msgid "descriptor header item \"%d\" does not exist"
+msgstr "deskriptor-header-post \"%d\" finns inte"
+
+#: descriptor.c:183
+#, c-format
+msgid "nullable is always 1"
+msgstr "nullable är alltid 1"
+
+#: descriptor.c:186
+#, c-format
+msgid "key_member is always 0"
+msgstr "key_member är alltid 0"
+
+#: descriptor.c:280
+#, c-format
+msgid "descriptor item \"%s\" is not implemented"
+msgstr "deskriptor-post \"%s\" är inte implementerad"
+
+#: descriptor.c:290
+#, c-format
+msgid "descriptor item \"%s\" cannot be set"
+msgstr "deskriptor-post \"%s\" kan inte sättas"
+
+#: ecpg.c:35
+#, 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:37
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... FILE...\n"
+"\n"
+msgstr ""
+"Användning:\n"
+" %s [FLAGGA]... FIL...\n"
+"\n"
+
+#: ecpg.c:40
+#, c-format
+msgid "Options:\n"
+msgstr "Flaggor:\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 generera automatiskt C-kod från inbäddad SQL-kod;\n"
+" detta påverkar 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 LÄGE sätt kompabilitetsläge; LÄGE kan vara en av\n"
+" \"INFORMIX\", \"INFORMIX_SE\", \"ORACLE\"\n"
+
+#: ecpg.c:46
+#, c-format
+msgid " -d generate parser debug output\n"
+msgstr " -d generera parser-debug-utmatning\n"
+
+#: ecpg.c:48
+#, c-format
+msgid " -D SYMBOL define SYMBOL\n"
+msgstr " -D SYMBOL definiera SYMBOL\n"
+
+#: ecpg.c:49
+#, 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:50
+#, c-format
+msgid " -i parse system include files as well\n"
+msgstr " -i parsa system-include-filer dessutom\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I KATALOG sök i KATALOG efter include-filer\n"
+
+#: ecpg.c:52
+#, c-format
+msgid " -o OUTFILE write result to OUTFILE\n"
+msgstr " -o UTFIL skriv resultat till UTFIL\n"
+
+#: ecpg.c:53
+#, 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:55
+#, c-format
+msgid " --regression run in regression testing mode\n"
+msgstr " --regression kör i regressions-test-läge\n"
+
+#: ecpg.c:56
+#, c-format
+msgid " -t turn on autocommit of transactions\n"
+msgstr " -t slå på auto-commit av transaktioner\n"
+
+#: ecpg.c:57
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version visa versionsinformation, avsluta sedan\n"
+
+#: ecpg.c:58
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help visa denna hjälp, avsluta sedan\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"
+"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:61
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <%s>.\n"
+msgstr "\nRapportera fel till <%s>.\n"
+
+#: ecpg.c:62
+#, c-format
+msgid "%s home page: <%s>\n"
+msgstr "hemsida för %s: <%s>\n"
+
+#: ecpg.c:140
+#, 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:175 ecpg.c:332 ecpg.c:343
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: kunde inte öppna fil \"%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 "Försök med \"%s --help\" för mer information.\n"
+
+#: ecpg.c:242
+#, 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:261
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQLs inbäddade C-preprocessor, version %s\n"
+
+#: ecpg.c:263
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... sökning startar här:\n"
+
+#: ecpg.c:266
+#, c-format
+msgid "end of search list\n"
+msgstr "slut på söklista\n"
+
+#: ecpg.c:272
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: inga indatafiler angivna\n"
+
+#: ecpg.c:466
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "markören \"%s\" har deklarerats men inte öppnats"
+
+#: ecpg.c:479 preproc.y:128
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "kunde inte ta bort utdatafil \"%s\"\n"
+
+#: pgc.l:486
+#, c-format
+msgid "unterminated /* comment"
+msgstr "ej avslutad /*-kommentar"
+
+#: pgc.l:503
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "ej avslutad bitsträngslitteral"
+
+#: pgc.l:511
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "ej avslutad hexadecimal stränglitteral"
+
+#: pgc.l:586
+#, c-format
+msgid "invalid bit string literal"
+msgstr "ogiltig bit-sträng-literal"
+
+#: pgc.l:607
+#, c-format
+msgid "unhandled previous state in xqs\n"
+msgstr "tidigare state i xqs som ej kan hanteras\n"
+
+#: pgc.l:636 pgc.l:738
+#, c-format
+msgid "unterminated quoted string"
+msgstr "icketerminerad citerad sträng"
+
+#: pgc.l:687
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "icke terminerad dollarciterad sträng"
+
+#: pgc.l:705 pgc.l:718
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "noll-längds avdelad identifierare"
+
+#: pgc.l:729
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "ej avslutad citerad identifierare"
+
+#: pgc.l:1060
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "nästlade /* ... */-kommentarer"
+
+#: pgc.l:1153
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "saknar identifierare i EXEC SQL UNDEF-kommando"
+
+#: pgc.l:1199 pgc.l:1213
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "saknar matchande \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1202 pgc.l:1215 pgc.l:1393
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "saknar \"EXEC SQL ENDIF;\""
+
+#: pgc.l:1231 pgc.l:1250
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "mer än en EXEC SQL ELSE"
+
+#: pgc.l:1272 pgc.l:1286
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "ej matchad EXEC SQL ENDIF"
+
+#: pgc.l:1306
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "för många nästlade EXEC SQL IFDEF-villkor"
+
+#: pgc.l:1341
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "saknar identifierare i EXEC SQL IFDEF-kommando"
+
+#: pgc.l:1350
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "saknar identifierare i EXEC SQL DEFINE-kommando"
+
+#: pgc.l:1383
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "syntaxfel i EXEC SQL INCLUDE-kommando"
+
+#: pgc.l:1433
+#, 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:1583
+#, 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:1606
+#, 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:82
+#, c-format
+msgid "WARNING: "
+msgstr "VARNING: "
+
+#: preproc.y:85
+#, c-format
+msgid "ERROR: "
+msgstr "FEL: "
+
+#: preproc.y:509
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "markör \"%s\" existerar inte"
+
+#: preproc.y:538
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "initialiserare tillåts inte i typdefinition"
+
+#: preproc.y:540
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "typnamn \"string\" är reserverat i Informix-läge"
+
+#: preproc.y:547 preproc.y:15954
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "typen \"%s\" är redan definierad"
+
+#: preproc.y:572 preproc.y:16597 preproc.y:16922 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:1701
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "AT-flaggan tillåts inte i CLOSE DATABASE-sats"
+
+#: preproc.y:1949
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "AT-flaggan tillåts inte i CONNECT-sats"
+
+#: preproc.y:1983
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "AT-flaggan tillåts inte i DISCONNECT-sats"
+
+#: preproc.y:2038
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "AT-flaggan tillåts inte i SET CONNECTION-sats"
+
+#: preproc.y:2060
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "AT-flaggan tillåts inte i TYPE-sats"
+
+#: preproc.y:2069
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "AT-flaggan tillåts inte i VAR-sats"
+
+#: preproc.y:2076
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "AT-flaggan tillåts inte i WHENEVER-sats"
+
+#: preproc.y:2153 preproc.y:2325 preproc.y:2330 preproc.y:2453 preproc.y:4031
+#: preproc.y:4691 preproc.y:5633 preproc.y:5933 preproc.y:7551 preproc.y:9079
+#: preproc.y:9084 preproc.y:11915
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "ej stödd funktion skickass till servern"
+
+#: preproc.y:2711
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "SHOW ALL är inte implementerad"
+
+#: preproc.y:3379
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "COPY FROM STDIN är inte implementerad"
+
+#: preproc.y:10058 preproc.y:15539
+#, 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:10060 preproc.y:15541
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "markören \"%s\" är redan definierad"
+
+#: preproc.y:10500
+#, 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:10829 preproc.y:10836
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "subfråga i FROM måste ha ett alias"
+
+#: preproc.y:15262 preproc.y:15269
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "CREATE TABLE AS kan inte ange INTO"
+
+#: preproc.y:15305
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "förväntade \"@\", hittade \"%s\""
+
+#: preproc.y:15317
+#, 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:15320
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "förväntade \"://\", hittade \"%s\""
+
+#: preproc.y:15325
+#, 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:15351
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "förväntade \"postgresql\", hittade \"%s\""
+
+#: preproc.y:15354
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "ogiltig anslutningstyp: %s"
+
+#: preproc.y:15363
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "förväntade \"@\" eller \"://\", hittade \"%s\""
+
+#: preproc.y:15438 preproc.y:15456
+#, c-format
+msgid "invalid data type"
+msgstr "ogiltig datatyp"
+
+#: preproc.y:15467 preproc.y:15484
+#, c-format
+msgid "incomplete statement"
+msgstr "ofullständig sats"
+
+#: preproc.y:15470 preproc.y:15487
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "okänd symbol \"%s\""
+
+#: preproc.y:15757
+#, 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:15769
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "intervallspecifikation tillåts inte här"
+
+#: preproc.y:15929 preproc.y:15981
+#, 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:16104
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "pekare till varchar är inte implementerat"
+
+#: preproc.y:16291 preproc.y:16316
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "använder ej stödd DESCRIBE-sats"
+
+#: preproc.y:16563
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "initialiserare tillåts inte i EXEC SQL VAR-kommando"
+
+#: preproc.y:16880
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "array:er av indikatorer tillåts inte vid indata"
+
+#: preproc.y:17067
+#, 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:17108
+#, 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..3bff329
--- /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: 2019-06-13 17:15+0300\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..b93eec4
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/uk.po
@@ -0,0 +1,663 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-09-21 21:09+0000\n"
+"PO-Revision-Date: 2020-09-22 13:43\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: /DEV_13/ecpg.pot\n"
+"X-Crowdin-File-ID: 480\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 "nullable завжди 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 - це препроцесор SQL-вставок PostgreSQL для C програм.\n\n"
+
+#: ecpg.c:37
+#, c-format
+msgid "Usage:\n"
+" %s [OPTION]... FILE...\n\n"
+msgstr "Використання: \n"
+" %s [OPTION]... FILE...\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 автоматично генерувати C-код з вбудованого SQL-коду;\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 встановити режим сумісності; допустимий режим може бути одним з:\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 визначити СИМВОЛ\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 аналізувати системні файли include\n"
+
+#: ecpg.c:51
+#, c-format
+msgid " -I DIRECTORY search DIRECTORY for include files\n"
+msgstr " -I 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 визначити поведінку під час виконання; допустимий парамтер може бути:\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"
+"Якщо файл виводу не вказано, ім'я файла формується додаванням .c до введеного імені файла, після обрізання розширення .pgc, якщо присутнє.\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, версія %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 "незавершений шістнадцятковий рядок"
+
+#: 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 "пустий ідентифікатор із роздільниками"
+
+#: 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\" зарезервовано у режимі Informix"
+
+#: 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 "Параметр AT не дозволений в інструкції CLOSE DATABASE"
+
+#: preproc.y:1952
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "Параметр AT не дозволений в інструкції CONNECT"
+
+#: preproc.y:1986
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "Параметр AT не дозволений в інструкції DISCONNECT"
+
+#: preproc.y:2041
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "Параметр AT не дозволений в інструкції SET CONNECTION"
+
+#: preproc.y:2063
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "Параметр AT не дозволений в інструкції TYPE"
+
+#: preproc.y:2072
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "Параметр AT не дозволений в інструкції VAR"
+
+#: preproc.y:2079
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "Параметр AT не дозволений в інструкції WHENEVER"
+
+#: 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\" у різних інструкціях declare не підтримується"
+
+#: 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 повинен мати псевдонім"
+
+#: 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-сокети працюють лише з \"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 "точність/масштаб можна вказати лише для типів даних numeric і decimal"
+
+#: 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 "занадто багато рівнів у визначенні вкладеної структури/об'єднання"
+
+#: 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\" не є вказівником на структуру або об'єднання"
+
+#: 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..0af39c4
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/po/zh_CN.po
@@ -0,0 +1,674 @@
+# 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) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-05-22 17:56+0800\n"
+"PO-Revision-Date: 2019-05-23 18:42+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@cn.fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@cn.fujitsu.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: zh_CN\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: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 "可为空永远用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: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 <pgsql-bugs@lists.postgresql.org>.\n"
+msgstr ""
+"\n"
+"错误报告至 <pgsql-bugs@lists.postgresql.org>.\n"
+
+#: ecpg.c:182
+#, c-format
+msgid "%s: could not locate my own executable path\n"
+msgstr "%s: 找不到我的可执行文件路径\n"
+
+#: ecpg.c:217 ecpg.c:374 ecpg.c:385
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: 无法打开文件 \"%s\": %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 "请用 \"%s --help\" 获取更多的信息.\n"
+
+#: ecpg.c:284
+#, c-format
+msgid "%s: parser debug support (-d) not available\n"
+msgstr "%s: 解析器跟踪调试支持(-d)无效\n"
+
+#: ecpg.c:303
+#, c-format
+msgid "%s, the PostgreSQL embedded C preprocessor, version %s\n"
+msgstr "%s, PostgreSQL嵌入式C语言预处理器, 版本%s\n"
+
+#: ecpg.c:305
+#, c-format
+msgid "EXEC SQL INCLUDE ... search starts here:\n"
+msgstr "EXEC SQL INCLUDE ... 从这里开始搜索:\n"
+
+#: ecpg.c:308
+#, c-format
+msgid "end of search list\n"
+msgstr "搜索列表的结束部分\n"
+
+#: ecpg.c:314
+#, c-format
+msgid "%s: no input files specified\n"
+msgstr "%s: 没有指定输入文件\n"
+
+#: ecpg.c:497
+#, c-format
+msgid "cursor \"%s\" has been declared but not opened"
+msgstr "已经声明了游标\"%s\",但是没有打开"
+
+#: ecpg.c:510 preproc.y:129
+#, c-format
+msgid "could not remove output file \"%s\"\n"
+msgstr "无法删除输出文件 \"%s\"\n"
+
+#: pgc.l:472
+#, c-format
+msgid "unterminated /* comment"
+msgstr "/* 注释没有结束"
+
+#: pgc.l:490
+#, c-format
+msgid "invalid bit string literal"
+msgstr "无效的bit字符串常量"
+
+#: pgc.l:502
+#, c-format
+msgid "unterminated bit string literal"
+msgstr "未结束的bit字符串常量"
+
+#: pgc.l:518
+#, c-format
+msgid "unterminated hexadecimal string literal"
+msgstr "未结束的16进制字符串常量"
+
+#: pgc.l:614 pgc.l:718
+#, c-format
+msgid "unterminated quoted string"
+msgstr "未结束的引用字符串"
+
+#: pgc.l:665
+#, c-format
+msgid "unterminated dollar-quoted string"
+msgstr "未结束的用$符号引用的字符串"
+
+#: pgc.l:684 pgc.l:697
+#, c-format
+msgid "zero-length delimited identifier"
+msgstr "长度为0的分隔标识符"
+
+#: pgc.l:709
+#, c-format
+msgid "unterminated quoted identifier"
+msgstr "未结束的引用标识符"
+
+#: pgc.l:1040
+#, c-format
+msgid "nested /* ... */ comments"
+msgstr "有嵌套注释/*...*/"
+
+#: pgc.l:1133
+#, c-format
+msgid "missing identifier in EXEC SQL UNDEF command"
+msgstr "在EXEC SQL UNDEF命令中丢失标识符"
+
+#: pgc.l:1179 pgc.l:1193
+#, c-format
+msgid "missing matching \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+msgstr "丢失匹配 \"EXEC SQL IFDEF\" / \"EXEC SQL IFNDEF\""
+
+#: pgc.l:1182 pgc.l:1195 pgc.l:1371
+#, c-format
+msgid "missing \"EXEC SQL ENDIF;\""
+msgstr "\"EXEC SQL ENDIF;\"丢失"
+
+#: pgc.l:1211 pgc.l:1230
+#, c-format
+msgid "more than one EXEC SQL ELSE"
+msgstr "多个EXEC SQL ELSE"
+
+#: pgc.l:1252 pgc.l:1266
+#, c-format
+msgid "unmatched EXEC SQL ENDIF"
+msgstr "EXEC SQL ENDIF不匹配"
+
+#: pgc.l:1286
+#, c-format
+msgid "too many nested EXEC SQL IFDEF conditions"
+msgstr "嵌套EXEC SQL IFDEF条件太多"
+
+#: pgc.l:1319
+#, c-format
+msgid "missing identifier in EXEC SQL IFDEF command"
+msgstr "在EXEC SQL IFDEF命令中丢失标识符"
+
+#: pgc.l:1328
+#, c-format
+msgid "missing identifier in EXEC SQL DEFINE command"
+msgstr "在EXEC SQL DEFINE命令中丢失标识符"
+
+#: pgc.l:1361
+#, c-format
+msgid "syntax error in EXEC SQL INCLUDE command"
+msgstr "在EXEC SQL INCLUDE命令中出现语法错误"
+
+#: pgc.l:1411
+#, c-format
+msgid "internal error: unreachable state; please report this to <pgsql-bugs@lists.postgresql.org>"
+msgstr "内部错误:不可到达的状态;请向<pgsql-bugs@lists.postgresql.org>发送报告"
+
+#: pgc.l:1562
+#, 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:1585
+#, 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:83
+#, c-format
+msgid "WARNING: "
+msgstr "警告:"
+
+#: preproc.y:86
+#, c-format
+msgid "ERROR: "
+msgstr "错误:"
+
+#: preproc.y:510
+#, c-format
+msgid "cursor \"%s\" does not exist"
+msgstr "游标 \"%s\" 不存在"
+
+#: preproc.y:539
+#, c-format
+msgid "initializer not allowed in type definition"
+msgstr "在类型定义中不允许进行初始化"
+
+#: preproc.y:541
+#, c-format
+msgid "type name \"string\" is reserved in Informix mode"
+msgstr "在Informix模式中类型名称\"string\" 是被保留的"
+
+#: preproc.y:548 preproc.y:15877
+#, c-format
+msgid "type \"%s\" is already defined"
+msgstr "已定义类型\"%s\" "
+
+#: preproc.y:573 preproc.y:16548 preproc.y:16873 variable.c:621
+#, c-format
+msgid "multidimensional arrays for simple data types are not supported"
+msgstr "不支持针对简单数据类型的多维数组"
+
+#: preproc.y:1938
+#, c-format
+msgid "AT option not allowed in CONNECT statement"
+msgstr "在CONNECT语句中不允许使用AT选项"
+
+#: preproc.y:1976
+#, c-format
+msgid "AT option not allowed in DISCONNECT statement"
+msgstr "在DISCONNECT语句中不允许使用AT选项"
+
+#: preproc.y:2038
+#, c-format
+msgid "AT option not allowed in SET CONNECTION statement"
+msgstr "在SET CONNECTION语句中不允许使用AT选项"
+
+#: preproc.y:2060
+#, c-format
+msgid "AT option not allowed in TYPE statement"
+msgstr "在TYPE语句中不允许使用AT选项"
+
+#: preproc.y:2069
+#, c-format
+msgid "AT option not allowed in VAR statement"
+msgstr "在VAR语句中不允许使用AT选项"
+
+#: preproc.y:2076
+#, c-format
+msgid "AT option not allowed in WHENEVER statement"
+msgstr "在WHENEVER语句中不允许使用AT选项"
+
+#: preproc.y:2153 preproc.y:2325 preproc.y:2330 preproc.y:2453 preproc.y:4046
+#: preproc.y:5635 preproc.y:5935 preproc.y:7563 preproc.y:9075 preproc.y:9080
+#: preproc.y:11880
+#, c-format
+msgid "unsupported feature will be passed to server"
+msgstr "不支持的功能特性将会传递给服务器"
+
+#: preproc.y:2711
+#, c-format
+msgid "SHOW ALL is not implemented"
+msgstr "没有使用SHOW ALL"
+
+#: preproc.y:3369
+#, c-format
+msgid "AT option not allowed in CLOSE DATABASE statement"
+msgstr "在CLOSE DATABASE语句中不允许使用AT选项"
+
+#: preproc.y:3394
+#, c-format
+msgid "COPY FROM STDIN is not implemented"
+msgstr "不能进行COPY FROM STDIN的操作"
+
+#: preproc.y:10026 preproc.y:15460
+#, c-format
+msgid "using variable \"%s\" in different declare statements is not supported"
+msgstr "不支持在不同的声明语句中使用变量\"%s\""
+
+#: preproc.y:10028 preproc.y:15462
+#, c-format
+msgid "cursor \"%s\" is already defined"
+msgstr "已经定义了游标\"%s\""
+
+#: preproc.y:10469
+#, c-format
+msgid "no longer supported LIMIT #,# syntax passed to server"
+msgstr "不再支持将LIMIT #,#语法传递给服务器"
+
+#: preproc.y:10794 preproc.y:10801
+#, c-format
+msgid "subquery in FROM must have an alias"
+msgstr "FROM 中的子查询必须有一个别名"
+
+#: preproc.y:15151 preproc.y:15158
+#, c-format
+msgid "CREATE TABLE AS cannot specify INTO"
+msgstr "在CREATE TABLE AS语句中不能指定INTO子句"
+
+#: preproc.y:15194
+#, c-format
+msgid "expected \"@\", found \"%s\""
+msgstr "期望 \"@\", 但是找到了\"%s\""
+
+#: preproc.y:15206
+#, c-format
+msgid "only protocols \"tcp\" and \"unix\" and database type \"postgresql\" are supported"
+msgstr "只支持协议\"tcp\"和 \"unix\"以及数据库类型 \"postgresql\""
+
+#: preproc.y:15209
+#, c-format
+msgid "expected \"://\", found \"%s\""
+msgstr "期望得到 \"://\",但是找到了\"%s\""
+
+#: preproc.y:15214
+#, c-format
+msgid "Unix-domain sockets only work on \"localhost\" but not on \"%s\""
+msgstr "Unix-域的sockets只能在\"localhost\"上运行,而不能在\"%s\"上运行"
+
+#: preproc.y:15240
+#, c-format
+msgid "expected \"postgresql\", found \"%s\""
+msgstr "期望\"postgresql\", 但是只找到了\"%s\""
+
+#: preproc.y:15243
+#, c-format
+msgid "invalid connection type: %s"
+msgstr "无效的连接类型: %s"
+
+#: preproc.y:15252
+#, c-format
+msgid "expected \"@\" or \"://\", found \"%s\""
+msgstr "期望\"@\"或\"://\",但是只找到了\"%s\""
+
+#: preproc.y:15327 preproc.y:15345
+#, c-format
+msgid "invalid data type"
+msgstr "无效数据类型"
+
+#: preproc.y:15356 preproc.y:15373
+#, c-format
+msgid "incomplete statement"
+msgstr "未结束的语句"
+
+#: preproc.y:15359 preproc.y:15376
+#, c-format
+msgid "unrecognized token \"%s\""
+msgstr "无法识别的符号\"%s\""
+
+#: preproc.y:15422
+#, c-format
+msgid "declared name %s is already defined"
+msgstr "已定义声明的名称%s"
+
+#: preproc.y:15680
+#, c-format
+msgid "only data types numeric and decimal have precision/scale argument"
+msgstr "只有数据类型numeric和decimal有精度/范围参数"
+
+#: preproc.y:15692
+#, c-format
+msgid "interval specification not allowed here"
+msgstr "在这里不允许使用间隔定义"
+
+#: preproc.y:15852 preproc.y:15904
+#, c-format
+msgid "too many levels in nested structure/union definition"
+msgstr "在嵌套结构/联合定义中存在太多的层次"
+
+#: preproc.y:16055
+#, c-format
+msgid "pointers to varchar are not implemented"
+msgstr "没有实现指向varchar类型值的指针"
+
+#: preproc.y:16242 preproc.y:16267
+#, c-format
+msgid "using unsupported DESCRIBE statement"
+msgstr "使用不支持的DESCRIBE语句"
+
+#: preproc.y:16514
+#, c-format
+msgid "initializer not allowed in EXEC SQL VAR command"
+msgstr "在EXEC SQL VAR命令中不允许初始化"
+
+#: preproc.y:16831
+#, c-format
+msgid "arrays of indicators are not allowed on input"
+msgstr "在输入上不允许使用标识数组"
+
+#: preproc.y:17052
+#, c-format
+msgid "operator not allowed in variable definition"
+msgstr "操作符不允许出现在变量定义当中"
+
+#. translator: %s is typically the translation of "syntax error"
+#: preproc.y:17093
+#, 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..64c1dd1
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc.c
@@ -0,0 +1,60436 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison implementation for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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. */
+
+/* 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. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "3.3.2"
+
+/* 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" /* yacc.c:337 */
+
+#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);
+
+/*
+ * 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;
+ }
+}
+
+#line 656 "preproc.c" /* yacc.c:337 */
+# 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
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* In a future release of Bison, this section will be replaced
+ by #include "preproc.h". */
+#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 type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ SQL_ALLOCATE = 258,
+ SQL_AUTOCOMMIT = 259,
+ SQL_BOOL = 260,
+ SQL_BREAK = 261,
+ SQL_CARDINALITY = 262,
+ SQL_CONNECT = 263,
+ SQL_COUNT = 264,
+ SQL_DATETIME_INTERVAL_CODE = 265,
+ SQL_DATETIME_INTERVAL_PRECISION = 266,
+ SQL_DESCRIBE = 267,
+ SQL_DESCRIPTOR = 268,
+ SQL_DISCONNECT = 269,
+ SQL_FOUND = 270,
+ SQL_FREE = 271,
+ SQL_GET = 272,
+ SQL_GO = 273,
+ SQL_GOTO = 274,
+ SQL_IDENTIFIED = 275,
+ SQL_INDICATOR = 276,
+ SQL_KEY_MEMBER = 277,
+ SQL_LENGTH = 278,
+ SQL_LONG = 279,
+ SQL_NULLABLE = 280,
+ SQL_OCTET_LENGTH = 281,
+ SQL_OPEN = 282,
+ SQL_OUTPUT = 283,
+ SQL_REFERENCE = 284,
+ SQL_RETURNED_LENGTH = 285,
+ SQL_RETURNED_OCTET_LENGTH = 286,
+ SQL_SCALE = 287,
+ SQL_SECTION = 288,
+ SQL_SHORT = 289,
+ SQL_SIGNED = 290,
+ SQL_SQLERROR = 291,
+ SQL_SQLPRINT = 292,
+ SQL_SQLWARNING = 293,
+ SQL_START = 294,
+ SQL_STOP = 295,
+ SQL_STRUCT = 296,
+ SQL_UNSIGNED = 297,
+ SQL_VAR = 298,
+ SQL_WHENEVER = 299,
+ S_ADD = 300,
+ S_AND = 301,
+ S_ANYTHING = 302,
+ S_AUTO = 303,
+ S_CONST = 304,
+ S_DEC = 305,
+ S_DIV = 306,
+ S_DOTPOINT = 307,
+ S_EQUAL = 308,
+ S_EXTERN = 309,
+ S_INC = 310,
+ S_LSHIFT = 311,
+ S_MEMPOINT = 312,
+ S_MEMBER = 313,
+ S_MOD = 314,
+ S_MUL = 315,
+ S_NEQUAL = 316,
+ S_OR = 317,
+ S_REGISTER = 318,
+ S_RSHIFT = 319,
+ S_STATIC = 320,
+ S_SUB = 321,
+ S_VOLATILE = 322,
+ S_TYPEDEF = 323,
+ CSTRING = 324,
+ CVARIABLE = 325,
+ CPP_LINE = 326,
+ IP = 327,
+ IDENT = 328,
+ UIDENT = 329,
+ FCONST = 330,
+ SCONST = 331,
+ USCONST = 332,
+ BCONST = 333,
+ XCONST = 334,
+ Op = 335,
+ ICONST = 336,
+ PARAM = 337,
+ TYPECAST = 338,
+ DOT_DOT = 339,
+ COLON_EQUALS = 340,
+ EQUALS_GREATER = 341,
+ LESS_EQUALS = 342,
+ GREATER_EQUALS = 343,
+ NOT_EQUALS = 344,
+ ABORT_P = 345,
+ ABSOLUTE_P = 346,
+ ACCESS = 347,
+ ACTION = 348,
+ ADD_P = 349,
+ ADMIN = 350,
+ AFTER = 351,
+ AGGREGATE = 352,
+ ALL = 353,
+ ALSO = 354,
+ ALTER = 355,
+ ALWAYS = 356,
+ ANALYSE = 357,
+ ANALYZE = 358,
+ AND = 359,
+ ANY = 360,
+ ARRAY = 361,
+ AS = 362,
+ ASC = 363,
+ ASSERTION = 364,
+ ASSIGNMENT = 365,
+ ASYMMETRIC = 366,
+ AT = 367,
+ ATTACH = 368,
+ ATTRIBUTE = 369,
+ AUTHORIZATION = 370,
+ BACKWARD = 371,
+ BEFORE = 372,
+ BEGIN_P = 373,
+ BETWEEN = 374,
+ BIGINT = 375,
+ BINARY = 376,
+ BIT = 377,
+ BOOLEAN_P = 378,
+ BOTH = 379,
+ BY = 380,
+ CACHE = 381,
+ CALL = 382,
+ CALLED = 383,
+ CASCADE = 384,
+ CASCADED = 385,
+ CASE = 386,
+ CAST = 387,
+ CATALOG_P = 388,
+ CHAIN = 389,
+ CHAR_P = 390,
+ CHARACTER = 391,
+ CHARACTERISTICS = 392,
+ CHECK = 393,
+ CHECKPOINT = 394,
+ CLASS = 395,
+ CLOSE = 396,
+ CLUSTER = 397,
+ COALESCE = 398,
+ COLLATE = 399,
+ COLLATION = 400,
+ COLUMN = 401,
+ COLUMNS = 402,
+ COMMENT = 403,
+ COMMENTS = 404,
+ COMMIT = 405,
+ COMMITTED = 406,
+ CONCURRENTLY = 407,
+ CONFIGURATION = 408,
+ CONFLICT = 409,
+ CONNECTION = 410,
+ CONSTRAINT = 411,
+ CONSTRAINTS = 412,
+ CONTENT_P = 413,
+ CONTINUE_P = 414,
+ CONVERSION_P = 415,
+ COPY = 416,
+ COST = 417,
+ CREATE = 418,
+ CROSS = 419,
+ CSV = 420,
+ CUBE = 421,
+ CURRENT_P = 422,
+ CURRENT_CATALOG = 423,
+ CURRENT_DATE = 424,
+ CURRENT_ROLE = 425,
+ CURRENT_SCHEMA = 426,
+ CURRENT_TIME = 427,
+ CURRENT_TIMESTAMP = 428,
+ CURRENT_USER = 429,
+ CURSOR = 430,
+ CYCLE = 431,
+ DATA_P = 432,
+ DATABASE = 433,
+ DAY_P = 434,
+ DEALLOCATE = 435,
+ DEC = 436,
+ DECIMAL_P = 437,
+ DECLARE = 438,
+ DEFAULT = 439,
+ DEFAULTS = 440,
+ DEFERRABLE = 441,
+ DEFERRED = 442,
+ DEFINER = 443,
+ DELETE_P = 444,
+ DELIMITER = 445,
+ DELIMITERS = 446,
+ DEPENDS = 447,
+ DESC = 448,
+ DETACH = 449,
+ DICTIONARY = 450,
+ DISABLE_P = 451,
+ DISCARD = 452,
+ DISTINCT = 453,
+ DO = 454,
+ DOCUMENT_P = 455,
+ DOMAIN_P = 456,
+ DOUBLE_P = 457,
+ DROP = 458,
+ EACH = 459,
+ ELSE = 460,
+ ENABLE_P = 461,
+ ENCODING = 462,
+ ENCRYPTED = 463,
+ END_P = 464,
+ ENUM_P = 465,
+ ESCAPE = 466,
+ EVENT = 467,
+ EXCEPT = 468,
+ EXCLUDE = 469,
+ EXCLUDING = 470,
+ EXCLUSIVE = 471,
+ EXECUTE = 472,
+ EXISTS = 473,
+ EXPLAIN = 474,
+ EXPRESSION = 475,
+ EXTENSION = 476,
+ EXTERNAL = 477,
+ EXTRACT = 478,
+ FALSE_P = 479,
+ FAMILY = 480,
+ FETCH = 481,
+ FILTER = 482,
+ FIRST_P = 483,
+ FLOAT_P = 484,
+ FOLLOWING = 485,
+ FOR = 486,
+ FORCE = 487,
+ FOREIGN = 488,
+ FORWARD = 489,
+ FREEZE = 490,
+ FROM = 491,
+ FULL = 492,
+ FUNCTION = 493,
+ FUNCTIONS = 494,
+ GENERATED = 495,
+ GLOBAL = 496,
+ GRANT = 497,
+ GRANTED = 498,
+ GREATEST = 499,
+ GROUP_P = 500,
+ GROUPING = 501,
+ GROUPS = 502,
+ HANDLER = 503,
+ HAVING = 504,
+ HEADER_P = 505,
+ HOLD = 506,
+ HOUR_P = 507,
+ IDENTITY_P = 508,
+ IF_P = 509,
+ ILIKE = 510,
+ IMMEDIATE = 511,
+ IMMUTABLE = 512,
+ IMPLICIT_P = 513,
+ IMPORT_P = 514,
+ IN_P = 515,
+ INCLUDE = 516,
+ INCLUDING = 517,
+ INCREMENT = 518,
+ INDEX = 519,
+ INDEXES = 520,
+ INHERIT = 521,
+ INHERITS = 522,
+ INITIALLY = 523,
+ INLINE_P = 524,
+ INNER_P = 525,
+ INOUT = 526,
+ INPUT_P = 527,
+ INSENSITIVE = 528,
+ INSERT = 529,
+ INSTEAD = 530,
+ INT_P = 531,
+ INTEGER = 532,
+ INTERSECT = 533,
+ INTERVAL = 534,
+ INTO = 535,
+ INVOKER = 536,
+ IS = 537,
+ ISNULL = 538,
+ ISOLATION = 539,
+ JOIN = 540,
+ KEY = 541,
+ LABEL = 542,
+ LANGUAGE = 543,
+ LARGE_P = 544,
+ LAST_P = 545,
+ LATERAL_P = 546,
+ LEADING = 547,
+ LEAKPROOF = 548,
+ LEAST = 549,
+ LEFT = 550,
+ LEVEL = 551,
+ LIKE = 552,
+ LIMIT = 553,
+ LISTEN = 554,
+ LOAD = 555,
+ LOCAL = 556,
+ LOCALTIME = 557,
+ LOCALTIMESTAMP = 558,
+ LOCATION = 559,
+ LOCK_P = 560,
+ LOCKED = 561,
+ LOGGED = 562,
+ MAPPING = 563,
+ MATCH = 564,
+ MATERIALIZED = 565,
+ MAXVALUE = 566,
+ METHOD = 567,
+ MINUTE_P = 568,
+ MINVALUE = 569,
+ MODE = 570,
+ MONTH_P = 571,
+ MOVE = 572,
+ NAME_P = 573,
+ NAMES = 574,
+ NATIONAL = 575,
+ NATURAL = 576,
+ NCHAR = 577,
+ NEW = 578,
+ NEXT = 579,
+ NFC = 580,
+ NFD = 581,
+ NFKC = 582,
+ NFKD = 583,
+ NO = 584,
+ NONE = 585,
+ NORMALIZE = 586,
+ NORMALIZED = 587,
+ NOT = 588,
+ NOTHING = 589,
+ NOTIFY = 590,
+ NOTNULL = 591,
+ NOWAIT = 592,
+ NULL_P = 593,
+ NULLIF = 594,
+ NULLS_P = 595,
+ NUMERIC = 596,
+ OBJECT_P = 597,
+ OF = 598,
+ OFF = 599,
+ OFFSET = 600,
+ OIDS = 601,
+ OLD = 602,
+ ON = 603,
+ ONLY = 604,
+ OPERATOR = 605,
+ OPTION = 606,
+ OPTIONS = 607,
+ OR = 608,
+ ORDER = 609,
+ ORDINALITY = 610,
+ OTHERS = 611,
+ OUT_P = 612,
+ OUTER_P = 613,
+ OVER = 614,
+ OVERLAPS = 615,
+ OVERLAY = 616,
+ OVERRIDING = 617,
+ OWNED = 618,
+ OWNER = 619,
+ PARALLEL = 620,
+ PARSER = 621,
+ PARTIAL = 622,
+ PARTITION = 623,
+ PASSING = 624,
+ PASSWORD = 625,
+ PLACING = 626,
+ PLANS = 627,
+ POLICY = 628,
+ POSITION = 629,
+ PRECEDING = 630,
+ PRECISION = 631,
+ PRESERVE = 632,
+ PREPARE = 633,
+ PREPARED = 634,
+ PRIMARY = 635,
+ PRIOR = 636,
+ PRIVILEGES = 637,
+ PROCEDURAL = 638,
+ PROCEDURE = 639,
+ PROCEDURES = 640,
+ PROGRAM = 641,
+ PUBLICATION = 642,
+ QUOTE = 643,
+ RANGE = 644,
+ READ = 645,
+ REAL = 646,
+ REASSIGN = 647,
+ RECHECK = 648,
+ RECURSIVE = 649,
+ REF = 650,
+ REFERENCES = 651,
+ REFERENCING = 652,
+ REFRESH = 653,
+ REINDEX = 654,
+ RELATIVE_P = 655,
+ RELEASE = 656,
+ RENAME = 657,
+ REPEATABLE = 658,
+ REPLACE = 659,
+ REPLICA = 660,
+ RESET = 661,
+ RESTART = 662,
+ RESTRICT = 663,
+ RETURNING = 664,
+ RETURNS = 665,
+ REVOKE = 666,
+ RIGHT = 667,
+ ROLE = 668,
+ ROLLBACK = 669,
+ ROLLUP = 670,
+ ROUTINE = 671,
+ ROUTINES = 672,
+ ROW = 673,
+ ROWS = 674,
+ RULE = 675,
+ SAVEPOINT = 676,
+ SCHEMA = 677,
+ SCHEMAS = 678,
+ SCROLL = 679,
+ SEARCH = 680,
+ SECOND_P = 681,
+ SECURITY = 682,
+ SELECT = 683,
+ SEQUENCE = 684,
+ SEQUENCES = 685,
+ SERIALIZABLE = 686,
+ SERVER = 687,
+ SESSION = 688,
+ SESSION_USER = 689,
+ SET = 690,
+ SETS = 691,
+ SETOF = 692,
+ SHARE = 693,
+ SHOW = 694,
+ SIMILAR = 695,
+ SIMPLE = 696,
+ SKIP = 697,
+ SMALLINT = 698,
+ SNAPSHOT = 699,
+ SOME = 700,
+ SQL_P = 701,
+ STABLE = 702,
+ STANDALONE_P = 703,
+ START = 704,
+ STATEMENT = 705,
+ STATISTICS = 706,
+ STDIN = 707,
+ STDOUT = 708,
+ STORAGE = 709,
+ STORED = 710,
+ STRICT_P = 711,
+ STRIP_P = 712,
+ SUBSCRIPTION = 713,
+ SUBSTRING = 714,
+ SUPPORT = 715,
+ SYMMETRIC = 716,
+ SYSID = 717,
+ SYSTEM_P = 718,
+ TABLE = 719,
+ TABLES = 720,
+ TABLESAMPLE = 721,
+ TABLESPACE = 722,
+ TEMP = 723,
+ TEMPLATE = 724,
+ TEMPORARY = 725,
+ TEXT_P = 726,
+ THEN = 727,
+ TIES = 728,
+ TIME = 729,
+ TIMESTAMP = 730,
+ TO = 731,
+ TRAILING = 732,
+ TRANSACTION = 733,
+ TRANSFORM = 734,
+ TREAT = 735,
+ TRIGGER = 736,
+ TRIM = 737,
+ TRUE_P = 738,
+ TRUNCATE = 739,
+ TRUSTED = 740,
+ TYPE_P = 741,
+ TYPES_P = 742,
+ UESCAPE = 743,
+ UNBOUNDED = 744,
+ UNCOMMITTED = 745,
+ UNENCRYPTED = 746,
+ UNION = 747,
+ UNIQUE = 748,
+ UNKNOWN = 749,
+ UNLISTEN = 750,
+ UNLOGGED = 751,
+ UNTIL = 752,
+ UPDATE = 753,
+ USER = 754,
+ USING = 755,
+ VACUUM = 756,
+ VALID = 757,
+ VALIDATE = 758,
+ VALIDATOR = 759,
+ VALUE_P = 760,
+ VALUES = 761,
+ VARCHAR = 762,
+ VARIADIC = 763,
+ VARYING = 764,
+ VERBOSE = 765,
+ VERSION_P = 766,
+ VIEW = 767,
+ VIEWS = 768,
+ VOLATILE = 769,
+ WHEN = 770,
+ WHERE = 771,
+ WHITESPACE_P = 772,
+ WINDOW = 773,
+ WITH = 774,
+ WITHIN = 775,
+ WITHOUT = 776,
+ WORK = 777,
+ WRAPPER = 778,
+ WRITE = 779,
+ XML_P = 780,
+ XMLATTRIBUTES = 781,
+ XMLCONCAT = 782,
+ XMLELEMENT = 783,
+ XMLEXISTS = 784,
+ XMLFOREST = 785,
+ XMLNAMESPACES = 786,
+ XMLPARSE = 787,
+ XMLPI = 788,
+ XMLROOT = 789,
+ XMLSERIALIZE = 790,
+ XMLTABLE = 791,
+ YEAR_P = 792,
+ YES_P = 793,
+ ZONE = 794,
+ NOT_LA = 795,
+ NULLS_LA = 796,
+ WITH_LA = 797,
+ POSTFIXOP = 798,
+ UMINUS = 799
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 586 "preproc.y" /* yacc.c:352 */
+
+ 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;
+
+#line 1260 "preproc.c" /* yacc.c:352 */
+};
+
+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 */
+
+
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#else
+typedef signed char yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#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
+# if (defined __GNUC__ \
+ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
+ || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
+# else
+# define YY_ATTRIBUTE(Spec) /* empty */
+# endif
+#endif
+
+#ifndef YY_ATTRIBUTE_PURE
+# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
+#endif
+
+#ifndef YY_ATTRIBUTE_UNUSED
+# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(E) ((void) (E))
+#else
+# define YYUSE(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 yyoverflow || YYERROR_VERBOSE
+
+/* 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 || YYERROR_VERBOSE */
+
+
+#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
+{
+ yytype_int16 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 (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (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 \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*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, (Count) * sizeof (*(Src)))
+# else
+# define YYCOPY(Dst, Src, Count) \
+ do \
+ { \
+ YYSIZE_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 143521
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 564
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 817
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 3232
+/* YYNSTATES -- Number of states. */
+#define YYNSTATES 6212
+
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 799
+
+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex, with out-of-bounds checking. */
+#define YYTRANSLATE(YYX) \
+ ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
+ as returned by yylex. */
+static const yytype_uint16 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, 551, 2, 2,
+ 556, 557, 549, 547, 559, 548, 558, 550, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 561, 560,
+ 543, 545, 544, 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, 554, 2, 555, 552, 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, 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, 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, 546, 553
+};
+
+#if YYDEBUG
+ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 1624, 1624, 1627, 1629, 1631, 1633, 1635, 1637, 1639,
+ 1641, 1643, 1645, 1647, 1649, 1651, 1653, 1655, 1657, 1659,
+ 1661, 1663, 1665, 1667, 1669, 1671, 1673, 1675, 1677, 1679,
+ 1681, 1683, 1685, 1687, 1689, 1691, 1693, 1695, 1697, 1699,
+ 1717, 1719, 1721, 1723, 1725, 1727, 1729, 1731, 1733, 1735,
+ 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753, 1755,
+ 1757, 1759, 1761, 1763, 1765, 1767, 1769, 1771, 1773, 1775,
+ 1777, 1779, 1781, 1783, 1785, 1787, 1789, 1793, 1795, 1797,
+ 1799, 1801, 1803, 1805, 1807, 1809, 1811, 1813, 1815, 1817,
+ 1819, 1821, 1823, 1825, 1827, 1850, 1852, 1854, 1856, 1858,
+ 1860, 1862, 1864, 1866, 1868, 1870, 1872, 1874, 1901, 1903,
+ 1905, 1907, 1909, 1911, 1913, 1915, 1917, 1919, 1921, 1923,
+ 1929, 1931, 1933, 1935, 1937, 1939, 1941, 1943, 1945, 1951,
+ 1961, 1965, 1971, 1975, 1985, 1995, 1996, 2010, 2017, 2023,
+ 2034, 2040, 2049, 2056, 2062, 2071, 2078, 2086, 2091, 2099,
+ 2107, 2111, 2116, 2122, 2127, 2133, 2138, 2144, 2148, 2152,
+ 2156, 2161, 2165, 2169, 2173, 2177, 2185, 2189, 2193, 2197,
+ 2201, 2205, 2213, 2221, 2225, 2234, 2236, 2244, 2248, 2252,
+ 2256, 2264, 2268, 2272, 2276, 2280, 2284, 2292, 2300, 2308,
+ 2312, 2320, 2324, 2328, 2333, 2342, 2347, 2353, 2358, 2364,
+ 2368, 2372, 2376, 2380, 2384, 2392, 2396, 2400, 2408, 2412,
+ 2416, 2424, 2428, 2432, 2436, 2444, 2448, 2452, 2456, 2461,
+ 2465, 2469, 2473, 2477, 2481, 2485, 2493, 2497, 2505, 2509,
+ 2517, 2521, 2535, 2539, 2543, 2547, 2555, 2559, 2563, 2567,
+ 2575, 2579, 2583, 2587, 2591, 2595, 2599, 2607, 2611, 2616,
+ 2622, 2626, 2634, 2642, 2646, 2650, 2654, 2662, 2666, 2674,
+ 2678, 2686, 2690, 2698, 2702, 2706, 2710, 2714, 2723, 2731,
+ 2735, 2743, 2747, 2755, 2763, 2767, 2771, 2775, 2779, 2787,
+ 2791, 2795, 2799, 2803, 2807, 2811, 2815, 2819, 2823, 2827,
+ 2831, 2835, 2839, 2843, 2847, 2851, 2855, 2859, 2867, 2871,
+ 2879, 2883, 2891, 2899, 2903, 2907, 2911, 2915, 2919, 2923,
+ 2927, 2931, 2935, 2939, 2943, 2947, 2951, 2955, 2959, 2963,
+ 2967, 2971, 2975, 2979, 2983, 2987, 2991, 2995, 2999, 3003,
+ 3007, 3011, 3015, 3019, 3023, 3027, 3031, 3035, 3039, 3043,
+ 3047, 3051, 3055, 3059, 3063, 3067, 3071, 3075, 3079, 3083,
+ 3087, 3091, 3095, 3099, 3103, 3107, 3111, 3115, 3119, 3123,
+ 3127, 3135, 3139, 3147, 3151, 3156, 3162, 3167, 3173, 3178,
+ 3184, 3188, 3192, 3196, 3204, 3212, 3217, 3223, 3227, 3235,
+ 3239, 3243, 3247, 3255, 3259, 3267, 3271, 3275, 3279, 3287,
+ 3291, 3295, 3299, 3307, 3315, 3319, 3327, 3335, 3339, 3347,
+ 3351, 3355, 3359, 3367, 3372, 3380, 3388, 3396, 3400, 3408,
+ 3413, 3419, 3423, 3427, 3435, 3439, 3447, 3452, 3458, 3462,
+ 3466, 3470, 3474, 3478, 3482, 3486, 3490, 3494, 3498, 3502,
+ 3506, 3514, 3519, 3525, 3530, 3536, 3541, 3547, 3551, 3559,
+ 3567, 3571, 3575, 3579, 3584, 3590, 3594, 3602, 3610, 3614,
+ 3618, 3622, 3626, 3630, 3638, 3642, 3646, 3650, 3654, 3658,
+ 3662, 3667, 3673, 3678, 3684, 3689, 3695, 3699, 3707, 3711,
+ 3719, 3723, 3727, 3735, 3739, 3747, 3755, 3759, 3767, 3772,
+ 3778, 3782, 3786, 3790, 3798, 3802, 3806, 3810, 3814, 3818,
+ 3822, 3826, 3830, 3838, 3842, 3850, 3854, 3858, 3862, 3870,
+ 3878, 3882, 3887, 3893, 3897, 3901, 3905, 3909, 3913, 3917,
+ 3921, 3925, 3933, 3937, 3945, 3949, 3953, 3957, 3961, 3965,
+ 3969, 3977, 3982, 3988, 3993, 3999, 4003, 4011, 4019, 4024,
+ 4030, 4034, 4039, 4044, 4050, 4054, 4062, 4066, 4074, 4079,
+ 4085, 4089, 4093, 4097, 4102, 4108, 4116, 4124, 4128, 4132,
+ 4136, 4140, 4148, 4153, 4159, 4164, 4170, 4178, 4182, 4190,
+ 4194, 4198, 4206, 4211, 4217, 4221, 4226, 4232, 4236, 4240,
+ 4245, 4251, 4256, 4262, 4267, 4273, 4281, 4285, 4293, 4297,
+ 4305, 4313, 4317, 4322, 4328, 4332, 4340, 4348, 4353, 4359,
+ 4367, 4371, 4379, 4383, 4391, 4396, 4402, 4407, 4413, 4417,
+ 4425, 4429, 4433, 4437, 4441, 4445, 4449, 4453, 4457, 4461,
+ 4465, 4469, 4473, 4477, 4485, 4490, 4496, 4500, 4504, 4508,
+ 4516, 4520, 4528, 4532, 4540, 4545, 4551, 4555, 4563, 4568,
+ 4574, 4578, 4586, 4591, 4597, 4601, 4609, 4614, 4620, 4628,
+ 4633, 4639, 4643, 4651, 4655, 4663, 4668, 4674, 4678, 4682,
+ 4687, 4695, 4703, 4708, 4714, 4722, 4726, 4730, 4734, 4738,
+ 4742, 4746, 4750, 4754, 4758, 4762, 4766, 4770, 4774, 4778,
+ 4782, 4786, 4790, 4794, 4798, 4802, 4806, 4810, 4814, 4818,
+ 4822, 4826, 4830, 4838, 4846, 4850, 4854, 4858, 4866, 4870,
+ 4878, 4883, 4889, 4893, 4901, 4906, 4912, 4916, 4924, 4932,
+ 4936, 4944, 4948, 4952, 4956, 4964, 4972, 4980, 4988, 4992,
+ 5000, 5005, 5011, 5015, 5023, 5028, 5034, 5038, 5042, 5050,
+ 5054, 5058, 5062, 5070, 5074, 5082, 5090, 5094, 5102, 5107,
+ 5113, 5117, 5125, 5129, 5137, 5141, 5149, 5157, 5165, 5173,
+ 5178, 5184, 5189, 5195, 5200, 5206, 5211, 5217, 5222, 5228,
+ 5233, 5239, 5243, 5247, 5251, 5255, 5263, 5271, 5275, 5283,
+ 5287, 5295, 5299, 5303, 5311, 5315, 5323, 5327, 5331, 5335,
+ 5339, 5347, 5352, 5358, 5362, 5370, 5378, 5382, 5390, 5394,
+ 5402, 5410, 5415, 5421, 5426, 5432, 5436, 5444, 5449, 5455,
+ 5459, 5467, 5471, 5476, 5482, 5486, 5490, 5494, 5502, 5507,
+ 5514, 5516, 5524, 5528, 5532, 5536, 5540, 5544, 5552, 5556,
+ 5564, 5568, 5576, 5584, 5588, 5596, 5604, 5608, 5612, 5616,
+ 5624, 5633, 5637, 5641, 5645, 5649, 5653, 5657, 5661, 5665,
+ 5669, 5673, 5677, 5681, 5685, 5689, 5693, 5701, 5709, 5713,
+ 5721, 5725, 5733, 5737, 5741, 5745, 5749, 5753, 5761, 5769,
+ 5773, 5781, 5789, 5794, 5800, 5804, 5812, 5816, 5820, 5824,
+ 5832, 5837, 5843, 5851, 5855, 5863, 5867, 5871, 5875, 5879,
+ 5887, 5892, 5898, 5903, 5909, 5913, 5918, 5924, 5930, 5936,
+ 5944, 5948, 5956, 5960, 5968, 5972, 5980, 5984, 5992, 5996,
+ 6004, 6012, 6020, 6024, 6028, 6032, 6036, 6040, 6044, 6048,
+ 6052, 6056, 6060, 6064, 6072, 6076, 6080, 6084, 6088, 6092,
+ 6096, 6100, 6104, 6108, 6112, 6116, 6120, 6128, 6132, 6136,
+ 6140, 6144, 6148, 6152, 6160, 6164, 6168, 6176, 6180, 6188,
+ 6192, 6200, 6204, 6212, 6216, 6224, 6232, 6236, 6241, 6247,
+ 6251, 6255, 6259, 6263, 6267, 6271, 6275, 6279, 6283, 6287,
+ 6291, 6295, 6299, 6303, 6307, 6311, 6315, 6319, 6327, 6331,
+ 6335, 6339, 6343, 6347, 6351, 6355, 6359, 6363, 6367, 6371,
+ 6375, 6379, 6387, 6391, 6395, 6399, 6403, 6407, 6411, 6415,
+ 6419, 6423, 6427, 6431, 6439, 6443, 6451, 6455, 6459, 6463,
+ 6467, 6471, 6475, 6479, 6483, 6491, 6496, 6502, 6506, 6510,
+ 6514, 6518, 6522, 6530, 6534, 6538, 6542, 6546, 6550, 6554,
+ 6558, 6566, 6570, 6578, 6582, 6586, 6590, 6596, 6602, 6608,
+ 6614, 6620, 6626, 6632, 6642, 6653, 6664, 6675, 6686, 6697,
+ 6708, 6724, 6740, 6756, 6767, 6783, 6794, 6810, 6825, 6829,
+ 6837, 6842, 6848, 6856, 6860, 6868, 6872, 6876, 6880, 6884,
+ 6892, 6896, 6904, 6908, 6912, 6916, 6924, 6928, 6932, 6936,
+ 6940, 6944, 6948, 6952, 6956, 6960, 6964, 6968, 6972, 6976,
+ 6980, 6984, 6988, 6992, 6996, 7000, 7008, 7012, 7020, 7024,
+ 7032, 7037, 7043, 7051, 7055, 7063, 7068, 7074, 7079, 7085,
+ 7093, 7098, 7104, 7108, 7112, 7120, 7124, 7128, 7136, 7140,
+ 7144, 7148, 7152, 7156, 7164, 7168, 7176, 7181, 7187, 7192,
+ 7198, 7203, 7209, 7214, 7220, 7224, 7232, 7236, 7244, 7248,
+ 7252, 7260, 7265, 7271, 7275, 7283, 7288, 7294, 7299, 7305,
+ 7309, 7314, 7320, 7324, 7329, 7335, 7339, 7343, 7347, 7355,
+ 7360, 7366, 7370, 7378, 7382, 7390, 7394, 7402, 7406, 7410,
+ 7414, 7422, 7426, 7434, 7438, 7446, 7450, 7454, 7458, 7462,
+ 7470, 7474, 7478, 7482, 7486, 7494, 7502, 7510, 7514, 7518,
+ 7526, 7530, 7534, 7542, 7551, 7555, 7559, 7563, 7571, 7575,
+ 7583, 7591, 7595, 7603, 7607, 7615, 7619, 7623, 7627, 7631,
+ 7635, 7639, 7643, 7647, 7651, 7655, 7659, 7663, 7667, 7671,
+ 7675, 7679, 7687, 7691, 7695, 7699, 7703, 7711, 7715, 7723,
+ 7727, 7735, 7740, 7746, 7754, 7758, 7766, 7770, 7774, 7782,
+ 7786, 7794, 7799, 7805, 7809, 7813, 7817, 7821, 7825, 7833,
+ 7837, 7845, 7849, 7857, 7861, 7865, 7869, 7877, 7881, 7889,
+ 7893, 7901, 7909, 7917, 7921, 7929, 7933, 7941, 7945, 7949,
+ 7957, 7961, 7966, 7972, 7980, 7985, 7991, 7999, 8003, 8007,
+ 8011, 8019, 8027, 8031, 8035, 8039, 8047, 8051, 8059, 8063,
+ 8067, 8075, 8079, 8087, 8095, 8099, 8107, 8111, 8115, 8119,
+ 8123, 8127, 8131, 8135, 8139, 8143, 8147, 8151, 8155, 8159,
+ 8163, 8167, 8171, 8175, 8179, 8183, 8187, 8191, 8195, 8199,
+ 8203, 8207, 8211, 8215, 8219, 8223, 8227, 8231, 8235, 8239,
+ 8243, 8247, 8251, 8255, 8259, 8263, 8267, 8271, 8275, 8279,
+ 8283, 8287, 8291, 8295, 8299, 8303, 8307, 8311, 8315, 8319,
+ 8323, 8331, 8336, 8342, 8347, 8353, 8357, 8361, 8365, 8369,
+ 8373, 8381, 8386, 8392, 8396, 8400, 8404, 8408, 8412, 8416,
+ 8420, 8424, 8428, 8432, 8436, 8440, 8444, 8448, 8452, 8456,
+ 8460, 8464, 8468, 8472, 8476, 8480, 8484, 8488, 8492, 8496,
+ 8504, 8512, 8516, 8524, 8528, 8536, 8540, 8544, 8548, 8552,
+ 8560, 8568, 8572, 8576, 8580, 8584, 8588, 8592, 8596, 8600,
+ 8604, 8608, 8612, 8616, 8620, 8624, 8628, 8632, 8636, 8640,
+ 8644, 8648, 8652, 8656, 8660, 8668, 8676, 8681, 8687, 8691,
+ 8699, 8703, 8707, 8711, 8719, 8727, 8731, 8739, 8747, 8751,
+ 8755, 8759, 8763, 8767, 8775, 8779, 8787, 8795, 8799, 8803,
+ 8811, 8815, 8823, 8827, 8831, 8835, 8839, 8847, 8852, 8858,
+ 8862, 8866, 8870, 8878, 8882, 8887, 8893, 8901, 8906, 8912,
+ 8920, 8924, 8932, 8936, 8940, 8944, 8948, 8952, 8956, 8960,
+ 8964, 8968, 8972, 8976, 8980, 8984, 8992, 8996, 9001, 9007,
+ 9011, 9015, 9019, 9023, 9031, 9035, 9039, 9047, 9052, 9058,
+ 9062, 9067, 9073, 9077, 9081, 9086, 9095, 9099, 9103, 9108,
+ 9114, 9122, 9130, 9135, 9141, 9145, 9153, 9157, 9161, 9169,
+ 9173, 9177, 9181, 9185, 9189, 9193, 9201, 9206, 9212, 9216,
+ 9220, 9228, 9236, 9240, 9244, 9248, 9256, 9260, 9268, 9276,
+ 9284, 9288, 9296, 9304, 9308, 9312, 9316, 9320, 9324, 9328,
+ 9336, 9341, 9347, 9355, 9359, 9363, 9367, 9371, 9375, 9383,
+ 9387, 9395, 9403, 9407, 9411, 9419, 9424, 9430, 9434, 9442,
+ 9446, 9454, 9458, 9466, 9470, 9478, 9486, 9490, 9498, 9502,
+ 9507, 9513, 9518, 9524, 9529, 9535, 9540, 9546, 9551, 9557,
+ 9562, 9568, 9576, 9580, 9588, 9593, 9599, 9603, 9607, 9611,
+ 9619, 9623, 9627, 9631, 9635, 9639, 9643, 9647, 9651, 9659,
+ 9663, 9671, 9679, 9683, 9691, 9695, 9700, 9706, 9712, 9722,
+ 9727, 9733, 9737, 9741, 9745, 9753, 9758, 9762, 9770, 9775,
+ 9781, 9789, 9793, 9801, 9805, 9809, 9813, 9817, 9825, 9829,
+ 9837, 9841, 9849, 9857, 9861, 9866, 9872, 9876, 9881, 9887,
+ 9892, 9898, 9906, 9911, 9917, 9925, 9930, 9936, 9940, 9944,
+ 9948, 9952, 9956, 9960, 9964, 9972, 9977, 9983, 9987, 9992,
+ 9998, 10006, 10010, 10018, 10022, 10030, 10038, 10042, 10050, 10098,
+ 10102, 10115, 10117, 10121, 10125, 10129, 10138, 10144, 10148, 10156,
+ 10160, 10168, 10172, 10180, 10184, 10188, 10192, 10196, 10200, 10204,
+ 10208, 10216, 10220, 10228, 10232, 10236, 10240, 10244, 10248, 10252,
+ 10260, 10264, 10268, 10276, 10280, 10288, 10296, 10300, 10305, 10311,
+ 10316, 10322, 10327, 10329, 10335, 10339, 10343, 10347, 10351, 10355,
+ 10359, 10363, 10367, 10375, 10380, 10386, 10390, 10395, 10401, 10405,
+ 10413, 10418, 10424, 10429, 10435, 10443, 10447, 10455, 10459, 10467,
+ 10471, 10475, 10479, 10487, 10492, 10498, 10502, 10507, 10511, 10515,
+ 10519, 10527, 10531, 10539, 10543, 10551, 10559, 10563, 10567, 10575,
+ 10579, 10587, 10591, 10599, 10603, 10611, 10616, 10622, 10626, 10634,
+ 10638, 10642, 10646, 10650, 10658, 10666, 10674, 10682, 10690, 10695,
+ 10701, 10705, 10713, 10718, 10724, 10728, 10736, 10744, 10748, 10752,
+ 10756, 10764, 10769, 10775, 10779, 10787, 10792, 10798, 10802, 10810,
+ 10814, 10818, 10822, 10826, 10830, 10834, 10841, 10848, 10852, 10860,
+ 10864, 10868, 10872, 10876, 10880, 10888, 10892, 10896, 10900, 10908,
+ 10913, 10919, 10923, 10927, 10931, 10936, 10942, 10946, 10950, 10954,
+ 10962, 10967, 10973, 10977, 10985, 10989, 10993, 10997, 11005, 11009,
+ 11017, 11021, 11025, 11033, 11041, 11046, 11052, 11056, 11064, 11072,
+ 11076, 11084, 11089, 11095, 11100, 11106, 11111, 11117, 11121, 11127,
+ 11133, 11138, 11144, 11148, 11156, 11164, 11168, 11176, 11180, 11188,
+ 11192, 11196, 11204, 11208, 11216, 11220, 11224, 11228, 11236, 11240,
+ 11248, 11252, 11260, 11262, 11264, 11268, 11272, 11276, 11284, 11294,
+ 11305, 11314, 11318, 11322, 11326, 11330, 11334, 11338, 11346, 11350,
+ 11354, 11358, 11366, 11370, 11378, 11383, 11389, 11393, 11397, 11401,
+ 11405, 11409, 11413, 11417, 11421, 11425, 11429, 11437, 11442, 11448,
+ 11452, 11460, 11464, 11472, 11480, 11488, 11492, 11500, 11504, 11512,
+ 11520, 11528, 11532, 11536, 11540, 11544, 11548, 11556, 11561, 11567,
+ 11571, 11575, 11579, 11587, 11595, 11599, 11604, 11610, 11614, 11618,
+ 11622, 11626, 11630, 11634, 11638, 11642, 11646, 11650, 11654, 11658,
+ 11663, 11669, 11673, 11681, 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, 11917, 11921, 11926, 11930, 11934, 11938, 11942, 11946,
+ 11950, 11958, 11962, 11966, 11970, 11974, 11978, 11982, 11986, 11990,
+ 11994, 11998, 12002, 12006, 12010, 12014, 12018, 12022, 12026, 12030,
+ 12034, 12038, 12042, 12046, 12050, 12054, 12062, 12066, 12070, 12074,
+ 12078, 12082, 12086, 12090, 12094, 12098, 12102, 12106, 12110, 12114,
+ 12122, 12126, 12130, 12134, 12138, 12142, 12146, 12154, 12158, 12166,
+ 12170, 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, 12342, 12346, 12350, 12358, 12362, 12370, 12374, 12378,
+ 12383, 12389, 12397, 12401, 12409, 12413, 12421, 12425, 12433, 12437,
+ 12442, 12448, 12452, 12456, 12460, 12468, 12472, 12480, 12485, 12491,
+ 12496, 12502, 12507, 12513, 12517, 12525, 12533, 12537, 12542, 12548,
+ 12556, 12560, 12567, 12572, 12578, 12582, 12586, 12591, 12597, 12601,
+ 12609, 12613, 12617, 12621, 12625, 12633, 12637, 12641, 12645, 12650,
+ 12656, 12660, 12664, 12672, 12676, 12684, 12692, 12696, 12700, 12708,
+ 12712, 12720, 12724, 12728, 12732, 12736, 12740, 12744, 12748, 12752,
+ 12756, 12760, 12764, 12772, 12776, 12784, 12788, 12796, 12800, 12804,
+ 12808, 12812, 12816, 12824, 12828, 12836, 12840, 12848, 12852, 12856,
+ 12864, 12868, 12876, 12880, 12884, 12892, 12896, 12904, 12909, 12915,
+ 12919, 12923, 12927, 12931, 12935, 12939, 12943, 12951, 12955, 12959,
+ 12963, 12971, 12975, 12983, 12991, 12996, 13002, 13006, 13010, 13014,
+ 13018, 13023, 13029, 13037, 13045, 13049, 13053, 13061, 13065, 13073,
+ 13081, 13085, 13093, 13101, 13106, 13112, 13117, 13123, 13127, 13135,
+ 13139, 13143, 13147, 13155, 13160, 13166, 13170, 13179, 13181, 13189,
+ 13194, 13200, 13205, 13211, 13215, 13223, 13227, 13231, 13235, 13243,
+ 13247, 13255, 13259, 13267, 13271, 13279, 13287, 13295, 13303, 13311,
+ 13319, 13327, 13331, 13339, 13343, 13347, 13351, 13355, 13359, 13363,
+ 13367, 13371, 13375, 13379, 13383, 13387, 13391, 13392, 13397, 13403,
+ 13407, 13408, 13412, 13420, 13428, 13432, 13436, 13444, 13448, 13456,
+ 13460, 13464, 13468, 13476, 13480, 13484, 13488, 13492, 13496, 13500,
+ 13504, 13508, 13512, 13516, 13520, 13524, 13528, 13532, 13536, 13540,
+ 13544, 13548, 13552, 13556, 13560, 13564, 13568, 13572, 13576, 13580,
+ 13584, 13588, 13592, 13596, 13600, 13604, 13608, 13612, 13616, 13620,
+ 13624, 13628, 13632, 13636, 13640, 13644, 13648, 13652, 13656, 13660,
+ 13664, 13668, 13672, 13676, 13680, 13684, 13688, 13692, 13696, 13700,
+ 13704, 13708, 13712, 13716, 13720, 13724, 13728, 13732, 13736, 13740,
+ 13744, 13748, 13752, 13756, 13760, 13764, 13768, 13772, 13776, 13780,
+ 13784, 13788, 13792, 13796, 13800, 13804, 13808, 13812, 13816, 13820,
+ 13824, 13828, 13832, 13836, 13840, 13844, 13848, 13852, 13856, 13860,
+ 13864, 13868, 13872, 13876, 13880, 13884, 13888, 13892, 13896, 13900,
+ 13904, 13908, 13912, 13916, 13920, 13924, 13928, 13932, 13936, 13940,
+ 13944, 13948, 13952, 13956, 13960, 13964, 13968, 13972, 13976, 13980,
+ 13984, 13988, 13992, 13996, 14000, 14004, 14008, 14012, 14016, 14020,
+ 14024, 14028, 14032, 14036, 14040, 14044, 14048, 14052, 14056, 14060,
+ 14064, 14068, 14072, 14076, 14080, 14084, 14088, 14092, 14096, 14100,
+ 14104, 14108, 14112, 14116, 14120, 14124, 14128, 14132, 14136, 14140,
+ 14144, 14148, 14152, 14156, 14160, 14164, 14168, 14172, 14176, 14180,
+ 14184, 14188, 14192, 14196, 14200, 14204, 14208, 14212, 14216, 14220,
+ 14224, 14228, 14232, 14236, 14240, 14244, 14248, 14252, 14256, 14260,
+ 14264, 14268, 14272, 14276, 14280, 14284, 14288, 14292, 14296, 14300,
+ 14304, 14308, 14312, 14316, 14320, 14324, 14328, 14332, 14336, 14340,
+ 14344, 14348, 14352, 14356, 14360, 14364, 14368, 14372, 14376, 14380,
+ 14384, 14388, 14392, 14396, 14400, 14404, 14408, 14412, 14416, 14420,
+ 14424, 14428, 14432, 14436, 14440, 14444, 14448, 14452, 14456, 14460,
+ 14464, 14468, 14472, 14476, 14480, 14484, 14488, 14492, 14496, 14500,
+ 14504, 14508, 14512, 14516, 14520, 14524, 14528, 14532, 14536, 14540,
+ 14544, 14548, 14552, 14556, 14560, 14564, 14568, 14572, 14576, 14580,
+ 14584, 14588, 14592, 14596, 14600, 14604, 14608, 14612, 14616, 14620,
+ 14624, 14628, 14632, 14640, 14644, 14648, 14652, 14656, 14660, 14664,
+ 14668, 14672, 14676, 14680, 14684, 14688, 14692, 14696, 14700, 14704,
+ 14708, 14712, 14716, 14720, 14724, 14728, 14732, 14736, 14740, 14744,
+ 14748, 14752, 14756, 14760, 14764, 14768, 14772, 14776, 14780, 14784,
+ 14788, 14792, 14796, 14800, 14804, 14808, 14812, 14816, 14820, 14824,
+ 14828, 14836, 14840, 14844, 14848, 14852, 14856, 14860, 14864, 14868,
+ 14872, 14876, 14880, 14884, 14888, 14892, 14896, 14900, 14904, 14908,
+ 14912, 14916, 14920, 14924, 14932, 14936, 14940, 14944, 14948, 14952,
+ 14956, 14960, 14964, 14968, 14972, 14976, 14980, 14984, 14988, 14992,
+ 14996, 15000, 15004, 15008, 15012, 15016, 15020, 15024, 15028, 15032,
+ 15036, 15040, 15044, 15048, 15052, 15056, 15060, 15064, 15068, 15072,
+ 15076, 15080, 15084, 15088, 15092, 15096, 15100, 15104, 15108, 15112,
+ 15116, 15120, 15124, 15128, 15132, 15136, 15140, 15144, 15148, 15152,
+ 15156, 15160, 15164, 15168, 15172, 15176, 15180, 15184, 15188, 15192,
+ 15196, 15200, 15204, 15208, 15212, 15216, 15220, 15224, 15228, 15238,
+ 15239, 15242, 15243, 15244, 15250, 15251, 15252, 15253, 15254, 15267,
+ 15267, 15274, 15274, 15283, 15298, 15300, 15303, 15305, 15309, 15321,
+ 15337, 15341, 15352, 15353, 15356, 15368, 15377, 15378, 15381, 15382,
+ 15383, 15386, 15387, 15390, 15391, 15394, 15395, 15398, 15400, 15402,
+ 15404, 15408, 15415, 15422, 15438, 15472, 15482, 15485, 15489, 15502,
+ 15503, 15505, 15507, 15511, 15525, 15532, 15589, 15598, 15600, 15601,
+ 15604, 15606, 15607, 15610, 15611, 15612, 15613, 15614, 15621, 15620,
+ 15630, 15632, 15634, 15635, 15638, 15639, 15640, 15641, 15644, 15645,
+ 15649, 15648, 15665, 15663, 15679, 15678, 15692, 15698, 15699, 15702,
+ 15704, 15705, 15708, 15709, 15710, 15711, 15714, 15715, 15718, 15726,
+ 15743, 15751, 15774, 15888, 15922, 15924, 15926, 15930, 15934, 15933,
+ 15984, 15986, 15985, 16000, 16006, 16013, 16018, 16024, 16025, 16028,
+ 16029, 16030, 16031, 16032, 16033, 16034, 16035, 16036, 16039, 16040,
+ 16041, 16042, 16043, 16044, 16045, 16046, 16047, 16048, 16051, 16052,
+ 16055, 16057, 16066, 16166, 16167, 16174, 16175, 16176, 16182, 16191,
+ 16194, 16195, 16196, 16197, 16200, 16201, 16202, 16205, 16207, 16215,
+ 16216, 16222, 16230, 16231, 16234, 16235, 16238, 16243, 16250, 16255,
+ 16262, 16269, 16269, 16271, 16278, 16279, 16282, 16283, 16284, 16285,
+ 16286, 16287, 16288, 16289, 16290, 16296, 16303, 16315, 16321, 16328,
+ 16336, 16337, 16349, 16360, 16371, 16375, 16376, 16379, 16384, 16388,
+ 16389, 16392, 16398, 16406, 16412, 16419, 16423, 16424, 16427, 16430,
+ 16434, 16435, 16438, 16444, 16453, 16458, 16468, 16478, 16490, 16491,
+ 16492, 16493, 16494, 16495, 16496, 16497, 16498, 16499, 16500, 16501,
+ 16502, 16503, 16504, 16511, 16512, 16515, 16516, 16523, 16524, 16525,
+ 16532, 16531, 16548, 16549, 16556, 16555, 16626, 16632, 16638, 16646,
+ 16652, 16658, 16664, 16670, 16676, 16682, 16688, 16694, 16700, 16711,
+ 16712, 16715, 16716, 16717, 16718, 16719, 16720, 16721, 16722, 16723,
+ 16724, 16725, 16726, 16727, 16728, 16729, 16730, 16731, 16732, 16733,
+ 16734, 16735, 16736, 16739, 16740, 16741, 16742, 16743, 16744, 16748,
+ 16749, 16750, 16751, 16752, 16753, 16754, 16757, 16760, 16761, 16762,
+ 16763, 16764, 16765, 16766, 16767, 16780, 16781, 16782, 16783, 16784,
+ 16785, 16786, 16791, 16792, 16793, 16794, 16795, 16796, 16802, 16803,
+ 16804, 16805, 16806, 16807, 16808, 16809, 16810, 16811, 16812, 16815,
+ 16816, 16817, 16818, 16819, 16822, 16823, 16824, 16825, 16828, 16829,
+ 16830, 16831, 16832, 16833, 16834, 16851, 16852, 16853, 16856, 16857,
+ 16858, 16859, 16860, 16861, 16865, 16865, 16868, 16874, 16875, 16878,
+ 16880, 16885, 16895, 16906, 16913, 16914, 16915, 16918, 16951, 16953,
+ 16955, 16957, 16959, 16961, 16962, 16965, 16967, 16975, 16976, 16977,
+ 16981, 16982, 16986, 16987, 16990, 16991, 16994, 16995, 16996, 16997,
+ 16998, 17001, 17002, 17003, 17004, 17005, 17006, 17007, 17008, 17009,
+ 17010, 17011, 17012, 17013, 17014, 17015, 17016, 17017, 17018, 17019,
+ 17020, 17021, 17022, 17023, 17024, 17025, 17026, 17027, 17028, 17029,
+ 17030, 17031, 17032, 17033, 17034, 17035, 17036, 17037, 17038, 17039,
+ 17040, 17041, 17042, 17043, 17044, 17045, 17046, 17047, 17048, 17049,
+ 17050, 17051, 17052, 17053, 17054, 17055, 17056, 17059, 17060, 17061,
+ 17062, 17065, 17066, 17067, 17068, 17069, 17070, 17071, 17072, 17073,
+ 17074, 17081, 17082, 17083, 17084, 17087, 17088, 17091, 17092, 17095,
+ 17096, 17107, 17108
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || 0
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "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", "ASSERTION",
+ "ASSIGNMENT", "ASYMMETRIC", "AT", "ATTACH", "ATTRIBUTE", "AUTHORIZATION",
+ "BACKWARD", "BEFORE", "BEGIN_P", "BETWEEN", "BIGINT", "BINARY", "BIT",
+ "BOOLEAN_P", "BOTH", "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", "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", "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", "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", "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",
+ "'<'", "'>'", "'='", "POSTFIXOP", "'+'", "'-'", "'*'", "'/'", "'%'",
+ "'^'", "UMINUS", "'['", "']'", "'('", "')'", "'.'", "','", "';'", "':'",
+ "'{'", "'}'", "$accept", "prog", "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", "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",
+ "ExclusionWhereClause", "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", "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", "DropPLangStmt", "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", "AlterForeignTableStmt",
+ "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",
+ "drop_type_any_name", "drop_type_name", "drop_type_name_on_any_name",
+ "any_name_list", "any_name", "attrs", "type_name_list", "TruncateStmt",
+ "opt_restart_seqs", "CommentStmt", "comment_type_any_name",
+ "comment_type_name", "comment_text", "SecLabelStmt", "opt_provider",
+ "security_label_type_any_name", "security_label_type_name",
+ "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",
+ "createfunc_opt_list", "common_func_opt_item", "createfunc_opt_item",
+ "func_as", "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",
+ "reindex_option_list", "reindex_option_elem", "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",
+ "publication_name_list", "publication_name_item",
+ "AlterSubscriptionStmt", "DropSubscriptionStmt", "RuleStmt",
+ "RuleActionList", "RuleActionMulti", "RuleActionStmt",
+ "RuleActionStmtOrEmpty", "event", "opt_instead", "NotifyStmt",
+ "notify_payload", "ListenStmt", "UnlistenStmt", "TransactionStmt",
+ "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", "vac_analyze_option_list",
+ "analyze_keyword", "vac_analyze_option_elem", "vac_analyze_option_name",
+ "vac_analyze_option_arg", "opt_analyze", "opt_verbose", "opt_full",
+ "opt_freeze", "opt_name_list", "vacuum_relation", "vacuum_relation_list",
+ "opt_vacuum_relation_list", "ExplainStmt", "ExplainableStmt",
+ "explain_option_list", "explain_option_elem", "explain_option_name",
+ "explain_option_arg", "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_with_clause", "into_clause", "OptTempTableName",
+ "opt_table", "all_or_distinct", "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", "func_alias_clause", "join_type",
+ "join_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", "type_list", "array_expr", "array_expr_list",
+ "extract_list", "extract_arg", "unicode_normal_form", "overlay_list",
+ "overlay_placing", "position_list", "substr_list", "substr_from",
+ "substr_for", "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", "database_name", "access_method",
+ "attr_name", "index_name", "file_name", "func_name", "AexprConst",
+ "Iconst", "SignedIconst", "RoleId", "RoleSpec", "role_list",
+ "NonReservedWord", "unreserved_keyword", "col_name_keyword",
+ "type_func_name_keyword", "reserved_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", "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
+};
+#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_uint16 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, 60, 62, 61, 798, 43, 45, 42,
+ 47, 37, 94, 799, 91, 93, 40, 41, 46, 44,
+ 59, 58, 123, 125
+};
+# endif
+
+#define YYPACT_NINF -5580
+
+#define yypact_value_is_default(Yystate) \
+ (!!((Yystate) == (-5580)))
+
+#define YYTABLE_NINF -3077
+
+#define yytable_value_is_error(Yytable_value) \
+ (!!((Yytable_value) == (-3077)))
+
+ /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+static const int yypact[] =
+{
+ -5580, 1039, 8116, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, 37974, -5580, -5580, -5580, -5580, -5580,130062,
+ 1078, -5580, -5580,135491, -5580, -5580, -5580, 419, 87876, -5580,
+ 91614, 1326, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 95886, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 74508, 1813, -5580, 1087, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, 40, 20364, -5580, -5580, 92148, -5580, 170, -5580, -5580,
+ -5580, -5580, -5580, 76113, -5580, -5580, 92682, 925, -5580, -5580,
+ 1220, 1413, -5580, 177, 19133, -5580, -5580, 93216, 88944, -5580,
+ -5580, 96420, 849, 1179, 19832, 40, 37436, 96954, -5580, 1223,
+ -5580, 70726, -5580, -5580, -5580, 88410, -5580, -5580, -5580, 1653,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 103896, 1819, 1442, 71269, -5580, -5580, -5580, -5580, -5580,103896,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 97488,
+ -5580, 1562, 1728, 766,104430,104964, 86274, -5580, 1590, -5580,
+ 103896, 1803, 1730, 73438, -5580,105498, -5580, -5580, 1698, -5580,
+ 98022, -5580, -5580, -5580, -5580, -5580, 1442, -5580, 74508, 69654,
+ 438, 1644, -5580, -5580,106032, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580,103896, 2118, 1736, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, 1515, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, 861, -5580, 1446, 964, 1781, 224, 1779,
+ -5580, -5580, -5580, 12096, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580,131655, 478, -5580, -5580, -5580, 1807, -5580, 1830, -5580,
+ -5580, -5580, 2003, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 1052, -5580, -5580, -5580, -5580, 2400,130593, 95886, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, 89478, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 234,
+ -5580, -5580, -5580, -5580, -5580, 95886, 95886, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, 95886, 1954, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, 1032, 2214, -5580, -5580, 74508,
+ 3023, 3023, 2548,131655, -5580, -5580, 2467, 76113,103896,103896,
+ 103896, 2207,103896, 2102,103896, 489, 76113,138770, 98556, 2267,
+ 2105, 64752,106566, -5580, 76113,103896,136898, 76113,103896,103896,
+ 107100,103896,107634,103896, 114, 93750,103896, 2205,103896,103896,
+ 137366,108168, 2345, -5580, 2608, 1638, -5580, 2096, -5580, 201,
+ -5580, 2027, -5580, 204, 235, 265, -5580, -5580, -5580,103896,
+ 19894, 1819, 2467, -5580, 2118,103896, 2353,103896, 2124,108702,
+ 2202,103896, -5580,103896, 2224,109236, 826, 2275,138770, 2283,
+ 65299, 2333,103896,103896,138770,109770,110304,110838,103896,103896,
+ -5580, -5580, 2288,103896,103896, -5580, 2415,139238, 1914, 2421,
+ 2605, 2504, 434, -5580, -5580, 2694, 2236, -5580, -5580, 2757,
+ 95886, -5580, 94284, -5580, -5580, -5580, 2523, -5580, -5580, -5580,
+ -5580, -5580, -5580,142046, 1179, -5580, -5580, 2527, 76648, 2598,
+ -5580, -5580,111372, 81463, 2349, -5580, 831, 77183,139706, 2705,
+ 2361, 65846, 2772, -5580, 77718, -5580,140174, 78253, -5580, -5580,
+ -5580, -5580, -5580,111906, -5580,112440, 2483, 2598, -5580, 81998,
+ 140642, -5580, 2625,112974,113508,114042, 2467, 10204, -5580, 2356,
+ 2753, 2370, 1247, 95886, 95886, 1346,133122, -5580, -5580, 925,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 221, 288,
+ 71812, 807, 72355, -5580, -5580, 944, 976, 1153, 221, 2841,
+ 2841, 884, 95886, -5580, -5580, 288, -5580, 931, 803, 2373,
+ 2373, 2373, 2589, 21, -5580, 2373, 2520, -5580, -5580, -5580,
+ -5580, 98022, 71812, 72355, -5580, 2408, 1819, 354, 2869, 2489,
+ -5580, -5580, -5580, -5580, -5580, 2501, 2864, 2864,103896, -5580,
+ -5580, -5580, 2912, 2491, 2759, -5580, 2490, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, 2707, 2710, 2723, 296,
+ 1819, 255, -5580, 2847, -5580, 2726, 44018, 44018, 1574, 95886,
+ 1819, 72898, 99090,125790, 184,142046, 1819,114576, 2555, 1633,
+ 2736, -5580, -5580, -5580, 791, -5580, 2982, 2570, 2816, 180,
+ 1638, 61501, -5580, 2557, 2027, 98022,132186, -5580, -5580, -5580,
+ -5580,141110, 2882, 47882,103896, 2568, -5580, 2592, 2568, 2580,
+ 2613, 1781, -5580,141110,103896, 1763, 1763, 3060, 1763, 1918,
+ 2146, -5580, 1625, -5580, 2962, 2978, 98022, 2686, 40, 2704,
+ -5580, -5580, -5580, 2730, -5580, 2724, 2750, -5580, 1178, 3024,
+ -5580, -5580, -5580, -5580, 2825, 2840, 2845, 2852, 2779, 2885,
+ 355, -5580, -5580, -5580, -5580, 3149, -5580, -5580, -5580, -5580,
+ -5580, -5580, 3258, 3270,135962,135962, 1134, 1135, 247, 279,
+ -5580, -5580, -5580, 3128, -5580, -5580, 3126, 2936,103896, -5580,
+ -5580,103896, -5580,115110, -5580, -5580, 3023, 2730, 1240, -5580,
+ 1933, 2877, 2192, 2862, 2044, 1672, -5580, 269,103896, 476,
+ 2914, 99624, 7606, 2890, 2895, 2027, 3051, 1883, 3195, 3238,
+ 9170, 355,100158, -5580, -5580, -5580, -5580,103896,103896, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 2901, 1617,
+ -5580, -5580, 2900, 3241, 3112, 12709, 871, 3203, 3062, 1679,
+ 12875, 3118, 1928, 3249, 9384, 1800, 3250, 2133, 1904,115644,
+ 126324, 3209, 3254, 8373, 2327, 878, 3125, 1168, 3203, 3243,
+ 3073, 1679, 3259, 2737,103896, 2916, -5580, 3182, 3294, 91,
+ -5580, 160, -5580, 38517, 47882, 68582, -5580, 2027, 2981, 3134,
+ 84, 3173, 76113, 2930, -5580, -5580,103896, -5580, -5580, 82533,
+ 3006, -5580, 893, 76113, -5580, 3146, 2979, 66393,103896, 76113,
+ -5580, -5580, 76113,103896, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, 3067, 3262,103896, 82533, -5580, 3206,103896,103896, -5580,
+ -5580, 2938, -5580, -5580, -5580, -5580, 2373,103896, 3359, 82533,
+ 3168, 361,103896, 1720, 3396,103896, 3171, 1720, 2983,116178,
+ -5580, -5580, 1720, -5580, -5580,103896,103896, 2949, 1685, 3159,
+ 3278, 1720, 3177, 3397, 3398, 3178, 3030, 3184, 2592, 3363,
+ 3155, 1136, 1776, 167, 2319, 1720, 3008,116712,117246,103896,
+ 3010,103896, 2864, 76113, 76113, 76113,103896, 3292, -5580, 3142,
+ 100692, -5580, 2966, 2694, -5580, -5580, -5580, -5580, -5580, 1483,
+ -5580, -5580, -5580, -5580, -5580, 3310, -5580, 211, 3311, 2974,
+ 3314, 1765, -5580, 3025, -5580, 3025, 3025, 2977, 2977, 3160,
+ 2984, 3317, -5580, -5580, -5580, 2810, 3025, 2977, -5580, 83603,
+ -5580, 2098, 2150, -5580, 223, -5580, 3431, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, 2985, -5580, 1069, -5580, 2247,
+ -5580, -5580, -5580, -5580, 3015, -5580, 3321, 273, -5580, 3324,
+ -5580, 2986,117780, -5580,118314,118848, 3325, 274, -5580,138770,
+ 3326, 273, 3330, 2986, 3331, 273, 3332, 319, 3333, -5580,
+ 1180, 3322, 3336, 223, 3337, 2368, 2986,142514, 3338, 278,
+ -5580, 3339, 281, -5580, 3340, 3211, -5580, 14018, 10204, -5580,
+ 16529, 2222, -5580, -5580, -5580, -5580, -5580, -5580, 47882, 1228,
+ 3096, -5580, -5580, -5580, 2257, -5580,134545, -5580, 1346, 288,
+ -5580, 95886, 288, 95886, 884, 288, 95886, 288, 95886, 884,
+ 288, 95886, 95886, 95886, 288, -5580, -5580, 382, 305, -5580,
+ -5580, -5580, -5580, -5580, 95886, 3005,103896,103896, -5580, -5580,
+ -5580, 90012,138770, 90546, -5580,103896, -5580, 401, 95886, -5580,
+ 95886, -5580, 1819, -5580, -5580, 2753, 82533, 3455,138770, 2864,
+ -5580, 2312, -5580, -5580,103896,103896, -5580, -5580, -5580, 3267,
+ 103896, 3334, 3341, 90012,138770, -5580,119382, -5580,142046, 3216,
+ 3014, -5580, -5580, -5580, -5580, 2322, 3495, 193, 3501, 47882,
+ 3019, 193, 193, 3022, 3352, -5580, -5580, -5580, 280, 3028,
+ 3031, -5580, 220, 220, -5580, 3032, 3033, -5580, 225, 3034,
+ 3035, 3517, 229, 3038, 3039, 3041, 2810, 193, 3044, 47882,
+ -5580, 3045, 220, 3047, 3049, 3050, 3531, 3053, -5580, 3534,
+ 3056, 190, 219, 3057, 3059, -5580, 3032, -5580, 253, 3061,
+ 3063, 3064, 3065, 3066, 3069, 3070, 3071, 47882, 47882, 47882,
+ -5580, 42362, 2027, 1819, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, 257, 6186, -5580, 3103, -5580, -5580, 3256, -5580,
+ -5580, 47882, -5580, -5580, 832, -5580, 259, -5580, -5580, 2027,
+ -5580, -5580, 491, -5580, -5580, -5580, -5580, -5580, 3348, 3072,
+ 2438, 2438, 249, -5580, 92148, 92148, -5580, -5580, 1911, 3074,
+ -5580, 2250, -5580, -5580, -5580, -5580, -5580, -5580,141578, 3525,
+ -5580, 300, 1819, 160, 352, 3467,133593,134069, 3356, 3356,
+ 3342, -5580, -5580,103896, -5580, -5580, 2027, 165, 3355, 2323,
+ -5580, -5580,134545, -5580, -5580, 925, 18913, 2326, 2568,103896,
+ 103896, 3532, -5580, -5580, 2344, -5580, 3081, -5580, 2592, -5580,
+ -5580, 1781, 1781, 47882, 1781, 251, 1734, 44570, 48434, 3410,
+ 3297, 1714, 1968, 3414, -5580, 3303, 1918, 2146, 98022,103896,
+ 119916, 3212, 47882, -5580, 2730, 3099, 2392, -5580, 84672,131124,
+ 131124, 3373, -5580, -5580, 1494, 169, 3224, 3335, 2841, 162,
+ 1936, 1936, -5580, -5580, 3093, -5580, 3470, 92148, 3156,135962,
+ -5580, -5580,103896, -5580, -5580,101226, -5580, -5580, -5580, 463,
+ 3095, -5580, 3111,103896, 3644, 1936, 1936, -5580, -5580, 3100,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,131655,103896,
+ -5580, 3102, 3107, 3106, 3114, -5580,132186, -5580, 3533, 3192,
+ 3196, 3251, 69118, -5580, 3198, 3164, 3200, 3255, 74508, 3113,
+ 3202, 3204, 3263, 3383, -5580, -5580, 3210, 3222,126858, -5580,
+ -5580, 886, -5580, -5580, -5580, 886, -5580, 3154, -5580, 1845,
+ 857, 293, 3225, 456, 1031, 3546, -5580, 1570, -5580, -5580,
+ 3281, -5580, 6822,103896, 3487, 9400, 3358, 355, 3280, -5580,
+ -5580, -5580, 3416, 3235,103896, 3236, 3375, 355, 295,127392,
+ -5580, -5580,103896, -5580, -5580, -5580, -5580, 3840, 3522, 41282,
+ -5580, 1692, 3239, 3217, 3257,103896, 85206, 1371, 3349, 3370,
+ 85, 2343, 212, 3307,103896, 2001, 3378,103896, 3176, 3260,
+ 3261, 3480, 3179, 1726, 3582, 3181, -5580, -5580, -5580, 3549,
+ 3379, 3485, 3535, 10334, 3252, 3264, 79858, -5580, 3273, 1076,
+ 66940,103896,103896, 3274, 3275,127926, 3840, 3563, 3293, 3296,
+ 3282, 3285, 17, 3578, 1068, 3289, -5580, -5580, -5580, 1068,
+ 3295, 3298,128460, 3840, 3576,103896, 3299, 3300,103896, 83603,
+ 355, -5580, 3645, 355, 355, 2296, 3647, 3302, 316, 3461,
+ 1273, 1720, 3181, 2309, -5580, 3304, 3306, 926, -5580, 3421,
+ 103896, 3309, 3312, 1327, 1819, -5580, -5580, 3313, 3399, 3315,
+ 1109, -5580, -5580, 1716, 3316, 98022, 3424, 3425, 2001, 395,
+ 1853, 3181, -5580, 3318, 3319, 3179, 3179,103896,103896,103896,
+ 103896,103896, 216, 3683, 3684, 3323, 200, 1433, 3244, -5580,
+ 1068,137834, 3328, -5580, 1068,103896, 186, 2021, 3181, 2091,
+ -5580, 2029, -5580, -5580, -5580, 1638, -5580, 47882, 47882, 47882,
+ 3245, -5580, 2873, 18913, 1115, -5580, 261, 14432, 3246, -5580,
+ -5580, -5580, -5580,103896, -5580,103896, -5580, 3518, 82533, 3457,
+ 3524, -5580, 3290, -5580, 3530, 355, -5580,103896,103896, 3537,
+ 3474, 3542, 3543, 3478, 1198, 82533, 3479, 3547, -5580, 3548,
+ 3550, 3357, 173, 3345, 3284, 3727, 3618,103896, 74508, -5580,
+ 3741, 886, -5580, 82533, 3490, 3623, -5580,103896, 3509, 1214,
+ -5580, 3660, 3343, -5580, -5580, 79,103896, 266, 3327, -5580,
+ -5580, 3627,138770, 336, 3629, 1819, 3344, 3630, 3502, 1819,
+ 138770, 3554,103896,103896,103896,103896, -5580, -5580, 3508, 1053,
+ 194, -5580,137834, 3519, -5580,103896, 3520, 2309, 3521, 3752,
+ 99, 2373,120450, 3631,120984, 3320, 3329, 3329, 3753, 82533,
+ 3579, -5580, -5580, 3308, 2841, -5580, 2966, -5580, 2381, -5580,
+ 3444, -5580, 76113, -5580, -5580, 76113, -5580, -5580, 82533,103896,
+ 3351, -5580, 3353, -5580, -5580, 47882, -5580, -5580, -5580, 2841,
+ -5580, 82533, 3025, 3025, -5580, -5580, 3763, 3401, 3403, 2841,
+ -5580, 2841, -5580, 82533, -5580, 3346, 3347, 2841, 3394, -5580,
+ 3395, 2841, -5580, 2358, -5580, -5580, 76113, 76113, -5580,138770,
+ 138770, 3654, 278, 3655, 3382, 3665, 3384, 66940, 66940, -5580,
+ 306, 76113, -5580,138770, 76113, -5580,103896, -5580,103896, -5580,
+ -5580, -5580, -5580, 82533, 82533, -5580,138770,137834, 3668, 3669,
+ 319,103896,103896, -5580,103896,103896, -5580,103896,103896, -5580,
+ 15689, 2258, -5580, 10204, -5580, 2362, 3356, -5580, 1954,121518,
+ 1600, 1346,141110, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, 95886, -5580, 95886, 884, -5580, -5580, 95886, -5580, 95886,
+ 884, -5580, 95886, -5580, -5580, -5580, 95886,103896, 3876, 3354,
+ -5580, 491, -5580,103896, 2366, -5580, -5580, 2375, 1479,103896,
+ 103896, 859, 76113,103896, 3551, 76113, 76113,103896,103896,103896,
+ 103896,103896, 3415, 3074, 1356, -5580, 1216, 423, 98022, 3553,
+ -5580, -5580, -5580, -5580, -5580, 2396, 2118, 1036,103896, 961,
+ 2501, -5580, -5580, -5580, -5580, 90546, 88410, 3656, 158,103896,
+ -5580, -5580, 6462, 47882, 43466, -5580, -5580, 18913, 3380, 47882,
+ 47882, 3361, 2841, 2841, -5580, 385, 47882, 47882, 47882, 2841,
+ 2841, 47882, 7369, 47882, 66940, 47882, 51746, 39623, 47882, 47882,
+ 42914, -5580, 47882, 3580, 53402, 47882, 352, 3581, 47882, 352,
+ 7369, 3814, 3814, 1644, 1737, 7143, 3360, 2027, -5580, 2841,
+ 968, 318, 82533, 47882, 47882, 47882, 47882, 74508, 3430, 283,
+ 103896, 47882, 3362, 2826, -5580, 47882, -5580, 3364, 47882, 3432,
+ 979, 47882, 47882, 47882, 47882, 47882, 47882, 47882, 47882, 47882,
+ -5580, 55019, 328, -5580, 3666, 3694, 1140, 794, 91080, 44018,
+ 3688, -5580, 38517, -5580, 187, 95886, -5580, -5580, 2027, 3688,
+ -5580, -5580, -5580, -5580, -5580, 463, 3366, -5580, 3387, -5580,
+ -5580, -5580, -5580, -5580,103896, 3525, -5580, -5580, 3449, -5580,
+ -5580, -5580, -5580, 263, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, 3369, -5580, -5580, -5580, -5580, 3369, -5580, -5580,
+ 3356, 3372, 3680, 3681, 319,131655,103896,141110, -5580, -5580,
+ -5580, 2919, -5580, 47882, -5580, 2406, 2348,103896,103896, -5580,
+ 3657, -5580, 3377, -5580, 14520, 3657, -5580, -5580, 52298, 3506,
+ 3651, 3596, -5580, -5580, -5580, 3390, 18913, 47882, 47882, -5580,
+ 2635, 18913, 2646, -5580, -5580, -5580, -5580, -5580, -5580, 1659,
+ -5580,103896, 772, 3410, 1968, 3458, 892, 3848,103896, -5580,
+ 62040, 2424, 2561, -5580, 2730, -5580, -5580, 13376, -5580, 36618,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 3400,
+ -5580, -5580, -5580, -5580, -5580, 355, 3402, 3927, -5580,135962,
+ -5580, -5580, -5580, 3876, -5580, 2757, -5580, 2757, 3952, -5580,
+ 95886, -5580, -5580, -5580, -5580, 309, -5580, -5580, 10204, 10204,
+ -5580, -5580,138770,103896,103896, 3605, -5580, 3839, -5580, 83603,
+ -5580, 3408, -5580, 83068, 78788, -5580, -5580, 77, -5580, 740,
+ 138770, -5580,103896,103896, -5580, 74508,138770,103896,103896, -5580,
+ 138770,103896,103896, -5580, -5580, -5580, -5580, -5580,135018, 75,
+ 88410, 3544, 86808, -5580, -5580, 3411,103896, 3471, 3687, 3693,
+ 1336, -5580, -5580,122052, -5580, 3632,138770,103896,103896, 47882,
+ 3636,103896,103896, -5580, 521, 3504, 3505, -5580,103896, 3507,
+ 3670, 76113, 3428,103896,103896, 82533, 3510, 905, 76113, 3473,
+ 67487, 76113, 76113,103896,103896,103896,103896, 3561, 3756, 82533,
+ 103896, 3700, 1540, 98022, 282, 2048, 3181, 3658, -5580, 301,
+ -5580,138770, -5580,103896, 3641, -5580, -5580, -5580,101760, 3877,
+ 3557, -5580, -5580, -5580,128994, -5580, -5580, 3646, -5580, 2425,
+ -5580,138770,138770,103896, 10952,122586, 1695, 3664, -5580, -5580,
+ 82533, -5580,103896,102294,103896,103896, 3697,103896, 94818,123120,
+ 123654, 86, 1634, 3702,103896, 95352, 3707, -5580, 3586,103896,
+ -5580, -5580, 75043,138770,103896, 1335, 74508, -5580, -5580,103896,
+ -5580, 1077, -5580,103896, 4498, 3663, 3529, 3540,103896, 375,
+ 2138, 3181, 3816,103896,103896, 3453, 2440,138770,103896, 74508,
+ -5580, 3667, 1589,138770,103896,101760, -5580, 3671, 98022, 98022,
+ 138770,103896, 98022, -5580,103896,125790, -5580,138770, 1110, -5580,
+ 138770,103896,101760, -5580, 3673, 3611,138770,103896, 9625, -5580,
+ -5580, -5580, 355, -5580, -5580, -5580, -5580, -5580,103896,103896,
+ 355,103896,103896, 355, 1718, -5580,138770,103896, -5580, -5580,
+ -5580, 3583,138770,103896,103896, 221, -5580,138770, 3327,103896,
+ 74508, -5580,103896, 8618,103896,103896,103896,103896,103896,103896,
+ 138770,103896, -5580, -5580, 1516, 1550, 1723, 2060, 1455,103896,
+ 3760,103896,124188,138770,103896,103896, 1819,103896, 74508, 2144,
+ -5580, -5580, 3584, -5580,138770, 1110, -5580, 11314,103896,103896,
+ 103896, 3541, 3556, 210, 3634, -5580, -5580, -5580, 1119, 1119,
+ 3672, -5580, 47882, 47882, 45122, 3472, -5580, -5580, 47882, -5580,
+ -5580, -5580, 1061, 3920,124722, 1061, -5580, 1061, 3748, 3538,
+ 3555, 1061,103896, 1061, 1061,103896, -5580, -5580, -5580, -5580,
+ 3746,103896, 1061, 1061, 1061, 3674, -5580, -5580, 3674, 1018,
+ 47882, 82533,103896, -5580, 2443, -5580, 3496, 1053, -5580, -5580,
+ 74508,103896, 205, 830, 3822, 3701, 85740, 2600, 3812,103896,
+ 3545,103896, 3946, 3589, 98022, 2949, -5580, 2600,103896, -5580,
+ 1290, 88410, -5580, -5580, -5580, -5580, -5580, -5580, -5580,103896,
+ -5580, -5580, 3823,103896, 47882, 3676, -5580, 1819, 2949, 2949,
+ 2949, 2949, -5580, -5580, -5580, -5580, 3715, 1951, -5580, 3503,
+ 2949,103896, 3635, 3843, 2600, 3514, 3846, -5580, 2309, 3853,
+ 3849,103896, 3729, 85740, 3573, 3558, 3743, 3971, 2373, 1819,
+ 3747, 3731, -5580, 69118, -5580, 2949, 41822, 7303, 7600, 3733,
+ 3795,142046,100692, -5580, 3536, 3834, 3838, 3859, -5580, 211,
+ -5580, 3989, 2038, 3881, 47882, 2448, 3552, 223, -5580, -5580,
+ 3560, 3347, 3569, 3585, 3562, 3566, -5580, 2841, 60423, 3574,
+ 203, 3799, 3575, -5580, 273, -5580, 2986, -5580,103896, -5580,
+ 103896,103896,103896,103896, 274, -5580, -5580, 273, 2986, 273,
+ 319, -5580, 3829, 223, 2986, 3686, 3895,142046, -5580, 278,
+ -5580, 281, -5580, 3780, 319, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, 3797, 2373, 2381, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, 95886, 2757, -5580, 2449,
+ -5580,103896, -5580, 3874, 3875, 3878, 3886, 3888, 3590, 3591,
+ 3628,103896, 3600, 3590, 355, 3600, 3600, 3590, 3074, 3074,
+ 3590, 3591,138302, 4046, 3912, -5580, 3685, 3604, 3928, 850,
+ -5580, 958, 1024, 3860, -5580, -5580, -5580, -5580, 82533, -5580,
+ 138770, 3649, 2864, 2864, -5580, 321, 3826, 3617,138302, 4052,
+ 319, -5580, 76113, -5580, -5580, 82533, 3699, 3714, 76113, 3844,
+ 3689, 76113, -5580, -5580, 76113, -5580, -5580, -5580, -5580, -5580,
+ 82533, -5580, 3893,103896,103896, 2460, -5580, 2274, -5580, 2281,
+ 47882, 195, -5580, 16752, 2466, 47882, 3642, 3662, -5580, -5580,
+ -5580, -5580, -5580, -5580, 3675, 3961, -5580, -5580, 2480, 2487,
+ 2492, 3677, 3678, 4884, 6275, 3682, 17227, 3696, 3661, 51746,
+ 51746, 42362, 570, -5580, 51746, 3703, 3852, 2500, 14606, 3639,
+ 3704, 17411, 45674, 47882, 45674, 45674, 17813, 3639, 3705, 2518,
+ 74508, 3847, 18124, 2524, -5580, 47882, 74508, 6288, 47882, -5580,
+ 47882, 3706, -5580, -5580, 5226, 5226, 5226, 7369, -5580, 3712,
+ -5580, 51746, 51746, -5580, 2874, 42362, -5580, -5580, 3977, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, 2376, -5580, 3698, -5580,
+ -5580, 3883, 3499, 66940, 6360, 47882, 304, 47882, 3362, 47882,
+ 3744, 5226, 5226, 5226, 582, 582, 236, 236, 236, 424,
+ 794, -5580, -5580, -5580, 3708, 3709, 3713, 3862, 3718, 47882,
+ -5580, 2519, 2614,103896, 9835, 12180, 12715, -5580, -5580, -5580,
+ 56110, 3710, 1115, -5580, -5580, -5580, 3710, 1074, 3952, 463,
+ -5580, 1638, 2841, 968,134545, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580,103896, 18913, -5580, -5580, 3913, 3720,
+ -5580, -5580, 47882, -5580, -5580, 1583, 3717, 1192, 1054, 1936,
+ 1936, 2635, 1193, -5580, -5580, 3724, -5580, 47882, -5580, 2738,
+ 2747, -5580, -5580, -5580, -5580, 3074, -5580, 3918, -5580, -5580,
+ -5580, 56110, 3711, 3719, 60, 59884, 3890, -5580,103896, -5580,
+ 103896, 324, -5580, 3695, -5580, -5580, -5580, -5580, 959, -5580,
+ -5580, -5580, -5580, -5580, -5580, 3722, -5580, 3721, -5580, 3723,
+ -5580, -5580, -5580, -5580, 226, 3726, 3732, 3738, 2166, -5580,
+ -5580, -5580, -5580, 78788, 2247, -5580, 83068, -5580, 83068, -5580,
+ 2247, 4117, -5580, 78788, -16, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,138770,138770,
+ 3896,103896, 3919, 3923, 47882, 948,103896, 3730, 3734, 1742,
+ 4014,103896, -5580, 4070, 319, -5580, -5580, 3821, -5580, 18913,
+ -5580, -5580, -5580, -5580, -5580,138770,103896, -5580,142046, -5580,
+ 103896, -5580, 82533, -5580, -5580, -5580,103896, 3776,103896, -5580,
+ 103896,103896,103896, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 1298, 82533, -5580, -5580,103896,103896, 166, 3825, 3827,103896,
+ -5580, 1227, 3421, 11613,103896,103896,103896, 4039, -5580, -5580,
+ -5580, -5580, 3974, -5580, 4092, -5580, 78788, -5580, 2986, 694,
+ 3842, 3181, 3981, -5580, 4097, 3968, -5580, 3889, 1132, -5580,
+ -5580, 3898, -5580, -5580, -5580, -5580, 4105, 319, 4108, 319,
+ 103896,103896,103896,103896, 3900, -5580, -5580, -5580, -5580, 3902,
+ 4035, -5580, 74508, 74508, 74508, 2531, -5580, -5580, 1819, -5580,
+ -5580, -5580, -5580, -5580, -5580, 4068, -5580, 2536, -5580, 1332,
+ -5580, -5580, -5580, -5580, -5580, 4113,138770,103896, 11700,103896,
+ 103896,103896, 3987, 2201, -5580, 913, 82533, -5580, 80393, -5580,
+ -5580, 2539, -5580, 3791,103896, 3861,138770, 3841, -5580, -5580,
+ -5580, 4118, 3783, 3783, -5580, -5580, 3783, -5580, -5580, 4045,
+ 3975, -5580, 1072, 3976,138770, 3854, -5580, -5580, -5580, -5580,
+ -5580, 4123, 3879, -5580, -5580, 3880, 2254, 3181, 2309, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 3899, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, 1837, -5580, -5580, 1596,
+ 397, 2268, 3181, -5580, 1984, -5580, 3882, -5580, 3884, -5580,
+ -5580, -5580, 4044, 4049, 4051, 3885, 3891, 3942, 3892, 3894,
+ 3943, -5580, 3901, 3947, 3903, 3953, 3904, 4182, 319, 82533,
+ 4043, 1819, 3950, 4160, 319, -5580, 3906, -5580, 3907, -5580,
+ 2553, 4273, -5580,103896, -5580, 460, 2305, 3181, -5580, 3914,
+ -5580,138770,103896, -5580, -5580, -5580, 47882, 3831, 3832, 3845,
+ 18913, 18913, 47882, -5580, -5580, 18913, 3850, -5580, -5580, -5580,
+ 82533,103896, 4116, -5580, -5580, 1061,103896,103896, -5580, 4119,
+ -5580, -5580, 4125,103896, 4126, -5580, -5580, -5580, -5580, 414,
+ 414, -5580, -5580, 4147, 7329, 3855, 377, -5580, 74508, 63657,
+ 2070, 1715, 471, 1720, -5580,142046,103896,142046, -5580, 830,
+ 3968,103896,103896,103896, 3856, 3864, -5580, -5580, -5580, -5580,
+ 138770, 1431,138770, 2841, -5580, -5580, 3924, -5580,103896, 2373,
+ 2523, 4168, -5580, 3783, -5580, 4299, 3398, 336, 4011, 1930,
+ 3030, 4242, 2592, 392, 74508, 3558, -5580, -5580, -5580, -5580,
+ 103896,103896, 1053, 1819, -5580, 3867, 3887, -5580,103896, 4190,
+ 103896,103896,103896, 95886, 2118, 3905,103896, 3908, 82533,103896,
+ 2594, 3179, 4326, 4219, 2118, 3573, 3962, 4222, 98022, 2559,
+ -5580, 3897, -5580, -5580, 2567, 183, -5580, 1819,142046, 79323,
+ 4210, -5580, 7600, -5580, -5580, 7600, 1027,103896, 4195, -5580,
+ 103896, -5580, -5580, 59345, -5580, 82533, 3910, -5580, 2571, -5580,
+ 2576, -5580, -5580, -5580, 2841, -5580, -5580, 5, 5, 3915,
+ -5580, 60962, -5580, 3911, -5580, 2485, -5580, -5580, -5580, 278,
+ 3944, 319, 3945, 319, -5580, -5580, -5580, -5580,103896, -5580,
+ 103896,137834, 319, -5580, -5580,103896, -5580, 4229, 4217, -5580,
+ -5580, -5580, -5580, 4029, 4033, 4034, 4038, 4041,103896, 3590,
+ -5580, 3909,138770, 1847, -5580, -5580, 4120, -5580, -5580, 98022,
+ 4040, -5580, -5580, -5580, -5580, 4258, 4259, -5580, -5580, -5580,
+ 1201, -5580,103896,103896,138770, 90012, 310,138770, -5580, 4196,
+ 4197, -5580, -5580, 4198, 355, -5580, 4199, 4200, 4201, -5580,
+ 4202, 4203, -5580, -5580, -5580, 3932, 18298, 47882, -5580, 4268,
+ 82533, -5580, 7987, -5580, -5580, -5580, 47882, -5580, -5580, -5580,
+ -5580, -5580, -5580, 2537, 47882, -5580, 47882, 4251, -5580, 40176,
+ 4405, 4405, 3931, 82533, 51746, 51746, 51746, 51746, 1780, 3047,
+ 51746, 51746, 51746, 51746, 51746, 51746, 51746, 51746, 51746, 52850,
+ 620, -5580, 4134, 47882, 47882, 4270, 4251, -5580, 82533, 3951,
+ 3639, 3954, 3955, 47882, -5580, -5580, 2581, 53941, 3956, 74508,
+ -5580, 47882, 16179, 2587, 3993, 18840, 2027, 9112, 1819, 47882,
+ 2659, 2891, 47882, 2590, 47882, 4269, -5580, -5580, -5580, -5580,
+ 3959, -5580, -5580, 4175, 82533, -5580, 47882, 3960, 4209, 51746,
+ 51746, 4701, -5580, 5507, 47882, 42362, -5580, 3672, 3994, 62579,
+ -5580, 40729, 3957, 1442, 1442, 1442, 1442, -5580,103896,103896,
+ 103896, 56649, 4282, 3963, 55571,102828, 3964, 2394, -5580,102828,
+ 103362,102828, -5580, 3967, -5580, 2027, 47882, 4275, 3965, 4275,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, 3979, -5580, 3985, -5580, -5580,
+ 160, 3969, -5580, -5580, 226, -5580, -5580, 2118, -5580, 3978,
+ -5580, 3717, 1642, -5580, -5580, -5580, 1339, -5580, 4060, -5580,
+ -5580, -5580, 3964, 46226, 4115, -5580, -5580, -5580, 4030, 2603,
+ -5580, -5580, 4382, 4115, -5580, -5580, 2604, 62040, 3711, 47882,
+ 2027, 2841, 3996, -5580, 2757, 1074, -5580, -5580, -5580, -5580,
+ -5580, 2617, 2251, -5580, -5580, 78788, -5580, 4053, 2986, 2986,
+ 2245, 3590, 4311, 2245, 9159, -5580, -5580, 57188,103896,103896,
+ -5580,103896, 2620, 271,103896, -5580,103896, -5580, -5580, -5580,
+ -5580, 4436, -5580,103896, -5580, -5580, 4047, 4048,103896,103896,
+ 103896,103896, 4257, -5580, -5580, 2862, -5580, -5580,138770,103896,
+ -5580, -5580, -5580, 470, 2391, 3181, -5580, 4074, -5580, -5580,
+ 4274,103896, -5580, 4426, 4085,103896, 4335,103896, 3998, -5580,
+ 271, 4104, 4317, 1920, 3179, 1870, 4586, -5580, 2061, -5580,
+ -5580, 4072, -5580,103896, -5580,103896, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, 4135, -5580, -5580, -5580, -5580, 75043, -5580,
+ -5580,103896, -5580, 74508, 63657, 74508,103896, -5580, 1701, 472,
+ 2464, 3181, -5580, 4087, -5580, 4340, 4088, 4090, 4145, 1252,
+ 1461, 4093, 4094, 4146, 4017, 4019, 4020, -5580, 74508, 64205,
+ 4176,103896, 2986, 4023, 4063,103896, 221, 1819, -5580, -5580,
+ 1819, 2986, 1819,103896,103896,103896,103896, 221, 74508, -5580,
+ 4463, 4122,103896,103896,103896,103896, -5580, 4084, -5580,103896,
+ 103896, 4360, 231, 2430,138770,103896,103896,138770,103896,103896,
+ 103896,103896,103896,103896,103896, 4245, -5580, 4450, 4377, 2321,
+ 4419, 4111,103896, -5580,103896, 1819, -5580, 3421,103896,103896,
+ 103896,103896, -5580, -5580, -5580, -5580, -5580, 3672, -5580, 4054,
+ 4320, 1061, -5580, 4327, 4328, 1061, 1061, 4330, 1061, -5580,
+ -5580, 1720, -5580, 320,103896, -5580, 2662,103896, -5580, -5580,
+ -5580, 3978, 1936, 1936, -5580, -5580, -5580, -5580, -5580, -5580,
+ 103896, 4057,103896,103896, 51746, -5580, 1775, 1921, 1451, -5580,
+ 4331,103896, 3327, -5580, -5580, -5580, 215,103896, -5580, -5580,
+ -5580, -5580, -5580, 1307, 3905, -5580, 4347, 85740, 2986,138770,
+ 138770, 2986, -5580, 82533, 4062, 3558, -5580, 403, 4140,138770,
+ 336, 1111,125256, 3344, 4096, 4278, 56110, 1837, -5580, 4064,
+ 4224, -5580, 4065, 4069, -5580, -5580,103896, 3968,137834, 2621,
+ 2309, 4522, 1167, 2370, 3649, 87342, 4262, 3905, 4347, -5580,
+ 3179, 4285, 4284, -5580, 2118,103896, 3649, 3558, 1819,103896,
+ 3471, -5580, 2523, 63657, -5580, 78788, 47882, 47882, -5580, 4075,
+ -5580, 4079, 7600, -5580, 4152, 4080, -5580, -5580, -5580, -5580,
+ -5580, 4165, 4089,103896, 4564, -5580, -5580, 4091, 3881, -5580,
+ 3881, -5580, 4098, -5580, -5580, -5580, 2243,131655, 60962, 60962,
+ 60962, 60962, 60962, -5580, -5580,103896, -5580,103896, -5580, 319,
+ -5580, 4214, -5580, 319,103896, 2118,103896,103896,103896,103896,
+ 103896, 3590, 355, -5580, 4409,138302, -5580, -5580, 2631,103896,
+ -5580, -5580, -5580, 4470, -5580, -5580, 158, 4416, -5580, -5580,
+ 1090, 1090, 1090, 4373, 1090, 1090, 1090, 1090, 1090, -5580,
+ 47882, 18913, -5580, 4099, -5580, 18913, 4101, 9651, 18913, 4270,
+ -5580, 2634, 47882, -5580, 2099, 2099, 2099, 4056, 4423, -5580,
+ 1632, 4107, 2099, 2099, 2099, 502, 502, 214, 214, 214,
+ 4405, 620, 18913, 18913, -5580, -5580, 4103, -5580, -5580, -5580,
+ 3639, -5580, 48986, 76, 4536, 53402, -5580, -5580, -5580, 4148,
+ 4149, 4110, -5580, 47882, 49538, 4112, 83603, 4309, -5580, 2059,
+ 47882, 47882, 2755, -5580, 8143, 47882, 82533, -5580, 2637, 2755,
+ 371, 47882, 3640, 3948, 47882, 47882, 5875, 10031, 4121, 47882,
+ 129528, -5580, -5580, -5580, 2640, 47882,103896,103896,103896,103896,
+ -5580, -5580, -5580,102828,103362,102828, 4127, 54480, 58805, 2394,
+ 4124,103896, -5580, -5580, 4128, 56110, 4388, 4316, -5580, 56110,
+ 4316, 1777, 4316, 4391, 4211, 63118, -5580, -5580, 4129, -5580,
+ 4324, -5580, 1692, 18913, 4557, 4437, 1819, 4437, 1074, 302,
+ 1819, -5580, 4131, 66940, -5580, -5580, -5580, -5580, 4216, -5580,
+ 4348, 18913, 44018, -5580, 2118, 2456,103896, 2027, 844, -5580,
+ 4151,103896, -5580, 4115, 18913, -5580, 10204, -5580, -5580, -5580,
+ -5580, 4204, 2655, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 4221, 88410, 4462, -5580, 47882, 2656, -5580, 4180, 4556, 155,
+ 2668, 2669, 271, -5580, 4442, -5580, 2025, 4439, 437, -5580,
+ 319, -5580, 82533, -5580,103896,103896, -5580, -5580, -5580, -5580,
+ 103896, 3113, -5580, -5580,103896,103896,103896,103896, -5580, -5580,
+ 138770,103896, -5580,103896, -5580, 74508, 1715, 221, 1775, 4452,
+ 4454, 4371, -5580, 355, -5580, 1775, 4376, 221,103896, -5580,
+ -5580, 2960, -5580, 82533, 319, 319, -5580, -5580, -5580, -5580,
+ -5580, 4166, -5580, 4590, 4249,103896,103896,103896,103896,103896,
+ 138770,103896,103896, 2841, 2841, 82533, 4158, -5580, 2841, 2841,
+ 4159, -5580,138770,103896,103896, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, 4247, -5580, 47882, 4581,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580,138770,103896, 4250, -5580, 4255, -5580, 997, -5580,
+ -5580,103896,103896,103896,103896, 4507, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, 4506,103896, -5580,
+ -5580, 1819, 1819, 82533, 319, 319, -5580, -5580, -5580, 4256,
+ -5580, -5580, 4178, 4455, 1061, -5580, 1061, 1061, -5580, -5580,
+ 1061, -5580, 4184, -5580, 1720, 4553, -5580, 271, 2270, 4510,
+ -5580, 4514, 47882, -5580, 1148, 4056, -5580, 4567, 4645, -5580,
+ -5580, -5580, -5580, 3327, 2373, 4266, -5580, -5580, 76113, 911,
+ -5580, 4508, 205, 4424, 85740, 1984, 2135, 4213, 4339, -5580,
+ 2986, 2986, 4279,103896, 4667, -5580, -5580, -5580, -5580, -5580,
+ -5580,138770, 3841, -5580, 4445, 1293, 4547,103896, 47882, 3964,
+ -5580, 2231, 4552, -5580, 1819, -5580, -5580, 4353, 3558, -5580,
+ 4569,103896, 4444, 85740, 3649, -5580, 2674, -5580, -5580, -5580,
+ 4271, 4666, 3573, -5580, 1984, 4262, -5580, -5580, 4642, 4329,
+ 4276, 4686, -5580, 4329, 4558, 4449, 4244, -5580, 3897, -5580,
+ -5580, 18913, 18913, 1819, 84138, 7600, 82533, 4568,103896, 720,
+ 4529,103896, -5580, 319, 2675, -5580, -5580, -5580, 4246, 2340,
+ 2340, -5580, -5580, -5580, 319, 319, -5580,103896, -5580, 3590,
+ 3590, 3590, 3590, 3590, -5580, 4451, -5580, -5580, 4521, -5580,
+ 319,138302, -5580, -5580, -5580, -5580, -5580, 1090, -5580, -5580,
+ -5580, -5580, -5580, 18913, -5580, -5580, -5580, -5580, -5580, 10539,
+ 51746, 4571, -5580, 4248, 82533, -5580, 4260, 2678, 2688, -5580,
+ -5580, 76, -5580, 4536, -5580, -5580, -5580, 10638, 4300, 18913,
+ 4363, 4261, 4264, 2755, 2755, 8143, 2692, -5580, 2755, 47882,
+ 47882, 2755, 2755, 47882, -5580, -5580, 10713, 4446, -5580, -5580,
+ 11052, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 75578, 4263,
+ 3847,102828, 4267,103896, 2394, 56110, -5580, -5580, 1202, -5580,
+ 56110, 4527, -5580, 56110, 76113, -5580,103896, 4272,103896, -5580,
+ 50090, 47882, 4297, -5580, 4297, -5580, 1936, -5580, -5580, -5580,
+ -5580, -5580, -5580, 4265, -5580, 95886, 873, -5580, 60, -5580,
+ -5580, 4661, 57188, 4626, 47882, -5580, -5580, -5580, -5580, -5580,
+ 138302, 4481,138302, 271, 11287, 4442, 57188, 68034,103896, -5580,
+ 103896, -5580, 4434, 4442, 4280, 3327, -5580, -5580, -5580, -5580,
+ -5580, -5580, 4277, -5580, -5580, -5580, -5580, 4356, -5580, -5580,
+ 39, 3553, -5580, 2695, -5580, -5580, 4728, 4619, 4620, -5580,
+ -5580, -5580, -5580, -5580, -5580, 4450, -5580, -5580, 63657,138770,
+ 103896, -5580, 4364, -5580, -5580, -5580, -5580, -5580, -5580, 58266,
+ 66940, -5580, 1252, 4283, 4287, 1461, -5580, -5580, -5580,103896,
+ 11338, 4288, 673, 3553,103896,103896, 4290, 4291, 4292, 2069,
+ 1712, 2151, 3590, 4621,103896, -5580, -5580, -5580, 4450, -5580,
+ -5580,103896, -5580, 1061, -5580, -5580, -5580, -5580, 74508, -5580,
+ 2053, 4184, 1819, 76113, 4744, 4744,103896, -5580, 11905, 4515,
+ -5580, -5580, 767, 4266, 4545, 4591, -5580, 4301,103896, 215,
+ 4305,103896, 4306, 4432, 1756, 1756,103896,103896,103896, 2696,
+ 2118, 2986, 4063, 336, 4638, 85740, 4688, 3968, 409, -5580,
+ -5580, 2231, -5580, 90, 4663, 4355, -5580,103896, 4761, 95886,
+ 2118, 3905,103896, 4314, 1228, -5580, 87342, 4520, 1715,103896,
+ 2594, 4262, 3573, 1424,103896, -5580, 1655, -5580, 2118, -5580,
+ 103896, 98022, 57188, -5580, 83068, -5580, 2702, -5580, -5580, 4387,
+ 3710, 4428, 4429, 4322,103896, 121, -5580, 4332, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580,103896, -5580, 310, -5580, -5580,
+ 4342, 51746, 82533, 2708, 47882, -5580, 47882, -5580, -5580, -5580,
+ -5580, 661, -5580, -5580, -5580, 2755, 2755, 2755, -5580, 4756,
+ 3672, -5580, -5580, 2711, 4775, 51194, 4737, -5580,103896, 2716,
+ -5580, 47882, 4343, -5580, -5580, 56110, 1202, 4346, 2725,103896,
+ 2728, 82533, 4349, 30, 4350, 39070, 4336, -5580, -5580, -5580,
+ -5580, -5580, 18913, 18913,103896, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, 4393,103896, 2739, -5580, 688, 18913, 1847, 2245,
+ 310, 4556, 3327, -5580, 4351, -5580, -5580, 3179, 384,103896,
+ 3327,103896, 4266, -5580,103896, 4441, -5580, -5580, 74508, 4643,
+ -5580, -5580, 4410, -5580, 1378, 3553,103896, 82533, -5580, 140,
+ 4678, -5580, 82533, 82533, -5580, -5580, -5580, 47882, 4447, -5580,
+ -5580, -5580, 47882, 47882,142982, -5580, -5580,103896,103896,103896,
+ 103896,103896, -5580, 319, -5580, -5580, 2740, -5580,132654, -5580,
+ -5580, 3396, 1819, 3396, 2019, -5580, -5580, 3396, 3396, -5580,
+ 3710, -5580, 4744, 353, -5580, -5580, -5580, 2055, 4582, 4357,
+ 47882, -5580, 1264, 4573, 4458, 4359, -5580, 76113, 4841, 3905,
+ 4347,103896, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, 2751, 3968, 4697, 3558, 4276, -5580,103896,
+ 4403, -5580, 56110, -5580, -5580, -5580, 3396, -5580, 2120, 4375,
+ 4710, 3968, 2118, 2370, 3649, 4262, 3905, 4347, -5580, -5580,
+ -5580, 4378, 4284, 3573, 2594, 4513, -5580, 4516, -5580, 4791,
+ 4587, 4799, 3649, -5580, 3471, 2754, -5580, 7600, 84138, 82533,
+ 4740, 4421, 4422, -5580, -5580, 4438,103896, -5580, -5580, 2697,
+ 4863, 3968, -5580, 4342, 2767, -5580, 2768, 2777, 4440, -5580,
+ 47882, 1651, 3967, 75578, 4392, -5580, 51746, 2782, -5580, 3659,
+ 103896, 2783, -5580, 18913,103896, -5580, -5580, 47882, -5580, 2788,
+ -5580, 47882, 4394, 47882, -5580, 50090, 4385, -5580, 4840, 2118,
+ -5580, 3710, 57188, -5580, 4517, -5580, 4715, -5580, -5580, 4266,
+ 66940, 384, 3717, 2373, 4266, 2793, -5580, -5580,103896, -5580,
+ 4357, 47882, -5580, 4487, -5580, -5580, 2794, 1668, 4562, 4562,
+ 2797, 2798, 12475,103896, 2805, 2809, -5580, 2814, 2841, 3591,
+ 2151, 3591, -5580, 3590, -5580, -5580, 74508, -5580,136430, -5580,
+ -5580, -5580, 1819, -5580, 1819, 4624,103896, 70190, 1819, 1819,
+ -5580, -5580, -5580, -5580, 4754, 4699, -5580, 2309, -5580, 12538,
+ -5580, -5580, -5580, 498, -5580, 4615, 4618,103896, -5580, 4412,
+ -5580, 2815, 1984, 4537, 3968, -5580, -5580,103896, 4867, 4868,
+ -5580, 1409,103896, 3964,103896, -5580, -5580, -5580, 47882, 215,
+ -5580, 4276, 3649, -5580, 3573, 1984, 4262, 1715, 57727, 4329,
+ 2594, 4284, -5580, -5580, 4625, -5580, 4627, -5580, 4414, 4716,
+ 7600, -5580, -5580, 1083, 4741, 4742, -5580, -5580, -5580, -5580,
+ -5580,103896, -5580, -5580, -5580, -5580, -5580, 3639, 46778, 46778,
+ 46778, 4425, -5580, -5580,103896, 4056, 4427, 51194, 74508, 2818,
+ -5580, 80928, -5580, 2821, 2822, -5580, 2827, 50090, 2831, -5580,
+ 103896, 4431, -5580, -5580, -5580, 62040,138302, 4465, 4433, 3717,
+ -5580, 4545, -5580, -5580, 271, 3553, -5580, 18913,103896, 76113,
+ 4858, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 3553, 4509,
+ -5580, -5580,142982, -5580,103896, -5580, -5580, 2834, -5580, -5580,
+ -5580,103896, 4064, -5580, 4064, -5580, -5580, 4566, -5580, 1755,
+ 4534, 1360, 1360, 4803, -5580, 4496, -5580, -5580, 4443, -5580,
+ 4919, 4565,103896, -5580, -5580, 1252, 2118, 85740, 3968, -5580,
+ -5580, 12603, 76113, -5580, 1228, 2594, 4262, 3573, 47882, 2835,
+ -5580, 4556, 155, -5580, 4284, 4329, -5580, -5580, 57188, 4448,
+ 3558, -5580, -5580, 1992, 76113, 76113, -5580, 50642, 4584, 1165,
+ 16423, 4785, -5580, 4785, 4785, -5580, 2839, 53402, -5580, -5580,
+ -5580,103896, 4650, 1476, -5580, 4603, -5580, 2842, -5580, -5580,
+ -5580, 1774, 310, 4453, -5580, -5580, -5580, 4573, 271, -5580,
+ 3553, -5580,103896, -5580, 4456, -5580, -5580, -5580,136430, 4064,
+ 4355, -5580, -5580, -5580, 4914, -5580, 1246, -5580, -5580, -5580,
+ -5580,103896, 3968, 4158, 4276, -5580, -5580, 4457, -5580, 4284,
+ 3573, 2594, 12917, -5580, 57727,103896,103896, 4329, -5580, 2843,
+ 57188, 4329, -5580, 2942, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, 4459, 4460, 4904, -5580, -5580, -5580, -5580, -5580, 1079,
+ -5580, -5580, -5580, -5580, 3847, -5580, -5580, 51746, 4672, -5580,
+ 1476, -5580, 51746, 4461, -5580, -5580, -5580, -5580, 47882, 271,
+ -5580, -5580, -5580, 47882, -5580, 4804, -5580, -5580, -5580, 3968,
+ -5580, -5580, 73973, 4329, 2594, 4284, 4556, -5580, -5580, -5580,
+ -5580, -5580, 4716, -5580, 2846, 3710, 1877, -5580, -5580, 1976,
+ 2613, 4540, 4786, 47330, 4605, -5580, 4668, -5580, 4878, 4056,
+ -5580, -5580, 4056, 47882, 14045, 271, 2854, 215, -5580, 2860,
+ -5580, -5580, -5580, -5580, -5580, -5580, 4284, 4329,103896, 3558,
+ -5580, 57188, -5580, -5580, 2942, 4583, 4585, -5580, -5580, -5580,
+ 103896, 14131, -5580, -5580, 76113, -5580, 73973, 4329, -5580, -5580,
+ 4329, -5580, -5580, 4511, 4519, 2870, -5580, 4471, -5580, -5580,
+ 3710, 4794, 4795, -5580, 73973, -5580, 76113, 76113, 2871, -5580,
+ -5580, -5580
+};
+
+ /* 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_uint16 yydefact[] =
+{
+ 2759, 0, 2, 1, 3185, 3189, 3193, 3194, 3116, 3195,
+ 3196, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169,
+ 3170, 3171, 3172, 3174, 3173, 3175, 3176, 3177, 3178, 3179,
+ 3180, 3181, 3182, 3184, 3183, 3134, 2766, 3133, 3130, 3131,
+ 2308, 3198, 3186, 3199, 3187, 3188, 3190, 3191, 3160, 3192,
+ 3200, 3201, 3202, 3197, 3205, 3156, 3157, 3155, 3158, 3159,
+ 3203, 3204, 3147, 3148, 3149, 3150, 3206, 2767, 2768, 3152,
+ 2760, 2764, 2828, 2899, 3153, 3154, 3151, 2765, 3146, 2899,
+ 0, 3021, 3022, 0, 3023, 3024, 3025, 2951, 2913, 3026,
+ 0, 0, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034,
+ 0, 3035, 3036, 3037, 3038, 2898, 3039, 3040, 3041, 3042,
+ 2875, 2881, 3004, 0, 2855, 2856, 2852, 2854, 2853, 2857,
+ 2840, 1468, 637, 1554, 1553, 0, 2661, 1468, 2613, 2614,
+ 2662, 2615, 2616, 0, 2617, 273, 0, 1564, 2618, 2663,
+ 0, 1468, 2664, 432, 1140, 2665, 2666, 2783, 0, 2619,
+ 2620, 0, 0, 0, 637, 1468, 0, 0, 2621, 1700,
+ 2622, 0, 2623, 2667, 2668, 0, 2624, 2625, 2669, 0,
+ 2670, 2626, 2627, 2628, 2671, 2672, 2673, 2629, 2674, 2675,
+ 0, 0, 1714, 0, 2630, 2676, 2631, 2632, 2633, 0,
+ 2677, 2634, 2635, 2636, 2678, 2679, 2637, 2638, 2639, 0,
+ 2640, 0, 0, 0, 0, 0, 0, 2680, 1468, 2641,
+ 0, 0, 1721, 0, 2642, 0, 2681, 2643, 0, 2644,
+ 0, 2682, 2645, 2646, 2647, 2648, 1714, 3000, 2876, 0,
+ 1566, 0, 2649, 2683, 0, 2650, 2651, 2652, 2653, 2654,
+ 2655, 2656, 2657, 2658, 2659, 2660, 0, 0, 0, 37,
+ 72, 73, 30, 29, 91, 55, 16, 63, 125, 124,
+ 126, 42, 38, 80, 25, 27, 39, 43, 65, 67,
+ 32, 56, 103, 64, 23, 62, 86, 68, 89, 50,
+ 10, 11, 51, 12, 52, 13, 53, 14, 99, 74,
+ 92, 35, 61, 22, 44, 70, 71, 3, 46, 78,
+ 9, 57, 58, 60, 83, 84, 85, 108, 87, 120,
+ 41, 117, 96, 97, 114, 98, 115, 7, 100, 54,
+ 15, 111, 110, 112, 81, 47, 82, 69, 90, 109,
+ 26, 113, 17, 18, 20, 21, 19, 59, 28, 66,
+ 31, 88, 116, 106, 102, 121, 119, 127, 104, 75,
+ 5, 6, 93, 4, 24, 49, 8, 34, 33, 48,
+ 40, 123, 36, 1564, 95, 107, 94, 101, 79, 105,
+ 122, 77, 118, 1682, 1669, 1723, 1681, 1699, 0, 1685,
+ 3095, 3096, 45, 1700, 129, 130, 135, 2763, 2817, 2818,
+ 2819, 2899, 2850, 2851, 2844, 2860, 2870, 2859, 2863, 2871,
+ 2858, 2877, 0, 132, 134, 136, 139, 133, 128, 131,
+ 138, 143, 137, 142, 140, 141, 144, 145, 146, 3097,
+ 1950, 3094, 76, 2835, 2834, 0, 2899, 0, 3127, 2323,
+ 2324, 2325, 2326, 2327, 2328, 2329, 2330, 2331, 2332, 2333,
+ 2334, 2335, 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, 2315, 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, 2467, 2468, 2469, 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, 2501, 2499, 2500, 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, 2532,
+ 2533, 2534, 2535, 2536, 2537, 2538, 2539, 2540, 2541, 2542,
+ 2543, 2544, 2545, 2546, 2547, 2316, 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, 2783, 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, 2608, 2609, 2610,
+ 2611, 2612, 2801, 2313, 2314, 2320, 2321, 2322, 2776, 2797,
+ 2803, 3123, 2802, 2319, 2950, 0, 0, 3043, 3044, 3045,
+ 3046, 3047, 3048, 3098, 3099, 3100, 3101, 3102, 3104, 3103,
+ 2912, 3070, 3107, 2911, 3108, 2915, 3109, 3110, 3111, 3112,
+ 3071, 3113, 2914, 3105, 3067, 2916, 2909, 2910, 3068, 3019,
+ 3020, 2286, 3069, 3066, 3106, 2804, 3065, 2920, 2919, 1659,
+ 3122, 2285, 1660, 0, 2922, 3049, 3050, 3051, 3052, 3054,
+ 3053, 3055, 2684, 2685, 2686, 2687, 2688, 2689, 2690, 2691,
+ 2692, 2693, 2694, 2695, 3080, 2696, 2697, 2698, 3093, 2699,
+ 2700, 3081, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708,
+ 2709, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718,
+ 2719, 2720, 2721, 2722, 2723, 2724, 3082, 3083, 2725, 2726,
+ 2727, 2728, 2729, 2730, 2731, 2732, 2733, 2734, 2735, 2736,
+ 2737, 2738, 2739, 2740, 2741, 2742, 2743, 2744, 2745, 2746,
+ 2747, 2748, 3084, 2749, 2750, 3085, 2751, 2752, 2753, 3086,
+ 2754, 2755, 2756, 2757, 2758, 3090, 3091, 3092, 3079, 2873,
+ 3056, 3078, 3089, 3087, 3088, 2883, 2879, 2887, 2882, 0,
+ 0, 0, 0, 2899, 1467, 1466, 1481, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 636, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2773, 0, 1478, 148, 0, 3074, 3068,
+ 3077, 0, 2291, 3069, 3066, 3065, 404, 403, 1563, 1543,
+ 637, 0, 1481, 431, 1700, 0, 0, 0, 0, 0,
+ 0, 0, 870, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 196, 0, 0, 0, 0,
+ 455, 454, 0, 0, 0, 1106, 460, 0, 0, 0,
+ 0, 0, 625, 2782, 2777, 2787, 0, 2780, 2781, 3065,
+ 0, 3209, 2499, 2813, 2814, 3207, 2559, 1661, 274, 277,
+ 278, 275, 276, 0, 1242, 1243, 1245, 0, 0, 1255,
+ 910, 911, 0, 0, 0, 919, 0, 0, 0, 908,
+ 0, 0, 0, 924, 0, 921, 0, 0, 925, 922,
+ 905, 923, 912, 0, 904, 0, 0, 1255, 926, 0,
+ 0, 906, 0, 0, 0, 0, 1481, 0, 2865, 2866,
+ 2423, 1609, 461, 0, 0, 1700, 0, 1586, 1587, 1564,
+ 1576, 1588, 1581, 1583, 1582, 1584, 1580, 1585, 2324, 1041,
+ 2339, 1041, 2411, 1038, 1039, 1041, 1041, 1041, 2519, 0,
+ 0, 1013, 0, 1024, 2309, 1041, 2310, 3123, 1046, 524,
+ 524, 524, 0, 1045, 1050, 524, 0, 1449, 1490, 2290,
+ 1713, 0, 2339, 2411, 1014, 1448, 2578, 1600, 0, 0,
+ 1270, 1266, 1268, 1269, 1267, 0, 1109, 1109, 2537, 1460,
+ 258, 3063, 2547, 2645, 2578, 3064, 257, 252, 253, 3058,
+ 3059, 3061, 226, 3062, 3060, 3057, 2328, 0, 0, 1045,
+ 0, 1481, 1458, 996, 1720, 1718, 0, 2272, 0, 0,
+ 2348, 0, 2362, 2449, 249, 2530, 2538, 2547, 2645, 2578,
+ 2610, 205, 215, 210, 0, 267, 2547, 2645, 2578, 0,
+ 1478, 0, 1686, 1824, 2281, 0, 0, 2874, 1451, 1450,
+ 1565, 0, 1568, 0, 2514, 1690, 1693, 1570, 1691, 1682,
+ 0, 0, 2762, 0, 1575, 1717, 1717, 0, 1717, 0,
+ 1674, 1682, 1677, 1681, 0, 0, 0, 0, 1468, 0,
+ 2842, 2870, 2849, 2905, 2846, 0, 0, 2895, 2891, 2888,
+ 2896, 2897, 2890, 2878, 1939, 1940, 1941, 1938, 1951, 1937,
+ 0, 2823, 1942, 2862, 2829, 0, 2837, 2836, 3135, 3136,
+ 2952, 2775, 2794, 0, 0, 0, 0, 0, 0, 0,
+ 2921, 2923, 2925, 2885, 2884, 2880, 0, 0, 0, 3010,
+ 3011, 0, 3009, 0, 3006, 3008, 0, 2905, 0, 1452,
+ 0, 0, 0, 929, 0, 1493, 1091, 0, 0, 0,
+ 0, 0, 1342, 0, 1148, 1149, 0, 2313, 0, 2422,
+ 1342, 0, 0, 2179, 2190, 2191, 2192, 2352, 2406, 2187,
+ 2188, 2189, 2181, 2182, 2183, 2184, 2185, 2186, 0, 0,
+ 1237, 2180, 0, 2422, 0, 1342, 0, 175, 0, 152,
+ 1342, 0, 0, 2422, 0, 0, 2422, 0, 0, 0,
+ 0, 0, 2422, 0, 0, 0, 0, 0, 175, 2454,
+ 0, 152, 2422, 0, 0, 0, 1472, 0, 0, 0,
+ 1474, 1477, 1453, 0, 2264, 0, 2265, 2292, 1546, 0,
+ 2281, 0, 0, 0, 965, 958, 0, 966, 973, 0,
+ 0, 975, 0, 0, 959, 0, 0, 0, 0, 0,
+ 978, 979, 0, 0, 980, 960, 981, 961, 982, 962,
+ 983, 0, 0, 0, 0, 963, 0, 0, 0, 1464,
+ 1455, 0, 1602, 1604, 1603, 1601, 524, 0, 0, 0,
+ 2422, 0, 0, 152, 1531, 0, 2422, 152, 0, 0,
+ 459, 458, 152, 457, 456, 2352, 2406, 0, 1139, 0,
+ 1407, 152, 2422, 0, 198, 2422, 711, 2422, 1570, 0,
+ 640, 0, 0, 825, 2454, 152, 0, 0, 0, 0,
+ 0, 0, 1109, 0, 0, 0, 0, 0, 624, 637,
+ 0, 2786, 2792, 0, 2784, 2953, 3210, 3208, 2908, 0,
+ 1246, 250, 251, 1244, 917, 2422, 1181, 365, 0, 0,
+ 2422, 152, 1899, 1928, 1906, 1928, 1928, 1895, 1895, 2389,
+ 1908, 2422, 1896, 1897, 1933, 0, 1928, 1895, 1900, 0,
+ 1898, 1936, 1936, 1923, 365, 933, 1880, 1881, 1882, 1883,
+ 1909, 1910, 1884, 1915, 1916, 1920, 1885, 1950, 3075, 1895,
+ 3076, 3073, 3072, 918, 0, 909, 2422, 365, 1145, 2422,
+ 2317, 185, 0, 907, 2352, 2406, 2422, 365, 1239, 0,
+ 2422, 365, 2422, 181, 2422, 365, 2422, 365, 2422, 641,
+ 0, 0, 2422, 365, 2422, 2454, 183, 0, 2422, 365,
+ 927, 2422, 365, 2283, 2422, 0, 1456, 0, 0, 3140,
+ 3144, 0, 3142, 3137, 2864, 2918, 2917, 2816, 0, 3221,
+ 0, 1661, 1578, 1593, 0, 1589, 1596, 1592, 1700, 1041,
+ 1040, 0, 1041, 0, 3231, 1041, 0, 1041, 0, 3231,
+ 1041, 0, 0, 0, 1041, 2311, 2312, 0, 0, 3230,
+ 3226, 3229, 1015, 1025, 0, 1047, 0, 0, 1054, 1053,
+ 1052, 0, 0, 0, 1055, 0, 1828, 1636, 0, 1022,
+ 0, 1020, 0, 1446, 1463, 0, 0, 0, 0, 1109,
+ 1273, 0, 1271, 1108, 0, 0, 1459, 256, 254, 0,
+ 0, 0, 0, 0, 0, 1465, 0, 1457, 0, 0,
+ 0, 3129, 3132, 2193, 3128, 0, 2614, 2615, 2616, 2256,
+ 0, 3070, 2617, 2618, 2663, 2085, 2072, 2081, 2086, 2073,
+ 2075, 2082, 2619, 2620, 2020, 2621, 2622, 2304, 2623, 2624,
+ 2625, 2627, 2628, 2629, 2077, 2079, 2630, 2631, 2633, 0,
+ 2305, 2634, 2635, 2481, 2637, 2638, 2640, 2641, 2083, 2643,
+ 2644, 2645, 2646, 2647, 2648, 2303, 0, 2084, 2649, 2651,
+ 2652, 2653, 2654, 2656, 2657, 2658, 2659, 0, 0, 0,
+ 2278, 0, 2052, 0, 1888, 1889, 1911, 1912, 1890, 1917,
+ 1918, 1891, 0, 2277, 1953, 2138, 2051, 2068, 0, 2057,
+ 2058, 0, 2050, 2046, 1703, 2273, 0, 2047, 2293, 2257,
+ 2307, 2306, 3123, 2267, 2296, 2294, 2295, 2297, 1703, 2271,
+ 0, 0, 0, 218, 0, 0, 2999, 269, 0, 270,
+ 2279, 2547, 206, 248, 220, 247, 221, 219, 0, 2350,
+ 207, 0, 0, 208, 0, 0, 0, 0, 0, 0,
+ 0, 263, 1454, 0, 1826, 1825, 2282, 938, 0, 0,
+ 1557, 1551, 1560, 1556, 1567, 1564, 2203, 0, 1692, 0,
+ 0, 0, 1672, 1671, 0, 1572, 1574, 1549, 1570, 1715,
+ 1716, 0, 0, 0, 0, 0, 0, 0, 0, 1773,
+ 1731, 1732, 1734, 1770, 1774, 1782, 0, 1678, 0, 0,
+ 1830, 0, 0, 2761, 2905, 2906, 0, 2900, 0, 2899,
+ 2899, 2893, 2892, 2889, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2820, 619, 2822, 616, 0, 0, 2796, 0,
+ 2800, 2798, 0, 2945, 2948, 0, 2946, 2947, 2949, 0,
+ 2954, 2955, 0, 0, 0, 0, 0, 2936, 2924, 2931,
+ 2933, 2935, 2934, 2943, 2939, 2942, 2944, 2886, 2899, 0,
+ 3012, 3018, 3015, 2364, 0, 3007, 0, 1479, 0, 0,
+ 0, 0, 0, 1180, 0, 0, 0, 0, 0, 930,
+ 0, 0, 0, 0, 1501, 1502, 1503, 0, 0, 1504,
+ 1505, 1493, 260, 1511, 1509, 1492, 1494, 1507, 1499, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 189, 190,
+ 0, 653, 637, 0, 2422, 0, 0, 0, 0, 1188,
+ 1195, 1341, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1189, 1187, 0, 1190, 262, 1200, 1219, 1222, 0, 0,
+ 1147, 1150, 0, 0, 0, 0, 0, 1332, 0, 0,
+ 0, 1332, 0, 0, 0, 1341, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 285, 287, 298, 360, 0,
+ 0, 0, 2422, 1342, 0, 0, 0, 1241, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1222, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 150, 151, 156, 0,
+ 0, 0, 0, 1222, 0, 0, 0, 0, 0, 0,
+ 0, 602, 615, 0, 0, 0, 0, 0, 612, 0,
+ 0, 152, 290, 592, 598, 0, 0, 0, 718, 717,
+ 0, 0, 0, 0, 0, 1423, 1422, 0, 0, 0,
+ 0, 1521, 1520, 0, 0, 0, 0, 0, 0, 1332,
+ 0, 279, 281, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 396, 397,
+ 0, 0, 0, 156, 0, 0, 1332, 0, 292, 0,
+ 2830, 0, 1473, 1470, 1471, 0, 1476, 0, 0, 0,
+ 0, 2060, 0, 2207, 1723, 2205, 1165, 2263, 0, 2260,
+ 2259, 2288, 2266, 0, 1542, 0, 972, 0, 0, 0,
+ 0, 974, 0, 967, 0, 0, 964, 2352, 2406, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 977, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 833,
+ 0, 1493, 1530, 0, 0, 0, 646, 0, 2422, 0,
+ 154, 871, 0, 823, 460, 0, 0, 0, 1212, 1406,
+ 154, 0, 0, 192, 0, 0, 715, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 762, 761, 0, 0,
+ 0, 824, 0, 0, 154, 0, 2422, 595, 2422, 0,
+ 524, 524, 0, 0, 1111, 0, 0, 0, 0, 0,
+ 0, 2790, 2785, 2788, 0, 2778, 2792, 1664, 1666, 1665,
+ 0, 1663, 0, 363, 364, 0, 1229, 1254, 0, 0,
+ 0, 1927, 1914, 1922, 1921, 0, 1904, 1903, 1902, 0,
+ 1901, 0, 1928, 1928, 1926, 1905, 1880, 0, 0, 0,
+ 1932, 0, 1930, 0, 900, 1876, 1872, 0, 1939, 1938,
+ 1937, 0, 1886, 1895, 1892, 920, 0, 0, 1223, 0,
+ 0, 2422, 365, 2422, 0, 2422, 0, 0, 0, 1231,
+ 365, 0, 1225, 0, 0, 1227, 0, 1424, 0, 916,
+ 914, 913, 915, 0, 0, 898, 0, 0, 0, 2422,
+ 365, 0, 0, 893, 0, 0, 895, 0, 0, 3138,
+ 0, 0, 3141, 0, 2867, 0, 3227, 1605, 3224, 0,
+ 0, 1700, 0, 237, 238, 236, 1594, 239, 1595, 1591,
+ 1577, 0, 1033, 0, 3231, 3232, 1018, 0, 1028, 0,
+ 3231, 1016, 0, 1029, 1026, 1027, 0, 0, 0, 3225,
+ 3114, 3120, 1032, 0, 0, 525, 527, 0, 0, 2373,
+ 2388, 0, 2412, 2442, 2443, 2505, 2533, 2538, 2543, 0,
+ 2572, 2583, 0, 1056, 1086, 1051, 729, 0, 0, 1646,
+ 1023, 1021, 1447, 1598, 2210, 0, 1700, 0, 0, 0,
+ 0, 1262, 1263, 255, 227, 0, 0, 0, 1088, 2537,
+ 1462, 995, 637, 0, 0, 2055, 2056, 2255, 0, 0,
+ 0, 0, 0, 0, 2054, 2218, 0, 0, 0, 0,
+ 0, 0, 1976, 0, 0, 0, 2235, 0, 2241, 0,
+ 0, 2013, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1977, 1957, 1958, 3071, 2052, 2203, 0, 2053, 2300, 0,
+ 1950, 2193, 0, 2190, 2191, 2192, 0, 0, 0, 2270,
+ 0, 2201, 0, 0, 1991, 2199, 1993, 0, 0, 0,
+ 0, 2187, 2188, 2189, 2181, 2182, 2183, 2184, 2185, 2186,
+ 2197, 1973, 0, 2276, 0, 2140, 0, 1972, 0, 0,
+ 1786, 1702, 0, 2298, 2258, 0, 3121, 3124, 2048, 1786,
+ 2996, 2995, 2994, 2993, 2964, 0, 2958, 2959, 0, 2997,
+ 2998, 271, 272, 268, 0, 0, 223, 222, 0, 245,
+ 246, 217, 244, 0, 240, 241, 225, 2127, 2126, 224,
+ 216, 213, 211, 228, 230, 231, 214, 212, 266, 264,
+ 0, 0, 0, 0, 365, 2899, 1575, 0, 1558, 1559,
+ 1555, 1562, 1783, 0, 1694, 0, 1698, 1575, 0, 1571,
+ 1689, 1688, 1724, 1725, 1131, 1687, 1753, 1754, 0, 0,
+ 0, 0, 1779, 1777, 1744, 1735, 1743, 0, 0, 1741,
+ 0, 1745, 1953, 1772, 1676, 1729, 1730, 1733, 1675, 0,
+ 1775, 0, 1649, 1773, 1734, 1633, 0, 1611, 0, 1831,
+ 0, 0, 0, 2907, 2905, 2845, 1880, 2899, 2838, 2899,
+ 2894, 2826, 1944, 1945, 1946, 1947, 1948, 1949, 2827, 0,
+ 2824, 1943, 2825, 617, 618, 0, 0, 0, 2793, 0,
+ 2774, 2799, 2930, 2555, 2962, 0, 2963, 0, 0, 2927,
+ 0, 2937, 2940, 2938, 2941, 0, 1880, 3013, 3117, 3117,
+ 1880, 1480, 0, 0, 0, 1160, 1162, 0, 1161, 0,
+ 1164, 0, 1173, 0, 0, 1159, 1178, 0, 1167, 1165,
+ 0, 1519, 0, 0, 931, 0, 0, 0, 0, 1500,
+ 0, 0, 2572, 259, 1503, 1508, 1495, 1506, 0, 0,
+ 0, 0, 0, 1090, 1089, 0, 0, 1113, 0, 0,
+ 0, 1526, 513, 0, 362, 0, 0, 0, 0, 0,
+ 0, 0, 0, 819, 816, 0, 0, 815, 0, 651,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 691, 0, 1332, 0, 723, 0, 1197, 0,
+ 1196, 0, 1201, 0, 0, 1198, 1193, 1194, 2538, 2547,
+ 2578, 261, 1199, 1221, 0, 1220, 1216, 0, 1142, 0,
+ 1143, 0, 0, 0, 0, 0, 2398, 2422, 303, 325,
+ 0, 1331, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 347, 0, 0,
+ 350, 349, 0, 0, 0, 0, 0, 354, 333, 0,
+ 334, 0, 353, 0, 0, 0, 0, 0, 0, 1332,
+ 0, 294, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1238, 0, 746, 0, 0, 2538, 1217, 0, 0, 0,
+ 0, 0, 0, 1410, 0, 0, 178, 0, 173, 177,
+ 0, 0, 2538, 1218, 0, 0, 0, 0, 0, 600,
+ 601, 614, 0, 605, 606, 603, 607, 608, 0, 0,
+ 0, 0, 0, 0, 0, 599, 0, 0, 713, 712,
+ 716, 0, 0, 0, 0, 0, 1419, 0, 1212, 0,
+ 0, 1418, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1275, 1274, 0, 0, 0, 0, 1342, 0,
+ 861, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 180, 733, 0, 732, 0, 174, 179, 0, 0, 0,
+ 0, 0, 0, 0, 0, 235, 1469, 1475, 1723, 1723,
+ 1723, 2066, 0, 0, 0, 0, 1722, 2261, 2264, 1545,
+ 2289, 1544, 0, 0, 0, 0, 976, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 968, 969, 970, 971,
+ 0, 0, 0, 0, 0, 410, 407, 408, 410, 0,
+ 0, 0, 0, 835, 0, 838, 841, 0, 1491, 479,
+ 0, 0, 643, 691, 0, 0, 463, 187, 0, 0,
+ 0, 0, 748, 0, 0, 0, 1405, 149, 196, 198,
+ 461, 0, 197, 199, 201, 202, 203, 200, 204, 0,
+ 710, 714, 0, 0, 0, 0, 639, 0, 0, 0,
+ 0, 0, 763, 767, 766, 770, 768, 0, 764, 0,
+ 0, 1851, 0, 0, 172, 0, 0, 590, 594, 0,
+ 2769, 0, 0, 463, 563, 376, 2422, 0, 524, 0,
+ 2422, 0, 1110, 0, 822, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2791, 0, 0, 0, 0, 1662, 365,
+ 1182, 0, 152, 0, 0, 0, 0, 365, 1925, 1924,
+ 1877, 1873, 0, 0, 0, 0, 934, 0, 0, 0,
+ 0, 0, 0, 1893, 365, 1146, 186, 2318, 0, 902,
+ 0, 0, 0, 0, 365, 1240, 890, 365, 182, 365,
+ 365, 642, 0, 365, 184, 0, 0, 0, 634, 365,
+ 928, 365, 2284, 0, 365, 3139, 3145, 3143, 1608, 3228,
+ 3222, 3223, 2422, 524, 1666, 1579, 1590, 1030, 1037, 1019,
+ 1036, 1035, 1017, 1034, 1031, 2929, 0, 0, 3119, 0,
+ 1048, 0, 523, 0, 0, 0, 0, 0, 1064, 1065,
+ 0, 0, 1061, 1066, 0, 1062, 1063, 1068, 1058, 1057,
+ 1069, 1070, 0, 0, 1088, 727, 0, 0, 0, 0,
+ 1643, 0, 1641, 0, 1829, 1645, 1634, 1599, 0, 1597,
+ 0, 583, 1109, 1109, 1272, 0, 0, 1045, 0, 0,
+ 365, 1461, 0, 997, 1003, 0, 0, 0, 0, 0,
+ 0, 0, 1006, 1007, 0, 1008, 999, 1009, 1000, 1010,
+ 0, 1001, 0, 0, 0, 0, 2214, 0, 2215, 0,
+ 0, 2254, 2250, 0, 0, 0, 0, 0, 2222, 2223,
+ 2224, 2221, 2225, 2220, 0, 0, 2226, 2219, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2641, 0,
+ 0, 0, 0, 2021, 0, 0, 2174, 0, 2203, 2240,
+ 0, 0, 0, 0, 0, 0, 2203, 2246, 0, 0,
+ 0, 0, 2125, 0, 2122, 0, 0, 0, 0, 2267,
+ 0, 0, 2301, 1954, 1968, 1969, 1970, 1974, 2275, 0,
+ 2269, 0, 0, 1955, 1982, 0, 2247, 2009, 0, 2014,
+ 1997, 2227, 2228, 2229, 2230, 2016, 0, 1990, 0, 1995,
+ 1999, 0, 1978, 0, 1975, 0, 2270, 2202, 0, 2200,
+ 0, 1965, 1966, 1967, 1959, 1960, 1961, 1962, 1963, 1964,
+ 1971, 2178, 2176, 2177, 0, 0, 0, 2148, 0, 0,
+ 1994, 2415, 2449, 0, 1714, 1714, 1714, 1701, 1712, 2274,
+ 0, 1846, 1723, 3126, 3125, 2268, 1846, 0, 0, 0,
+ 2280, 0, 0, 1950, 0, 265, 1827, 936, 937, 935,
+ 1880, 1548, 1552, 1561, 1575, 2204, 1569, 1696, 0, 0,
+ 1550, 1573, 0, 1129, 1130, 0, 1134, 2641, 2535, 0,
+ 0, 0, 0, 1746, 1780, 0, 1771, 0, 1747, 2293,
+ 2294, 1748, 1751, 1752, 1742, 1781, 1647, 0, 1776, 1680,
+ 1679, 0, 1849, 0, 0, 0, 1625, 1613, 0, 1832,
+ 0, 1786, 1651, 0, 2267, 1784, 2843, 2901, 2848, 2869,
+ 2839, 2872, 1952, 2821, 2861, 0, 2795, 2965, 2966, 0,
+ 2956, 2957, 2926, 2932, 3003, 0, 3118, 0, 0, 1381,
+ 1276, 1343, 1163, 0, 1895, 1174, 0, 1158, 0, 1157,
+ 1895, 0, 1175, 0, 1895, 1382, 1277, 1344, 932, 1383,
+ 1278, 1345, 1384, 1279, 1510, 1498, 1497, 1496, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 800, 2422, 365, 1524, 1385, 0, 1280, 361,
+ 1525, 1346, 1529, 818, 817, 0, 0, 1347, 0, 652,
+ 0, 656, 0, 658, 659, 660, 0, 0, 0, 661,
+ 0, 2352, 2406, 663, 666, 667, 668, 675, 680, 670,
+ 0, 0, 682, 676, 0, 0, 0, 0, 0, 0,
+ 688, 690, 0, 0, 0, 0, 0, 0, 1191, 1192,
+ 1386, 1283, 0, 1348, 0, 1141, 0, 1284, 188, 0,
+ 0, 286, 2422, 305, 0, 695, 800, 0, 1334, 302,
+ 331, 0, 346, 341, 342, 340, 2422, 365, 2422, 365,
+ 0, 0, 0, 0, 0, 343, 338, 339, 335, 0,
+ 0, 348, 2327, 2390, 2548, 0, 699, 701, 0, 706,
+ 351, 1304, 372, 371, 370, 0, 355, 0, 377, 380,
+ 352, 332, 330, 327, 299, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2287, 0, 0, 1233, 0, 1389,
+ 1349, 0, 1371, 0, 0, 0, 0, 740, 1392, 1290,
+ 1352, 0, 1411, 1413, 1403, 1291, 1412, 176, 1321, 0,
+ 0, 161, 0, 0, 0, 0, 155, 165, 1393, 1292,
+ 1353, 0, 0, 1394, 1293, 0, 0, 291, 593, 604,
+ 609, 1298, 613, 610, 1361, 611, 1401, 1294, 0, 1397,
+ 1324, 1356, 578, 1404, 1420, 1295, 1212, 1415, 1417, 0,
+ 1332, 0, 280, 282, 0, 301, 0, 1296, 0, 1354,
+ 1396, 1323, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1532, 0, 0, 0, 0, 0, 0, 365, 0,
+ 0, 0, 1334, 2422, 365, 1395, 0, 1329, 0, 1369,
+ 0, 0, 398, 0, 1322, 1332, 0, 293, 1300, 0,
+ 1363, 0, 0, 233, 232, 234, 0, 0, 0, 0,
+ 2208, 2209, 0, 2206, 2061, 2263, 0, 985, 943, 984,
+ 0, 2388, 0, 942, 944, 0, 0, 0, 945, 0,
+ 949, 950, 0, 0, 0, 941, 939, 940, 409, 0,
+ 0, 757, 758, 0, 0, 0, 0, 837, 0, 0,
+ 0, 1522, 0, 152, 650, 0, 0, 0, 645, 690,
+ 695, 0, 0, 0, 0, 462, 466, 470, 471, 472,
+ 0, 0, 0, 0, 166, 153, 0, 879, 0, 524,
+ 0, 750, 1409, 1408, 1211, 0, 198, 191, 0, 0,
+ 711, 0, 1570, 0, 0, 376, 832, 830, 829, 831,
+ 0, 0, 0, 853, 828, 0, 1850, 1852, 0, 0,
+ 0, 0, 0, 0, 0, 465, 0, 0, 527, 0,
+ 566, 0, 0, 0, 0, 563, 0, 0, 0, 0,
+ 849, 3072, 821, 1152, 0, 1170, 1153, 0, 0, 0,
+ 0, 1205, 1137, 1206, 1183, 1138, 0, 0, 622, 2789,
+ 2783, 1667, 1668, 0, 1230, 0, 0, 1518, 0, 1516,
+ 0, 1894, 1907, 901, 0, 1935, 1934, 1936, 1936, 0,
+ 1878, 0, 3211, 3219, 3218, 0, 1919, 1887, 1224, 365,
+ 0, 365, 0, 365, 1232, 1226, 1228, 1425, 0, 899,
+ 0, 0, 365, 892, 894, 0, 896, 0, 0, 2928,
+ 3115, 1049, 526, 0, 0, 0, 0, 0, 0, 1060,
+ 620, 1067, 0, 1081, 1076, 1078, 0, 1082, 726, 0,
+ 0, 1644, 1637, 1639, 1638, 0, 0, 1635, 2211, 891,
+ 0, 589, 0, 0, 0, 0, 365, 0, 1083, 0,
+ 0, 1004, 998, 0, 0, 1002, 0, 0, 0, 1005,
+ 0, 0, 1719, 2212, 2213, 0, 0, 0, 2251, 0,
+ 0, 2100, 0, 2074, 2076, 2088, 0, 2101, 2059, 2102,
+ 2078, 2080, 2089, 0, 0, 2194, 0, 0, 2091, 0,
+ 2023, 2024, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2039,
+ 2038, 2092, 2173, 0, 0, 2238, 2239, 2093, 0, 0,
+ 2245, 0, 0, 0, 2098, 2103, 0, 0, 0, 0,
+ 2109, 0, 2130, 0, 0, 0, 2049, 2204, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2015, 1998, 2018, 1992,
+ 0, 1996, 2000, 0, 0, 2017, 0, 0, 1986, 0,
+ 0, 1984, 2010, 1980, 0, 0, 2011, 0, 0, 0,
+ 2067, 0, 0, 1714, 1714, 1714, 1714, 1711, 0, 0,
+ 0, 0, 2535, 2660, 0, 1810, 1785, 1787, 1797, 1810,
+ 1815, 1810, 2069, 1844, 2070, 2281, 0, 1756, 0, 1756,
+ 2978, 2980, 2981, 2982, 2983, 2984, 2986, 2987, 2989, 2990,
+ 2991, 2979, 2985, 2988, 2992, 2969, 2970, 0, 2960, 2961,
+ 209, 0, 242, 229, 3003, 1547, 1697, 1700, 1726, 0,
+ 2195, 1134, 0, 1728, 1749, 1750, 0, 1739, 0, 1778,
+ 1736, 1648, 1632, 0, 1630, 1617, 1619, 1618, 0, 0,
+ 1620, 2267, 0, 1630, 1612, 1656, 0, 0, 1849, 0,
+ 1655, 0, 2903, 2831, 0, 0, 3002, 3005, 3017, 3014,
+ 2841, 0, 1895, 1155, 1156, 0, 1179, 0, 1093, 1094,
+ 0, 1092, 0, 0, 0, 512, 1112, 0, 0, 0,
+ 800, 0, 0, 516, 0, 1527, 0, 1402, 1320, 654,
+ 655, 0, 669, 0, 678, 677, 0, 0, 0, 0,
+ 0, 0, 0, 662, 684, 626, 685, 687, 0, 0,
+ 686, 689, 692, 1332, 0, 724, 1306, 0, 1367, 1185,
+ 0, 0, 1144, 0, 0, 0, 0, 0, 0, 479,
+ 326, 0, 0, 0, 0, 152, 0, 307, 318, 383,
+ 324, 0, 357, 0, 329, 0, 322, 344, 336, 345,
+ 337, 356, 358, 0, 703, 704, 702, 698, 0, 705,
+ 707, 0, 374, 0, 0, 0, 0, 1388, 0, 1332,
+ 0, 295, 1302, 0, 1365, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1370, 0, 0,
+ 0, 0, 745, 0, 742, 0, 0, 0, 158, 157,
+ 0, 164, 0, 0, 0, 0, 0, 0, 0, 1421,
+ 0, 0, 0, 0, 0, 0, 392, 0, 300, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 399, 367, 0, 856,
+ 0, 0, 0, 401, 0, 0, 1380, 0, 0, 0,
+ 0, 0, 1387, 1285, 2064, 2065, 2062, 1723, 2262, 0,
+ 0, 0, 956, 0, 0, 0, 0, 0, 0, 412,
+ 413, 152, 411, 434, 0, 800, 0, 0, 834, 839,
+ 847, 2481, 2181, 2182, 845, 840, 842, 844, 843, 846,
+ 0, 0, 0, 0, 0, 495, 0, 0, 0, 485,
+ 0, 0, 1212, 478, 481, 482, 0, 0, 646, 649,
+ 647, 648, 683, 0, 465, 502, 553, 0, 168, 0,
+ 0, 169, 167, 0, 0, 376, 747, 0, 744, 0,
+ 194, 461, 0, 715, 0, 0, 0, 1212, 638, 769,
+ 772, 765, 0, 852, 854, 826, 0, 695, 0, 0,
+ 595, 0, 524, 1609, 583, 0, 555, 465, 553, 562,
+ 0, 0, 570, 375, 0, 0, 583, 376, 0, 0,
+ 1113, 848, 0, 0, 1151, 0, 0, 0, 1202, 1207,
+ 1203, 0, 0, 1166, 0, 1204, 1184, 1441, 1442, 1439,
+ 1440, 0, 0, 0, 2806, 1658, 2815, 0, 0, 1514,
+ 0, 1913, 0, 1931, 1929, 1874, 0, 2899, 0, 0,
+ 0, 0, 0, 1879, 903, 0, 886, 0, 888, 365,
+ 734, 0, 635, 365, 0, 0, 0, 0, 0, 0,
+ 0, 1059, 0, 1079, 0, 0, 1042, 1085, 0, 0,
+ 1642, 1640, 581, 0, 1264, 1265, 1088, 0, 1043, 1087,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2216,
+ 0, 2253, 2249, 0, 2071, 2217, 0, 0, 2233, 2232,
+ 2174, 0, 0, 2022, 2034, 2035, 2036, 2234, 0, 2044,
+ 0, 0, 2031, 2032, 2033, 2025, 2026, 2027, 2028, 2029,
+ 2030, 2037, 2243, 2242, 2236, 2237, 0, 2095, 2096, 2097,
+ 2244, 2104, 0, 2342, 2131, 0, 2108, 2124, 2123, 0,
+ 0, 0, 2111, 0, 0, 2120, 0, 2175, 2302, 1956,
+ 0, 0, 1983, 2248, 2001, 0, 0, 2019, 0, 1979,
+ 2194, 0, 0, 0, 0, 0, 1988, 0, 0, 0,
+ 2151, 2146, 2147, 2171, 0, 0, 0, 0, 0, 0,
+ 1705, 1704, 1710, 1810, 1815, 1810, 0, 0, 1682, 0,
+ 1797, 0, 1809, 1795, 1808, 0, 0, 1821, 1819, 0,
+ 1821, 0, 1821, 0, 1789, 0, 1811, 1791, 1808, 1793,
+ 0, 1836, 2282, 1845, 0, 1769, 2061, 1769, 0, 0,
+ 0, 3001, 0, 0, 1727, 1132, 1133, 1737, 0, 1740,
+ 0, 1847, 0, 1631, 0, 0, 0, 1622, 1628, 1610,
+ 0, 0, 1652, 1630, 1653, 2847, 0, 2902, 2967, 2968,
+ 1176, 0, 0, 1168, 1099, 1100, 1103, 1101, 1098, 1102,
+ 0, 0, 0, 800, 0, 0, 534, 0, 1126, 1126,
+ 0, 0, 518, 575, 529, 803, 0, 0, 0, 801,
+ 365, 1281, 0, 679, 0, 0, 674, 672, 671, 673,
+ 0, 627, 1400, 1282, 0, 0, 0, 0, 1186, 1335,
+ 0, 0, 1305, 0, 304, 0, 475, 0, 0, 310,
+ 319, 0, 315, 0, 1333, 0, 0, 0, 0, 314,
+ 387, 0, 384, 0, 365, 365, 359, 700, 373, 378,
+ 379, 382, 1340, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 880, 863, 0, 0,
+ 881, 882, 0, 0, 0, 1235, 1236, 1234, 1372, 1373,
+ 1378, 1375, 1374, 1377, 1376, 1379, 0, 1288, 0, 0,
+ 738, 1336, 162, 159, 160, 163, 1337, 1318, 1299, 1362,
+ 579, 1416, 0, 0, 0, 1297, 0, 1355, 0, 1314,
+ 1308, 0, 0, 0, 0, 0, 1399, 1328, 1360, 1398,
+ 1326, 1358, 1325, 1357, 1327, 1359, 1319, 0, 0, 1854,
+ 860, 0, 0, 0, 365, 365, 859, 736, 1301, 0,
+ 1364, 1310, 0, 0, 0, 946, 0, 0, 948, 951,
+ 0, 953, 417, 435, 152, 0, 756, 820, 0, 0,
+ 836, 799, 0, 483, 0, 489, 493, 0, 0, 497,
+ 498, 496, 484, 1212, 524, 574, 789, 790, 0, 0,
+ 810, 0, 644, 0, 463, 0, 499, 0, 0, 467,
+ 171, 170, 0, 0, 0, 751, 755, 753, 752, 754,
+ 749, 0, 740, 198, 2422, 0, 0, 0, 0, 576,
+ 1414, 0, 782, 827, 0, 1853, 730, 0, 376, 591,
+ 2771, 0, 0, 463, 583, 2770, 0, 468, 473, 474,
+ 479, 0, 563, 554, 0, 555, 564, 565, 0, 572,
+ 1489, 0, 584, 572, 0, 0, 0, 850, 0, 851,
+ 1154, 1171, 1172, 0, 0, 1135, 0, 0, 0, 0,
+ 629, 0, 2779, 365, 0, 1517, 1875, 3212, 0, 3213,
+ 3214, 3215, 3216, 3217, 365, 365, 1261, 0, 897, 1073,
+ 1074, 1075, 1072, 1071, 621, 0, 1077, 728, 0, 582,
+ 365, 0, 1012, 990, 1011, 989, 991, 0, 993, 994,
+ 988, 986, 987, 2252, 2087, 2090, 2099, 2231, 2173, 2204,
+ 0, 0, 2045, 0, 0, 2094, 2650, 0, 0, 2135,
+ 2136, 0, 2132, 2133, 2128, 2129, 2110, 0, 2470, 2115,
+ 0, 0, 0, 2007, 2005, 2002, 0, 2003, 1987, 0,
+ 0, 1985, 1981, 0, 2012, 2137, 0, 2153, 2150, 2170,
+ 2204, 1709, 1708, 1707, 1706, 1796, 1792, 1794, 0, 2655,
+ 0, 1799, 1806, 0, 1788, 0, 1820, 1816, 0, 1817,
+ 0, 0, 1818, 0, 0, 1790, 0, 1806, 0, 1843,
+ 0, 0, 2142, 2299, 2142, 2971, 0, 2974, 2972, 2973,
+ 2977, 243, 1695, 0, 1738, 0, 3227, 1614, 0, 1615,
+ 1621, 0, 0, 0, 0, 1657, 1650, 2904, 1169, 1177,
+ 0, 0, 0, 514, 0, 529, 0, 0, 0, 1119,
+ 1128, 1118, 0, 529, 0, 1212, 805, 804, 807, 802,
+ 806, 1528, 0, 664, 665, 681, 1307, 0, 1368, 1316,
+ 0, 1646, 306, 0, 696, 313, 0, 0, 0, 308,
+ 386, 388, 309, 312, 316, 367, 328, 321, 0, 0,
+ 0, 1303, 0, 1366, 1312, 1339, 1390, 1286, 1350, 0,
+ 0, 869, 0, 0, 0, 0, 1391, 1287, 1351, 0,
+ 0, 0, 0, 1646, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1537, 0, 0, 366, 858, 857, 367, 400,
+ 1330, 0, 2063, 0, 947, 954, 955, 952, 0, 406,
+ 414, 417, 0, 0, 1252, 1252, 0, 800, 0, 0,
+ 480, 494, 0, 574, 533, 0, 486, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 743, 742, 193, 0, 463, 0, 695, 0, 776,
+ 777, 771, 773, 0, 784, 788, 855, 0, 0, 0,
+ 0, 465, 0, 0, 3221, 464, 0, 0, 476, 0,
+ 566, 555, 563, 0, 0, 580, 0, 1482, 0, 586,
+ 0, 0, 0, 1208, 0, 1214, 0, 1165, 1209, 0,
+ 1846, 0, 0, 0, 0, 633, 2805, 2809, 1253, 1515,
+ 3220, 887, 889, 735, 1080, 0, 1084, 365, 992, 2175,
+ 2040, 0, 0, 0, 0, 2105, 0, 2106, 2134, 2112,
+ 2116, 0, 2113, 2114, 2004, 2008, 2006, 1989, 2139, 0,
+ 1723, 2172, 1839, 0, 1842, 0, 0, 1798, 0, 0,
+ 1800, 0, 0, 1802, 1804, 0, 0, 0, 0, 0,
+ 0, 2285, 2369, 2625, 2532, 0, 1755, 1757, 1760, 1762,
+ 1761, 1763, 1759, 1768, 0, 1684, 1683, 2976, 2975, 2196,
+ 1848, 1629, 0, 0, 0, 1114, 0, 1654, 1081, 0,
+ 365, 1126, 1212, 535, 2481, 536, 1125, 1127, 1131, 0,
+ 1212, 0, 574, 657, 0, 0, 288, 694, 0, 0,
+ 311, 320, 369, 381, 0, 1646, 0, 0, 867, 876,
+ 876, 864, 0, 0, 883, 1289, 739, 0, 0, 283,
+ 1315, 1309, 0, 0, 0, 1539, 1540, 0, 0, 0,
+ 0, 0, 1338, 365, 1311, 957, 0, 437, 444, 418,
+ 422, 1531, 0, 1531, 0, 419, 423, 1531, 1531, 416,
+ 1846, 433, 1252, 0, 1249, 1248, 798, 0, 522, 597,
+ 0, 487, 0, 544, 0, 0, 811, 0, 0, 465,
+ 553, 0, 511, 503, 504, 505, 507, 506, 508, 509,
+ 510, 501, 500, 0, 695, 873, 376, 1489, 737, 0,
+ 0, 708, 0, 774, 779, 778, 1531, 783, 0, 0,
+ 0, 695, 0, 1609, 583, 555, 465, 553, 1606, 469,
+ 479, 0, 570, 563, 566, 0, 567, 0, 571, 0,
+ 0, 0, 583, 1541, 1113, 0, 1213, 0, 0, 0,
+ 0, 0, 0, 1256, 628, 0, 0, 632, 623, 0,
+ 2807, 695, 1044, 2041, 0, 2042, 0, 0, 2118, 2117,
+ 0, 2157, 1844, 0, 0, 1838, 0, 0, 1868, 0,
+ 0, 0, 1807, 1823, 0, 1803, 1801, 0, 1812, 0,
+ 1814, 0, 0, 0, 1764, 0, 2141, 2143, 0, 0,
+ 1627, 1846, 0, 1624, 0, 1095, 0, 1096, 1120, 574,
+ 0, 1131, 1134, 524, 574, 0, 800, 1317, 0, 697,
+ 597, 0, 323, 0, 296, 1313, 0, 0, 878, 878,
+ 0, 0, 0, 0, 0, 0, 394, 0, 0, 1533,
+ 0, 1534, 1535, 1538, 402, 415, 0, 442, 0, 440,
+ 439, 441, 0, 430, 0, 0, 0, 0, 0, 0,
+ 405, 1247, 1251, 1250, 0, 0, 488, 0, 490, 0,
+ 530, 531, 532, 0, 492, 540, 541, 0, 808, 0,
+ 813, 0, 0, 0, 695, 552, 719, 0, 0, 0,
+ 1483, 0, 0, 577, 0, 785, 786, 781, 0, 0,
+ 731, 1489, 583, 2772, 563, 0, 555, 477, 0, 572,
+ 566, 570, 568, 569, 0, 1486, 0, 585, 0, 1122,
+ 1136, 1215, 1210, 1445, 0, 0, 631, 630, 2810, 2812,
+ 2811, 0, 725, 2043, 2121, 2107, 2119, 2152, 0, 0,
+ 0, 0, 1837, 1840, 0, 1871, 0, 0, 0, 0,
+ 1857, 0, 1805, 0, 0, 1813, 0, 0, 0, 1758,
+ 0, 0, 1616, 1626, 1115, 0, 0, 539, 0, 1134,
+ 1116, 533, 800, 528, 515, 1646, 317, 368, 0, 0,
+ 0, 874, 877, 865, 866, 885, 884, 741, 1646, 0,
+ 390, 389, 0, 393, 0, 438, 447, 0, 445, 420,
+ 425, 0, 429, 427, 426, 421, 424, 0, 521, 0,
+ 0, 0, 0, 0, 542, 0, 543, 573, 0, 812,
+ 0, 0, 0, 721, 872, 0, 0, 463, 695, 775,
+ 780, 0, 0, 1484, 3221, 566, 555, 563, 0, 0,
+ 557, 1126, 1126, 450, 570, 572, 1487, 1488, 0, 0,
+ 376, 1444, 1443, 1700, 0, 0, 2808, 2613, 0, 2586,
+ 0, 2169, 2158, 2169, 2169, 2149, 0, 0, 1869, 1870,
+ 1855, 0, 0, 1859, 1822, 1835, 1766, 0, 1765, 2144,
+ 2145, 1846, 365, 0, 800, 537, 1117, 544, 517, 289,
+ 1646, 868, 0, 284, 0, 395, 1536, 443, 0, 428,
+ 788, 596, 491, 549, 0, 548, 0, 546, 545, 809,
+ 814, 0, 695, 862, 1489, 709, 787, 0, 1607, 570,
+ 563, 566, 0, 556, 0, 1128, 1128, 572, 448, 0,
+ 0, 572, 1427, 1700, 1426, 1428, 1436, 1433, 1435, 1434,
+ 1432, 1259, 1260, 0, 2162, 2161, 2160, 2164, 2163, 0,
+ 2156, 2154, 2155, 1841, 0, 1858, 1861, 0, 0, 1867,
+ 1860, 1862, 0, 0, 1833, 1767, 1623, 1097, 0, 519,
+ 800, 297, 875, 0, 446, 0, 547, 551, 550, 695,
+ 720, 1485, 793, 572, 566, 570, 1126, 558, 1127, 560,
+ 559, 452, 1122, 1123, 0, 1846, 0, 1437, 1431, 1682,
+ 1669, 0, 0, 0, 0, 2166, 0, 2167, 0, 1865,
+ 1866, 1863, 1864, 0, 0, 520, 0, 0, 722, 0,
+ 791, 794, 797, 795, 796, 451, 570, 572, 1128, 376,
+ 1121, 0, 1104, 1429, 1700, 0, 0, 2159, 2165, 2168,
+ 0, 0, 538, 391, 0, 759, 0, 572, 449, 561,
+ 572, 1124, 1430, 0, 0, 0, 1834, 0, 792, 453,
+ 1846, 0, 0, 1856, 793, 1105, 0, 0, 0, 1257,
+ 1258, 760
+};
+
+ /* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -5580, -5580, 4651, -5580, -5580, -1314, 364, 2906, -1048, -5580,
+ -5580, -5580, 1401, -5580, -5580, -5580, -5580, 3745, -5580, 1983,
+ -2962, -5580, -5580, -23, 3716, -1774, -29, 3237, 1611, -5580,
+ -1588, -5580, -5580, -960, 29, -5580, 3725, 294, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -1227, 2103, -5580, 2183,
+ 1410, 3851, -2994, -5580, -5580, -1973, -3815, -5580, 677, -5580,
+ 704, -4844, -879, -5580, -5580, -5580, 2085, -5580, -5580, -5580,
+ 2030, 1205, -314, -5580, -5580, -5580, -5580, -5580, -5580, -726,
+ -5580, -5580, -977, 332, -104, -3003, -4363, -5580, -5580, 535,
+ -363, -1955, -5580, -4200, -5580, 41, -2343, -5580, -5580, -5580,
+ -328, -1926, 1517, -5580, -1078, -1601, 1859, -4745, -840, -5580,
+ -203, -5580, -953, -741, -739, -875, -4387, -4875, -5580, -5580,
+ -986, -3834, -5183, -5413, -4874, -4554, 1520, -5580, -5580, -3689,
+ -4377, 356, 509, -5580, 581, 601, -5580, 525, -664, -1331,
+ -2053, -5580, -1198, -5580, -5580, -5580, -3511, -5580, -5580, -5580,
+ -5580, -62, -5580, -5580, -5580, -5580, 580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -3205, 2056, 2057, -5580, -3605, -5580, -1302,
+ -5580, 733, -3545, 1440, -5580, -5580, 1206, 3770, 564, -5580,
+ -5580, -5580, -5580, -5580, -5580, -5580, -2153, -5580, -5580, -5580,
+ -5580, 46, -293, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 617, -5580, 2073, 1199, -5580, -5580, -296, -5580, -5580, -5580,
+ -5580, -5580, -5580, -923, -5166, -1086, -1067, -5580, -3543, -5580,
+ -5580, -5580, -268, -5580, -5580, -5580, -5580, -5580, -1317, -5580,
+ 1263, -4172, -5580, -5580, 540, -5580, -5580, -5580, -5580, -5580,
+ -842, -206, 2917, -5580, -441, -639, -5580, -5580, -5580, -204,
+ -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -1467, 9200,
+ -1259, -887, -5580, -5580, -5580, -5580, -5580, -2856, -5580, -5580,
+ -5580, -5580, -4358, -5580, 4949, 95, -802, 622, -5580, -187,
+ -83, 3500, -1578, -3197, 490, -404, -5580, -5580, -5580, -3097,
+ -5580, -5580, -5580, -5580, -4123, 909, -5580, -1028, -5580, -4409,
+ -5190, -4611, -4187, -996, -5580, -4159, -5579, -4510, -4119, -5580,
+ -5580, -5580, -5580, -816, -870, 2881, -5580, -1929, 2426, -1304,
+ -5580, -2619, 558, 1615, 2896, -3287, -809, 2878, -3066, -1057,
+ -3841, -5580, -5580, -2864, -536, -5580, -5580, 1392, -1517, -5580,
+ -5580, -5580, -5580, -968, 2828, -902, -5580, -5580, 4139, -5580,
+ -4215, -5580, 4109, -5580, -5580, -5580, -5580, 2715, 2718, -5580,
+ 2719, -5580, -5580, -1920, 1366, -5580, -1137, -5580, -5580, 2193,
+ 762, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580, 1258,
+ 745, -5580, -5580, -5580, -5580, -5580, -829, -1009, -5580, -5580,
+ 919, -5580, -5580, -5580, -5580, 2114, -1303, -1085, 3990, 891,
+ 946, -5371, -5580, -5580, -1495, -5580, 3218, -5580, -5580, -5580,
+ -5580, -5580, 563, 565, -5580, -5580, -5580, -5580, -3208, -5580,
+ -5580, -4958, -5580, -5580, -5580, -5580, -5580, 3973, 13, 2582,
+ -5580, -5580, -5580, -235, -5580, -5580, -1392, 2569, -5580, -2398,
+ -5580, -913, -5580, 2806, -5580, -5580, -5580, -5580, -2330, 971,
+ -4385, -61, -5580, -5580, -78, -5580, 366, -5580, -5580, -4016,
+ -57, -5580, -5580, -5580, -5580, -5007, -5580, -56, -722, 927,
+ -3342, -5580, 996, 44, 3594, 1993, -60, 3571, -242, -218,
+ -202, -55, -64, 3365, -5580, -5580, 3412, -5580, -198, 2013,
+ -5580, -5580, -1173, -344, -5580, 1739, -970, 2542, 3367, 3350,
+ -5580, 1721, 2574, -2418, -2411, -5580, 990, -704, -540, -5580,
+ -5580, -5580, -5580, 399, -956, 2556, -5580, 3368, -5580, -5580,
+ -5580, -2353, -3394, -4020, 1019, -3993, -3940, 440, 421, -1333,
+ -301, -148, -1135, 3371, -5580, -5580, 1025, -506, -5580, -5580,
+ -504, -3358, 951, -5580, -4995, -2826, 1029, -969, -799, -5580,
+ -886, -5580, -674, 7137, -2131, -1464, -5580, -5580, -1431, 21008,
+ -5580, -5580, -5580, 23949, 24242, -5580, -5580, 28692, 30086, -5580,
+ -1264, 31591, 14641, -1447, -1417, -1691, 29404, -2102, 986, 149,
+ -5580, -4015, -1499, -5580, -5580, -5580, -259, 1086, -1952, -5580,
+ -5014, -4447, -5580, -5580, -25, -5580, -678, -5580, -676, -5580,
+ -5580, -5580, -2641, -5529, -2713, 2690, -5580, -5580, -5580, -891,
+ -5580, 31334, -3248, -5580, -774, -1683, -2025, -3980, -2333, -5580,
+ -5580, -5580, -3148, -5580, -5580, -5580, -5580, -2554, -3875, -489,
+ 1839, -5580, -5580, 1939, -5580, -5580, -5580, -1321, 2235, -1122,
+ -3149, 1849, -5580, -1119, 2701, -1147, 31115, -949, 28592, -99,
+ -2819, -1716, -2085, -5580, 5670, -5580, 4243, -151, -760, 6376,
+ -599, -1012, 9873, 7990, 6175, -3730, -5580, -5580, 1062, -5580,
+ -5580, -5580, -5580, 4550, 1282, -5580, 3771, -5580, 2121, 2988,
+ -5580, -5580, 2566, -1010, -84, -5580, -624, -5580, -142, -5580,
+ -5580, -5580, 348, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ -5580, -5580, 3385, -5580, -5580, -1645, -5580, -5580, -5580, -5580,
+ -5580, 4864, -384, -5580, 4205, -365, -5580, -5580, -5580, -5580,
+ -5580, -5580, -5580, -5580, -5580, 3393, 2607, -5580, 3982, -5580,
+ -5580, -5580, -3, 3613, -5580, -5580, -5580, -659, -941, 4006,
+ 4008, 2572, -5580, -5580, -5580, -5580, -5580, -5580, -5580, -5580,
+ 2584, -5580, -5580, 1841, -2459, 2588, -5580, -5580, 1011, -5580,
+ -5580, 480, -5580, 1014, -5580, 3511, -5580, -5580, -5580, 1056,
+ -5580, -5580, -5580, -579, 21392, 252, -96, 729, 1943, -5580,
+ 13070, 18641, 36, 3413, -44, 17410, 25175, 289, -5580, 4857,
+ 2585, 2076, -1129, -5580, 4705, 2884, 29979, -5580, -1124, 1609,
+ 2651, -1121, -2, -700, -1363, 3728, -800, -2294, -5580, 5284,
+ -5580, -3559, -5178, -1168, 31, 4207, -1397
+};
+
+ /* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 1, 248, 249, 250, 2058, 3047, 2898, 3884, 3885,
+ 251, 252, 2054, 253, 254, 255, 256, 1972, 257, 1443,
+ 2223, 3062, 258, 2733, 1172, 1173, 1174, 2582, 2583, 2986,
+ 2584, 2571, 1794, 2377, 1994, 1137, 1138, 1953, 1995, 260,
+ 261, 1788, 2563, 262, 263, 264, 2025, 2112, 2026, 2027,
+ 1966, 2276, 4989, 5762, 3676, 2862, 3932, 3677, 3678, 4348,
+ 4349, 4428, 5776, 5777, 265, 2128, 2129, 266, 267, 3028,
+ 3849, 4481, 5369, 5370, 5609, 955, 5014, 5015, 5596, 5597,
+ 5790, 5937, 5938, 3063, 2215, 3927, 4566, 3875, 5086, 3876,
+ 5087, 3877, 5088, 3861, 4513, 4514, 5028, 4515, 3878, 5046,
+ 5641, 3879, 2752, 5806, 3104, 2407, 2405, 5285, 5623, 4845,
+ 4846, 6024, 5814, 5815, 5816, 6047, 5048, 5092, 5093, 5979,
+ 5980, 3930, 4572, 5099, 5435, 5386, 3562, 269, 270, 2249,
+ 4041, 1067, 3107, 989, 1068, 3064, 274, 3097, 5808, 3098,
+ 2084, 2912, 4494, 4021, 275, 1469, 4314, 5455, 5697, 5698,
+ 276, 932, 277, 2231, 278, 279, 3042, 3868, 280, 2769,
+ 3579, 281, 282, 3610, 3611, 3612, 283, 4339, 5303, 2028,
+ 3665, 3666, 3667, 3668, 4369, 284, 2226, 3071, 3072, 285,
+ 286, 287, 288, 3237, 3238, 289, 2972, 290, 291, 292,
+ 293, 4404, 4950, 5062, 3707, 3891, 4538, 5060, 294, 3853,
+ 3065, 2239, 3087, 3088, 5072, 5411, 5412, 5413, 5656, 5969,
+ 5415, 5658, 5837, 5660, 5038, 6159, 6160, 5377, 4293, 4859,
+ 296, 5039, 5040, 5821, 297, 2767, 298, 299, 2199, 3034,
+ 3035, 4495, 3114, 3939, 3940, 4552, 4553, 300, 3791, 301,
+ 4926, 4927, 990, 5828, 5768, 5923, 302, 303, 4930, 4931,
+ 304, 305, 306, 307, 308, 1053, 1054, 1055, 1569, 1570,
+ 3534, 1514, 309, 2594, 310, 1407, 1408, 3828, 311, 1669,
+ 3283, 3284, 5153, 312, 1091, 1600, 1601, 3066, 314, 1102,
+ 3257, 1104, 2422, 4023, 4024, 4646, 315, 316, 3234, 3260,
+ 317, 1959, 2743, 2744, 4840, 3067, 991, 1654, 3111, 3557,
+ 5534, 5279, 5535, 5990, 6134, 5280, 5548, 3456, 4233, 319,
+ 992, 2000, 2819, 1537, 1538, 3117, 3944, 2712, 2713, 2714,
+ 4592, 2715, 3946, 2716, 1933, 2717, 1486, 1487, 3952, 3953,
+ 3954, 4588, 4595, 3056, 5445, 5446, 320, 1997, 2816, 321,
+ 322, 323, 2037, 1318, 1547, 1548, 324, 1014, 1015, 325,
+ 5614, 326, 1489, 327, 5453, 328, 329, 1126, 1127, 1651,
+ 1652, 330, 331, 2833, 4351, 332, 1998, 333, 334, 3701,
+ 3702, 4942, 335, 336, 337, 2218, 2219, 338, 339, 3756,
+ 3757, 340, 341, 342, 6074, 6136, 6137, 6138, 4601, 5993,
+ 6076, 1643, 344, 345, 346, 935, 1360, 1361, 1362, 1279,
+ 3068, 5437, 348, 349, 1954, 1955, 1956, 1957, 2738, 350,
+ 351, 352, 3968, 3969, 353, 354, 355, 356, 2203, 357,
+ 358, 5587, 359, 360, 2164, 361, 362, 1819, 1820, 1821,
+ 1822, 2600, 3444, 949, 1192, 1825, 1831, 1835, 1836, 1837,
+ 364, 1070, 1594, 1595, 1596, 2379, 365, 1647, 1411, 1071,
+ 1589, 1072, 2646, 3486, 4248, 4249, 4250, 4253, 5263, 4813,
+ 1073, 3482, 369, 2429, 3243, 3246, 3478, 1074, 3491, 3492,
+ 3493, 4256, 1075, 1093, 1479, 3127, 1076, 1742, 374, 375,
+ 376, 1201, 1195, 1196, 3449, 378, 2540, 3417, 1111, 1841,
+ 1156, 1157, 1209, 2996, 2612, 2613, 2637, 2638, 1850, 1851,
+ 2625, 2629, 2630, 3468, 3462, 2618, 4795, 5516, 5517, 5518,
+ 5519, 5520, 5521, 5242, 2633, 2634, 1853, 1854, 1855, 2642,
+ 379, 3421, 4186, 4187, 4188, 4772, 4773, 4787, 4783, 5227,
+ 5503, 4189, 1637, 1861, 5235, 6104, 4190, 5492, 5493, 5715,
+ 4791, 4197, 4244, 3915, 3916, 3917, 4191, 5889, 5890, 6100,
+ 6101, 5717, 5718, 2718, 2306, 1516, 1743, 1517, 2314, 1744,
+ 2290, 1519, 1745, 1746, 1747, 1522, 1748, 1749, 1750, 1525,
+ 2282, 1751, 1752, 2300, 1241, 1242, 1826, 5719, 1754, 1755,
+ 1756, 4193, 1757, 4725, 5191, 5177, 3343, 3344, 2579, 4721,
+ 4128, 4715, 2535, 3407, 5525, 5736, 5737, 4170, 4751, 5207,
+ 5490, 5881, 6001, 6002, 6090, 1758, 1759, 1760, 3404, 2530,
+ 1321, 1761, 4497, 2532, 3337, 2154, 2155, 2435, 2456, 3289,
+ 3304, 3305, 3381, 3317, 4087, 3325, 3330, 4115, 4116, 3338,
+ 3367, 1762, 3291, 3292, 4069, 2458, 1763, 1366, 2158, 1367,
+ 2548, 3362, 1778, 1764, 1765, 2423, 1183, 5499, 779, 762,
+ 3693, 2160, 1369, 1108, 1766, 1767, 1768, 1883, 722, 1540,
+ 1541, 724, 763, 764, 938, 876, 2, 70, 1077, 3924,
+ 5420, 383, 384, 994, 995, 996, 1471, 1472, 2262, 2265,
+ 1888, 2680, 728, 729, 780, 5122, 5456, 5700, 1061, 385,
+ 386, 387, 388, 1884, 2676, 1243, 71, 79, 72, 1244,
+ 425, 426, 2657, 389, 893, 390, 1864, 1223, 4262, 391,
+ 392, 393, 394, 395, 1058, 396, 1225, 397, 1226, 398,
+ 399, 400, 401, 1233, 402, 1866, 1867, 4827, 1868, 403,
+ 404, 766, 767, 1587, 405, 406, 1260, 2366, 1262, 1620,
+ 1894, 1908, 1909, 1910, 407, 736, 408, 409, 410, 1900,
+ 1901, 411, 2556, 2557, 2685, 2558, 412, 3507, 3508, 413,
+ 4215, 4216, 5248, 4217, 414, 2552, 415, 416, 1186, 4267,
+ 417, 889, 418, 1274, 768, 769, 770, 940, 879, 1142,
+ 781, 942, 3669, 881, 882, 772, 773, 774, 2399, 73,
+ 3515, 2400, 1770, 782, 1771, 2546, 1772, 1773, 1774, 1775,
+ 1776, 1777, 776, 1250, 1579, 1580, 3516, 1582, 77, 1583,
+ 422, 3985, 2367, 1621, 3190, 2385, 2386
+};
+
+ /* 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[] =
+{
+ 76, 1481, 1437, 2083, 765, 1200, 1005, 1220, 2376, 1319,
+ 1095, 1811, 367, 372, 877, 1789, 368, 370, 377, 1148,
+ 1320, 1628, 1629, 1630, 1939, 2404, 1221, 1634, 1185, 420,
+ 2925, 1210, 1095, 2088, 2751, 420, 1292, 2133, 1779, 1856,
+ 988, 765, 1882, 3874, 1325, 2296, 2162, 1330, 993, 2857,
+ 1817, 2828, 3955, 1480, 1597, 3695, 2228, 1117, 2146, 2152,
+ 877, 4046, 1816, 997, 1004, 2302, 2286, 2287, 4199, 3187,
+ 2820, 421, 1182, 1004, 3754, 2322, 2295, 421, 2999, 1320,
+ 2829, 733, 1103, 1258, 1803, 2447, 363, 4242, 1280, 3092,
+ 4548, 2840, 1052, 4340, 3527, 3529, 3427, 3897, 4320, 1655,
+ 4847, 4577, 259, 2030, 377, 1572, 3249, 2082, 421, 2201,
+ 2312, 4596, 4804, 2206, 4596, 1004, 2111, 4364, 2210, 4366,
+ 2213, 3288, 933, 1149, 2990, 1261, 2138, 2220, 1204, 4498,
+ 1911, 945, 877, 3788, 778, 1913, 2241, 4027, 1916, 4886,
+ 1320, 2244, 2952, 2953, 784, 999, 880, 1296, 4255, 3833,
+ 1619, 3834, 1592, 1481, 421, 3838, 1328, 3840, 3841, 1212,
+ 4842, 5045, 1563, 2029, 4769, 3141, 3845, 3846, 3847, 3112,
+ 1350, 5106, 1069, 2001, 4738, 1213, 1136, 2280, 5084, 1823,
+ 947, 5095, 1198, 2664, 2666, 2667, 1179, 5085, 2047, 2948,
+ 1171, 1823, 880, 2064, 3175, 1007, 3426, 4786, 3441, 5102,
+ 4136, 5393, 4910, 1145, 5094, 1796, 5496, 4231, 1432, 3450,
+ 3471, 1145, 2391, 1145, 1441, 2811, 2979, 2362, 1551, 3474,
+ 5432, 1555, 2724, 5627, 2658, 2658, 421, 1455, 4153, 5439,
+ 3887, 2283, 2284, 4561, 2598, 1996, 4271, 4819, 5281, 1849,
+ 4704, 5508, 2294, 5510, 1890, 1891, 5668, 5672, 1816, 4784,
+ 5431, 4789, 5685, 1852, 1253, 4266, 1092, 1581, 2554, 5849,
+ 39, 2286, 2287, -2292, 880, 4522, -1936, 5182, 1996, -1928,
+ 2313, 2811, 4848, 1996, 2240, 2302, 5830, -3075, 1092, 1606,
+ -3076, 2295, 936, 1611, 1612, 1613, -3075, -3075, 2811, -3076,
+ -3076, 428, 1903, 1624, 5556, -1936, -1895, 4093, 953, 5278,
+ 1475, -1908, 40, 5155, 5156, -1933, 5158, 5159, 5160, 5161,
+ 5162, -3073, 1275, 2841, 2964, 1893, 1896, 428, 1903, 2502,
+ -3073, -3073, 367, 372, 2592, 419, 368, 370, 377, -1923,
+ 2959, 419, 2831, 39, 3864, 39, 5579, -2291, 2192, 39,
+ 2273, -3072, 3991, 1249, 3993, 4260, 1356, 420, 2508, 428,
+ -3072, -3072, 2273, 934, 38, 39, -2666, 1671, 1672, 1278,
+ 40, 3813, 419, 1960, 3053, -2666, -2666, 4586, 1793, 35,
+ 428, 5767, 428, 37, 3322, 38, 39, 38, 39, 428,
+ 2510, 40, 420, 40, 38, 39, -152, 1671, 1672, 421,
+ 40, -152, 5589, 5590, 3360, 2397, 363, -152, 2378, 884,
+ 4067, 3259, 2273, 2273, 3089, 268, 4321, 2273, 419, 3026,
+ 2273, 5109, 259, 1214, 4316, 3360, -2179, 2283, 2284, 1827,
+ -2463, 2368, 4616, -2179, 421, 428, 3401, 424, 2831, 271,
+ 38, 3531, -2289, 3402, 2254, 2273, 40, 1553, 5985, 2273,
+ 2143, 3865, 3101, 2294, 1357, 884, 2609, 734, 2273, 2753,
+ 5695, 1566, 428, 5036, 35, 2662, 2735, 4855, 37, 1782,
+ 1617, 39, 4972, 5802, 2988, 2989, 5732, 3102, 6083, -2198,
+ 5973, 5179, 1961, 3050, 5555, 2670, -2198, 2754, 2671, 2616,
+ 419, 2892, 2665, 2806, 2569, 2179, 6129, 6130, 3548, 3618,
+ 39, 5851, 3453, 1358, 1144, 2162, 1320, 1632, 1215, 3060,
+ 2146, 5055, 1144, 2836, 1144, 2837, 3650, 2502, 5654, 1277,
+ 2577, -436, 2545, 2174, 5729, 3239, 2663, 884, 894, 2181,
+ 1339, 2831, 2182, 4246, 1083, 3498, 2297, 115, 1221, 2886,
+ 5542, 1463, 1664, 428, 3345, 4277, 2508, 3348, 5550, 4856,
+ 2285, 2831, 2725, 2831, 40, 119, 2903, 2298, 1084, 1340,
+ 1359, 2946, 2578, 4422, 5655, 1481, 5673, 4044, 5764, 4247,
+ 3420, 428, 895, 2167, 3298, 3514, 2838, 3651, 2510, 3518,
+ 1968, 6067, 2593, 2198, 3549, 2617, 2807, 3454, 3061, 1504,
+ 1633, 5180, 3619, 3090, 1481, 4093, 2467, 993, 2672, 6189,
+ 1645, 3051, 5056, 1256, 1257, 1238, 2541, 2197, 2320, 5037,
+ 4857, 2570, 997, 2572, 4858, 2909, 2831, 2350, 2585, 2585,
+ 2541, 5803, 2757, 4487, 6177, 2144, 2831, 2842, 2831, 2274,
+ 2497, 2438, 3573, 5289, 2599, 5696, 2755, 3866, 4546, 1238,
+ 2843, 2274, 2844, 1962, 3532, 4973, 3533, 3299, 1364, 3240,
+ 2588, 2589, 1365, 419, 4498, 5652, 6123, 2544, 894, 3027,
+ 1673, 1004, 1004, 4093, 272, 3103, 1481, 4094, 4095, 4096,
+ -2463, 2427, 2978, 1619, 4321, 2502, 1290, 5984, 1619, 4944,
+ 4317, 1963, 1464, 5972, 273, 1190, 2965, 5057, 419, 1969,
+ 2162, 2274, 2274, 6121, 999, 2380, 2274, 5951, 4516, 2274,
+ 295, 735, 895, 2845, 2508, 313, 2036, 1925, 3300, 1249,
+ 3814, 3301, 2281, 4093, 1964, 2966, 3038, 5424, 2451, 1364,
+ 3290, 2297, 6167, 1365, 2274, 268, 3867, 2320, 2274, 2145,
+ 5054, 2960, 1216, 2198, 2428, 1904, 2510, 2274, 4587, -2463,
+ 3054, 1666, 2298, 954, 1254, 2893, 5478, 4286, 1660, 271,
+ 2297, 1364, -2463, -2292, 3361, 1365, 2299, 4852, 2796, -1928,
+ 3091, 1904, 1899, 6187, 2555, 5224, 5196, -3075, 3614, 5228,
+ -3076, 2298, 5103, -2179, 2920, 4159, 4108, 2923, 1089, 1090,
+ 2275, 4786, 1965, 3403, 1247, 2301, 2285, 1343, 2361, 2798,
+ 3148, 2289, 2303, 2941, 1255, -1933, 1481, 2930, 2529, 2805,
+ 5844, -3073, 6059, 877, 1481, 1481, 6058, 2381, 6069, 5468,
+ 2383, 1285, 3209, 2387, 5167, 2389, 2871, 5266, 2392, -1923,
+ 1481, 3302, 2396, 2499, 2365, 2542, -2198, -2291, 1465, 3432,
+ 5013, -3072, 5934, 5215, 1200, 5217, 1905, 1906, 2398, 5621,
+ 4097, 5058, 2317, 2328, 1598, 2056, -2666, 2352, 2567, 878,
+ 2355, 3241, 2987, 2152, 2152, 2152, -1895, 1880, 1881, 420,
+ 5246, 3689, 4098, 4498, 1466, 1633, 1905, 1906, 2057, 3422,
+ 1477, 3242, 1423, -152, -152, 2320, 4479, 4480, 1857, 4645,
+ 3633, 2947, 2910, 4423, 3615, 2913, 2914, 2502, 6125, 2681,
+ 1633, 2605, 3153, 4257, 3179, 878, 2643, 421, 1406, 6006,
+ 5428, 421, 4419, 1412, 1415, 945, 2872, 1413, 1414, 377,
+ 2644, 5059, 1880, 1881, 945, 733, 2508, 4273, 6029, 4274,
+ 1646, 1970, 945, 1467, 733, 945, 1249, 2198, 1004, 1468,
+ 4099, 6033, 3303, 1491, -1895, 1266, 3574, 1599, 733, 1605,
+ 5748, 1610, 2758, 2198, 4540, 4676, 4458, 1614, 2510, 5290,
+ 2815, 6166, 5017, 3219, 1120, 4561, 4874, 1008, 4915, 3690,
+ 2330, 2603, 5076, 1291, 3231, 35, 5451, 878, 1590, 37,
+ 2428, 1605, 1610, 1636, 272, 2048, 733, 2496, 2603, 3823,
+ 4219, 5977, 733, 5016, 1971, 5983, 1586, 3008, 5961, 4472,
+ 1004, 2995, 318, 1212, 273, 733, 4517, 3199, 4832, 2815,
+ 5708, 6184, 343, 3202, 1191, 2745, 5952, 2362, 5756, 1213,
+ 295, 5976, 39, 1428, 1478, 313, 2815, 4389, 1534, 3538,
+ 377, 733, 3500, 2746, 3500, 5388, 945, 4473, 4474, 347,
+ 5619, 1532, 5743, 6111, -1670, 945, 733, 1805, 3138, 3139,
+ 1121, 2117, 945, 2424, 733, 945, 3220, 1636, 5752, 3,
+ 2811, 1943, 3471, 1083, 366, 2925, 4225, 1532, 733, 2437,
+ 4236, 4105, 4106, 4107, 4108, 76, 1263, 4333, 5665, 5129,
+ 5130, 5131, 5132, 5133, 733, 2448, 4031, 1084, 1860, 371,
+ 2172, 2747, 2880, 2118, 2049, 1249, 3483, 765, 3605, 1593,
+ 6148, 4200, 3587, 3352, 4201, 4202, 2745, -2408, 2651, 4847,
+ 2748, 427, 5120, 1944, -1895, 4203, 4204, 4205, 3386, 4206,
+ 4207, 6060, 4817, -1670, 4208, 4209, 4210, 1591, 5578, 3476,
+ 4569, 6068, 2538, 4100, 4101, 4102, 4390, 4103, 4104, 4105,
+ 4106, 4107, 4108, 890, 1604, 891, 1609, -1673, 5389, 4334,
+ 1828, 2526, 2527, 2528, 2529, 382, 1623, 39, 4258, 1120,
+ 1792, 419, 1818, 1975, 1800, 419, 5563, 2308, 39, 1320,
+ 3546, 4943, 5069, 1617, 945, 945, 1639, 1641, 1786, 3606,
+ 5615, 1145, 2747, 733, 1617, 1145, 39, 4103, 4104, 4105,
+ 4106, 4107, 4108, 3105, 4033, 1603, 2162, 1608, 884, 35,
+ 1083, 2748, 5991, 37, 421, 1625, 5744, 3945, 1122, 733,
+ 1945, 945, 5261, 6131, 5473, 5907, 5452, 6135, 3189, 5709,
+ 5912, 733, 1871, 5494, 1084, 5500, -1673, 1638, 1640, -1670,
+ 5504, -2804, 1083, 5506, 3477, 2759, 4597, 4090, 4091, 3681,
+ 1235, 1009, 4110, 2162, -2444, 1121, 4342, 3425, 5497, 1123,
+ 1124, 1234, 2320, 5346, 3387, 2050, 1084, 2749, 2152, 3388,
+ 4496, 5909, 3083, 5823, 2119, 2296, 6144, 4848, 2308, 6165,
+ 2734, 4211, 733, 733, 3484, 39, -2465, 5347, 5430, 4140,
+ 4141, 4848, 2122, 5418, 2928, 3719, 5822, 1806, 2123, 877,
+ -1670, 3228, 3229, 2051, 4596, 5858, 3389, 4391, 5842, 1010,
+ 5846, 1236, 3851, 1958, 2309, -1895, 4501, 5843, 4032, 2232,
+ 1429, 3221, 318, 6188, -1895, 1535, 2285, -1895, 1938, -1895,
+ 5273, 4598, 343, 5845, 1235, 5857, 2052, -2408, 1264, 4224,
+ 1136, 2103, -1673, 6199, 1952, 4392, 6200, 1011, 3720, 1012,
+ 212, 1235, 1125, 5620, 6145, 123, 124, 3084, 2749, 347,
+ 4593, 2233, 4504, 2339, 3609, 4343, 1807, 1145, 1145, 783,
+ 5304, 2524, 2525, 2526, 2527, 2528, 2529, 2120, 4393, 1660,
+ 2750, 3016, 967, 1949, 366, 1950, 220, 2173, 5992, 1626,
+ 1597, 945, 945, 421, 2760, 1236, 4776, -2408, 1237, 3588,
+ 945, 2124, 2497, -1673, 1927, 2340, 3721, 1532, 4652, 371,
+ -1670, 945, 1236, 1122, 1618, 2309, 1062, 945, 4506, 1083,
+ 945, 2539, 4212, 3017, 1238, 6085, 4034, 5801, 231, 3827,
+ 5262, 2161, 1532, -1752, 3137, 3181, 1063, 2260, 6146, 3526,
+ 4408, 234, 969, 1084, 1892, 1895, 5746, 1532, -1670, 3390,
+ 892, -1670, 3435, 3682, 1123, 1124, 3165, 4848, 5152, 3235,
+ 6117, -2804, 2539, -2502, 246, 948, 1320, 1320, 419, 4777,
+ 1064, 2750, 4035, 1619, -2444, 382, 960, 3155, 3485, 1619,
+ 4213, 4308, 1144, 2761, 1872, 4599, 1144, 3173, 3195, 2664,
+ 3218, 945, 945, 945, 3223, 5974, 3130, 1013, 3227, 1207,
+ 5847, 3230, 4778, 1207, 205, 3605, -2465, 3503, 1238, 5265,
+ 3722, 5379, 3852, -1673, 2018, 5725, 4509, 4779, 967, 6043,
+ 4923, -2804, 5704, 4309, 3475, 1238, 2940, 4780, 2878, 1200,
+ 3154, 5810, 2234, 2895, -2444, 2310, 3315, 1532, 1617, 1062,
+ 5081, 3135, 3250, 3148, 3236, 3167, 5348, 2831, 3169, 3672,
+ 4261, -1673, 4036, 4781, -1673, 4600, 5115, 2832, 4510, 1063,
+ 4653, 967, 2125, 4679, 2696, 5082, -2465, 3085, 4344, 4345,
+ 6086, -1751, 4237, 377, 4511, 35, 2341, 733, 969, 37,
+ 5501, 3086, 6147, 1221, -1107, 5904, 3606, -588, 3408, 5150,
+ 4214, 1586, 4705, 1064, 3018, 733, 1911, 4346, 950, 1928,
+ 2126, 1913, 3673, -1752, 1916, 76, 76, 3738, 76, 980,
+ 2858, 981, 3045, 1320, 6118, 1823, 945, 5766, 4498, 1239,
+ 2601, 969, 5770, 5771, 733, 2320, 3222, 3631, 5674, 3225,
+ 3226, 3723, 4924, 2127, 2267, 2235, 2310, 2214, 1240, 3724,
+ 3772, 74, 3725, 5675, 4782, 5005, 3773, 419, 878, 5008,
+ 5009, 202, 5011, 2610, 2611, 2311, 2615, 5676, 1144, 1144,
+ 733, 5811, 2879, 5910, 1618, 1618, 3101, 5031, 3781, 1213,
+ 1213, 4512, 1213, 3898, 1532, 2382, 733, 2384, 5035, 2342,
+ 2388, 212, 2390, -2502, 884, 2393, 2394, 2395, 2268, 1205,
+ 6097, 3102, 733, 1303, 4310, 2198, 733, 3019, 2402, 3674,
+ 1304, 1305, 1306, 2661, 2994, 5043, 4529, 945, 3816, 3285,
+ 3287, 3737, 2430, 5070, 2431, 2925, 3294, 220, 4807, 6044,
+ 2152, 3989, 3308, 3309, 3310, 2922, 3409, 4332, 5494, 4928,
+ 765, 765, 5502, 3327, 3329, 5812, 4925, 945, 3339, 3191,
+ 1860, -1751, 4238, -2502, 3739, 980, 3762, 981, 3213, 3774,
+ 3156, 2267, 3742, 5083, 1206, 3745, 1481, 4848, 1259, 231,
+ 5075, 3609, 4669, 1065, 3168, 945, 945, 945, 3894, 945,
+ 2859, 35, 234, 986, 202, 37, 2662, 3174, 4089, 2934,
+ 3807, 2533, 5081, 3712, 3713, 4496, 2269, 3716, 980, 945,
+ 981, 3906, 3907, 3908, 3909, 246, 2763, 4311, 6045, 2860,
+ 3046, 983, 877, 3914, 212, 3194, 2764, 5082, 2935, 1066,
+ 4941, 2559, 2560, 985, 1981, 5679, 2214, -693, 3605, 5032,
+ 6026, 3823, 951, 5680, 2861, 6046, 733, 4467, 3942, 2575,
+ 1207, 5677, 5651, 765, 733, 733, 5134, 2663, 5135, 6098,
+ 220, 4929, 2270, 5763, 6099, 3817, 3818, 3819, 3966, 1356,
+ 733, 3787, 6065, 6066, 1356, 420, 420, 1943, 1154, 2856,
+ 5171, 5829, 5172, 5981, 5617, 3675, 3560, 885, 1205, 5850,
+ 4424, 945, 877, 1410, 4530, 945, 945, 886, 4631, 5405,
+ 3726, -1723, 231, 4501, 5632, 2967, -1723, 3786, 4808, 4502,
+ 945, 1839, 2069, 5044, 3214, 234, 421, 421, 421, 3606,
+ 4805, 4503, 2236, 2269, 420, 3233, 5026, 4374, 3593, 1944,
+ 3775, 2070, 2700, 6133, 2678, 4459, 1106, 733, 246, 1320,
+ 4375, 894, 3561, 2237, 2915, 39, 3215, 4802, 5878, 4504,
+ 5027, 4505, 247, 1206, 3607, 5633, 1110, 2271, 3589, 3216,
+ 2791, 3594, 3595, 5634, 3778, 2320, 421, 1357, 3776, 3893,
+ 1238, 4194, 1357, -1723, 421, 1118, 967, 3726, 1155, 2270,
+ 1532, 2071, 4806, 4229, 2765, 895, 421, 2320, 1208, 2053,
+ 1845, 5635, 3608, 5694, 3217, 2619, 1145, 1576, 887, 1958,
+ -1682, 3777, 3779, 1958, 5467, 4506, 5681, 2943, 4573, 4420,
+ 4292, 1840, 3581, -1682, 4496, 5967, 1358, 6168, -1682, 1150,
+ -1723, 1358, 2766, 4848, 2161, 5173, 1945, 1968, 4688, 1207,
+ 4689, 2038, 4194, 4507, 6191, 3780, 969, 1145, 2620, 2968,
+ 3512, 3705, 4684, 4685, 4686, 4687, 5636, 1532, 4692, 4693,
+ 4694, 4695, 4696, 4697, 4698, 4699, 4700, 4701, 1227, 5637,
+ 5975, 38, 1847, 5759, 4777, -1682, 4222, 40, 2072, 4596,
+ 2619, 5638, 5920, 1359, 2271, 948, 4020, 1228, 1359, 2916,
+ 3935, 4421, 2917, 2858, 1532, -1682, 1946, 1229, 1119, 5826,
+ 5879, 5392, 1667, 1145, 3609, 5293, 5294, 4778, 4508, 5981,
+ 1780, 2238, 2039, 4509, 3652, 4848, 5840, 4742, 4743, 2094,
+ 1145, 3627, 5230, 2620, 4913, 3706, 2073, 1532, 894, 2074,
+ 5880, 1203, 4780, 5538, 1947, 5540, 2739, 1802, 205, -461,
+ 5423, -2313, -1682, 1952, 2924, -175, 1969, 2740, 1952, 888,
+ 1153, -1682, 5690, 5921, 878, 4510, 5872, 2622, 2561, 1059,
+ 2095, 5403, 877, 3153, 2754, 2741, 2198, 1948, 5029, 1481,
+ 2096, 4511, 895, 4690, -175, 3653, 5588, 1208, 2076, 1781,
+ 419, 419, 419, 4691, 2621, 3782, 1309, 1310, 1311, 733,
+ 1312, 1313, 1314, 1315, 1316, 1317, 4914, 3718, 1230, 1949,
+ 4889, 1950, 2502, 6061, 1845, 945, 945, 945, 5364, 1846,
+ 5365, 5366, 2018, 980, 5367, 981, 4848, 2623, 3783, 1952,
+ 2858, 3958, 2078, 1952, 2085, 1481, 1532, 2562, 4426, 5383,
+ 419, 1187, 2622, 4890, 5599, 6071, 1180, 5030, 419, 1673,
+ 3132, 2214, 4093, 1532, 2079, 5867, -3077, -3077, -3077, 4782,
+ 419, 1951, 1806, 2859, 1845, 3556, 421, -461, 2056, 1958,
+ 1193, 1532, 2086, 2510, 2081, 1231, 4853, 5639, 4512, 212,
+ 5640, 3440, 5286, 5914, 3804, 4427, 1847, 4002, 5600, 5963,
+ 733, 2057, 2860, 3628, 4042, 4043, 6124, 884, 733, -1682,
+ 1221, 5585, 2623, 2848, 3036, 896, 2585, 1144, 3801, 2056,
+ 733, 4855, 3560, 5601, 2123, 220, 1364, 2861, -2292, 4198,
+ 1365, -1113, 5800, 4891, 5586, 952, 2742, 1532, 5833, 3256,
+ 5602, 1807, 2057, 1848, 5603, 4272, 1847, 2849, 2097, 1056,
+ 945, 2355, 4019, 945, 1660, 2949, 1532, -385, 1144, 1232,
+ 3244, 5287, 2856, 945, 2056, 5604, 5804, 231, 5605, 1532,
+ 4196, 1364, 2066, 4900, 1832, 1365, 1202, 1929, 4289, 3911,
+ 3903, 1532, 2098, 5606, 3912, -385, 2099, 2057, 1456, 4549,
+ 4322, 2087, 6041, 1848, 945, 945, 377, 733, 733, 4559,
+ 2859, 5562, 1151, 4856, 1456, -1512, 6072, 189, 2858, 945,
+ 2067, 733, 945, 4257, 1144, 1930, 4350, 247, 1217, 2100,
+ 5247, 1532, 1532, 1457, 733, 733, 4220, 2124, 2896, 2860,
+ 5394, 1144, 5795, 2899, 6190, 2858, 3055, 5796, 76, 1457,
+ 3970, 76, 3255, 6055, 5593, 1798, 4644, 1224, 1931, 6028,
+ 733, 4892, -1722, 4899, 2861, 1412, 1415, -1722, 1458, 1413,
+ 1414, 377, 4884, 5903, 4857, 1593, 4325, 2565, 4858, 2056,
+ 3282, 5607, -2868, 5792, 4542, 5794, 4418, 5395, 4053, 5798,
+ 5799, 4056, 5025, 4875, 4057, 5077, 4645, 5797, 1940, 2856,
+ 945, 877, 2057, 945, 945, 4157, 2069, 4991, 4500, 2983,
+ 212, 5552, 1481, 3912, 2970, 3197, 1459, 3198, 2976, -385,
+ -385, 3200, 2984, 3201, 6173, 2070, 3203, 6174, 4992, 8,
+ 3204, 5608, 1459, 2980, -1722, 2858, 1941, 6120, 5834, 4099,
+ 419, 945, 945, 4049, 1259, 2981, 220, 945, 945, 4916,
+ 2985, 4381, 3784, 3307, 945, 945, 945, 4657, 4345, 945,
+ 3616, 945, 2915, 945, 945, 945, 945, 945, 945, 1942,
+ 945, 6109, 945, 945, 4834, 2071, 945, 884, 2859, 2831,
+ 1265, -1722, 1320, 2982, 5105, 3785, 4901, 2091, 231, 2839,
+ 1532, 945, 945, 945, 945, 421, 4009, 5595, 5373, 945,
+ 4545, 234, 2152, 945, 6158, 2859, 945, 2860, 2152, 945,
+ 945, 945, 945, 945, 945, 945, 945, 945, 2848, 945,
+ 4613, 4614, 5267, 1832, 246, 2092, -1670, 945, 5835, 4488,
+ 945, 5374, 2861, 3358, 2860, 5306, 212, 4092, 6073, 4518,
+ 2242, 420, 5311, 3550, 5409, 3553, 1934, 2056, 4776, 4120,
+ 3691, 2858, 2849, 1276, 4230, 4386, 1481, 6155, 2093, 2861,
+ 5836, 1278, 2072, 2243, 4145, 2858, 4146, 2856, 5410, 5645,
+ 2057, 1364, 220, 1288, 3057, 1365, 3487, 3547, 5585, 1286,
+ 1935, 4143, 35, 421, 1936, 733, 37, 5096, -1513, 2347,
+ 4147, 945, 4281, 4387, 2856, 2859, 1249, 2916, 3094, 1301,
+ 2917, 5586, 2858, 420, 3443, 420, 945, 1302, 4299, 2297,
+ 2073, 5860, 2348, 2074, 231, 945, 945, 1937, 2355, 877,
+ 1345, 4777, 3543, 1354, 2860, 4172, 4388, 234, 2924, 5089,
+ 2298, 1355, -3077, -3077, -3077, 3613, 4103, 4104, 4105, 4106,
+ 4107, 4108, 1363, 75, 2299, 421, 3945, 421, 3447, 2861,
+ 246, 4974, 4835, 6106, 4778, 1417, 74, 878, 4836, 35,
+ 5585, 2297, 2076, 37, 247, 4837, 4416, 733, 5749, 4779,
+ 1419, 3448, 4194, 1422, 4975, 4194, 5754, 4850, 4851, 4780,
+ 4425, 2113, 2298, 5586, 2856, 3880, 76, 76, 2858, 4496,
+ 733, 3371, 3372, 3373, 3374, 1425, 2301, 1532, 4148, 6022,
+ 4838, 1532, 1532, 1451, 4149, 4781, 2078, 2046, 733, 4150,
+ 3148, 2859, 2063, 421, 733, -587, 4270, 4460, 733, 2114,
+ 2059, 1460, 4839, 2115, 732, 2859, 733, 1438, 2079, 1673,
+ 1636, 1636, 4093, 1430, 1636, 1431, 4094, 4095, 4096, 2130,
+ 2860, 1433, 2134, 1434, 733, 3719, 877, 945, 2081, 419,
+ 877, 2161, 2116, 4730, 2860, 1461, 35, 428, 1462, 945,
+ 37, 2858, 2859, 1532, 1470, 2861, 945, 6172, 40, 945,
+ 945, 2363, 2550, 877, 3752, 2364, 2551, 1532, 4194, 2861,
+ 4618, 4619, 4620, 4621, 4622, 3717, 884, 1473, 998, 733,
+ 5127, 2860, 4831, 2285, 1016, 1938, 4782, 2285, 3720, 2725,
+ 2856, 4535, 1145, 4876, 2371, 3425, 2372, 2363, 5258, 733,
+ 733, 3186, 1585, 428, 2856, 5686, 2861, 428, 1532, 4063,
+ 1533, 2006, 1109, 2603, 2632, 2501, 4064, 2007, 2502, 1484,
+ 4065, 3153, 6205, 4119, 877, 4121, 4122, 419, 4900, 1885,
+ 421, 733, 1488, 1481, 421, 1481, 4663, 1542, 2859, 4151,
+ 3881, 2856, 3371, 3372, 3373, 3374, 3721, 2508, 1914, 2439,
+ 4152, 2440, 877, 1543, -3077, 733, 2454, 421, 247, 2009,
+ 2596, 733, 2597, 2602, 212, 2603, 4917, 2860, 733, 4620,
+ 4621, 4622, 3679, 1145, 4648, 733, 3727, 1549, 733, 2510,
+ 3125, 2607, 3126, 2597, 733, 4519, 1636, 4521, 1560, 419,
+ 1885, 419, 2861, 1567, 2285, 3703, 2725, 2146, 1057, 3188,
+ 220, 2603, 40, 3210, 733, 3211, 1588, 878, 5302, 1627,
+ 733, 2859, 3212, 2010, 3211, 733, 1481, 1631, 421, 3425,
+ 2011, 4098, 1635, 2012, 877, 2292, 2293, 2856, 733, 4278,
+ 4279, 2654, 2655, 3247, 2501, 3248, 3899, 2502, 2992, 2993,
+ 2860, 733, 231, 3446, 5423, 2355, 421, 1642, 4230, 2013,
+ 3722, 1673, 733, 3727, 4093, 234, 3758, 419, 4094, 4095,
+ 4096, 3495, 3625, 2603, 3626, 2861, 2508, 4173, 4590, 4174,
+ 945, 945, 945, -3077, 1648, 4731, 945, 3697, 246, 3698,
+ 3857, 1649, 3858, 2014, 3703, 3971, 4011, 2603, 3211, 4099,
+ -3077, 1650, 247, 3882, 884, -3077, 1653, 4062, 2510, 2603,
+ 2856, 123, 124, 4071, 3368, 2603, 3369, 1657, 945, 1532,
+ 1658, 4893, 4618, 4619, 4620, 4621, 4622, 4077, 421, 2603,
+ 4623, 1267, 1268, 1659, 4078, 3727, 2603, 4194, 1660, 4079,
+ 3370, 2603, -3077, 3472, 3473, 3727, 4871, 4112, 1661, 2603,
+ 1269, 1662, 3883, 1270, -1746, -1746, 2108, 2069, 5470, 4641,
+ 2016, 1663, 945, 4792, 1670, 4125, 3862, 2603, 1668, 1200,
+ 2017, 4130, 4175, 4131, 4176, 4142, 2070, 1804, 4367, 2018,
+ 4368, 3723, 3727, 4372, 1801, 4373, 4397, 1808, 4398, 3724,
+ 1810, 2019, 3725, 1144, 419, 2517, 1815, 4402, 419, 1809,
+ 4456, 3941, 4398, 4570, 1532, 4571, 4581, 1824, 4582, 733,
+ 2654, 3496, 1249, 1200, 4584, 4411, 4585, 1829, 4609, -3077,
+ 4610, 419, 945, 4611, -3077, 2603, 2071, 1832, 4711, 2136,
+ 4712, 884, 2021, 2022, 4722, 884, 4723, 4733, 1830, 2603,
+ 1271, 3371, 3372, 3373, 3374, 4997, -1749, -1749, 3375, 3376,
+ 4815, 4820, 4816, 4821, 3377, -1750, -1750, 5012, 884, 3378,
+ 1833, -3077, 2137, 4098, 4830, 733, 3533, 4854, 5078, 3211,
+ 3211, 5018, 1272, 5019, 1144, 1843, 74, 74, 5147, 74,
+ 2428, 5168, 419, 2603, 5197, -3077, 3248, 5209, 1858, 2603,
+ 4895, 4940, 4100, 4101, 4102, 1885, 4103, 4104, 4105, 4106,
+ 4107, 4108, 5269, 5275, 3533, 5276, 4178, 4179, 4180, 1842,
+ 419, 1844, 1273, 2072, 2517, 5282, 5283, 3211, 3211, 884,
+ 733, 5425, 5459, 5426, 4610, 5475, 878, 5476, 6003, 6004,
+ 2024, 4099, 1862, 1200, 877, 5477, 1532, 2603, 733, 5484,
+ 877, 3248, 5557, 5646, 5558, 3211, 733, 884, 1859, 5687,
+ 945, 5688, 5192, 1532, 1863, 5705, 945, 3248, 5712, 945,
+ 5713, 2073, 945, 5722, 2074, 2355, 4194, 189, 1532, 1865,
+ 4194, 4528, 5728, 4531, 4556, 5730, 1869, 4556, 945, 2924,
+ 6091, 6092, 419, 945, 5002, -3077, 5741, 5785, 5742, 5786,
+ 1873, 1874, 2524, 2525, 2526, 2527, 2528, 2529, 5825, 3379,
+ 2564, 5859, 1870, 5742, -3077, 4681, 1875, 945, 945, 945,
+ 3380, 1876, 945, 2076, 5873, 5874, 3248, 4131, 1877, 884,
+ 945, 945, 945, 945, 5875, 1878, 2603, 998, 421, 5886,
+ 5892, 5887, 2355, 945, 421, 5895, 945, 4556, 945, 4710,
+ 5913, 5919, 3211, 3248, 5925, 5926, 3248, 3248, 1886, 945,
+ 945, 1879, 5929, 945, 2603, 1887, 5930, 2078, 2603, 5703,
+ 212, 5931, 5959, 5932, 5960, 6010, 4126, 6011, 6014, 6015,
+ 2355, 2603, 4133, 945, 6016, 945, 2603, 945, 6018, 2079,
+ 2603, 6037, 6063, 6038, 6064, 1889, 6093, 4754, 4556, 6105,
+ 6132, 5735, 5742, 6170, 1917, 6171, 220, 945, 1918, 2081,
+ 1885, 6183, 1919, 2603, -3077, 1885, 1885, 6185, 945, 6186,
+ 1938, 2524, 2525, 2526, 2527, 2528, 2529, 6203, 6211, 6011,
+ 6186, 1885, 733, 1932, 4100, 4101, 4102, 1973, 4103, 4104,
+ 4105, 4106, 4107, 4108, 5144, 4656, 1999, 5229, 231, 5232,
+ 945, -3074, 5399, 2002, 878, 2004, 2005, 2036, 2040, 2041,
+ 2042, 234, 3323, 2053, 2055, 945, 2065, 2068, 2090, 2104,
+ 3341, 2162, 2105, 2121, 2131, 2132, 2140, 2135, 2141, 945,
+ 2142, 2163, 2165, 4230, 246, 2166, 2168, 2171, 2175, 2673,
+ 2674, 2176, 2184, 2185, 2188, 2191, 3425, 2194, 247, -1438,
+ 5089, 2196, -1438, 2202, 2205, 2198, 2207, 2216, 4230, 2217,
+ 2221, 2224, 2222, -195, 2692, 2694, 2225, 2227, 2229, 2230,
+ 2245, 1532, 2252, 2259, 1532, 913, 1532, 2264, 2272, 2277,
+ 2278, 1532, 2279, 2285, 2281, 2291, 2288, 2305, 2315, 2316,
+ 2289, 2307, 2319, 2327, 2331, 2320, 733, 733, 2333, 2334,
+ 2336, 2338, 945, 2343, 2344, 2346, 2351, 2354, 2357, 2358,
+ 2369, 2403, 2436, 2443, 2452, 2445, 877, 877, 877, 4192,
+ 2453, -1899, 2446, 733, 5751, 2459, 733, -1906, 2460, 2501,
+ 1532, 878, 2502, 2461, 2462, 878, 1885, 2463, 247, 2465,
+ 2466, 2467, 419, -1897, 2468, 2469, 1885, 2470, 419, 1532,
+ 2471, 2473, 1409, 2474, 3463, 2475, 2476, -1900, 878, 2477,
+ -1898, 2508, 2478, 2479, 5885, 2480, 2536, 2482, -3077, 2483,
+ 2484, 2485, 2486, 2534, 1532, 2487, 2488, 2489, 2538, 884,
+ 4192, 2539, 2568, 2564, 2580, 884, 1617, 2595, 2590, 2606,
+ 2608, 1846, 1848, 2510, 373, 2639, 2641, 2650, 2653, 2660,
+ 1238, 2668, 2675, 2677, 2687, 2679, 2688, 2690, 2698, 2695,
+ 421, 421, 421, -3021, 1482, 1016, -3016, 2701, 2702, 878,
+ 2699, 2725, 2703, 2704, 2720, 2721, 2722, 2723, 2726, 1885,
+ 2727, 2729, 1885, 1885, 733, 2728, 2730, 5139, 5140, 5141,
+ 5142, 5143, 4230, 5256, 1532, 5310, 1532, 878, 2731, 2737,
+ 5371, 2756, 2762, 2768, 733, 2793, 2797, 2799, 75, 2800,
+ 4156, 2801, 2803, 2804, 2817, 2821, 2822, 2834, 2835, 4194,
+ 1673, 2850, 733, 4093, 2823, 2846, 4194, 4094, 4095, 4096,
+ 373, 4194, 2852, 2855, 4194, 2856, 2853, 2854, 2863, 1673,
+ 2864, 2865, 4093, 2866, 5199, 2867, 4094, 4095, 4096, 2877,
+ 2883, 2884, 2873, 2868, -3077, 2887, 2894, 2888, 2890, -3077,
+ 2889, 2891, 877, 4194, 2874, 2897, 5888, 1644, 2904, 878,
+ 2911, 2900, 2918, 2018, 2901, 2906, 2907, 4194, 2919, 2921,
+ 2926, 4563, 2927, 2942, 1885, 2932, 2938, 1532, 2933, 2937,
+ 4580, 2939, 2944, 2945, 2950, 2951, -3077, 2961, 2962, 2963,
+ 3002, 1665, 2991, 2969, 2974, 3004, 3005, 2998, 877, 733,
+ 5444, 1783, 3007, 3006, 945, 1795, 1482, 1797, 1199, 3011,
+ 945, 4606, 3012, 4748, 3013, 3014, 3015, 3021, 1532, 3022,
+ 3023, 3029, 3024, 3025, 3031, 5253, 3032, 3037, 3040, 1004,
+ 3030, 3041, 3044, 3049, 962, 3058, 3055, 3069, 3073, 2517,
+ 3074, 3082, 3093, 3096, 3099, 2087, 421, 1532, 3077, 3100,
+ 3119, 993, 3109, 733, 4564, 733, 3122, 3121, 3128, 3140,
+ 3150, 3151, 3158, 3160, 4576, 3142, 3113, 3143, 733, 1004,
+ 733, 1636, 3161, 3162, 3163, 3116, 3176, 3177, 4536, 3206,
+ 3245, 3232, 3258, 3224, 3036, 3290, 2925, 2502, 3340, 3346,
+ 3147, 3148, 421, 4605, 3359, 732, 732, 3133, 3385, 3134,
+ 1915, 3405, 1320, 3207, 419, 419, 419, 3295, 3365, 3350,
+ 3383, 3406, 4098, 1200, 3420, 3428, 1532, 3431, 3434, 3436,
+ 5050, 5051, 3429, 3437, 3438, 1206, 3452, 3465, 5178, -3077,
+ 3758, 4098, 1200, 4194, 3464, 3466, 733, 1532, 1211, 3467,
+ 5755, 884, 884, 884, 373, 3488, 5384, 3502, 3481, 3504,
+ 3505, 2554, 3522, 1532, 3523, 3525, 3551, 3554, 1976, 74,
+ 3565, 3556, 74, 3558, 3570, 4756, 4757, 4758, 4759, 3559,
+ 3575, 3576, 3580, 3578, 3582, 3590, 3600, 3601, 3604, 3622,
+ 4099, 3586, 1798, 3641, 3624, 6149, 3617, 3634, 3654, 733,
+ 6152, 1802, 1977, 3659, 3660, 3686, 4194, 3687, 3692, 4099,
+ 5789, 3685, 3696, 3732, 3790, 3704, 3803, 3811, 3748, 3711,
+ 733, 3731, 5349, 5350, 3815, 5352, 1207, 3830, 1673, 3824,
+ 3835, 4093, 3812, 877, 3843, 4094, 4095, 4096, 3836, -3077,
+ 3871, 3859, 733, 3886, 3872, 733, 2524, 2525, 2526, 2527,
+ 2528, 2529, 5200, 3890, 3892, 3837, 3901, 3888, 3910, 3913,
+ 3848, 3919, 1978, 3904, 3921, 945, 3923, 3918, 1532, 878,
+ 3920, 3922, 3926, 3929, 945, 878, 3933, 3931, 3934, 3938,
+ 3937, 3956, 945, 3957, 945, 3961, 3960, 945, 3189, 3962,
+ 3963, 1532, 945, 945, 945, 945, 3965, 1979, 945, 945,
+ 945, 945, 945, 945, 945, 945, 945, 945, 3975, 3972,
+ 419, 945, 945, 3967, 3974, 2671, 1532, 3998, 4000, 3977,
+ 5779, 945, 5781, 3978, 3976, 945, 4001, 421, 4005, 945,
+ 4007, 3986, 3987, 1980, 4013, 4014, 1673, 945, 4015, 4093,
+ 945, 4026, 945, 4094, 4095, 4096, 4016, 884, 4017, 2355,
+ 2352, 4018, 1532, 4194, 945, 3259, 419, 945, 945, 2317,
+ 4029, 4028, 945, 945, 4030, 4717, 1412, 1415, 4040, 945,
+ 1413, 1414, 377, 1982, 4045, 4037, 1633, 4047, 4052, 945,
+ 4051, 4059, 945, 4100, 4101, 4102, 4054, 4103, 4104, 4105,
+ 4106, 4107, 4108, 884, 945, 5942, 5944, 4076, 2603, 4073,
+ 5936, 4055, 4100, 4101, 4102, 1984, 4103, 4104, 4105, 4106,
+ 4107, 4108, -2171, 4144, 4194, 4155, 4127, 4089, 1482, 4074,
+ 4164, 4169, 4239, 4226, 4241, 4245, 4196, 4243, 75, 75,
+ 4098, 75, 4075, 5128, 4080, 4081, 3470, 3470, 4252, 4085,
+ 4259, 945, 4275, 4194, 4280, 69, 205, 1482, 2813, 5643,
+ 1986, 4139, 1221, 4088, 4154, 4952, 2368, 945, 4232, 1987,
+ 4111, 4117, 4124, 4138, 4165, 4167, 4960, 1988, 4265, 4168,
+ 4282, 4283, 877, 1532, 4171, 2814, 4227, 877, 4291, 877,
+ 4264, 5300, 4263, 4268, 1885, 945, 4287, 1990, 4294, 2501,
+ 4288, 2363, 2502, 2432, 5408, 4269, 1991, 4296, 4099, 4303,
+ 1992, 4318, 877, 4319, 1914, 3323, 3323, 74, 74, 5545,
+ 3323, 4329, 4330, 4331, 4336, 4337, 733, 5711, 4335, 1482,
+ 4338, 2508, 877, 4353, 4341, 4352, 4355, 4361, -3077, 4362,
+ 4192, 4363, 4371, 4192, 4376, 4385, 4399, 4401, 4098, 4405,
+ 6039, 4403, 2428, 4406, 4413, 4407, 4410, 3323, 3323, 4194,
+ 4417, 4412, 4431, 2510, 1993, 4414, 4415, 4432, 4429, 4433,
+ 4430, 4434, 5569, 5342, 4436, 4439, 421, 4435, 4437, 4441,
+ 4438, 421, 1532, 421, 4445, 4443, 4448, 4440, 4452, 4442,
+ 4444, 419, 4454, 4455, 5444, 4450, 1320, 2959, 4464, 4465,
+ 4461, 878, 878, 878, 2498, 4484, 421, 1532, 4471, 4537,
+ 5791, 4475, 4466, 2500, 1094, 4468, 4099, 4476, 4478, 3679,
+ 4533, 4911, 4486, 4526, 4539, 4541, 421, 2543, 884, 4544,
+ 4741, 4558, 1673, 4527, 4555, 4093, 1094, 4230, 5570, 4094,
+ 4095, 4096, 733, 4574, 3703, 733, 4192, 4575, 4578, 1320,
+ 4579, 4594, 4583, 4603, 4625, 4627, 4556, 4634, 4635, 1482,
+ 5936, 4636, 2574, 2576, 3758, 4637, 4638, 1482, 1482, 5568,
+ 4639, 4565, 5401, 4640, -3077, 4568, 4608, 4617, 4642, -3077,
+ 4615, 4647, 4649, 1482, 4650, 4651, 5949, 4672, 4660, 4661,
+ 4662, 4664, 4665, 4666, 4667, 4668, 2454, 4114, 4093, 4194,
+ 4682, 4100, 4101, 4102, -2170, 4103, 4104, 4105, 4106, 4107,
+ 4108, 4113, 945, 5612, 4724, 4735, -3077, 4737, 4707, 4790,
+ 4749, 4708, 4709, 4716, 5100, 4736, 4755, 4740, 4766, 4767,
+ 4794, 1885, 4796, 4775, 4812, 373, 4800, 733, 733, 1885,
+ 4799, 1532, 1885, 4809, 4803, 4814, 4818, 733, 4798, 4833,
+ 732, 4826, 4841, 4862, 945, 4870, 4878, 4864, 4865, 5721,
+ 4877, 4880, 4881, 4883, 4885, 4887, 733, 4888, 4903, 2517,
+ 5721, 4919, 4906, 4918, 4920, 4194, 4921, 4922, 4934, 4932,
+ 4933, 4194, 5778, 420, 4935, 4605, 4936, 4937, 4946, 4948,
+ 5108, 1532, 4949, 1532, 945, 945, 1481, 878, 4962, 4963,
+ 4968, 4971, 2006, 4987, 4988, 4990, 4894, 4993, 2007, 4100,
+ 4101, 4102, 5004, 4103, 4104, 4105, 4106, 4107, 4108, 5006,
+ 5007, 5003, 5010, 5022, 5047, 421, 5061, 5033, 5053, 5067,
+ 419, 5071, 5073, 3211, -3077, 419, 5068, 419, 5074, 5080,
+ 5091, 5097, 5098, 878, 5113, 5114, 373, 1199, 5116, 5117,
+ 2009, 5118, 5783, 733, 5121, 5119, 5137, 5149, 5123, -3077,
+ 419, 5145, 5151, 5126, 5271, 5157, 5164, 884, 5165, 5170,
+ 5175, 5181, 884, 5174, 884, 5184, 5185, 5186, 945, -2172,
+ 419, 5190, 4194, 5225, 5226, 5911, 5233, 5234, 5205, 5239,
+ 945, 5221, 5240, 5218, 5223, 5238, 5241, 884, 5252, 5254,
+ 5268, 5255, 4099, 2069, 2010, 4192, 5264, 5270, 5272, 5277,
+ 5278, 2011, 5707, 5284, 2012, 5288, 5307, 884, 5308, 5309,
+ 945, 5318, 2070, 945, 5312, 5319, 5320, 5332, 5335, 5341,
+ 5564, 945, 945, 5339, 1532, 5353, 5344, 5354, 945, 945,
+ 2013, 5345, 5361, 945, 1532, 5362, 5305, 5363, 2929, 945,
+ 5368, 2496, 945, 945, 5372, 2936, 5313, 945, 5375, -3077,
+ 5376, 5381, 5382, 945, 5257, 5259, 2524, 2525, 2526, 2527,
+ 2528, 2529, 2071, 4894, 2014, 945, 5385, 5391, 5390, 5396,
+ 2759, 5397, 1211, 945, 5400, 5893, 1481, 945, 5404, 5398,
+ 5406, 2501, 5908, 5414, 2502, 5417, 5419, 5422, 730, 877,
+ 5427, 5429, 5433, 5438, 5440, 5436, 5434, 5441, 5454, 5449,
+ 5442, 5465, 5464, 5460, 5472, 5480, 2368, 5471, 5774, 5775,
+ 945, 5481, 5505, 2508, 5489, 5524, 5474, 5533, 5482, 5495,
+ -3077, 5483, 5529, 5498, 76, 5536, 4895, 2108, 5509, 5539,
+ 5549, 2016, 5554, 1885, 5553, 5559, 5551, 5560, 5561, 5572,
+ 5566, 2017, 945, 5573, 5577, 2510, 5582, 5583, 5584, 2072,
+ 2018, 5613, 5591, 5032, 5622, 5624, 5649, 5625, 878, 1320,
+ 1532, 5628, 2019, 5630, 5631, 5650, 1096, 5657, 5662, 419,
+ 5659, 5667, 5670, 5689, 5691, 5692, 3070, 5699, 733, 5693,
+ 3075, 5710, 5714, 421, 5720, 4100, 4101, 4102, 1096, 4103,
+ 4104, 4105, 4106, 4107, 4108, 5735, 5760, 2073, 5739, 5724,
+ 2074, 1532, 5727, 2021, 2022, 5731, 5733, 5750, 5758, 5767,
+ 5761, 5805, 4744, 5807, 5773, 2924, 5818, 5820, 733, 4896,
+ 5778, 5813, 5827, 1532, 4192, 5817, 5832, 5839, 4192, 5854,
+ 733, 5838, 5852, 2023, 5848, 5853, 5877, 5856, 5855, 5863,
+ 5864, 5865, 5866, 5871, 5900, 5876, 945, 5901, 5884, 2076,
+ 5897, 5906, 5905, 5894, 5918, 5922, -3077, 5896, 5947, 5898,
+ 733, -3077, 5941, 5953, 2501, 5948, 5955, 2502, 5958, 5962,
+ 5988, 2503, 2504, 2505, 5965, 5966, 5986, 5989, 5987, 5994,
+ 5995, 6023, 6005, 6032, 6040, 6034, 6007, 4750, 2506, 6042,
+ 6025, 1532, 5951, 2078, 5952, 6050, 2508, 6051, -3077, 6089,
+ 6049, 2024, 6084, 2509, 6070, 6096, 6103, 6116, 6143, 6108,
+ 6150, 75, 6113, 6122, 75, 2079, 6175, 6153, 6141, 6142,
+ 945, 6157, 6176, 6178, 6179, 6180, 1481, 6204, 2510, 6193,
+ 6201, 6194, 6206, 6207, 1219, 2081, 945, 4897, 6202, 2975,
+ 4898, 3895, 2003, 1885, 2587, 4223, 3763, 3684, 4347, 6031,
+ 4909, 2517, 4902, 6035, 3802, 4483, 2102, 5610, 3850, 733,
+ 5935, 6114, 5049, 5669, 2101, 5380, 945, 5642, 4235, 4235,
+ 4012, 6027, 4285, 5543, 6110, 5956, 5954, 6048, 6127, 4290,
+ 3323, 3323, 3323, 3323, 5101, 5079, 3323, 3323, 3323, 3323,
+ 3323, 3323, 3323, 3323, 3323, 3323, 5916, 878, 5042, 3869,
+ 3870, 4907, 878, 4365, 878, 2089, 4543, 5066, 5402, 5648,
+ 3860, 4551, 1532, 4714, 1532, 5653, 3306, 6115, 6208, 6198,
+ 5626, 4489, 5107, 6053, 6081, 6082, 5571, 878, 3048, 5769,
+ 5924, 5574, 1114, 2425, 5745, 5146, 6169, 419, 3118, 2511,
+ 3528, -3077, 2856, 5110, 2512, 3323, 3323, 878, 4276, 733,
+ 3129, 3115, 5861, 1483, 3252, 3164, 1561, 3253, 4451, 3254,
+ 4938, 3800, 4547, 4961, 6075, 6192, 2513, 2514, 945, 373,
+ 1812, 5124, 1532, 2736, 884, 5125, 1834, 3451, 3196, 3442,
+ 5532, 2515, 5260, 6021, 4822, 2370, 3480, 4008, 4240, 4797,
+ 2549, 4228, 3461, 6017, 2604, 5899, 5244, 945, 945, 3479,
+ 2635, 945, 5231, 4770, 5216, 5726, 4764, 5883, 5882, 4823,
+ 4765, 6195, 6095, 6008, 6151, 5706, 945, 4718, 2636, 5526,
+ 2516, 2640, 6019, 945, 3433, 6020, 3410, 4162, 945, 2645,
+ 4068, 945, 945, 3826, 2517, 4160, 1252, 2518, 945, 945,
+ 3419, -3077, 4604, 3959, 2266, 3506, 2455, 5996, 2524, 2525,
+ 2526, 2527, 2528, 2529, 3124, 2659, 1222, 2652, 2433, 1926,
+ 945, 3497, 945, 1897, 1584, 1898, 2464, 3513, 733, 4218,
+ 733, 3510, 877, 1200, 945, 4828, 3511, 5663, 5245, 4829,
+ 4801, 2656, 1245, 4010, 3517, 3208, 78, 5531, 0, 0,
+ 0, 0, 2553, 5684, 0, 0, 0, 2481, 1622, 5530,
+ 69, 0, 0, 0, 0, 2360, 2501, 0, 0, 2502,
+ 0, 0, 2494, -3077, -3077, -3077, 1532, 733, 0, 0,
+ 0, 1094, 0, 1094, 2519, 1094, 0, 945, 0, 0,
+ 732, 1094, 1615, 1616, 0, 1004, 6209, 6210, 2508, 6156,
+ 5647, 0, 0, 0, 0, 2509, 1915, 0, 0, 75,
+ 75, 0, 0, 0, 0, 1094, 1094, 0, 0, 0,
+ 5664, 0, 0, 0, 0, 2304, 421, 4192, 0, 0,
+ 2510, 945, 0, 0, 4192, 0, 0, 0, 5682, 4192,
+ 0, 0, 4192, 0, 0, 0, 0, 0, 2318, 1482,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2329, 0,
+ 0, 0, 2332, 0, 5598, 0, 2335, 0, 2337, 0,
+ 0, 4192, 1211, 1211, 2345, 1211, 0, 0, 0, 0,
+ 2353, 0, 0, 2356, 2520, 4192, 0, 2521, 2522, 2523,
+ 0, 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0,
+ 945, 4082, 1532, 4083, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1797,
+ 0, 0, 877, 0, 0, 0, 0, 0, 1885, 945,
+ 1532, 0, 945, 0, 945, 0, 0, 0, 0, 0,
+ 0, 2511, 0, 1094, 0, 0, 2512, 0, 0, 0,
+ 3323, 0, 0, 945, 0, 0, 0, 0, 0, 945,
+ 0, 0, 1907, 945, 0, 0, 0, 0, 0, 1532,
+ 0, 0, 0, 945, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2515, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1797, 0, 0, 0,
+ 0, 0, 0, 0, 1094, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1797, 0, 0, 421, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1532, 0, 0, 0, 0,
+ 1532, 1532, 0, 0, 0, 945, 2517, 0, 0, 0,
+ 945, 945, 733, 0, 0, 0, 0, 2501, 0, 0,
+ 2502, 4192, 0, 0, 0, 0, 733, 0, 0, 0,
+ 0, 0, 5841, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 878, 0, 0, 3798, 945, 2508,
+ 419, 0, 0, 0, 0, 945, -3077, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 945, 2510, 0, 3829, 4192, 0, 3829, 884, 3829, 0,
+ 0, 0, 3829, 1885, 3829, 3829, 2519, 0, 0, 0,
+ 0, 0, 0, 3829, 3829, 3829, 0, 0, 0, 5902,
+ 0, 0, 0, 0, 0, 0, 1532, 1532, 0, 0,
+ 877, 0, 0, 0, 0, 0, 0, 5870, 0, 0,
+ 0, 5183, 0, 0, 0, 0, 0, 0, 945, 0,
+ 0, 945, 0, 0, 945, 0, 0, 0, 4745, 0,
+ 0, 0, 0, 0, 0, 945, 0, 0, 3905, 945,
+ 0, 945, 0, 945, 0, 0, 0, 0, 0, 0,
+ 945, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5220, 0, 0, 0, 0, 0, 945,
+ 3936, 0, -3077, 0, 0, 0, 2520, -3077, 0, -3077,
+ -3077, -3077, 1482, 2524, 2525, 2526, 2527, 2528, 2529, 0,
+ 0, 0, 0, 1096, 421, 1096, 733, 1096, 0, 0,
+ 0, 0, 877, 1096, 0, 0, 0, 0, 0, 3984,
+ 0, 4192, 0, 937, -3077, 0, 0, 0, 0, 0,
+ 419, 0, 0, 0, 0, 0, 0, 1096, 1096, 0,
+ 69, 69, 5598, 69, 0, 0, 0, 0, 1482, 0,
+ 0, 6140, 0, 0, 0, 0, 945, 0, 0, 1094,
+ 0, 0, 0, 0, 0, 0, 945, 884, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2517, 0, 0,
+ 0, 0, 4192, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 945, 945, 945, 0,
+ 0, 0, 0, 0, 0, 945, 421, 0, 0, 1532,
+ 0, 4192, 0, 0, 0, 945, 0, 0, 0, 0,
+ 0, 0, 0, 0, 733, 0, 6054, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 945, 0, 0,
+ 0, 0, 0, 0, 6009, 0, 0, 0, 0, 0,
+ 733, 0, 6077, 6080, 0, 0, 6078, 6079, 377, 0,
+ 0, 0, 373, 0, 0, 1096, 0, -3077, 0, 0,
+ 0, 0, 0, 0, 0, 2501, 0, 0, 2502, 730,
+ 730, 0, 0, 0, 1912, 0, 0, 0, 0, 0,
+ 945, 0, 0, 0, 0, 0, 945, 0, 0, 0,
+ 0, 0, 0, 1885, 0, 0, 945, 2508, 0, 0,
+ 0, 0, 945, 945, -3077, 945, 0, 4192, 0, 0,
+ 0, 0, 0, 0, 0, 945, 1096, 373, 1885, 0,
+ 0, 6102, 6077, 6080, 0, 0, 6078, 6079, 377, 2510,
+ 0, 0, 0, 0, 0, 0, 877, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 733, 0, 419, 0,
+ 0, 0, 0, 0, 1094, 0, 0, -3077, 0, 1094,
+ 1094, 0, 0, 0, 2524, 2525, 2526, 2527, 2528, 2529,
+ 0, 0, 945, 0, 0, 1094, 0, 0, 945, 0,
+ 0, 0, 0, 0, 0, 884, 0, 0, 0, 0,
+ 0, 0, 0, 3366, 0, 1482, 5203, 0, 0, 0,
+ 877, 0, 0, 0, 0, 945, 0, 878, 6102, 0,
+ 945, 2673, 2674, 0, 0, 0, 945, 0, 877, 0,
+ 0, 945, 0, 6077, 6080, 0, 0, 6078, 6079, 377,
+ 421, 2669, 0, 1615, 1616, 0, 0, 0, 0, 0,
+ -3077, 0, 0, 0, 0, -3077, 0, 4192, 0, 0,
+ 419, 945, 2684, 0, 0, 0, 0, 0, 2691, 2693,
+ 0, 945, 0, 0, 0, 0, 3323, 0, 6162, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 945,
+ 0, 0, -3077, 3159, 0, 0, 0, 884, 0, 0,
+ 0, 3166, 945, 0, 421, 0, 0, 0, 0, 0,
+ 0, 0, 1885, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3178, 421, 0, 945, 945, 0, 0, 0, 0,
+ 0, 0, 0, 4192, 0, 0, 0, 373, 0, 4192,
+ 1094, 0, 6162, 0, 0, 2517, 0, 0, 0, 1482,
+ 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6162, 0, 0, 0, 0, 0, 0, 0, 381, 0,
+ 0, 1885, 0, 0, 381, 35, 0, 0, 727, 37,
+ 0, 0, 0, 0, 0, 0, 2501, 0, 0, 2502,
+ 0, 0, 0, 2503, 2504, 2505, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 381, 0, 878, 0, 0,
+ 2506, 0, 0, 2507, 0, 0, 0, 0, 2508, 0,
+ 0, 1096, 0, 0, 0, 2509, 0, 0, 0, 0,
+ 0, 0, 0, 1094, 0, -3077, 1094, 1094, 0, 4370,
+ 4192, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2510, 381, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2501, 0, 0, 2502, 0,
+ 0, 0, 2503, 2504, 2505, 0, 0, 0, 2501, 0,
+ 0, 2502, 0, 4409, 419, 2503, 2504, 2505, 0, 2506,
+ 0, 0, 0, 0, 0, 0, 0, 2508, 0, 0,
+ 0, 0, 2506, 0, 2509, 0, 0, 0, 0, 0,
+ 2508, 0, 0, 381, 0, 0, 0, 2509, 5249, 0,
+ 0, 884, 0, 0, 0, -3077, 0, 0, 1094, 2510,
+ 0, 0, 2524, 2525, 2526, 2527, 2528, 2529, 0, 0,
+ 0, 0, 2510, 0, 0, 74, 0, 0, 419, 0,
+ 2501, 2511, 4449, 2502, 0, 3439, 2512, 2503, 2504, 2505,
+ 0, 0, 0, 0, 0, 0, 419, 3323, 0, 723,
+ 0, 0, 0, 0, 2506, 0, 0, 0, 2513, 2514,
+ 0, 0, 2508, 0, 0, 884, 0, 0, 0, 2509,
+ 0, 3323, 0, 2515, 0, 0, 3829, 0, 0, 0,
+ 0, 0, 0, 884, 0, 0, 0, 0, 0, 0,
+ 4482, 4482, 1885, 0, 2510, 0, 1096, 3123, 0, 0,
+ 4499, 1096, 1096, 0, 0, 878, 1482, 0, 1482, 0,
+ 0, 0, 2516, 0, 0, 0, 0, 1096, 0, 0,
+ 2511, 0, 3136, 0, 0, 2512, 2517, 0, 0, 2518,
+ 0, 0, 3144, 2511, 3145, 0, 0, 0, 2512, 0,
+ 3149, 0, 0, 0, 3152, 0, 0, 2513, 2514, 3262,
+ 0, 0, 0, 0, 4554, 0, 381, 1281, 0, 0,
+ 2513, 2514, 2515, 0, 0, 0, 1293, 0, 0, 0,
+ 0, 0, 0, 0, 1293, 2515, 0, 1293, 0, 0,
+ 0, 0, 0, 0, 730, 0, 0, 0, 4589, 1482,
+ 0, 381, 0, 69, 0, 0, 69, 0, 3263, 0,
+ 0, 2516, 0, 0, 0, 2511, 0, 878, 0, 0,
+ 2512, 0, 0, 0, 2516, 2517, 2519, 0, 2518, 0,
+ 0, 0, 3984, 0, 0, 0, 0, 0, 2517, 0,
+ 3264, 2518, 2513, 2514, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2515, 0, 0,
+ 0, 0, 0, 3265, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3266, 0, 0, 0, 0, 0,
+ 0, 0, 1096, 0, 0, 0, 0, 0, 1281, 0,
+ 0, 0, 1096, 0, 0, 3267, 2516, 1293, 0, 0,
+ 3268, 0, 3323, 0, 1293, 3296, 3297, 1293, 0, 0,
+ 2517, 0, 3311, 3312, 0, 2519, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2520, 0, 2519, 2521,
+ 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529, 0,
+ 0, 0, 3351, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3269, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3270, 0, 0, 1096, 0, 0, 1096, 1096,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4728,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2684, 0,
+ 2519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2520, 0, 0, 2521, 2522,
+ 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529, 2520, 0,
+ 0, 2521, 2522, 2523, 4084, 2524, 2525, 2526, 2527, 2528,
+ 2529, 0, 0, 0, 0, 913, 3271, 4134, 0, 3272,
+ 0, 878, 0, 0, 0, 5528, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3469, 3469, 0, 3323, 0, 3273, 0, 0, 3274, 0,
+ 1096, 0, 0, 0, 3275, 0, 0, 0, 0, 0,
+ 0, 3276, 2494, 0, 0, 0, 0, 0, 0, 0,
+ 2520, 0, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526,
+ 2527, 2528, 2529, 0, 2770, 878, 0, 0, 1094, 2771,
+ 3277, 0, 0, 0, 0, 0, 3278, 1885, 0, 3279,
+ 0, 0, 0, 878, 0, 0, 2494, 0, 1907, 0,
+ 0, 69, 69, 0, 0, 0, 0, 0, 3280, 0,
+ 0, 0, 0, 0, 2772, 0, 0, 0, 0, 3366,
+ 0, 0, 0, 0, 0, 0, 0, 2773, 0, 0,
+ 0, 0, 0, 0, 3281, 4166, 0, 0, 0, 0,
+ 3964, 1094, 2774, 0, 0, 0, 0, 0, 3973, 0,
+ 0, 4185, 0, 6094, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3988, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3994, 0, 0, 3995, 0,
+ 3996, 3997, 0, 2775, 3999, 4499, 0, 0, 0, 0,
+ 4003, 0, 4004, 0, 2776, 4006, 0, 0, 0, 0,
+ 0, 0, 1281, 0, 0, 0, 0, 0, 0, 0,
+ 4945, 0, 4185, 1293, 0, 2777, 1199, 0, 4953, 1293,
+ 2778, 4954, 1293, 4955, 381, 0, 0, 0, 381, 0,
+ 0, 0, 0, 0, 0, 0, 3637, 0, 0, 0,
+ 0, 1294, 727, 3323, 0, 0, 0, 0, 3323, 1294,
+ 0, 727, 1294, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 727, 4996, 0, 0, 0,
+ 0, 4048, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3829, 0, 0, 0, 3829, 3829, 0, 3829,
+ 0, 0, 2779, 2255, 2256, 2257, 0, 0, 0, 0,
+ 0, 0, 0, 727, 0, 0, 0, 0, 0, 727,
+ 0, 0, 0, 0, 0, 1094, 0, 0, 0, 0,
+ 0, 0, 727, 1094, 0, 0, 1094, 0, 0, 0,
+ 0, 0, 2780, 0, 0, 0, 0, 0, 1094, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 727, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1294, 727, 0, 913, 2781, 1885, 0, 1294,
+ 0, 727, 1294, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2501, 0, 727, 2502, 0, 0, 5104,
+ 2503, 2504, 2505, 0, 4499, 0, 0, 0, 2782, 0,
+ 0, 727, 0, 0, 2783, 0, 0, 2506, 0, 0,
+ 0, 2784, 0, 0, 2785, 2508, 0, 0, 0, 0,
+ 0, 0, 2509, 0, 0, 0, 0, 0, 0, 3984,
+ 3984, 3984, 3984, 3984, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1297, 0, 0, 2786, 2510, 0, 0,
+ 0, 0, 1329, 2787, 0, 0, 0, 0, 0, 0,
+ 0, 2788, 0, 0, 0, 0, 1351, 0, 2789, 0,
+ 0, 5154, 5154, 5154, 0, 5154, 5154, 5154, 5154, 5154,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2790, 0, 0, 0, 0, 0,
+ 727, 0, 0, 0, 723, 0, 0, 0, 0, 0,
+ 723, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 381, 0, 723, 0, 0, 727, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 727, 0,
+ 1096, 0, 0, 0, 730, 0, 0, 0, 0, 0,
+ 3979, 3982, 0, 0, 0, 0, 0, 0, 2511, 0,
+ 1912, 0, 0, 2512, 0, 0, 0, 0, 0, 2501,
+ 3947, 0, 2502, 0, 0, 4295, 2503, 2504, 2505, 0,
+ 0, 0, 0, 0, 0, 2513, 2514, 0, 0, 727,
+ 727, 1976, 0, 2506, 0, 0, 0, 0, 0, 0,
+ 2515, 2508, 0, 1096, 0, 0, 0, 5243, 2509, 2501,
+ 5250, 5251, 2502, 0, 0, 0, 2503, 2504, 2505, 0,
+ 0, 0, 0, 0, 0, 1977, 0, 1094, 0, 0,
+ 0, 0, 0, 2510, 0, 0, 0, 75, 0, 2516,
+ 0, 2508, 0, 0, 0, 0, 0, 0, 2509, 0,
+ 0, 0, 0, 2517, 0, 373, 2518, 0, 4354, 0,
+ 4356, 0, 0, 0, 0, 373, 0, 0, 0, 0,
+ 0, 0, 0, 2510, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1978, 0, 0, 0, 0,
+ 0, 0, 0, 0, 373, 0, 0, 0, 0, 0,
+ 381, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1294, 0,
+ 1979, 0, 0, 0, 1294, 0, 0, 1294, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2519, 2511, 0, 0, 0, 0, 2512,
+ 0, 3948, 0, 0, 0, 0, 1980, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2513, 2514, 0, 0, 0, 0, 1096, 0, 0,
+ 0, 0, 0, 0, 2511, 1096, 2515, 0, 1096, 2512,
+ 723, 723, 0, 0, 0, 0, 1982, 0, 0, 4446,
+ 1096, 0, 5356, 5357, 0, 4453, 0, 0, 0, 0,
+ 0, 2513, 2514, 0, 0, 3829, 0, 3829, 3829, 0,
+ 0, 3829, 0, 0, 0, 2516, 2515, 0, 1984, 0,
+ 0, 0, 2684, 0, 0, 4221, 0, 1094, 0, 2517,
+ 0, 0, 2518, 2520, 0, 0, 2521, 2522, 2523, 0,
+ 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0, 0,
+ 3349, 0, 4234, 4234, 0, 2516, 0, 3947, 0, 205,
+ 0, 0, 0, 3949, 0, 0, 0, 0, 0, 2517,
+ 0, 0, 1987, 0, 727, 5416, 0, 0, 1976, 0,
+ 1988, 6163, 0, 0, 1976, 0, 2494, 0, 2814, 0,
+ 0, 0, 727, 0, 0, 0, 0, 0, 0, 0,
+ 1990, 0, 4763, 0, 0, 4768, 0, 0, 0, 1991,
+ 0, 0, 1977, 1992, 5443, 0, 0, 0, 1977, 2519,
+ 0, 727, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3950, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6163, 0, 0, 373, 0,
+ 0, 0, 0, 0, 0, 0, 0, 727, 5154, 2519,
+ 0, 0, 0, 6163, 0, 0, 0, 1993, 0, 0,
+ 0, 3951, 1978, 727, 0, 0, 0, 0, 1978, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 727,
+ 4624, 0, 4626, 727, 4628, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4632, 0, 0, 0, 1979, 0, 0,
+ 0, 0, 0, 1979, 0, 0, 0, 0, 0, 2520,
+ 0, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527,
+ 2528, 2529, 0, 0, 0, 0, 4485, 0, 3948, 0,
+ 0, 0, 0, 1980, 0, 0, 0, 4658, 0, 1980,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2520,
+ 0, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527,
+ 2528, 2529, 0, 0, 0, 0, 0, 0, 0, 1096,
+ 0, 0, 0, 1982, 0, 1981, 0, 0, 0, 1982,
+ 0, 0, 1281, 0, 0, 1281, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1984, 0, 0, 0, 4499,
+ 1983, 1984, 0, 727, 0, 0, 0, 0, 0, 0,
+ 0, 727, 727, 0, 0, 0, 1293, 1293, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 727, 0, 0,
+ 0, 1293, 0, 0, 1293, 0, 205, 0, 1985, 0,
+ 1986, 0, 205, 0, 3829, 0, 1986, 0, 0, 1987,
+ 0, 0, 0, 5611, 0, 1987, 0, 1988, 0, 0,
+ 0, 0, 0, 1988, 0, 2814, 0, 0, 0, 0,
+ 0, 1989, 0, 381, 381, 381, 0, 1990, 0, 0,
+ 0, 0, 0, 1990, 0, 0, 1991, 0, 0, 0,
+ 1992, 0, 1991, 380, 727, 0, 1992, 2501, 0, 380,
+ 2502, 0, 0, 726, 2503, 2504, 2505, 0, 0, 3950,
+ 0, 0, 1293, 0, 0, 1293, 1293, 0, 0, 0,
+ 0, 2506, 0, 381, 0, 0, 0, 0, 0, 2508,
+ 380, 381, 1094, 0, 0, 0, 2509, 0, 0, 0,
+ 0, 0, 0, 381, 1993, 0, 0, 4185, 3951, 0,
+ 1993, 4, 0, 0, 0, 0, 4532, 0, 0, 0,
+ 0, 2510, 0, 0, 0, 0, 0, 0, 0, 1096,
+ 5, 0, 0, 0, 0, 373, 380, 0, 0, 0,
+ 6, 7, 0, 0, 0, 8, 0, 9, 10, 0,
+ 1515, 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, 1515, 36, 0, 37,
+ 0, 38, 39, 0, 0, 1140, 0, 40, 0, 0,
+ 0, 0, 0, 1140, 0, 1140, 373, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4612, 380, 0,
+ 0, 0, 0, 2501, 3982, 0, 2502, 0, 0, 0,
+ 2503, 2504, 2505, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2511, 0, 0, 0, 0, 2512, 0, 1482,
+ 0, 41, 0, 5793, 0, 2508, 0, 0, 0, 0,
+ 0, 0, 2509, 0, 0, 723, 0, 0, 0, 2513,
+ 2514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2515, 0, 0, 2510, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1094, 0, 0,
+ 0, 0, 0, 0, 0, 0, 727, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2516, 0, 0, 42, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2517, 0, 0,
+ 2518, 0, 0, 0, 0, 43, 4185, 0, 0, 0,
+ 4185, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 44, 0,
+ 0, 0, 0, 381, 0, 0, 0, 0, 0, 0,
+ 0, 380, 0, 0, 0, 373, 373, 0, 0, 0,
+ 0, 0, 45, 0, 0, 0, 0, 727, 2511, 0,
+ 0, 0, 0, 2512, 0, 727, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 380, 727, 0, 0,
+ 0, 0, 0, 0, 0, -3077, -3077, 2519, 0, 46,
+ 0, 0, 47, 0, 0, 0, 0, 0, 0, 1482,
+ 2515, 1281, 0, 5939, 0, 5940, 0, 0, 1293, 5945,
+ 5946, 1293, 1293, 0, 48, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2006, 0, 0,
+ 0, 0, 0, 2007, 0, 0, 0, 0, 0, -3077,
+ 5136, 0, 0, 0, 5138, 0, 2106, 0, 0, 0,
+ 0, 1294, 1294, 2517, 727, 727, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4825, 0, 1294, 2973, 727, 1294,
+ 0, 0, 0, 0, 0, 2009, 2170, 0, 0, 0,
+ 0, 727, 727, 0, 0, 0, 0, 2520, 0, 0,
+ 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529,
+ 0, 2187, 49, 0, 4674, 0, 0, 727, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2195, 0, 0, 0,
+ 0, 0, 0, 0, 1096, 0, 0, 2107, 0, 2010,
+ 0, 0, 0, 0, 0, 0, 2011, 0, 0, 2012,
+ 0, 0, 0, 2519, 0, 0, 0, 1294, 0, 0,
+ 1294, 1294, 50, 0, 0, 0, 0, 0, 3059, 0,
+ 0, 0, 0, 0, 0, 2013, 3076, 0, 51, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1094, 2973, 0,
+ 0, 0, 0, 52, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2014,
+ 0, 0, 1094, 0, 0, 0, 0, 0, 0, 1094,
+ 0, 0, 0, 53, 0, 0, 0, 0, 0, 0,
+ 1094, 54, 0, 55, 56, 57, 58, 59, 0, 0,
+ 60, 61, 62, 63, 0, 64, 65, 66, 67, 68,
+ 0, 0, 381, 2520, 0, 0, 2521, 2522, 2523, 1482,
+ 2524, 2525, 2526, 2527, 2528, 2529, 3157, 0, 0, 0,
+ 0, 0, 2108, 0, 0, 0, 2016, 0, 0, 0,
+ 0, 5291, 2006, 0, 0, 0, 2017, 0, 2007, 0,
+ 0, 0, 0, 2973, 0, 2018, 0, 0, 0, 0,
+ 0, 2106, 0, 0, 0, 1615, 1616, 2019, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5316, 5317, 0, 0, 1096,
+ 2009, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 381, 0, 727, 6164, 0, 2109, 0, 0, 2021, 2022,
+ 0, 0, 0, 2434, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4185, 0, 0, 0,
+ 0, 4185, 0, 0, 4185, 0, 0, 0, 2110, 0,
+ 0, 0, 2107, 0, 2010, 0, 0, 0, 0, 0,
+ 0, 2011, 0, 0, 2012, 0, 1094, 0, 0, 0,
+ 0, 0, 381, 0, 381, 0, 0, 6164, 0, 0,
+ 0, 0, 0, 0, 0, 5359, 5360, 0, 0, 0,
+ 2013, 0, 0, 0, 727, 6164, 0, 0, 0, 0,
+ 0, 3982, 3982, 3982, 3982, 3982, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2024, 727, 0, 380,
+ 0, 0, 0, 380, 2014, 1094, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 727, 0, 726, 0, 0,
+ 381, 727, 0, 0, 0, 727, 726, 0, 0, 0,
+ 0, 0, 0, 727, 0, 0, 0, 0, 0, 0,
+ 726, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 727, 1281, 0, 0, 0, 0, 0, 1293, 0,
+ 0, 1293, 0, 0, 1293, 0, 0, 2108, 0, 0,
+ 0, 2016, 0, 1294, 0, 0, 1294, 1294, 726, 0,
+ 0, 2017, 0, 0, 726, 0, 0, 0, 0, 0,
+ 2018, 373, 0, 0, 5458, 0, 727, 726, 0, 0,
+ 0, 0, 2019, 0, 0, 5461, 5462, 0, 0, 0,
+ 0, 373, 0, 0, 0, 0, 727, 727, 0, 0,
+ 0, 5466, 0, 726, 0, 0, 0, 0, 0, 373,
+ 0, 0, 0, 0, 0, 0, 0, 0, 726, 0,
+ 3760, 0, 0, 2021, 2022, 0, 726, 381, 727, 0,
+ 0, 381, 0, 0, 0, 0, 0, 0, 0, 0,
+ 726, 0, 2684, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 727, 3761, 381, 723, 726, 0, 727, 0,
+ 0, 0, 0, 0, 0, 727, 0, 0, 0, 69,
+ 0, 0, 727, 0, 0, 727, 4185, 0, 3519, 1096,
+ 0, 727, 0, 0, 0, 0, 2494, 0, 0, 0,
+ 937, 0, 0, 0, 0, 0, 3535, 0, 0, 0,
+ 0, 727, 3539, 0, 1096, 0, 3542, 727, 0, 0,
+ 0, 1096, 727, 0, 0, 381, 0, 0, 0, 0,
+ 0, 2024, 1096, 0, 0, 727, 0, 0, 0, 0,
+ 1094, 0, 3566, 0, 0, 0, 1094, 0, 727, 0,
+ 1094, 0, 0, 381, 0, 0, 0, 0, 0, 727,
+ 0, 937, 0, 1140, 0, 726, 0, 1140, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5329, 5330, 0, 0,
+ 0, 5333, 5334, 2876, 0, 0, 380, 3620, 0, 0,
+ 0, 726, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2501, 726, 0, 2502, 0, 723, 0, 2503,
+ 2504, 2505, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 381, 2506, 0, 0, 0,
+ 0, 0, 0, 4185, 2508, 0, 0, 0, 0, 3670,
+ 0, 2509, 0, 373, 0, 0, 0, 0, 0, 2501,
+ 0, 0, 2502, 0, 726, 726, 2503, 2504, 2505, 0,
+ 0, 0, 0, 3699, 0, 0, 2510, 0, 0, 3708,
+ 0, 0, 0, 2506, 2006, 0, 3714, 0, 0, 0,
+ 2007, 2508, 0, 723, 0, 0, 3728, 0, 2509, 0,
+ 0, 0, 3733, 2008, 0, 0, 0, 0, 1096, 0,
+ 0, 0, 0, 0, 0, 0, 727, 0, 0, 0,
+ 0, 0, 3746, 2510, 0, 3003, 0, 0, 3749, 0,
+ 373, 0, 2009, 3753, 0, 0, 0, 0, 5702, 0,
+ 0, 0, 3020, 0, 0, 0, 3770, 0, 0, 1140,
+ 1140, 0, 0, 0, 0, 0, 0, 0, 0, 3795,
+ 3039, 0, 0, 0, 0, 0, 0, 1096, 0, 0,
+ 723, 0, 727, 0, 0, 380, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2010, 2511, 0, 0,
+ 0, 0, 2512, 2011, 0, 0, 2012, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5747, 0, 0, 2513, 2514, 3120, 0, 0, 0,
+ 0, 0, 2013, 0, 0, 0, 0, 727, 0, 2515,
+ 0, 0, 0, 0, 2511, 3131, 0, 0, 0, 2512,
+ 0, 0, 0, 0, 0, 727, 0, 0, 1515, 0,
+ 0, 0, 0, 727, 0, 0, 2014, 0, 0, 0,
+ 3146, 2513, 2514, 1294, 5784, 0, 1294, 0, 2516, 1294,
+ 0, 0, 0, 0, 0, 0, 2515, 0, 0, 0,
+ 0, 0, 2517, 0, 0, 2518, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2006, 0,
+ 3172, 1515, 0, 0, 2007, 0, 0, 0, 0, 5527,
+ 0, 2069, 0, 0, 2006, 2516, 0, 0, 0, 2015,
+ 2007, 0, 0, 2016, 0, 0, 0, 0, 0, 2517,
+ 2070, 0, 2518, 2017, 0, 381, 0, 0, 0, 0,
+ 0, 381, 2018, 0, 0, 0, 2009, 0, 0, 0,
+ 0, 0, 0, 0, 2019, 0, 0, 373, 0, 726,
+ 0, 0, 2009, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2519, 0, 0, 0, 0, 726, 0, 0,
+ 2071, 1094, 0, 0, 373, 0, 0, 0, 0, 0,
+ 0, 0, 2020, 0, 0, 2021, 2022, 0, 0, 0,
+ 2010, 0, 0, 0, 0, 0, 726, 2011, 0, 0,
+ 2012, 0, 1096, 0, 0, 0, 2010, 0, 1096, 2519,
+ 0, 0, 1096, 2011, 0, 2023, 2012, 0, 4025, 727,
+ 0, 0, 0, 0, 0, 0, 2013, 0, 0, 0,
+ 0, 0, 726, 0, 0, 0, 4039, 0, 0, 0,
+ 0, 0, 2013, 0, 4025, 0, 0, 0, 726, 3353,
+ 0, 0, 0, 0, 6139, 0, 0, 2072, 0, 0,
+ 2014, 0, 2520, 0, 726, 2521, 2522, 2523, 726, 2524,
+ 2525, 2526, 2527, 2528, 2529, 0, 2014, 0, 0, 4727,
+ 0, 0, 0, 2024, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2073, 0, 0, 2074, 2520,
+ 0, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527,
+ 2528, 2529, 0, 2075, 0, 0, 4843, 2016, 0, 2006,
+ 0, 0, 0, 727, 727, 2007, 0, 2017, 0, 2108,
+ 0, 2501, 2069, 2016, 2502, 0, 2018, 0, 2503, 2504,
+ 2505, 0, 0, 2017, 0, 373, 0, 2076, 2019, 0,
+ 727, 2070, 2018, 727, 0, 2506, 0, 0, 0, 0,
+ 0, 0, 0, 2508, 2019, 0, 0, 2009, 0, 0,
+ 2509, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2077, 0, 726, 2021,
+ 2022, 2078, 0, 0, 0, 2510, 726, 726, 0, 0,
+ 0, 2071, 2794, 0, 0, 2021, 2022, 0, 0, 0,
+ 0, 0, 726, 2079, 0, 0, 0, 0, 0, 2080,
+ 0, 2010, 0, 0, 0, 0, 0, 0, 2011, 0,
+ 0, 2012, 0, 2081, 0, 2795, 0, 381, 381, 381,
+ 0, 1094, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 937, 0, 0, 937, 0, 0, 2013, 380, 380,
+ 380, 727, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6107, 0, 0, 0, 0, 0, 726,
+ 0, 727, 0, 0, 0, 0, 0, 2024, 2072, 0,
+ 0, 2014, 0, 0, 0, 0, 0, 0, 0, 727,
+ 0, 0, 0, 2024, 0, 0, 2511, 0, 380, 0,
+ 0, 2512, 3585, 0, 0, 0, 380, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3602, 0, 380, 0,
+ 0, 0, 0, 2513, 2514, 0, 2073, 0, 1140, 2074,
+ 0, 0, 5868, 0, 0, 0, 0, 0, 2515, 0,
+ 0, 4297, 0, 0, 2075, 0, 725, 937, 2016, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3635, 2017, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2018, 0, 1140,
+ 0, 0, 0, 875, 0, 0, 727, 2516, 2076, 2019,
+ 0, 0, 0, 0, 0, 0, 0, 0, -2573, 0,
+ 0, 2517, 0, 0, 2518, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5933, 0, 1096, 0, 0, 0, 3735, 0, 875,
+ 2021, 2022, 2078, 381, 0, 1140, 0, 0, 0, 0,
+ 727, 0, 727, 0, 0, 0, 0, 0, -2573, 0,
+ 0, 0, 1140, 0, 2079, 727, 0, 727, 0, 0,
+ 3736, -2573, 4377, 0, 0, 0, -2573, 0, 0, 0,
+ 0, -2573, 0, 0, 2081, 0, 0, -2573, 1139, 381,
+ -2573, 0, 0, 0, -2573, 0, 1139, 0, 1139, 0,
+ 0, 2519, 0, 0, 0, 0, 0, 0, 1282, 1284,
+ 0, 875, 1287, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2501, 0, -2573, 2502, 0, 0, 0, 2503, 2504,
+ 2505, 726, 1337, 727, 0, 0, 0, 0, 2024, 1347,
+ 0, 0, 0, -2573, 0, 2506, 0, 0, 0, 0,
+ 0, 0, 0, 2508, 0, 0, 0, 0, 0, 0,
+ 2509, 0, 0, 0, 0, 0, 0, 1418, 0, 1421,
+ 0, 0, 0, 1424, 0, 0, 0, 0, 3855, 0,
+ 0, 0, 0, 0, 0, 2510, 727, 1448, 0, 0,
+ -2573, 0, 0, -2573, 1453, 0, 0, 4462, 380, -2573,
+ 0, 2520, 0, 0, 2521, 2522, 2523, 727, 2524, 2525,
+ 2526, 2527, 2528, 2529, 0, 0, 0, 0, 5166, 4,
+ 0, 0, 726, 0, 0, 0, 937, 0, 0, 727,
+ 726, 0, 727, 0, 0, 0, 0, 0, 5, 0,
+ 0, 0, 726, 0, 0, 0, 0, 0, 6, 7,
+ 0, 0, 0, 0, -2573, 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, 2511, 0, 0, 0,
+ 0, 2512, 0, 0, 0, 0, 0, 0, 0, 1110,
+ 0, 0, 0, 1096, 381, 0, 0, 0, 0, 726,
+ 726, 0, 0, 2513, 2514, 0, 0, 0, 0, 0,
+ 0, 0, 0, 726, 0, 0, 0, -2573, 2515, 0,
+ 0, 0, 0, 0, 0, 0, 726, 726, 0, 41,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, -2573, 0, -2573, -2573, 0, 0, 0, 0, 0,
+ 0, 0, 726, 0, 0, 6161, 0, 2516, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2973, 0, 0,
+ 0, 2517, 0, 0, 2518, 4038, 0, 0, 0, -2573,
+ 0, 0, -2573, -2573, 0, -2573, 0, 0, 4643, 0,
+ 0, 0, 4050, 0, 5869, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 42, 0, 0, 4058, 0, 0,
+ 0, 0, 0, 4659, 0, 0, 0, 0, 2006, 6161,
+ 0, 0, 0, 43, 2007, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 937, 0, 6161, 0, 937,
+ 0, 0, 0, 0, 0, 0, 44, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2519, 0, 0, 0, 0, 2009, 0, 0, 0,
+ 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 727, 0, 0, 0, 380, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2034, 2035, 0,
+ 0, 0, 0, 0, 0, 0, 0, 46, 0, 0,
+ 47, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2010, 0, 0, 0, 0, 0, 0, 2011, 0, 0,
+ 2012, 0, 48, 381, 0, 0, 0, 0, 381, 0,
+ 381, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2013, 0, 0, 0,
+ 0, 2520, 0, 381, 2521, 2522, 2523, 0, 2524, 2525,
+ 2526, 2527, 2528, 2529, 0, 380, 0, 726, 5204, 0,
+ 0, 0, 0, 381, 0, 0, 0, 0, 0, 0,
+ 2014, 0, 0, 0, 0, 0, 0, 2189, 0, 727,
+ 0, 0, 727, 0, 0, 0, 0, 0, 0, 2501,
+ 0, 0, 2502, 0, 0, 0, 2503, 2504, 2505, 0,
+ 49, 0, 0, 0, 0, 2211, 2212, 0, 0, 0,
+ 0, 0, 0, 2506, 0, 0, 0, 380, 0, 380,
+ 0, 2508, 0, 0, 0, 0, 0, 0, 2509, 0,
+ 0, 2253, 0, 2015, 0, 0, 0, 2016, 0, 726,
+ 0, 0, 0, 0, 0, 0, 0, 2017, 0, 0,
+ 50, 0, 0, 2510, 0, 0, 2018, 0, 0, 0,
+ 0, 0, 726, 0, 4872, 0, 51, 0, 2019, 0,
+ 0, 0, 0, 0, 727, 727, 0, 0, 5387, 0,
+ 726, 52, 0, 0, 727, 380, 726, 0, 2501, 4301,
+ 726, 2502, 0, 0, 0, 2503, 2504, 2505, 726, 0,
+ 0, 0, 0, 727, 0, 0, 2869, 0, 4312, 2021,
+ 2022, 53, 2506, 0, 2324, 2326, 726, 0, 0, 54,
+ 2508, 55, 56, 57, 58, 59, 0, 2509, 60, 61,
+ 1577, 0, 875, 0, 0, 66, 1578, 0, 0, 2870,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 725, 0, 2510, 0, 0, 0, 0, 0, 0, 725,
+ 0, 726, 381, 2501, 2511, 0, 2502, 0, 0, 2512,
+ 2503, 2504, 2505, 725, 1140, 0, 0, 0, 0, 0,
+ 4976, 726, 726, 4979, 0, 0, 0, 2506, 0, 0,
+ 727, 2513, 2514, 0, 0, 2508, 0, 0, 0, 0,
+ 0, 0, 2509, 4394, 0, 4396, 2515, 2024, 0, 0,
+ 0, 725, 380, 726, 0, 0, 380, 725, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2510, 0, 0,
+ 725, 0, 0, 0, 0, 0, 0, 726, 0, 380,
+ 0, 0, 0, 726, 0, 2516, 0, 0, 0, 0,
+ 726, 0, 0, 0, 0, 1140, 725, 726, 937, 2517,
+ 726, 0, 2518, 2511, 0, 937, 726, 0, 2512, 0,
+ 937, 725, 0, 937, 5507, 0, 0, 0, 0, 725,
+ 0, 0, 0, 0, 0, 5063, 726, 0, 0, 0,
+ 2513, 2514, 726, 725, 0, 0, 4447, 726, 0, 0,
+ 380, 0, 937, 0, 2973, 2515, 0, 0, 0, 725,
+ 726, 0, 0, 0, 0, 0, 937, 0, 0, 0,
+ 0, 0, 0, 726, 0, 0, 0, 0, 380, 0,
+ 0, 0, 0, 0, 726, 0, 0, 4469, 2511, 0,
+ 0, 0, 0, 2512, 2516, 0, 0, 0, 0, 2519,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2517, 0,
+ 0, 2518, 0, 0, 0, 2513, 2514, 0, 0, 1293,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2515, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4025, 0, 0, 0, 0, 0, 0, 0, 0,
+ 380, 0, 0, 0, 0, 0, 1139, 0, 725, 0,
+ 1139, 0, 0, 1293, 0, 0, 2006, 0, 0, 2516,
+ 0, 0, 2007, 0, 0, 727, 0, 0, 0, 0,
+ 381, 0, 0, 2517, 725, 3635, 2518, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 725, 0, 2519, 2520,
+ 0, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527,
+ 2528, 2529, 0, 0, 2009, 727, 5469, 0, 0, 0,
+ 0, 0, 4607, 0, 0, 0, 0, 727, 0, 0,
+ 0, 726, 937, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 725, 725, 0,
+ 0, 0, 2501, 0, 0, 2502, 0, 727, 0, 2503,
+ 2504, 2505, 0, 0, 0, 0, 0, 0, 2010, 0,
+ 0, 0, 0, 2519, 0, 2011, 2506, 0, 2012, 0,
+ 0, 0, 0, 0, 2508, 0, 0, 726, 0, 0,
+ 0, 2509, 0, 0, 0, 937, 0, 0, 2520, 0,
+ 0, 2521, 2522, 2523, 2013, 2524, 2525, 2526, 2527, 2528,
+ 2529, 0, 2812, 0, 0, 5479, 2510, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4673, 0, 0,
+ 0, 0, 1139, 1139, 0, 0, 0, 2851, 2014, 0,
+ 0, 0, 726, 0, 0, 0, 0, 0, 0, 0,
+ 4683, 0, 0, 0, 0, 0, 727, 0, 875, 0,
+ 726, 0, 0, 0, 0, 0, 0, 0, 726, 0,
+ 0, 0, 0, 2520, 0, 4706, 2521, 2522, 2523, 0,
+ 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0, 0,
+ 5488, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2108, 0, 0, 0, 2016, 0, 0, 0, 0,
+ 2931, 2434, 0, 0, 0, 2017, 5326, 5819, 0, 0,
+ 0, 0, 0, 0, 2018, 0, 0, 2511, 5336, 0,
+ 0, 0, 2512, 0, 0, 0, 2019, 2954, 2955, 2956,
+ 2957, 0, 937, 0, 0, 0, 727, 0, 0, 0,
+ 380, 0, 0, 0, 2513, 2514, 380, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2515,
+ 0, 0, 0, 0, 3630, 0, 0, 2021, 2022, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2501, 0, 0,
+ 2502, 0, 0, 0, 2503, 2504, 2505, 3009, 3010, 0,
+ 0, 0, 0, 937, 0, 0, 0, 2023, 2516, 0,
+ 0, 2506, 0, 0, 0, 0, 0, 3033, 0, 2508,
+ 0, 0, 2517, 0, 0, 2518, 2509, 0, 2006, 0,
+ 0, 0, 937, 0, 2007, 0, 0, 0, 2501, 0,
+ 0, 2502, 725, 0, 726, 2503, 2504, 2505, 0, 0,
+ 0, 2510, 3078, 3079, 3080, 3081, 0, 0, 0, 0,
+ 725, 0, 2506, 0, 0, 727, 0, 727, 0, 0,
+ 2508, 0, 0, 0, 0, 2024, 2009, 2509, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 725,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2510, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2519, 0, 727, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1294, 725, 0, 0, 0, 0,
+ 2010, 0, 0, 0, 0, 0, 0, 2011, 937, 0,
+ 2012, 725, 0, 0, 0, 0, 0, 4025, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 725, 726, 726,
+ 0, 725, 2511, 381, 0, 0, 2013, 2512, 1294, 0,
+ 0, 0, 3180, 0, 0, 0, 0, 0, 3184, 0,
+ 0, 0, 0, 0, 0, 726, 0, 0, 726, 2513,
+ 2514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2014, 0, 0, 0, 2515, 0, 0, 0, 0, 1293,
+ 0, 0, 2520, 2511, 0, 2521, 2522, 2523, 2512, 2524,
+ 2525, 2526, 2527, 2528, 2529, 0, 0, 0, 0, 5491,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2513, 2514, 0, 2516, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2515, 0, 2517, 0, 0,
+ 2518, 0, 6057, 2108, 0, 0, 4025, 2016, 4025, 0,
+ 0, 0, 380, 380, 380, 0, 0, 2017, 937, 0,
+ 0, 0, 0, 0, 1293, 1293, 2018, 0, 0, 0,
+ 5052, 725, 0, 0, 2516, 0, 726, 0, 2019, 725,
+ 725, 0, 0, 0, 0, 0, 0, 0, 2517, 0,
+ 0, 2518, 0, 0, 0, 725, 726, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2006, 0, 0,
+ 3363, 0, 0, 2007, 726, 0, 3805, 0, 0, 2021,
+ 2022, 0, 0, 0, 0, 0, 0, 2519, 0, 0,
+ 0, 0, 0, 381, 937, 0, 0, 0, 0, 0,
+ 937, 875, 0, 0, 0, 0, 0, 0, 0, 3806,
+ 0, 0, 0, 0, 0, 2009, 0, 0, 0, 727,
+ 0, 0, 725, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 727, 0, 0, 0, 0, 2519, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2006, 0, 0, 0, 0, 0,
+ 2007, 726, 0, 0, 0, 0, 0, 0, 0, 2010,
+ 0, 875, 0, 0, 0, 0, 2011, 2024, 0, 2012,
+ 0, 1139, 0, 0, 0, 0, 0, 2520, 0, 0,
+ 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529,
+ 0, 937, 2009, 0, 5541, 2013, 0, 0, 380, 0,
+ 0, 0, 0, 0, 6197, 726, 0, 726, 0, 0,
+ 0, 0, 1139, 0, 0, 0, 0, 0, 0, 0,
+ 726, 0, 726, 2434, 0, 0, 1293, 1293, 2520, 2014,
+ 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528,
+ 2529, 0, 0, 0, 380, 5576, 2010, 0, 0, 0,
+ 0, 0, 0, 2011, 0, 0, 2012, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1139, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2013, 0, 0, 1139, 0, 0, 726, 0,
+ 0, 0, 2108, 0, 0, 0, 2016, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2017, 0, 0, 0,
+ 0, 381, 0, 727, 0, 2018, 2014, 0, 0, 0,
+ 0, 0, 0, 3583, 3584, 0, 0, 2019, 0, 0,
+ 0, 0, 0, 0, 3597, 2501, 3599, 0, 2502, 0,
+ 3603, 726, 2503, 2504, 2505, 0, 0, 0, 0, 5292,
+ 0, 0, 0, 0, 725, 0, 0, 0, 0, 2506,
+ 0, 0, 726, 0, 0, 4323, 0, 2508, 2021, 2022,
+ 0, 0, 0, 0, 2509, 0, 0, 0, 0, 2108,
+ 0, 0, 0, 2016, 726, 0, 0, 726, 0, 0,
+ 5315, 0, 0, 2017, 0, 0, 0, 0, 4324, 2510,
+ 0, 0, 2018, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5331, 381, 2019, 0, 0, 0, 0, 0,
+ 0, 875, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 727, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1294, 725, 0, 0, 0, 80,
+ 0, 0, 4379, 725, 83, 2021, 2022, 727, 87, 0,
+ 88, 0, 90, 91, 0, 725, 2024, 0, 3740, 380,
+ 0, 3743, 0, 100, 0, 0, 0, 0, 0, 0,
+ 5358, 0, 0, 0, 0, 4380, 0, 0, 0, 112,
+ 113, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2511, 0, 0, 0, 0, 2512, 0, 0, 0, 1294,
+ 1294, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 121, 2513, 2514, 0,
+ 0, 0, 725, 725, 0, 0, 122, 0, 123, 124,
+ 0, 0, 2515, 2024, 3832, 0, 725, 0, 0, 0,
+ 0, 0, 3839, 727, 1218, 3842, 0, 0, 0, 725,
+ 725, 3844, 0, 133, 0, 0, 0, 0, 0, 0,
+ 0, 0, 3856, 0, 0, 135, 0, 136, 137, 0,
+ 0, 2516, 0, 0, 140, 725, 141, 0, 0, 0,
+ 0, 0, 0, 5448, 0, 2517, 0, 143, 2518, 144,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3902, 147, 0, 148, 0, 0, 151,
+ 0, 0, 4025, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 152, 0, 153, 0, 381, 0, 154,
+ 0, 3925, 0, 0, 0, 155, 0, 0, 726, 0,
+ 0, 2434, 0, 157, 0, 159, 0, 0, 0, 0,
+ 0, 0, 161, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 165, 0,
+ 0, 0, 0, -2575, 0, 2519, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 169, 0, 0, 380, 0,
+ 3990, 381, 3992, 380, 0, 380, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 381,
+ 875, 1294, 1294, 0, 0, 0, 0, 0, 380, 0,
+ 0, 0, 0, -2575, 0, 180, 181, 0, 0, 0,
+ 0, 182, 0, 0, 0, 0, -2575, 0, 380, 0,
+ 0, -2575, 0, 183, 0, 0, -2575, 0, 0, 0,
+ 0, 0, -2575, 0, 726, -2575, 0, 726, 0, -2575,
+ 0, 189, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2520, 0, 0, 2521, 2522,
+ 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529, -2575, 0,
+ 0, 0, 5618, 0, 0, 0, 0, 0, 0, 0,
+ 725, 0, 0, 0, 199, 0, 0, 0, -2575, 0,
+ 0, 0, 0, 4060, 0, 0, 0, 0, 201, 0,
+ 0, 0, 0, 0, 202, 203, 0, 204, 0, 0,
+ 0, 0, 205, 0, 0, 0, 0, 206, 0, 0,
+ 208, 0, 0, 0, 0, 0, 0, 210, 0, 726,
+ 726, 0, 0, 211, 212, -2575, 0, 0, -2575, 726,
+ 0, 213, 0, 0, -2575, 215, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 218, 0, 0, 726, 0,
+ 0, 0, 725, 0, 0, 2501, 0, 0, 2502, 0,
+ 220, 0, 2503, 2504, 2505, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 725, 0, 0, 0, 2506,
+ 226, 0, 227, 0, 0, 0, 0, 2508, 0, -2575,
+ 0, 229, 0, 725, 2509, 0, 0, 230, 875, 725,
+ 0, 0, 231, 725, 0, 0, 0, 380, 0, 2434,
+ 0, 725, 0, 0, 0, 234, 0, 0, 2501, 2510,
+ 0, 2502, 0, 0, 0, 2503, 2504, 2505, 0, 725,
+ 0, 0, 0, 0, 0, 726, 0, 0, 246, 0,
+ 0, 0, 2506, 0, 1110, 0, 0, 0, 4447, 0,
+ 2508, 0, 247, 0, 0, 0, -147, 2509, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -2575, 0, 725, 0, 0, 0, 0, 0,
+ 0, 0, 2510, 2501, 0, 0, 2502, 1139, 0, 0,
+ 2503, 2504, 2505, 0, 725, 725, -2575, 0, -2575, -2575,
+ 0, 0, 0, 0, 2434, 0, 0, 2506, 0, 2434,
+ 2434, 0, 0, 0, 0, 2508, 0, 0, 0, 0,
+ 0, 0, 2509, 0, 0, 875, 725, 0, 0, 875,
+ 2511, 0, 0, 0, -2575, 2512, 0, -2575, -2575, 0,
+ -2575, 0, 0, 0, 0, 0, 0, 2510, 0, 0,
+ 725, 0, 875, 0, 0, 0, 725, 2513, 2514, 0,
+ 0, 0, 0, 725, 0, 0, 0, 0, 1139, 0,
+ 725, 0, 2515, 725, 0, 0, 0, 0, 0, 725,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4304, 0,
+ 4305, 4306, 4307, 2511, 0, 0, 0, 0, 2512, 725,
+ 0, 0, 0, 0, 0, 725, 0, 0, 0, 0,
+ 725, 2516, 0, 875, 0, 0, 0, 0, 0, 0,
+ 2513, 2514, 0, 725, 0, 2517, 5862, 0, 2518, 0,
+ 0, 0, 0, 0, 0, 2515, 725, 1976, 0, 0,
+ 0, 875, 0, 0, 0, 0, 0, 725, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2511, 0,
+ 0, 0, 0, 2512, 0, 0, 0, 0, 0, 0,
+ 726, 1977, 0, 0, 2516, 380, 0, 0, -2591, 0,
+ 0, 0, 0, 0, 0, 2513, 2514, 0, 2517, 0,
+ 0, 2518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2515, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 726, 0, 0, 875, 0, 2519, 0, 0, 0, 0,
+ 0, 0, 726, 0, 0, 0, 0, 0, -2591, 0,
+ 0, 1978, 0, 0, 0, 0, 0, 0, 0, 2516,
+ 0, -2591, 0, 0, 0, 0, -2591, 0, 0, 0,
+ 0, -2591, 726, 2517, 0, 0, 2518, -2591, 0, 0,
+ -2591, 0, 0, 0, -2591, 0, 1979, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2519, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -2591, 725, 0, 0, 2501, 0, 0,
+ 2502, 0, 1980, 1976, 2503, 2504, 2505, 0, 0, 0,
+ 0, 0, 0, -2591, 0, 2520, 0, 0, 2521, 2522,
+ 2523, 2506, 2524, 2525, 2526, 2527, 2528, 2529, 6013, 2508,
+ 0, 4470, 5927, 0, 0, 0, 2509, 1977, 1981, 0,
+ 0, 0, 1982, 2519, 0, 0, 0, 0, 0, 0,
+ 725, 726, 0, 0, 0, 0, 0, 0, 0, 0,
+ -2591, 2510, 0, -2591, 0, 0, 0, 0, 0, -2591,
+ 0, 0, 0, 2043, 1984, 0, 0, 0, 2520, 0,
+ 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528,
+ 2529, 0, 0, 0, 0, 5950, 0, 1978, 0, 0,
+ 0, 0, 0, 0, 0, 725, 0, 0, 0, 0,
+ 0, 2044, 0, 0, 0, 205, 0, 0, 0, 1986,
+ 0, 0, 0, 725, -2591, 0, 0, 0, 1987, 0,
+ 0, 725, 1979, 0, 0, 0, 1988, 0, 0, 0,
+ 0, 726, 0, 2520, 2045, 0, 2521, 2522, 2523, 0,
+ 2524, 2525, 2526, 2527, 2528, 2529, 1990, 0, 771, 0,
+ 6056, 0, 0, 0, 0, 1991, 0, 0, 1980, 1992,
+ 0, 0, 2511, 0, 0, 0, 0, 2512, 0, 1110,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 771, 0, 0, 0, 2513,
+ 2514, 0, 0, 941, 1981, 4633, 0, -2591, 1982, 0,
+ 0, 0, 0, 875, 2515, 0, 0, 771, 0, 875,
+ 0, 0, 0, 1993, 0, 0, 0, 0, 0, 0,
+ 0, -2591, 0, -2591, -2591, 1105, 0, 0, 0, 2060,
+ 1984, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1107, 0, 0, 2516, 0, 0, 0, 0, 0, 1115,
+ 726, 0, 726, 0, 0, 0, 0, 2517, 0, -2591,
+ 2518, 0, -2591, -2591, 1129, -2591, 1105, 2061, 0, 0,
+ 1152, 205, 0, 0, 0, 1986, 0, 0, 0, 0,
+ 1184, 0, 0, 0, 1987, 0, 0, 0, 0, 1189,
+ 0, 0, 1988, 0, 0, 0, 0, 725, 0, 726,
+ 2062, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1990, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1991, 0, 0, 0, 1992, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2519, 380, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 81, 82, 0, 84, 85, 86, 0, 1993,
+ 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, 725, 725, 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, 725, 37,
+ 0, 725, 0, 0, 0, 0, 0, 2520, 0, 0,
+ 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529,
+ 0, 0, 0, 0, 6126, 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, 4866, 4867,
+ 4868, 4869, 134, 0, 0, 0, 0, 0, 0, 138,
+ 0, 139, 0, 0, 0, 0, 0, 0, 142, 0,
+ 0, 0, 0, 0, 0, 875, 875, 875, 0, 0,
+ 145, 0, 0, 0, 0, 0, 0, 146, 380, 0,
+ 0, 0, 0, 0, 0, 0, 0, 149, 150, 725,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 726, 0, 0, 0, 0, 725,
+ 0, 0, 0, 0, 0, 0, 156, 0, 726, 0,
+ 0, 0, 0, 0, 158, 0, 0, 725, 0, 160,
+ 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, 725, 0, 0, 5020, 0, 0,
+ 0, 0, 0, 0, 0, 0, 184, 185, 186, 0,
+ 0, 0, 5023, 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, 875, 0, 193, 194, 0, 195, 196, 725, 0,
+ 725, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 197, 0, 198, 725, 0, 725, 771, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 200, 0, 0,
+ 0, 0, 0, 0, 0, 0, 380, 875, 726, 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, 725, 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, 725, 0, 0, 0, 380, 0,
+ 0, 0, 0, 232, 0, 0, 233, 0, 0, 0,
+ 0, 0, 0, 0, 0, 725, 726, 0, 0, 0,
+ 0, 0, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 0, 0, 0, 0, 725, 0, 0,
+ 725, 0, 726, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3499,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 941, 1283, 1283,
+ 771, 0, 1283, 0, 0, 0, 1295, 0, 1184, 0,
+ 0, 1322, 0, 0, 1295, 0, 0, 1295, 0, 0,
+ 1184, 0, 1283, 0, 0, 1184, 0, 0, 0, 1283,
+ 0, 1184, 875, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1370,
+ 0, 0, 0, 4, 0, 1184, 0, 1283, 726, 1283,
+ 0, 771, 0, 1283, 0, 0, 0, 0, 0, 0,
+ 1322, 0, 5, 0, 0, 1444, 0, 1283, 0, 0,
+ 0, 0, 6, 7, 1283, 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, 941, 0,
+ 0, 37, 771, 38, 39, 0, 0, 1295, 0, 40,
+ 0, 1322, 0, 0, 1295, 0, 0, 1295, 0, 0,
+ 0, 0, 380, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1283, 0, 2501, 0, 0, 2502, 0,
+ 0, 0, 2503, 2504, 2505, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2506,
+ 0, 0, 0, 41, 0, 0, 0, 2508, 0, 0,
+ 0, 0, 0, 0, 2509, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5351, 0, 0, 380, 0, 0, 0,
+ 0, 1184, 0, 0, 0, 0, 0, 0, 5355, 2510,
+ 0, 725, 0, 0, 380, 0, 0, 0, 1656, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2501, 0, 0, 2502, 0, 0, 0, 2503, 2504,
+ 2505, 0, 0, 0, 0, 0, 1769, 1769, 42, 0,
+ 0, 771, 1184, 0, 0, 2506, 0, 0, 0, 0,
+ 0, 875, 0, 2508, 0, 0, 875, 43, 875, 0,
+ 2509, 1184, 0, 0, 0, 1184, 0, 0, 0, 0,
+ 0, 0, 0, 1769, 0, 0, 0, 0, 0, 0,
+ 44, 875, 0, 0, 1184, 2510, 0, 0, 0, 0,
+ 0, 5421, 0, 0, 0, 0, 1184, 0, 0, 0,
+ 0, 875, 0, 0, 45, 0, 0, 0, 0, 0,
+ 2511, 0, 0, 0, 0, 2512, 0, 725, 0, 0,
+ 725, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2513, 2514, 0,
+ 0, 46, 0, 0, 47, 0, 0, 0, 0, 0,
+ 0, 0, 2515, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 48, 0, 0, 0,
+ 0, 1184, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1184, 0, 0, 0, 0, 1283, 1283, 0,
+ 0, 2516, 0, 0, 0, 0, 2511, 0, 0, 0,
+ 0, 2512, 0, 0, 0, 2517, 0, 0, 2518, 0,
+ 0, 0, 725, 725, 0, 0, 0, 0, 0, 0,
+ 0, 0, 725, 2513, 2514, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2515, 0,
+ 0, 725, 0, 1769, 1769, 0, 0, 0, 0, 0,
+ 0, 0, 941, 0, 49, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1295, 0, 0, 0, 1322, 0, 1295,
+ 0, 0, 1295, 0, 0, 0, 0, 2516, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1283, 5546, 0,
+ 5547, 2517, 0, 0, 2518, 2519, 0, 0, 0, 0,
+ 0, 0, 0, 0, 50, 0, 0, 0, 0, 1184,
+ 0, 0, 0, 0, 0, 1283, 1283, 0, 0, 0,
+ 51, 0, 2501, 0, 0, 2502, 0, 0, 725, 2503,
+ 2504, 2505, 0, 0, 0, 52, 0, 1184, 1184, 1184,
+ 0, 1283, 0, 941, 941, 941, 2506, 0, 0, 0,
+ 2263, 0, 0, 0, 2508, 0, 0, 0, 0, 0,
+ 0, 2509, 0, 0, 0, 53, 0, 0, 0, 0,
+ 0, 0, 0, 54, 0, 55, 56, 57, 58, 59,
+ 0, 2519, 60, 61, 1577, 2359, 2510, 0, 0, 66,
+ 0, 0, 0, 0, 0, 2520, 0, 0, 2521, 2522,
+ 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529, 0, 0,
+ 2501, 0, 6182, 2502, 0, 0, 0, 2503, 2504, 2505,
+ 0, 0, 1283, 0, 1283, 1283, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2506, 0, 0, 0, 3453, 0,
+ 0, 0, 2508, 0, 0, 0, 0, 0, 0, 2509,
+ 5683, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 2510, 0, 0, 0, 0, 0,
+ 0, 2520, 0, 0, 2521, 2522, 2523, 0, 2524, 2525,
+ 2526, 2527, 2528, 2529, 0, 0, 2501, 2511, 6196, 2502,
+ 0, 0, 2512, 2503, 2504, 2505, 2406, 2406, 0, 0,
+ 0, 1184, 0, 1105, 0, 0, 0, 0, 0, 0,
+ 2506, 0, 0, 3454, 2513, 2514, 0, 0, 2508, 0,
+ 0, 0, 0, 0, 1184, 2509, 0, 0, 0, 2515,
+ 2444, 0, 0, 1184, 0, 0, 2450, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1769,
+ 2510, 0, 0, 725, 0, 0, 0, 0, 875, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2516, 0,
+ 0, 0, 0, 0, 0, 2511, 0, 0, 0, 1769,
+ 2512, 0, 2517, 0, 0, 2518, 0, 0, 5780, 0,
+ 5782, 0, 0, 725, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2513, 2514, 0, 725, 0, 1769, 1769, 1769,
+ 0, 1769, 0, 0, 0, 0, 0, 2515, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1769, 0, 0, 0, 725, 0, 4113, 0, 0,
+ 0, 0, 4114, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 771, 771, 2516, 0, 0, 0,
+ 0, 2511, 0, 0, 0, 0, 2512, 0, 0, 0,
+ 2517, 0, 2519, 2518, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1184, 0, 0, 0, 0, 2513, 2514,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2515, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1769, 0, 0, 0, 1769, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1184, 1184,
+ 2649, 0, 1769, 0, 725, 0, 0, 0, 0, 0,
+ 0, 0, 2516, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2517, 771, 0, 2518,
+ 2519, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2520, 0, 0, 2521, 2522, 2523, 0, 2524,
+ 2525, 2526, 2527, 2528, 2529, 0, 0, 2997, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3455, 0, 0, 0, 725, 0, 0, 5964, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2519, 0, 0, 0,
+ 0, 0, 0, 0, 2802, 0, 0, 0, 0, 0,
+ 2520, 0, 1283, 2521, 2522, 2523, 0, 2524, 2525, 2526,
+ 2527, 2528, 2529, 0, 0, 1184, 2830, 0, 0, 0,
+ 0, 0, 0, 0, 1184, 0, 0, 1283, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1322, 0, 1184, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6036, 1184, 0, 0, 1184, 0,
+ 0, 0, 0, 725, 0, 725, 2520, 0, 0, 2521,
+ 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529, 0,
+ 1283, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1184, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1283, 1283, 1283,
+ 1283, 1184, 725, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1184, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1769, 1769, 1769,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 6112, 3000, 0, 1184, 0, 0, 0, 0,
+ 0, 875, 0, 0, 0, 0, 0, 1283, 1283, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 6128, 6128, 1283, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1184, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1283, 1283, 1283, 1283, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1184, 0, 0, 0, 0,
+ 0, 0, 1184, 0, 3000, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 941, 0, 0, 941, 0, 0, 0, 771,
+ 0, 0, 0, 0, 0, 1769, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6128, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1295, 1295, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1322, 1322, 0,
+ 0, 1295, 0, 0, 1295, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1283, 1283, 0, 0, 0, 0, 0, 1283, 0,
+ 0, 875, 0, 0, 0, 0, 0, 0, 0, 1184,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 725, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 725, 0, 2406, 0, 0, 0, 0, 0, 0,
+ 1283, 0, 1295, 0, 0, 1295, 1295, 0, 1184, 1184,
+ 0, 1283, 0, 0, 0, 0, 0, 0, 1184, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1184, 0,
+ 0, 0, 0, 0, 0, 1105, 1105, 0, 0, 3261,
+ 0, 0, 0, 1769, 1769, 0, 0, 0, 0, 1769,
+ 1769, 0, 0, 0, 0, 0, 1769, 1769, 1769, 0,
+ 0, 1769, 0, 1769, 1322, 1769, 1769, 1769, 1769, 1769,
+ 1769, 0, 1769, 0, 1769, 1769, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1769, 1769, 1769, 1769, 0, 0, 0,
+ 1283, 1769, 0, 0, 0, 1769, 0, 0, 1769, 0,
+ 0, 1769, 1769, 1769, 1769, 1769, 1769, 1769, 1769, 1769,
+ 0, 1769, 0, 0, 0, 0, 0, 0, 1184, 1769,
+ 0, 0, 1769, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1184, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 875,
+ 0, 725, 0, 0, 1527, 0, 1184, 0, 0, 0,
+ 0, 0, 0, 1769, 0, 0, 0, 1184, 1184, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1769, 0,
+ 1527, 0, 0, 0, 4, 0, 0, 1769, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1184, 0, 5, 0, 0, 0, 0, 3489, 0,
+ 3494, 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, 875, 37, 0, 38, 39, 0, 0, 0, 0,
+ 40, 0, 0, 0, 0, 0, 0, 0, 0, 725,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 771, 0, 0, 0, 725, 0, 0, 0, 0,
+ 1105, 0, 1105, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 41, 0, 0, 0, 0, 1769,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 941, 0, 1283, 1283, 0, 0, 0, 1295, 0,
+ 1322, 1295, 1295, 0, 1283, 0, 1283, 0, 0, 0,
+ 1283, 0, 0, 1184, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2830, 0, 0, 0, 42,
+ 0, 0, 0, 3638, 1184, 0, 0, 0, 0, 0,
+ 3649, 725, 0, 0, 0, 0, 0, 0, 43, 1184,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1184, 0,
+ 0, 44, 0, 3694, 3694, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1184, 1184,
+ 0, 0, 1184, 0, 771, 45, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1283, 0,
+ 0, 1283, 0, 0, 0, 875, 0, 0, 0, 0,
+ 0, 0, 46, 0, 0, 47, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1184, 1184, 0, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 48, 0, 3789,
+ 0, 3792, 3794, 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, 875,
+ 1527, 0, 1769, 1769, 1769, 0, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 1283, 0, 0, 875, 0, 0,
+ 0, 0, 1283, 0, 0, 1283, 0, 0, 0, 0,
+ 0, 1283, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1769, 0, 1283, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 49, 2830, 0, 0, 3694,
+ 0, 1184, 0, 0, 1184, 0, 0, 0, 3896, 0,
+ 0, 1105, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1283, 1769, 0, 0, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3789, 0, 0, 0, 50, 0, 0, 0, 0,
+ 0, 1283, 0, 3928, 0, 0, 0, 0, 0, 0,
+ 0, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2263, 0, 0, 0, 52, 0, 0, 0,
+ 0, 0, 0, 0, 1769, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3983, 0,
+ 0, 0, 0, 0, 0, 0, 53, 0, 1283, 0,
+ 1283, 3694, 1283, 3694, 54, 0, 55, 56, 57, 58,
+ 59, 0, 0, 60, 61, 1577, 3185, 0, 0, 0,
+ 66, 0, 0, 0, 0, 0, 0, 0, 0, 2501,
+ 0, 0, 2502, 0, 0, 0, 2503, 2504, 2505, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2406, 0, 2506, 0, 0, 0, 1527, 0, 0,
+ 0, 2508, 0, 0, 0, 0, 0, 0, 2509, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2510, 0, 0, 0, 0, 0, 0,
+ 0, 0, 941, 0, 0, 0, 0, 0, 1295, 0,
+ 0, 1295, 0, 0, 1295, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1283, 0, 0, 0, 0, 0, 0,
+ 1769, 0, 0, 0, 0, 1769, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1769,
+ 1769, 1769, 0, 0, 1769, 0, 0, 0, 0, 0,
+ 0, 0, 1769, 1769, 1769, 1769, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1769, 0, 0, 1769, 0,
+ 1769, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1769, 1769, 0, 2511, 1769, 0, 0, 0, 2512,
+ 0, 0, 2573, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1322, 0, 1769, 0, 1769, 0, 1769,
+ 0, 2513, 2514, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2515, 0, 0, 1769,
+ 0, 0, 0, 1184, 0, 0, 0, 0, 0, 0,
+ 4195, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2501, 0, 0, 2502, 0, 0, 0,
+ 2503, 2504, 2505, 0, 1184, 2516, 0, 0, 0, 0,
+ 0, 0, 1769, 0, 0, 0, 0, 2506, 0, 2517,
+ 0, 0, 2518, 0, 4, 2508, 0, 1769, 0, 0,
+ 0, 0, 2509, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4195, 0, 5, 0, 4251, 4719, 0, 4254, 0,
+ 3494, 0, 0, 6, 7, 0, 0, 2510, 0, 0,
+ 9, 10, 0, 1527, 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, 2519,
+ 0, 0, 0, 0, 1769, 0, 3694, 0, 0, 0,
+ 0, 2406, 0, 0, 0, 0, 4720, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6087, 0, 0, 0, 0, 1283, 0,
+ 1283, 1283, 1283, 0, 41, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1527, 2511, 0,
+ 0, 0, 0, 2512, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2513, 2514, 0, 0, 0,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 2520,
+ 2515, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527,
+ 2528, 2529, 0, 0, 0, 0, 0, 0, 0, 42,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 43, 2516,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2517, 1184, 0, 2518, 0, 0, 0,
+ 0, 44, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 6088, 0,
+ 0, 0, 0, 0, 0, 45, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 2501, 0, 0, 2502, 0, 0, 0, 2503,
+ 2504, 2505, 46, 0, 1527, 47, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2506, 0, 0, 4070,
+ 0, 0, 0, 2519, 2508, 0, 0, 48, 0, 0,
+ 0, 2509, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1769, 0, 0, 0,
+ 0, 0, 1769, 0, 0, 0, 2510, 0, 0, 0,
+ 1527, 1283, 0, 0, 0, 0, 3694, 3694, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1527, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1184, 1184, 1184, 1527, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 49, 0, 0, 1184, 0,
+ 0, 0, 0, 2520, 0, 0, 2521, 2522, 2523, 0,
+ 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0, 0,
+ 2406, 1184, 0, 0, 1527, 1527, 0, 0, 0, 0,
+ 2406, 1184, 1184, 0, 0, 0, 1184, 0, 0, 3694,
+ 0, 0, 0, 0, 0, 50, 0, 2511, 1184, 0,
+ 0, 0, 2512, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 0, 0, 0, 0, 0, 0, 0, 0,
+ 771, 0, 0, 0, 2513, 2514, 52, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2515,
+ 0, 3983, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 53, 0, 0, 0,
+ 0, 0, 0, 0, 54, 1283, 55, 56, 57, 58,
+ 59, 0, 0, 60, 61, 1577, 0, 0, 2516, 0,
+ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1184,
+ 0, 0, 2517, 0, 0, 2518, 0, 0, 0, 0,
+ 0, 0, 1184, 0, 0, 1184, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1769, 0, 0,
+ 0, 0, 0, 1527, 0, 0, 1769, 0, 0, 0,
+ 0, 0, 0, 0, 1769, 0, 1769, 0, 0, 1769,
+ 0, 0, 0, 0, 1769, 1769, 1769, 1769, 0, 0,
+ 1769, 1769, 1769, 1769, 1769, 1769, 1769, 1769, 1769, 1769,
+ 0, 0, 0, 1769, 1769, 0, 0, 0, 0, 0,
+ 0, 0, 2519, 1769, 0, 0, 0, 1769, 0, 0,
+ 0, 1769, 0, 0, 0, 0, 0, 0, 0, 1769,
+ 0, 0, 1769, 0, 1769, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1769, 0, 0, 1769,
+ 1769, 0, 0, 0, 1769, 1769, 0, 0, 0, 4752,
+ 0, 1769, 0, 0, 0, 0, 0, 0, 1184, 1184,
+ 1184, 941, 0, 0, 4195, 4774, 0, 0, 0, 4774,
+ 4788, 4774, 0, 0, 0, 0, 1769, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2520, 0, 0, 2521, 2522, 2523, 0, 2524,
+ 2525, 2526, 2527, 2528, 2529, 0, 0, 2501, 0, 0,
+ 2502, 0, 0, 1769, 2503, 2504, 2505, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3494, 0, 1769,
+ 0, 2506, 0, 0, 0, 0, 0, 0, 0, 2508,
+ 0, 0, 0, 0, 0, 0, 2509, 0, 0, 0,
+ 1527, 0, 0, 0, 1527, 1527, 0, 4849, 2406, 2406,
+ 0, 3000, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2510, 0, 0, 0, 0, 0, 0, 1283, 1283,
+ 1283, 1283, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2830, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4905, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1527, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2511, 0, 0, 0, 0, 2512, 0, 0,
+ 0, 2501, 0, 0, 2502, 0, 0, 0, 2503, 2504,
+ 2505, 0, 0, 0, 0, 0, 0, 0, 0, 2513,
+ 2514, 0, 0, 0, 0, 2506, 0, 0, 4118, 0,
+ 883, 0, 4994, 2508, 2515, 0, 0, 0, 0, 0,
+ 2509, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 943, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2510, 0, 1283, 0, 0,
+ 0, 0, 0, 2516, 0, 0, 883, 0, 0, 0,
+ 1184, 0, 1283, 0, 1769, 0, 0, 2517, 0, 0,
+ 2518, 1184, 0, 0, 0, 0, 0, 5041, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2830, 4086, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1184, 0, 0, 1143, 4195, 0, 0, 0,
+ 0, 0, 0, 1143, 0, 1143, 3789, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5090, 0, 0, 883, 0,
+ 0, 0, 0, 0, 0, 1184, 0, 0, 0, 3000,
+ 0, 0, 0, 0, 0, 0, 1769, 1769, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2511, 2519, 0, 0,
+ 0, 2512, 1527, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3983, 3983,
+ 3983, 3983, 3983, 2513, 2514, 3694, 0, 3694, 0, 0,
+ 0, 0, 0, 0, 1184, 0, 0, 0, 2515, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1769, 0, 0, 0, 0, 0, 0, 2516, 0, 0,
+ 0, 0, 1769, 0, 1527, 0, 0, 1527, 0, 0,
+ 0, 2517, 0, 0, 2518, 0, 0, 2520, 0, 0,
+ 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528, 2529,
+ 0, 0, 1769, 0, 0, 1769, 0, 0, 0, 0,
+ 0, 0, 0, 1769, 1769, 0, 0, 0, 0, 0,
+ 1769, 1769, 0, 0, 0, 1769, 0, 0, 0, 0,
+ 0, 1769, 0, 0, 1769, 1769, 0, 0, 0, 1769,
+ 5208, 0, 0, 0, 0, 1769, 1184, 1184, 1184, 1184,
+ 0, 0, 0, 4774, 4788, 4774, 0, 1769, 4774, 0,
+ 0, 5222, 0, 0, 0, 4195, 0, 0, 0, 4195,
+ 0, 2519, 0, 0, 0, 5237, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1322, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1769, 0, 0, 0, 4251, 0, 0, 1527,
+ 0, 3494, 0, 2501, 0, 0, 2502, 0, 0, 0,
+ 2503, 2504, 2505, 0, 0, 0, 1527, 0, 0, 0,
+ 0, 1105, 0, 0, 1769, 0, 0, 2506, 0, 0,
+ 0, 1527, 0, 0, 0, 2508, 0, 0, 0, 0,
+ 0, 0, 2509, 0, 3694, 3694, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2520, 0, 2830, 2521, 2522, 2523, 2510, 2524, 2525,
+ 2526, 2527, 2528, 2529, 0, 0, 0, 0, 5314, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1283, 0, 0, 0, 0, 0, 4123,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1283, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2511, 0,
+ 0, 0, 0, 2512, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1769, 0, 0, 2513, 2514, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 941, 0,
+ 2515, 0, 0, 0, 2830, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2406, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2516,
+ 0, 1283, 0, 3928, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2517, 1527, 0, 2518, 1527, 0, 1527,
+ 0, 0, 0, 0, 1527, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1184, 0,
+ 0, 5457, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2501, 0, 0, 2502, 0, 0,
+ 0, 2503, 2504, 2505, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1527, 0, 0, 0, 0, 2506, 0,
+ 0, 4129, 0, 0, 0, 0, 2508, 0, 0, 0,
+ 1769, 0, 1527, 2509, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2519, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1527, 2510, 1769,
+ 1769, 0, 0, 1769, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 941, 0,
+ 0, 4774, 0, 0, 0, 4195, 0, 0, 0, 883,
+ 4195, 0, 0, 4195, 941, 0, 3789, 943, 5511, 0,
+ 1769, 1769, 0, 0, 0, 0, 943, 0, 0, 0,
+ 0, 0, 0, 0, 943, 0, 0, 943, 0, 0,
+ 0, 0, 4849, 0, 1769, 0, 0, 1527, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 4849, 1322, 1283, 0,
+ 1283, 0, 0, 2520, 0, 0, 2521, 2522, 2523, 0,
+ 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2501, 2511,
+ 0, 2502, 0, 0, 2512, 2503, 2504, 2505, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1295,
+ 1322, 0, 2506, 0, 0, 0, 2513, 2514, 0, 0,
+ 2508, 0, 0, 0, 0, 0, 0, 2509, 0, 0,
+ 0, 2515, 0, 0, 0, 0, 0, 0, 943, 0,
+ 1527, 0, 0, 1530, 0, 0, 0, 943, 0, 0,
+ 0, 0, 2510, 1295, 943, 0, 1184, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 5041, 1530,
+ 2516, 1184, 0, 0, 0, 0, 1184, 0, 3694, 0,
+ 0, 1527, 0, 0, 2517, 2830, 0, 2518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1184, 0, 0, 0, 5090, 0, 0, 5671,
+ 1527, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1283, 1184, 4849, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1769, 0, 0, 1769, 0, 1769, 0, 0, 0,
+ 0, 0, 0, 2511, 0, 0, 0, 0, 2512, 0,
+ 0, 0, 0, 0, 2519, 1769, 943, 943, 0, 1527,
+ 0, 1769, 0, 1143, 0, 4195, 0, 1143, 0, 5511,
+ 2513, 2514, 0, 0, 0, 1769, 0, 0, 0, 0,
+ 1527, 0, 0, 0, 5738, 2515, 0, 0, 0, 0,
+ 0, 0, 0, 943, 0, 0, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1184,
+ 0, 2406, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2516, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1769, 2517, 0,
+ 0, 2518, 1769, 1769, 0, 0, 0, 1283, 1283, 1283,
+ 1283, 0, 0, 0, 2520, 0, 0, 2521, 2522, 2523,
+ 0, 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1769, 0, 0, 0, 0, 0, 0, 941, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1527, 0, 0, 0, 0, 0, 0, 0, 1184,
+ 0, 0, 4195, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1527, 0, 0, 0, 2519, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1143,
+ 1143, 0, 0, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4670, 0, 0, 943, 943, 883, 0, 0, 0, 0,
+ 1769, 0, 943, 941, 0, 0, 1769, 0, 0, 1530,
+ 5891, 0, 0, 943, 0, 1527, 0, 1769, 0, 943,
+ 0, 1769, 943, 1769, 0, 1769, 0, 0, 0, 0,
+ 0, 0, 4849, 0, 1530, 0, 0, 0, 0, 0,
+ 1322, 0, 0, 0, 0, 0, 0, 0, 0, 1530,
+ 0, 1769, 0, 0, 0, 0, 0, 0, 2520, 0,
+ 0, 2521, 2522, 2523, 0, 2524, 2525, 2526, 2527, 2528,
+ 2529, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2406, 2406, 0, 0,
+ 0, 0, 0, 943, 943, 943, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1283, 0, 0,
+ 0, 0, 0, 0, 5970, 0, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 1527, 0, 5982, 1530,
+ 2501, 0, 0, 2502, 0, 0, 0, 2503, 2504, 2505,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5457, 0, 0, 2506, 0, 0, 4726, 1769, 1769,
+ 1769, 0, 2508, 0, 3789, 0, 0, 1769, 0, 2509,
+ 0, 0, 0, 0, 0, 0, 0, 1769, 0, 0,
+ 5738, 0, 0, 0, 0, 3494, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2510, 0, 0, 0, 0, 1295,
+ 0, 0, 0, 2501, 0, 0, 2502, 0, 943, 0,
+ 2503, 2504, 2505, 0, 1283, 0, 0, 0, 0, 0,
+ 0, 2406, 0, 0, 0, 1527, 0, 2506, 0, 0,
+ 0, 0, 0, 0, 0, 2508, 0, 0, 0, 0,
+ 0, 0, 2509, 0, 0, 0, 0, 2830, 0, 0,
+ 1527, 0, 941, 0, 0, 0, 0, 0, 1769, 0,
+ 0, 0, 0, 0, 0, 0, 1530, 2510, 4849, 0,
+ 0, 0, 0, 0, 1295, 1295, 0, 1769, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1769, 0, 0,
+ 0, 5891, 0, 0, 0, 0, 0, 0, 0, 943,
+ 0, 0, 0, 0, 0, 2511, 0, 0, 0, 0,
+ 2512, 0, 1283, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 943,
+ 0, 0, 2513, 2514, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5982, 1283, 1283, 2515, 0, 0,
+ 4849, 0, 0, 0, 0, 0, 0, 943, 943, 943,
+ 0, 943, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1769, 2511, 0,
+ 0, 943, 1769, 2512, 1527, 0, 2516, 0, 1769, 0,
+ 0, 0, 0, 1769, 0, 0, 0, 0, 0, 0,
+ 2517, 0, 0, 2518, 0, 2513, 2514, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2515, 0, 0, 1769, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1769, 1527, 956, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1283, 0,
+ 0, 4849, 957, 0, 0, 0, 0, 0, 0, 2516,
+ 5891, 0, 0, 943, 941, 0, 0, 943, 943, 0,
+ 0, 0, 0, 2517, 0, 958, 2518, 0, 0, 0,
+ 0, 0, 943, 0, 0, 0, 1295, 1295, 959, 0,
+ 2519, 0, 0, 0, 0, 0, 0, 0, 0, 960,
+ 0, 0, 0, -871, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 961, 0, 0, 0, 0, 0, 962, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 963, 0, 0, 0, 0, 0,
+ 0, 0, 1530, 0, 0, 964, 0, 0, 883, 0,
+ 0, 0, 0, 2519, 965, 0, 0, 0, 1143, 0,
+ 0, 0, 0, 0, 0, 0, 966, 1527, 0, 0,
+ 0, 0, 0, 0, 967, 0, 0, 1527, 968, 0,
+ 2520, 0, 0, 2521, 2522, 2523, 0, 2524, 2525, 2526,
+ 2527, 2528, 2529, 0, 0, 0, 0, -1107, 0, 1143,
+ 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, 969, 0, 0, 0, 0, 0,
+ 0, 0, 0, -588, 0, 0, 1530, 0, 0, 0,
+ 0, 0, 0, 2520, 0, 1143, 2521, 2522, 2523, 0,
+ 2524, 2525, 2526, 2527, 2528, 2529, 0, 0, 0, 0,
+ 0, 0, 1143, 0, 0, 0, 0, 0, 0, 1530,
+ 0, 0, 0, 970, 0, 0, 971, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1527, 0, 0, 972, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 973, 0, 0, 0, 0, 0, 0, -461, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1527, 0, 974, 0, 0, 0,
+ 0, 0, 0, 0, 0, 975, 0, 943, 943, 943,
+ 0, 0, -461, 0, 0, 976, 1527, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 977, 0, 0, 0, 0, 0,
+ 0, 978, 0, 0, 0, 1530, 0, -461, 0, 0,
+ 979, 980, 0, 981, 982, 0, 0, 0, 883, 0,
+ 0, 0, 0, 1530, 983, 0, 0, 0, 0, 984,
+ 0, 0, 0, 0, 0, 0, 985, 0, 0, 986,
+ 0, 0, 987, 0, 1527, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -461, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1529, 0, 0, 0, 0, 1530,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 0, 943, 0, 0, 1530, 0,
+ 1529, 0, 0, 0, 0, 943, 0, 0, 0, 0,
+ 0, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1530, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 943, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 0, 0, 943, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1530, 1530, 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, 0, 0, 0, 0,
+ 0, 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, 943, 0, 0, 943, 943, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 943, 943, 0, 0, 0, 0, 943,
+ 943, 0, 0, 0, 0, 0, 943, 943, 943, 0,
+ 0, 943, 0, 943, 0, 943, 943, 943, 943, 943,
+ 943, 0, 943, 0, 943, 943, 0, 0, 943, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1530, 943, 943, 943, 943, 883, 0, 0,
+ 0, 943, 0, 0, 1017, 943, 0, 0, 943, 1018,
+ 0, 943, 943, 943, 943, 943, 943, 943, 943, 943,
+ 0, 943, 0, 0, 0, 0, 0, 0, 0, 943,
+ 0, 0, 943, 0, 0, 0, 0, 0, 0, 1527,
+ 0, 0, 0, 0, 1019, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1020, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1371, 0, 0, 0,
+ 0, 1372, 1021, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2156, 0, 0, 0, 0, 0,
+ 1022, 0, 0, 943, 0, 0, 0, 0, 0, 0,
+ 1529, 0, 0, 0, 0, 0, 1373, 0, 943, 0,
+ 0, 0, 0, 1023, 0, 0, 0, 943, 943, 1374,
+ 1375, 0, 0, 0, 1024, 1529, 0, 0, 0, 0,
+ 1376, 0, 0, 1025, 1377, 0, 0, 0, 0, 0,
+ 1529, 0, 0, 0, 0, 1026, 0, 0, 0, 0,
+ 1027, 0, 1378, 0, 0, 0, 0, 1028, 0, 0,
+ 0, 0, 0, 0, 0, 1527, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1379, 1029, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1380, 0, 0, 0,
+ 0, 0, 0, 1527, 0, 1381, 0, 0, 0, 1530,
+ 0, 0, 0, 1530, 1530, 0, 0, 1382, 0, 0,
+ 0, 0, 1383, 0, 0, 883, 0, 0, 0, 0,
+ 0, 0, 1030, 0, 0, 0, 0, 0, 0, 0,
+ 1529, 0, 1527, 0, 0, 0, 0, 0, 1384, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 943,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 1031, 1385, 0, 1530, 0, 0, 943, 0,
+ 0, 943, 943, 0, 0, 1032, 0, 0, 0, 1530,
+ 0, 0, 0, 0, 1386, 1033, 0, 0, 1527, 0,
+ 0, 0, 0, 1527, 1527, 913, 1034, 0, 0, 1035,
+ 0, 0, 0, 0, 1143, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1530, 0, 0, 0, 1387, 1036, 0, 0, 1037, 0,
+ 0, 0, 1038, 0, 1039, 0, 0, 0, 0, 0,
+ 0, 1040, 883, 0, 1041, 0, 883, 1388, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 913, 1389, 0,
+ 0, 1390, 0, 1042, 0, 0, 0, 1529, 0, 883,
+ 1043, 0, 0, 0, 0, 0, 1044, 0, 0, 1045,
+ 0, 0, 0, 1046, 0, 1143, 0, 1391, 0, 0,
+ 1392, 1047, 0, 1048, 1393, 0, 1394, 0, 1049, 0,
+ 0, 0, 0, 1395, 0, 0, 1396, 0, 0, 0,
+ 1527, 1050, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1051, 1397, 0, 0, 0, 0,
+ 883, 0, 1398, 0, 0, 0, 0, 0, 1399, 0,
+ 0, 1400, 0, 0, 0, 1401, 0, 0, 0, 0,
+ 0, 0, 0, 1402, 0, 1403, 0, 0, 883, 0,
+ 1404, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 943, 943, 0, 1405, 0, 943, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 943, 1530, 0, 0, 0, 0, 0, 0, 0, 0,
+ 883, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 897, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 943, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 898,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1530, 899, 0, 1530, 0, 0, 0,
+ 0, 0, 1527, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 900, 0, 943, 0, 0, 0, 901, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 902, 0, 0, 0, 0,
+ 0, 0, 0, 2719, 0, 0, 903, 0, 0, 0,
+ 0, 0, 0, 0, 0, 904, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 905, 0, 0,
+ 0, 0, 906, 0, 0, 0, 0, 0, 0, 907,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 908, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2719, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 909, 0, 0, 0, 0, 1530, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 910, 1530, 0, 1529, 943, 0,
+ 0, 943, 0, 0, 943, 0, 0, 0, 0, 0,
+ 1530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 943, 0, 0, 0, 0, 943, 0, 0, 0, 0,
+ 1529, 0, 0, 0, 911, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 943,
+ 943, 943, 0, 0, 943, 0, 0, 912, 0, 0,
+ 0, 0, 943, 943, 943, 943, 0, 913, 914, 0,
+ 883, 915, 0, 0, 0, 943, 883, 0, 943, 0,
+ 943, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 943, 0, 0, 943, 0, 916, 0, 0,
+ 917, 0, 0, 0, 918, 0, 919, 0, 2156, 2156,
+ 2156, 0, 0, 920, 0, 943, 921, 943, 0, 943,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1529,
+ 0, 0, 0, 0, 0, 922, 0, 0, 0, 943,
+ 0, 0, 923, 0, 0, 0, 1529, 924, 925, 0,
+ 943, 926, 0, 0, 0, 927, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1529, 928, 0, 0, 0, 0,
+ 929, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 930, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 931, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1529, 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, 0,
+ 0, 0, 1529, 1530, 0, 0, 1530, 0, 1530, 0,
+ 0, 0, 0, 1530, 1529, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 943, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1529, 1529, 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, 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, 883, 883, 883, 0, 0, 0, 0, 0,
+ 0, 0, 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, 0, 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, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2156, 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, 943, 0, 0, 0,
+ 0, 0, 943, 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, 883, 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, 0, 0, 883, 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,
+ 3524, 0, 0, 0, 2719, 3530, 0, 0, 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, 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, 0, 0, 0, 0,
+ 1529, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 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, 943, 0, 0,
+ 1530, 0, 0, 0, 0, 0, 943, 0, 0, 0,
+ 0, 0, 0, 0, 943, 0, 943, 0, 0, 943,
+ 0, 0, 0, 1530, 943, 943, 943, 943, 0, 0,
+ 943, 943, 943, 943, 943, 943, 943, 943, 943, 943,
+ 0, 0, 0, 943, 943, 939, 0, 0, 1530, 0,
+ 0, 0, 0, 943, 0, 0, 0, 943, 0, 883,
+ 0, 943, 0, 0, 0, 0, 0, 0, 0, 943,
+ 0, 0, 943, 0, 943, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1530, 0, 943, 0, 0, 943,
+ 943, 0, 0, 0, 943, 943, 0, 0, 0, 0,
+ 0, 943, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 0, 0, 943, 0, 0, 1141, 0, 0,
+ 0, 0, 0, 0, 0, 1141, 943, 1141, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2156, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 943, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 943,
+ 0, 0, 1529, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1530, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2719, 0, 0, 2719, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 883, 0,
+ 0, 0, 0, 883, 1530, 883, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 883, 1530,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 883, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 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, 0,
+ 0, 0, 0, 0, 0, 0, 1529, 0, 0, 0,
+ 0, 0, 0, 0, 943, 0, 0, 0, 0, 0,
+ 0, 1529, 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, 943, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 943, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 943, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 0, 943, 0, 0, 0, 0,
+ 0, 0, 0, 943, 943, 0, 1530, 0, 0, 0,
+ 943, 943, 0, 0, 0, 943, 1530, 0, 0, 0,
+ 0, 943, 0, 0, 943, 943, 0, 0, 0, 943,
+ 0, 0, 0, 0, 2719, 943, 0, 3530, 0, 3530,
+ 0, 0, 0, 0, 2719, 0, 0, 943, 0, 0,
+ 0, 0, 0, 0, 0, 943, 0, 0, 0, 943,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 1529, 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, 0, 0, 943, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2719, 0, 0,
+ 0, 0, 1530, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 939,
+ 0, 0, 0, 0, 0, 883, 0, 0, 939, 0,
+ 0, 0, 0, 0, 0, 0, 939, 0, 0, 939,
+ 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, 1529, 0, 1529,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1530, 0, 0, 0, 0, 0, 0,
+ 939, 0, 1518, 0, 0, 1528, 0, 0, 0, 939,
+ 0, 0, 0, 0, 0, 0, 939, 1518, 0, 939,
+ 1529, 0, 943, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2156, 0, 0,
+ 0, 0, 0, 2156, 0, 0, 0, 0, 0, 0,
+ 0, 1529, 0, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 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, 0, 0, 0, 0, 939, 939,
+ 0, 0, 0, 0, 0, 1141, 0, 0, 0, 1141,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1529,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 943, 0, 0, 0, 1530, 939, 0, 0, 0, 0,
+ 3530, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1529, 0, 0, 943,
+ 943, 0, 0, 943, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 0, 943, 0, 0, 0, 0,
+ 943, 0, 0, 943, 943, 0, 0, 0, 0, 0,
+ 943, 943, 0, 0, 1518, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 943, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 943, 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, 0, 0, 0, 0, 0, 0, 0, 1530, 0,
+ 0, 1141, 1141, 0, 1529, 0, 0, 0, 0, 943,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 939, 939, 0, 0, 1529,
+ 0, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 939, 0, 0, 883, 0,
+ 0, 939, 0, 943, 939, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1529, 1528, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 1530, 939, 939, 939, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 1530, 0, 943, 0, 943, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 943, 0, 0, 0, 0,
+ 0, 943, 0, 0, 0, 943, 2719, 0, 0, 0,
+ 0, 1530, 0, 0, 0, 943, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1518, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 883, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1530, 0, 0,
+ 939, 0, 1530, 1530, 0, 0, 0, 943, 0, 0,
+ 0, 0, 943, 943, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 3530, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 943, 0, 0, 0, 0, 0, 0, 943, 1528, 0,
+ 3530, 0, 0, 0, 1518, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 943, 0, 0, 0, 0, 0, 0, 0,
+ 0, 939, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1530, 1530,
+ 0, 939, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 943, 0, 0, 943, 0, 0, 943, 0, 0, 939,
+ 939, 939, 0, 939, 0, 0, 0, 943, 0, 0,
+ 0, 943, 0, 943, 0, 943, 0, 0, 0, 0,
+ 0, 0, 943, 939, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 943, 0, 0, 1529, 0, 1518, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1518, 0, 0, 883, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3530, 0, 2719, 0, 0, 0,
+ 0, 0, 0, 0, 0, 939, 0, 0, 0, 939,
+ 939, 0, 0, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 939, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1518, 0, 943, 943,
+ 943, 0, 0, 0, 0, 0, 0, 943, 883, 1518,
+ 0, 1530, 0, 0, 0, 0, 0, 943, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1528, 0, 0, 0, 0, 943,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1141, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 1518, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1529, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1529, 0, 0,
+ 0, 1141, 943, 0, 0, 0, 0, 0, 943, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 0, 943, 943, 0, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 943, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1528, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1141, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1141, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 943, 0, 0, 0, 0, 0,
+ 943, 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, 943, 0, 0,
+ 1518, 0, 943, 0, 0, 0, 0, 0, 943, 0,
+ 0, 0, 0, 943, 0, 0, 0, 0, 0, 0,
+ 0, 0, 883, 0, 0, 0, 0, 0, 0, 939,
+ 939, 939, 0, 0, 1529, 0, 0, 0, 0, 0,
+ 0, 0, 0, 943, 0, 0, 0, 0, 0, 0,
+ 1528, 0, 0, 943, 0, 0, 1529, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1528, 0, 0,
+ 0, 943, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 943, 1528, 883, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 883, 0, 943, 943, 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, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 939, 0, 0, 939, 0, 0,
+ 1528, 0, 0, 0, 0, 0, 0, 939, 0, 0,
+ 0, 0, 0, 1528, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 939, 939,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 1518, 1518, 939, 0, 0, 939, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1528, 1528, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5447, 0, 1529, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1518, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 939, 0, 0, 939, 939, 0,
+ 0, 0, 0, 0, 0, 1529, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1518, 0,
+ 0, 0, 0, 0, 0, 939, 939, 0, 0, 0,
+ 0, 939, 939, 0, 0, 0, 0, 0, 939, 939,
+ 939, 0, 0, 939, 0, 939, 0, 939, 939, 939,
+ 939, 939, 939, 0, 939, 0, 939, 939, 0, 0,
+ 939, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1528, 939, 939, 939, 939, 0,
+ 0, 0, 0, 939, 0, 0, 0, 939, 0, 0,
+ 939, 0, 0, 939, 939, 939, 939, 939, 939, 939,
+ 939, 939, 0, 939, 0, 0, 0, 0, 0, 0,
+ 0, 939, 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, 3530,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 939, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 939, 0, 0, 0, 0, 0, 0, 0, 0, 939,
+ 939, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1518,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3530, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 1528, 1528, 0, 0, 0,
+ 0, 0, 0, 1529, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 0, 0, 1518, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 939, 1529, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 939, 0, 0, 0, 1528, 0, 0,
+ 939, 0, 0, 939, 939, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1141, 0, 1529, 0,
+ 0, 0, 0, 1529, 1529, 0, 0, 0, 0, 0,
+ 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1518, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1518, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1141, 1518, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5447,
+ 1529, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 939, 939, 939, 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, 939, 1528, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 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, 0, 0, 0, 0, 1528, 0, 0, 1528, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 939, 0, 0, 0,
+ 0, 1518, 1529, 0, 1518, 0, 1518, 0, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1518, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1518,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1518, 0, 0, 0, 0, 0,
+ 1528, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 939, 0, 0, 1528, 0, 0,
+ 939, 0, 0, 939, 0, 0, 939, 0, 0, 0,
+ 0, 0, 1528, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 939, 0, 0, 0, 0, 939, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1518, 0, 1518, 0, 0, 0,
+ 0, 939, 939, 939, 0, 0, 939, 0, 0, 0,
+ 0, 0, 0, 0, 939, 939, 939, 939, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 939, 0, 0,
+ 939, 0, 939, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 939, 939, 0, 0, 939, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 939, 0, 939,
+ 0, 939, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 939, 0, 0, 0, 0, 0, 0, 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, 1518, 0,
+ 0, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 939,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 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, 0, 0,
+ 0, 0, 0, 0, 0, 1528, 0, 0, 1528, 0,
+ 1528, 0, 0, 0, 0, 1528, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1518, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 939, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 1518, 1528, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1528, 0, 0, 0, 0, 1520, 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1518, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1528, 0,
+ 1528, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1518, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1518, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 939, 0,
+ 0, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 0, 0, 1528, 0, 0, 0, 0, 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, 0,
+ 0, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1518, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 944, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1528, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1528, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 0, 0, 0, 1528, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1518, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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, 939,
+ 0, 0, 1528, 0, 0, 0, 0, 0, 939, 0,
+ 0, 0, 0, 0, 0, 0, 939, 0, 939, 0,
+ 0, 939, 0, 0, 0, 1528, 939, 939, 939, 939,
+ 0, 0, 939, 939, 939, 939, 939, 939, 939, 939,
+ 939, 939, 0, 0, 0, 939, 939, 0, 0, 0,
+ 1528, 0, 0, 0, 0, 939, 0, 0, 0, 939,
+ 0, 0, 0, 939, 0, 0, 0, 0, 0, 0,
+ 0, 939, 0, 0, 939, 0, 939, 0, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 1528, 0, 939, 0,
+ 0, 939, 939, 0, 0, 0, 939, 939, 0, 0,
+ 0, 0, 0, 939, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 939, 0, 0, 939, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 939, 0,
+ 0, 1518, 0, 1518, 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, 1521, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 939, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1521, 0, 0, 0,
+ 0, 939, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 0, 1528, 0, 0,
+ 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1518, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1518, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1528, 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, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1518, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 0, 0, 0, 0, 1521, 0,
+ 0, 0, 0, 0, 0, 0, 939, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0,
+ 0, 0, 0, 1518, 0, 0, 0, 0, 939, 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, 1528, 0, 1528, 939, 939,
+ 0, 0, 0, 0, 0, 1520, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1518, 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, 0, 0, 0, 0,
+ 0, 0, 939, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 944, 0, 939, 0, 0, 0, 0, 0,
+ 0, 944, 0, 0, 0, 0, 0, 0, 0, 944,
+ 0, 0, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 939, 0, 0, 939, 0, 0,
+ 0, 0, 0, 0, 0, 939, 939, 1520, 1528, 0,
+ 0, 0, 939, 939, 1518, 0, 0, 939, 1528, 0,
+ 0, 0, 0, 939, 1520, 0, 939, 939, 0, 0,
+ 0, 939, 0, 0, 0, 0, 0, 939, 0, 0,
+ 0, 0, 1520, 0, 0, 0, 0, 0, 0, 939,
+ 0, 0, 0, 0, 0, 0, 0, 939, 0, 0,
+ 0, 939, 0, 0, 1521, 0, 0, 0, 0, 0,
+ 0, 0, 1518, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 0, 1531, 0,
+ 0, 0, 944, 0, 939, 0, 0, 0, 1520, 944,
+ 0, 0, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1531, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 0, 0, 939, 0, 0, 0,
+ 1520, 1521, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 0, 1528, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1521, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 1520, 0, 1528, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 0, 1528, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1518, 0, 0, 0,
+ 0, 944, 944, 0, 0, 0, 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, 944, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1528, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1521, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1521, 0, 0,
+ 939, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
+ 0, 1520, 1518, 0, 0, 0, 0, 0, 0, 0,
+ 939, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1518, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 1528, 0, 1528, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1518,
+ 1521, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1521, 0, 0, 0, 0, 944, 944,
+ 0, 0, 0, 0, 0, 1521, 0, 944, 0, 0,
+ 0, 0, 0, 0, 1531, 0, 0, 0, 944, 0,
+ 0, 0, 939, 0, 944, 0, 1528, 944, 0, 0,
+ 0, 0, 0, 0, 0, 1518, 0, 0, 0, 1531,
+ 1518, 1518, 0, 0, 0, 1521, 1521, 0, 0, 0,
+ 0, 939, 939, 0, 1531, 939, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 939, 0, 0, 0, 0, 0, 0, 939, 0, 0,
+ 0, 0, 939, 0, 0, 939, 939, 0, 0, 0,
+ 0, 0, 939, 939, 0, 0, 0, 0, 944, 944,
+ 944, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 939, 0, 939, 0, 1520, 0,
+ 0, 0, 1520, 1520, 0, 0, 0, 0, 939, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1518, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1528, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 939, 0, 0, 1520, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 1521, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 939, 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, 0, 0, 0,
+ 0, 1531, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 939, 0, 1528, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 939, 1528, 0, 939, 0, 939, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 939, 0, 0,
+ 0, 0, 0, 939, 0, 0, 0, 939, 0, 1518,
+ 0, 0, 0, 1528, 0, 0, 0, 939, 0, 0,
+ 0, 0, 944, 944, 944, 0, 944, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 944, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 1521, 1521, 0, 0, 1528,
+ 0, 0, 0, 0, 1528, 1528, 0, 0, 0, 939,
+ 0, 0, 0, 0, 939, 939, 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, 939, 0, 0, 0, 0, 1521, 944, 939,
+ 0, 0, 944, 944, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 0, 944, 0, 0,
+ 0, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 0, 0, 1520, 0, 0, 0, 0,
+ 0, 0, 1521, 0, 0, 0, 0, 0, 0, 0,
+ 1528, 1528, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 939, 0, 0, 939, 0, 1531, 939, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 939,
+ 0, 0, 0, 939, 0, 939, 0, 939, 0, 0,
+ 0, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1531, 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, 1531, 0, 0, 1520, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1520,
+ 939, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 939, 0, 0, 0, 1531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 939, 939, 939, 1521, 0, 0, 0, 0, 0, 939,
+ 0, 0, 0, 1528, 0, 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, 939, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 944, 944, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1531, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1521, 0, 0, 1521, 0,
+ 1531, 0, 0, 0, 939, 0, 0, 0, 0, 0,
+ 939, 0, 0, 0, 0, 0, 0, 0, 1531, 0,
+ 939, 0, 0, 0, 0, 0, 939, 939, 0, 939,
+ 0, 0, 0, 0, 0, 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, 1531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 944, 0, 0, 1531, 0, 0, 939, 0, 0, 0,
+ 944, 0, 939, 0, 0, 0, 1531, 0, 0, 0,
+ 0, 0, 1520, 0, 0, 1520, 0, 1520, 1531, 0,
+ 0, 0, 1520, 0, 0, 0, 0, 0, 0, 939,
+ 1521, 944, 944, 0, 939, 0, 0, 0, 0, 0,
+ 939, 0, 0, 0, 0, 939, 944, 1521, 0, 944,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1531, 1531,
+ 0, 0, 1521, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 0, 939, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 939, 0, 0, 0, 0,
+ 1520, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 939, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1520, 939, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 944, 944, 0, 0, 0, 0, 0, 0, 939, 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, 944, 944,
+ 0, 0, 0, 0, 944, 944, 0, 0, 0, 0,
+ 0, 944, 944, 944, 0, 1520, 944, 1520, 944, 0,
+ 944, 944, 944, 944, 944, 944, 0, 944, 0, 944,
+ 944, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1531, 944, 944,
+ 944, 944, 0, 0, 0, 0, 944, 0, 0, 0,
+ 944, 0, 0, 944, 0, 0, 944, 944, 944, 944,
+ 944, 944, 944, 944, 944, 0, 944, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 944, 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, 1521, 0, 0, 1521, 0,
+ 1521, 0, 0, 0, 0, 1521, 0, 0, 944, 1520,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 944, 944, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1521, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1521, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1521, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1520, 0, 0,
+ 0, 0, 0, 0, 1531, 0, 0, 0, 1531, 1531,
+ 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 0, 1521, 0,
+ 1521, 0, 0, 0, 0, 0, 944, 0, 0, 0,
+ 1531, 0, 0, 944, 0, 0, 944, 944, 0, 0,
+ 0, 0, 0, 0, 1531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1531, 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, 1521, 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, 1520, 0, 0,
+ 0, 0, 1521, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 944, 944,
+ 1521, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 944, 1531, 1521, 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, 944,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1531, 0,
+ 0, 1531, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 944,
+ 0, 0, 1521, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1521, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1521, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1531, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 1531, 0, 0, 944, 0, 0, 944, 0, 0, 944,
+ 0, 0, 0, 0, 0, 1531, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 944, 0, 0, 0, 0,
+ 944, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1520, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 944, 944, 0, 0, 944,
+ 0, 0, 0, 0, 0, 0, 0, 944, 944, 944,
+ 944, 0, 0, 0, 0, 0, 0, 1521, 0, 0,
+ 944, 0, 0, 944, 0, 944, 0, 0, 0, 0,
+ 0, 0, 1520, 0, 1520, 0, 944, 944, 0, 0,
+ 944, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 944, 0, 944, 0, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 944, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1521, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1521, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 944, 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, 1520, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1531, 0,
+ 0, 1531, 0, 1531, 0, 0, 0, 0, 1531, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 944,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1003, 0, 0, 0, 0, 0, 0, 0, 0, 1003,
+ 0, 0, 0, 0, 0, 0, 0, 1531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1521, 1531, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1003, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1531, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1520, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1521, 1197, 1521, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1197, 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, 1531, 0, 1531, 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, 0, 0, 0, 0, 0, 0, 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, 1531, 0, 0, 0, 1521, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1521, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 944, 0, 0, 0, 0, 0, 944, 0, 0,
+ 0, 0, 0, 0, 0, 1531, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1248,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1531, 0, 0, 0, 0, 0,
+ 0, 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, 1531, 1521, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1520, 1531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1531, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1521, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
+ 0, 0, 944, 0, 0, 1531, 0, 0, 0, 0,
+ 0, 944, 0, 0, 0, 0, 0, 0, 0, 944,
+ 0, 944, 0, 0, 944, 0, 0, 1520, 1531, 944,
+ 944, 944, 944, 0, 0, 944, 944, 944, 944, 944,
+ 944, 944, 944, 944, 944, 0, 0, 0, 944, 944,
+ 0, 0, 0, 1531, 0, 0, 0, 0, 944, 0,
+ 0, 0, 944, 0, 0, 0, 944, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 944, 0, 944,
+ 0, 0, 0, 0, 0, 0, 0, 1003, 1003, 1531,
+ 0, 944, 0, 0, 944, 944, 0, 0, 0, 944,
+ 944, 0, 0, 0, 0, 0, 944, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 944, 0, 1521, 944,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 944, 0, 0, 0, 1248, 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, 1521, 0, 944, 0,
+ 0, 1520, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1531, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1520, 0, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1289, 0, 0, 0,
+ 0, 0, 0, 0, 1324, 0, 0, 1326, 0, 0,
+ 1331, 1332, 0, 1335, 0, 1338, 1520, 0, 1344, 0,
+ 1346, 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, 1531,
+ 0, 0, 0, 0, 0, 0, 0, 1427, 0, 0,
+ 1521, 0, 0, 0, 1439, 1440, 0, 0, 1446, 0,
+ 1449, 1450, 0, 0, 1531, 1452, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1248, 0, 1003, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1557, 0, 1559, 1520, 0,
+ 0, 0, 0, 0, 0, 0, 1573, 1575, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1003, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 944,
+ 0, 0, 0, 0, 0, 0, 1521, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1531, 0,
+ 0, 0, 0, 0, 1521, 1523, 0, 0, 0, 0,
+ 0, 944, 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, 1248, 0, 1521, 0, 0, 0, 0, 1531, 0,
+ 1531, 944, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1197, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1521,
+ 0, 0, 0, 0, 1521, 1521, 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, 944, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 1920, 0, 0, 1921, 0, 1924, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1967, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 944, 0, 0, 0, 0, 0, 0, 0, 944, 944,
+ 0, 1531, 0, 0, 0, 944, 944, 0, 0, 0,
+ 944, 1531, 0, 0, 0, 0, 944, 0, 0, 944,
+ 944, 0, 0, 0, 944, 0, 0, 0, 0, 0,
+ 944, 1521, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 944, 0, 0, 0, 2139, 0, 0, 0,
+ 944, 0, 0, 0, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2169, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2180, 0, 0, 0, 0, 2183, 0, 944, 0, 0,
+ 0, 0, 0, 0, 0, 2186, 0, 0, 0, 0,
+ 2190, 0, 0, 0, 0, 0, 0, 0, 0, 2193,
+ 0, 0, 0, 0, 2200, 0, 0, 2204, 0, 944,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2258, 0,
+ 0, 0, 731, 0, 0, 0, 0, 775, 0, 775,
+ 0, 1523, 0, 0, 0, 0, 0, 0, 1531, 775,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 0,
+ 1531, 0, 0, 0, 775, 0, 0, 0, 0, 0,
+ 0, 1523, 0, 0, 0, 775, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 775, 775, 0, 0,
+ 775, 0, 0, 1521, 0, 0, 775, 0, 0, 0,
+ 1097, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1097, 0, 0, 0, 0, 0, 1531, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 775, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 0, 1523, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2426, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 2442, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1531,
+ 0, 1531, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 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, 944, 0, 0, 0, 1531,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 944, 0, 0, 944, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 944, 0, 0, 0, 0, 944, 775, 0, 944, 944,
+ 0, 0, 0, 0, 0, 944, 944, 0, 0, 0,
+ 0, 1197, 1573, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 944,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 944, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2682, 0, 0, 2682, 0, 0,
+ 0, 0, 0, 1531, 0, 2689, 0, 0, 0, 0,
+ 0, 0, 0, 0, 944, 0, 0, 0, 0, 0,
+ 0, 2697, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 944, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1753, 1753, 0, 0, 0, 2792, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 1531,
+ 0, 0, 0, 0, 1523, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2881, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 944, 1531, 0, 944,
+ 0, 944, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 775, 0, 0, 0, 0,
+ 944, 0, 0, 0, 0, 0, 944, 0, 0, 0,
+ 944, 0, 0, 0, 0, 0, 1531, 0, 0, 0,
+ 944, 1523, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 775, 775, 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, 1531, 0, 0, 0, 0, 1531, 1531, 0,
+ 0, 0, 944, 0, 0, 0, 0, 944, 944, 0,
+ 0, 1523, 775, 0, 0, 0, 0, 2153, 2157, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 944, 0, 0, 0, 3043,
+ 0, 0, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 0, 0, 0, 0, 0, 0, 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, 1531, 1531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1523, 0, 0,
+ 0, 0, 0, 0, 0, 944, 0, 0, 944, 0,
+ 0, 944, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 0, 0, 944, 0, 0, 0, 944, 0, 944, 0,
+ 944, 0, 0, 0, 0, 0, 0, 944, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3170, 0,
+ 3171, 0, 0, 0, 0, 0, 944, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1573, 3182, 0, 3183,
+ 0, 1523, 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, 1474, 775,
+ 0, 775, 0, 1523, 0, 0, 0, 0, 0, 3205,
+ 0, 0, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 0, 1573, 0, 0, 0, 1573, 0, 0, 0, 1573,
+ 0, 0, 1573, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1523, 1523, 0, 0, 775,
+ 0, 0, 775, 775, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 944, 944, 0, 731, 0, 1097,
+ 0, 1097, 944, 0, 0, 0, 1531, 731, 0, 0,
+ 0, 775, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2457, 0, 0, 0, 0, 0, 0,
+ 0, 1097, 1097, 0, 944, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1524,
+ 0, 0, 0, 2472, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1524, 0, 3423, 775, 0,
+ 775, 2490, 2491, 2492, 0, 2495, 0, 944, 0, 0,
+ 0, 0, 0, 944, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 944, 0, 2537, 0, 0, 0, 944,
+ 944, 0, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 944, 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, 731,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 731, 731, 0, 0, 1902, 0, 944,
+ 0, 0, 0, 0, 0, 944, 0, 2614, 0, 0,
+ 0, 2626, 2631, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 944, 0, 0, 0, 0, 944, 0, 0,
+ 731, 0, 1248, 944, 0, 0, 0, 0, 944, 0,
+ 0, 0, 0, 0, 0, 3520, 3521, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3536, 3537, 0, 0, 944, 3540,
+ 3541, 0, 0, 0, 3544, 0, 0, 0, 944, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3555, 0,
+ 0, 0, 0, 0, 0, 3564, 944, 0, 0, 3567,
+ 3568, 0, 0, 3571, 3572, 0, 0, 0, 0, 944,
+ 3577, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3596, 0, 3598, 0, 0,
+ 0, 944, 944, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3621, 0, 0, 0, 0,
+ 3623, 1523, 0, 0, 0, 1523, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 3629, 0, 0, 0, 0,
+ 0, 0, 0, 0, 3636, 0, 0, 3640, 0, 3642,
+ 3645, 3647, 0, 0, 0, 0, 3655, 3658, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3671, 0, 0, 0,
+ 0, 3680, 0, 0, 0, 3683, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1524, 0, 1523, 0, 0,
+ 3700, 0, 0, 0, 0, 0, 3709, 3710, 0, 0,
+ 0, 1523, 0, 3715, 0, 0, 0, 0, 0, 0,
+ 1524, 0, 0, 3729, 3730, 0, 0, 0, 0, 3734,
+ 0, 0, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 3741, 0, 0, 3744, 0, 0, 0, 0, 3747,
+ 0, 0, 1523, 0, 0, 3750, 3751, 0, 0, 0,
+ 0, 3755, 0, 0, 3759, 0, 0, 0, 3766, 3767,
+ 3768, 3769, 0, 3771, 0, 0, 0, 0, 0, 0,
+ 0, 2153, 2153, 2153, 0, 0, 3796, 3797, 0, 3799,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3808, 3809, 3810, 0, 0, 731, 0, 0, 0, 0,
+ 775, 0, 775, 0, 0, 775, 0, 775, 0, 0,
+ 775, 775, 775, 0, 0, 1524, 2401, 0, 0, 0,
+ 0, 0, 0, 775, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 775, 0, 775,
+ 0, 0, 0, 0, 775, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3863, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3900, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1524, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2547, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 775, 775, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 731, 0, 0, 0, 0, 731, 731, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1248, 0,
+ 0, 731, 0, 0, 0, 1523, 0, 0, 1523, 0,
+ 0, 0, 0, 1573, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3293, 0, 0, 775, 0, 731, 0,
+ 0, 0, 0, 0, 0, 3313, 4061, 3314, 2686, 3316,
+ 0, 0, 3328, 3331, 3336, 0, 0, 0, 0, 3342,
+ 0, 0, 3347, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3354, 3355, 3356,
+ 3357, 0, 0, 0, 0, 3364, 0, 0, 0, 3382,
+ 0, 0, 3384, 0, 0, 3391, 3392, 3393, 3394, 3395,
+ 3396, 3397, 3398, 3399, 0, 3400, 0, 0, 0, 0,
+ 1523, 0, 0, 1753, 0, 0, 2153, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 731, 1523, 0, 0,
+ 0, 0, 0, 0, 0, 0, 731, 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, 3445, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1524, 0,
+ 0, 0, 0, 1300, 0, 0, 0, 0, 0, 0,
+ 0, 2491, 2492, 0, 0, 1334, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1353, 0, 0, 731,
+ 0, 0, 731, 731, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1368, 0, 0, 0, 0, 0,
+ 1416, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1524, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1573, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 731, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 3569, 0, 0, 0, 0, 4298, 0,
+ 0, 0, 4300, 0, 0, 0, 0, 0, 4302, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4313, 4315, 0, 0,
+ 0, 4315, 0, 0, 0, 0, 4326, 4327, 4328, 0,
+ 0, 0, 0, 0, 0, 1523, 0, 0, 1523, 0,
+ 1523, 0, 0, 0, 0, 1523, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 4357, 4358, 4359, 4360, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1524, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1524, 0, 0, 1523, 0, 0, 1790, 0, 4378,
+ 0, 4382, 4383, 4384, 0, 0, 0, 0, 0, 1524,
+ 0, 0, 0, 1523, 0, 0, 1814, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1523, 1838,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 775, 0, 775, 0, 1524, 0, 775, 0, 775, 0,
+ 0, 775, 0, 0, 0, 775, 0, 1524, 0, 0,
+ 2547, 0, 0, 0, 0, 0, 0, 0, 1523, 1524,
+ 1523, 0, 0, 0, 0, 4457, 3820, 3821, 2153, 0,
+ 0, 0, 3825, 0, 4463, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2033, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1524,
+ 1524, 0, 0, 0, 3854, 4477, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4520, 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, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 4557, 0, 0, 0, 0, 1003, 0, 2401, 0, 0,
+ 0, 0, 1523, 0, 3424, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2686, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2209, 0, 0, 0, 0, 4602,
+ 0, 1523, 0, 0, 0, 1003, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2247, 2250, 2251, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1524, 0,
+ 4629, 0, 4630, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1573, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 1523, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4655, 0, 0, 0, 0,
+ 1526, 1523, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 731, 0, 0, 1523, 731, 0,
+ 0, 0, 0, 0, 3509, 0, 1902, 0, 0, 775,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 4066, 0, 0, 0, 0, 4072,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 731, 0, 0,
+ 0, 0, 0, 0, 0, 2495, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 3336, 0, 3336, 3336,
+ 0, 0, 0, 0, 0, 0, 1790, 0, 0, 4132,
+ 0, 0, 4135, 0, 4137, 0, 0, 0, 0, 0,
+ 0, 0, 1523, 0, 0, 0, 0, 0, 0, 2441,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1790, 0,
+ 0, 0, 0, 0, 0, 1523, 0, 0, 0, 4158,
+ 0, 4161, 0, 4163, 0, 1524, 0, 0, 0, 1524,
+ 1524, 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, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2614, 0, 0, 0,
+ 0, 1524, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2631, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4860, 0, 4861, 0,
+ 0, 731, 0, 0, 0, 4863, 0, 0, 0, 731,
+ 0, 0, 731, 0, 0, 0, 0, 0, 0, 0,
+ 0, 4873, 0, 0, 731, 0, 1524, 0, 0, 0,
+ 0, 0, 0, 4879, 0, 0, 0, 4882, 2591, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4904, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4284, 0,
+ 0, 0, 0, 4908, 0, 0, 0, 1523, 4912, 0,
+ 1526, 0, 0, 0, 2647, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4947, 0, 1526, 0, 4951, 0, 0,
+ 0, 0, 0, 0, 0, 4956, 4957, 4958, 4959, 0,
+ 1526, 0, 0, 0, 4964, 4965, 4966, 4967, 0, 0,
+ 0, 4969, 4970, 0, 0, 0, 0, 4977, 4978, 0,
+ 4980, 4981, 4982, 4983, 4984, 4985, 4986, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4995, 0, 0, 0,
+ 4998, 4999, 5000, 5001, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1523, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4315, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2531, 0, 0,
+ 0, 1523, 0, 0, 0, 5024, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1524, 0, 0,
+ 2824, 0, 0, 0, 0, 0, 0, 0, 0, 2847,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 2882, 0, 0,
+ 2531, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2905, 0, 0, 2908, 0, 775, 2401, 0, 0, 0,
+ 0, 0, 0, 0, 0, 4315, 0, 0, 0, 1524,
+ 0, 0, 1524, 731, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2153, 0, 0, 0, 0, 1523, 2153, 0, 1573, 1573,
+ 1573, 1573, 1573, 0, 0, 0, 2958, 1526, 0, 0,
+ 0, 5148, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2977, 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, 1523, 0, 0,
+ 3001, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3052, 0, 0, 1524, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1524, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3095, 0, 0, 0, 0, 0, 1524, 3108, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2686, 0,
+ 0, 0, 0, 731, 0, 0, 0, 0, 1523, 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, 5295, 0, 0, 0, 5296, 5297, 5298, 5299,
+ 0, 4671, 0, 5301, 0, 0, 0, 0, 0, 0,
+ 4675, 0, 0, 0, 3193, 0, 0, 2531, 4677, 0,
+ 4678, 2531, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 5321, 5322, 5323,
+ 5324, 5325, 0, 5327, 5328, 0, 0, 4702, 4703, 0,
+ 0, 0, 0, 1526, 0, 5337, 5338, 0, 0, 0,
+ 0, 0, 0, 1790, 1790, 3342, 0, 0, 0, 0,
+ 0, 0, 0, 4729, 0, 0, 4732, 0, 4734, 0,
+ 0, 0, 0, 3251, 1523, 5343, 0, 0, 0, 0,
+ 4739, 0, 0, 1573, 1573, 0, 1573, 0, 4746, 4747,
+ 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, 1523, 0, 0, 0, 0,
+ 4793, 0, 0, 0, 0, 0, 0, 0, 0, 1524,
+ 0, 0, 1524, 0, 1524, 0, 0, 1523, 0, 1524,
+ 0, 0, 0, 0, 0, 0, 0, 1526, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 4811, 0, 0,
+ 0, 0, 0, 3418, 0, 0, 0, 0, 0, 5407,
+ 1526, 0, 0, 4824, 0, 0, 0, 0, 1524, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 3430,
+ 0, 0, 0, 0, 0, 1523, 0, 1524, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1838, 1524, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1838, 1838, 0, 0, 0, 0, 0, 5463,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1790, 0, 0, 1526,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1526, 0, 0, 0,
+ 0, 0, 1524, 0, 1524, 0, 0, 0, 0, 0,
+ 0, 2531, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2531, 0, 1523, 0,
+ 3324, 0, 0, 0, 0, 1573, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2531, 2531, 2531, 0, 0, 2531,
+ 1573, 0, 0, 0, 0, 0, 0, 0, 731, 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, 1523, 0, 0, 1526,
+ 0, 2531, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 1526, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 0, 0, 775, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 5565, 0, 0, 0, 1524, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5575, 0, 0, 1526, 1526, 5580, 5581, 0, 0,
+ 0, 0, 775, 0, 0, 1524, 5592, 0, 2531, 3639,
+ 0, 0, 0, 5594, 0, 0, 0, 0, 0, 0,
+ 2531, 0, 0, 0, 3661, 2531, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 3688, 0, 0, 0, 0, 0, 5644,
+ 5111, 5112, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5661,
+ 1523, 1003, 0, 0, 1524, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5678, 0, 0, 0,
+ 0, 0, 0, 731, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4315, 0, 0, 0,
+ 0, 1524, 0, 0, 0, 0, 0, 5701, 0, 3764,
+ 3765, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5163, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 5169, 0, 0, 0,
+ 1573, 0, 0, 1526, 0, 0, 0, 0, 0, 0,
+ 0, 1573, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5740, 0, 5187, 5189, 0,
+ 0, 0, 0, 0, 5193, 5194, 1523, 0, 0, 5195,
+ 0, 0, 0, 0, 0, 5198, 5757, 0, 5201, 5202,
+ 0, 0, 0, 5206, 0, 0, 1524, 0, 5765, 5210,
+ 0, 0, 0, 0, 1523, 0, 3889, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1524,
+ 0, 0, 0, 1573, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1523, 1524, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1753, 0, 0, 0,
+ 0, 0, 0, 5824, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1524, 0, 0, 3509, 0, 0, 0, 0, 5274, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1523,
+ 0, 0, 0, 0, 1523, 1523, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4315, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 1526, 1526, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1573, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 5915, 0, 5340, 731, 0, 0, 0, 0, 0, 0,
+ 0, 1524, 0, 0, 0, 5928, 1526, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 731, 0,
+ 1526, 1523, 0, 0, 0, 731, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 731, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5957,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1526, 0, 0, 5968, 0, 5378, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1524, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 6030, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 4177, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6052, 0, 0, 0, 0, 1838,
+ 0, 0, 731, 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,
+ 0, 0, 0, 5485, 5486, 0, 0, 5487, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1524,
+ 0, 731, 1526, 0, 0, 0, 0, 2531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6119, 5522, 5523, 0, 2531, 2531, 0,
+ 2531, 0, 0, 3324, 3324, 0, 4109, 0, 3324, 0,
+ 0, 0, 2531, 0, 0, 2531, 0, 0, 5537, 1524,
+ 2531, 1524, 0, 0, 0, 0, 2531, 0, 0, 0,
+ 0, 2531, 0, 0, 0, 0, 0, 0, 2531, 2531,
+ 2531, 2531, 0, 0, 0, 3324, 3324, 0, 2531, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 1526, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2531, 0, 2531, 0,
+ 0, 0, 0, 0, 0, 2531, 2531, 2531, 2531, 2531,
+ 2531, 2531, 2531, 2531, 2531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2686, 2531,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1524, 0, 0, 0, 0, 0, 0, 4400,
+ 0, 0, 1524, 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, 1526, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 731, 0, 0, 0,
+ 0, 1526, 731, 0, 0, 0, 731, 0, 3342, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2531, 0, 5723, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2495,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1524, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5772, 0, 0, 0, 0, 4523, 4524, 4525, 1524,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 4534, 0, 0, 0, 0, 0, 0,
+ 0, 1524, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 5809, 0, 4550, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 4560, 4562, 0, 0,
+ 0, 4567, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1524,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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, 1526, 0, 1526,
+ 0, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5522,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2531, 2531, 0, 4654, 0, 2531,
+ 1790, 0, 0, 0, 0, 5917, 0, 0, 0, 0,
+ 0, 0, 0, 1526, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2531, 0,
+ 0, 0, 1526, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 1524, 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, 775, 0, 0, 0, 0, 0,
+ 0, 0, 5971, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1524, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 6000, 6000, 6000, 0, 0, 1526, 0, 1526,
+ 0, 0, 0, 4760, 4761, 4762, 0, 731, 0, 0,
+ 0, 5522, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 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, 6062, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 775, 0,
+ 2531, 6000, 0, 0, 1524, 0, 2531, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1526, 0, 0, 4109, 4109, 0, 0, 3324, 3324,
+ 3324, 3324, 0, 0, 3324, 3324, 3324, 3324, 3324, 3324,
+ 3324, 3324, 3324, 3324, 4109, 0, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2531, 0, 0, 2531,
+ 0, 2531, 0, 0, 4109, 4109, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 2531, 3324, 3324, 2531, 0, 2531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 6154, 0, 0, 0, 0, 0, 0, 1526,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1524, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 1526, 0, 0, 0, 0, 0, 0, 6000, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1526, 6181, 1524, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 731, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1524, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 5021, 0, 0, 2531, 0,
+ 0, 0, 0, 0, 0, 0, 5034, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 1524, 0, 0, 0, 5065, 1524, 1524,
+ 0, 1526, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 731, 0,
+ 0, 0, 0, 0, 1526, 0, 0, 0, 0, 0,
+ 3108, 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, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1526, 0, 0, 0, 3193,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 1524, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3324, 0,
+ 0, 0, 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, 5211, 5212, 5213, 5214, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 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, 1524, 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, 2531, 0, 0, 0, 2531,
+ 0, 2531, 2531, 0, 0, 0, 0, 0, 4109, 4109,
+ 4109, 4109, 0, 0, 0, 0, 4109, 4109, 4109, 4109,
+ 4109, 4109, 4109, 4109, 4109, 4109, 2531, 2531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 2531, 0, 0, 2531, 0, 2531, 0,
+ 0, 0, 0, 2531, 0, 0, 4109, 4109, 0, 0,
+ 2531, 2531, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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, 2531, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2531, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 2531, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1526, 0, 1526, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 5450, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 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, 1526, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4109,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2531, 2531, 0, 0, 0,
+ 0, 0, 0, 1526, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 5616, 0, 0, 1526, 0, 0, 2531, 0, 0,
+ 0, 0, 0, 2531, 3324, 0, 5629, 0, 0, 0,
+ 0, 1790, 0, 0, 0, 0, 1526, 0, 0, 0,
+ 0, 2531, 0, 2531, 0, 0, 0, 2531, 2531, 2531,
+ 0, 0, 2531, 0, 0, 2531, 2531, 5666, 0, 0,
+ 2531, 0, 0, 0, 2531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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, 0, 0, 0, 0, 0, 0, 0, 2531, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 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, 5753, 0, 114, 115, 0, 0,
+ 0, 0, 116, 0, 2531, 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, 1526, 0, 0,
+ 0, 0, 2531, 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, 134, 0, 0, 0, 0, 0,
+ 0, 138, 0, 139, 5831, 1526, 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, 4109, 3324, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2531,
+ 2531, 2531, 0, 0, 0, 0, 0, 0, 156, 3324,
+ 0, 0, 0, 0, 0, 0, 158, 0, 0, 0,
+ 0, 160, 0, 0, 0, 0, 0, 162, 0, 0,
+ 0, 0, 0, 163, 0, 164, 2531, 2531, 0, 0,
+ 0, 0, 166, 0, 167, 0, 0, 0, 0, 0,
+ 0, 2531, 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, 1526,
+ 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,
+ 207, 0, 0, 0, 0, 1526, 209, 4109, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3324, 0, 0, 4109, 0, 214, 0, 2531, 216, 0,
+ 0, 217, 0, 1526, 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, 1526, 0, 0, 0, 2531, 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, 2531, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 0, 0, 0, 1526, 0,
+ 0, 0, 0, 1526, 1526, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3501, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4109,
+ 0, 3324, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 2531, 0, 0, 0, 0, 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, 0, 0, 0,
+ 0, 0, 0, 0, 0, 2531, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 2531, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 2531, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3324, 0, 0, 0, 0, 3324, 0, 0, 0,
+ 0, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 1526, 4109, 743, 744, 4109, 0, 2531, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 2531, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 792, 437, 438, 439, 793, 794,
+ 795, 796, 797, 798, 799, 440, 441, 800, 442, 443,
+ 444, 126, 445, 446, 447, 128, 129, 130, 131, 132,
+ 801, 448, 449, 450, 451, 452, 453, 802, 803, 454,
+ 455, 804, 134, 456, 805, 457, 458, 459, 460, 138,
+ 806, 139, 807, 461, 462, 463, 464, 465, 142, 466,
+ 467, 808, 809, 468, 469, 470, 471, 472, 473, 810,
+ 145, 474, 475, 811, 812, 813, 814, 146, 815, 816,
+ 817, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 818, 483, 819, 484, 485, 486, 487, 488, 489, 820,
+ 490, 491, 492, 493, 821, 822, 494, 495, 496, 497,
+ 498, 823, 499, 500, 501, 824, 502, 503, 504, 825,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 826, 513, 827, 514, 515, 162, 516, 828, 517, 829,
+ 518, 163, 830, 164, 519, 520, 521, 522, 831, 523,
+ 166, 832, 167, 524, 525, 833, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 834, 534, 535, 536,
+ 537, 538, 539, 540, 835, 541, 170, 171, 836, 542,
+ 543, 544, 837, 172, 838, 173, 839, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 840, 841, 552,
+ 177, 178, 553, 179, 842, 554, 555, 556, 843, 844,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 185, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 845,
+ 579, 580, 190, 581, 846, 191, 582, 192, 583, 584,
+ 585, 847, 586, 587, 848, 849, 588, 589, 590, 850,
+ 851, 591, 592, 193, 194, 593, 195, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 852, 603, 604,
+ 197, 605, 198, 606, 607, 608, 853, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 854, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 855, 635, 636, 207, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 856, 650, 651, 652, 653, 654,
+ 857, 656, 657, 214, 658, 659, 216, 660, 661, 217,
+ 662, 858, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 859, 677, 678,
+ 860, 679, 221, 680, 681, 682, 683, 684, 861, 685,
+ 222, 223, 862, 863, 687, 688, 224, 689, 225, 864,
+ 690, 691, 692, 693, 694, 695, 696, 697, 865, 866,
+ 698, 699, 700, 701, 702, 867, 868, 703, 704, 705,
+ 706, 707, 869, 232, 870, 708, 233, 709, 710, 711,
+ 712, 871, 872, 713, 873, 874, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 0, 80, 0, 0,
+ 81, 82, 83, 84, 85, 86, 87, 0, 88, 89,
+ 90, 91, 92, 93, 94, 95, 96, 97, 1057, 98,
+ 99, 100, 0, 0, 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, 125, 0, 0, 126,
+ 0, 0, 127, 128, 129, 130, 131, 132, 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, 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, -1700, 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, 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, -1700, 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, 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, -1700, 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, 785, 81, 82, 737, 84, 85, 86, 738,
+ 247, 739, 89, 0, -147, 92, 93, 94, 95, 96,
+ 97, 786, 98, 99, 740, 787, 0, 101, 102, 103,
+ 104, 788, 789, 106, 107, 108, 0, 109, 790, 791,
+ 741, 742, 0, 0, 0, 743, 744, 0, 0, 0,
+ 0, 745, 0, 0, 0, 0, 0, 0, 0, 0,
+ 746, 0, 747, 0, 748, 749, 35, 428, 0, 0,
+ 37, 0, 38, 39, 0, 1671, 1672, 1673, 40, 1674,
+ 0, 0, 0, 0, 0, 0, 0, 429, 430, 431,
+ 432, 433, 434, 435, 436, 2147, 437, 438, 439, 0,
+ 0, 0, 0, 1675, 0, 0, 440, 441, 0, 442,
+ 443, 444, 126, 445, 446, 447, 128, 1676, 130, 1677,
+ 1678, 0, 448, 449, 450, 451, 452, 453, 1679, 1680,
+ 454, 455, 1681, 1682, 456, 0, 457, 458, 459, 460,
+ 1683, 0, 1684, 0, 461, 462, 463, 464, 465, 142,
+ 466, 467, 752, 0, 468, 469, 470, 471, 472, 473,
+ 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688, 1689,
+ 1690, 1691, 477, 478, 479, 480, 754, 481, 1692, 1693,
+ 482, 1694, 483, 0, 484, 485, 486, 487, 488, 489,
+ 0, 490, 491, 492, 493, 2148, 0, 494, 495, 1499,
+ 497, 498, 0, 499, 500, 501, 0, 502, 503, 504,
+ 0, 505, 506, 507, 508, 1695, 509, 510, 511, 512,
+ 1696, 1697, 513, 0, 514, 515, 1698, 516, 0, 517,
+ 0, 518, 163, 0, 164, 519, 520, 521, 522, 0,
+ 523, 1699, 0, 1700, 524, 525, 0, 526, 527, 756,
+ 528, 529, 168, 530, 531, 532, 533, 0, 534, 535,
+ 536, 537, 538, 539, 540, 0, 541, 170, 171, 0,
+ 542, 543, 544, 1502, 1701, 0, 1702, 0, 545, 174,
+ 175, 546, 176, 547, 548, 549, 550, 551, 0, 0,
+ 552, 1703, 178, 553, 179, 0, 554, 555, 556, 1704,
+ 1705, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 757, 566, 567, 758, 568, 569, 570, 1706, 185, 1707,
+ 571, 572, 573, 574, 575, 576, 577, 187, 1708, 578,
+ 1709, 579, 580, 190, 581, 1710, 1711, 582, 1712, 583,
+ 584, 585, 0, 586, 587, 0, 0, 1713, 589, 590,
+ 0, 0, 591, 592, 193, 194, 593, 195, 1714, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 0, 603,
+ 604, 1715, 605, 198, 606, 607, 608, 0, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 1716, 619,
+ 620, 621, 622, 0, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 0, 635, 636, 207,
+ 637, 638, 639, 640, 641, 1717, 642, 643, 644, 645,
+ 646, 647, 648, 759, 649, 0, 650, 651, 652, 653,
+ 654, 1718, 656, 657, 214, 658, 659, 216, 660, 661,
+ 1719, 662, 0, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 1720, 676, 0, 677,
+ 678, 0, 679, 221, 680, 681, 682, 683, 684, 0,
+ 685, 1721, 1722, 0, 0, 687, 688, 1723, 689, 1724,
+ 1725, 690, 691, 692, 693, 694, 695, 696, 697, 0,
+ 1726, 698, 699, 700, 701, 702, 1727, 0, 703, 704,
+ 705, 706, 707, 760, 1728, 2149, 708, 233, 709, 710,
+ 711, 712, 0, 0, 713, 0, 0, 714, 715, 716,
+ 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240, 1733,
+ 1734, 1735, 1736, 245, 761, 720, 721, 1737, 0, 0,
+ 0, 0, 0, 0, 1738, 1739, 2150, 0, 0, 0,
+ 0, 0, 0, 1741, 2151, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 38, 39, 0, 1671, 1672,
+ 1673, 40, 1674, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 1675, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 1676, 130, 1677, 1678, 0, 448, 449, 450, 451, 452,
+ 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 1692, 1693, 482, 1694, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 1499, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 1695, 509,
+ 510, 511, 512, 1696, 1697, 513, 0, 514, 515, 1698,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 1700, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 1502, 1701, 0, 1702,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 1706, 185, 1707, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 1709, 579, 580, 190, 581, 1710, 1711,
+ 582, 1712, 583, 584, 585, 0, 586, 587, 0, 0,
+ 1713, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 1716, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 1717, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 212, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 1719, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 220, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 1721, 1722, 0, 0, 687, 688,
+ 1723, 689, 1724, 1725, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 1726, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 2493, 1728, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 234,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721,
+ 1737, 0, 246, 0, 0, 0, 0, 1738, 1739, 0,
+ 0, 0, 0, 0, 0, 0, 1741, 5734, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 428, 0, 0, 37, 0, 38, 39,
+ 0, 1671, 1672, 1673, 40, 1674, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 1675,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 128, 1676, 130, 1677, 1678, 0, 448, 449,
+ 450, 451, 452, 453, 1679, 1680, 454, 455, 1681, 1682,
+ 456, 0, 457, 458, 459, 460, 1683, 0, 1684, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477, 478,
+ 479, 480, 754, 481, 1692, 1693, 482, 1694, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 1499, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 1695, 509, 510, 511, 512, 1696, 1697, 513, 0,
+ 514, 515, 1698, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 1699, 0, 1700,
+ 524, 525, 0, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 171, 0, 542, 543, 544, 1502,
+ 1701, 0, 1702, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 1703, 178, 553,
+ 179, 0, 554, 555, 556, 1704, 1705, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 1706, 185, 1707, 571, 572, 573, 574,
+ 575, 576, 577, 187, 1708, 578, 1709, 579, 580, 190,
+ 581, 1710, 1711, 582, 1712, 583, 584, 585, 0, 586,
+ 587, 0, 0, 1713, 589, 590, 0, 0, 591, 592,
+ 193, 194, 593, 195, 1714, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 1715, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 1716, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 1717, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 1718, 656, 657,
+ 214, 658, 659, 216, 660, 661, 1719, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 1720, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 1721, 1722, 0,
+ 0, 687, 688, 1723, 689, 1724, 1725, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 1726, 698, 699, 700,
+ 701, 702, 1727, 0, 703, 704, 705, 706, 707, 760,
+ 1728, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 1729, 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736, 245,
+ 761, 720, 721, 1737, 0, 0, 0, 0, 0, 0,
+ 1738, 1739, 0, 0, 0, 0, 0, 0, 0, 1741,
+ 3326, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 38, 39, 0, 1671, 1672, 1673, 40, 1674, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 1675, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 1676, 130, 1677, 1678,
+ 0, 448, 449, 450, 451, 452, 453, 1679, 1680, 454,
+ 455, 1681, 1682, 456, 0, 457, 458, 459, 460, 1683,
+ 0, 1684, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 1685, 1686, 1687, 1688, 1689, 1690,
+ 1691, 477, 478, 479, 480, 754, 481, 1692, 1693, 482,
+ 1694, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 1499, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 1695, 509, 510, 511, 512, 1696,
+ 1697, 513, 0, 514, 515, 1698, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 1699, 0, 1700, 524, 525, 0, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 1502, 1701, 0, 1702, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 1703, 178, 553, 179, 0, 554, 555, 556, 1704, 1705,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 1706, 185, 1707, 571,
+ 572, 573, 574, 575, 576, 577, 187, 1708, 578, 1709,
+ 579, 580, 190, 581, 1710, 1711, 582, 1712, 583, 584,
+ 585, 0, 586, 587, 0, 0, 1713, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 1714, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 1715, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 1716, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 1717, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 1718, 656, 657, 214, 658, 659, 216, 660, 661, 1719,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 1720, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 1721, 1722, 0, 0, 687, 688, 1723, 689, 1724, 1725,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 1726,
+ 698, 699, 700, 701, 702, 1727, 0, 703, 704, 705,
+ 706, 707, 760, 1728, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 1729, 1730, 1731, 1732, 240, 1733, 1734,
+ 1735, 1736, 245, 761, 720, 721, 1737, 0, 0, 0,
+ 0, 0, 0, 1738, 1739, 0, 0, 0, 0, 0,
+ 0, 0, 1741, 4680, 785, 81, 82, 737, 84, 85,
+ 86, 738, 0, 739, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 786, 98, 99, 740, 787, 0, 101,
+ 102, 103, 104, 788, 789, 106, 107, 108, 0, 109,
+ 790, 791, 741, 742, 0, 0, 0, 743, 744, 0,
+ 0, 0, 0, 745, 0, 0, 0, 0, 0, 0,
+ 0, 0, 746, 0, 747, 0, 748, 749, 35, 428,
+ 0, 0, 37, 0, 38, 39, 0, 1671, 1672, 1673,
+ 40, 1674, 0, 0, 0, 0, 0, 0, 0, 429,
+ 430, 431, 432, 433, 434, 435, 436, 0, 437, 438,
+ 439, 0, 0, 0, 0, 1675, 0, 0, 440, 441,
+ 0, 442, 443, 444, 126, 445, 446, 447, 128, 1676,
+ 130, 1677, 1678, 0, 448, 449, 450, 451, 452, 453,
+ 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457, 458,
+ 459, 460, 1683, 0, 1684, 0, 461, 462, 463, 464,
+ 465, 142, 466, 467, 752, 0, 468, 469, 470, 471,
+ 472, 473, 0, 145, 474, 475, 0, 1685, 1686, 1687,
+ 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754, 481,
+ 1692, 1693, 482, 1694, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 1499, 497, 498, 0, 499, 500, 501, 0, 502,
+ 503, 504, 0, 505, 506, 507, 508, 1695, 509, 510,
+ 511, 512, 1696, 1697, 513, 0, 514, 515, 1698, 516,
+ 0, 517, 0, 518, 163, 0, 164, 519, 520, 521,
+ 522, 0, 523, 1699, 0, 1700, 524, 525, 0, 526,
+ 527, 756, 528, 529, 168, 530, 531, 532, 533, 0,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 170,
+ 171, 0, 542, 543, 544, 1502, 1701, 0, 1702, 0,
+ 545, 174, 175, 546, 176, 547, 548, 549, 550, 551,
+ 0, 0, 552, 1703, 178, 553, 179, 0, 554, 555,
+ 556, 1704, 1705, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 757, 566, 567, 758, 568, 569, 570, 1706,
+ 185, 1707, 571, 572, 573, 574, 575, 576, 577, 187,
+ 1708, 578, 1709, 579, 580, 190, 581, 1710, 1711, 582,
+ 1712, 583, 584, 585, 0, 586, 587, 0, 0, 1713,
+ 589, 590, 0, 0, 591, 592, 193, 194, 593, 195,
+ 1714, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 1715, 605, 198, 606, 607, 608, 0,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 1716, 619, 620, 621, 622, 0, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 207, 637, 638, 639, 640, 641, 1717, 642, 643,
+ 644, 645, 646, 647, 648, 759, 649, 0, 650, 651,
+ 652, 653, 654, 1718, 656, 657, 214, 658, 659, 216,
+ 660, 661, 1719, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 1720, 676,
+ 0, 677, 678, 0, 679, 221, 680, 681, 682, 683,
+ 684, 0, 685, 1721, 1722, 0, 0, 687, 688, 1723,
+ 689, 1724, 1725, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 1726, 698, 699, 700, 701, 702, 1727, 0,
+ 703, 704, 705, 706, 707, 760, 1728, 0, 708, 233,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732,
+ 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721, 1737,
+ 0, 0, 0, 0, 0, 0, 1738, 1739, 0, 0,
+ 0, 0, 0, 0, 0, 1741, 4753, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 0, 1492, 130, 1493, 1494, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 1495, 1496, 456,
+ 0, 457, 458, 459, 460, 0, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 1497, 1498, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 0, 509, 510, 511, 512, 0, 0, 513, 0, 514,
+ 515, 1500, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 0, 0, 0, 524,
+ 525, 0, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 2705, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 2706, 0, 542, 543, 544, 1502, 1503,
+ 0, 1504, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 0, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1505, 185, 1506, 571, 572, 573, 574, 575,
+ 576, 577, 0, 0, 578, 0, 579, 580, 190, 581,
+ 0, 0, 582, 1507, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 2708,
+ 194, 593, 195, 0, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 0, 605, 0, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1508, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 0, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 2709,
+ 658, 659, 216, 660, 661, 1510, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 0, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1511, 1512, 0, 0,
+ 687, 688, 0, 689, 0, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 0, 1513,
+ 2710, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 761,
+ 720, 721, 0, 0, 0, 0, 0, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 2818,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 0, 1492, 130, 1493, 1494, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 1495, 1496, 456,
+ 0, 457, 458, 459, 460, 0, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 1497, 1498, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 0, 509, 510, 511, 512, 0, 0, 513, 0, 514,
+ 515, 1500, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 0, 0, 0, 524,
+ 525, 0, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 2705, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 2706, 0, 542, 543, 544, 1502, 1503,
+ 0, 1504, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 0, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1505, 185, 1506, 571, 572, 573, 574, 575,
+ 576, 577, 0, 0, 578, 0, 579, 580, 190, 581,
+ 0, 0, 582, 1507, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 2708,
+ 194, 593, 195, 0, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 0, 605, 0, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1508, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 0, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 2709,
+ 658, 659, 216, 660, 661, 1510, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 0, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1511, 1512, 0, 0,
+ 687, 688, 0, 689, 0, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 0, 1513,
+ 2710, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 761,
+ 720, 721, 0, 0, 0, 0, 0, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 3943,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 38, 39, 0,
+ 1671, 1672, 1673, 40, 1674, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 1675, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 1676, 130, 1677, 1678, 0, 448, 449, 450,
+ 451, 452, 453, 1679, 1680, 454, 455, 1681, 1682, 456,
+ 0, 457, 458, 459, 460, 1683, 0, 1684, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479,
+ 480, 754, 481, 1692, 1693, 482, 1694, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 1695, 509, 510, 511, 512, 1696, 1697, 513, 0, 514,
+ 515, 1698, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 1699, 0, 1700, 524,
+ 525, 0, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 1502, 1701,
+ 0, 1702, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 1703, 178, 553, 179,
+ 0, 554, 555, 556, 1704, 1705, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1706, 185, 1707, 571, 572, 573, 574, 575,
+ 576, 577, 187, 1708, 578, 1709, 579, 580, 190, 581,
+ 1710, 1711, 582, 1712, 583, 584, 585, 0, 586, 587,
+ 0, 0, 1713, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 1714, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 1715, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1716, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 1717, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 212, 650, 651, 652, 653, 654, 1718, 656, 657, 214,
+ 658, 659, 216, 660, 661, 1719, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 1720, 676, 0, 677, 678, 220, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1721, 1722, 0, 0,
+ 687, 688, 1723, 689, 1724, 1725, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 1726, 698, 699, 700, 701,
+ 702, 1727, 0, 703, 704, 705, 706, 707, 2493, 1728,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 234, 714, 715, 716, 717, 718, 719, 235, 1729,
+ 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736, 245, 761,
+ 720, 721, 1737, 0, 246, 0, 0, 0, 0, 1738,
+ 1739, 0, 0, 0, 0, 0, 0, 0, 1741, 785,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 786, 98,
+ 99, 740, 787, 0, 101, 102, 103, 104, 788, 789,
+ 106, 107, 108, 0, 109, 790, 791, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 38,
+ 39, 0, 1671, 1672, 1673, 40, 1674, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 1675, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 1676, 130, 1677, 1678, 3332, 448,
+ 449, 450, 451, 452, 453, 1679, 1680, 454, 455, 1681,
+ 1682, 456, 0, 457, 458, 459, 460, 1683, 0, 1684,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477,
+ 478, 479, 480, 754, 481, 1692, 1693, 482, 1694, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 1499, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 1695, 509, 510, 511, 512, 1696, 1697, 513,
+ 0, 514, 515, 1698, 516, 0, 517, 0, 518, 163,
+ 3333, 164, 519, 520, 521, 522, 0, 523, 1699, 0,
+ 1700, 524, 525, 0, 526, 527, 756, 528, 529, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 1502, 1701, 0, 1702, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 3334, 552, 1703, 178,
+ 553, 179, 0, 554, 555, 556, 1704, 1705, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 1706, 185, 1707, 571, 572, 573,
+ 574, 575, 576, 577, 187, 1708, 578, 1709, 579, 580,
+ 190, 581, 1710, 1711, 582, 1712, 583, 584, 585, 0,
+ 586, 587, 0, 0, 1713, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 1714, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 1715, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 1716, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 1717, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 1718, 656,
+ 657, 214, 658, 659, 216, 660, 661, 1719, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 1720, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 1721, 1722,
+ 0, 3335, 687, 688, 1723, 689, 1724, 1725, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 1726, 698, 699,
+ 700, 701, 702, 1727, 0, 703, 704, 705, 706, 707,
+ 760, 1728, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 1729, 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736,
+ 245, 761, 720, 721, 1737, 0, 0, 0, 0, 0,
+ 0, 1738, 1739, 0, 0, 0, 0, 0, 0, 0,
+ 1741, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 38, 39, 0, 1671, 1672, 1673, 40, 1674, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 1675, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 1676, 130, 1677, 1678,
+ 0, 448, 449, 450, 451, 452, 453, 1679, 1680, 454,
+ 455, 1681, 1682, 456, 0, 457, 458, 459, 460, 1683,
+ 0, 1684, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 1685, 1686, 1687, 1688, 1689, 1690,
+ 1691, 477, 478, 479, 480, 754, 481, 1692, 1693, 482,
+ 1694, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 1499, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 1695, 509, 510, 511, 512, 1696,
+ 1697, 513, 0, 514, 515, 1698, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 1699, 0, 1700, 524, 525, 0, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 1502, 1701, 0, 1702, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 1703, 178, 553, 179, 0, 554, 555, 556, 1704, 1705,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 1706, 185, 1707, 571,
+ 572, 573, 574, 575, 576, 577, 187, 1708, 578, 1709,
+ 579, 580, 190, 581, 1710, 1711, 582, 1712, 583, 584,
+ 585, 0, 586, 587, 0, 0, 1713, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 1714, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 1715, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 1716, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 1717, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 1718, 656, 657, 214, 658, 659, 216, 660, 661, 1719,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 1720, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 1721, 1722, 0, 0, 687, 688, 1723, 689, 1724, 1725,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 1726,
+ 698, 699, 700, 701, 702, 1727, 0, 703, 704, 705,
+ 706, 707, 760, 1728, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 1729, 1730, 1731, 1732, 240, 1733, 1734,
+ 1735, 1736, 245, 761, 720, 721, 1737, 0, 0, 0,
+ 0, 0, 0, 1738, 1739, 0, 0, 0, 0, 0,
+ 2454, 3286, 1741, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 38, 39, 0, 1671, 1672, 1673, 40,
+ 1674, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 1675, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 1676, 130,
+ 1677, 1678, 0, 448, 449, 450, 451, 452, 453, 1679,
+ 1680, 454, 455, 1681, 1682, 456, 0, 457, 458, 459,
+ 460, 1683, 0, 1684, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 477, 478, 479, 480, 754, 481, 1692,
+ 1693, 482, 1694, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 1695, 509, 510, 511,
+ 512, 1696, 1697, 513, 0, 514, 515, 1698, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 1699, 0, 1700, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 1502, 1701, 0, 1702, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 1703, 178, 553, 179, 0, 554, 555, 556,
+ 1704, 1705, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1706, 185,
+ 1707, 571, 572, 573, 574, 575, 576, 577, 187, 1708,
+ 578, 1709, 579, 580, 190, 581, 1710, 1711, 582, 1712,
+ 583, 584, 585, 0, 586, 587, 0, 0, 1713, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 1714,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 1715, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1716,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 1717, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 1718, 656, 657, 214, 658, 659, 216, 660,
+ 661, 1719, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 1720, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1721, 1722, 0, 0, 687, 688, 1723, 689,
+ 1724, 1725, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 1726, 698, 699, 700, 701, 702, 1727, 0, 703,
+ 704, 705, 706, 707, 760, 1728, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240,
+ 1733, 1734, 1735, 1736, 245, 761, 720, 721, 1737, 0,
+ 0, 0, 0, 0, 0, 1738, 1739, 1740, 0, 0,
+ 0, 0, 0, 0, 1741, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 38, 39, 0, 1671, 1672,
+ 1673, 40, 1674, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 2624, 437,
+ 438, 439, 0, 0, 0, 0, 1675, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 1676, 130, 1677, 1678, 0, 448, 449, 450, 451, 452,
+ 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 1692, 1693, 482, 1694, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 1499, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 1695, 509,
+ 510, 511, 512, 1696, 1697, 513, 0, 514, 515, 1698,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 1700, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 1502, 1701, 0, 1702,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 1706, 185, 1707, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 1709, 579, 580, 190, 581, 1710, 1711,
+ 582, 1712, 583, 584, 585, 0, 586, 587, 0, 0,
+ 1713, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 1716, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 1717, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 1719, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 1721, 1722, 0, 0, 687, 688,
+ 1723, 689, 1724, 1725, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 1726, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 760, 1728, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721,
+ 1737, 0, 0, 0, 0, 0, 0, 1738, 1739, 0,
+ 0, 0, 0, 0, 0, 0, 1741, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 38, 39, 0,
+ 1671, 1672, 1673, 40, 1674, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 1675, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 1676, 130, 1677, 1678, 0, 448, 449, 450,
+ 451, 452, 453, 1679, 1680, 454, 455, 1681, 1682, 456,
+ 0, 457, 458, 459, 460, 1683, 0, 1684, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479,
+ 480, 754, 481, 1692, 1693, 482, 1694, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 1695, 509, 510, 511, 512, 1696, 1697, 513, 0, 514,
+ 515, 1698, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 1699, 0, 1700, 524,
+ 525, 0, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 1502, 1701,
+ 0, 1702, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 1703, 178, 553, 179,
+ 0, 554, 555, 556, 1704, 1705, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1706, 185, 1707, 571, 572, 573, 574, 575,
+ 576, 577, 187, 1708, 578, 1709, 579, 580, 190, 581,
+ 1710, 1711, 582, 1712, 583, 584, 585, 0, 586, 587,
+ 0, 0, 1713, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 1714, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 1715, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1716, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 1717, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 1718, 656, 657, 214,
+ 658, 659, 216, 660, 661, 1719, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 1720, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1721, 1722, 0, 0,
+ 687, 688, 1723, 689, 1724, 1725, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 1726, 698, 699, 700, 701,
+ 702, 1727, 0, 703, 704, 705, 706, 707, 760, 1728,
+ 3822, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 1729,
+ 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736, 245, 761,
+ 720, 721, 1737, 0, 0, 0, 0, 0, 0, 1738,
+ 1739, 0, 0, 0, 0, 0, 0, 0, 1741, 785,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 786, 98,
+ 99, 740, 787, 0, 101, 102, 103, 104, 788, 789,
+ 106, 107, 108, 0, 109, 790, 791, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 38,
+ 39, 0, 1671, 1672, 1673, 40, 1674, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 1675, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 1676, 130, 1677, 1678, 0, 448,
+ 449, 450, 451, 452, 453, 1679, 1680, 454, 455, 1681,
+ 1682, 456, 0, 457, 458, 459, 460, 1683, 0, 1684,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477,
+ 478, 479, 480, 754, 481, 1692, 1693, 482, 1694, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 1499, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 1695, 509, 510, 511, 512, 1696, 1697, 513,
+ 0, 514, 515, 1698, 516, 0, 517, 0, 518, 163,
+ 3333, 164, 519, 520, 521, 522, 0, 523, 1699, 0,
+ 1700, 524, 525, 0, 526, 527, 756, 528, 529, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 1502, 1701, 0, 1702, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 1703, 178,
+ 553, 179, 0, 554, 555, 556, 1704, 1705, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 1706, 185, 1707, 571, 572, 573,
+ 574, 575, 576, 577, 187, 1708, 578, 1709, 579, 580,
+ 190, 581, 1710, 1711, 582, 1712, 583, 584, 585, 0,
+ 586, 587, 0, 0, 1713, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 1714, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 1715, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 1716, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 1717, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 1718, 656,
+ 657, 214, 658, 659, 216, 660, 661, 1719, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 1720, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 1721, 1722,
+ 0, 0, 687, 688, 1723, 689, 1724, 1725, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 1726, 698, 699,
+ 700, 701, 702, 1727, 0, 703, 704, 705, 706, 707,
+ 760, 1728, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 1729, 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736,
+ 245, 761, 720, 721, 1737, 0, 0, 0, 0, 0,
+ 0, 1738, 1739, 0, 0, 0, 0, 0, 0, 0,
+ 1741, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 38, 39, 0, 1671, 1672, 1673, 40, 1674, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 1675, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 1676, 130, 1677, 1678,
+ 0, 448, 449, 450, 451, 452, 453, 1679, 1680, 454,
+ 455, 1681, 1682, 456, 0, 457, 458, 459, 460, 1683,
+ 0, 1684, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 4810, 1685, 1686, 1687, 1688, 1689, 1690,
+ 1691, 477, 478, 479, 480, 754, 481, 1692, 1693, 482,
+ 1694, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 1499, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 1695, 509, 510, 511, 512, 1696,
+ 1697, 513, 0, 514, 515, 1698, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 1699, 0, 1700, 524, 525, 0, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 1502, 1701, 0, 1702, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 1703, 178, 553, 179, 0, 554, 555, 556, 1704, 1705,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 1706, 185, 1707, 571,
+ 572, 573, 574, 575, 576, 577, 187, 1708, 578, 1709,
+ 579, 580, 190, 581, 1710, 1711, 582, 1712, 583, 584,
+ 585, 0, 586, 587, 0, 0, 1713, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 1714, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 1715, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 1716, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 1717, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 1718, 656, 657, 214, 658, 659, 216, 660, 661, 1719,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 1720, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 1721, 1722, 0, 0, 687, 688, 1723, 689, 1724, 1725,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 1726,
+ 698, 699, 700, 701, 702, 1727, 0, 703, 704, 705,
+ 706, 707, 760, 1728, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 1729, 1730, 1731, 1732, 240, 1733, 1734,
+ 1735, 1736, 245, 761, 720, 721, 1737, 0, 0, 0,
+ 0, 0, 0, 1738, 1739, 0, 0, 0, 0, 0,
+ 0, 0, 1741, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 38, 39, 0, 1671, 1672, 1673, 40,
+ 1674, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 1675, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 5997, 1676, 130,
+ 1677, 1678, 0, 448, 449, 450, 451, 452, 453, 1679,
+ 1680, 454, 455, 1681, 1682, 456, 0, 457, 458, 459,
+ 460, 1683, 0, 1684, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 5998, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 477, 478, 479, 480, 754, 481, 1692,
+ 1693, 482, 1694, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 1695, 509, 510, 511,
+ 512, 1696, 1697, 513, 0, 514, 515, 1698, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 1699, 0, 1700, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 1502, 1701, 0, 1702, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 1703, 178, 553, 179, 0, 554, 555, 556,
+ 1704, 1705, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1706, 185,
+ 1707, 571, 572, 573, 574, 575, 576, 577, 187, 1708,
+ 578, 1709, 579, 580, 190, 581, 1710, 1711, 582, 1712,
+ 583, 584, 585, 0, 586, 587, 0, 0, 1713, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 1714,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 1715, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1716,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 1717, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 1718, 656, 657, 214, 658, 659, 216, 660,
+ 661, 1719, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 1720, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1721, 1722, 0, 0, 687, 688, 1723, 689,
+ 1724, 1725, 690, 691, 692, 693, 694, 5999, 696, 697,
+ 0, 1726, 698, 699, 700, 701, 702, 1727, 0, 703,
+ 704, 705, 706, 707, 760, 1728, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240,
+ 1733, 1734, 1735, 1736, 245, 761, 720, 721, 1737, 0,
+ 0, 0, 0, 0, 0, 1738, 1739, 0, 0, 0,
+ 0, 0, 0, 0, 1741, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 38, 39, 0, 1671, 1672,
+ 1673, 40, 1674, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 1675, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 1676, 130, 1677, 1678, 0, 448, 449, 450, 451, 452,
+ 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 5998, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 1692, 1693, 482, 1694, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 1499, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 1695, 509,
+ 510, 511, 512, 1696, 1697, 513, 0, 514, 515, 1698,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 1700, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 1502, 1701, 0, 1702,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 1706, 185, 1707, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 1709, 579, 580, 190, 581, 1710, 1711,
+ 582, 1712, 583, 584, 585, 0, 586, 587, 0, 0,
+ 1713, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 1716, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 1717, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 1719, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 1721, 1722, 0, 0, 687, 688,
+ 1723, 689, 1724, 1725, 690, 691, 692, 693, 694, 5999,
+ 696, 697, 0, 1726, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 760, 1728, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721,
+ 1737, 0, 0, 0, 0, 0, 0, 1738, 1739, 0,
+ 0, 0, 0, 0, 0, 0, 1741, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 38, 39, 0,
+ 1671, 1672, 1673, 40, 1674, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 1675, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 1676, 130, 1677, 1678, 0, 448, 449, 450,
+ 451, 452, 453, 1679, 1680, 454, 455, 1681, 1682, 456,
+ 0, 457, 458, 459, 460, 1683, 0, 1684, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479,
+ 480, 754, 481, 1692, 1693, 482, 1694, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 1695, 509, 510, 511, 512, 1696, 1697, 513, 0, 514,
+ 515, 1698, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 1699, 0, 1700, 524,
+ 525, 0, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 1502, 1701,
+ 0, 1702, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 1703, 178, 553, 179,
+ 0, 554, 555, 556, 1704, 1705, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1706, 185, 1707, 571, 572, 573, 574, 575,
+ 576, 577, 187, 1708, 578, 1709, 579, 580, 190, 581,
+ 1710, 1711, 582, 1712, 583, 584, 585, 0, 586, 587,
+ 0, 0, 1713, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 1714, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 1715, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1716, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 1717, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 1718, 656, 657, 214,
+ 658, 659, 216, 660, 661, 1719, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 1720, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1721, 1722, 0, 0,
+ 687, 688, 1723, 689, 1724, 1725, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 1726, 698, 699, 700, 701,
+ 702, 1727, 0, 703, 704, 705, 706, 707, 760, 1728,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 1729,
+ 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736, 245, 761,
+ 720, 721, 1737, 0, 0, 0, 0, 0, 0, 1738,
+ 1739, 0, 0, 0, 0, 0, 0, 0, 1741, 785,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 786, 98,
+ 99, 740, 787, 0, 101, 102, 103, 104, 788, 789,
+ 106, 107, 108, 0, 109, 790, 791, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 38,
+ 39, 0, 1671, 1672, 1673, 40, 1674, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 1675, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 1676, 130, 1677, 1678, 0, 448,
+ 449, 450, 451, 452, 453, 1679, 1680, 454, 455, 1681,
+ 1682, 456, 0, 457, 458, 459, 460, 1683, 0, 1684,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477,
+ 478, 479, 480, 754, 481, 1692, 1693, 482, 1694, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 1499, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 1695, 509, 510, 511, 512, 1696, 1697, 513,
+ 0, 514, 515, 1698, 516, 0, 517, 0, 518, 163,
+ 0, 164, 519, 520, 521, 522, 0, 523, 1699, 0,
+ 1700, 524, 525, 0, 526, 527, 756, 528, 529, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 1502, 1701, 0, 1702, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 1703, 178,
+ 553, 179, 0, 554, 555, 556, 1704, 1705, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 1706, 185, 1707, 571, 572, 573,
+ 574, 575, 576, 577, 187, 1708, 578, 1709, 579, 580,
+ 190, 581, 1710, 1711, 582, 1712, 583, 584, 585, 0,
+ 586, 587, 0, 0, 1713, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 1714, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 1715, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 1716, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 1717, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 1718, 656,
+ 657, 214, 658, 659, 216, 660, 661, 1719, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 1720, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 1721, 1722,
+ 0, 0, 687, 688, 1723, 689, 1724, 1725, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 1726, 698, 699,
+ 700, 701, 702, 1727, 0, 703, 704, 705, 706, 707,
+ 760, 1728, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 1729, 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736,
+ 245, 761, 720, 721, 1737, 0, 0, 0, 0, 0,
+ 0, 2627, 2628, 0, 0, 0, 0, 0, 0, 0,
+ 1741, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 38, 39, 0, 1671, 1672, 1673, 40, 1674, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 1675, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 1676, 130, 1677, 1678,
+ 0, 448, 449, 450, 451, 452, 453, 1679, 1680, 454,
+ 455, 1681, 1682, 456, 0, 457, 458, 459, 460, 1683,
+ 0, 1684, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 1685, 1686, 1687, 1688, 1689, 1690,
+ 1691, 477, 478, 479, 480, 754, 481, 1692, 1693, 482,
+ 1694, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 1499, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 1695, 509, 510, 511, 512, 1696,
+ 1697, 513, 0, 514, 515, 1698, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 1699, 0, 1700, 524, 525, 0, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 1502, 1701, 0, 1702, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 1703, 178, 553, 179, 0, 554, 555, 556, 1704, 1705,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 1706, 185, 1707, 571,
+ 572, 573, 574, 575, 576, 577, 187, 1708, 578, 1709,
+ 579, 580, 190, 581, 1710, 1711, 582, 1712, 583, 584,
+ 585, 0, 586, 587, 0, 0, 1713, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 1714, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 1715, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 1716, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 1717, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 1718, 656, 657, 214, 658, 659, 216, 660, 661, 1719,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 1720, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 1721, 1722, 0, 0, 687, 688, 1723, 689, 1724, 1725,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 1726,
+ 698, 699, 700, 701, 702, 1727, 0, 703, 704, 705,
+ 706, 707, 760, 1728, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 5176, 1729, 1730, 1731, 1732, 240, 1733, 1734,
+ 1735, 1736, 245, 761, 720, 721, 1737, 0, 0, 0,
+ 0, 0, 0, 1738, 1739, 0, 0, 0, 0, 0,
+ 0, 0, 1741, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 38, 39, 0, 1671, 1672, 1673, 40,
+ 1674, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 1675, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 1676, 130,
+ 1677, 1678, 0, 448, 449, 450, 451, 452, 453, 1679,
+ 1680, 454, 455, 1681, 1682, 456, 0, 457, 458, 459,
+ 460, 1683, 0, 1684, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 477, 478, 479, 480, 754, 481, 1692,
+ 1693, 482, 1694, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 1695, 509, 510, 511,
+ 512, 1696, 1697, 513, 0, 514, 515, 1698, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 1699, 0, 1700, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 1502, 1701, 0, 1702, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 1703, 178, 553, 179, 0, 554, 555, 556,
+ 1704, 1705, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1706, 185,
+ 1707, 571, 572, 573, 574, 575, 576, 5188, 187, 1708,
+ 578, 1709, 579, 580, 190, 581, 1710, 1711, 582, 1712,
+ 583, 584, 585, 0, 586, 587, 0, 0, 1713, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 1714,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 1715, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1716,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 1717, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 1718, 656, 657, 214, 658, 659, 216, 660,
+ 661, 1719, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 1720, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1721, 1722, 0, 0, 687, 688, 1723, 689,
+ 1724, 1725, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 1726, 698, 699, 700, 701, 702, 1727, 0, 703,
+ 704, 705, 706, 707, 760, 1728, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240,
+ 1733, 1734, 1735, 1736, 245, 761, 720, 721, 1737, 0,
+ 0, 0, 0, 0, 0, 1738, 1739, 0, 0, 0,
+ 0, 0, 0, 0, 1741, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 38, 39, 0, 1671, 1672,
+ 1673, 40, 1674, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 1675, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 1676, 130, 1677, 1678, 0, 448, 449, 450, 451, 452,
+ 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 5512, 0, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 1692, 1693, 482, 1694, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 1499, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 1695, 509,
+ 510, 511, 512, 1696, 1697, 513, 0, 514, 515, 1698,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 5513, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 1502, 1701, 0, 1702,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 1706, 185, 1707, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 1709, 579, 580, 190, 581, 1710, 1711,
+ 582, 1712, 583, 584, 585, 0, 586, 587, 0, 0,
+ 1713, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 1716, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 5514, 640, 641, 1717, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 1719, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 1721, 1722, 0, 0, 687, 688,
+ 1723, 689, 1724, 1725, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 1726, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 760, 1728, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721,
+ 1737, 0, 0, 0, 0, 0, 0, 1738, 1739, 0,
+ 0, 0, 0, 0, 0, 0, 5515, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 38, 39, 0,
+ 1671, 1672, 1673, 40, 1674, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 1675, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, -3077, 1676, 130, 1677, 1678, 0, 448, 449, 450,
+ 451, 452, 453, 1679, 1680, 454, 455, 1681, 1682, 456,
+ 0, 457, 458, 459, 460, 1683, 0, 1684, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 5998,
+ 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479,
+ 480, 754, 481, 1692, 1693, 482, 1694, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 1695, 509, 510, 511, 512, 1696, 1697, 513, 0, 514,
+ 515, 1698, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 1699, 0, 1700, 524,
+ 525, 0, 526, 527, 756, 528, 529, -3077, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 1502, 1701,
+ 0, 1702, 0, 545, 0, 0, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 1703, 178, 553, -3077,
+ 0, 554, 555, 556, 1704, 1705, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1706, 185, 1707, 571, 572, 573, 574, 575,
+ 576, 577, 187, 1708, 578, 1709, 579, 580, 0, 581,
+ 1710, 1711, 582, 1712, 583, 584, 585, 0, 586, 587,
+ 0, 0, 1713, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 1714, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 1715, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1716, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 1717, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 1718, 656, 657, 214,
+ 658, 659, -3077, 660, 661, 1719, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 1720, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1721, 1722, 0, 0,
+ 687, 688, 1723, 689, 1724, 1725, 690, 691, 692, 693,
+ 694, 5999, 696, 697, 0, 1726, 698, 699, 700, 701,
+ 702, 1727, 0, 703, 704, 705, 706, 707, 760, 1728,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 1729,
+ 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736, 245, 761,
+ 720, 721, -3077, 0, 0, 0, 0, 0, 0, 1738,
+ 1739, 0, 0, 0, 0, 0, 0, 0, 1741, 785,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 786, 98,
+ 99, 740, 787, 0, 101, 102, 103, 104, 788, 789,
+ 106, 107, 108, 0, 109, 790, 791, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 38,
+ 39, 0, 1671, 1672, 1673, 40, 1674, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 1675, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 1676, 130, 1677, 1678, 0, 448,
+ 449, 450, 451, 452, 453, 1679, 1680, 454, 455, 1681,
+ 1682, 456, 0, 457, 458, 459, 460, 1683, 0, 1684,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477,
+ 478, 479, 480, 754, 481, 1692, 1693, 482, 5716, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 1499, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 1695, 509, 510, 511, 512, 1696, 1697, 513,
+ 0, 514, 515, 1698, 516, 0, 517, 0, 518, 163,
+ 0, 164, 519, 520, 521, 522, 0, 523, 1699, 0,
+ 1700, 524, 525, 0, 526, 527, 756, 528, 529, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 1502, 1701, 0, 1702, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 1703, 178,
+ 553, 179, 0, 554, 555, 556, 1704, 1705, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 1706, 185, 1707, 571, 572, 573,
+ 574, 575, 576, 577, 187, 1708, 578, 0, 579, 580,
+ 190, 581, 1710, 1711, 582, 1712, 583, 584, 585, 0,
+ 586, 587, 0, 0, 1713, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 1714, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 1715, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 1716, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 3318, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 1718, 656,
+ 657, 214, 658, 659, 216, 660, 661, 1719, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 1720, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 1721, 1722,
+ 0, 0, 687, 688, 1723, 689, 1724, 1725, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 1727, 0, 703, 704, 705, 706, 707,
+ 760, 1728, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 1729, 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736,
+ 245, 761, 720, 721, 0, 0, 0, 0, 0, 0,
+ 0, 3319, 3320, 0, 0, 0, 0, 0, 0, 0,
+ 3321, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 38, 39, 0, 1671, 1672, 1673, 40, 1674, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 1675, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 1676, 130, 1677, 1678,
+ 0, 448, 449, 450, 451, 452, 453, 1679, 1680, 454,
+ 455, 1681, 1682, 456, 0, 457, 458, 459, 460, 1683,
+ 0, 1684, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 1685, 1686, 1687, 1688, 1689, 1690,
+ 1691, 477, 478, 479, 480, 754, 481, 1692, 1693, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 1499, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 1695, 509, 510, 511, 512, 1696,
+ 1697, 513, 0, 514, 515, 1698, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 1699, 0, 1700, 524, 525, 0, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 1502, 1701, 0, 1702, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 1703, 178, 553, 179, 0, 554, 555, 556, 1704, 1705,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 1706, 185, 1707, 571,
+ 572, 573, 574, 575, 576, 577, 187, 1708, 578, 0,
+ 579, 580, 190, 581, 1710, 1711, 582, 1712, 583, 584,
+ 585, 0, 586, 587, 0, 0, 1713, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 1714, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 1715, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 1716, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 3318, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 1718, 656, 657, 214, 658, 659, 216, 660, 661, 1719,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 1720, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 1721, 1722, 0, 0, 687, 688, 1723, 689, 1724, 1725,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 1727, 0, 703, 704, 705,
+ 706, 707, 760, 1728, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 1729, 1730, 1731, 1732, 240, 1733, 1734,
+ 1735, 1736, 245, 761, 720, 721, 0, 0, 0, 0,
+ 0, 0, 0, 3319, 3320, 0, 0, 0, 0, 0,
+ 0, 0, 3321, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 38, 39, 0, 1671, 1672, 0, 40,
+ 1674, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 1675, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 1676, 130,
+ 1677, 1678, 0, 448, 449, 450, 451, 452, 453, 1679,
+ 1680, 454, 455, 1681, 1682, 456, 0, 457, 458, 459,
+ 460, 1683, 0, 1684, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 477, 478, 479, 480, 754, 481, 1692,
+ 1693, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 1695, 509, 510, 511,
+ 512, 1696, 1697, 513, 0, 514, 515, 1698, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 1699, 0, 1700, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 1502, 1701, 0, 1702, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 1703, 178, 553, 179, 0, 554, 555, 556,
+ 1704, 1705, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1706, 185,
+ 1707, 571, 572, 573, 574, 575, 576, 577, 187, 1708,
+ 578, 0, 579, 580, 190, 581, 1710, 1711, 582, 1712,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 1714,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 1715, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1716,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 3457, 3458, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 1718, 656, 657, 214, 658, 659, 216, 660,
+ 661, 1719, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 1720, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1721, 1722, 0, 0, 687, 688, 1723, 689,
+ 1724, 1725, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 1727, 0, 703,
+ 704, 705, 706, 707, 760, 1728, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240,
+ 1733, 1734, 1735, 1736, 245, 761, 720, 721, 0, 0,
+ 0, 0, 0, 0, 0, 3459, 3460, 0, 0, 0,
+ 0, 0, 0, 0, 3321, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 38, 39, 0, 1671, 1672,
+ 1673, 40, 1674, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 1675, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 1676, 130, 1677, 1678, 0, 448, 449, 450, 451, 452,
+ 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 1692, 1693, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 1499, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 1695, 509,
+ 510, 511, 512, 1696, 1697, 513, 0, 514, 515, 1698,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 1700, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 1502, 1701, 0, 1702,
+ 0, 545, 0, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 1706, 185, 1707, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 0, 579, 580, 190, 581, 1710, 1711,
+ 582, 1712, 583, 584, 585, 0, 586, 587, 0, 0,
+ 1713, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 1716, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 3318, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 1719, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 1721, 1722, 0, 0, 687, 688,
+ 1723, 689, 1724, 1725, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 760, 1728, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721,
+ 0, 0, 0, 0, 0, 0, 0, 3319, 3320, 0,
+ 0, 0, 0, 0, 0, 0, 3321, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 38, 39, 0,
+ 1671, 1672, 0, 40, 1674, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 1675, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 1676, 130, 1677, 1678, 0, 448, 449, 450,
+ 451, 452, 453, 1679, 1680, 454, 455, 1681, 1682, 456,
+ 0, 457, 458, 459, 460, 1683, 0, 1684, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 1685, 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479,
+ 480, 754, 481, 1692, 1693, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 1499, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 1695, 509, 510, 511, 512, 1696, 1697, 513, 0, 514,
+ 515, 1698, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 1699, 0, 1700, 524,
+ 525, 0, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 1502, 1701,
+ 0, 1702, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 1703, 178, 553, 179,
+ 0, 554, 555, 556, 1704, 1705, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 1706, 185, 1707, 571, 572, 573, 574, 575,
+ 576, 577, 187, 1708, 578, 0, 579, 580, 190, 581,
+ 1710, 1711, 582, 1712, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 1714, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 1715, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 1716, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 3318, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 1718, 656, 657, 214,
+ 658, 659, 216, 660, 661, 1719, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 1720, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 1721, 1722, 0, 0,
+ 687, 688, 1723, 689, 1724, 1725, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 1727, 0, 703, 704, 705, 706, 707, 760, 1728,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 1729,
+ 1730, 1731, 1732, 240, 1733, 1734, 1735, 1736, 245, 761,
+ 720, 721, 0, 0, 0, 0, 785, 81, 82, 737,
+ 84, 85, 86, 738, 0, 739, 89, 0, 3321, 92,
+ 93, 94, 95, 96, 97, 786, 98, 99, 740, 787,
+ 0, 101, 102, 103, 104, 788, 789, 106, 107, 108,
+ 0, 109, 790, 791, 741, 742, 0, 0, 0, 743,
+ 744, 0, 0, 0, 0, 745, 0, 0, 0, 0,
+ 0, 0, 0, 0, 746, 0, 747, 0, 748, 749,
+ 35, 428, 0, 0, 37, 0, 38, 39, 0, 1671,
+ 1672, 0, 40, 1674, 0, 0, 0, 0, 0, 0,
+ 0, 429, 430, 431, 432, 433, 434, 435, 436, 0,
+ 437, 438, 439, 0, 0, 0, 0, 1675, 0, 0,
+ 440, 441, 0, 442, 443, 444, 126, 445, 446, 447,
+ 128, 1676, 130, 1677, 1678, 0, 4713, 449, 450, 451,
+ 452, 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0,
+ 457, 458, 459, 460, 1683, 0, 1684, 0, 461, 462,
+ 463, 464, 465, 142, 466, 467, 752, 0, 468, 469,
+ 470, 471, 472, 473, 0, 145, 474, 475, 0, 1685,
+ 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480,
+ 754, 481, 1692, 1693, 482, 0, 483, 0, 484, 485,
+ 486, 487, 488, 489, 0, 490, 491, 492, 493, 0,
+ 0, 494, 495, 1499, 497, 498, 0, 499, 500, 501,
+ 0, 502, 503, 504, 0, 505, 506, 507, 508, 1695,
+ 509, 510, 511, 512, 1696, 1697, 513, 0, 514, 515,
+ 1698, 516, 0, 517, 0, 518, 163, 0, 164, 519,
+ 520, 521, 522, 0, 523, 1699, 0, 1700, 524, 525,
+ 0, 526, 527, 756, 528, 529, 168, 530, 531, 532,
+ 533, 0, 534, 535, 536, 537, 538, 539, 540, 0,
+ 541, 170, 171, 0, 542, 543, 544, 1502, 1701, 0,
+ 1702, 0, 545, 174, 175, 546, 176, 547, 548, 549,
+ 550, 551, 0, 0, 552, 1703, 178, 553, 179, 0,
+ 554, 555, 556, 1704, 1705, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 757, 566, 567, 758, 568, 569,
+ 570, 1706, 185, 1707, 571, 572, 573, 574, 575, 576,
+ 577, 187, 1708, 578, 0, 579, 580, 190, 581, 1710,
+ 1711, 582, 1712, 583, 584, 585, 0, 586, 587, 0,
+ 0, 588, 589, 590, 0, 0, 591, 592, 193, 194,
+ 593, 195, 1714, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 0, 603, 604, 1715, 605, 198, 606, 607,
+ 608, 0, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 1716, 619, 620, 621, 622, 0, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 0, 635, 636, 207, 637, 638, 639, 640, 641, 3318,
+ 642, 643, 644, 645, 646, 647, 648, 759, 649, 0,
+ 650, 651, 652, 653, 654, 1718, 656, 657, 214, 658,
+ 659, 216, 660, 661, 1719, 662, 0, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 1720, 676, 0, 677, 678, 0, 679, 221, 680, 681,
+ 682, 683, 684, 0, 685, 1721, 1722, 0, 0, 687,
+ 688, 1723, 689, 1724, 1725, 690, 691, 692, 693, 694,
+ 695, 696, 697, 0, 0, 698, 699, 700, 701, 702,
+ 1727, 0, 703, 704, 705, 706, 707, 760, 1728, 0,
+ 708, 233, 709, 710, 711, 712, 0, 0, 713, 0,
+ 0, 714, 715, 716, 717, 718, 719, 235, 1729, 1730,
+ 1731, 1732, 240, 1733, 1734, 1735, 1736, 245, 761, 720,
+ 721, 0, 0, 0, 0, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 3321, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 38, 39, 0, 1671, 1672,
+ 0, 40, 1674, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 1675, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 1676, 130, 1677, 1678, 0, 448, 449, 450, 451, 452,
+ 453, 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 1692, 1693, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 1499, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 1695, 509,
+ 510, 511, 512, 1696, 1697, 513, 0, 514, 515, 1698,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 1700, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 1502, 1701, 0, 1702,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 1706, 185, 1707, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 0, 579, 580, 190, 581, 1710, 1711,
+ 582, 1712, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 1716, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 3318, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 1719, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 1721, 1722, 0, 0, 687, 688,
+ 1723, 689, 1724, 1725, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 760, 1728, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 5219, 1733, 1734, 1735, 1736, 245, 761, 720, 721,
+ 0, 0, 0, 0, 785, 81, 82, 737, 84, 85,
+ 86, 738, 0, 739, 89, 0, 3321, 92, 93, 94,
+ 95, 96, 97, 786, 98, 99, 740, 787, 0, 101,
+ 102, 103, 104, 788, 789, 106, 107, 108, 0, 109,
+ 790, 791, 741, 742, 0, 0, 0, 743, 744, 0,
+ 0, 0, 0, 745, 0, 0, 0, 0, 0, 0,
+ 0, 0, 746, 0, 747, 0, 748, 749, 35, 428,
+ 0, 0, 37, 0, 38, 39, 0, 1671, 1672, 1673,
+ 40, 1674, 0, 0, 0, 0, 0, 0, 0, 429,
+ 430, 431, 432, 433, 434, 435, 436, 0, 437, 438,
+ 439, 0, 0, 0, 0, 1675, 0, 0, 440, 441,
+ 0, 442, 443, 444, 126, 445, 446, 447, 0, 1676,
+ 130, 1677, 1678, 0, 448, 449, 450, 451, 452, 453,
+ 1679, 1680, 454, 455, 1681, 1682, 456, 0, 457, 458,
+ 459, 460, 1683, 0, 1684, 0, 461, 462, 463, 464,
+ 465, 142, 466, 467, 752, 0, 468, 469, 470, 471,
+ 472, 473, 0, 145, 474, 475, 0, 1685, 1686, 1687,
+ 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754, 481,
+ 1692, 1693, 482, 1694, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 1499, 497, 498, 0, 499, 500, 501, 0, 502,
+ 0, 504, 0, 505, 506, 507, 508, 1695, 509, 510,
+ 511, 512, 1696, 1697, 513, 0, 514, 515, 1698, 516,
+ 0, 517, 0, 518, 163, 0, 164, 519, 520, 521,
+ 522, 0, 523, 1699, 0, 1700, 524, 525, 0, 526,
+ 527, 756, 528, 529, 0, 530, 531, 532, 533, 0,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 170,
+ 171, 0, 542, 543, 544, 1502, 1701, 0, 1702, 0,
+ 545, 0, 0, 546, 176, 547, 548, 549, 550, 551,
+ 0, 0, 552, 1703, 178, 553, 0, 0, 554, 555,
+ 556, 1704, 1705, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 757, 566, 567, 758, 568, 569, 570, 1706,
+ 185, 1707, 571, 572, 573, 574, 575, 576, 577, 187,
+ 1708, 578, 1709, 579, 580, 0, 581, 1710, 1711, 582,
+ 1712, 583, 584, 585, 0, 586, 587, 0, 0, 1713,
+ 589, 590, 0, 0, 591, 592, 193, 194, 593, 195,
+ 1714, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 1715, 605, 198, 606, 607, 608, 0,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 1716, 619, 620, 621, 622, 0, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 207, 637, 638, 639, 640, 641, 1717, 642, 643,
+ 644, 645, 646, 647, 648, 759, 649, 0, 650, 651,
+ 652, 653, 654, 1718, 656, 657, 214, 658, 659, 0,
+ 660, 661, 1719, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 1720, 676,
+ 0, 677, 678, 0, 679, 221, 680, 681, 682, 683,
+ 684, 0, 685, 1721, 1722, 0, 0, 687, 688, 1723,
+ 689, 1724, 1725, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 1726, 698, 699, 700, 701, 702, 1727, 0,
+ 703, 704, 705, 706, 707, 760, 1728, 0, 708, 233,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732,
+ 240, 1733, 1734, 1735, 1736, 245, 761, 720, 721, 0,
+ 0, 0, 0, 0, 0, 0, 1738, 1739, 0, 0,
+ 0, 0, 0, 0, 0, 1741, 785, 81, 82, 737,
+ 84, 85, 86, 738, 0, 739, 89, 0, 0, 92,
+ 93, 94, 95, 96, 97, 786, 98, 99, 740, 787,
+ 0, 101, 102, 103, 104, 788, 789, 106, 107, 108,
+ 0, 109, 790, 791, 741, 742, 0, 0, 0, 743,
+ 744, 0, 0, 0, 0, 745, 0, 0, 0, 0,
+ 0, 0, 0, 0, 746, 0, 747, 0, 748, 749,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 429, 430, 431, 432, 433, 434, 435, 436, 0,
+ 437, 438, 439, 0, 0, 0, 0, 0, 0, 0,
+ 440, 441, 0, 442, 443, 444, 126, 445, 446, 447,
+ 128, 129, 130, 131, 132, 0, 448, 449, 450, 451,
+ 452, 453, 0, 1680, 454, 455, 751, 134, 456, 0,
+ 457, 458, 459, 460, 1683, 0, 1684, 0, 461, 462,
+ 463, 464, 465, 142, 466, 467, 752, 0, 468, 469,
+ 470, 471, 472, 473, 0, 145, 474, 475, 0, 1685,
+ 1686, 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480,
+ 754, 481, 149, 150, 482, 0, 483, 0, 484, 485,
+ 486, 487, 488, 489, 0, 490, 491, 492, 493, 0,
+ 0, 494, 495, 496, 497, 498, 0, 499, 500, 501,
+ 0, 502, 503, 504, 0, 505, 506, 507, 508, 158,
+ 509, 510, 511, 512, 1696, 0, 513, 0, 514, 515,
+ 162, 516, 0, 517, 0, 518, 163, 0, 164, 519,
+ 520, 521, 522, 0, 523, 1699, 0, 167, 524, 525,
+ 0, 526, 527, 756, 528, 529, 168, 530, 531, 532,
+ 533, 0, 534, 535, 536, 537, 538, 539, 540, 0,
+ 541, 170, 171, 0, 542, 543, 544, 0, 172, 0,
+ 173, 0, 545, 174, 175, 546, 176, 547, 548, 549,
+ 550, 551, 4181, 0, 552, 1703, 178, 553, 179, 0,
+ 554, 555, 556, 1704, 1705, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 757, 566, 567, 758, 568, 569,
+ 570, 184, 185, 186, 571, 572, 573, 574, 575, 576,
+ 577, 187, 1708, 578, 0, 579, 580, 190, 581, 0,
+ 1711, 582, 192, 583, 584, 585, 0, 586, 587, 0,
+ 1181, 588, 589, 590, 0, 0, 591, 592, 193, 194,
+ 593, 195, 1714, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 0, 603, 604, 1715, 605, 198, 606, 607,
+ 608, 0, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 200, 619, 620, 621, 622, 0, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 0, 635, 636, 207, 637, 638, 639, 640, 641, 209,
+ 4182, 643, 644, 645, 646, 647, 648, 759, 649, 212,
+ 650, 651, 652, 653, 654, 1718, 656, 657, 214, 658,
+ 659, 216, 660, 661, 217, 662, 0, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 1720, 676, 0, 677, 678, 220, 679, 221, 680, 681,
+ 682, 683, 684, 0, 685, 222, 223, 0, 0, 687,
+ 688, 1723, 689, 1724, 0, 690, 691, 692, 693, 694,
+ 695, 696, 697, 0, 0, 698, 699, 700, 701, 702,
+ 1727, 0, 703, 704, 705, 706, 707, 2493, 232, 0,
+ 708, 233, 709, 710, 711, 712, 0, 0, 713, 0,
+ 234, 714, 715, 716, 717, 718, 719, 235, 1729, 1730,
+ 1731, 1732, 240, 1733, 1734, 1735, 1736, 4183, 761, 720,
+ 721, 0, 0, 246, 0, 785, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 4184, 92, 93,
+ 94, 95, 96, 97, 786, 98, 99, 740, 787, 0,
+ 101, 102, 103, 104, 788, 789, 106, 107, 108, 0,
+ 109, 790, 791, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 129, 130, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 1680, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 1683, 0, 1684, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 1685, 1686,
+ 1687, 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 1696, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 1699, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 4181, 0, 552, 1703, 178, 553, 179, 0, 554,
+ 555, 556, 1704, 1705, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 185, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 1708, 578, 0, 579, 580, 190, 581, 0, 1711,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 1181,
+ 588, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 1714, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 1715, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 209, 4182,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 1718, 656, 657, 214, 658, 659,
+ 216, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 1720,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 1723, 689, 1724, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 1727,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 1729, 1730, 1731,
+ 1732, 240, 1733, 1734, 1735, 1736, 4183, 761, 720, 721,
+ 0, 0, 0, 0, 785, 81, 82, 737, 84, 85,
+ 86, 738, 0, 739, 89, 0, 4184, 92, 93, 94,
+ 95, 96, 97, 786, 98, 99, 740, 787, 0, 101,
+ 102, 103, 104, 788, 789, 106, 107, 108, 0, 109,
+ 790, 791, 741, 742, 0, 0, 0, 743, 744, 0,
+ 0, 0, 0, 745, 0, 0, 0, 0, 0, 0,
+ 0, 0, 746, 0, 747, 0, 748, 749, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 429,
+ 430, 431, 432, 433, 434, 435, 436, 0, 437, 438,
+ 439, 0, 0, 0, 0, 0, 0, 0, 440, 441,
+ 0, 442, 443, 444, 126, 445, 446, 447, 128, 129,
+ 130, 131, 132, 0, 448, 449, 450, 451, 452, 453,
+ 0, 1680, 454, 455, 751, 134, 456, 0, 457, 458,
+ 459, 460, 1683, 0, 1684, 0, 461, 462, 463, 464,
+ 465, 142, 466, 467, 752, 0, 468, 469, 470, 471,
+ 472, 473, 0, 145, 474, 475, 0, 1685, 1686, 1687,
+ 1688, 1689, 1690, 1691, 477, 478, 479, 480, 754, 481,
+ 149, 150, 482, 0, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 496, 497, 498, 0, 499, 500, 501, 0, 502,
+ 503, 504, 0, 505, 506, 507, 508, 158, 509, 510,
+ 511, 512, 1696, 0, 513, 0, 514, 515, 162, 516,
+ 0, 517, 0, 518, 163, 0, 164, 519, 520, 521,
+ 522, 0, 523, 1699, 0, 167, 524, 525, 0, 526,
+ 527, 756, 528, 529, 168, 530, 531, 532, 533, 0,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 170,
+ 171, 0, 542, 543, 544, 0, 172, 0, 173, 0,
+ 545, 174, 175, 546, 176, 547, 548, 549, 550, 551,
+ 0, 0, 552, 1703, 178, 553, 179, 0, 554, 555,
+ 556, 1704, 1705, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 757, 566, 567, 758, 568, 569, 570, 184,
+ 185, 186, 571, 572, 573, 574, 575, 576, 577, 187,
+ 1708, 578, 0, 579, 580, 190, 581, 0, 1711, 582,
+ 192, 583, 584, 585, 0, 586, 587, 0, 0, 588,
+ 589, 590, 0, 0, 591, 592, 193, 194, 593, 195,
+ 1714, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 1715, 605, 198, 606, 607, 608, 0,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 200, 619, 620, 621, 622, 0, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 207, 637, 638, 639, 640, 641, 209, 4182, 643,
+ 644, 645, 646, 647, 648, 759, 649, 0, 650, 651,
+ 652, 653, 654, 1718, 656, 657, 214, 658, 659, 216,
+ 660, 661, 217, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 1720, 676,
+ 0, 677, 678, 0, 679, 221, 680, 681, 682, 683,
+ 684, 0, 685, 222, 223, 0, 0, 687, 688, 1723,
+ 689, 1724, 0, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 0, 698, 699, 700, 701, 702, 1727, 0,
+ 703, 704, 705, 706, 707, 760, 232, 0, 708, 233,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732,
+ 240, 1733, 1734, 1735, 1736, 4183, 761, 720, 721, 0,
+ 0, 0, 0, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 247, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 1680, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 1683, 0, 1684, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 1696, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 1699, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 1703, 178, 553, 179, 0, 554, 555, 556,
+ 1704, 1705, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 1708,
+ 578, 0, 579, 580, 190, 581, 0, 1711, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 1714,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 1715, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 1718, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 1720, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 1723, 689,
+ 1724, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 1727, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240,
+ 1733, 1734, 1735, 1736, 245, 761, 720, 721, 0, 0,
+ 0, 0, 785, 81, 82, 737, 84, 85, 86, 738,
+ 0, 739, 89, 0, 4844, 92, 93, 94, 95, 96,
+ 97, 786, 98, 99, 740, 787, 0, 101, 102, 103,
+ 104, 788, 789, 106, 107, 108, 0, 109, 790, 791,
+ 741, 742, 0, 0, 0, 743, 744, 0, 0, 0,
+ 0, 745, 0, 0, 0, 0, 0, 0, 0, 0,
+ 746, 0, 747, 0, 748, 749, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 429, 430, 431,
+ 432, 433, 434, 435, 436, 0, 437, 438, 439, 0,
+ 0, 0, 0, 0, 0, 0, 440, 441, 0, 442,
+ 443, 444, 126, 445, 446, 447, 128, 129, 130, 131,
+ 132, 0, 448, 449, 450, 451, 452, 453, 0, 1680,
+ 454, 455, 751, 134, 456, 0, 457, 458, 459, 460,
+ 1683, 0, 1684, 0, 461, 462, 463, 464, 465, 142,
+ 466, 467, 752, 0, 468, 469, 470, 471, 472, 473,
+ 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688, 1689,
+ 1690, 1691, 477, 478, 479, 480, 754, 481, 149, 150,
+ 482, 0, 483, 0, 484, 485, 486, 487, 488, 489,
+ 0, 490, 491, 492, 493, 0, 0, 494, 495, 496,
+ 497, 498, 0, 499, 500, 501, 0, 502, 503, 504,
+ 0, 505, 506, 507, 508, 158, 509, 510, 511, 512,
+ 1696, 0, 513, 0, 514, 515, 162, 516, 0, 517,
+ 0, 518, 163, 0, 164, 519, 520, 521, 522, 0,
+ 523, 1699, 0, 167, 524, 525, 0, 526, 527, 756,
+ 528, 529, 168, 530, 531, 532, 533, 0, 534, 535,
+ 536, 537, 538, 539, 540, 0, 541, 170, 171, 0,
+ 542, 543, 544, 0, 172, 0, 173, 0, 545, 174,
+ 175, 546, 176, 547, 548, 549, 550, 551, 0, 0,
+ 552, 1703, 178, 553, 179, 0, 554, 555, 556, 1704,
+ 1705, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 757, 566, 567, 758, 568, 569, 570, 184, 185, 186,
+ 571, 572, 573, 574, 575, 576, 577, 187, 1708, 578,
+ 0, 579, 580, 190, 581, 0, 1711, 582, 192, 583,
+ 584, 585, 0, 586, 587, 0, 0, 588, 589, 590,
+ 0, 0, 591, 592, 193, 194, 593, 195, 1714, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 0, 603,
+ 604, 1715, 605, 198, 606, 607, 608, 0, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 200, 619,
+ 620, 621, 622, 0, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 0, 635, 636, 207,
+ 637, 638, 639, 640, 641, 209, 642, 643, 644, 645,
+ 646, 647, 648, 759, 649, 0, 650, 651, 652, 653,
+ 654, 1718, 656, 657, 214, 658, 659, 216, 660, 661,
+ 217, 662, 0, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 1720, 676, 0, 677,
+ 678, 0, 679, 221, 680, 681, 682, 683, 684, 0,
+ 685, 222, 223, 0, 0, 687, 688, 1723, 689, 1724,
+ 0, 690, 691, 692, 693, 694, 695, 696, 697, 0,
+ 0, 698, 699, 700, 701, 702, 1727, 0, 703, 704,
+ 705, 706, 707, 760, 232, 0, 708, 233, 709, 710,
+ 711, 712, 0, 0, 713, 0, 0, 714, 715, 716,
+ 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240, 1733,
+ 1734, 1735, 1736, 245, 761, 720, 721, 0, 0, 0,
+ 0, 785, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 5978, 92, 93, 94, 95, 96, 97,
+ 786, 98, 99, 740, 787, 0, 101, 102, 103, 104,
+ 788, 789, 106, 107, 108, 0, 109, 790, 791, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 129, 130, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 139, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 0, 0, 0, 146, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 178, 553, 179, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 185, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 190, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 216, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 0, 0, 0, 0,
+ 0, 81, 82, 737, 84, 85, 86, 738, 0, 739,
+ 89, 0, 5567, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 740, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 741, 742,
+ 0, 0, 0, 743, 744, 0, 0, 0, 0, 745,
+ 0, 0, 0, 0, 0, 0, 0, 0, 746, 0,
+ 747, 0, 748, 749, 35, 0, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 429, 430, 431, 432, 433,
+ 434, 435, 436, 0, 437, 438, 439, 0, 0, 0,
+ 0, 0, 4771, 0, 440, 441, 0, 442, 443, 444,
+ 0, 445, 446, 447, 128, 129, 0, 131, 132, 0,
+ 448, 449, 450, 451, 452, 453, 0, 0, 454, 455,
+ 751, 134, 456, 0, 457, 458, 459, 460, 138, 0,
+ 0, 0, 461, 462, 463, 464, 465, 0, 466, 467,
+ 752, 0, 468, 469, 470, 471, 472, 473, 0, -1810,
+ 474, 475, 0, 0, 0, 0, 0, 0, 0, 0,
+ 477, 478, 479, 480, 754, 481, 149, 150, 482, 0,
+ 483, 0, 484, 485, 486, 487, 488, 489, 0, 490,
+ 491, 492, 493, 0, 0, 494, 495, 496, 497, 498,
+ 0, 499, 500, 501, 0, 502, 503, 504, 0, 505,
+ 506, 507, 508, 158, 509, 510, 511, 512, 160, 0,
+ 513, 0, 514, 515, 162, 516, 0, 517, 0, 518,
+ 0, 0, -1810, 519, 520, 521, 522, 0, 523, 166,
+ 0, 167, 524, 525, 0, 526, 527, 756, 528, 529,
+ 0, 530, 531, 532, 533, 0, 534, 535, 536, 537,
+ 538, 539, 540, 0, 541, -1810, 171, 0, 542, 543,
+ 544, 0, 172, 0, 173, 0, 545, 0, 0, 546,
+ -1810, 547, 548, 549, 550, 551, 0, 0, 552, 177,
+ -1810, 553, 0, 0, 554, 555, 556, 0, 0, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 757, 566,
+ 567, 758, 568, 569, 570, 184, -1810, 186, 571, 572,
+ 573, 574, 575, 576, 577, 187, 188, 578, 0, 579,
+ 580, 0, 581, 0, 191, 582, 192, 583, 584, 585,
+ 0, 586, 587, 0, 0, 588, 589, 590, 0, 0,
+ 591, 592, 193, 0, 593, 0, 196, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 0, 603, 604, 197,
+ 605, 198, 606, 607, 608, 0, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 200, 619, 620, 621,
+ 622, 0, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 0, 635, 636, -1810, 637, 638,
+ 639, 640, 641, 209, 642, 643, 644, 645, 646, 647,
+ 648, 759, 649, 0, 650, 651, 652, 653, 654, 0,
+ 656, 657, 214, 658, 659, 0, 660, 661, 217, 662,
+ 0, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 219, 676, 0, 677, 678, 0,
+ 679, 0, 680, 681, 682, 683, 684, 0, 685, 222,
+ 223, 0, 0, 687, 688, 224, 689, 225, 0, 690,
+ 691, 692, 693, 694, 695, 696, 697, 0, 0, 698,
+ 699, 700, 701, 702, 0, 0, 703, 704, 705, 706,
+ 707, 760, 232, 0, 708, 0, 709, 710, 711, 712,
+ 0, 0, 713, 0, 0, 714, 715, 716, 717, 718,
+ 719, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 761, 720, 721, 0, 0, 0, 0, 0,
+ 0, 81, 82, 737, 84, 85, 86, 738, 0, 739,
+ 89, 0, 1832, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 740, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 741, 742,
+ 0, 0, 0, 743, 744, 0, 0, 0, 0, 745,
+ 0, 0, 0, 0, 0, 0, 0, 0, 746, 0,
+ 747, 0, 748, 749, 35, 428, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 429, 430, 431, 432, 433,
+ 434, 435, 436, 0, 437, 438, 439, 0, 0, 0,
+ 0, 0, 0, 0, 440, 441, 0, 442, 443, 444,
+ 0, 445, 446, 447, 128, 129, 0, 131, 132, 0,
+ 448, 449, 450, 451, 452, 453, 0, 0, 454, 455,
+ 751, 134, 456, 0, 457, 458, 459, 460, 138, 0,
+ 0, 0, 461, 462, 463, 464, 465, 0, 466, 467,
+ 752, 0, 468, 469, 470, 471, 472, 473, 0, 0,
+ 474, 475, 0, 0, 0, 0, 0, 0, 0, 0,
+ 477, 478, 479, 480, 754, 481, 149, 150, 482, 0,
+ 483, 0, 484, 485, 486, 487, 488, 489, 0, 490,
+ 491, 492, 493, 0, 0, 494, 495, 496, 497, 498,
+ 0, 499, 500, 501, 0, 502, 503, 504, 0, 505,
+ 506, 507, 508, 158, 509, 510, 511, 512, 160, 0,
+ 513, 0, 514, 515, 162, 516, 0, 517, 0, 518,
+ 0, 0, 0, 519, 520, 521, 522, 0, 523, 166,
+ 0, 167, 524, 525, 0, 526, 527, 756, 528, 529,
+ 0, 530, 531, 532, 533, 0, 534, 535, 536, 537,
+ 538, 539, 540, 0, 541, 0, 171, 0, 542, 543,
+ 544, 0, 172, 0, 173, 0, 545, 0, 0, 546,
+ 0, 547, 548, 549, 550, 551, 0, 0, 552, 177,
+ 0, 553, 0, 0, 554, 555, 556, 0, 0, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 757, 566,
+ 567, 758, 568, 569, 570, 184, 0, 186, 571, 572,
+ 573, 574, 575, 576, 577, 187, 188, 578, 0, 579,
+ 580, 0, 581, 0, 191, 582, 192, 583, 584, 585,
+ 0, 586, 587, 0, 0, 588, 589, 590, 0, 0,
+ 591, 592, 193, 0, 593, 0, 196, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 0, 603, 604, 197,
+ 605, 198, 606, 607, 608, 0, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 200, 619, 620, 621,
+ 622, 0, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 0, 635, 636, 0, 637, 638,
+ 639, 640, 641, 209, 642, 643, 644, 645, 646, 647,
+ 648, 759, 649, 212, 650, 651, 652, 653, 654, 0,
+ 656, 657, 214, 658, 659, 0, 660, 661, 217, 662,
+ 0, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 219, 676, 0, 677, 678, 220,
+ 679, 0, 680, 681, 682, 683, 684, 0, 685, 222,
+ 223, 0, 0, 687, 688, 224, 689, 225, 0, 690,
+ 691, 692, 693, 694, 695, 696, 697, 0, 0, 698,
+ 699, 700, 701, 702, 0, 0, 703, 704, 705, 706,
+ 707, 2493, 232, 0, 708, 0, 709, 710, 711, 712,
+ 0, 0, 713, 0, 234, 714, 715, 716, 717, 718,
+ 719, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 761, 720, 721, 0, 0, 246, 0, 0,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 247, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 212, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 220, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 2493, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 234, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 0, 0, 246, 0, 0, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 247, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 740, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 39,
+ 0, 0, 0, 0, 40, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 0, 445,
+ 446, 447, 128, 129, 0, 131, 132, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 751, 134,
+ 456, 0, 457, 458, 459, 460, 138, 0, 0, 0,
+ 461, 462, 463, 464, 465, 0, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 0, 474, 475,
+ 0, 0, 0, 0, 0, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 496, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 0, 513, 0,
+ 514, 515, 162, 516, 0, 517, 0, 518, 0, 0,
+ 0, 519, 520, 521, 522, 0, 523, 166, 0, 167,
+ 524, 525, 0, 526, 527, 756, 528, 529, 0, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 0, 171, 0, 542, 543, 544, 0,
+ 172, 0, 173, 0, 545, 0, 0, 546, 0, 547,
+ 548, 549, 550, 551, 0, 0, 552, 177, 0, 553,
+ 0, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 0, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 0, 579, 580, 0,
+ 581, 0, 191, 582, 192, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 193, 0, 593, 0, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 197, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 0, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 214, 658, 659, 0, 660, 661, 217, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 0, 677, 678, 0, 679, 0,
+ 680, 681, 682, 683, 684, 0, 685, 222, 223, 0,
+ 0, 687, 688, 224, 689, 225, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 760,
+ 232, 0, 708, 0, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 0, 0, 0, 0, 0, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 3980, 3981,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 39, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 0, 0, 0, 0, 0, 81, 82, 737,
+ 84, 85, 86, 738, 0, 739, 89, 0, 3981, 92,
+ 93, 94, 95, 96, 97, 0, 98, 99, 740, 0,
+ 0, 101, 102, 103, 104, 0, 0, 106, 107, 108,
+ 0, 109, 0, 0, 741, 742, 0, 0, 0, 743,
+ 744, 0, 0, 0, 0, 745, 0, 0, 0, 0,
+ 0, 0, 0, 0, 746, 0, 747, 0, 748, 749,
+ 35, 0, 0, 0, 37, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 429, 430, 431, 432, 433, 434, 435, 436, 0,
+ 437, 438, 439, 0, 0, 0, 0, 0, 0, 0,
+ 440, 441, 0, 442, 443, 444, 0, 445, 446, 447,
+ 128, 129, 0, 131, 132, 0, 448, 449, 450, 451,
+ 452, 453, 0, 0, 454, 455, 751, 134, 456, 0,
+ 457, 458, 459, 460, 138, 0, 0, 0, 461, 462,
+ 463, 464, 465, 0, 466, 467, 752, 0, 468, 469,
+ 470, 471, 472, 473, 0, 0, 474, 475, 0, 0,
+ 0, 0, 0, 0, 0, 0, 477, 478, 479, 480,
+ 754, 481, 149, 150, 482, 0, 483, 0, 484, 485,
+ 486, 487, 488, 489, 0, 490, 491, 492, 493, 0,
+ 0, 494, 495, 496, 497, 498, 0, 499, 500, 501,
+ 0, 502, 503, 504, 0, 505, 506, 507, 508, 158,
+ 509, 510, 511, 512, 160, 0, 513, 0, 514, 515,
+ 162, 516, 0, 517, 0, 518, 0, 0, 0, 519,
+ 520, 521, 522, 0, 523, 166, 0, 167, 524, 525,
+ 0, 526, 527, 756, 528, 529, 0, 530, 531, 532,
+ 533, 0, 534, 535, 536, 537, 538, 539, 540, 0,
+ 541, 0, 171, 0, 542, 543, 544, 0, 172, 0,
+ 173, 0, 545, 0, 0, 546, 0, 547, 548, 549,
+ 550, 551, 0, 0, 552, 177, 0, 553, 0, 0,
+ 554, 555, 556, 0, 0, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 757, 566, 567, 758, 568, 569,
+ 570, 184, 0, 186, 571, 572, 573, 574, 575, 576,
+ 577, 187, 188, 578, 0, 579, 580, 0, 581, 0,
+ 191, 582, 192, 583, 584, 585, 0, 586, 587, 0,
+ 0, 588, 589, 590, 0, 0, 591, 592, 193, 0,
+ 593, 0, 196, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 0, 603, 604, 197, 605, 198, 606, 607,
+ 608, 0, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 200, 619, 620, 621, 622, 0, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 0, 635, 636, 0, 637, 638, 639, 640, 641, 209,
+ 642, 643, 644, 645, 646, 647, 648, 759, 649, 0,
+ 650, 651, 652, 653, 654, 0, 656, 657, 214, 658,
+ 659, 0, 660, 661, 217, 662, 0, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 219, 676, 0, 677, 678, 0, 679, 0, 680, 681,
+ 682, 683, 684, 0, 685, 222, 223, 0, 0, 687,
+ 688, 224, 689, 225, 0, 690, 691, 692, 693, 694,
+ 695, 696, 697, 0, 0, 698, 699, 700, 701, 702,
+ 0, 0, 703, 704, 705, 706, 707, 760, 232, 0,
+ 708, 0, 709, 710, 711, 712, 0, 0, 713, 0,
+ 0, 714, 715, 716, 717, 718, 719, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 761, 720,
+ 721, 0, 0, 0, 0, 0, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 1813, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 0, 0, 0, 0, 0, 81, 82, 737, 84, 85,
+ 86, 738, 0, 739, 89, 0, 3490, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 740, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 741, 742, 0, 0, 0, 743, 744, 0,
+ 0, 0, 0, 745, 0, 0, 0, 0, 0, 0,
+ 0, 0, 746, 0, 747, 0, 748, 749, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 429,
+ 430, 431, 432, 433, 434, 435, 436, 0, 437, 438,
+ 439, 0, 0, 0, 0, 0, 0, 0, 440, 441,
+ 0, 442, 443, 444, 0, 445, 446, 447, 128, 129,
+ 0, 131, 132, 0, 448, 449, 450, 451, 452, 453,
+ 0, 0, 454, 455, 751, 134, 456, 0, 457, 458,
+ 459, 460, 138, 0, 0, 0, 461, 462, 463, 464,
+ 465, 0, 466, 467, 752, 0, 468, 469, 470, 471,
+ 472, 473, 0, 0, 474, 475, 0, 0, 0, 0,
+ 0, 0, 0, 0, 477, 478, 479, 480, 754, 481,
+ 149, 150, 482, 0, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 496, 497, 498, 0, 499, 500, 501, 0, 502,
+ 503, 504, 0, 505, 506, 507, 508, 158, 509, 510,
+ 511, 512, 160, 0, 513, 0, 514, 515, 162, 516,
+ 0, 517, 0, 518, 0, 0, 0, 519, 520, 521,
+ 522, 0, 523, 166, 0, 167, 524, 525, 0, 526,
+ 527, 756, 528, 529, 0, 530, 531, 532, 533, 0,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 0,
+ 171, 0, 542, 543, 544, 0, 172, 0, 173, 0,
+ 545, 0, 0, 546, 0, 547, 548, 549, 550, 551,
+ 0, 0, 552, 177, 0, 553, 0, 0, 554, 555,
+ 556, 0, 0, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 757, 566, 567, 758, 568, 569, 570, 184,
+ 0, 186, 571, 572, 573, 574, 575, 576, 577, 187,
+ 188, 578, 0, 579, 580, 0, 581, 0, 191, 582,
+ 192, 583, 584, 585, 0, 586, 587, 0, 0, 588,
+ 589, 590, 0, 0, 591, 592, 193, 0, 593, 0,
+ 196, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 197, 605, 198, 606, 607, 608, 0,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 200, 619, 620, 621, 622, 0, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 0, 637, 638, 639, 640, 641, 209, 642, 643,
+ 644, 645, 646, 647, 648, 759, 649, 0, 650, 651,
+ 652, 653, 654, 0, 656, 657, 214, 658, 659, 0,
+ 660, 661, 217, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 219, 676,
+ 0, 677, 678, 0, 679, 0, 680, 681, 682, 683,
+ 684, 0, 685, 222, 223, 0, 0, 687, 688, 224,
+ 689, 225, 0, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 0, 698, 699, 700, 701, 702, 0, 0,
+ 703, 704, 705, 706, 707, 760, 232, 0, 708, 0,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 761, 720, 721, 0,
+ 0, 0, 0, 0, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 4750, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 0, 0,
+ 0, 0, 785, 81, 82, 737, 84, 85, 86, 738,
+ 0, 739, 89, 0, 5236, 92, 93, 94, 95, 96,
+ 97, 786, 98, 99, 740, 787, 0, 101, 102, 103,
+ 104, 788, 789, 106, 107, 108, 0, 109, 790, 791,
+ 741, 742, 0, 0, 0, 743, 744, 0, 0, 0,
+ 0, 745, 0, 0, 0, 0, 0, 0, 0, 0,
+ 746, 0, 747, 0, 748, 749, 35, 428, 0, 0,
+ 37, 0, 38, 39, 0, 0, 0, 1303, 40, 0,
+ 0, 0, 0, 0, 1304, 1305, 1306, 429, 430, 431,
+ 432, 433, 434, 435, 436, 792, 437, 438, 439, 793,
+ 794, 795, 796, 797, 798, 799, 440, 441, 800, 442,
+ 443, 444, 126, 445, 446, 447, 0, 1492, 130, 1493,
+ 1494, 801, 448, 449, 450, 451, 452, 453, 802, 803,
+ 454, 455, 1495, 1496, 456, 805, 457, 458, 459, 460,
+ 0, 806, 139, 807, 461, 462, 463, 464, 465, 142,
+ 466, 467, 752, 809, 468, 469, 470, 471, 472, 473,
+ 810, 145, 474, 475, 0, 812, 813, 814, 146, 815,
+ 816, 817, 477, 478, 479, 480, 754, 481, 1497, 1498,
+ 482, 818, 483, 819, 484, 485, 486, 487, 488, 489,
+ 820, 490, 491, 492, 493, 821, 822, 494, 495, 1499,
+ 497, 498, 823, 499, 500, 501, 824, 502, 503, 504,
+ 825, 505, 506, 507, 508, 0, 509, 510, 511, 512,
+ 0, 826, 513, 827, 514, 515, 1500, 516, 828, 517,
+ 829, 518, 163, 830, 164, 519, 520, 521, 522, 831,
+ 523, 0, 832, 0, 524, 525, 833, 526, 527, 756,
+ 528, 529, 168, 530, 531, 532, 533, 834, 534, 535,
+ 536, 537, 538, 539, 540, 835, 541, 170, 0, 0,
+ 542, 543, 544, 1502, 1503, 838, 1504, 839, 545, 174,
+ 175, 546, 176, 547, 548, 549, 550, 551, 840, 841,
+ 552, 0, 178, 553, 179, 842, 554, 555, 556, 843,
+ 844, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 757, 566, 567, 758, 568, 569, 570, 1505, 185, 1506,
+ 571, 572, 573, 574, 575, 576, 577, 4490, 0, 578,
+ 845, 579, 580, 190, 581, 846, 0, 582, 1507, 583,
+ 584, 585, 847, 586, 587, 848, 849, 4491, 589, 590,
+ 850, 851, 591, 592, 0, 194, 593, 195, 0, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 852, 603,
+ 604, 0, 605, 0, 606, 607, 608, 853, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 1508, 619,
+ 620, 621, 622, 854, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 855, 635, 636, 207,
+ 637, 638, 639, 640, 641, 0, 642, 643, 644, 645,
+ 646, 647, 648, 759, 649, 856, 650, 651, 652, 653,
+ 654, 857, 656, 657, 2709, 658, 659, 216, 660, 661,
+ 1510, 662, 858, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 0, 676, 859, 677,
+ 678, 860, 679, 221, 680, 681, 682, 683, 684, 861,
+ 685, 1511, 1512, 0, 863, 687, 688, 0, 689, 0,
+ 864, 690, 691, 692, 693, 694, 695, 696, 697, 0,
+ 866, 698, 699, 700, 701, 702, 867, 868, 703, 704,
+ 705, 706, 707, 0, 1513, 870, 708, 233, 709, 710,
+ 711, 712, 871, 872, 713, 873, 874, 714, 715, 716,
+ 717, 718, 719, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 761, 720, 721, 0, 0, 0,
+ 1309, 1310, 1311, 0, 4492, 4493, 1314, 1315, 1316, 1317,
+ 785, 81, 82, 737, 84, 85, 86, 738, 0, 739,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 786,
+ 98, 99, 740, 787, 0, 101, 102, 103, 104, 788,
+ 789, 106, 107, 108, 0, 109, 790, 791, 741, 742,
+ 0, 0, 0, 743, 744, 0, 0, 0, 0, 745,
+ 0, 0, 0, 0, 0, 0, 0, 0, 746, 0,
+ 747, 0, 748, 749, 35, 428, 0, 0, 37, 0,
+ 38, 39, 0, 0, 0, 1303, 40, 0, 0, 0,
+ 0, 0, 1304, 1305, 1306, 429, 430, 431, 432, 433,
+ 434, 435, 436, 792, 437, 438, 439, 793, 794, 795,
+ 796, 797, 798, 799, 440, 441, 800, 442, 443, 444,
+ 126, 445, 446, 447, 0, 1492, 130, 1493, 1494, 801,
+ 448, 449, 450, 451, 452, 453, 802, 803, 454, 455,
+ 1495, 1496, 456, 805, 457, 458, 459, 460, 0, 806,
+ 139, 807, 461, 462, 463, 464, 465, 142, 466, 467,
+ 752, 809, 468, 469, 470, 471, 472, 473, 810, 145,
+ 474, 475, 0, 812, 813, 814, 146, 815, 816, 817,
+ 477, 478, 479, 480, 754, 481, 1497, 1498, 482, 818,
+ 483, 819, 484, 485, 486, 487, 488, 489, 820, 490,
+ 491, 492, 493, 821, 822, 494, 495, 1499, 497, 498,
+ 823, 499, 500, 501, 824, 502, 503, 504, 825, 505,
+ 506, 507, 508, 0, 509, 510, 511, 512, 0, 826,
+ 513, 827, 514, 515, 1500, 516, 828, 517, 829, 518,
+ 163, 830, 164, 519, 520, 521, 522, 831, 523, 0,
+ 832, 0, 524, 525, 833, 526, 527, 756, 528, 529,
+ 168, 530, 531, 532, 533, 834, 534, 535, 536, 537,
+ 538, 539, 540, 835, 541, 170, 0, 0, 542, 543,
+ 544, 1502, 1503, 838, 1504, 839, 545, 174, 175, 546,
+ 176, 547, 548, 549, 550, 551, 840, 841, 552, 0,
+ 178, 553, 179, 842, 554, 555, 556, 843, 844, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 757, 566,
+ 567, 758, 568, 569, 570, 1505, 185, 1506, 571, 572,
+ 573, 574, 575, 576, 577, 4939, 0, 578, 845, 579,
+ 580, 190, 581, 846, 0, 582, 1507, 583, 584, 585,
+ 847, 586, 587, 848, 849, 4491, 589, 590, 850, 851,
+ 591, 592, 0, 194, 593, 195, 0, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 852, 603, 604, 0,
+ 605, 0, 606, 607, 608, 853, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 1508, 619, 620, 621,
+ 622, 854, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 855, 635, 636, 207, 637, 638,
+ 639, 640, 641, 0, 642, 643, 644, 645, 646, 647,
+ 648, 759, 649, 856, 650, 651, 652, 653, 654, 857,
+ 656, 657, 2709, 658, 659, 216, 660, 661, 1510, 662,
+ 858, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 0, 676, 859, 677, 678, 860,
+ 679, 221, 680, 681, 682, 683, 684, 861, 685, 1511,
+ 1512, 0, 863, 687, 688, 0, 689, 0, 864, 690,
+ 691, 692, 693, 694, 695, 696, 697, 0, 866, 698,
+ 699, 700, 701, 702, 867, 868, 703, 704, 705, 706,
+ 707, 0, 1513, 870, 708, 233, 709, 710, 711, 712,
+ 871, 872, 713, 873, 874, 714, 715, 716, 717, 718,
+ 719, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 761, 720, 721, 0, 0, 0, 1309, 1310,
+ 1311, 0, 4492, 4493, 1314, 1315, 1316, 1317, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 1303, 0, 0, 0, 0, 0, 0, 1304,
+ 1305, 1306, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 1307, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 1308, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 0, 0, 0, 1309, 1310, 1311, 0, 1312,
+ 1313, 1314, 1315, 1316, 1317, 81, 82, 737, 84, 85,
+ 86, 738, 0, 739, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 740, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 741, 742, 0, 0, 0, 743, 744, 0,
+ 0, 0, 0, 745, 0, 0, 0, 0, 0, 0,
+ 0, 0, 746, 0, 747, 0, 748, 749, 35, 0,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 1303,
+ 0, 0, 0, 0, 0, 0, 1304, 1305, 1306, 429,
+ 430, 431, 432, 433, 434, 435, 436, 0, 437, 438,
+ 439, 0, 0, 0, 0, 0, 0, 0, 440, 441,
+ 0, 442, 443, 444, 0, 445, 446, 447, 128, 129,
+ 0, 131, 132, 0, 448, 449, 450, 451, 452, 453,
+ 0, 0, 454, 455, 751, 134, 456, 0, 457, 1435,
+ 459, 460, 138, 0, 0, 0, 461, 462, 463, 464,
+ 465, 0, 466, 467, 752, 0, 468, 469, 470, 471,
+ 472, 473, 0, 0, 474, 475, 0, 0, 0, 0,
+ 0, 0, 0, 0, 477, 478, 479, 480, 754, 481,
+ 149, 150, 482, 0, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 496, 497, 498, 0, 499, 500, 501, 0, 502,
+ 503, 504, 0, 505, 506, 507, 508, 158, 509, 510,
+ 511, 512, 160, 0, 1436, 0, 514, 515, 162, 516,
+ 0, 517, 0, 518, 0, 0, 0, 519, 520, 521,
+ 522, 0, 523, 166, 0, 167, 524, 525, 0, 526,
+ 527, 756, 528, 529, 0, 530, 531, 532, 533, 0,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 0,
+ 171, 0, 542, 543, 544, 0, 172, 0, 173, 0,
+ 545, 0, 0, 546, 0, 547, 548, 549, 550, 551,
+ 0, 0, 552, 177, 0, 553, 0, 0, 554, 555,
+ 556, 0, 0, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 757, 566, 567, 758, 568, 569, 570, 184,
+ 0, 186, 571, 572, 573, 574, 575, 576, 577, 187,
+ 188, 578, 0, 579, 580, 0, 581, 0, 191, 582,
+ 192, 583, 584, 585, 0, 586, 587, 0, 0, 588,
+ 589, 590, 0, 0, 591, 592, 193, 0, 593, 0,
+ 196, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 197, 605, 198, 606, 607, 608, 0,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 200, 619, 620, 621, 622, 0, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 0, 637, 638, 639, 640, 641, 209, 642, 643,
+ 644, 645, 646, 647, 648, 759, 649, 0, 650, 651,
+ 652, 653, 654, 0, 656, 657, 214, 658, 659, 0,
+ 660, 661, 217, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 219, 676,
+ 0, 677, 678, 0, 679, 0, 680, 681, 682, 683,
+ 684, 0, 685, 222, 223, 0, 0, 687, 688, 224,
+ 689, 225, 0, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 0, 698, 699, 700, 701, 702, 0, 0,
+ 703, 704, 705, 706, 707, 760, 232, 0, 708, 0,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 761, 720, 721, 0,
+ 0, 0, 1309, 1310, 1311, 0, 1312, 1313, 1314, 1315,
+ 1316, 1317, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 1303, 0, 0, 0,
+ 0, 0, 0, 1304, 1305, 1306, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 1544, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 1545, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 1546, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 0, 0, 0, 1309,
+ 1310, 1311, 0, 1312, 1313, 1314, 1315, 1316, 1317, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 0, 98, 99,
+ 740, 0, 0, 101, 102, 103, 104, 0, 0, 106,
+ 107, 108, 0, 109, 0, 0, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 1303, 0, 0, 0, 0, 0, 0,
+ 1304, 1305, 1306, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 0, 445,
+ 446, 447, 128, 129, 0, 131, 132, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 751, 134,
+ 456, 0, 457, 2177, 459, 460, 138, 0, 0, 0,
+ 461, 462, 463, 464, 465, 0, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 0, 474, 475,
+ 0, 0, 0, 0, 0, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 496, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 0, 2178, 0,
+ 514, 515, 162, 516, 0, 517, 0, 518, 0, 0,
+ 0, 519, 520, 521, 522, 0, 523, 166, 0, 167,
+ 524, 525, 0, 526, 527, 756, 528, 529, 0, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 0, 171, 0, 542, 543, 544, 0,
+ 172, 0, 173, 0, 545, 0, 0, 546, 0, 547,
+ 548, 549, 550, 551, 0, 0, 552, 177, 0, 553,
+ 0, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 0, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 0, 579, 580, 0,
+ 581, 0, 191, 582, 192, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 193, 0, 593, 0, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 197, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 0, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 214, 658, 659, 0, 660, 661, 217, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 0, 677, 678, 0, 679, 0,
+ 680, 681, 682, 683, 684, 0, 685, 222, 223, 0,
+ 0, 687, 688, 224, 689, 225, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 760,
+ 232, 0, 708, 0, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 0, 0, 0, 1309, 1310, 1311, 0,
+ 1312, 1313, 1314, 1315, 1316, 1317, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 1303, 0, 0, 0, 0, 0, 0, 1304, 1305, 1306,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 0, 0, 0, 1309, 1310, 1311, 0, 1312, 1313, 1314,
+ 1315, 1316, 1317, 81, 82, 737, 84, 85, 86, 738,
+ 0, 739, 89, 0, 0, 92, 93, 94, 95, 96,
+ 97, 0, 98, 99, 740, 0, 0, 101, 102, 103,
+ 104, 0, 0, 106, 107, 108, 0, 109, 0, 0,
+ 741, 742, 0, 0, 0, 743, 744, 0, 0, 0,
+ 0, 745, 0, 0, 0, 0, 0, 0, 0, 0,
+ 746, 0, 747, 0, 748, 749, 35, 0, 0, 0,
+ 37, 0, 0, 0, 0, 0, 0, 1303, 0, 0,
+ 0, 0, 0, 0, 1304, 1305, 1306, 429, 430, 431,
+ 432, 433, 434, 435, 436, 0, 437, 438, 439, 0,
+ 0, 0, 0, 0, 0, 0, 440, 441, 0, 442,
+ 443, 444, 0, 445, 446, 447, 128, 129, 0, 131,
+ 132, 0, 448, 449, 450, 451, 452, 453, 0, 0,
+ 454, 455, 751, 134, 456, 0, 457, 3591, 459, 460,
+ 138, 0, 0, 0, 461, 462, 463, 464, 465, 0,
+ 466, 467, 752, 0, 468, 469, 470, 471, 472, 473,
+ 0, 0, 474, 475, 0, 0, 0, 0, 0, 0,
+ 0, 0, 477, 478, 479, 480, 754, 481, 149, 150,
+ 482, 0, 483, 0, 484, 485, 486, 487, 488, 489,
+ 0, 490, 491, 492, 493, 0, 0, 494, 495, 496,
+ 497, 498, 0, 499, 500, 501, 0, 502, 503, 504,
+ 0, 505, 506, 507, 508, 158, 509, 510, 511, 512,
+ 160, 0, 3592, 0, 514, 515, 162, 516, 0, 517,
+ 0, 518, 0, 0, 0, 519, 520, 521, 522, 0,
+ 523, 166, 0, 167, 524, 525, 0, 526, 527, 756,
+ 528, 529, 0, 530, 531, 532, 533, 0, 534, 535,
+ 536, 537, 538, 539, 540, 0, 541, 0, 171, 0,
+ 542, 543, 544, 0, 172, 0, 173, 0, 545, 0,
+ 0, 546, 0, 547, 548, 549, 550, 551, 0, 0,
+ 552, 177, 0, 553, 0, 0, 554, 555, 556, 0,
+ 0, 557, 558, 559, 560, 561, 562, 563, 564, 565,
+ 757, 566, 567, 758, 568, 569, 570, 184, 0, 186,
+ 571, 572, 573, 574, 575, 576, 577, 187, 188, 578,
+ 0, 579, 580, 0, 581, 0, 191, 582, 192, 583,
+ 584, 585, 0, 586, 587, 0, 0, 588, 589, 590,
+ 0, 0, 591, 592, 193, 0, 593, 0, 196, 594,
+ 595, 596, 597, 598, 599, 600, 601, 602, 0, 603,
+ 604, 197, 605, 198, 606, 607, 608, 0, 609, 610,
+ 611, 612, 613, 614, 615, 616, 617, 618, 200, 619,
+ 620, 621, 622, 0, 623, 624, 625, 626, 627, 628,
+ 629, 630, 631, 632, 633, 634, 0, 635, 636, 0,
+ 637, 638, 639, 640, 641, 209, 642, 643, 644, 645,
+ 646, 647, 648, 759, 649, 0, 650, 651, 652, 653,
+ 654, 0, 656, 657, 214, 658, 659, 0, 660, 661,
+ 217, 662, 0, 663, 664, 665, 666, 667, 668, 669,
+ 670, 671, 672, 673, 674, 675, 219, 676, 0, 677,
+ 678, 0, 679, 0, 680, 681, 682, 683, 684, 0,
+ 685, 222, 223, 0, 0, 687, 688, 224, 689, 225,
+ 0, 690, 691, 692, 693, 694, 695, 696, 697, 0,
+ 0, 698, 699, 700, 701, 702, 0, 0, 703, 704,
+ 705, 706, 707, 760, 232, 0, 708, 0, 709, 710,
+ 711, 712, 0, 0, 713, 0, 0, 714, 715, 716,
+ 717, 718, 719, 235, 236, 237, 238, 239, 240, 241,
+ 242, 243, 244, 245, 761, 720, 721, 0, 0, 0,
+ 1309, 1310, 1311, 0, 1312, 1313, 1314, 1315, 1316, 1317,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 1303, 0, 0, 0, 0, 0,
+ 0, 1304, 1305, 1306, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 5544, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 0, 0, 0, 1309, 1310, 1311,
+ 0, 1312, 1313, 1314, 1315, 1316, 1317, 785, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 786, 98, 99, 740,
+ 787, 0, 101, 102, 103, 104, 788, 789, 106, 107,
+ 108, 0, 109, 790, 791, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 792, 437, 438, 439, 793, 794, 795, 796, 797, 798,
+ 799, 440, 441, 800, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 801, 448, 449, 450,
+ 451, 452, 453, 802, 803, 454, 455, 804, 134, 456,
+ 805, 457, 458, 459, 460, 138, 806, 139, 807, 461,
+ 462, 463, 464, 465, 142, 466, 467, 808, 809, 468,
+ 469, 470, 471, 472, 473, 810, 145, 474, 475, 811,
+ 812, 813, 814, 146, 815, 816, 817, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 818, 483, 819, 484,
+ 485, 486, 487, 488, 489, 820, 490, 491, 492, 493,
+ 821, 822, 494, 495, 496, 497, 498, 823, 499, 500,
+ 501, 824, 502, 503, 504, 825, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 826, 513, 827, 514,
+ 515, 162, 516, 828, 517, 829, 518, 163, 830, 164,
+ 519, 520, 521, 522, 831, 523, 166, 832, 167, 524,
+ 525, 833, 526, 527, 756, 528, 529, 168, 530, 531,
+ 532, 533, 834, 534, 535, 536, 537, 538, 539, 540,
+ 835, 541, 170, 171, 836, 542, 543, 544, 837, 172,
+ 838, 173, 839, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 840, 841, 552, 177, 178, 553, 179,
+ 842, 554, 555, 556, 843, 844, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 845, 579, 580, 190, 581,
+ 846, 191, 582, 192, 583, 584, 585, 847, 586, 587,
+ 848, 849, 588, 589, 590, 850, 851, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 852, 603, 604, 197, 605, 198, 606,
+ 607, 608, 853, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 854, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 855, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 856, 650, 651, 652, 653, 654, 857, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 858, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 859, 677, 678, 860, 679, 221, 680,
+ 681, 682, 683, 684, 861, 685, 222, 223, 862, 863,
+ 687, 688, 224, 689, 225, 864, 690, 691, 692, 693,
+ 694, 695, 696, 697, 865, 866, 698, 699, 700, 701,
+ 702, 867, 868, 703, 704, 705, 706, 707, 869, 232,
+ 870, 708, 233, 709, 710, 711, 712, 871, 872, 713,
+ 873, 874, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 0, 785, 81, 82, 737, 84, 85, 86,
+ 738, 2159, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 1492, 130,
+ 1493, 1494, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1495, 1496, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 1497,
+ 1498, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 1500, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 2705, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 2706,
+ 0, 542, 543, 544, 1502, 1503, 0, 1504, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1505, 185,
+ 1506, 571, 572, 573, 574, 575, 576, 577, 0, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 1507,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 2707, 591, 592, 2708, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1508,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 2709, 658, 659, 216, 660,
+ 661, 1510, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1511, 1512, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 1513, 2710, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 0, 0,
+ 81, 82, 737, 84, 85, 86, 738, 2711, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 0, 0, 81, 82, 737, 84,
+ 85, 86, 738, 1188, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 0, 0, 81, 82, 737, 84, 85, 86, 738, 5943,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 40, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 1078, 431, 432,
+ 433, 434, 435, 436, 1079, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 1080, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 1081, 162, 516, 0, 517, 0,
+ 1082, 0, 1083, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 1084, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 1085, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 1086, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 1087, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 1088, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 0, 0, 0, 0,
+ 0, 0, 0, 1089, 1090, 81, 82, 737, 84, 85,
+ 86, 738, 0, 739, 89, 0, 0, 92, 93, 94,
+ 95, 96, 97, 0, 98, 99, 740, 0, 0, 101,
+ 102, 103, 104, 0, 0, 106, 107, 108, 0, 109,
+ 0, 0, 741, 742, 0, 0, 0, 743, 744, 0,
+ 0, 0, 0, 745, 0, 0, 0, 0, 0, 0,
+ 0, 0, 746, 0, 747, 0, 748, 749, 35, 428,
+ 0, 0, 37, 0, 0, 0, 0, 0, 0, 0,
+ 40, 0, 0, 0, 0, 0, 0, 0, 0, 429,
+ 1078, 431, 432, 433, 434, 435, 436, 1079, 437, 438,
+ 439, 0, 0, 0, 0, 0, 0, 0, 440, 441,
+ 0, 442, 443, 444, 0, 1112, 446, 447, 128, 129,
+ 0, 131, 132, 0, 448, 449, 450, 451, 452, 453,
+ 0, 0, 454, 455, 751, 134, 456, 0, 457, 458,
+ 459, 460, 138, 0, 0, 0, 461, 462, 463, 464,
+ 465, 0, 466, 467, 752, 0, 468, 469, 470, 471,
+ 472, 473, 0, 0, 474, 475, 0, 0, 0, 0,
+ 0, 0, 0, 0, 477, 478, 479, 480, 754, 481,
+ 149, 150, 482, 0, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 496, 497, 498, 0, 499, 500, 501, 0, 502,
+ 503, 504, 0, 505, 506, 507, 508, 158, 509, 510,
+ 511, 512, 160, 0, 513, 0, 514, 1081, 162, 516,
+ 0, 517, 0, 1113, 0, 1083, 0, 519, 520, 521,
+ 522, 0, 523, 166, 0, 167, 524, 525, 0, 526,
+ 527, 756, 528, 529, 0, 530, 531, 532, 533, 1084,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 0,
+ 171, 0, 542, 543, 544, 0, 172, 0, 173, 0,
+ 545, 0, 0, 546, 0, 547, 548, 549, 550, 1085,
+ 0, 0, 552, 177, 0, 553, 0, 0, 554, 555,
+ 556, 0, 0, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 757, 566, 567, 758, 568, 569, 570, 184,
+ 0, 186, 571, 1086, 573, 574, 575, 576, 577, 187,
+ 188, 578, 0, 579, 580, 0, 581, 0, 191, 582,
+ 192, 583, 584, 585, 0, 586, 587, 0, 0, 588,
+ 589, 590, 0, 0, 591, 592, 193, 0, 593, 0,
+ 196, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 197, 605, 198, 606, 607, 608, 0,
+ 1087, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 200, 619, 620, 621, 622, 0, 623, 624, 625, 1088,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 0, 637, 638, 639, 640, 641, 209, 642, 643,
+ 644, 645, 646, 647, 648, 759, 649, 0, 650, 651,
+ 652, 653, 654, 0, 656, 657, 214, 658, 659, 0,
+ 660, 661, 217, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 219, 676,
+ 0, 677, 678, 0, 679, 0, 680, 681, 682, 683,
+ 684, 0, 685, 222, 223, 0, 0, 687, 688, 224,
+ 689, 225, 0, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 0, 698, 699, 700, 701, 702, 0, 0,
+ 703, 704, 705, 706, 707, 760, 232, 0, 708, 0,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 761, 720, 721, 0,
+ 0, 0, 0, 0, 0, 0, 1089, 1090, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 40, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 1602, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 1083, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 1084, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 0, 0, 0, 0, 0, 0, 0, 1089,
+ 1090, 81, 82, 737, 84, 85, 86, 738, 0, 739,
+ 89, 0, 0, 92, 93, 94, 95, 96, 97, 0,
+ 98, 99, 740, 0, 0, 101, 102, 103, 104, 0,
+ 0, 106, 107, 108, 0, 109, 0, 0, 741, 742,
+ 0, 0, 0, 743, 744, 0, 0, 0, 0, 745,
+ 0, 0, 0, 0, 0, 0, 0, 0, 746, 0,
+ 747, 0, 748, 749, 35, 428, 0, 0, 37, 0,
+ 0, 0, 0, 0, 0, 0, 40, 0, 0, 0,
+ 0, 0, 0, 0, 0, 429, 430, 431, 432, 433,
+ 434, 435, 436, 1607, 437, 438, 439, 0, 0, 0,
+ 0, 0, 0, 0, 440, 441, 0, 442, 443, 444,
+ 0, 445, 446, 447, 128, 129, 0, 131, 132, 0,
+ 448, 449, 450, 451, 452, 453, 0, 0, 454, 455,
+ 751, 134, 456, 0, 457, 458, 459, 460, 138, 0,
+ 0, 0, 461, 462, 463, 464, 465, 0, 466, 467,
+ 752, 0, 468, 469, 470, 471, 472, 473, 0, 0,
+ 474, 475, 0, 0, 0, 0, 0, 0, 0, 0,
+ 477, 478, 479, 480, 754, 481, 149, 150, 482, 0,
+ 483, 0, 484, 485, 486, 487, 488, 489, 0, 490,
+ 491, 492, 493, 0, 0, 494, 495, 496, 497, 498,
+ 0, 499, 500, 501, 0, 502, 503, 504, 0, 505,
+ 506, 507, 508, 158, 509, 510, 511, 512, 160, 0,
+ 513, 0, 514, 515, 162, 516, 0, 517, 0, 518,
+ 0, 1083, 0, 519, 520, 521, 522, 0, 523, 166,
+ 0, 167, 524, 525, 0, 526, 527, 756, 528, 529,
+ 0, 530, 531, 532, 533, 1084, 534, 535, 536, 537,
+ 538, 539, 540, 0, 541, 0, 171, 0, 542, 543,
+ 544, 0, 172, 0, 173, 0, 545, 0, 0, 546,
+ 0, 547, 548, 549, 550, 551, 0, 0, 552, 177,
+ 0, 553, 0, 0, 554, 555, 556, 0, 0, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 757, 566,
+ 567, 758, 568, 569, 570, 184, 0, 186, 571, 572,
+ 573, 574, 575, 576, 577, 187, 188, 578, 0, 579,
+ 580, 0, 581, 0, 191, 582, 192, 583, 584, 585,
+ 0, 586, 587, 0, 0, 588, 589, 590, 0, 0,
+ 591, 592, 193, 0, 593, 0, 196, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 0, 603, 604, 197,
+ 605, 198, 606, 607, 608, 0, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 200, 619, 620, 621,
+ 622, 0, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 0, 635, 636, 0, 637, 638,
+ 639, 640, 641, 209, 642, 643, 644, 645, 646, 647,
+ 648, 759, 649, 0, 650, 651, 652, 653, 654, 0,
+ 656, 657, 214, 658, 659, 0, 660, 661, 217, 662,
+ 0, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 219, 676, 0, 677, 678, 0,
+ 679, 0, 680, 681, 682, 683, 684, 0, 685, 222,
+ 223, 0, 0, 687, 688, 224, 689, 225, 0, 690,
+ 691, 692, 693, 694, 695, 696, 697, 0, 0, 698,
+ 699, 700, 701, 702, 0, 0, 703, 704, 705, 706,
+ 707, 760, 232, 0, 708, 0, 709, 710, 711, 712,
+ 0, 0, 713, 0, 0, 714, 715, 716, 717, 718,
+ 719, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 761, 720, 721, 0, 0, 0, 0, 0,
+ 0, 0, 1089, 1090, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 755, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 1784, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 0, 0,
+ 0, 0, 1158, 1785, 81, 82, 737, 84, 85, 86,
+ 738, 1159, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 1160, 455, 1131, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 1161, 0, 1162, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 1163,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 1164, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 1165, 638, 639, 640, 641, 209, 642, 643, 644,
+ 1166, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 1167, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 1168, 223, 0, 0, 1169, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 1135, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 1170, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 38, 39,
+ 0, 0, 0, 0, 40, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 792, 437, 438, 439, 793, 794, 795, 796, 797,
+ 798, 799, 440, 441, 800, 442, 443, 444, 126, 445,
+ 446, 447, 128, 129, 130, 131, 132, 801, 448, 449,
+ 450, 451, 452, 453, 802, 803, 454, 455, 804, 134,
+ 456, 805, 457, 458, 459, 460, 138, 806, 139, 807,
+ 461, 462, 463, 464, 465, 142, 466, 467, 808, 809,
+ 468, 469, 470, 471, 472, 473, 810, 145, 474, 475,
+ 811, 812, 813, 814, 146, 815, 816, 817, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 818, 483, 819,
+ 484, 485, 486, 487, 488, 489, 820, 490, 491, 492,
+ 493, 821, 822, 494, 495, 496, 497, 498, 823, 499,
+ 500, 501, 824, 502, 503, 504, 825, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 826, 513, 827,
+ 514, 515, 162, 516, 828, 517, 829, 518, 163, 830,
+ 164, 519, 520, 521, 522, 831, 523, 166, 832, 167,
+ 524, 525, 833, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 834, 534, 535, 536, 537, 538, 539,
+ 540, 835, 541, 170, 171, 836, 542, 543, 544, 837,
+ 172, 838, 173, 839, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 840, 841, 552, 177, 178, 553,
+ 179, 842, 554, 555, 556, 843, 844, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 185, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 845, 579, 580, 190,
+ 581, 846, 191, 582, 192, 583, 584, 585, 847, 586,
+ 587, 848, 849, 588, 589, 590, 850, 851, 591, 592,
+ 193, 194, 593, 195, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 852, 603, 604, 197, 605, 198,
+ 606, 607, 608, 853, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 854,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 855, 635, 636, 207, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 856, 650, 651, 652, 653, 654, 857, 656, 657,
+ 214, 658, 659, 216, 660, 661, 217, 662, 858, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 859, 677, 678, 860, 679, 221,
+ 680, 681, 682, 683, 684, 861, 685, 222, 223, 862,
+ 863, 687, 688, 224, 689, 225, 864, 690, 691, 692,
+ 693, 694, 695, 696, 697, 865, 866, 698, 699, 700,
+ 701, 702, 867, 868, 703, 704, 705, 706, 707, 869,
+ 232, 870, 708, 233, 709, 710, 711, 712, 871, 872,
+ 713, 873, 874, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 792, 437, 438, 439,
+ 793, 794, 795, 796, 797, 798, 799, 440, 441, 800,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 801, 448, 449, 450, 451, 452, 453, 802,
+ 803, 454, 455, 804, 134, 456, 805, 457, 458, 459,
+ 460, 138, 806, 139, 807, 461, 462, 463, 464, 465,
+ 142, 466, 467, 808, 809, 468, 469, 470, 471, 472,
+ 473, 810, 145, 474, 475, 811, 812, 813, 814, 146,
+ 815, 816, 817, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 818, 483, 819, 484, 485, 486, 487, 488,
+ 489, 820, 490, 491, 492, 493, 821, 822, 494, 495,
+ 496, 497, 498, 823, 499, 500, 501, 824, 502, 503,
+ 504, 825, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 826, 513, 827, 514, 515, 162, 516, 828,
+ 517, 829, 518, 163, 830, 164, 519, 520, 521, 522,
+ 831, 523, 166, 832, 167, 524, 525, 833, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 834, 534,
+ 535, 536, 537, 538, 539, 540, 835, 541, 170, 171,
+ 836, 542, 543, 544, 837, 172, 838, 173, 839, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 840,
+ 841, 552, 177, 178, 553, 179, 842, 554, 555, 556,
+ 843, 844, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 845, 579, 580, 190, 581, 846, 191, 582, 192,
+ 583, 584, 585, 847, 586, 587, 848, 849, 588, 589,
+ 590, 850, 851, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 852,
+ 603, 604, 197, 605, 198, 606, 607, 608, 853, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 854, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 855, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 856, 650, 651, 652,
+ 653, 654, 857, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 858, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 859,
+ 677, 678, 860, 679, 221, 680, 681, 682, 683, 684,
+ 861, 685, 222, 223, 862, 863, 687, 688, 224, 689,
+ 225, 864, 690, 691, 692, 693, 694, 695, 696, 697,
+ 865, 866, 698, 699, 700, 701, 702, 867, 868, 703,
+ 704, 705, 706, 707, 869, 232, 870, 708, 233, 709,
+ 710, 711, 712, 871, 872, 713, 873, 874, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 3662, 434, 435,
+ 436, 792, 437, 438, 439, 793, 794, 795, 796, 797,
+ 798, 799, 440, 441, 800, 442, 443, 444, 126, 445,
+ 446, 447, 128, 129, 130, 131, 132, 801, 448, 449,
+ 450, 451, 452, 453, 802, 803, 454, 455, 804, 134,
+ 456, 805, 457, 458, 459, 460, 138, 806, 139, 807,
+ 461, 462, 463, 464, 465, 142, 466, 467, 808, 809,
+ 468, 469, 470, 471, 472, 473, 810, 145, 474, 475,
+ 811, 812, 813, 814, 146, 815, 816, 817, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 818, 483, 819,
+ 484, 485, 486, 487, 488, 489, 820, 490, 491, 492,
+ 493, 821, 822, 494, 495, 496, 3663, 498, 823, 499,
+ 500, 501, 824, 502, 503, 504, 825, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 826, 513, 827,
+ 514, 515, 162, 516, 828, 517, 829, 518, 163, 830,
+ 164, 519, 520, 521, 522, 831, 523, 166, 832, 167,
+ 524, 525, 833, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 834, 534, 535, 536, 537, 538, 539,
+ 540, 835, 541, 170, 171, 836, 542, 543, 544, 837,
+ 172, 838, 173, 839, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 840, 841, 552, 177, 178, 553,
+ 179, 842, 554, 555, 556, 843, 844, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 185, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 845, 579, 580, 190,
+ 581, 846, 191, 582, 192, 583, 584, 585, 847, 586,
+ 587, 848, 849, 588, 589, 590, 850, 851, 591, 592,
+ 193, 194, 593, 195, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 852, 603, 604, 197, 605, 198,
+ 606, 607, 608, 853, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 854,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 855, 635, 636, 207, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 856, 650, 651, 652, 653, 654, 857, 3664, 657,
+ 214, 658, 659, 216, 660, 661, 217, 662, 858, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 859, 677, 678, 860, 679, 221,
+ 680, 681, 682, 683, 684, 861, 685, 222, 223, 862,
+ 863, 687, 688, 224, 689, 225, 864, 690, 691, 692,
+ 693, 694, 695, 696, 697, 865, 866, 698, 699, 700,
+ 701, 702, 867, 868, 703, 704, 705, 706, 707, 869,
+ 232, 870, 708, 233, 709, 710, 711, 712, 871, 872,
+ 713, 873, 874, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 1680, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 1683, 0, 1684, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 1685, 1686, 1687, 1688,
+ 1689, 1690, 1691, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 1696, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 1699, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 1703, 178, 553, 179, 0, 554, 555, 556,
+ 1704, 1705, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 1708,
+ 578, 0, 579, 580, 190, 581, 0, 1711, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 1714,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 1715, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 1718, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 1720, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 1723, 689,
+ 1724, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 1727, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 1729, 1730, 1731, 1732, 240,
+ 1733, 1734, 1735, 1736, 245, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 128, 129, 130, 131, 132, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 751, 134,
+ 456, 0, 457, 458, 459, 460, 138, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 496, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 0, 513, 0,
+ 514, 515, 162, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 166, 0, 167,
+ 524, 525, 0, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 171, 0, 542, 543, 544, 0,
+ 172, 0, 173, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 177, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 185, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 0, 579, 580, 190,
+ 581, 0, 191, 582, 192, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 193, 194, 593, 195, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 197, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 214, 658, 659, 216, 660, 661, 217, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 222, 223, 0,
+ 0, 687, 688, 224, 689, 225, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 760,
+ 232, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 1485, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 190, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 128, 129, 130, 131, 132, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 751, 134,
+ 456, 0, 457, 458, 459, 460, 138, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 496, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 0, 513, 0,
+ 514, 515, 162, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 166, 0, 167,
+ 524, 525, 0, 526, 527, 756, 528, 1536, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 171, 0, 542, 543, 544, 0,
+ 172, 0, 173, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 177, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 185, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 0, 579, 580, 190,
+ 581, 0, 191, 582, 192, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 193, 194, 593, 195, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 197, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 214, 658, 659, 216, 660, 661, 217, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 222, 223, 0,
+ 0, 687, 688, 224, 689, 225, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 760,
+ 232, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 1550, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 190, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 128, 129, 130, 131, 132, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 751, 134,
+ 456, 0, 457, 458, 459, 460, 138, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 149, 150, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 496, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 0, 513, 0,
+ 514, 515, 162, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 166, 0, 167,
+ 524, 525, 0, 526, 527, 756, 528, 1554, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 171, 0, 542, 543, 544, 0,
+ 172, 0, 173, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 177, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 184, 185, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 0, 579, 580, 190,
+ 581, 0, 191, 582, 192, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 193, 194, 593, 195, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 197, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 214, 658, 659, 216, 660, 661, 217, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 222, 223, 0,
+ 0, 687, 688, 224, 689, 225, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 760,
+ 232, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 1492, 130,
+ 1493, 1494, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1495, 1496, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 1497,
+ 1498, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 1500, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 2705, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 2706,
+ 0, 542, 543, 544, 1502, 1503, 0, 1504, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1505, 185,
+ 1506, 571, 572, 573, 574, 575, 576, 577, 0, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 1507,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 2708, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1508,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 2709, 658, 659, 216, 660,
+ 661, 1510, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1511, 1512, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 1513, 2710, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 0, 1492, 130, 1493, 1494, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 1495, 1496,
+ 456, 0, 457, 458, 459, 460, 0, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 1497, 1498, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 1499, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 0, 509, 510, 511, 512, 0, 0, 513, 0,
+ 514, 515, 1500, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 0, 0, 0,
+ 524, 525, 0, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 0, 0, 542, 543, 544, 1502,
+ 1503, 0, 1504, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 0, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 1505, 185, 1506, 571, 572, 573, 574,
+ 575, 576, 577, 0, 0, 578, 0, 579, 580, 190,
+ 581, 2804, 0, 582, 1507, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 0, 194, 593, 195, 0, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 0, 605, 0,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 1508, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 0, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 2709, 658, 659, 216, 660, 661, 1510, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 0, 676, 0, 677, 678, 4591, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 1511, 1512, 0,
+ 0, 687, 688, 0, 689, 0, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 0,
+ 1513, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 1492, 130,
+ 1493, 1494, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1495, 1496, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 1497,
+ 1498, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 1500, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 0,
+ 0, 542, 543, 544, 1502, 1503, 0, 1504, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1505, 185,
+ 1506, 571, 572, 573, 574, 575, 576, 577, 2875, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 1507,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 0, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1508,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 1509, 658, 659, 216, 660,
+ 661, 1510, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1511, 1512, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 1513, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 0, 1492, 130, 1493, 1494, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 1495, 1496,
+ 456, 0, 457, 458, 459, 460, 0, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 1497, 1498, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 1499, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 0, 509, 510, 511, 512, 0, 0, 513, 0,
+ 514, 515, 1500, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 0, 0, 0,
+ 524, 525, 0, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 0, 0, 542, 543, 544, 1502,
+ 1503, 0, 1504, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 0, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 1505, 185, 1506, 571, 572, 573, 574,
+ 575, 576, 577, 4395, 0, 578, 0, 579, 580, 190,
+ 581, 0, 0, 582, 1507, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 0, 194, 593, 195, 0, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 0, 605, 0,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 1508, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 0, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 1509, 658, 659, 216, 660, 661, 1510, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 0, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 1511, 1512, 0,
+ 0, 687, 688, 0, 689, 0, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 0,
+ 1513, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 1492, 130,
+ 1493, 1494, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1495, 1496, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 1497,
+ 1498, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 1500, 516, 6012,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 0,
+ 0, 542, 543, 544, 1502, 1503, 0, 1504, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1505, 185,
+ 1506, 571, 572, 573, 574, 575, 576, 577, 0, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 1507,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 0, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1508,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 1509, 658, 659, 216, 660,
+ 661, 1510, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1511, 1512, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 1513, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 0, 1492, 130, 1493, 1494, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 1495, 1496,
+ 456, 0, 457, 458, 459, 460, 0, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 1497, 1498, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 1499, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 0, 509, 510, 511, 512, 0, 0, 513, 0,
+ 514, 515, 1500, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 0, 0, 0,
+ 524, 525, 0, 526, 527, 756, 528, 1501, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 0, 0, 542, 543, 544, 1502,
+ 1503, 0, 1504, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 0, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 1505, 185, 1506, 571, 572, 573, 574,
+ 575, 576, 577, 0, 0, 578, 0, 579, 580, 190,
+ 581, 0, 0, 582, 1507, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 0, 194, 593, 195, 0, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 0, 605, 0,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 1508, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 0, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 1509, 658, 659, 216, 660, 661, 1510, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 0, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 1511, 1512, 0,
+ 0, 687, 688, 0, 689, 0, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 0,
+ 1513, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 1492, 130,
+ 1493, 1494, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1495, 1496, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 1497,
+ 1498, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 1500, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 1562, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 0,
+ 0, 542, 543, 544, 1502, 1503, 0, 1504, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1505, 185,
+ 1506, 571, 572, 573, 574, 575, 576, 577, 0, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 1507,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 0, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1508,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 1509, 658, 659, 216, 660,
+ 661, 1510, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1511, 1512, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 1513, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 0, 1492, 130, 1493, 1494, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 1495, 1496,
+ 456, 0, 457, 458, 459, 460, 0, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 1497, 1498, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 1499, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 0, 509, 510, 511, 512, 0, 0, 513, 0,
+ 514, 515, 1500, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 0, 0, 0,
+ 524, 525, 0, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 0, 0, 542, 543, 544, 1502,
+ 1503, 0, 1504, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 0, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 1505, 185, 1506, 571, 572, 573, 574,
+ 575, 576, 577, 0, 0, 578, 0, 579, 580, 190,
+ 581, 0, 0, 582, 1507, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 0, 194, 593, 195, 0, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 0, 605, 0,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 1508, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 0, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 1509, 658, 659, 216, 660, 661, 1510, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 0, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 1511, 1512, 0,
+ 0, 687, 688, 0, 689, 0, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 0,
+ 1513, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 1492, 130,
+ 1493, 1494, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1495, 1496, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 1497,
+ 1498, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 1499, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 1500, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 0,
+ 0, 542, 543, 544, 1502, 1503, 0, 1504, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 1505, 185,
+ 1506, 571, 572, 573, 574, 575, 576, 577, 0, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 1507,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 0, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 1508,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 2709, 658, 659, 216, 660,
+ 661, 1510, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 1511, 1512, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 1513, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 785, 81,
+ 82, 737, 84, 85, 86, 738, 0, 739, 89, 0,
+ 0, 92, 93, 94, 95, 96, 97, 786, 98, 99,
+ 740, 787, 0, 101, 102, 103, 104, 788, 789, 106,
+ 107, 108, 0, 109, 790, 791, 741, 742, 0, 0,
+ 0, 743, 744, 0, 0, 0, 0, 745, 0, 0,
+ 0, 0, 0, 0, 0, 0, 746, 0, 747, 0,
+ 748, 749, 35, 0, 0, 0, 37, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 0, 1492, 130, 1493, 1494, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 1495, 1496,
+ 456, 0, 457, 458, 459, 460, 0, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 752, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 754, 481, 1497, 1498, 482, 0, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 1499, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 0, 509, 510, 511, 512, 0, 0, 513, 0,
+ 514, 515, 1500, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 0, 0, 0,
+ 524, 525, 0, 526, 527, 756, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 0, 0, 542, 543, 544, 1502,
+ 1503, 0, 1504, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 0, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 757, 566, 567, 758,
+ 568, 569, 570, 1505, 185, 1506, 571, 572, 573, 574,
+ 575, 576, 577, 0, 0, 578, 0, 579, 580, 190,
+ 581, 0, 0, 582, 1507, 583, 584, 585, 0, 586,
+ 587, 0, 0, 588, 589, 590, 0, 0, 591, 592,
+ 0, 194, 593, 195, 0, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 0, 605, 0,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 1508, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 0, 642, 643, 644, 645, 646, 647, 648, 759,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 0, 658, 659, 216, 660, 661, 1510, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 0, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 1511, 1512, 0,
+ 0, 687, 688, 0, 689, 0, 0, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 0,
+ 1513, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 761, 720, 721, 785, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 786, 98, 99, 740, 787, 0, 101, 102,
+ 103, 104, 788, 789, 106, 107, 108, 0, 109, 790,
+ 791, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 0, 0, 130,
+ 0, 0, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 0, 0, 456, 0, 457, 458, 459,
+ 460, 0, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 0,
+ 0, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 0, 509, 510, 511,
+ 512, 0, 0, 513, 0, 514, 515, 0, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 0, 0, 0, 524, 525, 0, 526, 527,
+ 756, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 0,
+ 0, 542, 543, 544, 0, 0, 0, 0, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 0, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 0, 185,
+ 0, 571, 572, 573, 574, 575, 576, 577, 0, 0,
+ 578, 0, 579, 580, 190, 581, 0, 0, 582, 0,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 0, 194, 593, 195, 0,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 0, 605, 0, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 0,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 0, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 0, 658, 659, 216, 660,
+ 661, 0, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 0, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 0, 0, 0, 0, 687, 688, 0, 689,
+ 0, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 0, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 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, 429, 430, 431, 432, 433, 434, 435, 436,
+ 792, 437, 438, 439, 793, 794, 795, 796, 797, 798,
+ 799, 440, 441, 800, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 801, 448, 449, 450,
+ 451, 452, 453, 802, 803, 454, 455, 0, 134, 456,
+ 805, 457, 458, 459, 460, 138, 806, 139, 807, 461,
+ 462, 463, 464, 465, 142, 466, 467, 808, 809, 468,
+ 469, 470, 471, 472, 473, 810, 145, 474, 475, 0,
+ 812, 813, 814, 146, 815, 816, 817, 477, 478, 479,
+ 480, 0, 481, 149, 150, 482, 818, 483, 819, 484,
+ 485, 486, 487, 488, 489, 820, 490, 491, 492, 493,
+ 821, 822, 494, 495, 496, 497, 498, 823, 499, 500,
+ 501, 824, 502, 503, 504, 825, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 826, 513, 827, 514,
+ 515, 162, 516, 828, 517, 829, 518, 163, 830, 164,
+ 519, 520, 521, 522, 831, 523, 166, 832, 167, 524,
+ 525, 833, 526, 527, 0, 528, 529, 168, 530, 531,
+ 532, 533, 834, 534, 535, 536, 537, 538, 539, 540,
+ 835, 541, 170, 171, 0, 542, 543, 544, 0, 172,
+ 838, 173, 839, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 840, 841, 552, 177, 178, 553, 179,
+ 842, 554, 555, 556, 843, 844, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 0, 566, 567, 0, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 845, 579, 580, 190, 581,
+ 846, 191, 582, 192, 583, 584, 585, 847, 586, 587,
+ 848, 849, 588, 589, 590, 850, 851, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 852, 603, 604, 197, 605, 198, 606,
+ 607, 608, 853, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 854, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 855, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 0, 649,
+ 856, 650, 651, 652, 653, 654, 857, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 858, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 859, 677, 678, 860, 679, 221, 680,
+ 681, 682, 683, 684, 861, 685, 222, 223, 0, 863,
+ 687, 688, 224, 689, 225, 864, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 866, 698, 699, 700, 701,
+ 702, 867, 868, 703, 704, 705, 706, 707, 0, 232,
+ 870, 708, 233, 709, 710, 711, 712, 871, 872, 713,
+ 873, 874, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 0,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 2745, 457, 458, 459, 460, 138,
+ 0, 0, 2825, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 2746, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 2826, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 2748,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 2827, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 2749, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 2750,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 2745, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 2746, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 2826, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 2748, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 3873, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 2749, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 2750, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 1146,
+ 435, 436, 1098, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 1099, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 1147, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 1100, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 1101, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 1098, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 1099, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 3552, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 1100, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 1101, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 2745, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 2746, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 2826, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 2748, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 2749, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 2750, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 750, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 753, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 755, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 1098, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 1099, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 1100, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 1101, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 1000, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 1001, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 1002, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 0, 39, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 1251, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 2408, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 2409, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 2410, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 2411, 518, 0, 0, 0,
+ 2412, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 2413, 2414, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 2415, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 2416, 641,
+ 209, 642, 643, 644, 2417, 646, 647, 648, 759, 649,
+ 0, 2418, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 2419, 679, 0, 2420,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 2421, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 1099,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 1100, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 1101, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 2397, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 3411, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 3412, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 2683, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 3413, 679, 0, 680, 3414, 682,
+ 3415, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 3416, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 777, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 755, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 428, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 946, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 1341, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 1342, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 1181,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 1476, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 3643, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 3644, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 3656, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 3657, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 428, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 428, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 1006, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 428, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 1060, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 428, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 1116, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 1181, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 1298, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 1299, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 1787, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 1974, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 1181, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 2031, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 2032, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 2261, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 2397,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 2683, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 39, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 40, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 4771, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 4785,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 1128, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 1130, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 1131,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 1132, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 1133, 223,
+ 0, 0, 1134, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 1135, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 1175, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 1131, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 0, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 1176, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 1177, 223, 0, 0, 1178, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 1135, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 1194, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 1323, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 1333, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 1336, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 1352, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 1420, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 1426, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 1442, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 1445, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 1447, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 1490, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 1556, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 1558, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 1568, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 1571, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 1574, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 1798, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 1160,
+ 455, 1131, 134, 1799, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 0, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 1164, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 1165,
+ 638, 639, 640, 641, 209, 642, 643, 644, 1166, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 1791,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 1168, 223, 0, 0, 1169, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 1135, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 1170, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 1922, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 1923,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 1130, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 1131,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 1135, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 2208, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 2246, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 2248, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 2321, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 2323, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 2325, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 2449, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 2648, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 0, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 3106, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 3110, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 3192, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 3563, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 3632, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 751, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 752, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 3646, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 570,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 760, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 751,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 752,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 3648, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 760, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 3793, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 751, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 752, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 3831, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 570, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 760, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 751, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 752, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 5064, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 570, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 760, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 1160, 455, 1131, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 0, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 1164,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 1165, 638, 639, 640, 641, 209, 642,
+ 643, 644, 1166, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 1791, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 1168, 223, 0, 0, 1169, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 1135, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 1170, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 1131,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 570, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 1135, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 1160, 455, 1131, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 0, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 1164, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 1165, 638, 639, 640, 641, 209, 642, 643, 644,
+ 1166, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 1791, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 2732, 681, 682, 683, 684,
+ 0, 685, 1168, 223, 0, 0, 1169, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 1135, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 1170, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 81, 82,
+ 737, 84, 85, 86, 738, 0, 739, 89, 0, 0,
+ 92, 93, 94, 95, 96, 97, 0, 98, 99, 740,
+ 0, 0, 101, 102, 103, 104, 0, 0, 106, 107,
+ 108, 0, 109, 0, 0, 741, 742, 0, 0, 0,
+ 743, 744, 0, 0, 0, 0, 745, 0, 0, 0,
+ 0, 0, 0, 0, 0, 746, 0, 747, 0, 748,
+ 749, 35, 0, 0, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 0, 445, 446,
+ 447, 128, 129, 0, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 1160, 455, 1131, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 0, 0, 461,
+ 462, 463, 464, 465, 0, 466, 467, 0, 0, 468,
+ 469, 470, 471, 472, 473, 0, 0, 474, 475, 0,
+ 0, 0, 0, 0, 0, 0, 0, 477, 478, 479,
+ 480, 754, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 0, 0, 0,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 756, 528, 529, 0, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 0, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 0, 0, 546, 0, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 0, 553, 0,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 757, 566, 567, 758, 568,
+ 569, 1164, 184, 0, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 0, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 0, 593, 0, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 0, 1165, 638, 639, 640, 641,
+ 209, 642, 643, 644, 2808, 646, 647, 648, 759, 649,
+ 0, 650, 651, 652, 653, 2809, 0, 656, 657, 214,
+ 658, 659, 0, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 0, 680,
+ 681, 682, 683, 684, 0, 685, 1168, 223, 0, 0,
+ 2810, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 1135, 232,
+ 0, 708, 0, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 1170, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 761,
+ 720, 721, 81, 82, 737, 84, 85, 86, 738, 0,
+ 739, 89, 0, 0, 92, 93, 94, 95, 96, 97,
+ 0, 98, 99, 740, 0, 0, 101, 102, 103, 104,
+ 0, 0, 106, 107, 108, 0, 109, 0, 0, 741,
+ 742, 0, 0, 0, 743, 744, 0, 0, 0, 0,
+ 745, 0, 0, 0, 0, 0, 0, 0, 0, 746,
+ 0, 747, 0, 748, 749, 35, 0, 0, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 0, 445, 446, 447, 128, 129, 0, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 1160,
+ 455, 1131, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 0, 0, 461, 462, 463, 464, 465, 0, 466,
+ 467, 0, 0, 468, 469, 470, 471, 472, 473, 0,
+ 0, 474, 475, 0, 0, 0, 0, 0, 0, 0,
+ 0, 477, 478, 479, 480, 754, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 0, 0, 0, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 756, 528,
+ 529, 0, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 0, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 0, 0,
+ 546, 0, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 0, 553, 0, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 757,
+ 566, 567, 758, 568, 569, 1164, 184, 0, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 0, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 0, 593, 0, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 0, 1165,
+ 638, 639, 640, 641, 209, 642, 643, 644, 2885, 646,
+ 647, 648, 759, 649, 0, 650, 651, 652, 653, 2809,
+ 0, 656, 657, 214, 658, 659, 0, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 0, 680, 681, 682, 683, 684, 0, 685,
+ 1168, 223, 0, 0, 2810, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 1135, 232, 0, 708, 0, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 1170, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 761, 720, 721, 81, 82, 737, 84,
+ 85, 86, 738, 0, 739, 89, 0, 0, 92, 93,
+ 94, 95, 96, 97, 0, 98, 99, 740, 0, 0,
+ 101, 102, 103, 104, 0, 0, 106, 107, 108, 0,
+ 109, 0, 0, 741, 742, 0, 0, 0, 743, 744,
+ 0, 0, 0, 0, 745, 0, 0, 0, 0, 0,
+ 0, 0, 0, 746, 0, 747, 0, 748, 749, 35,
+ 0, 0, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 0, 445, 446, 447, 128,
+ 129, 0, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 1160, 455, 1131, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 0, 0, 461, 462, 463,
+ 464, 465, 0, 466, 467, 0, 0, 468, 469, 470,
+ 471, 472, 473, 0, 0, 474, 475, 0, 0, 0,
+ 0, 0, 0, 0, 0, 477, 478, 479, 480, 754,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 0, 0, 0, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 756, 528, 529, 0, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 0, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 0, 0, 546, 0, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 0, 553, 0, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 757, 566, 567, 758, 568, 569, 1164,
+ 184, 0, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 0, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 0, 593,
+ 0, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 0, 1165, 638, 639, 640, 641, 209, 642,
+ 643, 644, 2902, 646, 647, 648, 759, 649, 0, 650,
+ 651, 652, 653, 2809, 0, 656, 657, 214, 658, 659,
+ 0, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 0, 680, 681, 682,
+ 683, 684, 0, 685, 1168, 223, 0, 0, 2810, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 1135, 232, 0, 708,
+ 0, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 1170, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 761, 720, 721,
+ 81, 82, 737, 84, 85, 86, 738, 0, 739, 89,
+ 0, 0, 92, 93, 94, 95, 96, 97, 0, 98,
+ 99, 740, 0, 0, 101, 102, 103, 104, 0, 0,
+ 106, 107, 108, 0, 109, 0, 0, 741, 742, 0,
+ 0, 0, 743, 744, 0, 0, 0, 0, 745, 0,
+ 0, 0, 0, 0, 0, 0, 0, 746, 0, 747,
+ 0, 748, 749, 35, 0, 0, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 0,
+ 445, 446, 447, 128, 129, 0, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 1160, 455, 1131,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 0,
+ 0, 461, 462, 463, 464, 465, 0, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 0, 474,
+ 475, 0, 0, 0, 0, 0, 0, 0, 0, 477,
+ 478, 479, 480, 754, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 0,
+ 0, 0, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 756, 528, 529, 0,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 0, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 0, 0, 546, 0,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 0,
+ 553, 0, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 757, 566, 567,
+ 758, 568, 569, 1164, 184, 0, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 0, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 0, 593, 0, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 0, 1165, 638, 639,
+ 640, 641, 209, 642, 643, 644, 1166, 646, 647, 648,
+ 759, 649, 0, 650, 651, 652, 653, 2809, 0, 656,
+ 657, 214, 658, 659, 0, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 0, 680, 681, 682, 683, 684, 0, 685, 1168, 223,
+ 0, 0, 2810, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 1135, 232, 0, 708, 0, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 1170,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 761, 720, 721, 81, 82, 737, 84, 85, 86,
+ 738, 0, 739, 89, 0, 0, 92, 93, 94, 95,
+ 96, 97, 0, 98, 99, 740, 0, 0, 101, 102,
+ 103, 104, 0, 0, 106, 107, 108, 0, 109, 0,
+ 0, 741, 742, 0, 0, 0, 743, 744, 0, 0,
+ 0, 0, 745, 0, 0, 0, 0, 0, 0, 0,
+ 0, 746, 0, 747, 0, 748, 749, 35, 0, 0,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 0, 445, 446, 447, 128, 129, 0,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 751, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 0, 0, 461, 462, 463, 464, 465,
+ 0, 466, 467, 752, 0, 468, 469, 470, 471, 472,
+ 473, 0, 0, 474, 475, 0, 0, 0, 0, 0,
+ 0, 0, 0, 477, 478, 479, 480, 754, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 0, 0, 0, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 0, 525, 0, 526, 527,
+ 756, 528, 529, 0, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 0, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 0, 0, 546, 0, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 0, 553, 0, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 757, 566, 567, 758, 568, 569, 570, 184, 0,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 0, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 0, 593, 0, 196,
+ 594, 595, 596, 597, 598, 599, 0, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 0, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 0, 637, 638, 639, 640, 641, 209, 0, 643, 644,
+ 645, 646, 647, 648, 759, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 0, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 0, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 760, 232, 0, 708, 0, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 761, 720, 721, 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, -2832, 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, 423, 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, 126, 0, 0,
+ 0, 128, 129, 130, 131, 132, 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, 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, 156, 0, 0, 0, 0, 0, 0, 0,
+ 158, 0, 0, 0, 0, 160, 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, 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, -2833, 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, 1246, 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, 126, 0,
+ 0, 0, 128, 129, 130, 131, 132, 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, 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, 156, 0, 0, 0, 0, 0, 0,
+ 0, 158, 0, 0, 0, 0, 160, 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, 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, 126,
+ 0, 0, 0, 128, 129, 130, 131, 132, 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, 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, 156, 0, 0, 0, 0, 0,
+ 0, 0, 158, 0, 0, 0, 0, 160, 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, 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,
+ 126, 0, 0, 0, 128, 129, 130, 131, 132, 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, 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, 156, 0, 0, 0, 0,
+ 0, 0, 0, 158, 0, 0, 0, 0, 160, 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, 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, 0, 106, 107, 108, 0, 109, 0, 0, 0,
+ 0, 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, 126, 0, 0, 0, 128, 129, 130, 131, 132,
+ 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, 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, 0, 0, 0,
+ 0, 0, 0, 0, 158, 0, 0, 0, 0, 160,
+ 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, 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, 0, 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, 428, 0, 0, 37, 0, 38,
+ 39, 0, 0, 0, 0, 40, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 129, 130, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 0,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 139,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 0, 0, 0, 146, 0, 0, 0, 477,
+ 478, 479, 480, 0, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 2373, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 163,
+ 0, 164, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 0, 528, 529, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 178,
+ 553, 179, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 0, 566, 567,
+ 0, 568, 569, 570, 184, 185, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 190, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 2374, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 0, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 216, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 2375, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 0, 232, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 35, 720, 721, 0, 37, 0, 0, 0, 0,
+ 0, 1880, 1881, 5787, 0, 0, 0, 0, 0, 0,
+ 5788, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 123, 124, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 0, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 0, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 0, 477, 478, 479,
+ 480, 0, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 0, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 0, 566, 567, 0, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 190, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 0, 649,
+ 212, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 220, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 231, 232,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 234, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 0,
+ 720, 721, 35, 428, 246, 0, 37, 0, 38, 39,
+ 0, 0, 0, 0, 40, 0, 0, 0, 247, 0,
+ 0, 0, 0, 429, 430, 431, 432, 433, 434, 435,
+ 436, 0, 437, 438, 439, 0, 0, 0, 0, 0,
+ 0, 0, 440, 441, 0, 442, 443, 444, 126, 445,
+ 446, 447, 128, 129, 130, 131, 132, 0, 448, 449,
+ 450, 451, 452, 453, 0, 0, 454, 455, 0, 134,
+ 456, 0, 457, 458, 459, 460, 138, 0, 139, 0,
+ 461, 462, 463, 464, 465, 142, 466, 467, 0, 0,
+ 468, 469, 470, 471, 472, 473, 0, 145, 474, 475,
+ 0, 0, 0, 0, 146, 0, 0, 0, 477, 478,
+ 479, 480, 0, 481, 149, 150, 482, 2581, 483, 0,
+ 484, 485, 486, 487, 488, 489, 0, 490, 491, 492,
+ 493, 0, 0, 494, 495, 496, 497, 498, 0, 499,
+ 500, 501, 0, 502, 503, 504, 0, 505, 506, 507,
+ 508, 158, 509, 510, 511, 512, 160, 2373, 513, 0,
+ 514, 515, 162, 516, 0, 517, 0, 518, 163, 0,
+ 164, 519, 520, 521, 522, 0, 523, 166, 0, 167,
+ 524, 525, 0, 526, 527, 0, 528, 529, 168, 530,
+ 531, 532, 533, 0, 534, 535, 536, 537, 538, 539,
+ 540, 0, 541, 170, 171, 0, 542, 543, 544, 0,
+ 172, 0, 173, 0, 545, 174, 175, 546, 176, 547,
+ 548, 549, 550, 551, 0, 0, 552, 177, 178, 553,
+ 179, 0, 554, 555, 556, 0, 0, 557, 558, 559,
+ 560, 561, 562, 563, 564, 565, 0, 566, 567, 0,
+ 568, 569, 570, 184, 185, 186, 571, 572, 573, 574,
+ 575, 576, 577, 187, 188, 578, 0, 579, 580, 190,
+ 581, 0, 191, 582, 192, 583, 584, 585, 0, 586,
+ 587, 2374, 0, 588, 589, 590, 0, 0, 591, 592,
+ 193, 194, 593, 195, 196, 594, 595, 596, 597, 598,
+ 599, 600, 601, 602, 0, 603, 604, 197, 605, 198,
+ 606, 607, 608, 0, 609, 610, 611, 612, 613, 614,
+ 615, 616, 617, 618, 200, 619, 620, 621, 622, 0,
+ 623, 624, 625, 626, 627, 628, 629, 630, 631, 632,
+ 633, 634, 0, 635, 636, 207, 637, 638, 639, 640,
+ 641, 209, 642, 643, 644, 645, 646, 647, 648, 0,
+ 649, 0, 650, 651, 652, 653, 654, 0, 656, 657,
+ 214, 658, 659, 216, 660, 661, 217, 662, 0, 663,
+ 664, 665, 666, 667, 668, 669, 670, 671, 672, 673,
+ 674, 675, 219, 676, 0, 677, 678, 0, 679, 221,
+ 680, 681, 682, 683, 684, 0, 685, 222, 223, 0,
+ 0, 687, 688, 224, 689, 225, 2375, 690, 691, 692,
+ 693, 694, 695, 696, 697, 0, 0, 698, 699, 700,
+ 701, 702, 0, 0, 703, 704, 705, 706, 707, 0,
+ 232, 0, 708, 233, 709, 710, 711, 712, 0, 0,
+ 713, 0, 0, 714, 715, 716, 717, 718, 719, 235,
+ 236, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 0, 720, 721, 0, 0, 0, 0, 0, 35, 428,
+ 1880, 1881, 37, 0, 38, 39, 0, 0, 0, 0,
+ 40, 0, 0, 0, 0, 0, 0, 0, 0, 429,
+ 430, 431, 432, 433, 434, 435, 436, 0, 437, 438,
+ 439, 0, 0, 0, 0, 0, 0, 0, 440, 441,
+ 0, 442, 443, 444, 126, 445, 446, 447, 128, 129,
+ 130, 131, 132, 0, 448, 449, 450, 451, 452, 453,
+ 0, 0, 454, 455, 0, 134, 456, 0, 457, 458,
+ 459, 460, 138, 0, 139, 0, 461, 462, 463, 464,
+ 465, 142, 466, 467, 0, 0, 468, 469, 470, 471,
+ 472, 473, 0, 145, 474, 475, 0, 0, 0, 0,
+ 146, 0, 0, 0, 477, 478, 479, 480, 0, 481,
+ 149, 150, 482, 2586, 483, 0, 484, 485, 486, 487,
+ 488, 489, 0, 490, 491, 492, 493, 0, 0, 494,
+ 495, 496, 497, 498, 0, 499, 500, 501, 0, 502,
+ 503, 504, 0, 505, 506, 507, 508, 158, 509, 510,
+ 511, 512, 160, 2373, 513, 0, 514, 515, 162, 516,
+ 0, 517, 0, 518, 163, 0, 164, 519, 520, 521,
+ 522, 0, 523, 166, 0, 167, 524, 525, 0, 526,
+ 527, 0, 528, 529, 168, 530, 531, 532, 533, 0,
+ 534, 535, 536, 537, 538, 539, 540, 0, 541, 170,
+ 171, 0, 542, 543, 544, 0, 172, 0, 173, 0,
+ 545, 174, 175, 546, 176, 547, 548, 549, 550, 551,
+ 0, 0, 552, 177, 178, 553, 179, 0, 554, 555,
+ 556, 0, 0, 557, 558, 559, 560, 561, 562, 563,
+ 564, 565, 0, 566, 567, 0, 568, 569, 570, 184,
+ 185, 186, 571, 572, 573, 574, 575, 576, 577, 187,
+ 188, 578, 0, 579, 580, 190, 581, 0, 191, 582,
+ 192, 583, 584, 585, 0, 586, 587, 2374, 0, 588,
+ 589, 590, 0, 0, 591, 592, 193, 194, 593, 195,
+ 196, 594, 595, 596, 597, 598, 599, 600, 601, 602,
+ 0, 603, 604, 197, 605, 198, 606, 607, 608, 0,
+ 609, 610, 611, 612, 613, 614, 615, 616, 617, 618,
+ 200, 619, 620, 621, 622, 0, 623, 624, 625, 626,
+ 627, 628, 629, 630, 631, 632, 633, 634, 0, 635,
+ 636, 207, 637, 638, 639, 640, 641, 209, 642, 643,
+ 644, 645, 646, 647, 648, 0, 649, 0, 650, 651,
+ 652, 653, 654, 0, 656, 657, 214, 658, 659, 216,
+ 660, 661, 217, 662, 0, 663, 664, 665, 666, 667,
+ 668, 669, 670, 671, 672, 673, 674, 675, 219, 676,
+ 0, 677, 678, 0, 679, 221, 680, 681, 682, 683,
+ 684, 0, 685, 222, 223, 0, 0, 687, 688, 224,
+ 689, 225, 2375, 690, 691, 692, 693, 694, 695, 696,
+ 697, 0, 0, 698, 699, 700, 701, 702, 0, 0,
+ 703, 704, 705, 706, 707, 0, 232, 0, 708, 233,
+ 709, 710, 711, 712, 0, 0, 713, 0, 0, 714,
+ 715, 716, 717, 718, 719, 235, 236, 237, 238, 239,
+ 240, 241, 242, 243, 244, 245, 0, 720, 721, 0,
+ 0, 0, 0, 0, 35, 428, 1880, 1881, 37, 0,
+ 38, 39, 0, 0, 0, 0, 40, 0, 0, 0,
+ 0, 0, 0, 0, 0, 429, 430, 431, 432, 433,
+ 434, 435, 436, 0, 437, 438, 439, 0, 0, 0,
+ 0, 0, 0, 0, 440, 441, 0, 442, 443, 444,
+ 126, 445, 446, 447, 128, 129, 130, 131, 132, 0,
+ 448, 449, 450, 451, 452, 453, 0, 0, 454, 455,
+ 0, 134, 456, 0, 457, 458, 459, 460, 138, 0,
+ 139, 0, 461, 462, 463, 464, 465, 142, 466, 467,
+ 0, 0, 468, 469, 470, 471, 472, 473, 0, 145,
+ 474, 475, 0, 0, 0, 0, 146, 0, 0, 0,
+ 477, 478, 479, 480, 0, 481, 149, 150, 482, 0,
+ 483, 0, 484, 485, 486, 487, 488, 489, 0, 490,
+ 491, 492, 493, 0, 0, 494, 495, 496, 497, 498,
+ 0, 499, 500, 501, 0, 502, 503, 504, 0, 505,
+ 506, 507, 508, 158, 509, 510, 511, 512, 160, 2373,
+ 513, 0, 514, 515, 162, 516, 0, 517, 0, 518,
+ 163, 0, 164, 519, 520, 521, 522, 0, 523, 166,
+ 0, 167, 524, 525, 0, 526, 527, 0, 528, 529,
+ 168, 530, 531, 532, 533, 0, 534, 535, 536, 537,
+ 538, 539, 540, 0, 541, 170, 171, 0, 542, 543,
+ 544, 0, 172, 0, 173, 0, 545, 174, 175, 546,
+ 176, 547, 548, 549, 550, 551, 0, 0, 552, 177,
+ 178, 553, 179, 0, 554, 555, 556, 0, 0, 557,
+ 558, 559, 560, 561, 562, 563, 564, 565, 0, 566,
+ 567, 0, 568, 569, 570, 184, 185, 186, 571, 572,
+ 573, 574, 575, 576, 577, 187, 188, 578, 0, 579,
+ 580, 190, 581, 0, 191, 582, 192, 583, 584, 585,
+ 0, 586, 587, 2374, 0, 588, 589, 590, 0, 0,
+ 591, 592, 193, 194, 593, 195, 196, 594, 595, 596,
+ 597, 598, 599, 600, 601, 602, 0, 603, 604, 197,
+ 605, 198, 606, 607, 608, 0, 609, 610, 611, 612,
+ 613, 614, 615, 616, 617, 618, 200, 619, 620, 621,
+ 622, 0, 623, 624, 625, 626, 627, 628, 629, 630,
+ 631, 632, 633, 634, 0, 635, 636, 207, 637, 638,
+ 639, 640, 641, 209, 642, 643, 644, 645, 646, 647,
+ 648, 0, 649, 0, 650, 651, 652, 653, 654, 0,
+ 656, 657, 214, 658, 659, 216, 660, 661, 217, 662,
+ 0, 663, 664, 665, 666, 667, 668, 669, 670, 671,
+ 672, 673, 674, 675, 219, 676, 0, 677, 678, 0,
+ 679, 221, 680, 681, 682, 683, 684, 0, 685, 222,
+ 223, 0, 0, 687, 688, 224, 689, 225, 2375, 690,
+ 691, 692, 693, 694, 695, 696, 697, 0, 0, 698,
+ 699, 700, 701, 702, 0, 0, 703, 704, 705, 706,
+ 707, 0, 232, 0, 708, 233, 709, 710, 711, 712,
+ 0, 0, 713, 0, 0, 714, 715, 716, 717, 718,
+ 719, 235, 236, 237, 238, 239, 240, 241, 242, 243,
+ 244, 245, 0, 720, 721, 0, 0, 35, 428, 0,
+ 0, 37, 1880, 1881, 39, 0, 0, 0, 0, 40,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 0, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 0, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 0, 481, 149,
+ 150, 482, 3545, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 2373, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 0, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 0, 566, 567, 0, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 190, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 2374, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 0, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 2375, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 0, 720, 721, 0, 0,
+ 35, 428, 0, 0, 37, 1089, 1090, 39, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 429, 430, 431, 432, 433, 434, 435, 436, 0,
+ 437, 438, 439, 0, 0, 0, 0, 0, 0, 0,
+ 440, 441, 0, 442, 443, 444, 126, 445, 446, 447,
+ 128, 129, 130, 131, 132, 0, 448, 449, 450, 451,
+ 452, 453, 0, 0, 454, 455, 0, 134, 456, 0,
+ 457, 458, 459, 460, 138, 0, 139, 0, 461, 462,
+ 463, 464, 465, 142, 466, 467, 0, 0, 468, 469,
+ 470, 471, 472, 473, 0, 145, 474, 475, 0, 0,
+ 0, 0, 146, 0, 0, 476, 477, 478, 479, 480,
+ 0, 481, 149, 150, 482, 0, 483, 0, 484, 485,
+ 486, 487, 488, 489, 0, 490, 491, 492, 493, 0,
+ 0, 494, 495, 496, 497, 498, 0, 499, 500, 501,
+ 0, 502, 503, 504, 0, 505, 506, 507, 508, 158,
+ 509, 510, 511, 512, 160, 0, 513, 0, 514, 515,
+ 162, 516, 0, 517, 0, 518, 163, 0, 164, 519,
+ 520, 521, 522, 0, 523, 166, 0, 167, 524, 525,
+ 0, 526, 527, 0, 528, 529, 168, 530, 531, 532,
+ 533, 0, 534, 535, 536, 537, 538, 539, 540, 0,
+ 541, 170, 171, 0, 542, 543, 544, 0, 172, 0,
+ 173, 0, 545, 174, 175, 546, 176, 547, 548, 549,
+ 550, 551, 0, 0, 552, 177, 178, 553, 179, 0,
+ 554, 555, 556, 0, 0, 557, 558, 559, 560, 561,
+ 562, 563, 564, 565, 0, 566, 567, 0, 568, 569,
+ 570, 184, 185, 186, 571, 572, 573, 574, 575, 576,
+ 577, 187, 188, 578, 0, 579, 580, 190, 581, 0,
+ 191, 582, 192, 583, 584, 585, 0, 586, 587, 0,
+ 0, 588, 589, 590, 0, 0, 591, 592, 193, 194,
+ 593, 195, 196, 594, 595, 596, 597, 598, 599, 600,
+ 601, 602, 0, 603, 604, 197, 605, 198, 606, 607,
+ 608, 0, 609, 610, 611, 612, 613, 614, 615, 616,
+ 617, 618, 200, 619, 620, 621, 622, 0, 623, 624,
+ 625, 626, 627, 628, 629, 630, 631, 632, 633, 634,
+ 0, 635, 636, 207, 637, 638, 639, 640, 641, 209,
+ 642, 643, 644, 645, 646, 647, 648, 0, 649, 0,
+ 650, 651, 652, 653, 654, 655, 656, 657, 214, 658,
+ 659, 216, 660, 661, 217, 662, 0, 663, 664, 665,
+ 666, 667, 668, 669, 670, 671, 672, 673, 674, 675,
+ 219, 676, 0, 677, 678, 0, 679, 221, 680, 681,
+ 682, 683, 684, 0, 685, 222, 223, 686, 0, 687,
+ 688, 224, 689, 225, 0, 690, 691, 692, 693, 694,
+ 695, 696, 697, 0, 0, 698, 699, 700, 701, 702,
+ 0, 0, 703, 704, 705, 706, 707, 0, 232, 0,
+ 708, 233, 709, 710, 711, 712, 0, 0, 713, 0,
+ 0, 714, 715, 716, 717, 718, 719, 235, 236, 237,
+ 238, 239, 240, 241, 242, 243, 244, 245, 0, 720,
+ 721, 35, 428, 0, 0, 37, 0, 0, 39, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 0, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 0, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 476, 477, 478, 479,
+ 480, 0, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 0, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 0, 566, 567, 0, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 190, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 0, 649,
+ 0, 650, 651, 652, 653, 654, 655, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 0, 232,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 720, 721, 0, 37, 0, 0, 39, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 129, 130, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 0, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 139, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 0, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 0, 0,
+ 0, 146, 0, 0, 0, 477, 478, 479, 480, 0,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 2373, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 0, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 178, 553, 179, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 0, 566, 567, 0, 568, 569, 570,
+ 184, 185, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 190, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 2374, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 0, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 216, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 2375, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 0, 232, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 35, 720, 721,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 1327, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 0, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 0, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 476, 477, 478, 479, 480, 0, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 0, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 0, 566, 567, 0, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 190, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 0, 649, 0, 650, 651, 652,
+ 653, 654, 655, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 35, 720, 721, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 1348, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 129, 130, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 0, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 139, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 0, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 0, 0, 0, 146, 0, 0,
+ 476, 477, 478, 479, 480, 0, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 0, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 178, 553, 179, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 1349, 562, 563, 564, 565, 0,
+ 566, 567, 0, 568, 569, 570, 184, 185, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 190, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 0, 649, 0, 650, 651, 652, 653, 654,
+ 655, 656, 657, 214, 658, 659, 216, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 0, 232, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 35, 720, 721, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 129, 130, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 0,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 139,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 0, 0, 0, 146, 0, 0, 476, 477,
+ 478, 479, 480, 0, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 163,
+ 0, 164, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 0, 528, 529, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 178,
+ 553, 179, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 0, 566, 567,
+ 0, 568, 569, 570, 184, 185, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 190, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 0, 649, 0, 650, 651, 652, 653, 654, 655, 656,
+ 657, 214, 658, 659, 216, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 2971, 0, 703, 704, 705, 706, 707,
+ 0, 232, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 35, 720, 721, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 0, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 0, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 476, 477, 478, 479,
+ 480, 0, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 166, 4022, 167, 524,
+ 525, 0, 526, 527, 0, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 0, 566, 567, 0, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 190, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 0, 649,
+ 0, 650, 651, 652, 653, 654, 655, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 0, 232,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 720, 721, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 0, 0, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 129, 130, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 0, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 139, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 0, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 0, 0,
+ 0, 146, 0, 0, 476, 477, 478, 479, 480, 0,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 0, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 178, 553, 179, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 0, 566, 567, 0, 568, 569, 570,
+ 184, 185, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 190, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 0, 649, 0, 650,
+ 651, 652, 653, 654, 655, 656, 657, 214, 658, 659,
+ 216, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 0, 232, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 35, 720, 721,
+ 0, 37, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 0, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 0, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 476, 477, 478, 479, 480, 0, 481, 149,
+ 150, 482, 0, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 0, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 1454, 562, 563, 564,
+ 565, 0, 566, 567, 0, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 190, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 0, 649, 0, 650, 651, 652,
+ 653, 654, 655, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 35, 720, 721, 0, 37,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 129, 130, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 0, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 139, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 0, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 0, 0, 0, 146, 0, 0,
+ 476, 477, 478, 479, 480, 0, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 0, 528,
+ 1539, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 178, 553, 179, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 0,
+ 566, 567, 0, 568, 569, 570, 184, 185, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 190, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 0, 649, 0, 650, 651, 652, 653, 654,
+ 655, 656, 657, 214, 658, 659, 216, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 0, 232, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 35, 720, 721, 0, 37, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 129, 130, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 0,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 139,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 0, 0, 0, 146, 0, 0, 476, 477,
+ 478, 479, 480, 0, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 163,
+ 0, 164, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 0, 528, 1552, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 178,
+ 553, 179, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 0, 566, 567,
+ 0, 568, 569, 570, 184, 185, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 190, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 0, 649, 0, 650, 651, 652, 653, 654, 655, 656,
+ 657, 214, 658, 659, 216, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 0, 232, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 35, 720, 721, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 0, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 0, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 476, 477, 478, 479,
+ 480, 0, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 0, 528, 1564, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 1565, 562, 563, 564, 565, 0, 566, 567, 0, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 190, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 0, 649,
+ 0, 650, 651, 652, 653, 654, 655, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 0, 232,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 35,
+ 720, 721, 0, 37, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 429, 430, 431, 432, 433, 434, 435, 436, 0, 437,
+ 438, 439, 123, 124, 0, 0, 0, 0, 0, 440,
+ 441, 0, 442, 443, 444, 126, 445, 446, 447, 128,
+ 129, 130, 131, 132, 0, 448, 449, 450, 451, 452,
+ 453, 0, 0, 454, 455, 0, 134, 456, 0, 457,
+ 458, 459, 460, 138, 0, 139, 0, 461, 462, 463,
+ 464, 465, 142, 466, 467, 0, 0, 468, 469, 470,
+ 471, 472, 473, 0, 145, 474, 475, 0, 0, 0,
+ 0, 146, 0, 0, 0, 477, 478, 479, 480, 0,
+ 481, 149, 150, 482, 0, 483, 0, 484, 485, 486,
+ 487, 488, 489, 0, 490, 491, 492, 493, 0, 0,
+ 494, 495, 496, 497, 498, 0, 499, 500, 501, 0,
+ 502, 503, 504, 0, 505, 506, 507, 508, 158, 509,
+ 510, 511, 512, 160, 0, 513, 0, 514, 515, 162,
+ 516, 0, 517, 0, 518, 163, 0, 164, 519, 520,
+ 521, 522, 0, 523, 166, 0, 167, 524, 525, 0,
+ 526, 527, 0, 528, 529, 168, 530, 531, 532, 533,
+ 0, 534, 535, 536, 537, 538, 539, 540, 0, 541,
+ 170, 171, 0, 542, 543, 544, 0, 172, 0, 173,
+ 0, 545, 174, 175, 546, 176, 547, 548, 549, 550,
+ 551, 0, 0, 552, 177, 178, 553, 179, 0, 554,
+ 555, 556, 0, 0, 557, 558, 559, 560, 561, 562,
+ 563, 564, 565, 0, 566, 567, 0, 568, 569, 570,
+ 184, 185, 186, 571, 572, 573, 574, 575, 576, 577,
+ 187, 188, 578, 0, 579, 580, 190, 581, 0, 191,
+ 582, 192, 583, 584, 585, 0, 586, 587, 0, 0,
+ 588, 589, 590, 0, 0, 591, 592, 193, 194, 593,
+ 195, 196, 594, 595, 596, 597, 598, 599, 600, 601,
+ 602, 0, 603, 604, 197, 605, 198, 606, 607, 608,
+ 0, 609, 610, 611, 612, 613, 614, 615, 616, 617,
+ 618, 200, 619, 620, 621, 622, 0, 623, 624, 625,
+ 626, 627, 628, 629, 630, 631, 632, 633, 634, 0,
+ 635, 636, 207, 637, 638, 639, 640, 641, 209, 642,
+ 643, 644, 645, 646, 647, 648, 0, 649, 0, 650,
+ 651, 652, 653, 654, 0, 656, 657, 214, 658, 659,
+ 216, 660, 661, 217, 662, 0, 663, 664, 665, 666,
+ 667, 668, 669, 670, 671, 672, 673, 674, 675, 219,
+ 676, 0, 677, 678, 0, 679, 221, 680, 681, 682,
+ 683, 684, 0, 685, 222, 223, 0, 0, 687, 688,
+ 224, 689, 225, 0, 690, 691, 692, 693, 694, 695,
+ 696, 697, 0, 0, 698, 699, 700, 701, 702, 0,
+ 0, 703, 704, 705, 706, 707, 0, 232, 0, 708,
+ 233, 709, 710, 711, 712, 0, 0, 713, 0, 0,
+ 714, 715, 716, 717, 718, 719, 235, 236, 237, 238,
+ 239, 240, 241, 242, 243, 244, 245, 35, 720, 721,
+ 0, 37, 0, 0, 39, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 429, 430,
+ 431, 432, 433, 434, 435, 436, 0, 437, 438, 439,
+ 0, 0, 0, 0, 0, 0, 0, 440, 441, 0,
+ 442, 443, 444, 126, 445, 446, 447, 128, 129, 130,
+ 131, 132, 0, 448, 449, 450, 451, 452, 453, 0,
+ 0, 454, 455, 0, 134, 456, 0, 457, 458, 459,
+ 460, 138, 0, 139, 0, 461, 462, 463, 464, 465,
+ 142, 466, 467, 0, 0, 468, 469, 470, 471, 472,
+ 473, 0, 145, 474, 475, 0, 0, 0, 0, 146,
+ 0, 0, 0, 477, 478, 479, 480, 0, 481, 149,
+ 150, 482, 2566, 483, 0, 484, 485, 486, 487, 488,
+ 489, 0, 490, 491, 492, 493, 0, 0, 494, 495,
+ 496, 497, 498, 0, 499, 500, 501, 0, 502, 503,
+ 504, 0, 505, 506, 507, 508, 158, 509, 510, 511,
+ 512, 160, 0, 513, 0, 514, 515, 162, 516, 0,
+ 517, 0, 518, 163, 0, 164, 519, 520, 521, 522,
+ 0, 523, 166, 0, 167, 524, 525, 0, 526, 527,
+ 0, 528, 529, 168, 530, 531, 532, 533, 0, 534,
+ 535, 536, 537, 538, 539, 540, 0, 541, 170, 171,
+ 0, 542, 543, 544, 0, 172, 0, 173, 0, 545,
+ 174, 175, 546, 176, 547, 548, 549, 550, 551, 0,
+ 0, 552, 177, 178, 553, 179, 0, 554, 555, 556,
+ 0, 0, 557, 558, 559, 560, 561, 562, 563, 564,
+ 565, 0, 566, 567, 0, 568, 569, 570, 184, 185,
+ 186, 571, 572, 573, 574, 575, 576, 577, 187, 188,
+ 578, 0, 579, 580, 190, 581, 0, 191, 582, 192,
+ 583, 584, 585, 0, 586, 587, 0, 0, 588, 589,
+ 590, 0, 0, 591, 592, 193, 194, 593, 195, 196,
+ 594, 595, 596, 597, 598, 599, 600, 601, 602, 0,
+ 603, 604, 197, 605, 198, 606, 607, 608, 0, 609,
+ 610, 611, 612, 613, 614, 615, 616, 617, 618, 200,
+ 619, 620, 621, 622, 0, 623, 624, 625, 626, 627,
+ 628, 629, 630, 631, 632, 633, 634, 0, 635, 636,
+ 207, 637, 638, 639, 640, 641, 209, 642, 643, 644,
+ 645, 646, 647, 648, 0, 649, 0, 650, 651, 652,
+ 653, 654, 0, 656, 657, 214, 658, 659, 216, 660,
+ 661, 217, 662, 0, 663, 664, 665, 666, 667, 668,
+ 669, 670, 671, 672, 673, 674, 675, 219, 676, 0,
+ 677, 678, 0, 679, 221, 680, 681, 682, 683, 684,
+ 0, 685, 222, 223, 0, 0, 687, 688, 224, 689,
+ 225, 0, 690, 691, 692, 693, 694, 695, 696, 697,
+ 0, 0, 698, 699, 700, 701, 702, 0, 0, 703,
+ 704, 705, 706, 707, 0, 232, 0, 708, 233, 709,
+ 710, 711, 712, 0, 0, 713, 0, 0, 714, 715,
+ 716, 717, 718, 719, 235, 236, 237, 238, 239, 240,
+ 241, 242, 243, 244, 245, 35, 720, 721, 0, 37,
+ 0, 0, 39, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 429, 430, 431, 432,
+ 433, 434, 435, 436, 0, 437, 438, 439, 0, 0,
+ 0, 0, 0, 0, 0, 440, 441, 0, 442, 443,
+ 444, 126, 445, 446, 447, 128, 129, 130, 131, 132,
+ 0, 448, 449, 450, 451, 452, 453, 0, 0, 454,
+ 455, 0, 134, 456, 0, 457, 458, 459, 460, 138,
+ 0, 139, 0, 461, 462, 463, 464, 465, 142, 466,
+ 467, 0, 0, 468, 469, 470, 471, 472, 473, 0,
+ 145, 474, 475, 0, 0, 0, 0, 146, 0, 0,
+ 0, 477, 478, 479, 480, 0, 481, 149, 150, 482,
+ 0, 483, 0, 484, 485, 486, 487, 488, 489, 0,
+ 490, 491, 492, 493, 0, 0, 494, 495, 496, 497,
+ 498, 0, 499, 500, 501, 0, 502, 503, 504, 0,
+ 505, 506, 507, 508, 158, 509, 510, 511, 512, 160,
+ 0, 513, 0, 514, 515, 162, 516, 0, 517, 0,
+ 518, 163, 0, 164, 519, 520, 521, 522, 0, 523,
+ 166, 0, 167, 524, 525, 0, 526, 527, 0, 528,
+ 529, 168, 530, 531, 532, 533, 0, 534, 535, 536,
+ 537, 538, 539, 540, 0, 541, 170, 171, 0, 542,
+ 543, 544, 0, 172, 0, 173, 0, 545, 174, 175,
+ 546, 176, 547, 548, 549, 550, 551, 0, 0, 552,
+ 177, 178, 553, 179, 0, 554, 555, 556, 0, 0,
+ 557, 558, 559, 560, 561, 562, 563, 564, 565, 0,
+ 566, 567, 0, 568, 569, 570, 184, 185, 186, 571,
+ 572, 573, 574, 575, 576, 577, 187, 188, 578, 0,
+ 579, 580, 190, 581, 0, 191, 582, 192, 583, 584,
+ 585, 0, 586, 587, 0, 0, 588, 589, 590, 0,
+ 0, 591, 592, 193, 194, 593, 195, 196, 594, 595,
+ 596, 597, 598, 599, 600, 601, 602, 0, 603, 604,
+ 197, 605, 198, 606, 607, 608, 0, 609, 610, 611,
+ 612, 613, 614, 615, 616, 617, 618, 200, 619, 620,
+ 621, 622, 0, 623, 624, 625, 626, 627, 628, 629,
+ 630, 631, 632, 633, 634, 0, 635, 636, 207, 637,
+ 638, 639, 640, 641, 209, 642, 643, 644, 645, 646,
+ 647, 648, 0, 649, 0, 650, 651, 652, 653, 654,
+ 0, 656, 657, 214, 658, 659, 216, 660, 661, 217,
+ 662, 0, 663, 664, 665, 666, 667, 668, 669, 670,
+ 671, 672, 673, 674, 675, 219, 676, 0, 677, 678,
+ 0, 679, 221, 680, 681, 682, 683, 684, 0, 685,
+ 222, 223, 0, 0, 687, 688, 224, 689, 225, 0,
+ 690, 691, 692, 693, 694, 695, 696, 697, 0, 0,
+ 698, 699, 700, 701, 702, 0, 0, 703, 704, 705,
+ 706, 707, 0, 232, 0, 708, 233, 709, 710, 711,
+ 712, 0, 0, 713, 0, 0, 714, 715, 716, 717,
+ 718, 719, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 35, 720, 721, 0, 37, 0, 0,
+ 39, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 429, 430, 431, 432, 433, 434,
+ 435, 436, 0, 437, 438, 439, 0, 0, 0, 0,
+ 0, 0, 0, 440, 441, 0, 442, 443, 444, 126,
+ 445, 446, 447, 128, 129, 130, 131, 132, 0, 448,
+ 449, 450, 451, 452, 453, 0, 0, 454, 455, 0,
+ 134, 456, 0, 457, 458, 459, 460, 138, 0, 139,
+ 0, 461, 462, 463, 464, 465, 142, 466, 467, 0,
+ 0, 468, 469, 470, 471, 472, 473, 0, 145, 474,
+ 475, 0, 0, 0, 0, 146, 0, 0, 0, 477,
+ 478, 479, 480, 0, 481, 149, 150, 482, 0, 483,
+ 0, 484, 485, 486, 487, 488, 489, 0, 490, 491,
+ 492, 493, 0, 0, 494, 495, 496, 497, 498, 0,
+ 499, 500, 501, 0, 502, 503, 504, 0, 505, 506,
+ 507, 508, 158, 509, 510, 511, 512, 160, 0, 513,
+ 0, 514, 515, 162, 516, 0, 517, 0, 518, 163,
+ 0, 164, 519, 520, 521, 522, 0, 523, 166, 0,
+ 167, 524, 525, 0, 526, 527, 0, 528, 2349, 168,
+ 530, 531, 532, 533, 0, 534, 535, 536, 537, 538,
+ 539, 540, 0, 541, 170, 171, 0, 542, 543, 544,
+ 0, 172, 0, 173, 0, 545, 174, 175, 546, 176,
+ 547, 548, 549, 550, 551, 0, 0, 552, 177, 178,
+ 553, 179, 0, 554, 555, 556, 0, 0, 557, 558,
+ 559, 560, 561, 562, 563, 564, 565, 0, 566, 567,
+ 0, 568, 569, 570, 184, 185, 186, 571, 572, 573,
+ 574, 575, 576, 577, 187, 188, 578, 0, 579, 580,
+ 190, 581, 0, 191, 582, 192, 583, 584, 585, 0,
+ 586, 587, 0, 0, 588, 589, 590, 0, 0, 591,
+ 592, 193, 194, 593, 195, 196, 594, 595, 596, 597,
+ 598, 599, 600, 601, 602, 0, 603, 604, 197, 605,
+ 198, 606, 607, 608, 0, 609, 610, 611, 612, 613,
+ 614, 615, 616, 617, 618, 200, 619, 620, 621, 622,
+ 0, 623, 624, 625, 626, 627, 628, 629, 630, 631,
+ 632, 633, 634, 0, 635, 636, 207, 637, 638, 639,
+ 640, 641, 209, 642, 643, 644, 645, 646, 647, 648,
+ 0, 649, 0, 650, 651, 652, 653, 654, 0, 656,
+ 657, 214, 658, 659, 216, 660, 661, 217, 662, 0,
+ 663, 664, 665, 666, 667, 668, 669, 670, 671, 672,
+ 673, 674, 675, 219, 676, 0, 677, 678, 0, 679,
+ 221, 680, 681, 682, 683, 684, 0, 685, 222, 223,
+ 0, 0, 687, 688, 224, 689, 225, 0, 690, 691,
+ 692, 693, 694, 695, 696, 697, 0, 0, 698, 699,
+ 700, 701, 702, 0, 0, 703, 704, 705, 706, 707,
+ 0, 232, 0, 708, 233, 709, 710, 711, 712, 0,
+ 0, 713, 0, 0, 714, 715, 716, 717, 718, 719,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, 244,
+ 245, 35, 720, 721, 0, 37, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 429, 430, 431, 432, 433, 434, 435, 436,
+ 0, 437, 438, 439, 0, 0, 0, 0, 0, 0,
+ 0, 440, 441, 0, 442, 443, 444, 126, 445, 446,
+ 447, 128, 129, 130, 131, 132, 0, 448, 449, 450,
+ 451, 452, 453, 0, 0, 454, 455, 0, 134, 456,
+ 0, 457, 458, 459, 460, 138, 0, 139, 0, 461,
+ 462, 463, 464, 465, 142, 466, 467, 0, 0, 468,
+ 469, 470, 471, 472, 473, 0, 145, 474, 475, 0,
+ 0, 0, 0, 146, 0, 0, 0, 477, 478, 479,
+ 480, 0, 481, 149, 150, 482, 0, 483, 0, 484,
+ 485, 486, 487, 488, 489, 0, 490, 491, 492, 493,
+ 0, 0, 494, 495, 496, 497, 498, 0, 499, 500,
+ 501, 0, 502, 503, 504, 0, 505, 506, 507, 508,
+ 158, 509, 510, 511, 512, 160, 0, 513, 0, 514,
+ 515, 162, 516, 0, 517, 0, 518, 163, 0, 164,
+ 519, 520, 521, 522, 0, 523, 166, 0, 167, 524,
+ 525, 0, 526, 527, 0, 528, 529, 168, 530, 531,
+ 532, 533, 0, 534, 535, 536, 537, 538, 539, 540,
+ 0, 541, 170, 171, 0, 542, 543, 544, 0, 172,
+ 0, 173, 0, 545, 174, 175, 546, 176, 547, 548,
+ 549, 550, 551, 0, 0, 552, 177, 178, 553, 179,
+ 0, 554, 555, 556, 0, 0, 557, 558, 559, 560,
+ 561, 562, 563, 564, 565, 0, 566, 567, 0, 568,
+ 569, 570, 184, 185, 186, 571, 572, 573, 574, 575,
+ 576, 577, 187, 188, 578, 0, 579, 580, 190, 581,
+ 0, 191, 582, 192, 583, 584, 585, 0, 586, 587,
+ 0, 0, 588, 589, 590, 0, 0, 591, 592, 193,
+ 194, 593, 195, 196, 594, 595, 596, 597, 598, 599,
+ 600, 601, 602, 0, 603, 604, 197, 605, 198, 606,
+ 607, 608, 0, 609, 610, 611, 612, 613, 614, 615,
+ 616, 617, 618, 200, 619, 620, 621, 622, 0, 623,
+ 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
+ 634, 0, 635, 636, 207, 637, 638, 639, 640, 641,
+ 209, 642, 643, 644, 645, 646, 647, 648, 0, 649,
+ 0, 650, 651, 652, 653, 654, 0, 656, 657, 214,
+ 658, 659, 216, 660, 661, 217, 662, 0, 663, 664,
+ 665, 666, 667, 668, 669, 670, 671, 672, 673, 674,
+ 675, 219, 676, 0, 677, 678, 0, 679, 221, 680,
+ 681, 682, 683, 684, 0, 685, 222, 223, 0, 0,
+ 687, 688, 224, 689, 225, 0, 690, 691, 692, 693,
+ 694, 695, 696, 697, 0, 0, 698, 699, 700, 701,
+ 702, 0, 0, 703, 704, 705, 706, 707, 0, 232,
+ 0, 708, 233, 709, 710, 711, 712, 0, 0, 713,
+ 0, 0, 714, 715, 716, 717, 718, 719, 235, 236,
+ 237, 238, 239, 240, 241, 242, 243, 244, 245, 0,
+ 720, 721
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 2, 1013, 970, 1334, 88, 247, 148, 391, 1596, 911,
+ 161, 1179, 73, 73, 110, 1162, 73, 73, 73, 206,
+ 911, 1099, 1100, 1101, 1283, 1626, 391, 1105, 226, 73,
+ 2083, 375, 183, 1335, 1960, 79, 906, 1351, 1157, 1212,
+ 144, 125, 1240, 3046, 914, 1509, 1367, 917, 147, 2022,
+ 1185, 2006, 3118, 1013, 1066, 2874, 1448, 199, 1361, 1363,
+ 156, 3258, 1184, 147, 148, 1512, 1497, 1498, 3426, 2363,
+ 1999, 73, 220, 157, 2938, 1542, 1507, 79, 2163, 970,
+ 2006, 83, 165, 783, 1169, 1663, 73, 3481, 897, 2242,
+ 3905, 2011, 154, 3636, 2713, 2714, 2555, 3059, 3609, 1127,
+ 4287, 3935, 73, 1301, 159, 1054, 2436, 1334, 110, 1423,
+ 1527, 3952, 4231, 1427, 3955, 199, 1343, 3662, 1432, 3664,
+ 1437, 2454, 125, 206, 2149, 784, 1353, 1441, 363, 3859,
+ 1259, 133, 228, 2959, 90, 1259, 1453, 3234, 1259, 4339,
+ 1031, 1455, 2115, 2116, 100, 147, 110, 907, 3490, 3005,
+ 1091, 3007, 1065, 1165, 156, 3011, 916, 3013, 3014, 377,
+ 4283, 4524, 1049, 1300, 4184, 2296, 3022, 3023, 3024, 2254,
+ 930, 4580, 159, 1295, 4154, 377, 205, 1491, 4563, 1191,
+ 136, 4568, 246, 1874, 1875, 1876, 215, 4564, 1325, 2109,
+ 213, 1203, 156, 1330, 2347, 151, 2549, 4190, 2596, 4576,
+ 3349, 5045, 4374, 205, 4567, 1165, 5220, 3455, 968, 2607,
+ 2628, 213, 1609, 215, 974, 1989, 2136, 1580, 1034, 2630,
+ 5095, 1037, 1938, 5389, 1869, 1870, 228, 987, 3376, 5103,
+ 3049, 1495, 1496, 3922, 1822, 1292, 3523, 4253, 4849, 1209,
+ 4115, 5236, 1506, 5238, 1254, 1255, 5424, 5430, 1370, 4189,
+ 5094, 4191, 5442, 1209, 20, 29, 161, 1057, 9, 5672,
+ 76, 1692, 1693, 76, 228, 3870, 76, 4714, 1325, 76,
+ 1529, 2045, 4287, 1330, 107, 1722, 5647, 76, 183, 1081,
+ 76, 1712, 133, 1085, 1086, 1087, 85, 86, 2062, 85,
+ 86, 70, 13, 1095, 5301, 76, 76, 83, 121, 144,
+ 1000, 76, 81, 4661, 4662, 76, 4664, 4665, 4666, 4667,
+ 4668, 76, 891, 101, 114, 1256, 1257, 70, 13, 83,
+ 85, 86, 383, 383, 159, 73, 383, 383, 383, 76,
+ 114, 79, 146, 76, 129, 76, 5343, 76, 1416, 76,
+ 129, 76, 3161, 427, 3163, 3494, 186, 391, 112, 70,
+ 85, 86, 129, 183, 75, 76, 76, 78, 79, 104,
+ 81, 151, 110, 94, 98, 85, 86, 184, 184, 69,
+ 70, 231, 70, 73, 2476, 75, 76, 75, 76, 70,
+ 144, 81, 426, 81, 75, 76, 70, 78, 79, 391,
+ 81, 75, 5350, 5351, 111, 13, 383, 81, 1596, 110,
+ 205, 243, 129, 129, 210, 73, 3611, 129, 156, 236,
+ 129, 4583, 383, 189, 248, 111, 98, 1681, 1682, 1193,
+ 236, 1589, 3981, 105, 426, 70, 98, 79, 146, 73,
+ 75, 354, 348, 105, 1462, 129, 81, 1036, 5851, 129,
+ 349, 236, 343, 1707, 284, 156, 1838, 28, 129, 156,
+ 329, 1050, 70, 238, 69, 252, 1951, 186, 73, 1159,
+ 280, 76, 231, 110, 2147, 2148, 436, 368, 5997, 98,
+ 5841, 395, 203, 394, 435, 313, 105, 184, 316, 228,
+ 228, 464, 313, 188, 184, 1387, 6065, 6066, 413, 188,
+ 76, 5674, 108, 333, 205, 1816, 1387, 476, 274, 163,
+ 1803, 98, 213, 418, 215, 420, 420, 83, 418, 893,
+ 158, 191, 21, 1383, 5509, 92, 313, 228, 478, 1389,
+ 406, 146, 1392, 463, 236, 2656, 521, 49, 893, 2046,
+ 5275, 97, 236, 70, 2486, 551, 112, 2489, 5283, 268,
+ 556, 146, 558, 146, 81, 67, 2063, 542, 260, 435,
+ 390, 156, 200, 156, 464, 1567, 5431, 236, 5565, 499,
+ 236, 70, 522, 1372, 179, 2696, 481, 481, 144, 2700,
+ 94, 5984, 407, 556, 499, 324, 281, 193, 242, 279,
+ 559, 505, 281, 389, 1596, 83, 556, 686, 426, 6168,
+ 236, 512, 189, 735, 736, 426, 1764, 236, 559, 384,
+ 329, 301, 686, 1801, 333, 2069, 146, 1567, 1806, 1807,
+ 1778, 258, 156, 236, 6143, 524, 146, 405, 146, 408,
+ 1742, 1649, 101, 186, 1822, 504, 333, 422, 236, 426,
+ 418, 408, 420, 364, 557, 404, 559, 252, 554, 216,
+ 1808, 1809, 558, 391, 4374, 236, 6059, 1769, 478, 476,
+ 80, 735, 736, 83, 73, 556, 1668, 87, 88, 89,
+ 476, 260, 476, 1604, 3869, 83, 177, 5850, 1609, 4399,
+ 504, 402, 238, 5839, 73, 237, 476, 274, 426, 203,
+ 2001, 408, 408, 6054, 686, 1598, 408, 189, 217, 408,
+ 73, 272, 522, 481, 112, 73, 556, 1276, 313, 783,
+ 490, 316, 509, 83, 435, 505, 2201, 5084, 1668, 554,
+ 515, 521, 6125, 558, 408, 383, 511, 559, 408, 559,
+ 4535, 505, 498, 556, 559, 446, 144, 408, 545, 545,
+ 464, 476, 542, 556, 500, 2052, 5183, 3556, 558, 383,
+ 521, 554, 558, 556, 461, 558, 556, 4290, 1975, 556,
+ 556, 446, 505, 6166, 505, 4775, 4736, 556, 476, 4779,
+ 556, 542, 4577, 445, 2078, 461, 552, 2081, 547, 548,
+ 559, 4764, 503, 445, 426, 556, 556, 925, 1578, 1977,
+ 554, 556, 559, 2100, 550, 556, 1798, 2089, 552, 1987,
+ 5665, 556, 5975, 889, 1806, 1807, 5974, 1599, 5988, 5157,
+ 1602, 900, 2403, 1605, 4679, 1607, 2033, 4823, 1610, 556,
+ 1822, 426, 1614, 556, 1588, 556, 445, 556, 384, 556,
+ 500, 556, 5780, 4763, 1066, 4765, 547, 548, 446, 5383,
+ 260, 428, 559, 559, 1069, 519, 556, 559, 1798, 110,
+ 559, 418, 2145, 2147, 2148, 2149, 106, 547, 548, 893,
+ 548, 476, 282, 4583, 420, 559, 547, 548, 542, 2542,
+ 1002, 438, 961, 547, 548, 559, 452, 453, 1212, 559,
+ 2825, 476, 2070, 476, 2794, 2073, 2074, 83, 6061, 1889,
+ 559, 1830, 2313, 559, 2351, 156, 1856, 889, 950, 5884,
+ 5090, 893, 3756, 954, 954, 897, 2033, 954, 954, 954,
+ 1856, 498, 547, 548, 906, 907, 112, 3526, 5915, 3528,
+ 556, 435, 914, 479, 916, 917, 1000, 556, 1002, 485,
+ 350, 5928, 537, 1022, 184, 889, 405, 1078, 930, 1080,
+ 5541, 1082, 476, 556, 3896, 4083, 476, 1088, 144, 502,
+ 1997, 6124, 4485, 2410, 178, 4634, 476, 98, 476, 2869,
+ 1549, 559, 4557, 464, 2421, 69, 236, 228, 1062, 73,
+ 559, 1112, 1113, 1111, 383, 94, 968, 1741, 559, 2994,
+ 3429, 5846, 974, 4484, 498, 5849, 1060, 2175, 5822, 3835,
+ 1064, 2154, 73, 1201, 383, 987, 515, 2384, 4275, 2046,
+ 329, 6157, 73, 2390, 556, 138, 498, 2360, 5552, 1201,
+ 383, 5845, 76, 177, 1006, 383, 2063, 94, 177, 2725,
+ 1065, 1013, 2657, 156, 2659, 104, 1018, 3836, 3837, 73,
+ 253, 1023, 334, 6030, 163, 1027, 1028, 236, 2292, 2293,
+ 264, 153, 1034, 1632, 1036, 1037, 177, 1185, 5548, 0,
+ 2814, 155, 3460, 236, 73, 3098, 3444, 1049, 1050, 1648,
+ 3461, 549, 550, 551, 552, 1057, 24, 363, 5421, 4618,
+ 4619, 4620, 4621, 4622, 1066, 1664, 216, 260, 1216, 73,
+ 177, 214, 2040, 195, 203, 1159, 184, 1161, 248, 1066,
+ 6094, 7, 177, 2500, 10, 11, 138, 280, 1862, 5276,
+ 233, 13, 4603, 207, 354, 21, 22, 23, 119, 25,
+ 26, 5976, 4251, 242, 30, 31, 32, 1063, 435, 337,
+ 3929, 5985, 280, 543, 544, 545, 203, 547, 548, 549,
+ 550, 551, 552, 36, 1080, 38, 1082, 163, 217, 435,
+ 1194, 549, 550, 551, 552, 73, 1092, 76, 3491, 178,
+ 1163, 889, 1186, 1291, 1167, 893, 5318, 179, 76, 2040,
+ 2738, 4399, 4546, 280, 1156, 1157, 1112, 1113, 1161, 329,
+ 5375, 1163, 214, 1165, 280, 1167, 76, 547, 548, 549,
+ 550, 551, 552, 2251, 216, 1080, 2497, 1082, 889, 69,
+ 236, 233, 99, 73, 1186, 382, 498, 3116, 422, 1191,
+ 304, 1193, 348, 6067, 5174, 5749, 476, 6071, 2366, 538,
+ 5754, 1203, 24, 5218, 260, 5225, 242, 1112, 1113, 348,
+ 5230, 280, 236, 5233, 442, 184, 189, 3319, 3320, 142,
+ 252, 372, 3324, 2544, 280, 264, 94, 2548, 5221, 463,
+ 464, 179, 559, 236, 255, 364, 260, 380, 2542, 260,
+ 3859, 5751, 189, 5630, 366, 2709, 167, 5262, 179, 6123,
+ 364, 177, 1254, 1255, 362, 76, 280, 260, 5092, 3361,
+ 3362, 5276, 94, 5078, 338, 155, 5629, 476, 100, 1365,
+ 409, 2418, 2419, 402, 5115, 5684, 297, 364, 5663, 430,
+ 5667, 313, 264, 1285, 316, 545, 138, 5664, 438, 153,
+ 464, 432, 383, 6167, 554, 464, 556, 557, 558, 559,
+ 4843, 274, 383, 5666, 252, 5682, 435, 500, 276, 3440,
+ 1339, 1340, 348, 6187, 1285, 402, 6190, 468, 208, 470,
+ 428, 252, 556, 556, 245, 102, 103, 274, 380, 383,
+ 3949, 195, 184, 153, 504, 203, 545, 1339, 1340, 13,
+ 4885, 547, 548, 549, 550, 551, 552, 469, 435, 558,
+ 493, 153, 241, 467, 383, 469, 464, 464, 275, 556,
+ 2372, 1363, 1364, 1365, 333, 313, 164, 560, 316, 464,
+ 1372, 203, 2494, 409, 134, 195, 266, 1379, 177, 383,
+ 519, 1383, 313, 422, 500, 316, 163, 1389, 240, 236,
+ 1392, 559, 318, 195, 426, 230, 438, 5612, 506, 338,
+ 556, 1365, 1404, 349, 2291, 2354, 183, 1469, 329, 2713,
+ 338, 519, 301, 260, 280, 280, 5539, 1419, 557, 440,
+ 333, 560, 2590, 346, 463, 464, 2328, 5442, 338, 213,
+ 184, 500, 559, 280, 542, 510, 2327, 2328, 1186, 237,
+ 217, 493, 418, 2384, 500, 383, 156, 2317, 556, 2390,
+ 376, 153, 1163, 422, 276, 428, 1167, 2344, 2371, 3150,
+ 2409, 1463, 1464, 1465, 2413, 5842, 2275, 288, 2417, 354,
+ 5670, 2420, 270, 354, 406, 248, 500, 2675, 426, 4821,
+ 370, 333, 464, 519, 352, 5505, 338, 285, 241, 129,
+ 238, 560, 5472, 195, 2641, 426, 387, 295, 422, 1741,
+ 2316, 237, 366, 435, 560, 537, 2474, 1509, 280, 163,
+ 343, 2285, 476, 554, 298, 2331, 519, 146, 2334, 184,
+ 561, 557, 498, 321, 560, 498, 4592, 156, 380, 183,
+ 329, 241, 364, 4087, 1918, 368, 560, 484, 406, 407,
+ 375, 349, 349, 1598, 396, 69, 366, 1549, 301, 73,
+ 348, 498, 473, 1918, 264, 5742, 329, 310, 418, 4656,
+ 486, 1645, 4116, 217, 366, 1567, 2695, 435, 348, 329,
+ 402, 2695, 237, 519, 2695, 1577, 1578, 2908, 1580, 468,
+ 307, 470, 368, 2474, 338, 2597, 1588, 5567, 5318, 537,
+ 1825, 301, 5572, 5573, 1596, 559, 2412, 2824, 5432, 2415,
+ 2416, 491, 350, 435, 121, 469, 537, 496, 556, 499,
+ 94, 2, 502, 189, 412, 4471, 100, 1365, 889, 4475,
+ 4476, 398, 4478, 1841, 1842, 556, 1844, 203, 1339, 1340,
+ 1632, 367, 556, 5752, 500, 500, 343, 186, 2955, 1841,
+ 1842, 493, 1844, 353, 1646, 1601, 1648, 1603, 4512, 469,
+ 1606, 428, 1608, 500, 1365, 1611, 1612, 1613, 175, 213,
+ 184, 368, 1664, 80, 366, 556, 1668, 469, 1624, 334,
+ 87, 88, 89, 179, 559, 368, 245, 1679, 559, 2453,
+ 2454, 2908, 1638, 4547, 1640, 3738, 2460, 464, 349, 329,
+ 2994, 3158, 2466, 2467, 2468, 422, 556, 3626, 5713, 238,
+ 1784, 1785, 500, 2477, 2478, 441, 454, 1709, 2482, 2368,
+ 1858, 519, 519, 560, 2912, 468, 2943, 470, 239, 203,
+ 2319, 121, 2920, 556, 278, 2923, 2738, 5742, 500, 506,
+ 4556, 504, 4065, 510, 2333, 1737, 1738, 1739, 3055, 1741,
+ 467, 69, 519, 496, 398, 73, 252, 2346, 556, 422,
+ 2977, 1753, 343, 2888, 2889, 4374, 273, 2892, 468, 1761,
+ 470, 3078, 3079, 3080, 3081, 542, 196, 469, 408, 496,
+ 556, 481, 1868, 3090, 428, 175, 206, 368, 451, 556,
+ 4399, 1784, 1785, 493, 329, 130, 496, 560, 248, 338,
+ 5909, 3816, 379, 138, 521, 435, 1798, 3822, 3115, 1801,
+ 354, 377, 5407, 1887, 1806, 1807, 4625, 313, 4627, 333,
+ 464, 350, 329, 435, 338, 2988, 2989, 2990, 3132, 186,
+ 1822, 2958, 5981, 5982, 186, 1869, 1870, 155, 98, 556,
+ 198, 5646, 200, 5848, 5377, 500, 500, 24, 213, 5673,
+ 3760, 1843, 1938, 952, 413, 1847, 1848, 34, 4001, 556,
+ 2898, 226, 506, 138, 98, 422, 231, 402, 519, 144,
+ 1862, 98, 107, 556, 385, 519, 1868, 1869, 1870, 329,
+ 228, 156, 96, 273, 1918, 519, 101, 545, 2780, 207,
+ 364, 126, 1926, 6070, 1887, 3805, 233, 1889, 542, 2780,
+ 558, 478, 556, 117, 176, 76, 417, 4227, 247, 184,
+ 125, 186, 556, 278, 364, 149, 464, 424, 2778, 430,
+ 1972, 2781, 2782, 157, 364, 559, 1918, 284, 402, 3054,
+ 426, 3420, 284, 298, 1926, 363, 241, 2975, 198, 329,
+ 1932, 176, 290, 350, 364, 522, 1938, 559, 492, 260,
+ 226, 185, 402, 5454, 465, 286, 1948, 1056, 135, 1951,
+ 213, 435, 402, 1955, 5151, 240, 301, 2105, 3931, 363,
+ 3561, 198, 2771, 226, 4583, 556, 333, 6126, 231, 379,
+ 345, 333, 402, 5988, 1938, 343, 304, 94, 198, 354,
+ 200, 364, 3481, 268, 6171, 435, 301, 1989, 329, 556,
+ 2690, 402, 4094, 4095, 4096, 4097, 240, 1999, 4100, 4101,
+ 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 5, 253,
+ 5844, 75, 298, 5558, 237, 278, 3433, 81, 263, 5860,
+ 286, 265, 354, 390, 424, 510, 3224, 24, 390, 311,
+ 3108, 435, 314, 307, 2036, 298, 364, 34, 310, 5644,
+ 389, 5044, 1151, 2045, 504, 4864, 4865, 270, 333, 6064,
+ 476, 275, 435, 338, 420, 6070, 5661, 4159, 4160, 155,
+ 2062, 2821, 285, 329, 363, 476, 311, 2069, 478, 314,
+ 419, 556, 295, 5270, 402, 5272, 231, 444, 406, 394,
+ 5083, 402, 345, 2054, 329, 406, 203, 242, 2059, 276,
+ 287, 354, 5450, 425, 1365, 380, 5701, 438, 187, 156,
+ 196, 5063, 2198, 3534, 184, 260, 556, 435, 187, 3121,
+ 206, 396, 522, 333, 435, 481, 404, 492, 363, 545,
+ 1868, 1869, 1870, 343, 390, 402, 543, 544, 545, 2131,
+ 547, 548, 549, 550, 551, 552, 435, 2897, 135, 467,
+ 220, 469, 83, 5977, 226, 2147, 2148, 2149, 5004, 231,
+ 5006, 5007, 352, 468, 5010, 470, 6171, 498, 435, 2130,
+ 307, 3121, 407, 2134, 364, 3177, 2168, 256, 184, 5033,
+ 1918, 228, 438, 253, 121, 5990, 478, 256, 1926, 80,
+ 2279, 496, 83, 2185, 429, 5696, 87, 88, 89, 412,
+ 1938, 519, 476, 467, 226, 500, 2198, 512, 519, 2201,
+ 556, 2203, 402, 144, 449, 202, 4291, 451, 493, 428,
+ 454, 2595, 187, 5756, 2974, 231, 298, 3177, 165, 5824,
+ 2222, 542, 496, 2822, 3252, 3253, 6060, 1938, 2230, 492,
+ 2595, 519, 498, 232, 2198, 121, 3434, 1948, 94, 519,
+ 2242, 186, 500, 190, 100, 464, 554, 521, 556, 3422,
+ 558, 556, 5610, 333, 542, 141, 411, 2259, 5652, 2446,
+ 207, 545, 542, 345, 211, 3524, 298, 266, 364, 155,
+ 2272, 559, 3221, 2275, 558, 422, 2278, 407, 1989, 276,
+ 2428, 256, 556, 2285, 519, 232, 231, 506, 235, 2291,
+ 516, 554, 364, 4346, 557, 558, 560, 364, 556, 348,
+ 3074, 2303, 398, 250, 353, 435, 402, 542, 394, 3910,
+ 3612, 511, 557, 345, 2316, 2317, 2371, 2319, 2320, 3920,
+ 467, 5315, 208, 268, 394, 560, 334, 335, 307, 2331,
+ 402, 2333, 2334, 559, 2045, 402, 3638, 556, 559, 435,
+ 4799, 2343, 2344, 429, 2346, 2347, 3431, 203, 2054, 496,
+ 215, 2062, 333, 2059, 6169, 307, 519, 338, 2360, 429,
+ 3134, 2363, 2445, 5968, 5358, 115, 519, 560, 435, 5912,
+ 2372, 4344, 226, 4346, 521, 2436, 2436, 231, 464, 2436,
+ 2436, 2436, 4337, 5741, 329, 2372, 3613, 137, 333, 519,
+ 2452, 338, 562, 5601, 464, 5603, 559, 262, 3268, 5607,
+ 5608, 3271, 4504, 4323, 3274, 4558, 559, 388, 364, 556,
+ 2412, 2507, 542, 2415, 2416, 3383, 107, 96, 348, 390,
+ 428, 5285, 3434, 353, 2130, 2381, 512, 2383, 2134, 559,
+ 560, 2387, 403, 2389, 557, 126, 2392, 560, 117, 39,
+ 2396, 388, 512, 422, 298, 307, 402, 6052, 5656, 350,
+ 2198, 2453, 2454, 3262, 500, 364, 464, 2459, 2460, 4379,
+ 431, 3688, 402, 2465, 2466, 2467, 2468, 4045, 407, 2471,
+ 422, 2473, 176, 2475, 2476, 2477, 2478, 2479, 2480, 435,
+ 2482, 6024, 2484, 2485, 239, 176, 2488, 2198, 467, 146,
+ 276, 345, 3383, 402, 4579, 435, 435, 364, 506, 156,
+ 2502, 2503, 2504, 2505, 2506, 2507, 3206, 5363, 238, 2511,
+ 3902, 519, 3816, 2515, 6119, 467, 2518, 496, 3822, 2521,
+ 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 232, 2531,
+ 3977, 3978, 4826, 557, 542, 402, 560, 2539, 418, 3856,
+ 2542, 271, 521, 2507, 496, 4888, 428, 3321, 556, 3863,
+ 231, 2595, 4895, 2740, 323, 2742, 364, 519, 164, 3333,
+ 422, 307, 266, 15, 3455, 364, 3578, 6110, 435, 521,
+ 450, 104, 263, 254, 198, 307, 200, 556, 347, 5398,
+ 542, 554, 464, 481, 2220, 558, 2646, 2738, 519, 382,
+ 398, 3365, 69, 2595, 402, 2597, 73, 4570, 560, 231,
+ 224, 2603, 3551, 402, 556, 467, 2690, 311, 2244, 342,
+ 314, 542, 307, 2657, 2601, 2659, 2618, 512, 3578, 521,
+ 311, 5687, 254, 314, 506, 2627, 2628, 435, 559, 2725,
+ 425, 237, 2731, 288, 496, 3409, 435, 519, 329, 4565,
+ 542, 33, 543, 544, 545, 2793, 547, 548, 549, 550,
+ 551, 552, 556, 2, 556, 2657, 4585, 2659, 310, 521,
+ 542, 231, 417, 6021, 270, 312, 1057, 1938, 423, 69,
+ 519, 521, 363, 73, 556, 430, 422, 2679, 5542, 285,
+ 556, 333, 4181, 481, 254, 4184, 5550, 4288, 4289, 295,
+ 422, 364, 542, 542, 556, 95, 2698, 2699, 307, 5318,
+ 2702, 325, 326, 327, 328, 481, 556, 2709, 332, 5906,
+ 465, 2713, 2714, 425, 338, 321, 407, 1325, 2720, 343,
+ 554, 467, 1330, 2725, 2726, 310, 560, 422, 2730, 402,
+ 1329, 310, 487, 406, 83, 467, 2738, 404, 429, 80,
+ 2888, 2889, 83, 468, 2892, 470, 87, 88, 89, 1348,
+ 496, 468, 1351, 470, 2756, 155, 2852, 2759, 449, 2507,
+ 2856, 2725, 435, 104, 496, 160, 69, 70, 264, 2771,
+ 73, 307, 467, 2775, 80, 521, 2778, 6135, 81, 2781,
+ 2782, 559, 344, 2879, 2935, 563, 348, 2789, 4287, 521,
+ 547, 548, 549, 550, 551, 2894, 2507, 561, 147, 2801,
+ 557, 496, 551, 556, 153, 558, 412, 556, 208, 558,
+ 556, 3889, 2814, 422, 557, 4136, 559, 559, 362, 2821,
+ 2822, 563, 69, 70, 556, 5444, 521, 70, 2830, 555,
+ 481, 94, 181, 559, 1848, 80, 555, 100, 83, 312,
+ 559, 4272, 6200, 3332, 2940, 3334, 3335, 2595, 4901, 1240,
+ 2852, 2853, 254, 3865, 2856, 3867, 4054, 152, 467, 483,
+ 260, 556, 325, 326, 327, 328, 266, 112, 1259, 557,
+ 494, 559, 2968, 512, 119, 2877, 554, 2879, 556, 142,
+ 557, 2883, 559, 557, 428, 559, 422, 496, 2890, 549,
+ 550, 551, 2856, 2895, 4029, 2897, 2898, 125, 2900, 144,
+ 519, 557, 521, 559, 2906, 3865, 3054, 3867, 425, 2657,
+ 1301, 2659, 521, 288, 556, 2879, 558, 4220, 562, 557,
+ 464, 559, 81, 557, 2926, 559, 556, 2198, 4883, 556,
+ 2932, 467, 557, 196, 559, 2937, 3948, 348, 2940, 4260,
+ 203, 282, 422, 206, 3040, 135, 136, 556, 2950, 3548,
+ 3549, 559, 560, 557, 80, 559, 3060, 83, 85, 86,
+ 496, 2963, 506, 557, 5967, 559, 2968, 559, 3859, 232,
+ 370, 80, 2974, 2975, 83, 519, 2940, 2725, 87, 88,
+ 89, 557, 557, 559, 559, 521, 112, 468, 3948, 470,
+ 2992, 2993, 2994, 119, 125, 104, 2998, 557, 542, 559,
+ 557, 512, 559, 266, 2968, 557, 557, 559, 559, 350,
+ 255, 510, 556, 413, 2725, 260, 152, 557, 144, 559,
+ 556, 102, 103, 557, 198, 559, 200, 115, 3030, 3031,
+ 539, 4345, 547, 548, 549, 550, 551, 557, 3040, 559,
+ 555, 18, 19, 284, 557, 3047, 559, 4546, 558, 557,
+ 224, 559, 297, 418, 419, 3057, 4315, 557, 351, 559,
+ 37, 351, 462, 40, 418, 419, 329, 107, 5170, 4018,
+ 333, 348, 3074, 4195, 348, 557, 3040, 559, 231, 3321,
+ 343, 557, 468, 559, 470, 211, 126, 351, 557, 352,
+ 559, 491, 3094, 557, 539, 559, 557, 115, 559, 499,
+ 284, 364, 502, 2814, 2852, 350, 549, 3706, 2856, 539,
+ 557, 3113, 559, 519, 3116, 521, 557, 235, 559, 3121,
+ 559, 560, 3206, 3365, 557, 3724, 559, 559, 557, 255,
+ 559, 2879, 3134, 557, 260, 559, 176, 557, 557, 402,
+ 559, 2852, 405, 406, 557, 2856, 559, 557, 556, 559,
+ 127, 325, 326, 327, 328, 4457, 418, 419, 332, 333,
+ 557, 557, 559, 559, 338, 418, 419, 4481, 2879, 343,
+ 557, 297, 435, 282, 557, 3177, 559, 557, 557, 559,
+ 559, 519, 159, 521, 2895, 125, 1577, 1578, 557, 1580,
+ 559, 557, 2940, 559, 557, 440, 559, 557, 236, 559,
+ 240, 4399, 543, 544, 545, 1596, 547, 548, 549, 550,
+ 551, 552, 557, 557, 559, 559, 3414, 3415, 3416, 1206,
+ 2968, 1208, 199, 263, 350, 557, 557, 559, 559, 2940,
+ 3232, 557, 557, 559, 559, 557, 2507, 559, 5879, 5880,
+ 503, 350, 556, 3485, 3340, 557, 3248, 559, 3250, 557,
+ 3346, 559, 557, 557, 559, 559, 3258, 2968, 280, 557,
+ 3262, 559, 4726, 3265, 560, 557, 3268, 559, 557, 3271,
+ 559, 311, 3274, 557, 314, 559, 4775, 335, 3280, 549,
+ 4779, 3880, 557, 3882, 559, 557, 562, 559, 3290, 329,
+ 6003, 6004, 3040, 3295, 4467, 540, 557, 557, 559, 559,
+ 276, 476, 547, 548, 549, 550, 551, 552, 557, 483,
+ 559, 557, 562, 559, 440, 4089, 476, 3319, 3320, 3321,
+ 494, 476, 3324, 363, 557, 557, 559, 559, 476, 3040,
+ 3332, 3333, 3334, 3335, 557, 556, 559, 686, 3340, 557,
+ 557, 559, 559, 3345, 3346, 557, 3348, 559, 3350, 4123,
+ 557, 557, 559, 559, 557, 557, 559, 559, 209, 3361,
+ 3362, 476, 557, 3365, 559, 107, 557, 407, 559, 5471,
+ 428, 557, 557, 559, 559, 557, 3340, 559, 557, 557,
+ 559, 559, 3346, 3385, 557, 3387, 559, 3389, 557, 429,
+ 559, 557, 557, 559, 559, 125, 557, 4171, 559, 557,
+ 557, 559, 559, 557, 276, 559, 464, 3409, 282, 449,
+ 1801, 557, 476, 559, 540, 1806, 1807, 557, 3420, 559,
+ 558, 547, 548, 549, 550, 551, 552, 557, 557, 559,
+ 559, 1822, 3434, 556, 543, 544, 545, 523, 547, 548,
+ 549, 550, 551, 552, 4642, 4044, 556, 4780, 506, 4782,
+ 3452, 556, 5053, 402, 2725, 260, 218, 556, 558, 218,
+ 348, 519, 2476, 260, 402, 3467, 348, 218, 218, 260,
+ 2484, 4792, 218, 348, 231, 402, 560, 218, 296, 3481,
+ 186, 500, 348, 4374, 542, 312, 556, 481, 342, 1880,
+ 1881, 512, 425, 231, 288, 557, 4817, 138, 556, 557,
+ 5426, 333, 560, 107, 333, 556, 523, 348, 4399, 231,
+ 333, 333, 115, 115, 1905, 1906, 486, 333, 155, 364,
+ 512, 3523, 512, 231, 3526, 383, 3528, 561, 218, 218,
+ 556, 3533, 218, 556, 509, 218, 376, 106, 523, 218,
+ 556, 556, 218, 218, 218, 559, 3548, 3549, 218, 218,
+ 218, 218, 3554, 231, 218, 218, 218, 218, 218, 348,
+ 464, 556, 107, 296, 348, 231, 3662, 3663, 3664, 3420,
+ 556, 76, 231, 3575, 5547, 556, 3578, 76, 556, 80,
+ 3582, 2852, 83, 231, 556, 2856, 1977, 556, 556, 556,
+ 556, 556, 3340, 76, 556, 556, 1987, 556, 3346, 3601,
+ 556, 556, 951, 556, 2618, 556, 556, 76, 2879, 556,
+ 76, 112, 556, 556, 5716, 556, 360, 556, 119, 556,
+ 556, 556, 556, 520, 3626, 556, 556, 556, 280, 3340,
+ 3481, 559, 107, 559, 167, 3346, 280, 282, 296, 107,
+ 559, 231, 345, 144, 73, 231, 343, 435, 549, 276,
+ 426, 316, 559, 183, 559, 499, 545, 13, 556, 559,
+ 3662, 3663, 3664, 556, 1013, 1014, 560, 134, 476, 2940,
+ 556, 558, 476, 422, 476, 511, 476, 422, 476, 2070,
+ 476, 298, 2073, 2074, 3686, 422, 476, 4636, 4637, 4638,
+ 4639, 4640, 4583, 4812, 3696, 4893, 3698, 2968, 476, 545,
+ 5014, 476, 156, 422, 3706, 218, 348, 427, 1057, 293,
+ 211, 476, 476, 338, 192, 476, 499, 368, 348, 5218,
+ 80, 343, 3724, 83, 467, 418, 5225, 87, 88, 89,
+ 159, 5230, 556, 253, 5233, 556, 476, 476, 156, 80,
+ 559, 192, 83, 364, 104, 260, 87, 88, 89, 476,
+ 476, 476, 500, 218, 255, 192, 178, 464, 476, 260,
+ 464, 476, 3858, 5262, 500, 476, 107, 1116, 192, 3040,
+ 125, 476, 125, 352, 476, 476, 476, 5276, 476, 318,
+ 476, 3923, 476, 467, 2175, 476, 387, 3789, 476, 476,
+ 3938, 476, 368, 368, 476, 476, 297, 114, 114, 476,
+ 282, 1150, 557, 559, 476, 348, 282, 561, 3904, 3811,
+ 5114, 1160, 282, 523, 3816, 1164, 1165, 1166, 247, 282,
+ 3822, 3963, 348, 4167, 282, 282, 348, 348, 3830, 282,
+ 282, 486, 282, 476, 107, 4803, 218, 96, 348, 3923,
+ 556, 218, 333, 500, 184, 218, 519, 218, 218, 350,
+ 348, 343, 333, 333, 333, 511, 3858, 3859, 304, 107,
+ 107, 3960, 231, 3865, 3924, 3867, 558, 288, 424, 106,
+ 476, 476, 218, 218, 3934, 474, 556, 474, 3880, 3963,
+ 3882, 4029, 500, 218, 500, 556, 218, 218, 3890, 13,
+ 337, 476, 236, 342, 3858, 515, 5949, 83, 318, 318,
+ 554, 554, 3904, 3963, 474, 1254, 1255, 556, 476, 556,
+ 1259, 245, 4803, 559, 3662, 3663, 3664, 556, 556, 559,
+ 556, 227, 282, 4165, 236, 559, 3928, 478, 559, 557,
+ 4529, 4530, 545, 253, 253, 278, 559, 286, 4712, 440,
+ 3904, 282, 4184, 5442, 438, 349, 3948, 3949, 377, 559,
+ 5551, 3662, 3663, 3664, 383, 107, 5034, 557, 500, 557,
+ 33, 9, 357, 3965, 125, 557, 422, 556, 128, 2360,
+ 338, 500, 2363, 286, 338, 4173, 4174, 4175, 4176, 286,
+ 476, 476, 312, 476, 556, 512, 425, 231, 288, 348,
+ 350, 481, 115, 296, 348, 6097, 338, 333, 296, 4001,
+ 6102, 444, 162, 296, 418, 476, 5505, 467, 192, 350,
+ 5598, 348, 559, 402, 254, 348, 432, 476, 435, 348,
+ 4022, 348, 4971, 4972, 390, 4974, 354, 107, 80, 557,
+ 282, 83, 476, 4129, 288, 87, 88, 89, 500, 540,
+ 218, 545, 4044, 231, 343, 4047, 547, 548, 549, 550,
+ 551, 552, 104, 107, 465, 500, 233, 512, 343, 556,
+ 386, 218, 222, 387, 218, 4067, 217, 432, 4070, 3340,
+ 556, 218, 343, 500, 4076, 3346, 333, 519, 107, 348,
+ 333, 348, 4084, 288, 4086, 251, 550, 4089, 5256, 251,
+ 231, 4093, 4094, 4095, 4096, 4097, 107, 257, 4100, 4101,
+ 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 539, 557,
+ 3858, 4113, 4114, 232, 554, 316, 4118, 288, 432, 557,
+ 5587, 4123, 5589, 557, 539, 4127, 231, 4129, 348, 4131,
+ 333, 557, 557, 293, 260, 260, 80, 4139, 260, 83,
+ 4142, 95, 4144, 87, 88, 89, 260, 3858, 260, 559,
+ 559, 523, 4154, 5652, 4156, 243, 3904, 4159, 4160, 559,
+ 556, 476, 4164, 4165, 236, 4129, 4227, 4227, 519, 4171,
+ 4227, 4227, 4227, 333, 348, 315, 559, 125, 464, 4181,
+ 481, 288, 4184, 543, 544, 545, 342, 547, 548, 549,
+ 550, 551, 552, 3904, 4196, 5796, 5797, 236, 559, 557,
+ 5788, 512, 543, 544, 545, 365, 547, 548, 549, 550,
+ 551, 552, 360, 236, 5713, 332, 369, 556, 1567, 557,
+ 476, 359, 498, 310, 306, 506, 516, 516, 1577, 1578,
+ 282, 1580, 557, 4617, 557, 557, 2627, 2628, 348, 557,
+ 545, 4243, 125, 5742, 348, 2, 406, 1596, 408, 5396,
+ 410, 539, 4617, 557, 556, 4406, 5424, 4259, 541, 419,
+ 557, 557, 557, 557, 556, 556, 4417, 427, 545, 556,
+ 351, 348, 4368, 4275, 556, 435, 556, 4373, 264, 4375,
+ 559, 4880, 560, 557, 2675, 4287, 556, 447, 218, 80,
+ 556, 559, 83, 1642, 5068, 557, 456, 476, 350, 523,
+ 460, 476, 4398, 476, 2695, 3319, 3320, 2698, 2699, 5277,
+ 3324, 272, 338, 221, 333, 218, 4318, 5490, 476, 1668,
+ 352, 112, 4418, 218, 435, 427, 218, 427, 119, 427,
+ 4181, 296, 264, 4184, 221, 348, 545, 476, 282, 221,
+ 5941, 500, 559, 298, 221, 370, 370, 3361, 3362, 5848,
+ 451, 497, 308, 144, 514, 476, 476, 308, 476, 308,
+ 476, 476, 5330, 4962, 422, 422, 4368, 476, 476, 422,
+ 476, 4373, 4374, 4375, 192, 422, 333, 476, 218, 476,
+ 476, 4129, 476, 476, 5688, 435, 5277, 114, 557, 557,
+ 476, 3662, 3663, 3664, 1743, 248, 4398, 4399, 282, 231,
+ 5598, 282, 557, 1752, 161, 555, 350, 282, 282, 4373,
+ 486, 4375, 557, 557, 115, 404, 4418, 1766, 4129, 177,
+ 211, 231, 80, 559, 557, 83, 183, 5318, 5330, 87,
+ 88, 89, 4434, 107, 4398, 4437, 4287, 218, 476, 5330,
+ 218, 231, 545, 248, 500, 500, 559, 218, 231, 1798,
+ 6038, 422, 1801, 1802, 4418, 422, 422, 1806, 1807, 5329,
+ 422, 556, 5061, 422, 255, 557, 556, 556, 559, 260,
+ 555, 351, 432, 1822, 216, 216, 5807, 209, 282, 282,
+ 282, 282, 282, 282, 282, 282, 554, 236, 83, 5988,
+ 559, 543, 544, 545, 360, 547, 548, 549, 550, 551,
+ 552, 231, 4504, 5373, 511, 236, 297, 332, 557, 542,
+ 516, 557, 557, 557, 4574, 556, 559, 557, 236, 556,
+ 245, 2912, 557, 559, 409, 954, 557, 4529, 4530, 2920,
+ 545, 4533, 2923, 473, 556, 505, 154, 4539, 559, 486,
+ 1889, 545, 231, 107, 4546, 288, 272, 500, 500, 5498,
+ 476, 125, 467, 218, 556, 451, 4558, 240, 486, 350,
+ 5509, 221, 427, 476, 476, 6064, 476, 422, 422, 476,
+ 476, 6070, 5584, 4617, 557, 4635, 557, 557, 402, 556,
+ 4582, 4583, 519, 4585, 4586, 4587, 5598, 3858, 125, 467,
+ 506, 231, 94, 348, 144, 218, 177, 486, 100, 543,
+ 544, 545, 282, 547, 548, 549, 550, 551, 552, 282,
+ 282, 557, 282, 556, 267, 4617, 476, 286, 556, 523,
+ 4368, 397, 557, 559, 282, 4373, 348, 4375, 559, 107,
+ 368, 346, 348, 3904, 559, 556, 1065, 1066, 486, 559,
+ 142, 476, 5591, 4645, 80, 556, 432, 177, 557, 440,
+ 4398, 242, 236, 555, 4841, 282, 557, 4368, 557, 236,
+ 557, 125, 4373, 556, 4375, 517, 517, 557, 4670, 360,
+ 4418, 559, 6171, 285, 358, 5753, 285, 466, 557, 355,
+ 4682, 557, 125, 556, 556, 556, 249, 4398, 557, 473,
+ 486, 343, 350, 107, 196, 4546, 545, 476, 236, 519,
+ 144, 203, 5476, 261, 206, 266, 254, 4418, 254, 338,
+ 4712, 545, 126, 4715, 338, 125, 467, 559, 559, 138,
+ 5319, 4723, 4724, 476, 4726, 218, 476, 221, 4730, 4731,
+ 232, 476, 476, 4735, 4736, 557, 4887, 282, 2087, 4741,
+ 556, 5515, 4744, 4745, 191, 2094, 4897, 4749, 238, 540,
+ 236, 184, 107, 4755, 4814, 4815, 547, 548, 549, 550,
+ 551, 552, 176, 177, 266, 4767, 500, 343, 260, 556,
+ 184, 432, 1201, 4775, 107, 5724, 5788, 4779, 333, 500,
+ 233, 80, 5750, 231, 83, 432, 217, 343, 83, 4885,
+ 519, 125, 150, 107, 236, 519, 467, 348, 269, 231,
+ 556, 280, 351, 557, 556, 505, 5974, 236, 5582, 5583,
+ 4812, 448, 285, 112, 368, 518, 556, 156, 557, 556,
+ 119, 557, 557, 556, 4826, 199, 240, 329, 556, 348,
+ 396, 333, 476, 3224, 557, 107, 556, 218, 218, 556,
+ 476, 343, 4844, 556, 556, 144, 556, 556, 556, 263,
+ 352, 107, 231, 338, 309, 264, 218, 556, 4129, 5750,
+ 4862, 556, 364, 557, 432, 177, 161, 204, 107, 4617,
+ 515, 557, 352, 486, 446, 446, 2225, 545, 4880, 557,
+ 2229, 125, 107, 4885, 147, 543, 544, 545, 183, 547,
+ 548, 549, 550, 551, 552, 559, 253, 311, 505, 556,
+ 314, 4903, 556, 405, 406, 556, 556, 556, 467, 231,
+ 500, 329, 211, 556, 467, 329, 557, 76, 4920, 333,
+ 5932, 348, 225, 4925, 4775, 467, 523, 217, 4779, 138,
+ 4932, 556, 419, 435, 556, 419, 5710, 138, 351, 199,
+ 519, 519, 504, 80, 559, 505, 4948, 107, 556, 363,
+ 556, 236, 435, 5727, 467, 393, 255, 5731, 204, 5733,
+ 4962, 260, 338, 348, 80, 266, 348, 83, 556, 432,
+ 556, 87, 88, 89, 107, 107, 351, 261, 351, 238,
+ 238, 516, 557, 125, 418, 476, 559, 556, 104, 455,
+ 557, 4993, 189, 407, 498, 76, 112, 432, 297, 214,
+ 557, 503, 418, 119, 556, 355, 403, 93, 104, 556,
+ 338, 2360, 556, 556, 2363, 429, 476, 556, 559, 559,
+ 5022, 217, 236, 418, 356, 147, 6038, 556, 144, 446,
+ 519, 446, 238, 238, 383, 449, 5038, 451, 519, 2133,
+ 454, 3058, 1297, 3434, 1807, 3434, 2943, 2864, 3638, 5919,
+ 4373, 350, 4348, 5932, 2969, 3850, 1340, 5371, 3028, 5061,
+ 5786, 6038, 4527, 5426, 1339, 5024, 5068, 5395, 3459, 3460,
+ 3211, 5911, 3555, 5276, 6027, 5816, 5815, 5952, 6064, 3559,
+ 4094, 4095, 4096, 4097, 4575, 4560, 4100, 4101, 4102, 4103,
+ 4104, 4105, 4106, 4107, 4108, 4109, 5760, 4368, 4518, 3043,
+ 3043, 4368, 4373, 3663, 4375, 1335, 3900, 4543, 5062, 5402,
+ 3037, 3912, 5114, 4127, 5116, 5411, 2465, 6040, 6204, 6186,
+ 5388, 3858, 4582, 5965, 5994, 5995, 5332, 4398, 2211, 5570,
+ 5769, 5335, 183, 1633, 5538, 4645, 6132, 4885, 2257, 255,
+ 2714, 440, 556, 4585, 260, 4159, 4160, 4418, 3533, 5151,
+ 2272, 2255, 5688, 1014, 2439, 2327, 1047, 2439, 3792, 2440,
+ 4398, 2968, 3904, 4418, 5993, 6174, 282, 283, 5170, 1598,
+ 1180, 4608, 5174, 1955, 4885, 4610, 1203, 2608, 2372, 2597,
+ 5258, 297, 4816, 5905, 4257, 1591, 2644, 3194, 3467, 4199,
+ 1778, 3452, 2618, 5897, 1829, 5735, 4797, 5199, 5200, 2643,
+ 1850, 5203, 4781, 4184, 4764, 5506, 4181, 5713, 5712, 4258,
+ 4181, 6180, 6011, 5887, 6100, 5474, 5218, 4131, 1851, 5244,
+ 336, 1853, 5900, 5225, 2573, 5901, 2536, 3388, 5230, 1858,
+ 3291, 5233, 5234, 2998, 350, 3386, 686, 353, 5240, 5241,
+ 2539, 540, 3960, 3122, 1473, 2679, 1675, 5871, 547, 548,
+ 549, 550, 551, 552, 2266, 1870, 392, 1864, 1645, 1277,
+ 5262, 2654, 5264, 1257, 1059, 1257, 1695, 2695, 5270, 3428,
+ 5272, 2687, 5368, 5515, 5276, 4264, 2688, 5419, 4798, 4265,
+ 4224, 1868, 425, 3207, 2699, 2401, 2, 5256, -1, -1,
+ -1, -1, 1781, 5441, -1, -1, -1, 1726, 1091, 5255,
+ 1057, -1, -1, -1, -1, 1577, 80, -1, -1, 83,
+ -1, -1, 1741, 87, 88, 89, 5318, 5319, -1, -1,
+ -1, 1078, -1, 1080, 440, 1082, -1, 5329, -1, -1,
+ 2679, 1088, 1089, 1090, -1, 5419, 6206, 6207, 112, 6113,
+ 5400, -1, -1, -1, -1, 119, 2695, -1, -1, 2698,
+ 2699, -1, -1, -1, -1, 1112, 1113, -1, -1, -1,
+ 5420, -1, -1, -1, -1, 1514, 5368, 5218, -1, -1,
+ 144, 5373, -1, -1, 5225, -1, -1, -1, 5438, 5230,
+ -1, -1, 5233, -1, -1, -1, -1, -1, 1537, 2738,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1547, -1,
+ -1, -1, 1551, -1, 5368, -1, 1555, -1, 1557, -1,
+ -1, 5262, 1841, 1842, 1563, 1844, -1, -1, -1, -1,
+ 1569, -1, -1, 1572, 540, 5276, -1, 543, 544, 545,
+ -1, 547, 548, 549, 550, 551, 552, -1, -1, -1,
+ 5442, 557, 5444, 559, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2808,
+ -1, -1, 5558, -1, -1, -1, -1, -1, 3859, 5471,
+ 5472, -1, 5474, -1, 5476, -1, -1, -1, -1, -1,
+ -1, 255, -1, 1240, -1, -1, 260, -1, -1, -1,
+ 4504, -1, -1, 5495, -1, -1, -1, -1, -1, 5501,
+ -1, -1, 1259, 5505, -1, -1, -1, -1, -1, 5511,
+ -1, -1, -1, 5515, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 297, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2885, -1, -1, -1,
+ -1, -1, -1, -1, 1301, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2902, -1, -1, 5558, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5567, -1, -1, -1, -1,
+ 5572, 5573, -1, -1, -1, 5577, 350, -1, -1, -1,
+ 5582, 5583, 5584, -1, -1, -1, -1, 80, -1, -1,
+ 83, 5442, -1, -1, -1, -1, 5598, -1, -1, -1,
+ -1, -1, 5662, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4885, -1, -1, 2966, 5620, 112,
+ 5368, -1, -1, -1, -1, 5627, 119, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5652, 144, -1, 3002, 5505, -1, 3005, 5368, 3007, -1,
+ -1, -1, 3011, 4054, 3013, 3014, 440, -1, -1, -1,
+ -1, -1, -1, 3022, 3023, 3024, -1, -1, -1, 5739,
+ -1, -1, -1, -1, -1, -1, 5688, 5689, -1, -1,
+ 5786, -1, -1, -1, -1, -1, -1, 5699, -1, -1,
+ -1, 4715, -1, -1, -1, -1, -1, -1, 5710, -1,
+ -1, 5713, -1, -1, 5716, -1, -1, -1, 211, -1,
+ -1, -1, -1, -1, -1, 5727, -1, -1, 3077, 5731,
+ -1, 5733, -1, 5735, -1, -1, -1, -1, -1, -1,
+ 5742, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4767, -1, -1, -1, -1, -1, 5761,
+ 3109, -1, 255, -1, -1, -1, 540, 260, -1, 543,
+ 544, 545, 3121, 547, 548, 549, 550, 551, 552, -1,
+ -1, -1, -1, 1078, 5786, 1080, 5788, 1082, -1, -1,
+ -1, -1, 5888, 1088, -1, -1, -1, -1, -1, 3148,
+ -1, 5652, -1, 133, 297, -1, -1, -1, -1, -1,
+ 5558, -1, -1, -1, -1, -1, -1, 1112, 1113, -1,
+ 1577, 1578, 5786, 1580, -1, -1, -1, -1, 3177, -1,
+ -1, 6073, -1, -1, -1, -1, 5838, -1, -1, 1596,
+ -1, -1, -1, -1, -1, -1, 5848, 5558, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 350, -1, -1,
+ -1, -1, 5713, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5878, 5879, 5880, -1,
+ -1, -1, -1, -1, -1, 5887, 5888, -1, -1, 5891,
+ -1, 5742, -1, -1, -1, 5897, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5906, -1, 5966, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5919, -1, -1,
+ -1, -1, -1, -1, 5888, -1, -1, -1, -1, -1,
+ 5932, -1, 5993, 5993, -1, -1, 5993, 5993, 5993, -1,
+ -1, -1, 2371, -1, -1, 1240, -1, 440, -1, -1,
+ -1, -1, -1, -1, -1, 80, -1, -1, 83, 1254,
+ 1255, -1, -1, -1, 1259, -1, -1, -1, -1, -1,
+ 5972, -1, -1, -1, -1, -1, 5978, -1, -1, -1,
+ -1, -1, -1, 4374, -1, -1, 5988, 112, -1, -1,
+ -1, -1, 5994, 5995, 119, 5997, -1, 5848, -1, -1,
+ -1, -1, -1, -1, -1, 6007, 1301, 2436, 4399, -1,
+ -1, 6013, 6073, 6073, -1, -1, 6073, 6073, 6073, 144,
+ -1, -1, -1, -1, -1, -1, 6122, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6038, -1, 5786, -1,
+ -1, -1, -1, -1, 1801, -1, -1, 540, -1, 1806,
+ 1807, -1, -1, -1, 547, 548, 549, 550, 551, 552,
+ -1, -1, 6064, -1, -1, 1822, -1, -1, 6070, -1,
+ -1, -1, -1, -1, -1, 5786, -1, -1, -1, -1,
+ -1, -1, -1, 2512, -1, 3434, 211, -1, -1, -1,
+ 6186, -1, -1, -1, -1, 6097, -1, 5368, 6100, -1,
+ 6102, 4492, 4493, -1, -1, -1, 6108, -1, 6204, -1,
+ -1, 6113, -1, 6174, 6174, -1, -1, 6174, 6174, 6174,
+ 6122, 1878, -1, 1880, 1881, -1, -1, -1, -1, -1,
+ 255, -1, -1, -1, -1, 260, -1, 5988, -1, -1,
+ 5888, 6143, 1899, -1, -1, -1, -1, -1, 1905, 1906,
+ -1, 6153, -1, -1, -1, -1, 5170, -1, 6122, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6171,
+ -1, -1, 297, 2322, -1, -1, -1, 5888, -1, -1,
+ -1, 2330, 6184, -1, 6186, -1, -1, -1, -1, -1,
+ -1, -1, 4583, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2350, 6204, -1, 6206, 6207, -1, -1, -1, -1,
+ -1, -1, -1, 6064, -1, -1, -1, 2646, -1, 6070,
+ 1977, -1, 6186, -1, -1, 350, -1, -1, -1, 3578,
+ 1987, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 6204, -1, -1, -1, -1, -1, -1, -1, 73, -1,
+ -1, 4642, -1, -1, 79, 69, -1, -1, 83, 73,
+ -1, -1, -1, -1, -1, -1, 80, -1, -1, 83,
+ -1, -1, -1, 87, 88, 89, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 110, -1, 5558, -1, -1,
+ 104, -1, -1, 107, -1, -1, -1, -1, 112, -1,
+ -1, 1596, -1, -1, -1, 119, -1, -1, -1, -1,
+ -1, -1, -1, 2070, -1, 440, 2073, 2074, -1, 3668,
+ 6171, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 144, 156, -1, -1, -1, -1, -1, -1, -1, -1,
+ -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, -1, 80, -1,
+ -1, 83, -1, 3722, 6122, 87, 88, 89, -1, 104,
+ -1, -1, -1, -1, -1, -1, -1, 112, -1, -1,
+ -1, -1, 104, -1, 119, -1, -1, -1, -1, -1,
+ 112, -1, -1, 228, -1, -1, -1, 119, 4799, -1,
+ -1, 6122, -1, -1, -1, 540, -1, -1, 2175, 144,
+ -1, -1, 547, 548, 549, 550, 551, 552, -1, -1,
+ -1, -1, 144, -1, -1, 4826, -1, -1, 6186, -1,
+ 80, 255, 3791, 83, -1, 2594, 260, 87, 88, 89,
+ -1, -1, -1, -1, -1, -1, 6204, 5471, -1, 83,
+ -1, -1, -1, -1, 104, -1, -1, -1, 282, 283,
+ -1, -1, 112, -1, -1, 6186, -1, -1, -1, 119,
+ -1, 5495, -1, 297, -1, -1, 3835, -1, -1, -1,
+ -1, -1, -1, 6204, -1, -1, -1, -1, -1, -1,
+ 3849, 3850, 4893, -1, 144, -1, 1801, 2264, -1, -1,
+ 3859, 1806, 1807, -1, -1, 5786, 3865, -1, 3867, -1,
+ -1, -1, 336, -1, -1, -1, -1, 1822, -1, -1,
+ 255, -1, 2289, -1, -1, 260, 350, -1, -1, 353,
+ -1, -1, 2299, 255, 2301, -1, -1, -1, 260, -1,
+ 2307, -1, -1, -1, 2311, -1, -1, 282, 283, 97,
+ -1, -1, -1, -1, 3913, -1, 391, 897, -1, -1,
+ 282, 283, 297, -1, -1, -1, 906, -1, -1, -1,
+ -1, -1, -1, -1, 914, 297, -1, 917, -1, -1,
+ -1, -1, -1, -1, 1889, -1, -1, -1, 3947, 3948,
+ -1, 426, -1, 2360, -1, -1, 2363, -1, 146, -1,
+ -1, 336, -1, -1, -1, 255, -1, 5888, -1, -1,
+ 260, -1, -1, -1, 336, 350, 440, -1, 353, -1,
+ -1, -1, 3981, -1, -1, -1, -1, -1, 350, -1,
+ 178, 353, 282, 283, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 297, -1, -1,
+ -1, -1, -1, 201, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 212, -1, -1, -1, -1, -1,
+ -1, -1, 1977, -1, -1, -1, -1, -1, 1018, -1,
+ -1, -1, 1987, -1, -1, 233, 336, 1027, -1, -1,
+ 238, -1, 5716, -1, 1034, 2462, 2463, 1037, -1, -1,
+ 350, -1, 2469, 2470, -1, 440, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 540, -1, 440, 543,
+ 544, 545, -1, 547, 548, 549, 550, 551, 552, -1,
+ -1, -1, 2499, -1, -1, -1, -1, -1, -1, -1,
+ -1, 289, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 310, -1, -1, 2070, -1, -1, 2073, 2074,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4138,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2555, -1,
+ 440, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 540, -1, -1, 543, 544,
+ 545, -1, 547, 548, 549, 550, 551, 552, 540, -1,
+ -1, 543, 544, 545, 559, 547, 548, 549, 550, 551,
+ 552, -1, -1, -1, -1, 383, 384, 559, -1, 387,
+ -1, 6122, -1, -1, -1, 5246, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2627, 2628, -1, 5887, -1, 413, -1, -1, 416, -1,
+ 2175, -1, -1, -1, 422, -1, -1, -1, -1, -1,
+ -1, 429, 3321, -1, -1, -1, -1, -1, -1, -1,
+ 540, -1, -1, 543, 544, 545, -1, 547, 548, 549,
+ 550, 551, 552, -1, 92, 6186, -1, -1, 2675, 97,
+ 458, -1, -1, -1, -1, -1, 464, 5318, -1, 467,
+ -1, -1, -1, 6204, -1, -1, 3365, -1, 2695, -1,
+ -1, 2698, 2699, -1, -1, -1, -1, -1, 486, -1,
+ -1, -1, -1, -1, 132, -1, -1, -1, -1, 3388,
+ -1, -1, -1, -1, -1, -1, -1, 145, -1, -1,
+ -1, -1, -1, -1, 512, 3404, -1, -1, -1, -1,
+ 3129, 2738, 160, -1, -1, -1, -1, -1, 3137, -1,
+ -1, 3420, -1, 6007, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3154, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3164, -1, -1, 3167, -1,
+ 3169, 3170, -1, 201, 3173, 4374, -1, -1, -1, -1,
+ 3179, -1, 3181, -1, 212, 3184, -1, -1, -1, -1,
+ -1, -1, 1372, -1, -1, -1, -1, -1, -1, -1,
+ 4399, -1, 3481, 1383, -1, 233, 3485, -1, 4407, 1389,
+ 238, 4410, 1392, 4412, 889, -1, -1, -1, 893, -1,
+ -1, -1, -1, -1, -1, -1, 2833, -1, -1, -1,
+ -1, 906, 907, 6097, -1, -1, -1, -1, 6102, 914,
+ -1, 916, 917, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 930, 4455, -1, -1, -1,
+ -1, 3260, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4471, -1, -1, -1, 4475, 4476, -1, 4478,
+ -1, -1, 310, 1463, 1464, 1465, -1, -1, -1, -1,
+ -1, -1, -1, 968, -1, -1, -1, -1, -1, 974,
+ -1, -1, -1, -1, -1, 2912, -1, -1, -1, -1,
+ -1, -1, 987, 2920, -1, -1, 2923, -1, -1, -1,
+ -1, -1, 350, -1, -1, -1, -1, -1, 2935, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1013, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1027, 1028, -1, 383, 384, 5598, -1, 1034,
+ -1, 1036, 1037, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 80, -1, 1050, 83, -1, -1, 4578,
+ 87, 88, 89, -1, 4583, -1, -1, -1, 416, -1,
+ -1, 1066, -1, -1, 422, -1, -1, 104, -1, -1,
+ -1, 429, -1, -1, 432, 112, -1, -1, -1, -1,
+ -1, -1, 119, -1, -1, -1, -1, -1, -1, 4618,
+ 4619, 4620, 4621, 4622, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 907, -1, -1, 464, 144, -1, -1,
+ -1, -1, 916, 471, -1, -1, -1, -1, -1, -1,
+ -1, 479, -1, -1, -1, -1, 930, -1, 486, -1,
+ -1, 4660, 4661, 4662, -1, 4664, 4665, 4666, 4667, 4668,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 512, -1, -1, -1, -1, -1,
+ 1165, -1, -1, -1, 968, -1, -1, -1, -1, -1,
+ 974, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1186, -1, 987, -1, -1, 1191, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1203, -1,
+ 2675, -1, -1, -1, 2679, -1, -1, -1, -1, -1,
+ 3147, 3148, -1, -1, -1, -1, -1, -1, 255, -1,
+ 2695, -1, -1, 260, -1, -1, -1, -1, -1, 80,
+ 107, -1, 83, -1, -1, 3564, 87, 88, 89, -1,
+ -1, -1, -1, -1, -1, 282, 283, -1, -1, 1254,
+ 1255, 128, -1, 104, -1, -1, -1, -1, -1, -1,
+ 297, 112, -1, 2738, -1, -1, -1, 4796, 119, 80,
+ 4799, 4800, 83, -1, -1, -1, 87, 88, 89, -1,
+ -1, -1, -1, -1, -1, 162, -1, 3224, -1, -1,
+ -1, -1, -1, 144, -1, -1, -1, 4826, -1, 336,
+ -1, 112, -1, -1, -1, -1, -1, -1, 119, -1,
+ -1, -1, -1, 350, -1, 3924, 353, -1, 3647, -1,
+ 3649, -1, -1, -1, -1, 3934, -1, -1, -1, -1,
+ -1, -1, -1, 144, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 222, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3963, -1, -1, -1, -1, -1,
+ 1365, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1383, -1,
+ 257, -1, -1, -1, 1389, -1, -1, 1392, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 440, 255, -1, -1, -1, -1, 260,
+ -1, 288, -1, -1, -1, -1, 293, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 282, 283, -1, -1, -1, -1, 2912, -1, -1,
+ -1, -1, -1, -1, 255, 2920, 297, -1, 2923, 260,
+ 1254, 1255, -1, -1, -1, -1, 333, -1, -1, 3788,
+ 2935, -1, 4991, 4992, -1, 3794, -1, -1, -1, -1,
+ -1, 282, 283, -1, -1, 5004, -1, 5006, 5007, -1,
+ -1, 5010, -1, -1, -1, 336, 297, -1, 365, -1,
+ -1, -1, 3429, -1, -1, 3432, -1, 3434, -1, 350,
+ -1, -1, 353, 540, -1, -1, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, -1, -1, -1, -1,
+ 557, -1, 3459, 3460, -1, 336, -1, 107, -1, 406,
+ -1, -1, -1, 410, -1, -1, -1, -1, -1, 350,
+ -1, -1, 419, -1, 1549, 5074, -1, -1, 128, -1,
+ 427, 6122, -1, -1, 128, -1, 4165, -1, 435, -1,
+ -1, -1, 1567, -1, -1, -1, -1, -1, -1, -1,
+ 447, -1, 4181, -1, -1, 4184, -1, -1, -1, 456,
+ -1, -1, 162, 460, 5113, -1, -1, -1, 162, 440,
+ -1, 1596, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 479, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6186, -1, -1, 4227, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1632, 5157, 440,
+ -1, -1, -1, 6204, -1, -1, -1, 514, -1, -1,
+ -1, 518, 222, 1648, -1, -1, -1, -1, 222, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1664,
+ 3989, -1, 3991, 1668, 3993, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4002, -1, -1, -1, 257, -1, -1,
+ -1, -1, -1, 257, -1, -1, -1, -1, -1, 540,
+ -1, -1, 543, 544, 545, -1, 547, 548, 549, 550,
+ 551, 552, -1, -1, -1, -1, 557, -1, 288, -1,
+ -1, -1, -1, 293, -1, -1, -1, 4046, -1, 293,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 540,
+ -1, -1, 543, 544, 545, -1, 547, 548, 549, 550,
+ 551, 552, -1, -1, -1, -1, -1, -1, -1, 3224,
+ -1, -1, -1, 333, -1, 329, -1, -1, -1, 333,
+ -1, -1, 2272, -1, -1, 2275, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 365, -1, -1, -1, 5318,
+ 364, 365, -1, 1798, -1, -1, -1, -1, -1, -1,
+ -1, 1806, 1807, -1, -1, -1, 2316, 2317, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1822, -1, -1,
+ -1, 2331, -1, -1, 2334, -1, 406, -1, 402, -1,
+ 410, -1, 406, -1, 5363, -1, 410, -1, -1, 419,
+ -1, -1, -1, 5372, -1, 419, -1, 427, -1, -1,
+ -1, -1, -1, 427, -1, 435, -1, -1, -1, -1,
+ -1, 435, -1, 1868, 1869, 1870, -1, 447, -1, -1,
+ -1, -1, -1, 447, -1, -1, 456, -1, -1, -1,
+ 460, -1, 456, 73, 1889, -1, 460, 80, -1, 79,
+ 83, -1, -1, 83, 87, 88, 89, -1, -1, 479,
+ -1, -1, 2412, -1, -1, 2415, 2416, -1, -1, -1,
+ -1, 104, -1, 1918, -1, -1, -1, -1, -1, 112,
+ 110, 1926, 3859, -1, -1, -1, 119, -1, -1, -1,
+ -1, -1, -1, 1938, 514, -1, -1, 4546, 518, -1,
+ 514, 5, -1, -1, -1, -1, 3883, -1, -1, -1,
+ -1, 144, -1, -1, -1, -1, -1, -1, -1, 3434,
+ 24, -1, -1, -1, -1, 4574, 156, -1, -1, -1,
+ 34, 35, -1, -1, -1, 39, -1, 41, 42, -1,
+ 1023, 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, 1049, 71, -1, 73,
+ -1, 75, 76, -1, -1, 205, -1, 81, -1, -1,
+ -1, -1, -1, 213, -1, 215, 4635, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3974, 228, -1,
+ -1, -1, -1, 80, 3981, -1, 83, -1, -1, -1,
+ 87, 88, 89, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 255, -1, -1, -1, -1, 260, -1, 5598,
+ -1, 135, -1, 5602, -1, 112, -1, -1, -1, -1,
+ -1, -1, 119, -1, -1, 1889, -1, -1, -1, 282,
+ 283, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 297, -1, -1, 144, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4054, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2131, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 336, -1, -1, 210, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 350, -1, -1,
+ 353, -1, -1, -1, -1, 229, 4775, -1, -1, -1,
+ 4779, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 252, -1,
+ -1, -1, -1, 2198, -1, -1, -1, -1, -1, -1,
+ -1, 391, -1, -1, -1, 4814, 4815, -1, -1, -1,
+ -1, -1, 276, -1, -1, -1, -1, 2222, 255, -1,
+ -1, -1, -1, 260, -1, 2230, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 426, 2242, -1, -1,
+ -1, -1, -1, -1, -1, 282, 283, 440, -1, 313,
+ -1, -1, 316, -1, -1, -1, -1, -1, -1, 5788,
+ 297, 2771, -1, 5792, -1, 5794, -1, -1, 2778, 5798,
+ 5799, 2781, 2782, -1, 338, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 94, -1, -1,
+ -1, -1, -1, 100, -1, -1, -1, -1, -1, 336,
+ 4629, -1, -1, -1, 4633, -1, 113, -1, -1, -1,
+ -1, 2316, 2317, 350, 2319, 2320, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4261, -1, 2331, 2131, 2333, 2334,
+ -1, -1, -1, -1, -1, 142, 1379, -1, -1, -1,
+ -1, 2346, 2347, -1, -1, -1, -1, 540, -1, -1,
+ 543, 544, 545, -1, 547, 548, 549, 550, 551, 552,
+ -1, 1404, 426, -1, 557, -1, -1, 2372, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1419, -1, -1, -1,
+ -1, -1, -1, -1, 3859, -1, -1, 194, -1, 196,
+ -1, -1, -1, -1, -1, -1, 203, -1, -1, 206,
+ -1, -1, -1, 440, -1, -1, -1, 2412, -1, -1,
+ 2415, 2416, 476, -1, -1, -1, -1, -1, 2222, -1,
+ -1, -1, -1, -1, -1, 232, 2230, -1, 492, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4374, 2242, -1,
+ -1, -1, -1, 507, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 266,
+ -1, -1, 4399, -1, -1, -1, -1, -1, -1, 4406,
+ -1, -1, -1, 537, -1, -1, -1, -1, -1, -1,
+ 4417, 545, -1, 547, 548, 549, 550, 551, -1, -1,
+ 554, 555, 556, 557, -1, 559, 560, 561, 562, 563,
+ -1, -1, 2507, 540, -1, -1, 543, 544, 545, 6038,
+ 547, 548, 549, 550, 551, 552, 2320, -1, -1, -1,
+ -1, -1, 329, -1, -1, -1, 333, -1, -1, -1,
+ -1, 4860, 94, -1, -1, -1, 343, -1, 100, -1,
+ -1, -1, -1, 2347, -1, 352, -1, -1, -1, -1,
+ -1, 113, -1, -1, -1, 4492, 4493, 364, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4904, 4905, -1, -1, 4054,
+ 142, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2595, -1, 2597, 6122, -1, 402, -1, -1, 405, 406,
+ -1, -1, -1, 1646, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5225, -1, -1, -1,
+ -1, 5230, -1, -1, 5233, -1, -1, -1, 435, -1,
+ -1, -1, 194, -1, 196, -1, -1, -1, -1, -1,
+ -1, 203, -1, -1, 206, -1, 4583, -1, -1, -1,
+ -1, -1, 2657, -1, 2659, -1, -1, 6186, -1, -1,
+ -1, -1, -1, -1, -1, 4994, 4995, -1, -1, -1,
+ 232, -1, -1, -1, 2679, 6204, -1, -1, -1, -1,
+ -1, 4618, 4619, 4620, 4621, 4622, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 503, 2702, -1, 889,
+ -1, -1, -1, 893, 266, 4642, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2720, -1, 907, -1, -1,
+ 2725, 2726, -1, -1, -1, 2730, 916, -1, -1, -1,
+ -1, -1, -1, 2738, -1, -1, -1, -1, -1, -1,
+ 930, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2756, 3262, -1, -1, -1, -1, -1, 3268, -1,
+ -1, 3271, -1, -1, 3274, -1, -1, 329, -1, -1,
+ -1, 333, -1, 2778, -1, -1, 2781, 2782, 968, -1,
+ -1, 343, -1, -1, 974, -1, -1, -1, -1, -1,
+ 352, 5400, -1, -1, 5123, -1, 2801, 987, -1, -1,
+ -1, -1, 364, -1, -1, 5134, 5135, -1, -1, -1,
+ -1, 5420, -1, -1, -1, -1, 2821, 2822, -1, -1,
+ -1, 5150, -1, 1013, -1, -1, -1, -1, -1, 5438,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1028, -1,
+ 402, -1, -1, 405, 406, -1, 1036, 2852, 2853, -1,
+ -1, 2856, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1050, -1, 4799, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2877, 435, 2879, 2679, 1066, -1, 2883, -1,
+ -1, -1, -1, -1, -1, 2890, -1, -1, -1, 4826,
+ -1, -1, 2897, -1, -1, 2900, 5505, -1, 2702, 4374,
+ -1, 2906, -1, -1, -1, -1, 5515, -1, -1, -1,
+ 3420, -1, -1, -1, -1, -1, 2720, -1, -1, -1,
+ -1, 2926, 2726, -1, 4399, -1, 2730, 2932, -1, -1,
+ -1, 4406, 2937, -1, -1, 2940, -1, -1, -1, -1,
+ -1, 503, 4417, -1, -1, 2950, -1, -1, -1, -1,
+ 4887, -1, 2756, -1, -1, -1, 4893, -1, 2963, -1,
+ 4897, -1, -1, 2968, -1, -1, -1, -1, -1, 2974,
+ -1, 3481, -1, 1163, -1, 1165, -1, 1167, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4923, 4924, -1, -1,
+ -1, 4928, 4929, 2036, -1, -1, 1186, 2801, -1, -1,
+ -1, 1191, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 80, 1203, -1, 83, -1, 2821, -1, 87,
+ 88, 89, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3040, 104, -1, -1, -1,
+ -1, -1, -1, 5652, 112, -1, -1, -1, -1, 2853,
+ -1, 119, -1, 5662, -1, -1, -1, -1, -1, 80,
+ -1, -1, 83, -1, 1254, 1255, 87, 88, 89, -1,
+ -1, -1, -1, 2877, -1, -1, 144, -1, -1, 2883,
+ -1, -1, -1, 104, 94, -1, 2890, -1, -1, -1,
+ 100, 112, -1, 2897, -1, -1, 2900, -1, 119, -1,
+ -1, -1, 2906, 113, -1, -1, -1, -1, 4583, -1,
+ -1, -1, -1, -1, -1, -1, 3121, -1, -1, -1,
+ -1, -1, 2926, 144, -1, 2168, -1, -1, 2932, -1,
+ 5739, -1, 142, 2937, -1, -1, -1, -1, 5467, -1,
+ -1, -1, 2185, -1, -1, -1, 2950, -1, -1, 1339,
+ 1340, -1, -1, -1, -1, -1, -1, -1, -1, 2963,
+ 2203, -1, -1, -1, -1, -1, -1, 4642, -1, -1,
+ 2974, -1, 3177, -1, -1, 1365, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 196, 255, -1, -1,
+ -1, -1, 260, 203, -1, -1, 206, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5540, -1, -1, 282, 283, 2259, -1, -1, -1,
+ -1, -1, 232, -1, -1, -1, -1, 3232, -1, 297,
+ -1, -1, -1, -1, 255, 2278, -1, -1, -1, 260,
+ -1, -1, -1, -1, -1, 3250, -1, -1, 2291, -1,
+ -1, -1, -1, 3258, -1, -1, 266, -1, -1, -1,
+ 2303, 282, 283, 3268, 5593, -1, 3271, -1, 336, 3274,
+ -1, -1, -1, -1, -1, -1, 297, -1, -1, -1,
+ -1, -1, 350, -1, -1, 353, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 94, -1,
+ 2343, 2344, -1, -1, 100, -1, -1, -1, -1, 5246,
+ -1, 107, -1, -1, 94, 336, -1, -1, -1, 329,
+ 100, -1, -1, 333, -1, -1, -1, -1, -1, 350,
+ 126, -1, 353, 343, -1, 3340, -1, -1, -1, -1,
+ -1, 3346, 352, -1, -1, -1, 142, -1, -1, -1,
+ -1, -1, -1, -1, 364, -1, -1, 5966, -1, 1549,
+ -1, -1, 142, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 440, -1, -1, -1, -1, 1567, -1, -1,
+ 176, 5318, -1, -1, 5993, -1, -1, -1, -1, -1,
+ -1, -1, 402, -1, -1, 405, 406, -1, -1, -1,
+ 196, -1, -1, -1, -1, -1, 1596, 203, -1, -1,
+ 206, -1, 4887, -1, -1, -1, 196, -1, 4893, 440,
+ -1, -1, 4897, 203, -1, 435, 206, -1, 3232, 3434,
+ -1, -1, -1, -1, -1, -1, 232, -1, -1, -1,
+ -1, -1, 1632, -1, -1, -1, 3250, -1, -1, -1,
+ -1, -1, 232, -1, 3258, -1, -1, -1, 1648, 2502,
+ -1, -1, -1, -1, 6073, -1, -1, 263, -1, -1,
+ 266, -1, 540, -1, 1664, 543, 544, 545, 1668, 547,
+ 548, 549, 550, 551, 552, -1, 266, -1, -1, 557,
+ -1, -1, -1, 503, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 311, -1, -1, 314, 540,
+ -1, -1, 543, 544, 545, -1, 547, 548, 549, 550,
+ 551, 552, -1, 329, -1, -1, 557, 333, -1, 94,
+ -1, -1, -1, 3548, 3549, 100, -1, 343, -1, 329,
+ -1, 80, 107, 333, 83, -1, 352, -1, 87, 88,
+ 89, -1, -1, 343, -1, 6174, -1, 363, 364, -1,
+ 3575, 126, 352, 3578, -1, 104, -1, -1, -1, -1,
+ -1, -1, -1, 112, 364, -1, -1, 142, -1, -1,
+ 119, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 402, -1, 1798, 405,
+ 406, 407, -1, -1, -1, 144, 1806, 1807, -1, -1,
+ -1, 176, 402, -1, -1, 405, 406, -1, -1, -1,
+ -1, -1, 1822, 429, -1, -1, -1, -1, -1, 435,
+ -1, 196, -1, -1, -1, -1, -1, -1, 203, -1,
+ -1, 206, -1, 449, -1, 435, -1, 3662, 3663, 3664,
+ -1, 5598, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4181, -1, -1, 4184, -1, -1, 232, 1868, 1869,
+ 1870, 3686, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6022, -1, -1, -1, -1, -1, 1889,
+ -1, 3706, -1, -1, -1, -1, -1, 503, 263, -1,
+ -1, 266, -1, -1, -1, -1, -1, -1, -1, 3724,
+ -1, -1, -1, 503, -1, -1, 255, -1, 1918, -1,
+ -1, 260, 2775, -1, -1, -1, 1926, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2789, -1, 1938, -1,
+ -1, -1, -1, 282, 283, -1, 311, -1, 1948, 314,
+ -1, -1, 5699, -1, -1, -1, -1, -1, 297, -1,
+ -1, 3575, -1, -1, 329, -1, 83, 4287, 333, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2830, 343, -1,
+ -1, -1, -1, -1, -1, -1, -1, 352, -1, 1989,
+ -1, -1, -1, 110, -1, -1, 3811, 336, 363, 364,
+ -1, -1, -1, -1, -1, -1, -1, -1, 163, -1,
+ -1, 350, -1, -1, 353, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5778, -1, 5318, -1, -1, -1, 402, -1, 156,
+ 405, 406, 407, 3858, -1, 2045, -1, -1, -1, -1,
+ 3865, -1, 3867, -1, -1, -1, -1, -1, 213, -1,
+ -1, -1, 2062, -1, 429, 3880, -1, 3882, -1, -1,
+ 435, 226, 3686, -1, -1, -1, 231, -1, -1, -1,
+ -1, 236, -1, -1, 449, -1, -1, 242, 205, 3904,
+ 245, -1, -1, -1, 249, -1, 213, -1, 215, -1,
+ -1, 440, -1, -1, -1, -1, -1, -1, 898, 899,
+ -1, 228, 902, -1, -1, -1, -1, -1, -1, -1,
+ -1, 80, -1, 278, 83, -1, -1, -1, 87, 88,
+ 89, 2131, 922, 3948, -1, -1, -1, -1, 503, 929,
+ -1, -1, -1, 298, -1, 104, -1, -1, -1, -1,
+ -1, -1, -1, 112, -1, -1, -1, -1, -1, -1,
+ 119, -1, -1, -1, -1, -1, -1, 957, -1, 959,
+ -1, -1, -1, 963, -1, -1, -1, -1, 3031, -1,
+ -1, -1, -1, -1, -1, 144, 4001, 977, -1, -1,
+ 345, -1, -1, 348, 984, -1, -1, 3811, 2198, 354,
+ -1, 540, -1, -1, 543, 544, 545, 4022, 547, 548,
+ 549, 550, 551, 552, -1, -1, -1, -1, 557, 5,
+ -1, -1, 2222, -1, -1, -1, 4546, -1, -1, 4044,
+ 2230, -1, 4047, -1, -1, -1, -1, -1, 24, -1,
+ -1, -1, 2242, -1, -1, -1, -1, -1, 34, 35,
+ -1, -1, -1, -1, 409, 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, 255, -1, -1, -1,
+ -1, 260, -1, -1, -1, -1, -1, -1, -1, 464,
+ -1, -1, -1, 5598, 4129, -1, -1, -1, -1, 2319,
+ 2320, -1, -1, 282, 283, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2333, -1, -1, -1, 492, 297, -1,
+ -1, -1, -1, -1, -1, -1, 2346, 2347, -1, 135,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 516, -1, 518, 519, -1, -1, -1, -1, -1,
+ -1, -1, 2372, -1, -1, 6122, -1, 336, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4001, -1, -1,
+ -1, 350, -1, -1, 353, 3248, -1, -1, -1, 554,
+ -1, -1, 557, 558, -1, 560, -1, -1, 4022, -1,
+ -1, -1, 3265, -1, 5699, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 210, -1, -1, 3280, -1, -1,
+ -1, -1, -1, 4047, -1, -1, -1, -1, 94, 6186,
+ -1, -1, -1, 229, 100, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4775, -1, 6204, -1, 4779,
+ -1, -1, -1, -1, -1, -1, 252, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 440, -1, -1, -1, -1, 142, -1, -1, -1,
+ 276, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4318, -1, -1, -1, 2507, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1307, 1308, -1,
+ -1, -1, -1, -1, -1, -1, -1, 313, -1, -1,
+ 316, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 196, -1, -1, -1, -1, -1, -1, 203, -1, -1,
+ 206, -1, 338, 4368, -1, -1, -1, -1, 4373, -1,
+ 4375, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 232, -1, -1, -1,
+ -1, 540, -1, 4398, 543, 544, 545, -1, 547, 548,
+ 549, 550, 551, 552, -1, 2595, -1, 2597, 557, -1,
+ -1, -1, -1, 4418, -1, -1, -1, -1, -1, -1,
+ 266, -1, -1, -1, -1, -1, -1, 1407, -1, 4434,
+ -1, -1, 4437, -1, -1, -1, -1, -1, -1, 80,
+ -1, -1, 83, -1, -1, -1, 87, 88, 89, -1,
+ 426, -1, -1, -1, -1, 1435, 1436, -1, -1, -1,
+ -1, -1, -1, 104, -1, -1, -1, 2657, -1, 2659,
+ -1, 112, -1, -1, -1, -1, -1, -1, 119, -1,
+ -1, 1461, -1, 329, -1, -1, -1, 333, -1, 2679,
+ -1, -1, -1, -1, -1, -1, -1, 343, -1, -1,
+ 476, -1, -1, 144, -1, -1, 352, -1, -1, -1,
+ -1, -1, 2702, -1, 4318, -1, 492, -1, 364, -1,
+ -1, -1, -1, -1, 4529, 4530, -1, -1, 5038, -1,
+ 2720, 507, -1, -1, 4539, 2725, 2726, -1, 80, 3582,
+ 2730, 83, -1, -1, -1, 87, 88, 89, 2738, -1,
+ -1, -1, -1, 4558, -1, -1, 402, -1, 3601, 405,
+ 406, 537, 104, -1, 1544, 1545, 2756, -1, -1, 545,
+ 112, 547, 548, 549, 550, 551, -1, 119, 554, 555,
+ 556, -1, 889, -1, -1, 561, 562, -1, -1, 435,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 907, -1, 144, -1, -1, -1, -1, -1, -1, 916,
+ -1, 2801, 4617, 80, 255, -1, 83, -1, -1, 260,
+ 87, 88, 89, 930, 2814, -1, -1, -1, -1, -1,
+ 4434, 2821, 2822, 4437, -1, -1, -1, 104, -1, -1,
+ 4645, 282, 283, -1, -1, 112, -1, -1, -1, -1,
+ -1, -1, 119, 3696, -1, 3698, 297, 503, -1, -1,
+ -1, 968, 2852, 2853, -1, -1, 2856, 974, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 144, -1, -1,
+ 987, -1, -1, -1, -1, -1, -1, 2877, -1, 2879,
+ -1, -1, -1, 2883, -1, 336, -1, -1, -1, -1,
+ 2890, -1, -1, -1, -1, 2895, 1013, 2897, 5218, 350,
+ 2900, -1, 353, 255, -1, 5225, 2906, -1, 260, -1,
+ 5230, 1028, -1, 5233, 5234, -1, -1, -1, -1, 1036,
+ -1, -1, -1, -1, -1, 4539, 2926, -1, -1, -1,
+ 282, 283, 2932, 1050, -1, -1, 3789, 2937, -1, -1,
+ 2940, -1, 5262, -1, 4558, 297, -1, -1, -1, 1066,
+ 2950, -1, -1, -1, -1, -1, 5276, -1, -1, -1,
+ -1, -1, -1, 2963, -1, -1, -1, -1, 2968, -1,
+ -1, -1, -1, -1, 2974, -1, -1, 3830, 255, -1,
+ -1, -1, -1, 260, 336, -1, -1, -1, -1, 440,
+ -1, -1, -1, -1, -1, -1, -1, -1, 350, -1,
+ -1, 353, -1, -1, -1, 282, 283, -1, -1, 5329,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 297, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4645, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3040, -1, -1, -1, -1, -1, 1163, -1, 1165, -1,
+ 1167, -1, -1, 5373, -1, -1, 94, -1, -1, 336,
+ -1, -1, 100, -1, -1, 4880, -1, -1, -1, -1,
+ 4885, -1, -1, 350, 1191, 3928, 353, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1203, -1, 440, 540,
+ -1, -1, 543, 544, 545, -1, 547, 548, 549, 550,
+ 551, 552, -1, -1, 142, 4920, 557, -1, -1, -1,
+ -1, -1, 3965, -1, -1, -1, -1, 4932, -1, -1,
+ -1, 3121, 5442, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1254, 1255, -1,
+ -1, -1, 80, -1, -1, 83, -1, 4962, -1, 87,
+ 88, 89, -1, -1, -1, -1, -1, -1, 196, -1,
+ -1, -1, -1, 440, -1, 203, 104, -1, 206, -1,
+ -1, -1, -1, -1, 112, -1, -1, 3177, -1, -1,
+ -1, 119, -1, -1, -1, 5505, -1, -1, 540, -1,
+ -1, 543, 544, 545, 232, 547, 548, 549, 550, 551,
+ 552, -1, 1992, -1, -1, 557, 144, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4070, -1, -1,
+ -1, -1, 1339, 1340, -1, -1, -1, 2017, 266, -1,
+ -1, -1, 3232, -1, -1, -1, -1, -1, -1, -1,
+ 4093, -1, -1, -1, -1, -1, 5061, -1, 1365, -1,
+ 3250, -1, -1, -1, -1, -1, -1, -1, 3258, -1,
+ -1, -1, -1, 540, -1, 4118, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, -1, -1, -1, -1,
+ 557, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 329, -1, -1, -1, 333, -1, -1, -1, -1,
+ 2090, 4154, -1, -1, -1, 343, 4920, 5627, -1, -1,
+ -1, -1, -1, -1, 352, -1, -1, 255, 4932, -1,
+ -1, -1, 260, -1, -1, -1, 364, 2117, 2118, 2119,
+ 2120, -1, 5652, -1, -1, -1, 5151, -1, -1, -1,
+ 3340, -1, -1, -1, 282, 283, 3346, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 297,
+ -1, -1, -1, -1, 402, -1, -1, 405, 406, -1,
+ -1, -1, -1, -1, -1, -1, -1, 80, -1, -1,
+ 83, -1, -1, -1, 87, 88, 89, 2177, 2178, -1,
+ -1, -1, -1, 5713, -1, -1, -1, 435, 336, -1,
+ -1, 104, -1, -1, -1, -1, -1, 2197, -1, 112,
+ -1, -1, 350, -1, -1, 353, 119, -1, 94, -1,
+ -1, -1, 5742, -1, 100, -1, -1, -1, 80, -1,
+ -1, 83, 1549, -1, 3434, 87, 88, 89, -1, -1,
+ -1, 144, 2232, 2233, 2234, 2235, -1, -1, -1, -1,
+ 1567, -1, 104, -1, -1, 5270, -1, 5272, -1, -1,
+ 112, -1, -1, -1, -1, 503, 142, 119, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1596,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 144, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 440, -1, 5319, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5329, 1632, -1, -1, -1, -1,
+ 196, -1, -1, -1, -1, -1, -1, 203, 5848, -1,
+ 206, 1648, -1, -1, -1, -1, -1, 5151, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1664, 3548, 3549,
+ -1, 1668, 255, 5368, -1, -1, 232, 260, 5373, -1,
+ -1, -1, 2352, -1, -1, -1, -1, -1, 2358, -1,
+ -1, -1, -1, -1, -1, 3575, -1, -1, 3578, 282,
+ 283, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 266, -1, -1, -1, 297, -1, -1, -1, -1, 5919,
+ -1, -1, 540, 255, -1, 543, 544, 545, 260, 547,
+ 548, 549, 550, 551, 552, -1, -1, -1, -1, 557,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 282, 283, -1, 336, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 297, -1, 350, -1, -1,
+ 353, -1, 5972, 329, -1, -1, 5270, 333, 5272, -1,
+ -1, -1, 3662, 3663, 3664, -1, -1, 343, 5988, -1,
+ -1, -1, -1, -1, 5994, 5995, 352, -1, -1, -1,
+ 4533, 1798, -1, -1, 336, -1, 3686, -1, 364, 1806,
+ 1807, -1, -1, -1, -1, -1, -1, -1, 350, -1,
+ -1, 353, -1, -1, -1, 1822, 3706, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 94, -1, -1,
+ 2510, -1, -1, 100, 3724, -1, 402, -1, -1, 405,
+ 406, -1, -1, -1, -1, -1, -1, 440, -1, -1,
+ -1, -1, -1, 5558, 6064, -1, -1, -1, -1, -1,
+ 6070, 1868, -1, -1, -1, -1, -1, -1, -1, 435,
+ -1, -1, -1, -1, -1, 142, -1, -1, -1, 5584,
+ -1, -1, 1889, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5598, -1, -1, -1, -1, 440, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 94, -1, -1, -1, -1, -1,
+ 100, 3811, -1, -1, -1, -1, -1, -1, -1, 196,
+ -1, 1938, -1, -1, -1, -1, 203, 503, -1, 206,
+ -1, 1948, -1, -1, -1, -1, -1, 540, -1, -1,
+ 543, 544, 545, -1, 547, 548, 549, 550, 551, 552,
+ -1, 6171, 142, -1, 557, 232, -1, -1, 3858, -1,
+ -1, -1, -1, -1, 6184, 3865, -1, 3867, -1, -1,
+ -1, -1, 1989, -1, -1, -1, -1, -1, -1, -1,
+ 3880, -1, 3882, 4736, -1, -1, 6206, 6207, 540, 266,
+ -1, 543, 544, 545, -1, 547, 548, 549, 550, 551,
+ 552, -1, -1, -1, 3904, 557, 196, -1, -1, -1,
+ -1, -1, -1, 203, -1, -1, 206, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2045, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 232, -1, -1, 2062, -1, -1, 3948, -1,
+ -1, -1, 329, -1, -1, -1, 333, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 343, -1, -1, -1,
+ -1, 5786, -1, 5788, -1, 352, 266, -1, -1, -1,
+ -1, -1, -1, 2773, 2774, -1, -1, 364, -1, -1,
+ -1, -1, -1, -1, 2784, 80, 2786, -1, 83, -1,
+ 2790, 4001, 87, 88, 89, -1, -1, -1, -1, 4862,
+ -1, -1, -1, -1, 2131, -1, -1, -1, -1, 104,
+ -1, -1, 4022, -1, -1, 402, -1, 112, 405, 406,
+ -1, -1, -1, -1, 119, -1, -1, -1, -1, 329,
+ -1, -1, -1, 333, 4044, -1, -1, 4047, -1, -1,
+ 4903, -1, -1, 343, -1, -1, -1, -1, 435, 144,
+ -1, -1, 352, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4925, 5888, 364, -1, -1, -1, -1, -1,
+ -1, 2198, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5906, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5919, 2222, -1, -1, -1, 3,
+ -1, -1, 402, 2230, 8, 405, 406, 5932, 12, -1,
+ 14, -1, 16, 17, -1, 2242, 503, -1, 2918, 4129,
+ -1, 2921, -1, 27, -1, -1, -1, -1, -1, -1,
+ 4993, -1, -1, -1, -1, 435, -1, -1, -1, 43,
+ 44, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 255, -1, -1, -1, -1, 260, -1, -1, -1, 5994,
+ 5995, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 90, 282, 283, -1,
+ -1, -1, 2319, 2320, -1, -1, 100, -1, 102, 103,
+ -1, -1, 297, 503, 3004, -1, 2333, -1, -1, -1,
+ -1, -1, 3012, 6038, 118, 3015, -1, -1, -1, 2346,
+ 2347, 3021, -1, 127, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3032, -1, -1, 139, -1, 141, 142, -1,
+ -1, 336, -1, -1, 148, 2372, 150, -1, -1, -1,
+ -1, -1, -1, 5116, -1, 350, -1, 161, 353, 163,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3073, 178, -1, 180, -1, -1, 183,
+ -1, -1, 5906, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 197, -1, 199, -1, 6122, -1, 203,
+ -1, 3101, -1, -1, -1, 209, -1, -1, 4318, -1,
+ -1, 5174, -1, 217, -1, 219, -1, -1, -1, -1,
+ -1, -1, 226, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 242, -1,
+ -1, -1, -1, 163, -1, 440, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 259, -1, -1, 4368, -1,
+ 3160, 6186, 3162, 4373, -1, 4375, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6204,
+ 2507, 6206, 6207, -1, -1, -1, -1, -1, 4398, -1,
+ -1, -1, -1, 213, -1, 299, 300, -1, -1, -1,
+ -1, 305, -1, -1, -1, -1, 226, -1, 4418, -1,
+ -1, 231, -1, 317, -1, -1, 236, -1, -1, -1,
+ -1, -1, 242, -1, 4434, 245, -1, 4437, -1, 249,
+ -1, 335, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 540, -1, -1, 543, 544,
+ 545, -1, 547, 548, 549, 550, 551, 552, 278, -1,
+ -1, -1, 557, -1, -1, -1, -1, -1, -1, -1,
+ 2597, -1, -1, -1, 378, -1, -1, -1, 298, -1,
+ -1, -1, -1, 3283, -1, -1, -1, -1, 392, -1,
+ -1, -1, -1, -1, 398, 399, -1, 401, -1, -1,
+ -1, -1, 406, -1, -1, -1, -1, 411, -1, -1,
+ 414, -1, -1, -1, -1, -1, -1, 421, -1, 4529,
+ 4530, -1, -1, 427, 428, 345, -1, -1, 348, 4539,
+ -1, 435, -1, -1, 354, 439, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 449, -1, -1, 4558, -1,
+ -1, -1, 2679, -1, -1, 80, -1, -1, 83, -1,
+ 464, -1, 87, 88, 89, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2702, -1, -1, -1, 104,
+ 484, -1, 486, -1, -1, -1, -1, 112, -1, 409,
+ -1, 495, -1, 2720, 119, -1, -1, 501, 2725, 2726,
+ -1, -1, 506, 2730, -1, -1, -1, 4617, -1, 5472,
+ -1, 2738, -1, -1, -1, 519, -1, -1, 80, 144,
+ -1, 83, -1, -1, -1, 87, 88, 89, -1, 2756,
+ -1, -1, -1, -1, -1, 4645, -1, -1, 542, -1,
+ -1, -1, 104, -1, 464, -1, -1, -1, 5511, -1,
+ 112, -1, 556, -1, -1, -1, 560, 119, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 492, -1, 2801, -1, -1, -1, -1, -1,
+ -1, -1, 144, 80, -1, -1, 83, 2814, -1, -1,
+ 87, 88, 89, -1, 2821, 2822, 516, -1, 518, 519,
+ -1, -1, -1, -1, 5567, -1, -1, 104, -1, 5572,
+ 5573, -1, -1, -1, -1, 112, -1, -1, -1, -1,
+ -1, -1, 119, -1, -1, 2852, 2853, -1, -1, 2856,
+ 255, -1, -1, -1, 554, 260, -1, 557, 558, -1,
+ 560, -1, -1, -1, -1, -1, -1, 144, -1, -1,
+ 2877, -1, 2879, -1, -1, -1, 2883, 282, 283, -1,
+ -1, -1, -1, 2890, -1, -1, -1, -1, 2895, -1,
+ 2897, -1, 297, 2900, -1, -1, -1, -1, -1, 2906,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3588, -1,
+ 3590, 3591, 3592, 255, -1, -1, -1, -1, 260, 2926,
+ -1, -1, -1, -1, -1, 2932, -1, -1, -1, -1,
+ 2937, 336, -1, 2940, -1, -1, -1, -1, -1, -1,
+ 282, 283, -1, 2950, -1, 350, 5689, -1, 353, -1,
+ -1, -1, -1, -1, -1, 297, 2963, 128, -1, -1,
+ -1, 2968, -1, -1, -1, -1, -1, 2974, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 255, -1,
+ -1, -1, -1, 260, -1, -1, -1, -1, -1, -1,
+ 4880, 162, -1, -1, 336, 4885, -1, -1, 163, -1,
+ -1, -1, -1, -1, -1, 282, 283, -1, 350, -1,
+ -1, 353, -1, -1, -1, -1, -1, -1, -1, -1,
+ 297, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4920, -1, -1, 3040, -1, 440, -1, -1, -1, -1,
+ -1, -1, 4932, -1, -1, -1, -1, -1, 213, -1,
+ -1, 222, -1, -1, -1, -1, -1, -1, -1, 336,
+ -1, 226, -1, -1, -1, -1, 231, -1, -1, -1,
+ -1, 236, 4962, 350, -1, -1, 353, 242, -1, -1,
+ 245, -1, -1, -1, 249, -1, 257, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 440, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 278, 3121, -1, -1, 80, -1, -1,
+ 83, -1, 293, 128, 87, 88, 89, -1, -1, -1,
+ -1, -1, -1, 298, -1, 540, -1, -1, 543, 544,
+ 545, 104, 547, 548, 549, 550, 551, 552, 5891, 112,
+ -1, 3831, 557, -1, -1, -1, 119, 162, 329, -1,
+ -1, -1, 333, 440, -1, -1, -1, -1, -1, -1,
+ 3177, 5061, -1, -1, -1, -1, -1, -1, -1, -1,
+ 345, 144, -1, 348, -1, -1, -1, -1, -1, 354,
+ -1, -1, -1, 364, 365, -1, -1, -1, 540, -1,
+ -1, 543, 544, 545, -1, 547, 548, 549, 550, 551,
+ 552, -1, -1, -1, -1, 557, -1, 222, -1, -1,
+ -1, -1, -1, -1, -1, 3232, -1, -1, -1, -1,
+ -1, 402, -1, -1, -1, 406, -1, -1, -1, 410,
+ -1, -1, -1, 3250, 409, -1, -1, -1, 419, -1,
+ -1, 3258, 257, -1, -1, -1, 427, -1, -1, -1,
+ -1, 5151, -1, 540, 435, -1, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, 447, -1, 88, -1,
+ 557, -1, -1, -1, -1, 456, -1, -1, 293, 460,
+ -1, -1, 255, -1, -1, -1, -1, 260, -1, 464,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 125, -1, -1, -1, 282,
+ 283, -1, -1, 133, 329, 4005, -1, 492, 333, -1,
+ -1, -1, -1, 3340, 297, -1, -1, 147, -1, 3346,
+ -1, -1, -1, 514, -1, -1, -1, -1, -1, -1,
+ -1, 516, -1, 518, 519, 165, -1, -1, -1, 364,
+ 365, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 180, -1, -1, 336, -1, -1, -1, -1, -1, 189,
+ 5270, -1, 5272, -1, -1, -1, -1, 350, -1, 554,
+ 353, -1, 557, 558, 204, 560, 206, 402, -1, -1,
+ 210, 406, -1, -1, -1, 410, -1, -1, -1, -1,
+ 220, -1, -1, -1, 419, -1, -1, -1, -1, 229,
+ -1, -1, 427, -1, -1, -1, -1, 3434, -1, 5319,
+ 435, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 447, -1, -1, -1, -1, -1, -1, -1,
+ -1, 456, -1, -1, -1, 460, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 440, 5368, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6, 7, -1, 9, 10, 11, -1, 514,
+ -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, 3548, 3549, -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, 3575, 73,
+ -1, 3578, -1, -1, -1, -1, -1, 540, -1, -1,
+ 543, 544, 545, -1, 547, 548, 549, 550, 551, 552,
+ -1, -1, -1, -1, 557, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 115, -1, -1, -1, 119, 120, 121, 122, 123,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4308, 4309,
+ 4310, 4311, 136, -1, -1, -1, -1, -1, -1, 143,
+ -1, 145, -1, -1, -1, -1, -1, -1, 152, -1,
+ -1, -1, -1, -1, -1, 3662, 3663, 3664, -1, -1,
+ 164, -1, -1, -1, -1, -1, -1, 171, 5558, -1,
+ -1, -1, -1, -1, -1, -1, -1, 181, 182, 3686,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5584, -1, -1, -1, -1, 3706,
+ -1, -1, -1, -1, -1, -1, 210, -1, 5598, -1,
+ -1, -1, -1, -1, 218, -1, -1, 3724, -1, 223,
+ -1, -1, -1, -1, -1, 229, -1, -1, -1, -1,
+ -1, 235, -1, 237, -1, -1, -1, -1, -1, -1,
+ 244, -1, 246, -1, -1, -1, -1, -1, -1, -1,
+ -1, 255, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 270, 271, -1, -1,
+ -1, -1, -1, 277, -1, 279, -1, -1, 282, 283,
+ -1, 285, -1, -1, -1, -1, -1, -1, -1, -1,
+ 294, 295, -1, 297, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3811, -1, -1, 4487, -1, -1,
+ -1, -1, -1, -1, -1, -1, 320, 321, 322, -1,
+ -1, -1, 4502, -1, -1, -1, 330, 331, -1, -1,
+ -1, -1, 336, -1, -1, 339, -1, 341, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3858, -1, 357, 358, -1, 360, 361, 3865, -1,
+ 3867, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 374, -1, 376, 3880, -1, 3882, 686, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 391, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5786, 3904, 5788, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 412, -1,
+ -1, -1, -1, -1, 418, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 437, -1, -1, 440, -1, -1, 443,
+ -1, 3948, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 459, -1, -1, -1, -1,
+ -1, -1, 466, -1, -1, -1, -1, -1, -1, -1,
+ 474, 475, -1, -1, -1, -1, 480, -1, 482, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 492, -1,
+ -1, -1, -1, -1, 4001, -1, -1, -1, 5888, -1,
+ -1, -1, -1, 507, -1, -1, 510, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4022, 5906, -1, -1, -1,
+ -1, -1, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, -1, -1, -1, -1, 4044, -1, -1,
+ 4047, -1, 5932, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 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, 897, 898, 899,
+ 900, -1, 902, -1, -1, -1, 906, -1, 908, -1,
+ -1, 911, -1, -1, 914, -1, -1, 917, -1, -1,
+ 920, -1, 922, -1, -1, 925, -1, -1, -1, 929,
+ -1, 931, 4129, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 949,
+ -1, -1, -1, 5, -1, 955, -1, 957, 6038, 959,
+ -1, 961, -1, 963, -1, -1, -1, -1, -1, -1,
+ 970, -1, 24, -1, -1, 975, -1, 977, -1, -1,
+ -1, -1, 34, 35, 984, -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, 1018, -1,
+ -1, 73, 1022, 75, 76, -1, -1, 1027, -1, 81,
+ -1, 1031, -1, -1, 1034, -1, -1, 1037, -1, -1,
+ -1, -1, 6122, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1053, -1, 80, -1, -1, 83, -1,
+ -1, -1, 87, 88, 89, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 104,
+ -1, -1, -1, 135, -1, -1, -1, 112, -1, -1,
+ -1, -1, -1, -1, 119, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4973, -1, -1, 6186, -1, -1, -1,
+ -1, 1111, -1, -1, -1, -1, -1, -1, 4988, 144,
+ -1, 4318, -1, -1, 6204, -1, -1, -1, 1128, -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, -1, -1, 1156, 1157, 210, -1,
+ -1, 1161, 1162, -1, -1, 104, -1, -1, -1, -1,
+ -1, 4368, -1, 112, -1, -1, 4373, 229, 4375, -1,
+ 119, 1181, -1, -1, -1, 1185, -1, -1, -1, -1,
+ -1, -1, -1, 1193, -1, -1, -1, -1, -1, -1,
+ 252, 4398, -1, -1, 1204, 144, -1, -1, -1, -1,
+ -1, 5081, -1, -1, -1, -1, 1216, -1, -1, -1,
+ -1, 4418, -1, -1, 276, -1, -1, -1, -1, -1,
+ 255, -1, -1, -1, -1, 260, -1, 4434, -1, -1,
+ 4437, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 282, 283, -1,
+ -1, 313, -1, -1, 316, -1, -1, -1, -1, -1,
+ -1, -1, 297, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 338, -1, -1, -1,
+ -1, 1291, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1302, -1, -1, -1, -1, 1307, 1308, -1,
+ -1, 336, -1, -1, -1, -1, 255, -1, -1, -1,
+ -1, 260, -1, -1, -1, 350, -1, -1, 353, -1,
+ -1, -1, 4529, 4530, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4539, 282, 283, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 297, -1,
+ -1, 4558, -1, 1363, 1364, -1, -1, -1, -1, -1,
+ -1, -1, 1372, -1, 426, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1383, -1, -1, -1, 1387, -1, 1389,
+ -1, -1, 1392, -1, -1, -1, -1, 336, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1407, 5278, -1,
+ 5280, 350, -1, -1, 353, 440, -1, -1, -1, -1,
+ -1, -1, -1, -1, 476, -1, -1, -1, -1, 1429,
+ -1, -1, -1, -1, -1, 1435, 1436, -1, -1, -1,
+ 492, -1, 80, -1, -1, 83, -1, -1, 4645, 87,
+ 88, 89, -1, -1, -1, 507, -1, 1457, 1458, 1459,
+ -1, 1461, -1, 1463, 1464, 1465, 104, -1, -1, -1,
+ 1470, -1, -1, -1, 112, -1, -1, -1, -1, -1,
+ -1, 119, -1, -1, -1, 537, -1, -1, -1, -1,
+ -1, -1, -1, 545, -1, 547, 548, 549, 550, 551,
+ -1, 440, 554, 555, 556, 557, 144, -1, -1, 561,
+ -1, -1, -1, -1, -1, 540, -1, -1, 543, 544,
+ 545, -1, 547, 548, 549, 550, 551, 552, -1, -1,
+ 80, -1, 557, 83, -1, -1, -1, 87, 88, 89,
+ -1, -1, 1542, -1, 1544, 1545, -1, -1, -1, -1,
+ -1, -1, -1, -1, 104, -1, -1, -1, 108, -1,
+ -1, -1, 112, -1, -1, -1, -1, -1, -1, 119,
+ 5440, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1588, -1,
+ -1, -1, -1, -1, 144, -1, -1, -1, -1, -1,
+ -1, 540, -1, -1, 543, 544, 545, -1, 547, 548,
+ 549, 550, 551, 552, -1, -1, 80, 255, 557, 83,
+ -1, -1, 260, 87, 88, 89, 1626, 1627, -1, -1,
+ -1, 1631, -1, 1633, -1, -1, -1, -1, -1, -1,
+ 104, -1, -1, 193, 282, 283, -1, -1, 112, -1,
+ -1, -1, -1, -1, 1654, 119, -1, -1, -1, 297,
+ 1660, -1, -1, 1663, -1, -1, 1666, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1679,
+ 144, -1, -1, 4880, -1, -1, -1, -1, 4885, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 336, -1,
+ -1, -1, -1, -1, -1, 255, -1, -1, -1, 1709,
+ 260, -1, 350, -1, -1, 353, -1, -1, 5588, -1,
+ 5590, -1, -1, 4920, -1, -1, -1, -1, -1, -1,
+ -1, -1, 282, 283, -1, 4932, -1, 1737, 1738, 1739,
+ -1, 1741, -1, -1, -1, -1, -1, 297, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1761, -1, -1, -1, 4962, -1, 231, -1, -1,
+ -1, -1, 236, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1784, 1785, 336, -1, -1, -1,
+ -1, 255, -1, -1, -1, -1, 260, -1, -1, -1,
+ 350, -1, 440, 353, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1813, -1, -1, -1, -1, 282, 283,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 297, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1843, -1, -1, -1, 1847, 1848, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1858, 1859,
+ 1860, -1, 1862, -1, 5061, -1, -1, -1, -1, -1,
+ -1, -1, 336, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 350, 1887, -1, 353,
+ 440, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 540, -1, -1, 543, 544, 545, -1, 547,
+ 548, 549, 550, 551, 552, -1, -1, 555, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 500, -1, -1, -1, 5151, -1, -1, 5827, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 440, -1, -1, -1,
+ -1, -1, -1, -1, 1984, -1, -1, -1, -1, -1,
+ 540, -1, 1992, 543, 544, 545, -1, 547, 548, 549,
+ 550, 551, 552, -1, -1, 2005, 2006, -1, -1, -1,
+ -1, -1, -1, -1, 2014, -1, -1, 2017, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2040, -1, 2042, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5934, 2065, -1, -1, 2068, -1,
+ -1, -1, -1, 5270, -1, 5272, 540, -1, -1, 543,
+ 544, 545, -1, 547, 548, 549, 550, 551, 552, -1,
+ 2090, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2105, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2117, 2118, 2119,
+ 2120, 2121, 5319, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2135, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2147, 2148, 2149,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6032, 2163, -1, 2165, -1, -1, -1, -1,
+ -1, 5368, -1, -1, -1, -1, -1, 2177, 2178, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6065, 6066, 2197, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2216, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2232, 2233, 2234, 2235, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2245, -1, -1, -1, -1,
+ -1, -1, 2252, -1, 2254, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2272, -1, -1, 2275, -1, -1, -1, 2279,
+ -1, -1, -1, -1, -1, 2285, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6168, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2316, 2317, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2327, 2328, -1,
+ -1, 2331, -1, -1, 2334, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2351, 2352, -1, -1, -1, -1, -1, 2358, -1,
+ -1, 5558, -1, -1, -1, -1, -1, -1, -1, 2369,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5584, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5598, -1, 2403, -1, -1, -1, -1, -1, -1,
+ 2410, -1, 2412, -1, -1, 2415, 2416, -1, 2418, 2419,
+ -1, 2421, -1, -1, -1, -1, -1, -1, 2428, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2438, -1,
+ -1, -1, -1, -1, -1, 2445, 2446, -1, -1, 2449,
+ -1, -1, -1, 2453, 2454, -1, -1, -1, -1, 2459,
+ 2460, -1, -1, -1, -1, -1, 2466, 2467, 2468, -1,
+ -1, 2471, -1, 2473, 2474, 2475, 2476, 2477, 2478, 2479,
+ 2480, -1, 2482, -1, 2484, 2485, -1, -1, 2488, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2503, 2504, 2505, 2506, -1, -1, -1,
+ 2510, 2511, -1, -1, -1, 2515, -1, -1, 2518, -1,
+ -1, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529,
+ -1, 2531, -1, -1, -1, -1, -1, -1, 2538, 2539,
+ -1, -1, 2542, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2564, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5786,
+ -1, 5788, -1, -1, 1023, -1, 2596, -1, -1, -1,
+ -1, -1, -1, 2603, -1, -1, -1, 2607, 2608, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2618, -1,
+ 1049, -1, -1, -1, 5, -1, -1, 2627, 2628, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2641, -1, 24, -1, -1, -1, -1, 2648, -1,
+ 2650, -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, 5888, 73, -1, 75, 76, -1, -1, -1, -1,
+ 81, -1, -1, -1, -1, -1, -1, -1, -1, 5906,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2731, -1, -1, -1, 5932, -1, -1, -1, -1,
+ 2740, -1, 2742, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, -1, -1, 2759,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2771, -1, 2773, 2774, -1, -1, -1, 2778, -1,
+ 2780, 2781, 2782, -1, 2784, -1, 2786, -1, -1, -1,
+ 2790, -1, -1, 2793, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2825, -1, -1, -1, 210,
+ -1, -1, -1, 2833, 2834, -1, -1, -1, -1, -1,
+ 2840, 6038, -1, -1, -1, -1, -1, -1, 229, 2849,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2868, -1,
+ -1, 252, -1, 2873, 2874, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2888, 2889,
+ -1, -1, 2892, -1, 2894, 276, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2918, -1,
+ -1, 2921, -1, -1, -1, 6122, -1, -1, -1, -1,
+ -1, -1, 313, -1, -1, 316, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2944, 2945, -1, -1, -1, -1,
+ 1379, -1, -1, -1, -1, -1, -1, 338, -1, 2959,
+ -1, 2961, 2962, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1404, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6186,
+ 1419, -1, 2992, 2993, 2994, -1, -1, -1, 2998, -1,
+ -1, -1, -1, -1, 3004, -1, -1, 6204, -1, -1,
+ -1, -1, 3012, -1, -1, 3015, -1, -1, -1, -1,
+ -1, 3021, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3030, -1, 3032, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 426, 3046, -1, -1, 3049,
+ -1, 3051, -1, -1, 3054, -1, -1, -1, 3058, -1,
+ -1, 3061, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3073, 3074, -1, -1, -1, -1, -1,
+ 1509, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3091, -1, -1, -1, 476, -1, -1, -1, -1,
+ -1, 3101, -1, 3103, -1, -1, -1, -1, -1, -1,
+ -1, 492, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3122, -1, -1, -1, 507, -1, -1, -1,
+ -1, -1, -1, -1, 3134, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3148, -1,
+ -1, -1, -1, -1, -1, -1, 537, -1, 3158, -1,
+ 3160, 3161, 3162, 3163, 545, -1, 547, 548, 549, 550,
+ 551, -1, -1, 554, 555, 556, 557, -1, -1, -1,
+ 561, -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, -1, -1, -1, -1,
+ -1, 3211, -1, 104, -1, -1, -1, 1646, -1, -1,
+ -1, 112, -1, -1, -1, -1, -1, -1, 119, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 144, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3262, -1, -1, -1, -1, -1, 3268, -1,
+ -1, 3271, -1, -1, 3274, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3283, -1, -1, -1, -1, -1, -1,
+ 3290, -1, -1, -1, -1, 3295, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3319,
+ 3320, 3321, -1, -1, 3324, -1, -1, -1, -1, -1,
+ -1, -1, 3332, 3333, 3334, 3335, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3345, -1, -1, 3348, -1,
+ 3350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3361, 3362, -1, 255, 3365, -1, -1, -1, 260,
+ -1, -1, 1801, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3383, -1, 3385, -1, 3387, -1, 3389,
+ -1, 282, 283, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 297, -1, -1, 3409,
+ -1, -1, -1, 3413, -1, -1, -1, -1, -1, -1,
+ 3420, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 80, -1, -1, 83, -1, -1, -1,
+ 87, 88, 89, -1, 3444, 336, -1, -1, -1, -1,
+ -1, -1, 3452, -1, -1, -1, -1, 104, -1, 350,
+ -1, -1, 353, -1, 5, 112, -1, 3467, -1, -1,
+ -1, -1, 119, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3481, -1, 24, -1, 3485, 377, -1, 3488, -1,
+ 3490, -1, -1, 34, 35, -1, -1, 144, -1, -1,
+ 41, 42, -1, 1932, 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, 440,
+ -1, -1, -1, -1, 3554, -1, 3556, -1, -1, -1,
+ -1, 3561, -1, -1, -1, -1, 457, -1, -1, -1,
+ 1999, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 230, -1, -1, -1, -1, 3588, -1,
+ 3590, 3591, 3592, -1, 135, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2036, 255, -1,
+ -1, -1, -1, 260, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 282, 283, -1, -1, -1,
+ 2069, -1, -1, -1, -1, -1, -1, -1, -1, 540,
+ 297, -1, 543, 544, 545, -1, 547, 548, 549, 550,
+ 551, 552, -1, -1, -1, -1, -1, -1, -1, 210,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 229, 336,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 350, 3704, -1, 353, -1, -1, -1,
+ -1, 252, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 375, -1,
+ -1, -1, -1, -1, -1, 276, -1, -1, -1, 2168,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2185, -1, -1, -1,
+ -1, -1, 80, -1, -1, 83, -1, -1, -1, 87,
+ 88, 89, 313, -1, 2203, 316, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 104, -1, -1, 107,
+ -1, -1, -1, 440, 112, -1, -1, 338, -1, -1,
+ -1, 119, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3816, -1, -1, -1,
+ -1, -1, 3822, -1, -1, -1, 144, -1, -1, -1,
+ 2259, 3831, -1, -1, -1, -1, 3836, 3837, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2278,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2291, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3871, 3872, 3873, 2303, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 426, -1, -1, 3888, -1,
+ -1, -1, -1, 540, -1, -1, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, -1, -1, -1, -1,
+ 3910, 3911, -1, -1, 2343, 2344, -1, -1, -1, -1,
+ 3920, 3921, 3922, -1, -1, -1, 3926, -1, -1, 3929,
+ -1, -1, -1, -1, -1, 476, -1, 255, 3938, -1,
+ -1, -1, 260, -1, -1, -1, -1, -1, -1, -1,
+ -1, 492, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3960, -1, -1, -1, 282, 283, 507, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 297,
+ -1, 3981, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 537, -1, -1, -1,
+ -1, -1, -1, -1, 545, 4005, 547, 548, 549, 550,
+ 551, -1, -1, 554, 555, 556, -1, -1, 336, -1,
+ 561, -1, -1, -1, -1, -1, -1, -1, -1, 4029,
+ -1, -1, 350, -1, -1, 353, -1, -1, -1, -1,
+ -1, -1, 4042, -1, -1, 4045, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4067, -1, -1,
+ -1, -1, -1, 2502, -1, -1, 4076, -1, -1, -1,
+ -1, -1, -1, -1, 4084, -1, 4086, -1, -1, 4089,
+ -1, -1, -1, -1, 4094, 4095, 4096, 4097, -1, -1,
+ 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109,
+ -1, -1, -1, 4113, 4114, -1, -1, -1, -1, -1,
+ -1, -1, 440, 4123, -1, -1, -1, 4127, -1, -1,
+ -1, 4131, -1, -1, -1, -1, -1, -1, -1, 4139,
+ -1, -1, 4142, -1, 4144, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4156, -1, -1, 4159,
+ 4160, -1, -1, -1, 4164, 4165, -1, -1, -1, 4169,
+ -1, 4171, -1, -1, -1, -1, -1, -1, 4178, 4179,
+ 4180, 4181, -1, -1, 4184, 4185, -1, -1, -1, 4189,
+ 4190, 4191, -1, -1, -1, -1, 4196, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 540, -1, -1, 543, 544, 545, -1, 547,
+ 548, 549, 550, 551, 552, -1, -1, 80, -1, -1,
+ 83, -1, -1, 4243, 87, 88, 89, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4257, -1, 4259,
+ -1, 104, -1, -1, -1, -1, -1, -1, -1, 112,
+ -1, -1, -1, -1, -1, -1, 119, -1, -1, -1,
+ 2709, -1, -1, -1, 2713, 2714, -1, 4287, 4288, 4289,
+ -1, 4291, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 144, -1, -1, -1, -1, -1, -1, 4308, 4309,
+ 4310, 4311, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4337, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2775, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4355, -1, -1, -1, -1,
+ 2789, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2830, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 255, -1, -1, -1, -1, 260, -1, -1,
+ -1, 80, -1, -1, 83, -1, -1, -1, 87, 88,
+ 89, -1, -1, -1, -1, -1, -1, -1, -1, 282,
+ 283, -1, -1, -1, -1, 104, -1, -1, 107, -1,
+ 110, -1, 4452, 112, 297, -1, -1, -1, -1, -1,
+ 119, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 133, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 144, -1, 4487, -1, -1,
+ -1, -1, -1, 336, -1, -1, 156, -1, -1, -1,
+ 4500, -1, 4502, -1, 4504, -1, -1, 350, -1, -1,
+ 353, 4511, -1, -1, -1, -1, -1, 4517, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4527, 371, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4542, -1, -1, 205, 4546, -1, -1, -1,
+ -1, -1, -1, 213, -1, 215, 4556, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4565, -1, -1, 228, -1,
+ -1, -1, -1, -1, -1, 4575, -1, -1, -1, 4579,
+ -1, -1, -1, -1, -1, -1, 4586, 4587, -1, -1,
+ -1, -1, -1, -1, -1, -1, 255, 440, -1, -1,
+ -1, 260, 3031, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4618, 4619,
+ 4620, 4621, 4622, 282, 283, 4625, -1, 4627, -1, -1,
+ -1, -1, -1, -1, 4634, -1, -1, -1, 297, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4670, -1, -1, -1, -1, -1, -1, 336, -1, -1,
+ -1, -1, 4682, -1, 3113, -1, -1, 3116, -1, -1,
+ -1, 350, -1, -1, 353, -1, -1, 540, -1, -1,
+ 543, 544, 545, -1, 547, 548, 549, 550, 551, 552,
+ -1, -1, 4712, -1, -1, 4715, -1, -1, -1, -1,
+ -1, -1, -1, 4723, 4724, -1, -1, -1, -1, -1,
+ 4730, 4731, -1, -1, -1, 4735, -1, -1, -1, -1,
+ -1, 4741, -1, -1, 4744, 4745, -1, -1, -1, 4749,
+ 4750, -1, -1, -1, -1, 4755, 4756, 4757, 4758, 4759,
+ -1, -1, -1, 4763, 4764, 4765, -1, 4767, 4768, -1,
+ -1, 4771, -1, -1, -1, 4775, -1, -1, -1, 4779,
+ -1, 440, -1, -1, -1, 4785, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4803, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4812, -1, -1, -1, 4816, -1, -1, 3248,
+ -1, 4821, -1, 80, -1, -1, 83, -1, -1, -1,
+ 87, 88, 89, -1, -1, -1, 3265, -1, -1, -1,
+ -1, 4841, -1, -1, 4844, -1, -1, 104, -1, -1,
+ -1, 3280, -1, -1, -1, 112, -1, -1, -1, -1,
+ -1, -1, 119, -1, 4864, 4865, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 540, -1, 4883, 543, 544, 545, 144, 547, 548,
+ 549, 550, 551, 552, -1, -1, -1, -1, 4898, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4948, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4973, -1, -1, -1, -1, -1, 236,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4988, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 255, -1,
+ -1, -1, -1, 260, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5022, -1, -1, 282, 283, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5038, -1,
+ 297, -1, -1, -1, 5044, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5053, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5068, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 336,
+ -1, 5081, -1, 5083, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 350, 3523, -1, 353, 3526, -1, 3528,
+ -1, -1, -1, -1, 3533, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5118, -1,
+ -1, 5121, -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, -1, -1, -1,
+ -1, -1, -1, 3582, -1, -1, -1, -1, 104, -1,
+ -1, 107, -1, -1, -1, -1, 112, -1, -1, -1,
+ 5170, -1, 3601, 119, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 440, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3626, 144, 5199,
+ 5200, -1, -1, 5203, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5218, -1,
+ -1, 5221, -1, -1, -1, 5225, -1, -1, -1, 889,
+ 5230, -1, -1, 5233, 5234, -1, 5236, 897, 5238, -1,
+ 5240, 5241, -1, -1, -1, -1, 906, -1, -1, -1,
+ -1, -1, -1, -1, 914, -1, -1, 917, -1, -1,
+ -1, -1, 5262, -1, 5264, -1, -1, 3696, -1, 3698,
+ -1, -1, -1, -1, -1, -1, 5276, 5277, 5278, -1,
+ 5280, -1, -1, 540, -1, -1, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 80, 255,
+ -1, 83, -1, -1, 260, 87, 88, 89, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5329,
+ 5330, -1, 104, -1, -1, -1, 282, 283, -1, -1,
+ 112, -1, -1, -1, -1, -1, -1, 119, -1, -1,
+ -1, 297, -1, -1, -1, -1, -1, -1, 1018, -1,
+ 3789, -1, -1, 1023, -1, -1, -1, 1027, -1, -1,
+ -1, -1, 144, 5373, 1034, -1, 5376, 1037, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5388, 1049,
+ 336, 5391, -1, -1, -1, -1, 5396, -1, 5398, -1,
+ -1, 3830, -1, -1, 350, 5405, -1, 353, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5422, -1, -1, -1, 5426, -1, -1, 5429,
+ 3859, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5440, 5441, 5442, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5471, -1, -1, 5474, -1, 5476, -1, -1, -1,
+ -1, -1, -1, 255, -1, -1, -1, -1, 260, -1,
+ -1, -1, -1, -1, 440, 5495, 1156, 1157, -1, 3928,
+ -1, 5501, -1, 1163, -1, 5505, -1, 1167, -1, 5509,
+ 282, 283, -1, -1, -1, 5515, -1, -1, -1, -1,
+ 3949, -1, -1, -1, 5524, 297, -1, -1, -1, -1,
+ -1, -1, -1, 1193, -1, -1, 3965, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5549,
+ -1, 5551, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 336, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5577, 350, -1,
+ -1, 353, 5582, 5583, -1, -1, -1, 5587, 5588, 5589,
+ 5590, -1, -1, -1, 540, -1, -1, 543, 544, 545,
+ -1, 547, 548, 549, 550, 551, 552, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5620, -1, -1, -1, -1, -1, -1, 5627, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4070, -1, -1, -1, -1, -1, -1, -1, 5649,
+ -1, -1, 5652, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4093, -1, -1, -1, 440, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1339,
+ 1340, -1, -1, -1, -1, -1, -1, -1, -1, 4118,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 472, -1, -1, 1363, 1364, 1365, -1, -1, -1, -1,
+ 5710, -1, 1372, 5713, -1, -1, 5716, -1, -1, 1379,
+ 5720, -1, -1, 1383, -1, 4154, -1, 5727, -1, 1389,
+ -1, 5731, 1392, 5733, -1, 5735, -1, -1, -1, -1,
+ -1, -1, 5742, -1, 1404, -1, -1, -1, -1, -1,
+ 5750, -1, -1, -1, -1, -1, -1, -1, -1, 1419,
+ -1, 5761, -1, -1, -1, -1, -1, -1, 540, -1,
+ -1, 543, 544, 545, -1, 547, 548, 549, 550, 551,
+ 552, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5796, 5797, -1, -1,
+ -1, -1, -1, 1463, 1464, 1465, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5827, -1, -1,
+ -1, -1, -1, -1, 5834, -1, -1, -1, 5838, -1,
+ -1, -1, -1, -1, -1, -1, 4275, -1, 5848, 1509,
+ 80, -1, -1, 83, -1, -1, -1, 87, 88, 89,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5871, -1, -1, 104, -1, -1, 107, 5878, 5879,
+ 5880, -1, 112, -1, 5884, -1, -1, 5887, -1, 119,
+ -1, -1, -1, -1, -1, -1, -1, 5897, -1, -1,
+ 5900, -1, -1, -1, -1, 5905, -1, -1, -1, -1,
+ -1, -1, -1, -1, 144, -1, -1, -1, -1, 5919,
+ -1, -1, -1, 80, -1, -1, 83, -1, 1588, -1,
+ 87, 88, 89, -1, 5934, -1, -1, -1, -1, -1,
+ -1, 5941, -1, -1, -1, 4374, -1, 104, -1, -1,
+ -1, -1, -1, -1, -1, 112, -1, -1, -1, -1,
+ -1, -1, 119, -1, -1, -1, -1, 5967, -1, -1,
+ 4399, -1, 5972, -1, -1, -1, -1, -1, 5978, -1,
+ -1, -1, -1, -1, -1, -1, 1646, 144, 5988, -1,
+ -1, -1, -1, -1, 5994, 5995, -1, 5997, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6007, -1, -1,
+ -1, 6011, -1, -1, -1, -1, -1, -1, -1, 1679,
+ -1, -1, -1, -1, -1, 255, -1, -1, -1, -1,
+ 260, -1, 6032, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1709,
+ -1, -1, 282, 283, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6064, 6065, 6066, 297, -1, -1,
+ 6070, -1, -1, -1, -1, -1, -1, 1737, 1738, 1739,
+ -1, 1741, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6097, 255, -1,
+ -1, 1761, 6102, 260, 4533, -1, 336, -1, 6108, -1,
+ -1, -1, -1, 6113, -1, -1, -1, -1, -1, -1,
+ 350, -1, -1, 353, -1, 282, 283, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 297, -1, -1, 6143, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6153, 4583, 92, 4585, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 6168, -1,
+ -1, 6171, 109, -1, -1, -1, -1, -1, -1, 336,
+ 6180, -1, -1, 1843, 6184, -1, -1, 1847, 1848, -1,
+ -1, -1, -1, 350, -1, 132, 353, -1, -1, -1,
+ -1, -1, 1862, -1, -1, -1, 6206, 6207, 145, -1,
+ 440, -1, -1, -1, -1, -1, -1, -1, -1, 156,
+ -1, -1, -1, 160, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 178, -1, -1, -1, -1, -1, 184, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 201, -1, -1, -1, -1, -1,
+ -1, -1, 1932, -1, -1, 212, -1, -1, 1938, -1,
+ -1, -1, -1, 440, 221, -1, -1, -1, 1948, -1,
+ -1, -1, -1, -1, -1, -1, 233, 4726, -1, -1,
+ -1, -1, -1, -1, 241, -1, -1, 4736, 245, -1,
+ 540, -1, -1, 543, 544, 545, -1, 547, 548, 549,
+ 550, 551, 552, -1, -1, -1, -1, 264, -1, 1989,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1999,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 301, -1, -1, -1, -1, -1,
+ -1, -1, -1, 310, -1, -1, 2036, -1, -1, -1,
+ -1, -1, -1, 540, -1, 2045, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, -1, -1, -1, -1,
+ -1, -1, 2062, -1, -1, -1, -1, -1, -1, 2069,
+ -1, -1, -1, 350, -1, -1, 353, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4862, -1, -1, 373, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 387, -1, -1, -1, -1, -1, -1, 394, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4903, -1, 413, -1, -1, -1,
+ -1, -1, -1, -1, -1, 422, -1, 2147, 2148, 2149,
+ -1, -1, 429, -1, -1, 432, 4925, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2168, -1,
+ -1, -1, -1, -1, 451, -1, -1, -1, -1, -1,
+ -1, 458, -1, -1, -1, 2185, -1, 464, -1, -1,
+ 467, 468, -1, 470, 471, -1, -1, -1, 2198, -1,
+ -1, -1, -1, 2203, 481, -1, -1, -1, -1, 486,
+ -1, -1, -1, -1, -1, -1, 493, -1, -1, 496,
+ -1, -1, 499, -1, 4993, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 512, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1023, -1, -1, -1, -1, 2259,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2272, -1, -1, 2275, -1, -1, 2278, -1,
+ 1049, -1, -1, -1, -1, 2285, -1, -1, -1, -1,
+ -1, 2291, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2303, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2316, 2317, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2331, -1, -1, 2334, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2343, 2344, -1, -1, 5116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5174, -1, -1, -1, -1,
+ -1, -1, 2412, -1, -1, 2415, 2416, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2453, 2454, -1, -1, -1, -1, 2459,
+ 2460, -1, -1, -1, -1, -1, 2466, 2467, 2468, -1,
+ -1, 2471, -1, 2473, -1, 2475, 2476, 2477, 2478, 2479,
+ 2480, -1, 2482, -1, 2484, 2485, -1, -1, 2488, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2502, 2503, 2504, 2505, 2506, 2507, -1, -1,
+ -1, 2511, -1, -1, 92, 2515, -1, -1, 2518, 97,
+ -1, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529,
+ -1, 2531, -1, -1, -1, -1, -1, -1, -1, 2539,
+ -1, -1, 2542, -1, -1, -1, -1, -1, -1, 5318,
+ -1, -1, -1, -1, 132, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 145, -1, -1,
+ -1, -1, -1, -1, -1, -1, 92, -1, -1, -1,
+ -1, 97, 160, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1363, -1, -1, -1, -1, -1,
+ 178, -1, -1, 2603, -1, -1, -1, -1, -1, -1,
+ 1379, -1, -1, -1, -1, -1, 132, -1, 2618, -1,
+ -1, -1, -1, 201, -1, -1, -1, 2627, 2628, 145,
+ 146, -1, -1, -1, 212, 1404, -1, -1, -1, -1,
+ 156, -1, -1, 221, 160, -1, -1, -1, -1, -1,
+ 1419, -1, -1, -1, -1, 233, -1, -1, -1, -1,
+ 238, -1, 178, -1, -1, -1, -1, 245, -1, -1,
+ -1, -1, -1, -1, -1, 5444, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 201, 264, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 212, -1, -1, -1,
+ -1, -1, -1, 5472, -1, 221, -1, -1, -1, 2709,
+ -1, -1, -1, 2713, 2714, -1, -1, 233, -1, -1,
+ -1, -1, 238, -1, -1, 2725, -1, -1, -1, -1,
+ -1, -1, 310, -1, -1, -1, -1, -1, -1, -1,
+ 1509, -1, 5511, -1, -1, -1, -1, -1, 264, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2759,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2771, 350, 289, -1, 2775, -1, -1, 2778, -1,
+ -1, 2781, 2782, -1, -1, 363, -1, -1, -1, 2789,
+ -1, -1, -1, -1, 310, 373, -1, -1, 5567, -1,
+ -1, -1, -1, 5572, 5573, 383, 384, -1, -1, 387,
+ -1, -1, -1, -1, 2814, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2830, -1, -1, -1, 350, 413, -1, -1, 416, -1,
+ -1, -1, 420, -1, 422, -1, -1, -1, -1, -1,
+ -1, 429, 2852, -1, 432, -1, 2856, 373, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 383, 384, -1,
+ -1, 387, -1, 451, -1, -1, -1, 1646, -1, 2879,
+ 458, -1, -1, -1, -1, -1, 464, -1, -1, 467,
+ -1, -1, -1, 471, -1, 2895, -1, 413, -1, -1,
+ 416, 479, -1, 481, 420, -1, 422, -1, 486, -1,
+ -1, -1, -1, 429, -1, -1, 432, -1, -1, -1,
+ 5689, 499, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 512, 451, -1, -1, -1, -1,
+ 2940, -1, 458, -1, -1, -1, -1, -1, 464, -1,
+ -1, 467, -1, -1, -1, 471, -1, -1, -1, -1,
+ -1, -1, -1, 479, -1, 481, -1, -1, 2968, -1,
+ 486, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2992, 2993, 2994, -1, 512, -1, 2998, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3030, 3031, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3040, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3074, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 145,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3113, 160, -1, 3116, -1, -1, -1,
+ -1, -1, 5891, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 178, -1, 3134, -1, -1, -1, 184, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 201, -1, -1, -1, -1,
+ -1, -1, -1, 1932, -1, -1, 212, -1, -1, -1,
+ -1, -1, -1, -1, -1, 221, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 233, -1, -1,
+ -1, -1, 238, -1, -1, -1, -1, -1, -1, 245,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 264, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1999, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 289, -1, -1, -1, -1, 3248, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3262, -1, 310, 3265, -1, 2036, 3268, -1,
+ -1, 3271, -1, -1, 3274, -1, -1, -1, -1, -1,
+ 3280, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3290, -1, -1, -1, -1, 3295, -1, -1, -1, -1,
+ 2069, -1, -1, -1, 350, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3319,
+ 3320, 3321, -1, -1, 3324, -1, -1, 373, -1, -1,
+ -1, -1, 3332, 3333, 3334, 3335, -1, 383, 384, -1,
+ 3340, 387, -1, -1, -1, 3345, 3346, -1, 3348, -1,
+ 3350, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3361, 3362, -1, -1, 3365, -1, 413, -1, -1,
+ 416, -1, -1, -1, 420, -1, 422, -1, 2147, 2148,
+ 2149, -1, -1, 429, -1, 3385, 432, 3387, -1, 3389,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2168,
+ -1, -1, -1, -1, -1, 451, -1, -1, -1, 3409,
+ -1, -1, 458, -1, -1, -1, 2185, 463, 464, -1,
+ 3420, 467, -1, -1, -1, 471, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2203, 481, -1, -1, -1, -1,
+ 486, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3452, 499, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 512, 3467, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3481, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2259, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2278,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2291, 3523, -1, -1, 3526, -1, 3528, -1,
+ -1, -1, -1, 3533, 2303, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3554, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2343, 2344, -1, -1, -1, -1,
+ -1, -1, 3582, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3601, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3626, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3662, 3663, 3664, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3696, -1, 3698, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2502, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2542, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3789,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3816, -1, -1, -1,
+ -1, -1, 3822, -1, -1, -1, -1, -1, -1, -1,
+ 3830, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3858, 3859,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3904, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3928, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2709, -1, -1, -1, 2713, 2714, -1, -1, -1, 3949,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 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, -1,
+ -1, -1, -1, -1, -1, -1, 2775, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2789, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2830, -1, -1, -1, -1, -1, 4067, -1, -1,
+ 4070, -1, -1, -1, -1, -1, 4076, -1, -1, -1,
+ -1, -1, -1, -1, 4084, -1, 4086, -1, -1, 4089,
+ -1, -1, -1, 4093, 4094, 4095, 4096, 4097, -1, -1,
+ 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109,
+ -1, -1, -1, 4113, 4114, 133, -1, -1, 4118, -1,
+ -1, -1, -1, 4123, -1, -1, -1, 4127, -1, 4129,
+ -1, 4131, -1, -1, -1, -1, -1, -1, -1, 4139,
+ -1, -1, 4142, -1, 4144, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4154, -1, 4156, -1, -1, 4159,
+ 4160, -1, -1, -1, 4164, 4165, -1, -1, -1, -1,
+ -1, 4171, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4181, -1, -1, 4184, -1, -1, 205, -1, -1,
+ -1, -1, -1, -1, -1, 213, 4196, 215, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2994, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4243, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4259,
+ -1, -1, 3031, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4275, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4287, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3113, -1, -1, 3116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4368, -1,
+ -1, -1, -1, 4373, 4374, 4375, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4398, 4399,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4418, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3248,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3265, -1, -1, -1,
+ -1, -1, -1, -1, 4504, -1, -1, -1, -1, -1,
+ -1, 3280, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4533, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4546, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4583, -1, 4585, 4586, 4587, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1023, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1049, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4670, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4682, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4712, -1, -1, 4715, -1, -1, -1, -1,
+ -1, -1, -1, 4723, 4724, -1, 4726, -1, -1, -1,
+ 4730, 4731, -1, -1, -1, 4735, 4736, -1, -1, -1,
+ -1, 4741, -1, -1, 4744, 4745, -1, -1, -1, 4749,
+ -1, -1, -1, -1, 3523, 4755, -1, 3526, -1, 3528,
+ -1, -1, -1, -1, 3533, -1, -1, 4767, -1, -1,
+ -1, -1, -1, -1, -1, 4775, -1, -1, -1, 4779,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4812, 3582, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3601, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4844, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3626, -1, -1,
+ -1, -1, 4862, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 897,
+ -1, -1, -1, -1, -1, 4885, -1, -1, 906, -1,
+ -1, -1, -1, -1, -1, -1, 914, -1, -1, 917,
+ -1, -1, -1, 4903, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4925, -1, 3696, -1, 3698,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4948, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1379, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4993, -1, -1, -1, -1, -1, -1,
+ 1018, -1, 1404, -1, -1, 1023, -1, -1, -1, 1027,
+ -1, -1, -1, -1, -1, -1, 1034, 1419, -1, 1037,
+ 3789, -1, 5022, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1049, -1, -1, -1, -1, -1, -1, 5038, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3816, -1, -1,
+ -1, -1, -1, 3822, -1, -1, -1, -1, -1, -1,
+ -1, 3830, -1, -1, -1, -1, -1, -1, 5068, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3859, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1509, -1, -1,
+ -1, -1, -1, -1, 5114, -1, 5116, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1156, 1157,
+ -1, -1, -1, -1, -1, 1163, -1, -1, -1, 1167,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3928,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5170, -1, -1, -1, 5174, 1193, -1, -1, -1, -1,
+ 3949, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3965, -1, -1, 5199,
+ 5200, -1, -1, 5203, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5218, -1,
+ -1, -1, -1, -1, -1, 5225, -1, -1, -1, -1,
+ 5230, -1, -1, 5233, 5234, -1, -1, -1, -1, -1,
+ 5240, 5241, -1, -1, 1646, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5262, -1, 5264, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5276, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4070, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5318, -1,
+ -1, 1339, 1340, -1, 4093, -1, -1, -1, -1, 5329,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1363, 1364, -1, -1, 4118,
+ -1, -1, -1, -1, 1372, -1, -1, -1, -1, -1,
+ -1, 1379, -1, -1, -1, 1383, -1, -1, 5368, -1,
+ -1, 1389, -1, 5373, 1392, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4154, 1404, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1419, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5442, -1, 5444, 1463, 1464, 1465, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5471, 5472, -1, 5474, -1, 5476, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1509, -1, -1, -1, 5495, -1, -1, -1, -1,
+ -1, 5501, -1, -1, -1, 5505, 4275, -1, -1, -1,
+ -1, 5511, -1, -1, -1, 5515, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1932, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5558, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5567, -1, -1,
+ 1588, -1, 5572, 5573, -1, -1, -1, 5577, -1, -1,
+ -1, -1, 5582, 5583, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1999, -1, -1,
+ -1, -1, -1, -1, -1, 4374, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5620, -1, -1, -1, -1, -1, -1, 5627, 1646, -1,
+ 4399, -1, -1, -1, 2036, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5652, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1679, -1, -1, -1, -1, -1, 2069, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5688, 5689,
+ -1, 1709, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5710, -1, -1, 5713, -1, -1, 5716, -1, -1, 1737,
+ 1738, 1739, -1, 1741, -1, -1, -1, 5727, -1, -1,
+ -1, 5731, -1, 5733, -1, 5735, -1, -1, -1, -1,
+ -1, -1, 5742, 1761, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5761, -1, -1, 4533, -1, 2168, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2185, -1, -1, 5786, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2203, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4583, -1, 4585, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1843, -1, -1, -1, 1847,
+ 1848, -1, -1, -1, -1, -1, -1, -1, 5838, -1,
+ -1, -1, -1, -1, 1862, -1, -1, -1, 5848, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2259, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2278, -1, 5878, 5879,
+ 5880, -1, -1, -1, -1, -1, -1, 5887, 5888, 2291,
+ -1, 5891, -1, -1, -1, -1, -1, 5897, -1, -1,
+ -1, 2303, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1932, -1, -1, -1, -1, 5919,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1948, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2343, 2344, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4726, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4736, -1, -1,
+ -1, 1989, 5972, -1, -1, -1, -1, -1, 5978, -1,
+ -1, 1999, -1, -1, -1, -1, -1, -1, 5988, -1,
+ -1, -1, -1, -1, 5994, 5995, -1, 5997, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 6007, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2036, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2045, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2062, -1, -1, -1, -1, -1,
+ -1, 2069, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6064, -1, -1, -1, -1, -1,
+ 6070, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4862, -1, -1, -1, 6097, -1, -1,
+ 2502, -1, 6102, -1, -1, -1, -1, -1, 6108, -1,
+ -1, -1, -1, 6113, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6122, -1, -1, -1, -1, -1, -1, 2147,
+ 2148, 2149, -1, -1, 4903, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6143, -1, -1, -1, -1, -1, -1,
+ 2168, -1, -1, 6153, -1, -1, 4925, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2185, -1, -1,
+ -1, 6171, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6184, 2203, 6186, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6204, -1, 6206, 6207, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4993, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2259, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2272, -1, -1, 2275, -1, -1,
+ 2278, -1, -1, -1, -1, -1, -1, 2285, -1, -1,
+ -1, -1, -1, 2291, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2303, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2316, 2317,
+ -1, -1, -1, -1, -1, -1, -1, 2709, -1, -1,
+ -1, 2713, 2714, 2331, -1, -1, 2334, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2343, 2344, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5114, -1, 5116, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2775, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2789, -1, -1,
+ -1, -1, -1, -1, 2412, -1, -1, 2415, 2416, -1,
+ -1, -1, -1, -1, -1, 5174, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2830, -1,
+ -1, -1, -1, -1, -1, 2453, 2454, -1, -1, -1,
+ -1, 2459, 2460, -1, -1, -1, -1, -1, 2466, 2467,
+ 2468, -1, -1, 2471, -1, 2473, -1, 2475, 2476, 2477,
+ 2478, 2479, 2480, -1, 2482, -1, 2484, 2485, -1, -1,
+ 2488, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2502, 2503, 2504, 2505, 2506, -1,
+ -1, -1, -1, 2511, -1, -1, -1, 2515, -1, -1,
+ 2518, -1, -1, 2521, 2522, 2523, 2524, 2525, 2526, 2527,
+ 2528, 2529, -1, 2531, -1, -1, -1, -1, -1, -1,
+ -1, 2539, -1, -1, 2542, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5318,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2603, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2618, -1, -1, -1, -1, -1, -1, -1, -1, 2627,
+ 2628, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3031,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5444, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2709, -1, -1, -1, 2713, 2714, -1, -1, -1,
+ -1, -1, -1, 5472, -1, -1, -1, -1, -1, -1,
+ -1, 3113, -1, -1, 3116, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2759, 5511, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2771, -1, -1, -1, 2775, -1, -1,
+ 2778, -1, -1, 2781, 2782, -1, -1, -1, -1, -1,
+ -1, 2789, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2814, -1, 5567, -1,
+ -1, -1, -1, 5572, 5573, -1, -1, -1, -1, -1,
+ -1, -1, 2830, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3248, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3265, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2895, 3280, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5688,
+ 5689, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2992, 2993, 2994, -1, -1, -1,
+ 2998, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3030, 3031, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3074, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3113, -1, -1, 3116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3134, -1, -1, -1,
+ -1, 3523, 5891, -1, 3526, -1, 3528, -1, -1, -1,
+ -1, 3533, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3582, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3601,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3626, -1, -1, -1, -1, -1,
+ 3248, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3262, -1, -1, 3265, -1, -1,
+ 3268, -1, -1, 3271, -1, -1, 3274, -1, -1, -1,
+ -1, -1, 3280, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3290, -1, -1, -1, -1, 3295, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3696, -1, 3698, -1, -1, -1,
+ -1, 3319, 3320, 3321, -1, -1, 3324, -1, -1, -1,
+ -1, -1, -1, -1, 3332, 3333, 3334, 3335, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3345, -1, -1,
+ 3348, -1, 3350, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3361, 3362, -1, -1, 3365, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3385, -1, 3387,
+ -1, 3389, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3789, -1, -1,
+ -1, 3409, -1, -1, -1, -1, -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, -1, -1, -1, -1, -1, 3830, -1,
+ -1, -1, -1, -1, 3452, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3467,
+ -1, -1, -1, -1, -1, -1, -1, 3859, -1, -1,
+ -1, -1, -1, 3481, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3523, -1, -1, 3526, -1,
+ 3528, -1, -1, -1, -1, 3533, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3928, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3554, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3949, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1023, 3965, 3582, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3601, -1, -1, -1, -1, 1049, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3626, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4070, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3696, -1,
+ 3698, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4093, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4118, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4154, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3789, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3816, -1,
+ -1, -1, -1, -1, 3822, -1, -1, -1, -1, -1,
+ -1, -1, 3830, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3859, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1023, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4275, -1, -1, -1, -1, -1, -1,
+ -1, 1049, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 133, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3928, -1, -1, -1, -1, -1, -1, -1, 1379, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3949, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1404, -1, -1, -1, 3965, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1419, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4374, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4399, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1509, 4067,
+ -1, -1, 4070, -1, -1, -1, -1, -1, 4076, -1,
+ -1, -1, -1, -1, -1, -1, 4084, -1, 4086, -1,
+ -1, 4089, -1, -1, -1, 4093, 4094, 4095, 4096, 4097,
+ -1, -1, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107,
+ 4108, 4109, -1, -1, -1, 4113, 4114, -1, -1, -1,
+ 4118, -1, -1, -1, -1, 4123, -1, -1, -1, 4127,
+ -1, -1, -1, 4131, -1, -1, -1, -1, -1, -1,
+ -1, 4139, -1, -1, 4142, -1, 4144, -1, -1, -1,
+ -1, 4533, -1, -1, -1, -1, 4154, -1, 4156, -1,
+ -1, 4159, 4160, -1, -1, -1, 4164, 4165, -1, -1,
+ -1, -1, -1, 4171, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4181, -1, -1, 4184, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4196, -1,
+ -1, 4583, -1, 4585, -1, 1646, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1379, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4243, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1404, -1, -1, -1,
+ -1, 4259, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1419, -1, -1, -1, -1, -1, 4275, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4287,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4726, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4736, -1, -1, -1, -1, -1,
+ -1, 1509, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4374, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4399, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4862, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1932, -1, -1, -1, -1, -1, -1, 1646, -1,
+ -1, -1, -1, -1, -1, -1, 4504, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4903, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4533, -1, -1, -1, -1,
+ -1, -1, -1, 4925, -1, -1, -1, -1, 4546, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1999, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4583, -1, 4585, 4586, 4587,
+ -1, -1, -1, -1, -1, 2036, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4993, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2069, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4670, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 897, -1, 4682, -1, -1, -1, -1, -1,
+ -1, 906, -1, -1, -1, -1, -1, -1, -1, 914,
+ -1, -1, 917, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4712, -1, -1, 4715, -1, -1,
+ -1, -1, -1, -1, -1, 4723, 4724, 2168, 4726, -1,
+ -1, -1, 4730, 4731, 5116, -1, -1, 4735, 4736, -1,
+ -1, -1, -1, 4741, 2185, -1, 4744, 4745, -1, -1,
+ -1, 4749, -1, -1, -1, -1, -1, 4755, -1, -1,
+ -1, -1, 2203, -1, -1, -1, -1, -1, -1, 4767,
+ -1, -1, -1, -1, -1, -1, -1, 4775, -1, -1,
+ -1, 4779, -1, -1, 1932, -1, -1, -1, -1, -1,
+ -1, -1, 5174, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1018, -1, -1, -1, -1, 1023, -1,
+ -1, -1, 1027, -1, 4812, -1, -1, -1, 2259, 1034,
+ -1, -1, 1037, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1049, -1, -1, 2278, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4844, -1, -1, -1,
+ 2291, 1999, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2303, -1, 4862, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2036, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2343, 2344, -1, 4903, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2069, -1, -1, -1, -1, -1, 4925, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5318, -1, -1, -1,
+ -1, 1156, 1157, -1, -1, -1, -1, -1, -1, -1,
+ 4948, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1193, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4993, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2168, -1, -1, -1, 5022, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2185, -1, -1,
+ 5038, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2203, -1, -1, -1, -1,
+ -1, 2502, 5444, -1, -1, -1, -1, -1, -1, -1,
+ 5068, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5472, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2259, -1, -1, -1, -1, 5114, -1, 5116, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5511,
+ 2278, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2291, -1, -1, -1, -1, 1363, 1364,
+ -1, -1, -1, -1, -1, 2303, -1, 1372, -1, -1,
+ -1, -1, -1, -1, 1379, -1, -1, -1, 1383, -1,
+ -1, -1, 5170, -1, 1389, -1, 5174, 1392, -1, -1,
+ -1, -1, -1, -1, -1, 5567, -1, -1, -1, 1404,
+ 5572, 5573, -1, -1, -1, 2343, 2344, -1, -1, -1,
+ -1, 5199, 5200, -1, 1419, 5203, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5218, -1, -1, -1, -1, -1, -1, 5225, -1, -1,
+ -1, -1, 5230, -1, -1, 5233, 5234, -1, -1, -1,
+ -1, -1, 5240, 5241, -1, -1, -1, -1, 1463, 1464,
+ 1465, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5262, -1, 5264, -1, 2709, -1,
+ -1, -1, 2713, 2714, -1, -1, -1, -1, 5276, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1509, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5689, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5318, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5329, -1, -1, 2775, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2789, -1,
+ -1, -1, -1, -1, 2502, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1588, -1, 5373, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2830,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1646, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5442, -1, 5444, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1679, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5471, 5472, -1, 5474, -1, 5476, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1709, -1, -1, 5495, -1, -1,
+ -1, -1, -1, 5501, -1, -1, -1, 5505, -1, 5891,
+ -1, -1, -1, 5511, -1, -1, -1, 5515, -1, -1,
+ -1, -1, 1737, 1738, 1739, -1, 1741, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1761, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2709, -1, -1, -1, 2713, 2714, -1, -1, 5567,
+ -1, -1, -1, -1, 5572, 5573, -1, -1, -1, 5577,
+ -1, -1, -1, -1, 5582, 5583, -1, -1, -1, -1,
+ 3031, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5620, -1, -1, -1, -1, 2775, 1843, 5627,
+ -1, -1, 1847, 1848, -1, -1, -1, -1, -1, -1,
+ -1, 2789, -1, -1, -1, -1, -1, 1862, -1, -1,
+ -1, -1, -1, -1, 5652, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3113, -1, -1, 3116, -1, -1, -1, -1,
+ -1, -1, 2830, -1, -1, -1, -1, -1, -1, -1,
+ 5688, 5689, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5710, -1, -1, 5713, -1, 1932, 5716, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5727,
+ -1, -1, -1, 5731, -1, 5733, -1, 5735, -1, -1,
+ -1, -1, -1, -1, 5742, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5761, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1999, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3248, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2036, -1, -1, 3265, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3280,
+ 5838, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5848, -1, -1, -1, 2069, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5878, 5879, 5880, 3031, -1, -1, -1, -1, -1, 5887,
+ -1, -1, -1, 5891, -1, -1, -1, -1, -1, 5897,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5919, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2147, 2148, 2149, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2168, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3113, -1, -1, 3116, -1,
+ 2185, -1, -1, -1, 5972, -1, -1, -1, -1, -1,
+ 5978, -1, -1, -1, -1, -1, -1, -1, 2203, -1,
+ 5988, -1, -1, -1, -1, -1, 5994, 5995, -1, 5997,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 6007,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2259, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2272, -1, -1,
+ 2275, -1, -1, 2278, -1, -1, 6064, -1, -1, -1,
+ 2285, -1, 6070, -1, -1, -1, 2291, -1, -1, -1,
+ -1, -1, 3523, -1, -1, 3526, -1, 3528, 2303, -1,
+ -1, -1, 3533, -1, -1, -1, -1, -1, -1, 6097,
+ 3248, 2316, 2317, -1, 6102, -1, -1, -1, -1, -1,
+ 6108, -1, -1, -1, -1, 6113, 2331, 3265, -1, 2334,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2343, 2344,
+ -1, -1, 3280, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3582, -1, -1, -1, 6143, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 6153, -1, -1, -1, -1,
+ 3601, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6171, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3626, 6184, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2412, -1, -1,
+ 2415, 2416, -1, -1, -1, -1, -1, -1, 6206, 6207,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2453, 2454,
+ -1, -1, -1, -1, 2459, 2460, -1, -1, -1, -1,
+ -1, 2466, 2467, 2468, -1, 3696, 2471, 3698, 2473, -1,
+ 2475, 2476, 2477, 2478, 2479, 2480, -1, 2482, -1, 2484,
+ 2485, -1, -1, 2488, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2502, 2503, 2504,
+ 2505, 2506, -1, -1, -1, -1, 2511, -1, -1, -1,
+ 2515, -1, -1, 2518, -1, -1, 2521, 2522, 2523, 2524,
+ 2525, 2526, 2527, 2528, 2529, -1, 2531, -1, -1, -1,
+ -1, -1, -1, -1, 2539, -1, -1, 2542, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3789, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3523, -1, -1, 3526, -1,
+ 3528, -1, -1, -1, -1, 3533, -1, -1, 2603, 3830,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2618, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2627, 2628, -1, -1, -1, -1, 3859, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3582, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3601, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3626, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3928, -1, -1,
+ -1, -1, -1, -1, 2709, -1, -1, -1, 2713, 2714,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3949, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3965, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2759, -1, -1, -1, 3696, -1,
+ 3698, -1, -1, -1, -1, -1, 2771, -1, -1, -1,
+ 2775, -1, -1, 2778, -1, -1, 2781, 2782, -1, -1,
+ -1, -1, -1, -1, 2789, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2830, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4070,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3789, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4093, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4118, -1, -1,
+ -1, -1, 3830, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3859, -1, 4154, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2992, 2993, 2994,
+ 3928, -1, -1, 2998, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3949, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3030, 3031, 3965, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4275, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3074,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3113, -1,
+ -1, 3116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3134,
+ -1, -1, 4070, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4374, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4093, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4399, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4154, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3248, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3262, -1, -1,
+ 3265, -1, -1, 3268, -1, -1, 3271, -1, -1, 3274,
+ -1, -1, -1, -1, -1, 3280, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 3290, -1, -1, -1, -1,
+ 3295, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4533, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3319, 3320, 3321, -1, -1, 3324,
+ -1, -1, -1, -1, -1, -1, -1, 3332, 3333, 3334,
+ 3335, -1, -1, -1, -1, -1, -1, 4275, -1, -1,
+ 3345, -1, -1, 3348, -1, 3350, -1, -1, -1, -1,
+ -1, -1, 4583, -1, 4585, -1, 3361, 3362, -1, -1,
+ 3365, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3385, -1, 3387, -1, 3389, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3409, -1, -1, -1, -1, -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, 4374, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3452, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4399, 3467, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3481, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4726, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4736, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3523, -1,
+ -1, 3526, -1, 3528, -1, -1, -1, -1, 3533, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3554,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 148, -1, -1, -1, -1, -1, -1, -1, -1, 157,
+ -1, -1, -1, -1, -1, -1, -1, 3582, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4533, 3601, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 199, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3626, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4862, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4583, 234, 4585, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 246, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4903, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3696, -1, 3698, 4925, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4993, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3789, -1, -1, -1, 4726, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4736, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3816, -1, -1, -1, -1, -1, 3822, -1, -1,
+ -1, -1, -1, -1, -1, 3830, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 427,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3859, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5116, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3928, 4862, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5174, 3949, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3965, -1, -1, -1, -1, 4903, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4925, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4993, -1, -1, -1, -1,
+ -1, -1, 4067, -1, -1, 4070, -1, -1, -1, -1,
+ -1, 4076, -1, -1, -1, -1, -1, -1, -1, 4084,
+ -1, 4086, -1, -1, 4089, -1, -1, 5318, 4093, 4094,
+ 4095, 4096, 4097, -1, -1, 4100, 4101, 4102, 4103, 4104,
+ 4105, 4106, 4107, 4108, 4109, -1, -1, -1, 4113, 4114,
+ -1, -1, -1, 4118, -1, -1, -1, -1, 4123, -1,
+ -1, -1, 4127, -1, -1, -1, 4131, -1, -1, -1,
+ -1, -1, -1, -1, 4139, -1, -1, 4142, -1, 4144,
+ -1, -1, -1, -1, -1, -1, -1, 735, 736, 4154,
+ -1, 4156, -1, -1, 4159, 4160, -1, -1, -1, 4164,
+ 4165, -1, -1, -1, -1, -1, 4171, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4181, -1, 5116, 4184,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4196, -1, -1, -1, 783, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5444, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5174, -1, 4243, -1,
+ -1, 5472, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4259, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4275, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5511, -1, 4287, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 904, -1, -1, -1,
+ -1, -1, -1, -1, 912, -1, -1, 915, -1, -1,
+ 918, 919, -1, 921, -1, 923, 5567, -1, 926, -1,
+ 928, 5572, 5573, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4374,
+ -1, -1, -1, -1, -1, -1, -1, 965, -1, -1,
+ 5318, -1, -1, -1, 972, 973, -1, -1, 976, -1,
+ 978, 979, -1, -1, 4399, 983, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1000, -1, 1002, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1043, -1, 1045, 5689, -1,
+ -1, -1, -1, -1, -1, -1, 1054, 1055, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1064, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4504,
+ -1, -1, -1, -1, -1, -1, 5444, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4533, -1,
+ -1, -1, -1, -1, 5472, 1023, -1, -1, -1, -1,
+ -1, 4546, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1049, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1159, -1, 5511, -1, -1, -1, -1, 4583, -1,
+ 4585, 4586, 4587, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1194, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5567,
+ -1, -1, -1, -1, 5572, 5573, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5891, -1, -1, -1, -1, 4670, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4682, -1, -1,
+ 1268, -1, -1, 1271, -1, 1273, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1288, -1, -1, -1, -1, -1, -1, 4712, -1, -1,
+ 4715, -1, -1, -1, -1, -1, -1, -1, 4723, 4724,
+ -1, 4726, -1, -1, -1, 4730, 4731, -1, -1, -1,
+ 4735, 4736, -1, -1, -1, -1, 4741, -1, -1, 4744,
+ 4745, -1, -1, -1, 4749, -1, -1, -1, -1, -1,
+ 4755, 5689, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4767, -1, -1, -1, 1354, -1, -1, -1,
+ 4775, -1, -1, -1, 4779, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1376, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1388, -1, -1, -1, -1, 1393, -1, 4812, -1, -1,
+ -1, -1, -1, -1, -1, 1403, -1, -1, -1, -1,
+ 1408, -1, -1, -1, -1, -1, -1, -1, -1, 1417,
+ -1, -1, -1, -1, 1422, -1, -1, 1425, -1, 4844,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4862, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1466, -1,
+ -1, -1, 83, -1, -1, -1, -1, 88, -1, 90,
+ -1, 1379, -1, -1, -1, -1, -1, -1, 4903, 100,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1404, -1, -1, -1,
+ 4925, -1, -1, -1, 125, -1, -1, -1, -1, -1,
+ -1, 1419, -1, -1, -1, 136, -1, -1, -1, -1,
+ -1, -1, -1, 4948, -1, -1, 147, 148, -1, -1,
+ 151, -1, -1, 5891, -1, -1, 157, -1, -1, -1,
+ 161, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 183, -1, -1, -1, -1, -1, 4993, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 199, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5022, -1, -1,
+ -1, 1509, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5038, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1635, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5068, -1, -1, -1, 1655, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5114,
+ -1, 5116, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1646, -1,
+ -1, -1, -1, -1, -1, 5170, -1, -1, -1, 5174,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5199, 5200, -1, -1, 5203, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5218, -1, -1, -1, -1, -1, -1,
+ 5225, -1, -1, -1, -1, 5230, 427, -1, 5233, 5234,
+ -1, -1, -1, -1, -1, 5240, 5241, -1, -1, -1,
+ -1, 1829, 1830, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5262, -1, 5264,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5276, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1892, -1, -1, 1895, -1, -1,
+ -1, -1, -1, 5318, -1, 1903, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5329, -1, -1, -1, -1, -1,
+ -1, 1919, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5373, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1156, 1157, -1, -1, -1, 1973, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5442, -1, 5444,
+ -1, -1, -1, -1, 1932, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2041, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5471, 5472, -1, 5474,
+ -1, 5476, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 686, -1, -1, -1, -1,
+ 5495, -1, -1, -1, -1, -1, 5501, -1, -1, -1,
+ 5505, -1, -1, -1, -1, -1, 5511, -1, -1, -1,
+ 5515, 1999, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 735, 736, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2036, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5567, -1, -1, -1, -1, 5572, 5573, -1,
+ -1, -1, 5577, -1, -1, -1, -1, 5582, 5583, -1,
+ -1, 2069, 783, -1, -1, -1, -1, 1363, 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, -1, -1, 5620, -1, -1, -1, 2207,
+ -1, -1, 5627, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5652, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2168, -1, -1, 5688, 5689, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2185, -1, -1,
+ -1, -1, -1, -1, -1, 5710, -1, -1, 5713, -1,
+ -1, 5716, -1, -1, -1, 2203, -1, -1, -1, -1,
+ -1, -1, 5727, -1, -1, -1, 5731, -1, 5733, -1,
+ 5735, -1, -1, -1, -1, -1, -1, 5742, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2336, -1,
+ 2338, -1, -1, -1, -1, -1, 5761, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2354, 2355, -1, 2357,
+ -1, 2259, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2278, -1, -1, -1, -1, -1, -1, -1, 999, 1000,
+ -1, 1002, -1, 2291, -1, -1, -1, -1, -1, 2397,
+ -1, -1, -1, -1, -1, 2303, -1, -1, -1, -1,
+ -1, 2409, -1, -1, -1, 2413, -1, -1, -1, 2417,
+ -1, -1, 2420, 5838, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5848, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2343, 2344, -1, -1, 1060,
+ -1, -1, 1063, 1064, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5878, 5879, 5880, -1, 1078, -1, 1080,
+ -1, 1082, 5887, -1, -1, -1, 5891, 1088, -1, -1,
+ -1, 1092, 5897, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1679, -1, -1, -1, -1, -1, -1,
+ -1, 1112, 1113, -1, 5919, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1023,
+ -1, -1, -1, 1709, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1049, -1, 2545, 1159, -1,
+ 1161, 1737, 1738, 1739, -1, 1741, -1, 5972, -1, -1,
+ -1, -1, -1, 5978, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5988, -1, 1761, -1, -1, -1, 5994,
+ 5995, -1, 5997, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6007, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2502, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1240,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1254, 1255, -1, -1, 1258, -1, 6064,
+ -1, -1, -1, -1, -1, 6070, -1, 1843, -1, -1,
+ -1, 1847, 1848, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6097, -1, -1, -1, -1, 6102, -1, -1,
+ 1301, -1, 2690, 6108, -1, -1, -1, -1, 6113, -1,
+ -1, -1, -1, -1, -1, 2703, 2704, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2722, 2723, -1, -1, 6143, 2727,
+ 2728, -1, -1, -1, 2732, -1, -1, -1, 6153, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2746, -1,
+ -1, -1, -1, -1, -1, 2753, 6171, -1, -1, 2757,
+ 2758, -1, -1, 2761, 2762, -1, -1, -1, -1, 6184,
+ 2768, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2783, -1, 2785, -1, -1,
+ -1, 6206, 6207, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2803, -1, -1, -1, -1,
+ 2808, 2709, -1, -1, -1, 2713, 2714, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2823, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2832, -1, -1, 2835, -1, 2837,
+ 2838, 2839, -1, -1, -1, -1, 2844, 2845, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2854, -1, -1, -1,
+ -1, 2859, -1, -1, -1, 2863, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1379, -1, 2775, -1, -1,
+ 2878, -1, -1, -1, -1, -1, 2884, 2885, -1, -1,
+ -1, 2789, -1, 2891, -1, -1, -1, -1, -1, -1,
+ 1404, -1, -1, 2901, 2902, -1, -1, -1, -1, 2907,
+ -1, -1, -1, -1, -1, 1419, -1, -1, -1, -1,
+ -1, 2919, -1, -1, 2922, -1, -1, -1, -1, 2927,
+ -1, -1, 2830, -1, -1, 2933, 2934, -1, -1, -1,
+ -1, 2939, -1, -1, 2942, -1, -1, -1, 2946, 2947,
+ 2948, 2949, -1, 2951, -1, -1, -1, -1, -1, -1,
+ -1, 2147, 2148, 2149, -1, -1, 2964, 2965, -1, 2967,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2978, 2979, 2980, -1, -1, 1596, -1, -1, -1, -1,
+ 1601, -1, 1603, -1, -1, 1606, -1, 1608, -1, -1,
+ 1611, 1612, 1613, -1, -1, 1509, 1617, -1, -1, -1,
+ -1, -1, -1, 1624, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1638, -1, 1640,
+ -1, -1, -1, -1, 1645, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3041, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3069, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3031, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1646, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1772, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1784, 1785, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1801, -1, -1, -1, -1, 1806, 1807, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3206, -1,
+ -1, 1822, -1, -1, -1, 3113, -1, -1, 3116, -1,
+ -1, -1, -1, 3221, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2459, -1, -1, 1887, -1, 1889, -1,
+ -1, -1, -1, -1, -1, 2471, 3284, 2473, 1899, 2475,
+ -1, -1, 2478, 2479, 2480, -1, -1, -1, -1, 2485,
+ -1, -1, 2488, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2503, 2504, 2505,
+ 2506, -1, -1, -1, -1, 2511, -1, -1, -1, 2515,
+ -1, -1, 2518, -1, -1, 2521, 2522, 2523, 2524, 2525,
+ 2526, 2527, 2528, 2529, -1, 2531, -1, -1, -1, -1,
+ 3248, -1, -1, 2539, -1, -1, 2542, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1977, 3265, -1, -1,
+ -1, -1, -1, -1, -1, -1, 1987, -1, -1, -1,
+ -1, -1, 3280, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2603, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1932, -1,
+ -1, -1, -1, 908, -1, -1, -1, -1, -1, -1,
+ -1, 2627, 2628, -1, -1, 920, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 931, -1, -1, 2070,
+ -1, -1, 2073, 2074, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 949, -1, -1, -1, -1, -1,
+ 955, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 1999, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2036, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3551, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2175, 2069, -1, -1, -1, -1,
+ -1, -1, -1, 2759, -1, -1, -1, -1, 3576, -1,
+ -1, -1, 3580, -1, -1, -1, -1, -1, 3586, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3604, 3605, -1, -1,
+ -1, 3609, -1, -1, -1, -1, 3614, 3615, 3616, -1,
+ -1, -1, -1, -1, -1, 3523, -1, -1, 3526, -1,
+ 3528, -1, -1, -1, -1, 3533, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 3650, 3651, 3652, 3653, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2168, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2185, -1, -1, 3582, -1, -1, 1162, -1, 3687,
+ -1, 3689, 3690, 3691, -1, -1, -1, -1, -1, 2203,
+ -1, -1, -1, 3601, -1, -1, 1181, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3626, 1204,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2259, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2381, -1, 2383, -1, 2278, -1, 2387, -1, 2389, -1,
+ -1, 2392, -1, -1, -1, 2396, -1, 2291, -1, -1,
+ 2401, -1, -1, -1, -1, -1, -1, -1, 3696, 2303,
+ 3698, -1, -1, -1, -1, 3803, 2992, 2993, 2994, -1,
+ -1, -1, 2998, -1, 3812, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1302, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2343,
+ 2344, -1, -1, -1, 3030, 3843, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3866, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3789, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3918, -1, -1, -1, -1, 3923, -1, 2538, -1, -1,
+ -1, -1, 3830, -1, 2545, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2555, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1429, -1, -1, -1, -1, 3957,
+ -1, 3859, -1, -1, -1, 3963, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 1457, 1458, 1459, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 2502, -1,
+ 3998, -1, 4000, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4018, -1, -1, -1, 1023, -1, -1, -1, -1, -1,
+ 3928, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4043, -1, -1, -1, -1,
+ 1049, 3949, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2675, -1, -1, 3965, 2679, -1,
+ -1, -1, -1, -1, 2685, -1, 2687, -1, -1, 2690,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3290, -1, -1, -1, -1, 3295,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2738, -1, -1,
+ -1, -1, -1, -1, -1, 3321, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3332, -1, 3334, 3335,
+ -1, -1, -1, -1, -1, -1, 1631, -1, -1, 3345,
+ -1, -1, 3348, -1, 3350, -1, -1, -1, -1, -1,
+ -1, -1, 4070, -1, -1, -1, -1, -1, -1, 1654,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1663, -1,
+ -1, -1, -1, -1, -1, 4093, -1, -1, -1, 3385,
+ -1, 3387, -1, 3389, -1, 2709, -1, -1, -1, 2713,
+ 2714, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4118, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4154, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3452, -1, -1, -1,
+ -1, 2775, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3467, -1, -1, -1, 2789, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4294, -1, 4296, -1,
+ -1, 2912, -1, -1, -1, 4303, -1, -1, -1, 2920,
+ -1, -1, 2923, -1, -1, -1, -1, -1, -1, -1,
+ -1, 4319, -1, -1, 2935, -1, 2830, -1, -1, -1,
+ -1, -1, -1, 4331, -1, -1, -1, 4335, 1813, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4353, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3554, -1,
+ -1, -1, -1, 4371, -1, -1, -1, 4275, 4376, -1,
+ 1379, -1, -1, -1, 1859, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4401, -1, 1404, -1, 4405, -1, -1,
+ -1, -1, -1, -1, -1, 4413, 4414, 4415, 4416, -1,
+ 1419, -1, -1, -1, 4422, 4423, 4424, 4425, -1, -1,
+ -1, 4429, 4430, -1, -1, -1, -1, 4435, 4436, -1,
+ 4438, 4439, 4440, 4441, 4442, 4443, 4444, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4454, -1, -1, -1,
+ 4458, 4459, 4460, 4461, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4374, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4484, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1753, -1, -1,
+ -1, 4399, -1, -1, -1, 4503, -1, -1, -1, -1,
+ 1509, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3031, -1, -1,
+ 2005, -1, -1, -1, -1, -1, -1, -1, -1, 2014,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2042, -1, -1,
+ 1826, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2065, -1, -1, 2068, -1, 3206, 3207, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4603, -1, -1, -1, 3113,
+ -1, -1, 3116, 3224, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3816, -1, -1, -1, -1, 4533, 3822, -1, 4636, 4637,
+ 4638, 4639, 4640, -1, -1, -1, 2121, 1646, -1, -1,
+ -1, 4649, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2135, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4583, -1, 4585, -1, -1,
+ 2165, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2216, -1, -1, 3248, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3265, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2245, -1, -1, -1, -1, -1, 3280, 2252, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3429, -1,
+ -1, -1, -1, 3434, -1, -1, -1, -1, 4726, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4736, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4870, -1, -1, -1, 4874, 4875, 4876, 4877,
+ -1, 4067, -1, 4881, -1, -1, -1, -1, -1, -1,
+ 4076, -1, -1, -1, 2369, -1, -1, 2153, 4084, -1,
+ 4086, 2157, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4915, 4916, 4917,
+ 4918, 4919, -1, 4921, 4922, -1, -1, 4113, 4114, -1,
+ -1, -1, -1, 1932, -1, 4933, 4934, -1, -1, -1,
+ -1, -1, -1, 2418, 2419, 4131, -1, -1, -1, -1,
+ -1, -1, -1, 4139, -1, -1, 4142, -1, 4144, -1,
+ -1, -1, -1, 2438, 4862, 4963, -1, -1, -1, -1,
+ 4156, -1, -1, 4971, 4972, -1, 4974, -1, 4164, 4165,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1999, -1, -1, -1, -1, 4903, -1, -1, -1, -1,
+ 4196, -1, -1, -1, -1, -1, -1, -1, -1, 3523,
+ -1, -1, 3526, -1, 3528, -1, -1, 4925, -1, 3533,
+ -1, -1, -1, -1, -1, -1, -1, 2036, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4243, -1, -1,
+ -1, -1, -1, 2538, -1, -1, -1, -1, -1, 5067,
+ 2069, -1, -1, 4259, -1, -1, -1, -1, 3582, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 2564,
+ -1, -1, -1, -1, -1, 4993, -1, 3601, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2596, 3626, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2607, 2608, -1, -1, -1, -1, -1, 5137,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2641, -1, -1, 2168,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2185, -1, -1, -1,
+ -1, -1, 3696, -1, 3698, -1, -1, -1, -1, -1,
+ -1, 2457, -1, -1, 2203, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 2472, -1, 5116, -1,
+ 2476, -1, -1, -1, -1, 5223, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2490, 2491, 2492, -1, -1, 2495,
+ 5238, -1, -1, -1, -1, -1, -1, -1, 3859, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2259, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5174, -1, -1, 2278,
+ -1, 2537, -1, -1, -1, 3789, -1, -1, -1, -1,
+ -1, -1, 2291, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2303, -1, -1, -1, -1, -1,
+ -1, -1, 3923, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5320, -1, -1, -1, 3830, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5339, -1, -1, 2343, 2344, 5344, 5345, -1, -1,
+ -1, -1, 3963, -1, -1, 3859, 5354, -1, 2614, 2834,
+ -1, -1, -1, 5361, -1, -1, -1, -1, -1, -1,
+ 2626, -1, -1, -1, 2849, 2631, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 2868, -1, -1, -1, -1, -1, 5397,
+ 4586, 4587, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5417,
+ 5318, 5419, -1, -1, 3928, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5434, -1, -1, -1,
+ -1, -1, -1, 4054, -1, 3949, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5454, -1, -1, -1,
+ -1, 3965, -1, -1, -1, -1, -1, 5465, -1, 2944,
+ 2945, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4670, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4682, -1, -1, -1,
+ 5498, -1, -1, 2502, -1, -1, -1, -1, -1, -1,
+ -1, 5509, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5533, -1, 4723, 4724, -1,
+ -1, -1, -1, -1, 4730, 4731, 5444, -1, -1, 4735,
+ -1, -1, -1, -1, -1, 4741, 5554, -1, 4744, 4745,
+ -1, -1, -1, 4749, -1, -1, 4070, -1, 5566, 4755,
+ -1, -1, -1, -1, 5472, -1, 3051, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4093,
+ -1, -1, -1, 5591, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5511, 4118, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4812, -1, -1, -1,
+ -1, -1, -1, 5631, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4154, -1, -1, 4264, -1, -1, -1, -1, 4844, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5567,
+ -1, -1, -1, -1, 5572, 5573, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5696, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 2709, -1, -1, -1, 2713, 2714, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 5724, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5758, -1, 4948, 4374, -1, -1, -1, -1, -1, -1,
+ -1, 4275, -1, -1, -1, 5773, 2775, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4399, -1,
+ 2789, 5689, -1, -1, -1, 4406, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4417, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5817,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 2830, -1, -1, 5832, -1, 5022, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4374, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4399, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5918, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3413, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5962, -1, -1, -1, -1, 3444,
+ -1, -1, 4583, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5891, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5199, 5200, -1, -1, 5203, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4533,
+ -1, 4642, 3031, -1, -1, -1, -1, 3293, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 6051, 5240, 5241, -1, 3313, 3314, -1,
+ 3316, -1, -1, 3319, 3320, -1, 3322, -1, 3324, -1,
+ -1, -1, 3328, -1, -1, 3331, -1, -1, 5264, 4583,
+ 3336, 4585, -1, -1, -1, -1, 3342, -1, -1, -1,
+ -1, 3347, -1, -1, -1, -1, -1, -1, 3354, 3355,
+ 3356, 3357, -1, -1, -1, 3361, 3362, -1, 3364, -1,
+ -1, -1, -1, -1, 3113, -1, -1, 3116, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3382, -1, 3384, -1,
+ -1, -1, -1, -1, -1, 3391, 3392, 3393, 3394, 3395,
+ 3396, 3397, 3398, 3399, 3400, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4799, 3445,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4726, -1, -1, -1, -1, -1, -1, 3704,
+ -1, -1, 4736, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3248,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3265, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4887, -1, -1, -1,
+ -1, 3280, 4893, -1, -1, -1, 4897, -1, 5474, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3569, -1, 5501, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5515,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4862, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5577, -1, -1, -1, -1, 3871, 3872, 3873, 4903,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3888, -1, -1, -1, -1, -1, -1,
+ -1, 4925, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5620, -1, 3911, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3921, 3922, -1, -1,
+ -1, 3926, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4993,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3523, -1, -1, 3526, -1, 3528,
+ -1, -1, -1, -1, 3533, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5735,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 3820, 3821, -1, 4042, -1, 3825,
+ 4045, -1, -1, -1, -1, 5761, -1, -1, -1, -1,
+ -1, -1, -1, 3582, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 3854, -1,
+ -1, -1, 3601, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5116, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 3626, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 5255, -1, -1, -1, -1, -1,
+ -1, -1, 5838, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5174, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 5878, 5879, 5880, -1, -1, 3696, -1, 3698,
+ -1, -1, -1, 4178, 4179, 4180, -1, 5318, -1, -1,
+ -1, 5897, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3789, -1, 5978, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5419, -1,
+ 4066, 5997, -1, -1, 5318, -1, 4072, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3830, -1, -1, 4090, 4091, -1, -1, 4094, 4095,
+ 4096, 4097, -1, -1, 4100, 4101, 4102, 4103, 4104, 4105,
+ 4106, 4107, 4108, 4109, 4110, -1, -1, -1, -1, -1,
+ 3859, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4132, -1, -1, 4135,
+ -1, 4137, -1, -1, 4140, 4141, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4158, 4159, 4160, 4161, -1, 4163, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 6108, -1, -1, -1, -1, -1, -1, 3928,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5444, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 3949, -1, -1, -1, -1, -1, -1, 6143, -1, -1,
+ -1, -1, -1, -1, -1, -1, 3965, 6153, 5472, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5598, -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, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4500, -1, -1, 4284, -1,
+ -1, -1, -1, -1, -1, -1, 4511, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5567, -1, -1, -1, 4542, 5572, 5573,
+ -1, 4070, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5699, -1,
+ -1, -1, -1, -1, 4093, -1, -1, -1, -1, -1,
+ 4575, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4118,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4154, -1, -1, -1, 4634,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5689, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4504, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4275, -1, -1, -1,
+ -1, 4756, 4757, 4758, 4759, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4374, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 5891, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 4399, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4671, -1, -1, -1, 4675,
+ -1, 4677, 4678, -1, -1, -1, -1, -1, 4684, 4685,
+ 4686, 4687, -1, -1, -1, -1, 4692, 4693, 4694, 4695,
+ 4696, 4697, 4698, 4699, 4700, 4701, 4702, 4703, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 4729, -1, -1, 4732, -1, 4734, -1,
+ -1, -1, -1, 4739, -1, -1, 4742, 4743, -1, -1,
+ 4746, 4747, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4533, -1, -1, 4793, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4811, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 4824, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4583, -1, 4585, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5118, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4726, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 4736, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5025,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5111, 5112, -1, -1, -1,
+ -1, -1, -1, 4862, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5376, -1, -1, 4903, -1, -1, 5163, -1, -1,
+ -1, -1, -1, 5169, 5170, -1, 5391, -1, -1, -1,
+ -1, 5396, -1, -1, -1, -1, 4925, -1, -1, -1,
+ -1, 5187, -1, 5189, -1, -1, -1, 5193, 5194, 5195,
+ -1, -1, 5198, -1, -1, 5201, 5202, 5422, -1, -1,
+ 5206, -1, -1, -1, 5210, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4993, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 5274, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -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, 5549, -1, 48, 49, -1, -1,
+ -1, -1, 54, -1, 5340, -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, 5116, -1, -1,
+ -1, -1, 5378, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 115, -1, -1, -1, 119, 120, 121,
+ 122, 123, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 136, -1, -1, -1, -1, -1,
+ -1, 143, -1, 145, 5649, 5174, -1, -1, -1, -1,
+ 152, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 164, -1, -1, -1, -1, -1, -1, 171,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 181,
+ 182, -1, -1, -1, 5470, 5471, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 5485,
+ 5486, 5487, -1, -1, -1, -1, -1, -1, 210, 5495,
+ -1, -1, -1, -1, -1, -1, 218, -1, -1, -1,
+ -1, 223, -1, -1, -1, -1, -1, 229, -1, -1,
+ -1, -1, -1, 235, -1, 237, 5522, 5523, -1, -1,
+ -1, -1, 244, -1, 246, -1, -1, -1, -1, -1,
+ -1, 5537, -1, 255, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 270, 271,
+ -1, -1, -1, -1, -1, 277, -1, 279, -1, -1,
+ 282, 283, -1, 285, -1, -1, -1, -1, -1, 5318,
+ -1, -1, 294, 295, -1, 297, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 320, 321,
+ 322, -1, -1, -1, -1, -1, -1, -1, 330, 331,
+ -1, -1, -1, -1, 336, -1, -1, 339, -1, 341,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 357, 358, -1, 360, 361,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 374, -1, 376, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 391,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 412, -1, -1, -1, -1, 5444, 418, 5703, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5716, -1, -1, 5719, -1, 437, -1, 5723, 440, -1,
+ -1, 443, -1, 5472, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 459, -1, -1,
+ -1, -1, -1, -1, 466, -1, -1, -1, -1, -1,
+ -1, -1, 474, 475, -1, -1, -1, -1, 480, -1,
+ 482, -1, 5511, -1, -1, -1, 5772, -1, -1, -1,
+ 492, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 507, -1, -1, 510, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 5809, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, -1, -1, -1, 5567, -1,
+ -1, -1, -1, 5572, 5573, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 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, 5885,
+ -1, 5887, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 5917, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 5689, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 5971, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 6000, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 6062, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 6097, -1, -1, -1, -1, 6102, -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, 5891, 6149, 48, 49, 6152, -1, 6154, -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, 6181, -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, -1, 3, -1, -1,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 562, 25,
+ 26, 27, -1, -1, 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, 112, -1, -1, 115,
+ -1, -1, 118, 119, 120, 121, 122, 123, -1, -1,
+ -1, 127, -1, -1, -1, -1, -1, -1, -1, -1,
+ 136, -1, -1, 139, -1, 141, 142, 143, -1, 145,
+ -1, -1, 148, -1, 150, -1, 152, -1, -1, -1,
+ -1, -1, -1, -1, -1, 161, -1, 163, 164, -1,
+ -1, -1, -1, -1, -1, 171, -1, -1, -1, -1,
+ -1, -1, 178, -1, 180, 181, 182, 183, -1, -1,
+ -1, -1, -1, 189, -1, -1, -1, -1, -1, -1,
+ -1, 197, -1, 199, -1, -1, -1, 203, -1, -1,
+ -1, -1, -1, 209, 210, -1, -1, -1, -1, -1,
+ -1, 217, 218, 219, -1, -1, -1, 223, -1, -1,
+ 226, -1, -1, 229, -1, -1, -1, -1, -1, 235,
+ -1, 237, -1, -1, -1, -1, 242, -1, 244, -1,
+ 246, -1, -1, -1, -1, -1, -1, -1, -1, 255,
+ -1, -1, -1, 259, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 270, 271, -1, -1, 274, -1,
+ -1, 277, -1, 279, -1, -1, 282, 283, -1, 285,
+ -1, -1, -1, -1, -1, -1, -1, -1, 294, 295,
+ -1, 297, -1, 299, 300, -1, -1, -1, -1, 305,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 317, -1, -1, 320, 321, 322, -1, -1, -1,
+ -1, -1, -1, -1, 330, 331, -1, -1, -1, 335,
+ 336, -1, -1, 339, -1, 341, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 357, 358, -1, 360, 361, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 374, -1,
+ 376, -1, 378, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 391, 392, -1, -1, -1,
+ -1, -1, 398, 399, -1, 401, -1, -1, -1, -1,
+ 406, -1, -1, -1, -1, 411, 412, -1, 414, -1,
+ -1, -1, 418, -1, -1, 421, -1, -1, -1, -1,
+ -1, 427, 428, -1, -1, -1, -1, -1, -1, 435,
+ -1, 437, -1, 439, 440, -1, -1, 443, -1, -1,
+ -1, -1, -1, 449, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 459, -1, -1, -1, -1, 464, -1,
+ 466, -1, -1, -1, -1, -1, -1, -1, 474, 475,
+ -1, -1, -1, -1, 480, -1, 482, -1, 484, -1,
+ 486, -1, -1, -1, -1, -1, 492, -1, -1, 495,
+ -1, -1, 498, -1, -1, 501, -1, -1, -1, -1,
+ 506, 507, -1, -1, 510, -1, -1, -1, -1, -1,
+ -1, -1, -1, 519, -1, -1, -1, -1, -1, -1,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, -1, -1, -1, -1, -1, 542, -1, -1, -1,
+ -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
+ 556, 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, 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, -1, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, -1, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, -1, 139, 140, 141, 142,
+ 143, -1, 145, -1, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, 160, 161, 162,
+ -1, 164, 165, 166, -1, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, 184, 185, -1, 187, 188, 189, 190, 191, 192,
+ -1, 194, 195, 196, 197, 198, -1, 200, 201, 202,
+ 203, 204, -1, 206, 207, 208, -1, 210, 211, 212,
+ -1, 214, 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, 224, 225, -1, 227, 228, 229, 230, -1, 232,
+ -1, 234, 235, -1, 237, 238, 239, 240, 241, -1,
+ 243, 244, -1, 246, 247, 248, -1, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, -1, 261, 262,
+ 263, 264, 265, 266, 267, -1, 269, 270, 271, -1,
+ 273, 274, 275, 276, 277, -1, 279, -1, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, -1, -1,
+ 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351, 352,
+ -1, -1, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, -1, 372,
+ 373, 374, 375, 376, 377, 378, 379, -1, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, -1, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, -1, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, -1, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, -1, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, -1, 462,
+ 463, -1, 465, 466, 467, 468, 469, 470, 471, -1,
+ 473, 474, 475, -1, -1, 478, 479, 480, 481, 482,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, -1,
+ 493, 494, 495, 496, 497, 498, 499, -1, 501, 502,
+ 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
+ 513, 514, -1, -1, 517, -1, -1, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, 540, -1, -1,
+ -1, -1, -1, -1, 547, 548, 549, -1, -1, -1,
+ -1, -1, -1, 556, 557, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, 276, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 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, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, 464, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, 493, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, 519,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, -1, 542, -1, -1, -1, -1, 547, 548, -1,
+ -1, -1, -1, -1, -1, -1, 556, 557, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, 131, 132, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, 184, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, 271, -1, 273, 274, 275, 276,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, 295, 296,
+ 297, -1, 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, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, 434, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, 493, 494, 495, 496,
+ 497, 498, 499, -1, 501, 502, 503, 504, 505, 506,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 540, -1, -1, -1, -1, -1, -1,
+ 547, 548, -1, -1, -1, -1, -1, -1, -1, 556,
+ 557, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, 276, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, 493,
+ 494, 495, 496, 497, 498, 499, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, -1, -1, -1,
+ -1, -1, -1, 547, 548, -1, -1, -1, -1, -1,
+ -1, -1, 556, 557, 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,
+ -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, 145, -1, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, 160,
+ 161, 162, -1, 164, 165, 166, -1, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ 211, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, 235, -1, 237, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, -1,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, 270,
+ 271, -1, 273, 274, 275, 276, 277, -1, 279, -1,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, -1, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, 466, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, 493, 494, 495, 496, 497, 498, 499, -1,
+ 501, 502, 503, 504, 505, 506, 507, -1, 509, 510,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, 540,
+ -1, -1, -1, -1, -1, -1, 547, 548, -1, -1,
+ -1, -1, -1, -1, -1, 556, 557, 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, -1, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, -1, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ -1, 219, 220, 221, 222, -1, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, -1, -1, -1, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, -1, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 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, -1, -1, 332, -1, 334, 335, 336, 337,
+ -1, -1, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, -1, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, -1, 375, -1, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ -1, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, -1, 481, -1, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, 507,
+ 508, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 537,
+ 538, 539, -1, -1, -1, -1, -1, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, 557,
+ 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, -1, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, -1, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ -1, 219, 220, 221, 222, -1, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, -1, -1, -1, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, -1, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 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, -1, -1, 332, -1, 334, 335, 336, 337,
+ -1, -1, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, -1, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, -1, 375, -1, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ -1, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, -1, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, -1, 481, -1, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, 507,
+ 508, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 537,
+ 538, 539, -1, -1, -1, -1, -1, 5, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, -1, 557,
+ 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 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, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 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, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, 493, 494, 495, 496, 497,
+ 498, 499, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, -1, 542, -1, -1, -1, -1, 547,
+ 548, -1, -1, -1, -1, -1, -1, -1, 556, 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, -1, 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, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ 236, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ 276, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, 292, 293, 294, 295,
+ 296, 297, -1, 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, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, 477, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, 493, 494, 495,
+ 496, 497, 498, 499, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, -1, -1, -1, -1, -1,
+ -1, 547, 548, -1, -1, -1, -1, -1, -1, -1,
+ 556, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, 276, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, 493,
+ 494, 495, 496, 497, 498, 499, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, -1, -1, -1,
+ -1, -1, -1, 547, 548, -1, -1, -1, -1, -1,
+ 554, 555, 556, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, 493, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, -1,
+ -1, -1, -1, -1, -1, 547, 548, 549, -1, -1,
+ -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, 276, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, 493, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, -1, -1, -1, -1, -1, -1, 547, 548, -1,
+ -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 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, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, 493, 494, 495, 496, 497,
+ 498, 499, -1, 501, 502, 503, 504, 505, 506, 507,
+ 508, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, -1, -1, -1, -1, -1, -1, 547,
+ 548, -1, -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ 236, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ 276, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 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, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, 493, 494, 495,
+ 496, 497, 498, 499, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, -1, -1, -1, -1, -1,
+ -1, 547, 548, -1, -1, -1, -1, -1, -1, -1,
+ 556, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, 276, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, 493,
+ 494, 495, 496, 497, 498, 499, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, -1, -1, -1,
+ -1, -1, -1, 547, 548, -1, -1, -1, -1, -1,
+ -1, -1, 556, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, 493, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, -1,
+ -1, -1, -1, -1, -1, 547, 548, -1, -1, -1,
+ -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, 167, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, 276, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, 493, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, -1, -1, -1, -1, -1, -1, 547, 548, -1,
+ -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 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, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, 493, 494, 495, 496, 497,
+ 498, 499, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, -1, -1, -1, -1, -1, -1, 547,
+ 548, -1, -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ -1, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ 276, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 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, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, 493, 494, 495,
+ 496, 497, 498, 499, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 540, -1, -1, -1, -1, -1,
+ -1, 547, 548, -1, -1, -1, -1, -1, -1, -1,
+ 556, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, 276, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, 493,
+ 494, 495, 496, 497, 498, 499, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 540, -1, -1, -1,
+ -1, -1, -1, 547, 548, -1, -1, -1, -1, -1,
+ -1, -1, 556, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, 493, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 540, -1,
+ -1, -1, -1, -1, -1, 547, 548, -1, -1, -1,
+ -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, 184, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, 276, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, 493, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 540, -1, -1, -1, -1, -1, -1, 547, 548, -1,
+ -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, 167,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, 184, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, -1, -1, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 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, -1, 337,
+ 338, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, 493, 494, 495, 496, 497,
+ 498, 499, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 540, -1, -1, -1, -1, -1, -1, 547,
+ 548, -1, -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, 168, 169, 170, 171, 172, 173, 174, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, 184, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ -1, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ 276, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 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, -1, 334, 335,
+ 336, 337, 338, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, 499, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, -1, -1, -1, -1, -1, -1,
+ -1, 547, 548, -1, -1, -1, -1, -1, -1, -1,
+ 556, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, 131, 132, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, 168, 169, 170, 171, 172, 173,
+ 174, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ 224, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, 276, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 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, -1,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, 483,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, 499, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, -1, -1, -1, -1,
+ -1, -1, -1, 547, 548, -1, -1, -1, -1, -1,
+ -1, -1, 556, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, 338, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, -1, -1,
+ -1, -1, -1, -1, -1, 547, 548, -1, -1, -1,
+ -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, 276, 277, -1, 279,
+ -1, 281, -1, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ -1, -1, -1, -1, -1, -1, -1, 547, 548, -1,
+ -1, -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, 224, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, 276, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 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, -1, 334, 335, 336, 337,
+ 338, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, 499, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, -1, -1, -1, -1, 5, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, -1, 125, 126, 127, 128,
+ 129, 130, 131, 132, 133, 134, 135, 136, 137, -1,
+ 139, 140, 141, 142, 143, -1, 145, -1, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, 160, 161, 162, -1, 164, 165, 166, -1, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, -1, 185, -1, 187, 188,
+ 189, 190, 191, 192, -1, 194, 195, 196, 197, -1,
+ -1, 200, 201, 202, 203, 204, -1, 206, 207, 208,
+ -1, 210, 211, 212, -1, 214, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, 224, 225, -1, 227, 228,
+ 229, 230, -1, 232, -1, 234, 235, -1, 237, 238,
+ 239, 240, 241, -1, 243, 244, -1, 246, 247, 248,
+ -1, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, -1, 261, 262, 263, 264, 265, 266, 267, -1,
+ 269, 270, 271, -1, 273, 274, 275, 276, 277, -1,
+ 279, -1, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, -1, -1, 293, 294, 295, 296, 297, -1,
+ 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, -1, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, -1, 346, 347, -1,
+ -1, 350, 351, 352, -1, -1, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, -1, 372, 373, 374, 375, 376, 377, 378,
+ 379, -1, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, -1, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ -1, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, -1,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, -1, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, -1, 462, 463, -1, 465, 466, 467, 468,
+ 469, 470, 471, -1, 473, 474, 475, -1, -1, 478,
+ 479, 480, 481, 482, 483, 484, 485, 486, 487, 488,
+ 489, 490, 491, -1, -1, 494, 495, 496, 497, 498,
+ 499, -1, 501, 502, 503, 504, 505, 506, 507, -1,
+ 509, 510, 511, 512, 513, 514, -1, -1, 517, -1,
+ -1, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, -1, -1, -1, -1, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, 131, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, 276, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, 338, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ -1, -1, -1, -1, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, 556, 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,
+ -1, 112, 113, 114, 115, 116, 117, 118, -1, 120,
+ 121, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ 131, 132, 133, 134, 135, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, 145, -1, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, 160,
+ 161, 162, -1, 164, 165, 166, -1, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, 184, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ -1, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, 235, -1, 237, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, 252, 253, 254, -1, 256, 257, 258, 259, -1,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, 270,
+ 271, -1, 273, 274, 275, 276, 277, -1, 279, -1,
+ 281, -1, -1, 284, 285, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, 295, 296, -1, -1, 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, -1, 337, 338, 339, 340,
+ 341, 342, 343, 344, -1, 346, 347, -1, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, -1, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, -1,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, 466, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, 493, 494, 495, 496, 497, 498, 499, -1,
+ 501, 502, 503, 504, 505, 506, 507, -1, 509, 510,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, -1,
+ -1, -1, -1, -1, -1, -1, 547, 548, -1, -1,
+ -1, -1, -1, -1, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, -1, 125, 126, 127, 128,
+ 129, 130, -1, 132, 133, 134, 135, 136, 137, -1,
+ 139, 140, 141, 142, 143, -1, 145, -1, 147, 148,
+ 149, 150, 151, 152, 153, 154, 155, -1, 157, 158,
+ 159, 160, 161, 162, -1, 164, 165, 166, -1, 168,
+ 169, 170, 171, 172, 173, 174, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, -1, 185, -1, 187, 188,
+ 189, 190, 191, 192, -1, 194, 195, 196, 197, -1,
+ -1, 200, 201, 202, 203, 204, -1, 206, 207, 208,
+ -1, 210, 211, 212, -1, 214, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, -1, 225, -1, 227, 228,
+ 229, 230, -1, 232, -1, 234, 235, -1, 237, 238,
+ 239, 240, 241, -1, 243, 244, -1, 246, 247, 248,
+ -1, 250, 251, 252, 253, 254, 255, 256, 257, 258,
+ 259, -1, 261, 262, 263, 264, 265, 266, 267, -1,
+ 269, 270, 271, -1, 273, 274, 275, -1, 277, -1,
+ 279, -1, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, 291, -1, 293, 294, 295, 296, 297, -1,
+ 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, -1, 334, 335, 336, 337, -1,
+ 339, 340, 341, 342, 343, 344, -1, 346, 347, -1,
+ 349, 350, 351, 352, -1, -1, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, -1, 372, 373, 374, 375, 376, 377, 378,
+ 379, -1, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, -1, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ -1, 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, -1, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, -1, 462, 463, 464, 465, 466, 467, 468,
+ 469, 470, 471, -1, 473, 474, 475, -1, -1, 478,
+ 479, 480, 481, 482, -1, 484, 485, 486, 487, 488,
+ 489, 490, 491, -1, -1, 494, 495, 496, 497, 498,
+ 499, -1, 501, 502, 503, 504, 505, 506, 507, -1,
+ 509, 510, 511, 512, 513, 514, -1, -1, 517, -1,
+ 519, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, -1, -1, 542, -1, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, 556, 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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, 132, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, 168, 169,
+ 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, 291, -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, 349,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, 499,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ -1, -1, -1, -1, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, 556, 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,
+ -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ -1, 132, 133, 134, 135, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, 145, -1, 147, 148, 149, 150,
+ 151, 152, 153, 154, 155, -1, 157, 158, 159, 160,
+ 161, 162, -1, 164, 165, 166, -1, 168, 169, 170,
+ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, -1, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ 211, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, -1, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, 235, -1, 237, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, -1,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, 270,
+ 271, -1, 273, 274, 275, -1, 277, -1, 279, -1,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, -1, 339, 340,
+ 341, 342, 343, 344, -1, 346, 347, -1, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, -1, 429, 430,
+ 431, 432, 433, 434, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, 466, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, -1, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, -1, 494, 495, 496, 497, 498, 499, -1,
+ 501, 502, 503, 504, 505, 506, 507, -1, 509, 510,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, -1,
+ -1, -1, -1, 5, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, 556, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ 132, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, -1, -1,
+ -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, 556, 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, -1, 112,
+ 113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
+ 123, -1, 125, 126, 127, 128, 129, 130, -1, 132,
+ 133, 134, 135, 136, 137, -1, 139, 140, 141, 142,
+ 143, -1, 145, -1, 147, 148, 149, 150, 151, 152,
+ 153, 154, 155, -1, 157, 158, 159, 160, 161, 162,
+ -1, 164, 165, 166, -1, 168, 169, 170, 171, 172,
+ 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, -1, 185, -1, 187, 188, 189, 190, 191, 192,
+ -1, 194, 195, 196, 197, -1, -1, 200, 201, 202,
+ 203, 204, -1, 206, 207, 208, -1, 210, 211, 212,
+ -1, 214, 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, -1, 225, -1, 227, 228, 229, 230, -1, 232,
+ -1, 234, 235, -1, 237, 238, 239, 240, 241, -1,
+ 243, 244, -1, 246, 247, 248, -1, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, -1, 261, 262,
+ 263, 264, 265, 266, 267, -1, 269, 270, 271, -1,
+ 273, 274, 275, -1, 277, -1, 279, -1, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, -1, -1,
+ 293, 294, 295, 296, 297, -1, 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,
+ -1, 334, 335, 336, 337, -1, 339, 340, 341, 342,
+ 343, 344, -1, 346, 347, -1, -1, 350, 351, 352,
+ -1, -1, 355, 356, 357, 358, 359, 360, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, -1, 372,
+ 373, 374, 375, 376, 377, 378, 379, -1, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, -1, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, -1, 410, 411, 412,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, -1, 429, 430, 431, 432,
+ 433, 434, 435, 436, 437, 438, 439, 440, 441, 442,
+ 443, 444, -1, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, -1, 462,
+ 463, -1, 465, 466, 467, 468, 469, 470, 471, -1,
+ 473, 474, 475, -1, -1, 478, 479, 480, 481, 482,
+ -1, 484, 485, 486, 487, 488, 489, 490, 491, -1,
+ -1, 494, 495, 496, 497, 498, 499, -1, 501, 502,
+ 503, 504, 505, 506, 507, -1, 509, 510, 511, 512,
+ 513, 514, -1, -1, 517, -1, -1, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, -1, -1, -1,
+ -1, 5, 6, 7, 8, 9, 10, 11, 12, -1,
+ 14, 15, -1, 556, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, -1, -1, -1, 171, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 299, 300, 301, -1, -1,
+ 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, -1,
+ 334, 335, 336, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, -1, -1, -1, -1,
+ -1, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 556, 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, -1, 112, 113, 114,
+ -1, 116, 117, 118, 119, 120, -1, 122, 123, -1,
+ 125, 126, 127, 128, 129, 130, -1, -1, 133, 134,
+ 135, 136, 137, -1, 139, 140, 141, 142, 143, -1,
+ -1, -1, 147, 148, 149, 150, 151, -1, 153, 154,
+ 155, -1, 157, 158, 159, 160, 161, 162, -1, 164,
+ 165, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, -1,
+ 185, -1, 187, 188, 189, 190, 191, 192, -1, 194,
+ 195, 196, 197, -1, -1, 200, 201, 202, 203, 204,
+ -1, 206, 207, 208, -1, 210, 211, 212, -1, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, -1,
+ 225, -1, 227, 228, 229, 230, -1, 232, -1, 234,
+ -1, -1, 237, 238, 239, 240, 241, -1, 243, 244,
+ -1, 246, 247, 248, -1, 250, 251, 252, 253, 254,
+ -1, 256, 257, 258, 259, -1, 261, 262, 263, 264,
+ 265, 266, 267, -1, 269, 270, 271, -1, 273, 274,
+ 275, -1, 277, -1, 279, -1, 281, -1, -1, 284,
+ 285, 286, 287, 288, 289, 290, -1, -1, 293, 294,
+ 295, 296, -1, -1, 299, 300, 301, -1, -1, 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, -1, 334,
+ 335, -1, 337, -1, 339, 340, 341, 342, 343, 344,
+ -1, 346, 347, -1, -1, 350, 351, 352, -1, -1,
+ 355, 356, 357, -1, 359, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, -1, 372, 373, 374,
+ 375, 376, 377, 378, 379, -1, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, -1, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, -1, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, -1, 429, 430, 431, 432, 433, -1,
+ 435, 436, 437, 438, 439, -1, 441, 442, 443, 444,
+ -1, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, -1, 462, 463, -1,
+ 465, -1, 467, 468, 469, 470, 471, -1, 473, 474,
+ 475, -1, -1, 478, 479, 480, 481, 482, -1, 484,
+ 485, 486, 487, 488, 489, 490, 491, -1, -1, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, 507, -1, 509, -1, 511, 512, 513, 514,
+ -1, -1, 517, -1, -1, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, -1, -1, -1, -1, -1,
+ -1, 6, 7, 8, 9, 10, 11, 12, -1, 14,
+ 15, -1, 557, 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, -1, 112, 113, 114,
+ -1, 116, 117, 118, 119, 120, -1, 122, 123, -1,
+ 125, 126, 127, 128, 129, 130, -1, -1, 133, 134,
+ 135, 136, 137, -1, 139, 140, 141, 142, 143, -1,
+ -1, -1, 147, 148, 149, 150, 151, -1, 153, 154,
+ 155, -1, 157, 158, 159, 160, 161, 162, -1, -1,
+ 165, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, -1,
+ 185, -1, 187, 188, 189, 190, 191, 192, -1, 194,
+ 195, 196, 197, -1, -1, 200, 201, 202, 203, 204,
+ -1, 206, 207, 208, -1, 210, 211, 212, -1, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, -1,
+ 225, -1, 227, 228, 229, 230, -1, 232, -1, 234,
+ -1, -1, -1, 238, 239, 240, 241, -1, 243, 244,
+ -1, 246, 247, 248, -1, 250, 251, 252, 253, 254,
+ -1, 256, 257, 258, 259, -1, 261, 262, 263, 264,
+ 265, 266, 267, -1, 269, -1, 271, -1, 273, 274,
+ 275, -1, 277, -1, 279, -1, 281, -1, -1, 284,
+ -1, 286, 287, 288, 289, 290, -1, -1, 293, 294,
+ -1, 296, -1, -1, 299, 300, 301, -1, -1, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, -1, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, -1, 334,
+ 335, -1, 337, -1, 339, 340, 341, 342, 343, 344,
+ -1, 346, 347, -1, -1, 350, 351, 352, -1, -1,
+ 355, 356, 357, -1, 359, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, -1, 372, 373, 374,
+ 375, 376, 377, 378, 379, -1, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, -1, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, -1, 410, 411, -1, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, 428, 429, 430, 431, 432, 433, -1,
+ 435, 436, 437, 438, 439, -1, 441, 442, 443, 444,
+ -1, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, -1, 462, 463, 464,
+ 465, -1, 467, 468, 469, 470, 471, -1, 473, 474,
+ 475, -1, -1, 478, 479, 480, 481, 482, -1, 484,
+ 485, 486, 487, 488, 489, 490, 491, -1, -1, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, 507, -1, 509, -1, 511, 512, 513, 514,
+ -1, -1, 517, -1, 519, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, -1, -1, 542, -1, -1,
+ 6, 7, 8, 9, 10, 11, 12, -1, 14, 15,
+ -1, 556, 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, 464, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, 519, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, -1, -1, 542, -1, -1, 6,
+ 7, 8, 9, 10, 11, 12, -1, 14, 15, -1,
+ 556, 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, -1, 112, 113, 114, -1, 116,
+ 117, 118, 119, 120, -1, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, -1, -1,
+ 147, 148, 149, 150, 151, -1, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, -1, 165, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, -1, -1,
+ -1, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, 252, 253, 254, -1, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, -1, 271, -1, 273, 274, 275, -1,
+ 277, -1, 279, -1, 281, -1, -1, 284, -1, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, -1, 296,
+ -1, -1, 299, 300, 301, -1, -1, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, -1, 334, 335, -1,
+ 337, -1, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, -1, 359, -1, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, -1, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, -1, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, -1,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, 506,
+ 507, -1, 509, -1, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, -1, -1, -1, -1, -1, 6, 7,
+ 8, 9, 10, 11, 12, -1, 14, 15, 555, 556,
+ 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, -1, -1, -1, -1, -1, 6, 7, 8,
+ 9, 10, 11, 12, -1, 14, 15, -1, 556, 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, -1, 112, 113, 114, -1, 116, 117, 118,
+ 119, 120, -1, 122, 123, -1, 125, 126, 127, 128,
+ 129, 130, -1, -1, 133, 134, 135, 136, 137, -1,
+ 139, 140, 141, 142, 143, -1, -1, -1, 147, 148,
+ 149, 150, 151, -1, 153, 154, 155, -1, 157, 158,
+ 159, 160, 161, 162, -1, -1, 165, 166, -1, -1,
+ -1, -1, -1, -1, -1, -1, 175, 176, 177, 178,
+ 179, 180, 181, 182, 183, -1, 185, -1, 187, 188,
+ 189, 190, 191, 192, -1, 194, 195, 196, 197, -1,
+ -1, 200, 201, 202, 203, 204, -1, 206, 207, 208,
+ -1, 210, 211, 212, -1, 214, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, -1, 225, -1, 227, 228,
+ 229, 230, -1, 232, -1, 234, -1, -1, -1, 238,
+ 239, 240, 241, -1, 243, 244, -1, 246, 247, 248,
+ -1, 250, 251, 252, 253, 254, -1, 256, 257, 258,
+ 259, -1, 261, 262, 263, 264, 265, 266, 267, -1,
+ 269, -1, 271, -1, 273, 274, 275, -1, 277, -1,
+ 279, -1, 281, -1, -1, 284, -1, 286, 287, 288,
+ 289, 290, -1, -1, 293, 294, -1, 296, -1, -1,
+ 299, 300, 301, -1, -1, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
+ 319, 320, -1, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, -1, 334, 335, -1, 337, -1,
+ 339, 340, 341, 342, 343, 344, -1, 346, 347, -1,
+ -1, 350, 351, 352, -1, -1, 355, 356, 357, -1,
+ 359, -1, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, -1, 372, 373, 374, 375, 376, 377, 378,
+ 379, -1, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, -1, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ -1, 410, 411, -1, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, 426, 427, -1,
+ 429, 430, 431, 432, 433, -1, 435, 436, 437, 438,
+ 439, -1, 441, 442, 443, 444, -1, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, -1, 462, 463, -1, 465, -1, 467, 468,
+ 469, 470, 471, -1, 473, 474, 475, -1, -1, 478,
+ 479, 480, 481, 482, -1, 484, 485, 486, 487, 488,
+ 489, 490, 491, -1, -1, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, 506, 507, -1,
+ 509, -1, 511, 512, 513, 514, -1, -1, 517, -1,
+ -1, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, 537, 538,
+ 539, -1, -1, -1, -1, -1, 6, 7, 8, 9,
+ 10, 11, 12, -1, 14, 15, -1, 556, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ -1, -1, -1, -1, -1, 6, 7, 8, 9, 10,
+ 11, 12, -1, 14, 15, -1, 556, 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,
+ -1, 112, 113, 114, -1, 116, 117, 118, 119, 120,
+ -1, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ -1, -1, 133, 134, 135, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, -1, -1, 147, 148, 149, 150,
+ 151, -1, 153, 154, 155, -1, 157, 158, 159, 160,
+ 161, 162, -1, -1, 165, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, -1, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ 211, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, -1, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, -1, -1, -1, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, 252, 253, 254, -1, 256, 257, 258, 259, -1,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, -1,
+ 271, -1, 273, 274, 275, -1, 277, -1, 279, -1,
+ 281, -1, -1, 284, -1, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, -1, 296, -1, -1, 299, 300,
+ 301, -1, -1, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ -1, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, -1, 334, 335, -1, 337, -1, 339, 340,
+ 341, 342, 343, 344, -1, 346, 347, -1, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, -1, 359, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, -1, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, -1, 429, 430,
+ 431, 432, 433, -1, 435, 436, 437, 438, 439, -1,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, -1, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, -1, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, -1, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, 506, 507, -1, 509, -1,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, -1,
+ -1, -1, -1, -1, 6, 7, 8, 9, 10, 11,
+ 12, -1, 14, 15, -1, 556, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, -1, -1,
+ -1, -1, 5, 6, 7, 8, 9, 10, 11, 12,
+ -1, 14, 15, -1, 556, 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, -1, 120, 121, 122,
+ 123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
+ 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
+ -1, 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,
+ 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, -1, 219, 220, 221, 222,
+ -1, 224, 225, 226, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, -1, 245, -1, 247, 248, 249, 250, 251, 252,
+ 253, 254, 255, 256, 257, 258, 259, 260, 261, 262,
+ 263, 264, 265, 266, 267, 268, 269, 270, -1, -1,
+ 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
+ 283, 284, 285, 286, 287, 288, 289, 290, 291, 292,
+ 293, -1, 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, -1, 332,
+ 333, 334, 335, 336, 337, 338, -1, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 351, 352,
+ 353, 354, 355, 356, -1, 358, 359, 360, -1, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, 371, 372,
+ 373, -1, 375, -1, 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, -1, 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, -1, 460, 461, 462,
+ 463, 464, 465, 466, 467, 468, 469, 470, 471, 472,
+ 473, 474, 475, -1, 477, 478, 479, -1, 481, -1,
+ 483, 484, 485, 486, 487, 488, 489, 490, 491, -1,
+ 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
+ 503, 504, 505, -1, 507, 508, 509, 510, 511, 512,
+ 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
+ 523, 524, 525, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 537, 538, 539, -1, -1, -1,
+ 543, 544, 545, -1, 547, 548, 549, 550, 551, 552,
+ 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, -1, 120, 121, 122, 123, 124,
+ 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
+ 135, 136, 137, 138, 139, 140, 141, 142, -1, 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, 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, -1, 219, 220, 221, 222, -1, 224,
+ 225, 226, 227, 228, 229, 230, 231, 232, 233, 234,
+ 235, 236, 237, 238, 239, 240, 241, 242, 243, -1,
+ 245, -1, 247, 248, 249, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, -1, -1, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, -1,
+ 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, -1, 332, 333, 334,
+ 335, 336, 337, 338, -1, 340, 341, 342, 343, 344,
+ 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
+ 355, 356, -1, 358, 359, 360, -1, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, 371, 372, 373, -1,
+ 375, -1, 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, -1, 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, -1, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 469, 470, 471, 472, 473, 474,
+ 475, -1, 477, 478, 479, -1, 481, -1, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, -1, 493, 494,
+ 495, 496, 497, 498, 499, 500, 501, 502, 503, 504,
+ 505, -1, 507, 508, 509, 510, 511, 512, 513, 514,
+ 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
+ 525, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 537, 538, 539, -1, -1, -1, 543, 544,
+ 545, -1, 547, 548, 549, 550, 551, 552, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, -1, -1, -1, 543, 544, 545, -1, 547,
+ 548, 549, 550, 551, 552, 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,
+ -1, 112, 113, 114, -1, 116, 117, 118, 119, 120,
+ -1, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ -1, -1, 133, 134, 135, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, -1, -1, 147, 148, 149, 150,
+ 151, -1, 153, 154, 155, -1, 157, 158, 159, 160,
+ 161, 162, -1, -1, 165, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, -1, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ 211, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, -1, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, -1, -1, -1, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, 252, 253, 254, -1, 256, 257, 258, 259, -1,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, -1,
+ 271, -1, 273, 274, 275, -1, 277, -1, 279, -1,
+ 281, -1, -1, 284, -1, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, -1, 296, -1, -1, 299, 300,
+ 301, -1, -1, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ -1, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, -1, 334, 335, -1, 337, -1, 339, 340,
+ 341, 342, 343, 344, -1, 346, 347, -1, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, -1, 359, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, -1, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, -1, 429, 430,
+ 431, 432, 433, -1, 435, 436, 437, 438, 439, -1,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, -1, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, -1, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, -1, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, 506, 507, -1, 509, -1,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, -1,
+ -1, -1, 543, 544, 545, -1, 547, 548, 549, 550,
+ 551, 552, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, -1, -1, -1, 543,
+ 544, 545, -1, 547, 548, 549, 550, 551, 552, 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, -1, 112, 113, 114, -1, 116,
+ 117, 118, 119, 120, -1, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, -1, -1,
+ 147, 148, 149, 150, 151, -1, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, -1, 165, 166,
+ -1, -1, -1, -1, -1, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, -1, -1,
+ -1, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, 252, 253, 254, -1, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, -1, 271, -1, 273, 274, 275, -1,
+ 277, -1, 279, -1, 281, -1, -1, 284, -1, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, -1, 296,
+ -1, -1, 299, 300, 301, -1, -1, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, -1, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, -1, 334, 335, -1,
+ 337, -1, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, -1, 359, -1, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, -1, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, -1, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, -1,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, 506,
+ 507, -1, 509, -1, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, -1, -1, -1, 543, 544, 545, -1,
+ 547, 548, 549, 550, 551, 552, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ -1, -1, -1, 543, 544, 545, -1, 547, 548, 549,
+ 550, 551, 552, 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, -1, 112,
+ 113, 114, -1, 116, 117, 118, 119, 120, -1, 122,
+ 123, -1, 125, 126, 127, 128, 129, 130, -1, -1,
+ 133, 134, 135, 136, 137, -1, 139, 140, 141, 142,
+ 143, -1, -1, -1, 147, 148, 149, 150, 151, -1,
+ 153, 154, 155, -1, 157, 158, 159, 160, 161, 162,
+ -1, -1, 165, 166, -1, -1, -1, -1, -1, -1,
+ -1, -1, 175, 176, 177, 178, 179, 180, 181, 182,
+ 183, -1, 185, -1, 187, 188, 189, 190, 191, 192,
+ -1, 194, 195, 196, 197, -1, -1, 200, 201, 202,
+ 203, 204, -1, 206, 207, 208, -1, 210, 211, 212,
+ -1, 214, 215, 216, 217, 218, 219, 220, 221, 222,
+ 223, -1, 225, -1, 227, 228, 229, 230, -1, 232,
+ -1, 234, -1, -1, -1, 238, 239, 240, 241, -1,
+ 243, 244, -1, 246, 247, 248, -1, 250, 251, 252,
+ 253, 254, -1, 256, 257, 258, 259, -1, 261, 262,
+ 263, 264, 265, 266, 267, -1, 269, -1, 271, -1,
+ 273, 274, 275, -1, 277, -1, 279, -1, 281, -1,
+ -1, 284, -1, 286, 287, 288, 289, 290, -1, -1,
+ 293, 294, -1, 296, -1, -1, 299, 300, 301, -1,
+ -1, 304, 305, 306, 307, 308, 309, 310, 311, 312,
+ 313, 314, 315, 316, 317, 318, 319, 320, -1, 322,
+ 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
+ -1, 334, 335, -1, 337, -1, 339, 340, 341, 342,
+ 343, 344, -1, 346, 347, -1, -1, 350, 351, 352,
+ -1, -1, 355, 356, 357, -1, 359, -1, 361, 362,
+ 363, 364, 365, 366, 367, 368, 369, 370, -1, 372,
+ 373, 374, 375, 376, 377, 378, 379, -1, 381, 382,
+ 383, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, -1, 397, 398, 399, 400, 401, 402,
+ 403, 404, 405, 406, 407, 408, -1, 410, 411, -1,
+ 413, 414, 415, 416, 417, 418, 419, 420, 421, 422,
+ 423, 424, 425, 426, 427, -1, 429, 430, 431, 432,
+ 433, -1, 435, 436, 437, 438, 439, -1, 441, 442,
+ 443, 444, -1, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 459, 460, -1, 462,
+ 463, -1, 465, -1, 467, 468, 469, 470, 471, -1,
+ 473, 474, 475, -1, -1, 478, 479, 480, 481, 482,
+ -1, 484, 485, 486, 487, 488, 489, 490, 491, -1,
+ -1, 494, 495, 496, 497, 498, -1, -1, 501, 502,
+ 503, 504, 505, 506, 507, -1, 509, -1, 511, 512,
+ 513, 514, -1, -1, 517, -1, -1, 520, 521, 522,
+ 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
+ 533, 534, 535, 536, 537, 538, 539, -1, -1, -1,
+ 543, 544, 545, -1, 547, 548, 549, 550, 551, 552,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, -1, -1, -1, 543, 544, 545,
+ -1, 547, 548, 549, 550, 551, 552, 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, -1, 5, 6, 7, 8, 9, 10, 11,
+ 12, 549, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, 354, 355, 356, 357, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, 508, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, -1, -1,
+ 6, 7, 8, 9, 10, 11, 12, 549, 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, -1, -1, 6, 7, 8, 9,
+ 10, 11, 12, 549, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ -1, -1, 6, 7, 8, 9, 10, 11, 12, 549,
+ 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, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, 236, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, 260, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, -1, -1, -1, -1,
+ -1, -1, -1, 547, 548, 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,
+ 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,
+ -1, 112, 113, 114, -1, 116, 117, 118, 119, 120,
+ -1, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ -1, -1, 133, 134, 135, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, -1, -1, 147, 148, 149, 150,
+ 151, -1, 153, 154, 155, -1, 157, 158, 159, 160,
+ 161, 162, -1, -1, 165, 166, -1, -1, -1, -1,
+ -1, -1, -1, -1, 175, 176, 177, 178, 179, 180,
+ 181, 182, 183, -1, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ 211, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, -1, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, -1, 236, -1, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, 252, 253, 254, -1, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, -1,
+ 271, -1, 273, 274, 275, -1, 277, -1, 279, -1,
+ 281, -1, -1, 284, -1, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, -1, 296, -1, -1, 299, 300,
+ 301, -1, -1, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, 313, 314, 315, 316, 317, 318, 319, 320,
+ -1, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, -1, 334, 335, -1, 337, -1, 339, 340,
+ 341, 342, 343, 344, -1, 346, 347, -1, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, -1, 359, -1,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, -1, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, 426, 427, -1, 429, 430,
+ 431, 432, 433, -1, 435, 436, 437, 438, 439, -1,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, -1, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, -1, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, -1, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, 506, 507, -1, 509, -1,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 537, 538, 539, -1,
+ -1, -1, -1, -1, -1, -1, 547, 548, 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, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, 236, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, -1, -1, -1, -1, -1, -1, -1, 547,
+ 548, 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, 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, -1, 112, 113, 114,
+ -1, 116, 117, 118, 119, 120, -1, 122, 123, -1,
+ 125, 126, 127, 128, 129, 130, -1, -1, 133, 134,
+ 135, 136, 137, -1, 139, 140, 141, 142, 143, -1,
+ -1, -1, 147, 148, 149, 150, 151, -1, 153, 154,
+ 155, -1, 157, 158, 159, 160, 161, 162, -1, -1,
+ 165, 166, -1, -1, -1, -1, -1, -1, -1, -1,
+ 175, 176, 177, 178, 179, 180, 181, 182, 183, -1,
+ 185, -1, 187, 188, 189, 190, 191, 192, -1, 194,
+ 195, 196, 197, -1, -1, 200, 201, 202, 203, 204,
+ -1, 206, 207, 208, -1, 210, 211, 212, -1, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, -1,
+ 225, -1, 227, 228, 229, 230, -1, 232, -1, 234,
+ -1, 236, -1, 238, 239, 240, 241, -1, 243, 244,
+ -1, 246, 247, 248, -1, 250, 251, 252, 253, 254,
+ -1, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, -1, 269, -1, 271, -1, 273, 274,
+ 275, -1, 277, -1, 279, -1, 281, -1, -1, 284,
+ -1, 286, 287, 288, 289, 290, -1, -1, 293, 294,
+ -1, 296, -1, -1, 299, 300, 301, -1, -1, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
+ 315, 316, 317, 318, 319, 320, -1, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, -1, 334,
+ 335, -1, 337, -1, 339, 340, 341, 342, 343, 344,
+ -1, 346, 347, -1, -1, 350, 351, 352, -1, -1,
+ 355, 356, 357, -1, 359, -1, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, -1, 372, 373, 374,
+ 375, 376, 377, 378, 379, -1, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, -1, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, -1, 410, 411, -1, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, 426, 427, -1, 429, 430, 431, 432, 433, -1,
+ 435, 436, 437, 438, 439, -1, 441, 442, 443, 444,
+ -1, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, -1, 462, 463, -1,
+ 465, -1, 467, 468, 469, 470, 471, -1, 473, 474,
+ 475, -1, -1, 478, 479, 480, 481, 482, -1, 484,
+ 485, 486, 487, 488, 489, 490, 491, -1, -1, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, 506, 507, -1, 509, -1, 511, 512, 513, 514,
+ -1, -1, 517, -1, -1, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 537, 538, 539, -1, -1, -1, -1, -1,
+ -1, -1, 547, 548, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, 476, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, -1, -1,
+ -1, -1, 4, 545, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, 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, 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, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ 132, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 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, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, 271, -1, 273, 274, 275, -1,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, 334, 335, 336,
+ 337, -1, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, 506,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, 271, -1, 273, 274, 275, -1,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, 334, 335, 336,
+ 337, -1, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, 506,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, 271, -1, 273, 274, 275, -1,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, 334, 335, 336,
+ 337, -1, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, 506,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, 508, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, -1, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, -1, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, -1, 219, 220, 221, 222, -1, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, -1, -1, -1,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, -1, -1, 273, 274, 275, 276,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, -1, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, -1, 332, -1, 334, 335, 336,
+ 337, 338, -1, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ -1, 358, 359, 360, -1, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, -1, 375, -1,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, -1, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, -1, 462, 463, 464, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, -1, 481, -1, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, -1,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, -1, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, -1, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, -1, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, -1, 219, 220, 221, 222, -1, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, -1, -1, -1,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, -1, -1, 273, 274, 275, 276,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, -1, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, 332, -1, 334, 335, 336,
+ 337, -1, -1, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ -1, 358, 359, 360, -1, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, -1, 375, -1,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, -1, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, -1, 481, -1, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, 229, 230, 231,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, -1,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, -1, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, -1, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, -1, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, -1, 219, 220, 221, 222, -1, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, -1, -1, -1,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, -1, -1, 273, 274, 275, 276,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, -1, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, -1, 332, -1, 334, 335, 336,
+ 337, -1, -1, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ -1, 358, 359, 360, -1, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, -1, 375, -1,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, -1, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, -1, 481, -1, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, -1,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, -1, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, -1, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, -1, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, -1, 219, 220, 221, 222, -1, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, -1, -1, -1,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, -1, -1, 273, 274, 275, 276,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, -1, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, -1, 332, -1, 334, 335, 336,
+ 337, -1, -1, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ -1, 358, 359, 360, -1, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, -1, 375, -1,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, -1, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, -1, 481, -1, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, -1,
+ -1, 273, 274, 275, 276, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 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, -1, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, -1, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, 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, -1, 112, 113, 114, 115, 116,
+ 117, 118, -1, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, 135, 136,
+ 137, -1, 139, 140, 141, 142, -1, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, 155, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, 179, 180, 181, 182, 183, -1, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, -1, 219, 220, 221, 222, -1, -1, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, -1, -1, -1,
+ 247, 248, -1, 250, 251, 252, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, -1, -1, 273, 274, 275, 276,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, -1, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 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, -1, -1, 332, -1, 334, 335, 336,
+ 337, -1, -1, 340, 341, 342, 343, 344, -1, 346,
+ 347, -1, -1, 350, 351, 352, -1, -1, 355, 356,
+ -1, 358, 359, 360, -1, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, -1, 375, -1,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, -1, 419, 420, 421, 422, 423, 424, 425, 426,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ -1, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, -1, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, -1, 481, -1, -1, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 537, 538, 539, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, -1, -1, 121,
+ -1, -1, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, -1, -1, 137, -1, 139, 140, 141,
+ 142, -1, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, -1,
+ -1, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, -1, 219, 220, 221,
+ 222, -1, -1, 225, -1, 227, 228, -1, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, -1, -1, -1, 247, 248, -1, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, -1,
+ -1, 273, 274, 275, -1, -1, -1, -1, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, -1, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, -1, 321,
+ -1, 323, 324, 325, 326, 327, 328, 329, -1, -1,
+ 332, -1, 334, 335, 336, 337, -1, -1, 340, -1,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, -1, 358, 359, 360, -1,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, -1, 375, -1, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, -1,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, -1, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, -1, 438, 439, 440, 441,
+ 442, -1, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, -1, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, -1, -1, -1, -1, 478, 479, -1, 481,
+ -1, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, -1, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 537, 538, 539, 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, -1, 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, -1,
+ 168, 169, 170, 171, 172, 173, 174, 175, 176, 177,
+ 178, -1, 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, -1, 253, 254, 255, 256, 257,
+ 258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
+ 268, 269, 270, 271, -1, 273, 274, 275, -1, 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, -1, 314, 315, -1, 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, -1, 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, -1, 477,
+ 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, 493, 494, 495, 496, 497,
+ 498, 499, 500, 501, 502, 503, 504, 505, -1, 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, -1,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+ -1, -1, 146, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, 233,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, 380, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, 493,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, 138, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, 233, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, 297, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ 380, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, 493, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, 163, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, 242, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 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, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, 428, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, 163, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ 242, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 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, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, 428, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, 233, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, 493, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, 167, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ 184, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, 163, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 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, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, 233, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, 464, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, 163,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 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, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, 428, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, 464, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, 349,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, 499, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, 499, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, 349, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, 349, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, -1, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, -1, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, -1, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, 155, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, 155,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, 155, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, 155, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, -1, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, -1, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117,
+ 118, 119, 120, -1, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, 135, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, -1, -1, 147,
+ 148, 149, 150, 151, -1, 153, 154, -1, -1, 157,
+ 158, 159, 160, 161, 162, -1, -1, 165, 166, -1,
+ -1, -1, -1, -1, -1, -1, -1, 175, 176, 177,
+ 178, 179, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, -1, -1, -1,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, 252, 253, 254, -1, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, -1, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, -1, -1, 284, -1, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, -1, 296, -1,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
+ 318, 319, 320, -1, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, -1, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ -1, 359, -1, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, -1, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, 426, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, -1, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, -1, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, -1, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 537,
+ 538, 539, 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, -1, 112, 113,
+ 114, -1, 116, 117, 118, 119, 120, -1, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, 135, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, -1, -1, 147, 148, 149, 150, 151, -1, 153,
+ 154, -1, -1, 157, 158, 159, 160, 161, 162, -1,
+ -1, 165, 166, -1, -1, -1, -1, -1, -1, -1,
+ -1, 175, 176, 177, 178, 179, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, -1, -1, -1, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, 252, 253,
+ 254, -1, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, -1, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, -1, -1,
+ 284, -1, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, -1, 296, -1, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, -1, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, -1, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, -1, 359, -1, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, -1, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, 426, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, -1, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, -1, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, 506, 507, -1, 509, -1, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 537, 538, 539, 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, -1, 112, 113, 114, -1, 116, 117, 118, 119,
+ 120, -1, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, 135, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, -1, -1, 147, 148, 149,
+ 150, 151, -1, 153, 154, -1, -1, 157, 158, 159,
+ 160, 161, 162, -1, -1, 165, 166, -1, -1, -1,
+ -1, -1, -1, -1, -1, 175, 176, 177, 178, 179,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, -1, -1, -1, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, 252, 253, 254, -1, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ -1, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, -1, -1, 284, -1, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, -1, 296, -1, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, 313, 314, 315, 316, 317, 318, 319,
+ 320, -1, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, -1, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, -1, 359,
+ -1, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, -1, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, 426, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ -1, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, -1, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, 506, 507, -1, 509,
+ -1, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 537, 538, 539,
+ 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, -1, 112, 113, 114, -1,
+ 116, 117, 118, 119, 120, -1, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, 135,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, -1,
+ -1, 147, 148, 149, 150, 151, -1, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, -1, 165,
+ 166, -1, -1, -1, -1, -1, -1, -1, -1, 175,
+ 176, 177, 178, 179, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, -1,
+ -1, -1, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, 252, 253, 254, -1,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, -1, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, -1, -1, 284, -1,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, -1,
+ 296, -1, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, 313, 314, 315,
+ 316, 317, 318, 319, 320, -1, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ -1, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, -1, 359, -1, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, -1, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ 426, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, -1, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ -1, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ 506, 507, -1, 509, -1, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 537, 538, 539, 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, -1,
+ 112, 113, 114, -1, 116, 117, 118, 119, 120, -1,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, 135, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, -1, -1, 147, 148, 149, 150, 151,
+ -1, 153, 154, 155, -1, 157, 158, 159, 160, 161,
+ 162, -1, -1, 165, 166, -1, -1, -1, -1, -1,
+ -1, -1, -1, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, -1, -1, -1, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, -1, 248, -1, 250, 251,
+ 252, 253, 254, -1, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, -1, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ -1, -1, 284, -1, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, -1, 296, -1, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, 313, 314, 315, 316, 317, 318, 319, 320, -1,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, -1, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, -1, 359, -1, 361,
+ 362, 363, 364, 365, 366, 367, -1, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, -1, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ -1, 413, 414, 415, 416, 417, 418, -1, 420, 421,
+ 422, 423, 424, 425, 426, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, -1, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, -1, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, 506, 507, -1, 509, -1, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 537, 538, 539, 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, 115, -1, -1,
+ -1, 119, 120, 121, 122, 123, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 136, -1,
+ -1, -1, -1, -1, -1, 143, -1, 145, -1, -1,
+ -1, -1, -1, -1, 152, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 164, -1, -1, -1,
+ -1, -1, -1, 171, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 181, 182, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 210, -1, -1, -1, -1, -1, -1, -1,
+ 218, -1, -1, -1, -1, 223, -1, -1, -1, -1,
+ -1, 229, -1, -1, -1, -1, -1, 235, -1, 237,
+ -1, -1, -1, -1, -1, -1, 244, -1, 246, -1,
+ -1, -1, -1, -1, -1, -1, -1, 255, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 270, 271, -1, -1, -1, -1, -1, 277,
+ -1, 279, -1, -1, 282, 283, -1, 285, -1, -1,
+ -1, -1, -1, -1, -1, -1, 294, 295, -1, 297,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 320, 321, 322, -1, -1, -1, -1, -1,
+ -1, -1, 330, 331, -1, -1, -1, -1, 336, -1,
+ -1, 339, -1, 341, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 357,
+ 358, -1, 360, 361, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 374, -1, 376, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 391, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 412, -1, -1, -1, -1, -1,
+ 418, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 437,
+ -1, -1, 440, -1, -1, 443, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 459, -1, -1, -1, -1, -1, -1, 466, -1,
+ -1, -1, -1, -1, -1, -1, 474, 475, -1, -1,
+ -1, -1, 480, -1, 482, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 492, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 507,
+ -1, -1, 510, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 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, 115, -1,
+ -1, -1, 119, 120, 121, 122, 123, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 136,
+ -1, -1, -1, -1, -1, -1, 143, -1, 145, -1,
+ -1, -1, -1, -1, -1, 152, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 164, -1, -1,
+ -1, -1, -1, -1, 171, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 181, 182, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 210, -1, -1, -1, -1, -1, -1,
+ -1, 218, -1, -1, -1, -1, 223, -1, -1, -1,
+ -1, -1, 229, -1, -1, -1, -1, -1, 235, -1,
+ 237, -1, -1, -1, -1, -1, -1, 244, -1, 246,
+ -1, -1, -1, -1, -1, -1, -1, -1, 255, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 270, 271, -1, -1, -1, -1, -1,
+ 277, -1, 279, -1, -1, 282, 283, -1, 285, -1,
+ -1, -1, -1, -1, -1, -1, -1, 294, 295, -1,
+ 297, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 320, 321, 322, -1, -1, -1, -1,
+ -1, -1, -1, 330, 331, -1, -1, -1, -1, 336,
+ -1, -1, 339, -1, 341, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 357, 358, -1, 360, 361, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 374, -1, 376,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 391, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 412, -1, -1, -1, -1,
+ -1, 418, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 437, -1, -1, 440, -1, -1, 443, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 459, -1, -1, -1, -1, -1, -1, 466,
+ -1, -1, -1, -1, -1, -1, -1, 474, 475, -1,
+ -1, -1, -1, 480, -1, 482, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 492, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 507, -1, -1, 510, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ 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, 115,
+ -1, -1, -1, 119, 120, 121, 122, 123, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 136, -1, -1, -1, -1, -1, -1, 143, -1, 145,
+ -1, -1, -1, -1, -1, -1, 152, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 164, -1,
+ -1, -1, -1, -1, -1, 171, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 181, 182, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 210, -1, -1, -1, -1, -1,
+ -1, -1, 218, -1, -1, -1, -1, 223, -1, -1,
+ -1, -1, -1, 229, -1, -1, -1, -1, -1, 235,
+ -1, 237, -1, -1, -1, -1, -1, -1, 244, -1,
+ 246, -1, -1, -1, -1, -1, -1, -1, -1, 255,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 270, 271, -1, -1, -1, -1,
+ -1, 277, -1, 279, -1, -1, 282, 283, -1, 285,
+ -1, -1, -1, -1, -1, -1, -1, -1, 294, 295,
+ -1, 297, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 320, 321, 322, -1, -1, -1,
+ -1, -1, -1, -1, 330, 331, -1, -1, -1, -1,
+ 336, -1, -1, 339, -1, 341, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 357, 358, -1, 360, 361, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 374, -1,
+ 376, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 391, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 412, -1, -1, -1,
+ -1, -1, 418, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 437, -1, -1, 440, -1, -1, 443, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 459, -1, -1, -1, -1, -1, -1,
+ 466, -1, -1, -1, -1, -1, -1, -1, 474, 475,
+ -1, -1, -1, -1, 480, -1, 482, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 492, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 507, -1, -1, 510, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 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,
+ 115, -1, -1, -1, 119, 120, 121, 122, 123, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 136, -1, -1, -1, -1, -1, -1, 143, -1,
+ 145, -1, -1, -1, -1, -1, -1, 152, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 164,
+ -1, -1, -1, -1, -1, -1, 171, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 181, 182, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 210, -1, -1, -1, -1,
+ -1, -1, -1, 218, -1, -1, -1, -1, 223, -1,
+ -1, -1, -1, -1, 229, -1, -1, -1, -1, -1,
+ 235, -1, 237, -1, -1, -1, -1, -1, -1, 244,
+ -1, 246, -1, -1, -1, -1, -1, -1, -1, -1,
+ 255, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 270, 271, -1, -1, -1,
+ -1, -1, 277, -1, 279, -1, -1, 282, 283, -1,
+ 285, -1, -1, -1, -1, -1, -1, -1, -1, 294,
+ 295, -1, 297, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 320, 321, 322, -1, -1,
+ -1, -1, -1, -1, -1, 330, 331, -1, -1, -1,
+ -1, 336, -1, -1, 339, -1, 341, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 357, 358, -1, 360, 361, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 374,
+ -1, 376, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 391, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 412, -1, -1,
+ -1, -1, -1, 418, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 437, -1, -1, 440, -1, -1, 443, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 459, -1, -1, -1, -1, -1,
+ -1, 466, -1, -1, -1, -1, -1, -1, -1, 474,
+ 475, -1, -1, -1, -1, 480, -1, 482, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 492, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 507, -1, -1, 510, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, 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, -1, 36, 37, 38, -1, 40, -1, -1, -1,
+ -1, -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, 115, -1, -1, -1, 119, 120, 121, 122, 123,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 136, -1, -1, -1, -1, -1, -1, 143,
+ -1, 145, -1, -1, -1, -1, -1, -1, 152, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 164, -1, -1, -1, -1, -1, -1, 171, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 181, 182, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 218, -1, -1, -1, -1, 223,
+ -1, -1, -1, -1, -1, 229, -1, -1, -1, -1,
+ -1, 235, -1, 237, -1, -1, -1, -1, -1, -1,
+ 244, -1, 246, -1, -1, -1, -1, -1, -1, -1,
+ -1, 255, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 270, 271, -1, -1,
+ -1, -1, -1, 277, -1, 279, -1, -1, 282, 283,
+ -1, 285, -1, -1, -1, -1, -1, -1, -1, -1,
+ 294, 295, -1, 297, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 320, 321, 322, -1,
+ -1, -1, -1, -1, -1, -1, 330, 331, -1, -1,
+ -1, -1, 336, -1, -1, 339, -1, 341, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 357, 358, -1, 360, 361, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 374, -1, 376, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 391, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 412, -1,
+ -1, -1, -1, -1, 418, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 437, -1, -1, 440, -1, -1, 443,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 459, -1, -1, -1, -1,
+ -1, -1, 466, -1, -1, -1, -1, -1, -1, -1,
+ 474, 475, -1, -1, -1, -1, 480, -1, 482, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 507, -1, -1, 510, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, -1,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, -1, -1, -1, 171, -1, -1, -1, 175,
+ 176, 177, 178, -1, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ -1, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, -1, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, -1, 314, 315,
+ -1, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ 336, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, 348, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ -1, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, 483, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 69, 538, 539, -1, 73, -1, -1, -1, -1,
+ -1, 547, 548, 549, -1, -1, -1, -1, -1, -1,
+ 556, -1, 90, 91, 92, 93, 94, 95, 96, 97,
+ -1, 99, 100, 101, 102, 103, -1, -1, -1, -1,
+ -1, 109, 110, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, -1, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, -1, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, -1, 175, 176, 177,
+ 178, -1, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, -1, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, -1, 314, 315, -1, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, 336, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, -1, 427,
+ 428, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, 464, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, 506, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, 519, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, -1,
+ 538, 539, 69, 70, 542, -1, 73, -1, 75, 76,
+ -1, -1, -1, -1, 81, -1, -1, -1, 556, -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, -1, 112, 113, 114, 115, 116,
+ 117, 118, 119, 120, 121, 122, 123, -1, 125, 126,
+ 127, 128, 129, 130, -1, -1, 133, 134, -1, 136,
+ 137, -1, 139, 140, 141, 142, 143, -1, 145, -1,
+ 147, 148, 149, 150, 151, 152, 153, 154, -1, -1,
+ 157, 158, 159, 160, 161, 162, -1, 164, 165, 166,
+ -1, -1, -1, -1, 171, -1, -1, -1, 175, 176,
+ 177, 178, -1, 180, 181, 182, 183, 184, 185, -1,
+ 187, 188, 189, 190, 191, 192, -1, 194, 195, 196,
+ 197, -1, -1, 200, 201, 202, 203, 204, -1, 206,
+ 207, 208, -1, 210, 211, 212, -1, 214, 215, 216,
+ 217, 218, 219, 220, 221, 222, 223, 224, 225, -1,
+ 227, 228, 229, 230, -1, 232, -1, 234, 235, -1,
+ 237, 238, 239, 240, 241, -1, 243, 244, -1, 246,
+ 247, 248, -1, 250, 251, -1, 253, 254, 255, 256,
+ 257, 258, 259, -1, 261, 262, 263, 264, 265, 266,
+ 267, -1, 269, 270, 271, -1, 273, 274, 275, -1,
+ 277, -1, 279, -1, 281, 282, 283, 284, 285, 286,
+ 287, 288, 289, 290, -1, -1, 293, 294, 295, 296,
+ 297, -1, 299, 300, 301, -1, -1, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, -1, 314, 315, -1,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, -1, 334, 335, 336,
+ 337, -1, 339, 340, 341, 342, 343, 344, -1, 346,
+ 347, 348, -1, 350, 351, 352, -1, -1, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 364, 365, 366,
+ 367, 368, 369, 370, -1, 372, 373, 374, 375, 376,
+ 377, 378, 379, -1, 381, 382, 383, 384, 385, 386,
+ 387, 388, 389, 390, 391, 392, 393, 394, 395, -1,
+ 397, 398, 399, 400, 401, 402, 403, 404, 405, 406,
+ 407, 408, -1, 410, 411, 412, 413, 414, 415, 416,
+ 417, 418, 419, 420, 421, 422, 423, 424, 425, -1,
+ 427, -1, 429, 430, 431, 432, 433, -1, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, -1, 446,
+ 447, 448, 449, 450, 451, 452, 453, 454, 455, 456,
+ 457, 458, 459, 460, -1, 462, 463, -1, 465, 466,
+ 467, 468, 469, 470, 471, -1, 473, 474, 475, -1,
+ -1, 478, 479, 480, 481, 482, 483, 484, 485, 486,
+ 487, 488, 489, 490, 491, -1, -1, 494, 495, 496,
+ 497, 498, -1, -1, 501, 502, 503, 504, 505, -1,
+ 507, -1, 509, 510, 511, 512, 513, 514, -1, -1,
+ 517, -1, -1, 520, 521, 522, 523, 524, 525, 526,
+ 527, 528, 529, 530, 531, 532, 533, 534, 535, 536,
+ -1, 538, 539, -1, -1, -1, -1, -1, 69, 70,
+ 547, 548, 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,
+ -1, 112, 113, 114, 115, 116, 117, 118, 119, 120,
+ 121, 122, 123, -1, 125, 126, 127, 128, 129, 130,
+ -1, -1, 133, 134, -1, 136, 137, -1, 139, 140,
+ 141, 142, 143, -1, 145, -1, 147, 148, 149, 150,
+ 151, 152, 153, 154, -1, -1, 157, 158, 159, 160,
+ 161, 162, -1, 164, 165, 166, -1, -1, -1, -1,
+ 171, -1, -1, -1, 175, 176, 177, 178, -1, 180,
+ 181, 182, 183, 184, 185, -1, 187, 188, 189, 190,
+ 191, 192, -1, 194, 195, 196, 197, -1, -1, 200,
+ 201, 202, 203, 204, -1, 206, 207, 208, -1, 210,
+ 211, 212, -1, 214, 215, 216, 217, 218, 219, 220,
+ 221, 222, 223, 224, 225, -1, 227, 228, 229, 230,
+ -1, 232, -1, 234, 235, -1, 237, 238, 239, 240,
+ 241, -1, 243, 244, -1, 246, 247, 248, -1, 250,
+ 251, -1, 253, 254, 255, 256, 257, 258, 259, -1,
+ 261, 262, 263, 264, 265, 266, 267, -1, 269, 270,
+ 271, -1, 273, 274, 275, -1, 277, -1, 279, -1,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ -1, -1, 293, 294, 295, 296, 297, -1, 299, 300,
+ 301, -1, -1, 304, 305, 306, 307, 308, 309, 310,
+ 311, 312, -1, 314, 315, -1, 317, 318, 319, 320,
+ 321, 322, 323, 324, 325, 326, 327, 328, 329, 330,
+ 331, 332, -1, 334, 335, 336, 337, -1, 339, 340,
+ 341, 342, 343, 344, -1, 346, 347, 348, -1, 350,
+ 351, 352, -1, -1, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 366, 367, 368, 369, 370,
+ -1, 372, 373, 374, 375, 376, 377, 378, 379, -1,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, -1, 397, 398, 399, 400,
+ 401, 402, 403, 404, 405, 406, 407, 408, -1, 410,
+ 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
+ 421, 422, 423, 424, 425, -1, 427, -1, 429, 430,
+ 431, 432, 433, -1, 435, 436, 437, 438, 439, 440,
+ 441, 442, 443, 444, -1, 446, 447, 448, 449, 450,
+ 451, 452, 453, 454, 455, 456, 457, 458, 459, 460,
+ -1, 462, 463, -1, 465, 466, 467, 468, 469, 470,
+ 471, -1, 473, 474, 475, -1, -1, 478, 479, 480,
+ 481, 482, 483, 484, 485, 486, 487, 488, 489, 490,
+ 491, -1, -1, 494, 495, 496, 497, 498, -1, -1,
+ 501, 502, 503, 504, 505, -1, 507, -1, 509, 510,
+ 511, 512, 513, 514, -1, -1, 517, -1, -1, 520,
+ 521, 522, 523, 524, 525, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, -1, 538, 539, -1,
+ -1, -1, -1, -1, 69, 70, 547, 548, 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, -1, 112, 113, 114,
+ 115, 116, 117, 118, 119, 120, 121, 122, 123, -1,
+ 125, 126, 127, 128, 129, 130, -1, -1, 133, 134,
+ -1, 136, 137, -1, 139, 140, 141, 142, 143, -1,
+ 145, -1, 147, 148, 149, 150, 151, 152, 153, 154,
+ -1, -1, 157, 158, 159, 160, 161, 162, -1, 164,
+ 165, 166, -1, -1, -1, -1, 171, -1, -1, -1,
+ 175, 176, 177, 178, -1, 180, 181, 182, 183, -1,
+ 185, -1, 187, 188, 189, 190, 191, 192, -1, 194,
+ 195, 196, 197, -1, -1, 200, 201, 202, 203, 204,
+ -1, 206, 207, 208, -1, 210, 211, 212, -1, 214,
+ 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
+ 225, -1, 227, 228, 229, 230, -1, 232, -1, 234,
+ 235, -1, 237, 238, 239, 240, 241, -1, 243, 244,
+ -1, 246, 247, 248, -1, 250, 251, -1, 253, 254,
+ 255, 256, 257, 258, 259, -1, 261, 262, 263, 264,
+ 265, 266, 267, -1, 269, 270, 271, -1, 273, 274,
+ 275, -1, 277, -1, 279, -1, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, -1, -1, 293, 294,
+ 295, 296, 297, -1, 299, 300, 301, -1, -1, 304,
+ 305, 306, 307, 308, 309, 310, 311, 312, -1, 314,
+ 315, -1, 317, 318, 319, 320, 321, 322, 323, 324,
+ 325, 326, 327, 328, 329, 330, 331, 332, -1, 334,
+ 335, 336, 337, -1, 339, 340, 341, 342, 343, 344,
+ -1, 346, 347, 348, -1, 350, 351, 352, -1, -1,
+ 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
+ 365, 366, 367, 368, 369, 370, -1, 372, 373, 374,
+ 375, 376, 377, 378, 379, -1, 381, 382, 383, 384,
+ 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
+ 395, -1, 397, 398, 399, 400, 401, 402, 403, 404,
+ 405, 406, 407, 408, -1, 410, 411, 412, 413, 414,
+ 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
+ 425, -1, 427, -1, 429, 430, 431, 432, 433, -1,
+ 435, 436, 437, 438, 439, 440, 441, 442, 443, 444,
+ -1, 446, 447, 448, 449, 450, 451, 452, 453, 454,
+ 455, 456, 457, 458, 459, 460, -1, 462, 463, -1,
+ 465, 466, 467, 468, 469, 470, 471, -1, 473, 474,
+ 475, -1, -1, 478, 479, 480, 481, 482, 483, 484,
+ 485, 486, 487, 488, 489, 490, 491, -1, -1, 494,
+ 495, 496, 497, 498, -1, -1, 501, 502, 503, 504,
+ 505, -1, 507, -1, 509, 510, 511, 512, 513, 514,
+ -1, -1, 517, -1, -1, 520, 521, 522, 523, 524,
+ 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
+ 535, 536, -1, 538, 539, -1, -1, 69, 70, -1,
+ -1, 73, 547, 548, 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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, -1, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, -1, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, -1, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ -1, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, -1, 314, 315, -1, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, 348, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, -1, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, 483, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, -1, 538, 539, -1, -1,
+ 69, 70, -1, -1, 73, 547, 548, 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, -1, 112, 113, 114, 115, 116, 117, 118,
+ 119, 120, 121, 122, 123, -1, 125, 126, 127, 128,
+ 129, 130, -1, -1, 133, 134, -1, 136, 137, -1,
+ 139, 140, 141, 142, 143, -1, 145, -1, 147, 148,
+ 149, 150, 151, 152, 153, 154, -1, -1, 157, 158,
+ 159, 160, 161, 162, -1, 164, 165, 166, -1, -1,
+ -1, -1, 171, -1, -1, 174, 175, 176, 177, 178,
+ -1, 180, 181, 182, 183, -1, 185, -1, 187, 188,
+ 189, 190, 191, 192, -1, 194, 195, 196, 197, -1,
+ -1, 200, 201, 202, 203, 204, -1, 206, 207, 208,
+ -1, 210, 211, 212, -1, 214, 215, 216, 217, 218,
+ 219, 220, 221, 222, 223, -1, 225, -1, 227, 228,
+ 229, 230, -1, 232, -1, 234, 235, -1, 237, 238,
+ 239, 240, 241, -1, 243, 244, -1, 246, 247, 248,
+ -1, 250, 251, -1, 253, 254, 255, 256, 257, 258,
+ 259, -1, 261, 262, 263, 264, 265, 266, 267, -1,
+ 269, 270, 271, -1, 273, 274, 275, -1, 277, -1,
+ 279, -1, 281, 282, 283, 284, 285, 286, 287, 288,
+ 289, 290, -1, -1, 293, 294, 295, 296, 297, -1,
+ 299, 300, 301, -1, -1, 304, 305, 306, 307, 308,
+ 309, 310, 311, 312, -1, 314, 315, -1, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, -1, 334, 335, 336, 337, -1,
+ 339, 340, 341, 342, 343, 344, -1, 346, 347, -1,
+ -1, 350, 351, 352, -1, -1, 355, 356, 357, 358,
+ 359, 360, 361, 362, 363, 364, 365, 366, 367, 368,
+ 369, 370, -1, 372, 373, 374, 375, 376, 377, 378,
+ 379, -1, 381, 382, 383, 384, 385, 386, 387, 388,
+ 389, 390, 391, 392, 393, 394, 395, -1, 397, 398,
+ 399, 400, 401, 402, 403, 404, 405, 406, 407, 408,
+ -1, 410, 411, 412, 413, 414, 415, 416, 417, 418,
+ 419, 420, 421, 422, 423, 424, 425, -1, 427, -1,
+ 429, 430, 431, 432, 433, 434, 435, 436, 437, 438,
+ 439, 440, 441, 442, 443, 444, -1, 446, 447, 448,
+ 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, -1, 462, 463, -1, 465, 466, 467, 468,
+ 469, 470, 471, -1, 473, 474, 475, 476, -1, 478,
+ 479, 480, 481, 482, -1, 484, 485, 486, 487, 488,
+ 489, 490, 491, -1, -1, 494, 495, 496, 497, 498,
+ -1, -1, 501, 502, 503, 504, 505, -1, 507, -1,
+ 509, 510, 511, 512, 513, 514, -1, -1, 517, -1,
+ -1, 520, 521, 522, 523, 524, 525, 526, 527, 528,
+ 529, 530, 531, 532, 533, 534, 535, 536, -1, 538,
+ 539, 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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, -1, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, -1, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, 174, 175, 176, 177,
+ 178, -1, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, -1, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, -1, 314, 315, -1, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, 336, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, -1, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 69,
+ 538, 539, -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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, -1, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, -1, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, -1, -1,
+ -1, 171, -1, -1, -1, 175, 176, 177, 178, -1,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, 224, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, -1, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, -1, 314, 315, -1, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, 336, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, 348, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, -1, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, 483, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 69, 538, 539,
+ -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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, -1, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, -1, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, 174, 175, 176, 177, 178, -1, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ -1, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, -1, 314, 315, -1, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, -1, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 69, 538, 539, -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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, -1, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, -1, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, -1, -1, -1, 171, -1, -1,
+ 174, 175, 176, 177, 178, -1, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, -1, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, -1,
+ 314, 315, -1, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, 336, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, -1, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 69, 538, 539, -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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, -1,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, -1, -1, -1, 171, -1, -1, 174, 175,
+ 176, 177, 178, -1, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ -1, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, -1, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, -1, 314, 315,
+ -1, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ 336, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ -1, 427, -1, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, 499, -1, 501, 502, 503, 504, 505,
+ -1, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 69, 538, 539, -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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, -1, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, -1, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, 174, 175, 176, 177,
+ 178, -1, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, 245, 246, 247,
+ 248, -1, 250, 251, -1, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, -1, 314, 315, -1, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, 336, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, -1, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 69,
+ 538, 539, -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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, -1, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, -1, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, -1, -1,
+ -1, 171, -1, -1, 174, 175, 176, 177, 178, -1,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, -1, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, -1, 314, 315, -1, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, 336, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, -1, 427, -1, 429,
+ 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 69, 538, 539,
+ -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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, -1, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, -1, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, 174, 175, 176, 177, 178, -1, 180, 181,
+ 182, 183, -1, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ -1, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, -1, 314, 315, -1, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, -1, 427, -1, 429, 430, 431,
+ 432, 433, 434, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 69, 538, 539, -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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, -1, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, -1, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, -1, -1, -1, 171, -1, -1,
+ 174, 175, 176, 177, 178, -1, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, -1, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, -1,
+ 314, 315, -1, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, 336, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, -1, 427, -1, 429, 430, 431, 432, 433,
+ 434, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 69, 538, 539, -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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, -1,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, -1, -1, -1, 171, -1, -1, 174, 175,
+ 176, 177, 178, -1, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ -1, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, -1, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, -1, 314, 315,
+ -1, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ 336, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ -1, 427, -1, 429, 430, 431, 432, 433, 434, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 69, 538, 539, -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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, -1, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, -1, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, 174, 175, 176, 177,
+ 178, -1, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, -1, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, -1, 314, 315, -1, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, 336, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, -1, 427,
+ -1, 429, 430, 431, 432, 433, 434, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, 69,
+ 538, 539, -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, -1, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 122, 123, -1, 125, 126, 127, 128, 129,
+ 130, -1, -1, 133, 134, -1, 136, 137, -1, 139,
+ 140, 141, 142, 143, -1, 145, -1, 147, 148, 149,
+ 150, 151, 152, 153, 154, -1, -1, 157, 158, 159,
+ 160, 161, 162, -1, 164, 165, 166, -1, -1, -1,
+ -1, 171, -1, -1, -1, 175, 176, 177, 178, -1,
+ 180, 181, 182, 183, -1, 185, -1, 187, 188, 189,
+ 190, 191, 192, -1, 194, 195, 196, 197, -1, -1,
+ 200, 201, 202, 203, 204, -1, 206, 207, 208, -1,
+ 210, 211, 212, -1, 214, 215, 216, 217, 218, 219,
+ 220, 221, 222, 223, -1, 225, -1, 227, 228, 229,
+ 230, -1, 232, -1, 234, 235, -1, 237, 238, 239,
+ 240, 241, -1, 243, 244, -1, 246, 247, 248, -1,
+ 250, 251, -1, 253, 254, 255, 256, 257, 258, 259,
+ -1, 261, 262, 263, 264, 265, 266, 267, -1, 269,
+ 270, 271, -1, 273, 274, 275, -1, 277, -1, 279,
+ -1, 281, 282, 283, 284, 285, 286, 287, 288, 289,
+ 290, -1, -1, 293, 294, 295, 296, 297, -1, 299,
+ 300, 301, -1, -1, 304, 305, 306, 307, 308, 309,
+ 310, 311, 312, -1, 314, 315, -1, 317, 318, 319,
+ 320, 321, 322, 323, 324, 325, 326, 327, 328, 329,
+ 330, 331, 332, -1, 334, 335, 336, 337, -1, 339,
+ 340, 341, 342, 343, 344, -1, 346, 347, -1, -1,
+ 350, 351, 352, -1, -1, 355, 356, 357, 358, 359,
+ 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
+ 370, -1, 372, 373, 374, 375, 376, 377, 378, 379,
+ -1, 381, 382, 383, 384, 385, 386, 387, 388, 389,
+ 390, 391, 392, 393, 394, 395, -1, 397, 398, 399,
+ 400, 401, 402, 403, 404, 405, 406, 407, 408, -1,
+ 410, 411, 412, 413, 414, 415, 416, 417, 418, 419,
+ 420, 421, 422, 423, 424, 425, -1, 427, -1, 429,
+ 430, 431, 432, 433, -1, 435, 436, 437, 438, 439,
+ 440, 441, 442, 443, 444, -1, 446, 447, 448, 449,
+ 450, 451, 452, 453, 454, 455, 456, 457, 458, 459,
+ 460, -1, 462, 463, -1, 465, 466, 467, 468, 469,
+ 470, 471, -1, 473, 474, 475, -1, -1, 478, 479,
+ 480, 481, 482, -1, 484, 485, 486, 487, 488, 489,
+ 490, 491, -1, -1, 494, 495, 496, 497, 498, -1,
+ -1, 501, 502, 503, 504, 505, -1, 507, -1, 509,
+ 510, 511, 512, 513, 514, -1, -1, 517, -1, -1,
+ 520, 521, 522, 523, 524, 525, 526, 527, 528, 529,
+ 530, 531, 532, 533, 534, 535, 536, 69, 538, 539,
+ -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, -1,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, -1, 125, 126, 127, 128, 129, 130, -1,
+ -1, 133, 134, -1, 136, 137, -1, 139, 140, 141,
+ 142, 143, -1, 145, -1, 147, 148, 149, 150, 151,
+ 152, 153, 154, -1, -1, 157, 158, 159, 160, 161,
+ 162, -1, 164, 165, 166, -1, -1, -1, -1, 171,
+ -1, -1, -1, 175, 176, 177, 178, -1, 180, 181,
+ 182, 183, 184, 185, -1, 187, 188, 189, 190, 191,
+ 192, -1, 194, 195, 196, 197, -1, -1, 200, 201,
+ 202, 203, 204, -1, 206, 207, 208, -1, 210, 211,
+ 212, -1, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, -1, 225, -1, 227, 228, 229, 230, -1,
+ 232, -1, 234, 235, -1, 237, 238, 239, 240, 241,
+ -1, 243, 244, -1, 246, 247, 248, -1, 250, 251,
+ -1, 253, 254, 255, 256, 257, 258, 259, -1, 261,
+ 262, 263, 264, 265, 266, 267, -1, 269, 270, 271,
+ -1, 273, 274, 275, -1, 277, -1, 279, -1, 281,
+ 282, 283, 284, 285, 286, 287, 288, 289, 290, -1,
+ -1, 293, 294, 295, 296, 297, -1, 299, 300, 301,
+ -1, -1, 304, 305, 306, 307, 308, 309, 310, 311,
+ 312, -1, 314, 315, -1, 317, 318, 319, 320, 321,
+ 322, 323, 324, 325, 326, 327, 328, 329, 330, 331,
+ 332, -1, 334, 335, 336, 337, -1, 339, 340, 341,
+ 342, 343, 344, -1, 346, 347, -1, -1, 350, 351,
+ 352, -1, -1, 355, 356, 357, 358, 359, 360, 361,
+ 362, 363, 364, 365, 366, 367, 368, 369, 370, -1,
+ 372, 373, 374, 375, 376, 377, 378, 379, -1, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
+ 392, 393, 394, 395, -1, 397, 398, 399, 400, 401,
+ 402, 403, 404, 405, 406, 407, 408, -1, 410, 411,
+ 412, 413, 414, 415, 416, 417, 418, 419, 420, 421,
+ 422, 423, 424, 425, -1, 427, -1, 429, 430, 431,
+ 432, 433, -1, 435, 436, 437, 438, 439, 440, 441,
+ 442, 443, 444, -1, 446, 447, 448, 449, 450, 451,
+ 452, 453, 454, 455, 456, 457, 458, 459, 460, -1,
+ 462, 463, -1, 465, 466, 467, 468, 469, 470, 471,
+ -1, 473, 474, 475, -1, -1, 478, 479, 480, 481,
+ 482, -1, 484, 485, 486, 487, 488, 489, 490, 491,
+ -1, -1, 494, 495, 496, 497, 498, -1, -1, 501,
+ 502, 503, 504, 505, -1, 507, -1, 509, 510, 511,
+ 512, 513, 514, -1, -1, 517, -1, -1, 520, 521,
+ 522, 523, 524, 525, 526, 527, 528, 529, 530, 531,
+ 532, 533, 534, 535, 536, 69, 538, 539, -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, -1, 112, 113,
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123,
+ -1, 125, 126, 127, 128, 129, 130, -1, -1, 133,
+ 134, -1, 136, 137, -1, 139, 140, 141, 142, 143,
+ -1, 145, -1, 147, 148, 149, 150, 151, 152, 153,
+ 154, -1, -1, 157, 158, 159, 160, 161, 162, -1,
+ 164, 165, 166, -1, -1, -1, -1, 171, -1, -1,
+ -1, 175, 176, 177, 178, -1, 180, 181, 182, 183,
+ -1, 185, -1, 187, 188, 189, 190, 191, 192, -1,
+ 194, 195, 196, 197, -1, -1, 200, 201, 202, 203,
+ 204, -1, 206, 207, 208, -1, 210, 211, 212, -1,
+ 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+ -1, 225, -1, 227, 228, 229, 230, -1, 232, -1,
+ 234, 235, -1, 237, 238, 239, 240, 241, -1, 243,
+ 244, -1, 246, 247, 248, -1, 250, 251, -1, 253,
+ 254, 255, 256, 257, 258, 259, -1, 261, 262, 263,
+ 264, 265, 266, 267, -1, 269, 270, 271, -1, 273,
+ 274, 275, -1, 277, -1, 279, -1, 281, 282, 283,
+ 284, 285, 286, 287, 288, 289, 290, -1, -1, 293,
+ 294, 295, 296, 297, -1, 299, 300, 301, -1, -1,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, -1,
+ 314, 315, -1, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, -1,
+ 334, 335, 336, 337, -1, 339, 340, 341, 342, 343,
+ 344, -1, 346, 347, -1, -1, 350, 351, 352, -1,
+ -1, 355, 356, 357, 358, 359, 360, 361, 362, 363,
+ 364, 365, 366, 367, 368, 369, 370, -1, 372, 373,
+ 374, 375, 376, 377, 378, 379, -1, 381, 382, 383,
+ 384, 385, 386, 387, 388, 389, 390, 391, 392, 393,
+ 394, 395, -1, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, -1, 410, 411, 412, 413,
+ 414, 415, 416, 417, 418, 419, 420, 421, 422, 423,
+ 424, 425, -1, 427, -1, 429, 430, 431, 432, 433,
+ -1, 435, 436, 437, 438, 439, 440, 441, 442, 443,
+ 444, -1, 446, 447, 448, 449, 450, 451, 452, 453,
+ 454, 455, 456, 457, 458, 459, 460, -1, 462, 463,
+ -1, 465, 466, 467, 468, 469, 470, 471, -1, 473,
+ 474, 475, -1, -1, 478, 479, 480, 481, 482, -1,
+ 484, 485, 486, 487, 488, 489, 490, 491, -1, -1,
+ 494, 495, 496, 497, 498, -1, -1, 501, 502, 503,
+ 504, 505, -1, 507, -1, 509, 510, 511, 512, 513,
+ 514, -1, -1, 517, -1, -1, 520, 521, 522, 523,
+ 524, 525, 526, 527, 528, 529, 530, 531, 532, 533,
+ 534, 535, 536, 69, 538, 539, -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, -1, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 122, 123, -1, 125,
+ 126, 127, 128, 129, 130, -1, -1, 133, 134, -1,
+ 136, 137, -1, 139, 140, 141, 142, 143, -1, 145,
+ -1, 147, 148, 149, 150, 151, 152, 153, 154, -1,
+ -1, 157, 158, 159, 160, 161, 162, -1, 164, 165,
+ 166, -1, -1, -1, -1, 171, -1, -1, -1, 175,
+ 176, 177, 178, -1, 180, 181, 182, 183, -1, 185,
+ -1, 187, 188, 189, 190, 191, 192, -1, 194, 195,
+ 196, 197, -1, -1, 200, 201, 202, 203, 204, -1,
+ 206, 207, 208, -1, 210, 211, 212, -1, 214, 215,
+ 216, 217, 218, 219, 220, 221, 222, 223, -1, 225,
+ -1, 227, 228, 229, 230, -1, 232, -1, 234, 235,
+ -1, 237, 238, 239, 240, 241, -1, 243, 244, -1,
+ 246, 247, 248, -1, 250, 251, -1, 253, 254, 255,
+ 256, 257, 258, 259, -1, 261, 262, 263, 264, 265,
+ 266, 267, -1, 269, 270, 271, -1, 273, 274, 275,
+ -1, 277, -1, 279, -1, 281, 282, 283, 284, 285,
+ 286, 287, 288, 289, 290, -1, -1, 293, 294, 295,
+ 296, 297, -1, 299, 300, 301, -1, -1, 304, 305,
+ 306, 307, 308, 309, 310, 311, 312, -1, 314, 315,
+ -1, 317, 318, 319, 320, 321, 322, 323, 324, 325,
+ 326, 327, 328, 329, 330, 331, 332, -1, 334, 335,
+ 336, 337, -1, 339, 340, 341, 342, 343, 344, -1,
+ 346, 347, -1, -1, 350, 351, 352, -1, -1, 355,
+ 356, 357, 358, 359, 360, 361, 362, 363, 364, 365,
+ 366, 367, 368, 369, 370, -1, 372, 373, 374, 375,
+ 376, 377, 378, 379, -1, 381, 382, 383, 384, 385,
+ 386, 387, 388, 389, 390, 391, 392, 393, 394, 395,
+ -1, 397, 398, 399, 400, 401, 402, 403, 404, 405,
+ 406, 407, 408, -1, 410, 411, 412, 413, 414, 415,
+ 416, 417, 418, 419, 420, 421, 422, 423, 424, 425,
+ -1, 427, -1, 429, 430, 431, 432, 433, -1, 435,
+ 436, 437, 438, 439, 440, 441, 442, 443, 444, -1,
+ 446, 447, 448, 449, 450, 451, 452, 453, 454, 455,
+ 456, 457, 458, 459, 460, -1, 462, 463, -1, 465,
+ 466, 467, 468, 469, 470, 471, -1, 473, 474, 475,
+ -1, -1, 478, 479, 480, 481, 482, -1, 484, 485,
+ 486, 487, 488, 489, 490, 491, -1, -1, 494, 495,
+ 496, 497, 498, -1, -1, 501, 502, 503, 504, 505,
+ -1, 507, -1, 509, 510, 511, 512, 513, 514, -1,
+ -1, 517, -1, -1, 520, 521, 522, 523, 524, 525,
+ 526, 527, 528, 529, 530, 531, 532, 533, 534, 535,
+ 536, 69, 538, 539, -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, -1, 112, 113, 114, 115, 116, 117,
+ 118, 119, 120, 121, 122, 123, -1, 125, 126, 127,
+ 128, 129, 130, -1, -1, 133, 134, -1, 136, 137,
+ -1, 139, 140, 141, 142, 143, -1, 145, -1, 147,
+ 148, 149, 150, 151, 152, 153, 154, -1, -1, 157,
+ 158, 159, 160, 161, 162, -1, 164, 165, 166, -1,
+ -1, -1, -1, 171, -1, -1, -1, 175, 176, 177,
+ 178, -1, 180, 181, 182, 183, -1, 185, -1, 187,
+ 188, 189, 190, 191, 192, -1, 194, 195, 196, 197,
+ -1, -1, 200, 201, 202, 203, 204, -1, 206, 207,
+ 208, -1, 210, 211, 212, -1, 214, 215, 216, 217,
+ 218, 219, 220, 221, 222, 223, -1, 225, -1, 227,
+ 228, 229, 230, -1, 232, -1, 234, 235, -1, 237,
+ 238, 239, 240, 241, -1, 243, 244, -1, 246, 247,
+ 248, -1, 250, 251, -1, 253, 254, 255, 256, 257,
+ 258, 259, -1, 261, 262, 263, 264, 265, 266, 267,
+ -1, 269, 270, 271, -1, 273, 274, 275, -1, 277,
+ -1, 279, -1, 281, 282, 283, 284, 285, 286, 287,
+ 288, 289, 290, -1, -1, 293, 294, 295, 296, 297,
+ -1, 299, 300, 301, -1, -1, 304, 305, 306, 307,
+ 308, 309, 310, 311, 312, -1, 314, 315, -1, 317,
+ 318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
+ 328, 329, 330, 331, 332, -1, 334, 335, 336, 337,
+ -1, 339, 340, 341, 342, 343, 344, -1, 346, 347,
+ -1, -1, 350, 351, 352, -1, -1, 355, 356, 357,
+ 358, 359, 360, 361, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, -1, 372, 373, 374, 375, 376, 377,
+ 378, 379, -1, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, -1, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, -1, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 423, 424, 425, -1, 427,
+ -1, 429, 430, 431, 432, 433, -1, 435, 436, 437,
+ 438, 439, 440, 441, 442, 443, 444, -1, 446, 447,
+ 448, 449, 450, 451, 452, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, 463, -1, 465, 466, 467,
+ 468, 469, 470, 471, -1, 473, 474, 475, -1, -1,
+ 478, 479, 480, 481, 482, -1, 484, 485, 486, 487,
+ 488, 489, 490, 491, -1, -1, 494, 495, 496, 497,
+ 498, -1, -1, 501, 502, 503, 504, 505, -1, 507,
+ -1, 509, 510, 511, 512, 513, 514, -1, -1, 517,
+ -1, -1, 520, 521, 522, 523, 524, 525, 526, 527,
+ 528, 529, 530, 531, 532, 533, 534, 535, 536, -1,
+ 538, 539
+};
+
+ /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint16 yystos[] =
+{
+ 0, 565, 1230, 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, 135, 210, 229, 252, 276, 313, 316, 338, 426,
+ 476, 492, 507, 537, 545, 547, 548, 549, 550, 551,
+ 554, 555, 556, 557, 559, 560, 561, 562, 563, 1220,
+ 1231, 1260, 1262, 1353, 1363, 1364, 1366, 1372, 1373, 1261,
+ 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, 112, 115, 118, 119, 120,
+ 121, 122, 123, 127, 136, 139, 141, 142, 143, 145,
+ 148, 150, 152, 161, 163, 164, 171, 178, 180, 181,
+ 182, 183, 197, 199, 203, 209, 210, 217, 218, 219,
+ 223, 226, 229, 235, 237, 242, 244, 246, 255, 259,
+ 270, 271, 277, 279, 282, 283, 285, 294, 295, 297,
+ 299, 300, 305, 317, 320, 321, 322, 330, 331, 335,
+ 336, 339, 341, 357, 358, 360, 361, 374, 376, 378,
+ 391, 392, 398, 399, 401, 406, 411, 412, 414, 418,
+ 421, 427, 428, 435, 437, 439, 440, 443, 449, 459,
+ 464, 466, 474, 475, 480, 482, 484, 486, 492, 495,
+ 501, 506, 507, 510, 519, 526, 527, 528, 529, 530,
+ 531, 532, 533, 534, 535, 536, 542, 556, 566, 567,
+ 568, 574, 575, 577, 578, 579, 580, 582, 586, 598,
+ 603, 604, 607, 608, 609, 628, 631, 632, 647, 691,
+ 692, 695, 698, 699, 700, 708, 714, 716, 718, 719,
+ 722, 725, 726, 730, 739, 743, 744, 745, 746, 749,
+ 751, 752, 753, 754, 762, 764, 784, 788, 790, 791,
+ 801, 803, 810, 811, 814, 815, 816, 817, 818, 826,
+ 828, 832, 837, 841, 842, 850, 851, 854, 859, 873,
+ 900, 903, 904, 905, 910, 913, 915, 917, 919, 920,
+ 925, 926, 929, 931, 932, 936, 937, 938, 941, 942,
+ 945, 946, 947, 954, 956, 957, 958, 964, 966, 967,
+ 973, 974, 975, 978, 979, 980, 981, 983, 984, 986,
+ 987, 989, 990, 992, 1004, 1010, 1013, 1015, 1024, 1026,
+ 1031, 1036, 1040, 1041, 1042, 1043, 1044, 1045, 1049, 1084,
+ 1227, 1228, 1232, 1235, 1236, 1253, 1254, 1255, 1256, 1267,
+ 1269, 1273, 1274, 1275, 1276, 1277, 1279, 1281, 1283, 1284,
+ 1285, 1286, 1288, 1293, 1294, 1298, 1299, 1308, 1310, 1311,
+ 1312, 1315, 1320, 1323, 1328, 1330, 1331, 1334, 1336, 1339,
+ 1348, 1366, 1374, 71, 1256, 1264, 1265, 13, 70, 90,
+ 91, 92, 93, 94, 95, 96, 97, 99, 100, 101,
+ 109, 110, 112, 113, 114, 116, 117, 118, 125, 126,
+ 127, 128, 129, 130, 133, 134, 137, 139, 140, 141,
+ 142, 147, 148, 149, 150, 151, 153, 154, 157, 158,
+ 159, 160, 161, 162, 165, 166, 174, 175, 176, 177,
+ 178, 180, 183, 185, 187, 188, 189, 190, 191, 192,
+ 194, 195, 196, 197, 200, 201, 202, 203, 204, 206,
+ 207, 208, 210, 211, 212, 214, 215, 216, 217, 219,
+ 220, 221, 222, 225, 227, 228, 230, 232, 234, 238,
+ 239, 240, 241, 243, 247, 248, 250, 251, 253, 254,
+ 256, 257, 258, 259, 261, 262, 263, 264, 265, 266,
+ 267, 269, 273, 274, 275, 281, 284, 286, 287, 288,
+ 289, 290, 293, 296, 299, 300, 301, 304, 305, 306,
+ 307, 308, 309, 310, 311, 312, 314, 315, 317, 318,
+ 319, 323, 324, 325, 326, 327, 328, 329, 332, 334,
+ 335, 337, 340, 342, 343, 344, 346, 347, 350, 351,
+ 352, 355, 356, 359, 362, 363, 364, 365, 366, 367,
+ 368, 369, 370, 372, 373, 375, 377, 378, 379, 381,
+ 382, 383, 384, 385, 386, 387, 388, 389, 390, 392,
+ 393, 394, 395, 397, 398, 399, 400, 401, 402, 403,
+ 404, 405, 406, 407, 408, 410, 411, 413, 414, 415,
+ 416, 417, 419, 420, 421, 422, 423, 424, 425, 427,
+ 429, 430, 431, 432, 433, 434, 435, 436, 438, 439,
+ 441, 442, 444, 446, 447, 448, 449, 450, 451, 452,
+ 453, 454, 455, 456, 457, 458, 460, 462, 463, 465,
+ 467, 468, 469, 470, 471, 473, 476, 478, 479, 481,
+ 484, 485, 486, 487, 488, 489, 490, 491, 494, 495,
+ 496, 497, 498, 501, 502, 503, 504, 505, 509, 511,
+ 512, 513, 514, 517, 520, 521, 522, 523, 524, 525,
+ 538, 539, 1222, 1223, 1225, 1226, 1227, 1228, 1246, 1247,
+ 1358, 1360, 1364, 1366, 28, 272, 1309, 8, 12, 14,
+ 27, 43, 44, 48, 49, 54, 63, 65, 67, 68,
+ 98, 135, 155, 167, 179, 184, 252, 313, 316, 426,
+ 506, 537, 1213, 1226, 1227, 1248, 1295, 1296, 1338, 1339,
+ 1340, 1344, 1349, 1350, 1351, 1360, 1366, 98, 1037, 1212,
+ 1248, 1344, 1357, 13, 1037, 5, 24, 28, 34, 35,
+ 41, 42, 98, 102, 103, 104, 105, 106, 107, 108,
+ 111, 124, 131, 132, 135, 138, 144, 146, 155, 156,
+ 163, 167, 168, 169, 170, 172, 173, 174, 184, 186,
+ 193, 198, 199, 205, 209, 213, 224, 226, 231, 233,
+ 236, 242, 245, 249, 260, 268, 272, 276, 278, 280,
+ 291, 292, 298, 302, 303, 333, 338, 345, 348, 349,
+ 353, 354, 371, 380, 396, 409, 428, 434, 445, 461,
+ 464, 472, 476, 477, 483, 492, 493, 499, 500, 506,
+ 508, 515, 516, 518, 519, 1226, 1229, 1340, 1341, 1342,
+ 1346, 1347, 1348, 1349, 1351, 24, 34, 135, 276, 1335,
+ 36, 38, 333, 1268, 478, 522, 959, 97, 145, 160,
+ 178, 184, 201, 212, 221, 233, 238, 245, 264, 289,
+ 310, 350, 373, 383, 384, 387, 413, 416, 420, 422,
+ 429, 432, 451, 458, 463, 464, 467, 471, 481, 486,
+ 499, 512, 715, 1296, 183, 959, 1143, 1218, 1228, 1338,
+ 1341, 1344, 1345, 1349, 1350, 1366, 98, 1037, 510, 997,
+ 348, 379, 959, 121, 556, 639, 92, 109, 132, 145,
+ 156, 178, 184, 201, 212, 221, 233, 241, 245, 301,
+ 350, 353, 373, 387, 413, 422, 432, 451, 458, 467,
+ 468, 470, 471, 481, 486, 493, 496, 499, 648, 697,
+ 806, 860, 874, 1213, 1237, 1238, 1239, 1248, 1364, 1366,
+ 13, 98, 378, 1212, 1248, 1252, 450, 1037, 98, 372,
+ 430, 468, 470, 288, 911, 912, 1364, 92, 97, 132,
+ 145, 160, 178, 201, 212, 221, 233, 238, 245, 264,
+ 310, 350, 363, 373, 384, 387, 413, 416, 420, 422,
+ 429, 432, 451, 458, 464, 467, 471, 479, 481, 486,
+ 499, 512, 715, 819, 820, 821, 959, 562, 1278, 1342,
+ 256, 1252, 163, 183, 217, 510, 556, 695, 698, 992,
+ 1005, 1013, 1015, 1024, 1031, 1036, 1040, 1232, 91, 98,
+ 116, 228, 234, 236, 260, 290, 324, 381, 400, 547,
+ 548, 838, 839, 1037, 1220, 1221, 1358, 1360, 98, 163,
+ 396, 428, 843, 844, 845, 1344, 233, 1344, 1217, 1364,
+ 464, 1052, 116, 234, 838, 1344, 478, 1252, 363, 310,
+ 178, 264, 422, 463, 464, 556, 921, 922, 421, 1344,
+ 98, 135, 433, 474, 478, 506, 590, 599, 600, 1226,
+ 1227, 1338, 1343, 1349, 1351, 1366, 95, 242, 843, 844,
+ 379, 959, 1344, 287, 98, 198, 1054, 1055, 4, 13,
+ 133, 155, 157, 301, 319, 413, 422, 433, 474, 478,
+ 525, 587, 588, 589, 590, 98, 433, 474, 478, 590,
+ 478, 349, 1095, 1210, 1344, 1052, 1332, 1342, 549, 1344,
+ 237, 556, 998, 556, 394, 1046, 1047, 1212, 1046, 1041,
+ 1042, 1045, 560, 556, 997, 213, 278, 354, 492, 1056,
+ 1057, 1041, 1043, 1044, 189, 274, 498, 559, 118, 566,
+ 1276, 1279, 1275, 1271, 560, 1280, 1282, 5, 24, 34,
+ 135, 202, 276, 1287, 179, 252, 313, 316, 426, 537,
+ 556, 1138, 1139, 1259, 1263, 1353, 71, 1256, 1212, 1248,
+ 1367, 184, 1237, 20, 500, 550, 1252, 1252, 1367, 500,
+ 1300, 1301, 1302, 24, 276, 276, 1346, 18, 19, 37,
+ 40, 127, 159, 199, 1337, 1337, 15, 1276, 104, 963,
+ 890, 1218, 823, 1344, 823, 1213, 382, 823, 481, 1212,
+ 177, 464, 878, 1218, 1228, 1344, 1222, 1223, 98, 254,
+ 1210, 342, 512, 80, 87, 88, 89, 140, 225, 543,
+ 544, 545, 547, 548, 549, 550, 551, 552, 907, 909,
+ 1173, 1174, 1344, 254, 1212, 878, 1212, 98, 1222, 1223,
+ 878, 1212, 1212, 254, 1210, 1212, 254, 823, 1212, 406,
+ 435, 98, 254, 1095, 1212, 425, 1212, 823, 98, 308,
+ 1222, 1223, 254, 1210, 288, 33, 186, 284, 333, 390,
+ 960, 961, 962, 556, 554, 558, 1201, 1203, 1210, 1216,
+ 1344, 92, 97, 132, 145, 146, 156, 160, 178, 201,
+ 212, 221, 233, 238, 264, 289, 310, 350, 373, 384,
+ 387, 413, 416, 420, 422, 429, 432, 451, 458, 464,
+ 467, 471, 479, 481, 486, 512, 715, 829, 830, 1364,
+ 963, 1012, 1015, 1024, 1031, 1040, 1210, 312, 823, 556,
+ 254, 823, 481, 1213, 823, 481, 254, 1212, 177, 464,
+ 468, 470, 1222, 468, 470, 140, 225, 907, 404, 1212,
+ 1212, 1222, 254, 583, 1344, 254, 1212, 254, 823, 1212,
+ 1212, 425, 1212, 823, 308, 1222, 394, 429, 464, 512,
+ 310, 160, 264, 97, 238, 384, 420, 479, 485, 709,
+ 80, 1240, 1241, 561, 1360, 1367, 98, 1252, 1366, 1038,
+ 597, 1225, 1364, 912, 312, 254, 890, 891, 254, 916,
+ 254, 1213, 120, 122, 123, 135, 136, 181, 182, 202,
+ 229, 254, 276, 277, 279, 320, 322, 341, 391, 437,
+ 443, 474, 475, 507, 825, 1117, 1119, 1121, 1123, 1125,
+ 1127, 1128, 1129, 1131, 1132, 1133, 1135, 1136, 1338, 1345,
+ 1349, 1350, 1366, 481, 177, 464, 254, 877, 878, 254,
+ 1223, 1224, 152, 512, 140, 225, 254, 908, 909, 125,
+ 254, 877, 254, 1224, 254, 877, 254, 1212, 254, 1212,
+ 425, 916, 254, 825, 254, 308, 1224, 288, 254, 822,
+ 823, 254, 1211, 1212, 254, 1212, 963, 556, 562, 1368,
+ 1369, 1370, 1371, 1373, 1278, 69, 1248, 1297, 556, 1014,
+ 648, 1037, 1005, 992, 1006, 1007, 1008, 1225, 997, 1221,
+ 839, 840, 98, 839, 1037, 1221, 840, 98, 839, 1037,
+ 1221, 840, 840, 840, 1221, 1220, 1220, 280, 500, 1302,
+ 1303, 1377, 1379, 1037, 840, 382, 556, 556, 668, 668,
+ 668, 348, 476, 559, 668, 422, 1095, 1096, 839, 1037,
+ 839, 1037, 559, 955, 1364, 236, 556, 1011, 125, 512,
+ 510, 923, 924, 152, 861, 861, 1344, 115, 539, 284,
+ 558, 351, 351, 348, 236, 1364, 476, 963, 231, 833,
+ 348, 78, 79, 80, 82, 106, 120, 122, 123, 131,
+ 132, 135, 136, 143, 145, 168, 169, 170, 171, 172,
+ 173, 174, 181, 182, 184, 218, 223, 224, 229, 244,
+ 246, 277, 279, 294, 302, 303, 320, 322, 331, 333,
+ 338, 339, 341, 350, 361, 374, 391, 418, 434, 443,
+ 459, 474, 475, 480, 482, 483, 493, 499, 507, 527,
+ 528, 529, 530, 532, 533, 534, 535, 540, 547, 548,
+ 549, 556, 1041, 1120, 1123, 1126, 1127, 1128, 1130, 1131,
+ 1132, 1135, 1136, 1140, 1142, 1143, 1144, 1146, 1169, 1170,
+ 1171, 1175, 1195, 1200, 1207, 1208, 1218, 1219, 1220, 1344,
+ 1356, 1358, 1360, 1361, 1362, 1363, 1364, 1365, 1206, 1207,
+ 476, 545, 1367, 1364, 476, 545, 1296, 98, 605, 1209,
+ 1210, 433, 587, 184, 596, 1364, 597, 1364, 115, 137,
+ 587, 539, 444, 961, 351, 236, 476, 545, 115, 539,
+ 284, 1377, 962, 556, 1210, 549, 1203, 1096, 1348, 991,
+ 992, 993, 994, 1225, 235, 999, 1140, 1178, 1046, 559,
+ 556, 1000, 557, 557, 991, 1001, 1002, 1003, 1210, 98,
+ 198, 1053, 1053, 125, 1053, 226, 231, 298, 345, 1060,
+ 1062, 1063, 1078, 1080, 1081, 1082, 1056, 1057, 236, 280,
+ 1095, 1097, 556, 560, 1270, 549, 1289, 1290, 1292, 562,
+ 562, 24, 276, 276, 476, 476, 476, 476, 556, 476,
+ 547, 548, 706, 1221, 1257, 1363, 209, 107, 1244, 125,
+ 1247, 1247, 280, 1302, 1304, 280, 1302, 1303, 1304, 505,
+ 1313, 1314, 1360, 13, 446, 547, 548, 1220, 1305, 1306,
+ 1307, 1356, 1358, 1362, 1363, 1364, 1365, 276, 282, 476,
+ 1212, 1212, 6, 159, 1212, 1337, 1292, 134, 329, 364,
+ 402, 435, 556, 888, 364, 398, 402, 435, 558, 824,
+ 364, 402, 435, 155, 207, 304, 364, 402, 435, 467,
+ 469, 519, 598, 601, 968, 969, 970, 971, 1366, 855,
+ 94, 203, 364, 402, 435, 503, 614, 1212, 94, 203,
+ 435, 498, 581, 523, 254, 1095, 128, 162, 222, 257,
+ 293, 329, 333, 364, 365, 402, 410, 419, 427, 435,
+ 447, 456, 460, 514, 598, 602, 893, 901, 930, 556,
+ 875, 1203, 402, 581, 260, 218, 94, 100, 113, 142,
+ 196, 203, 206, 232, 266, 329, 333, 343, 352, 364,
+ 402, 405, 406, 435, 503, 610, 612, 613, 733, 930,
+ 706, 98, 254, 1210, 823, 823, 556, 906, 364, 435,
+ 558, 218, 348, 364, 402, 435, 901, 930, 94, 203,
+ 364, 402, 435, 260, 576, 402, 519, 542, 569, 576,
+ 364, 402, 435, 901, 930, 348, 364, 402, 218, 107,
+ 126, 176, 263, 311, 314, 329, 363, 402, 407, 429,
+ 435, 449, 610, 703, 704, 364, 402, 511, 733, 741,
+ 218, 364, 402, 435, 155, 196, 206, 364, 398, 402,
+ 435, 600, 588, 590, 260, 218, 113, 194, 329, 402,
+ 435, 610, 611, 364, 402, 406, 435, 153, 195, 366,
+ 469, 348, 94, 100, 203, 364, 402, 435, 629, 630,
+ 576, 231, 402, 569, 576, 218, 402, 435, 610, 1212,
+ 560, 296, 186, 349, 524, 559, 960, 98, 198, 508,
+ 549, 557, 883, 1140, 1179, 1180, 1345, 1140, 1202, 549,
+ 1215, 1346, 1201, 500, 988, 348, 312, 890, 556, 1212,
+ 1117, 481, 177, 464, 878, 342, 512, 140, 225, 909,
+ 1212, 878, 878, 1212, 425, 231, 1212, 1117, 288, 823,
+ 1212, 557, 668, 1212, 138, 1117, 333, 236, 556, 792,
+ 1212, 569, 107, 982, 1212, 333, 569, 523, 254, 1210,
+ 569, 823, 823, 792, 496, 648, 348, 231, 939, 940,
+ 569, 333, 115, 584, 333, 486, 740, 333, 1000, 155,
+ 364, 717, 153, 195, 366, 469, 96, 117, 275, 765,
+ 107, 792, 231, 254, 569, 512, 254, 1210, 254, 693,
+ 1210, 1210, 512, 823, 861, 1218, 1218, 1218, 1212, 231,
+ 715, 72, 1242, 1344, 561, 1243, 1240, 121, 175, 273,
+ 329, 424, 218, 129, 408, 559, 615, 218, 556, 218,
+ 569, 509, 1134, 1134, 1134, 556, 1122, 1122, 376, 556,
+ 1124, 218, 135, 136, 1134, 1122, 1119, 521, 542, 556,
+ 1137, 556, 1137, 559, 615, 106, 1118, 556, 179, 316,
+ 537, 556, 1138, 824, 1122, 523, 218, 559, 615, 218,
+ 559, 254, 822, 254, 823, 254, 823, 218, 559, 615,
+ 1224, 218, 615, 218, 218, 615, 218, 615, 218, 153,
+ 195, 366, 469, 231, 218, 615, 218, 231, 254, 254,
+ 597, 218, 559, 615, 218, 559, 615, 218, 348, 557,
+ 1369, 1370, 1368, 559, 563, 1178, 1301, 1376, 1377, 464,
+ 1038, 557, 559, 224, 348, 483, 594, 597, 706, 1009,
+ 1005, 840, 1037, 840, 1037, 1379, 1380, 840, 1037, 840,
+ 1037, 1380, 840, 1037, 1037, 1037, 840, 13, 446, 1352,
+ 1355, 1360, 1037, 556, 669, 670, 1344, 669, 98, 178,
+ 201, 233, 238, 288, 289, 384, 416, 422, 429, 464,
+ 467, 486, 846, 1209, 1224, 845, 1212, 260, 559, 1027,
+ 1037, 1037, 1364, 1297, 1117, 1181, 107, 1224, 861, 557,
+ 559, 1210, 1212, 296, 1344, 231, 231, 846, 1224, 421,
+ 1344, 597, 348, 556, 554, 1041, 1182, 1140, 1199, 556,
+ 556, 231, 556, 556, 1041, 556, 556, 556, 556, 556,
+ 556, 556, 1140, 556, 556, 556, 556, 556, 556, 556,
+ 556, 1041, 556, 556, 556, 556, 556, 556, 556, 556,
+ 1140, 1140, 1140, 506, 1041, 1140, 1178, 1203, 1364, 556,
+ 1364, 80, 83, 87, 88, 89, 104, 107, 112, 119,
+ 144, 255, 260, 282, 283, 297, 336, 350, 353, 440,
+ 540, 543, 544, 545, 547, 548, 549, 550, 551, 552,
+ 1173, 1175, 1177, 1366, 520, 1156, 360, 1140, 280, 559,
+ 1050, 1377, 556, 1364, 1203, 21, 1359, 1360, 1204, 1050,
+ 344, 348, 1329, 1329, 9, 505, 1316, 1317, 1319, 1296,
+ 1296, 187, 256, 606, 559, 137, 184, 597, 107, 184,
+ 301, 595, 706, 1136, 1364, 1366, 1364, 158, 200, 1152,
+ 167, 184, 591, 592, 594, 706, 184, 591, 1377, 1377,
+ 296, 1210, 159, 407, 827, 282, 557, 559, 594, 706,
+ 995, 997, 557, 559, 1047, 1211, 107, 557, 559, 1000,
+ 1043, 1043, 1058, 1059, 1140, 1043, 228, 324, 1069, 286,
+ 329, 390, 438, 498, 98, 1064, 1140, 547, 548, 1065,
+ 1066, 1140, 1142, 1078, 1079, 1063, 1062, 1060, 1061, 231,
+ 1081, 343, 1083, 1060, 1078, 1097, 1016, 1210, 107, 1344,
+ 435, 1178, 1289, 549, 559, 560, 1347, 1266, 1269, 1266,
+ 276, 179, 252, 313, 1139, 313, 1139, 1139, 316, 1220,
+ 313, 316, 426, 1363, 1363, 559, 1258, 183, 1296, 499,
+ 1245, 1247, 1212, 446, 1220, 1318, 1360, 559, 545, 1212,
+ 13, 1220, 1363, 1220, 1363, 559, 1276, 1212, 556, 556,
+ 1348, 134, 476, 476, 422, 260, 271, 354, 357, 437,
+ 508, 549, 881, 882, 883, 885, 887, 889, 1117, 1345,
+ 476, 511, 476, 422, 1215, 558, 476, 476, 422, 298,
+ 476, 476, 467, 587, 364, 968, 970, 545, 972, 231,
+ 242, 260, 411, 856, 857, 138, 156, 214, 233, 380,
+ 493, 665, 666, 156, 184, 333, 476, 156, 476, 184,
+ 333, 422, 156, 196, 206, 364, 402, 789, 422, 723,
+ 92, 97, 132, 145, 160, 201, 212, 233, 238, 310,
+ 350, 384, 416, 422, 429, 432, 464, 471, 479, 486,
+ 512, 715, 1212, 218, 402, 435, 610, 348, 706, 427,
+ 293, 476, 1344, 476, 338, 706, 188, 281, 422, 433,
+ 478, 589, 823, 408, 435, 893, 902, 192, 557, 876,
+ 881, 476, 499, 467, 1210, 146, 214, 254, 655, 665,
+ 1344, 146, 156, 927, 368, 348, 418, 420, 481, 156,
+ 927, 101, 405, 418, 420, 481, 418, 1210, 232, 266,
+ 343, 823, 556, 476, 476, 253, 556, 619, 307, 467,
+ 496, 521, 619, 156, 559, 192, 364, 260, 218, 402,
+ 435, 610, 930, 500, 500, 330, 1117, 476, 422, 556,
+ 907, 1212, 1210, 476, 476, 422, 902, 192, 464, 464,
+ 476, 476, 464, 792, 178, 435, 601, 476, 571, 601,
+ 476, 476, 422, 902, 192, 1210, 476, 476, 1210, 1119,
+ 706, 125, 705, 706, 706, 176, 311, 314, 125, 476,
+ 569, 318, 422, 569, 329, 704, 476, 476, 338, 1364,
+ 733, 823, 476, 476, 422, 451, 1364, 476, 387, 476,
+ 387, 792, 467, 1095, 368, 368, 156, 476, 927, 422,
+ 476, 476, 619, 619, 823, 823, 823, 823, 1210, 114,
+ 505, 114, 114, 476, 114, 476, 505, 422, 556, 559,
+ 601, 499, 750, 1223, 476, 571, 601, 1210, 476, 927,
+ 422, 364, 402, 390, 403, 431, 593, 960, 1179, 1179,
+ 1180, 557, 85, 86, 559, 1056, 1057, 555, 561, 1216,
+ 1344, 1210, 282, 1117, 348, 282, 523, 282, 706, 823,
+ 823, 282, 348, 282, 282, 348, 153, 195, 366, 469,
+ 1117, 348, 282, 282, 282, 476, 236, 476, 633, 486,
+ 556, 107, 218, 823, 793, 794, 1346, 96, 968, 1117,
+ 348, 218, 720, 1212, 333, 368, 556, 570, 806, 500,
+ 394, 512, 1210, 98, 464, 519, 897, 570, 218, 1223,
+ 163, 242, 585, 647, 699, 764, 841, 859, 964, 218,
+ 1364, 741, 742, 218, 348, 1364, 1223, 304, 823, 823,
+ 823, 823, 343, 189, 274, 484, 498, 766, 767, 210,
+ 389, 556, 750, 333, 570, 1210, 333, 701, 703, 333,
+ 107, 343, 368, 556, 668, 668, 254, 696, 1210, 231,
+ 254, 862, 1216, 556, 796, 888, 556, 879, 879, 107,
+ 1117, 288, 558, 1220, 1243, 519, 521, 1039, 424, 891,
+ 890, 1117, 1213, 556, 556, 1178, 1220, 825, 1134, 1134,
+ 106, 1118, 474, 474, 1220, 1220, 1117, 554, 554, 1220,
+ 476, 476, 1220, 1122, 877, 878, 1224, 1223, 218, 615,
+ 218, 500, 218, 500, 908, 909, 615, 877, 1224, 877,
+ 1212, 1212, 1117, 825, 1224, 750, 218, 218, 615, 822,
+ 823, 1211, 1212, 1212, 823, 557, 563, 1371, 557, 1377,
+ 1378, 1301, 254, 1210, 175, 1005, 1007, 1037, 1037, 1380,
+ 1037, 1037, 1380, 1037, 1037, 1212, 13, 559, 1359, 669,
+ 557, 559, 557, 239, 385, 417, 430, 465, 1211, 822,
+ 177, 432, 877, 1211, 342, 877, 877, 1211, 1209, 1209,
+ 1211, 822, 476, 519, 852, 213, 298, 747, 748, 92,
+ 216, 418, 438, 1028, 1095, 337, 1029, 557, 559, 1012,
+ 476, 1210, 921, 922, 924, 844, 843, 844, 236, 243,
+ 853, 1344, 97, 146, 178, 201, 212, 233, 238, 289,
+ 310, 384, 387, 413, 416, 422, 429, 458, 464, 467,
+ 486, 512, 715, 834, 835, 1178, 555, 1178, 1182, 1183,
+ 515, 1196, 1197, 1140, 1178, 556, 1220, 1220, 179, 252,
+ 313, 316, 426, 537, 1184, 1185, 1364, 1366, 1178, 1178,
+ 1178, 1220, 1220, 1140, 1140, 907, 1140, 1187, 418, 547,
+ 548, 556, 1141, 1142, 1175, 1189, 557, 1178, 1140, 1178,
+ 1190, 1140, 124, 236, 292, 477, 1140, 1178, 1193, 1178,
+ 318, 1142, 1140, 1150, 1151, 1152, 318, 1140, 1152, 557,
+ 559, 1220, 1138, 1117, 1140, 1140, 1140, 1140, 1346, 474,
+ 111, 461, 1205, 823, 1140, 556, 1041, 1194, 198, 200,
+ 224, 325, 326, 327, 328, 332, 333, 338, 343, 483,
+ 494, 1186, 1140, 556, 1140, 476, 119, 255, 260, 297,
+ 440, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 98, 105, 445, 1172, 245, 227, 1157, 418, 556,
+ 1169, 241, 301, 464, 468, 470, 496, 1051, 1210, 1208,
+ 236, 1085, 1179, 1212, 1360, 1201, 1085, 1318, 559, 545,
+ 1210, 478, 556, 1364, 559, 1377, 557, 253, 253, 615,
+ 1276, 1003, 993, 992, 996, 1140, 557, 310, 333, 1048,
+ 1003, 1001, 559, 108, 193, 500, 871, 418, 419, 547,
+ 548, 1066, 1068, 1142, 438, 286, 349, 559, 1067, 1220,
+ 1363, 1067, 418, 419, 1068, 1209, 337, 442, 1030, 1079,
+ 1061, 500, 1025, 184, 362, 556, 1017, 1040, 107, 1344,
+ 556, 1032, 1033, 1034, 1344, 557, 560, 1290, 1118, 563,
+ 1269, 563, 557, 706, 557, 33, 1246, 1321, 1322, 1360,
+ 1314, 1319, 1367, 1305, 1118, 1354, 1370, 1354, 1118, 1223,
+ 1212, 1212, 357, 125, 1345, 557, 883, 885, 882, 885,
+ 1345, 354, 557, 559, 824, 1223, 1212, 1212, 1215, 1223,
+ 1212, 1212, 1223, 1213, 1212, 184, 594, 1221, 413, 499,
+ 843, 422, 242, 843, 556, 1212, 500, 863, 286, 286,
+ 500, 556, 690, 254, 1212, 338, 1223, 1212, 1212, 1140,
+ 338, 1212, 1212, 101, 405, 476, 476, 1212, 476, 724,
+ 312, 890, 556, 823, 823, 1117, 481, 177, 464, 878,
+ 512, 140, 225, 909, 878, 878, 1212, 823, 1212, 823,
+ 425, 231, 1117, 823, 288, 248, 329, 364, 402, 504,
+ 727, 728, 729, 1095, 476, 927, 422, 338, 188, 281,
+ 1223, 1212, 348, 1212, 348, 557, 559, 1222, 1224, 1212,
+ 402, 610, 254, 655, 333, 1117, 1212, 1220, 1344, 1210,
+ 1212, 296, 1212, 98, 499, 1212, 254, 1212, 254, 1344,
+ 420, 481, 420, 481, 296, 1212, 98, 499, 1212, 296,
+ 418, 1210, 94, 203, 435, 734, 735, 736, 737, 1346,
+ 1223, 1212, 184, 237, 334, 500, 618, 621, 622, 1346,
+ 1212, 142, 346, 1212, 613, 348, 476, 467, 1210, 476,
+ 927, 422, 192, 1214, 1344, 1214, 559, 557, 559, 1223,
+ 1212, 933, 934, 1346, 348, 402, 476, 758, 1223, 1212,
+ 1212, 348, 1096, 1096, 1223, 1212, 1096, 1213, 1222, 155,
+ 208, 266, 370, 491, 499, 502, 572, 1366, 1223, 1212,
+ 1212, 348, 402, 1223, 1212, 402, 435, 610, 703, 706,
+ 823, 1212, 706, 823, 1212, 706, 1223, 1212, 435, 1223,
+ 1212, 1212, 1221, 1223, 897, 1212, 943, 944, 1346, 1212,
+ 402, 435, 610, 611, 1210, 1210, 1212, 1212, 1212, 1212,
+ 1223, 1212, 94, 100, 203, 364, 402, 435, 364, 402,
+ 435, 792, 402, 435, 402, 435, 402, 930, 1109, 1344,
+ 254, 802, 1344, 254, 1344, 1223, 1212, 1212, 1364, 1212,
+ 933, 94, 630, 432, 1222, 402, 435, 610, 1212, 1212,
+ 1212, 476, 476, 151, 490, 390, 559, 1056, 1056, 1056,
+ 1140, 1140, 508, 1180, 557, 1140, 1202, 338, 831, 1364,
+ 107, 201, 823, 831, 831, 282, 500, 500, 831, 823,
+ 831, 831, 823, 288, 823, 831, 831, 831, 386, 634,
+ 634, 264, 464, 763, 1140, 1117, 823, 557, 559, 545,
+ 766, 657, 1346, 1212, 129, 236, 422, 511, 721, 728,
+ 729, 218, 343, 297, 649, 651, 653, 655, 662, 665,
+ 95, 260, 413, 462, 572, 573, 231, 1214, 512, 1210,
+ 107, 759, 465, 1096, 792, 583, 1344, 584, 353, 648,
+ 1212, 233, 823, 1178, 387, 1364, 792, 792, 792, 792,
+ 343, 348, 353, 556, 792, 1107, 1108, 1109, 432, 218,
+ 556, 218, 218, 217, 1233, 823, 343, 649, 1344, 500,
+ 685, 519, 620, 333, 107, 668, 1364, 333, 348, 797,
+ 798, 1366, 792, 557, 880, 881, 886, 107, 288, 410,
+ 479, 518, 892, 893, 894, 892, 348, 288, 597, 1242,
+ 550, 251, 251, 231, 615, 107, 569, 232, 976, 977,
+ 1178, 557, 557, 615, 554, 539, 539, 557, 557, 1220,
+ 555, 556, 1220, 1344, 1364, 1375, 557, 557, 615, 822,
+ 823, 1214, 823, 1214, 615, 615, 615, 615, 288, 615,
+ 432, 231, 597, 615, 615, 348, 615, 333, 1039, 1367,
+ 1355, 557, 670, 260, 260, 260, 260, 260, 523, 1211,
+ 706, 707, 245, 847, 848, 1223, 95, 853, 476, 556,
+ 236, 216, 438, 216, 438, 418, 498, 315, 1117, 1223,
+ 519, 694, 861, 861, 236, 348, 847, 125, 615, 890,
+ 1117, 481, 464, 878, 342, 512, 878, 878, 1117, 288,
+ 823, 1212, 557, 555, 555, 559, 1140, 205, 1197, 1198,
+ 107, 557, 1140, 557, 557, 557, 236, 557, 557, 557,
+ 557, 557, 557, 559, 559, 557, 371, 1188, 557, 556,
+ 1141, 1141, 1178, 83, 87, 88, 89, 260, 282, 350,
+ 543, 544, 545, 547, 548, 549, 550, 551, 552, 1175,
+ 1141, 557, 557, 231, 236, 1191, 1192, 557, 107, 1193,
+ 1178, 1193, 1193, 236, 557, 557, 1346, 369, 1154, 107,
+ 557, 559, 1140, 1346, 559, 1140, 1204, 1140, 557, 539,
+ 1141, 1141, 211, 1178, 236, 198, 200, 224, 332, 338,
+ 343, 483, 494, 1186, 556, 332, 211, 907, 1140, 461,
+ 1205, 1140, 1194, 1140, 476, 556, 1041, 556, 556, 359,
+ 1161, 556, 1178, 468, 470, 468, 470, 1210, 1052, 1052,
+ 1052, 291, 419, 536, 556, 1041, 1086, 1087, 1088, 1095,
+ 1100, 1110, 1143, 1145, 1146, 1344, 516, 1105, 1056, 1105,
+ 7, 10, 11, 21, 22, 23, 25, 26, 30, 31,
+ 32, 177, 318, 376, 486, 1324, 1325, 1327, 1317, 1318,
+ 961, 1220, 1138, 592, 1118, 1003, 310, 556, 1059, 350,
+ 1173, 1176, 541, 872, 1220, 1363, 1068, 349, 519, 498,
+ 1065, 306, 1086, 516, 1106, 506, 463, 499, 1018, 1019,
+ 1020, 1344, 348, 1021, 1344, 1034, 1035, 559, 1085, 545,
+ 1204, 561, 1272, 560, 559, 545, 29, 1333, 557, 557,
+ 560, 889, 824, 885, 885, 125, 887, 551, 1224, 1224,
+ 348, 1211, 351, 348, 1140, 666, 1214, 556, 556, 556,
+ 690, 264, 669, 782, 218, 615, 476, 1223, 1212, 597,
+ 1212, 1117, 1212, 523, 823, 823, 823, 823, 153, 195,
+ 366, 469, 1117, 1212, 710, 1212, 248, 504, 476, 476,
+ 710, 727, 733, 402, 435, 610, 1212, 1212, 1212, 272,
+ 338, 221, 881, 363, 435, 476, 333, 218, 352, 731,
+ 782, 435, 94, 203, 406, 407, 435, 614, 623, 624,
+ 733, 928, 427, 218, 615, 218, 615, 1212, 1212, 1212,
+ 1212, 427, 427, 296, 736, 737, 736, 557, 559, 738,
+ 1364, 264, 557, 559, 545, 558, 221, 1223, 1212, 402,
+ 435, 610, 1212, 1212, 1212, 348, 364, 402, 435, 94,
+ 203, 364, 402, 435, 1117, 330, 1117, 557, 559, 545,
+ 1210, 476, 1224, 500, 755, 221, 298, 370, 338, 1364,
+ 370, 1224, 497, 221, 476, 476, 422, 451, 559, 897,
+ 363, 435, 156, 476, 927, 422, 184, 231, 625, 476,
+ 476, 308, 308, 308, 476, 476, 422, 476, 476, 422,
+ 476, 422, 476, 422, 476, 192, 615, 1117, 333, 1364,
+ 435, 928, 218, 615, 476, 476, 557, 1212, 476, 927,
+ 422, 476, 1223, 1212, 557, 557, 557, 1180, 555, 1117,
+ 823, 282, 831, 1214, 1214, 282, 282, 1212, 282, 452,
+ 453, 635, 1364, 635, 248, 557, 557, 236, 792, 794,
+ 330, 350, 547, 548, 706, 795, 885, 1176, 1229, 1364,
+ 348, 138, 144, 156, 184, 186, 240, 268, 333, 338,
+ 380, 396, 493, 658, 659, 661, 217, 515, 569, 597,
+ 1212, 597, 731, 1210, 1210, 1210, 557, 559, 1224, 245,
+ 413, 1224, 1220, 486, 1210, 668, 1366, 231, 760, 115,
+ 584, 404, 464, 740, 177, 1000, 236, 943, 620, 669,
+ 1210, 767, 799, 800, 1364, 557, 559, 1212, 231, 669,
+ 1210, 693, 1210, 1252, 1040, 556, 650, 1210, 557, 1214,
+ 519, 521, 686, 619, 107, 218, 1040, 685, 476, 218,
+ 1095, 557, 559, 545, 557, 559, 184, 545, 895, 1364,
+ 597, 464, 884, 885, 231, 896, 894, 189, 274, 428,
+ 498, 952, 1212, 248, 1238, 1040, 1252, 1117, 556, 557,
+ 559, 557, 1220, 1137, 1137, 555, 1375, 556, 547, 548,
+ 549, 550, 551, 555, 615, 500, 615, 500, 615, 1212,
+ 1212, 750, 615, 823, 218, 231, 422, 422, 422, 422,
+ 422, 1211, 559, 1223, 519, 559, 849, 351, 1096, 432,
+ 216, 216, 177, 329, 1210, 1212, 1224, 846, 615, 1223,
+ 282, 282, 282, 706, 282, 282, 282, 282, 282, 1182,
+ 472, 1140, 209, 1117, 557, 1140, 1186, 1140, 1140, 1191,
+ 557, 1178, 559, 1117, 1141, 1141, 1141, 1141, 198, 200,
+ 333, 343, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141,
+ 1141, 1141, 1140, 1140, 1192, 1191, 1117, 557, 557, 557,
+ 1178, 557, 559, 125, 1142, 1155, 557, 1346, 1151, 377,
+ 457, 1153, 557, 559, 511, 1147, 107, 557, 1364, 1140,
+ 104, 104, 1140, 557, 1140, 236, 556, 332, 1181, 1140,
+ 557, 211, 1141, 1141, 211, 211, 1140, 1140, 1057, 516,
+ 556, 1162, 1344, 557, 1178, 559, 1052, 1052, 1052, 1052,
+ 1210, 1210, 1210, 1041, 1100, 1110, 236, 556, 1041, 1087,
+ 1088, 107, 1089, 1090, 1344, 559, 164, 237, 270, 285,
+ 295, 321, 412, 1092, 1090, 107, 1089, 1091, 1344, 1090,
+ 542, 1104, 1203, 1140, 245, 1070, 557, 1070, 559, 545,
+ 557, 1333, 1012, 556, 872, 228, 290, 349, 519, 473,
+ 167, 1140, 409, 1023, 505, 557, 559, 1204, 154, 1023,
+ 557, 559, 1033, 1106, 1140, 1220, 545, 1291, 1322, 1327,
+ 557, 551, 889, 486, 239, 417, 423, 430, 465, 487,
+ 858, 231, 858, 557, 556, 673, 674, 866, 1145, 1344,
+ 669, 669, 782, 1216, 557, 186, 268, 329, 333, 783,
+ 1212, 1212, 107, 1212, 500, 500, 823, 823, 823, 823,
+ 288, 824, 1223, 1212, 476, 927, 422, 476, 272, 1212,
+ 125, 467, 1212, 218, 655, 556, 657, 451, 240, 220,
+ 253, 333, 619, 569, 177, 240, 333, 451, 454, 619,
+ 704, 435, 624, 486, 1212, 1344, 427, 735, 1212, 622,
+ 795, 1346, 1212, 363, 435, 476, 927, 422, 476, 221,
+ 476, 476, 422, 238, 350, 454, 804, 805, 238, 350,
+ 812, 813, 476, 476, 422, 557, 557, 557, 934, 330,
+ 706, 885, 935, 1176, 1229, 1364, 402, 1212, 556, 519,
+ 756, 1212, 1221, 1364, 1364, 1364, 1212, 1212, 1212, 1212,
+ 1221, 944, 125, 467, 1212, 1212, 1212, 1212, 506, 1212,
+ 1212, 231, 231, 404, 231, 254, 1223, 1212, 1212, 1223,
+ 1212, 1212, 1212, 1212, 1212, 1212, 1212, 348, 144, 616,
+ 218, 96, 117, 486, 1344, 1212, 1364, 733, 1212, 1212,
+ 1212, 1212, 1056, 557, 282, 831, 282, 282, 831, 831,
+ 282, 831, 569, 500, 640, 641, 710, 782, 519, 521,
+ 823, 1210, 556, 823, 1212, 1141, 101, 125, 660, 187,
+ 256, 186, 338, 286, 1210, 897, 238, 384, 778, 785,
+ 786, 1344, 720, 368, 556, 650, 663, 267, 680, 653,
+ 1224, 1224, 1117, 556, 620, 98, 189, 274, 428, 498,
+ 761, 476, 757, 1223, 254, 1210, 742, 523, 348, 1086,
+ 897, 397, 768, 557, 559, 1109, 731, 750, 557, 701,
+ 107, 343, 368, 556, 1014, 694, 652, 654, 656, 665,
+ 1344, 368, 681, 682, 650, 680, 619, 346, 348, 687,
+ 1040, 696, 694, 620, 1364, 1216, 863, 798, 1366, 795,
+ 886, 1140, 1140, 559, 556, 892, 486, 559, 476, 556,
+ 710, 80, 1249, 557, 976, 977, 555, 557, 1276, 1375,
+ 1375, 1375, 1375, 1375, 1214, 1214, 615, 432, 615, 1211,
+ 1211, 1211, 1211, 1211, 706, 242, 848, 557, 1212, 177,
+ 853, 236, 338, 836, 1364, 836, 836, 282, 836, 836,
+ 836, 836, 836, 1140, 557, 557, 557, 1192, 557, 1140,
+ 236, 198, 200, 343, 556, 557, 526, 1149, 1178, 395,
+ 505, 125, 1155, 1142, 517, 517, 557, 1140, 329, 1140,
+ 559, 1148, 1119, 1140, 1140, 1140, 1181, 557, 1140, 104,
+ 104, 1140, 1140, 211, 557, 557, 1140, 1163, 1344, 557,
+ 1140, 1210, 1210, 1210, 1210, 1090, 1091, 1090, 556, 531,
+ 1142, 557, 1344, 556, 1087, 285, 358, 1093, 1087, 1093,
+ 285, 1092, 1093, 285, 466, 1098, 556, 1344, 556, 355,
+ 125, 249, 1077, 1364, 1077, 1325, 548, 1318, 1326, 1363,
+ 1364, 1364, 557, 907, 473, 343, 1207, 1040, 362, 1040,
+ 1020, 348, 556, 1022, 545, 1034, 1023, 1371, 486, 557,
+ 476, 843, 236, 782, 1140, 557, 559, 519, 144, 865,
+ 869, 865, 557, 557, 261, 671, 187, 256, 266, 186,
+ 502, 615, 1117, 1214, 1214, 1212, 1212, 1212, 1212, 1212,
+ 1224, 1212, 655, 732, 736, 1221, 660, 254, 254, 338,
+ 706, 660, 338, 1221, 1344, 1117, 615, 615, 545, 125,
+ 467, 1212, 1212, 1212, 1212, 1212, 1223, 1212, 1212, 1220,
+ 1220, 1117, 559, 1220, 1220, 559, 1223, 1212, 1212, 476,
+ 1140, 138, 1224, 1212, 476, 476, 236, 260, 519, 1211,
+ 1211, 823, 1211, 218, 221, 823, 1364, 1364, 1117, 615,
+ 615, 476, 557, 282, 831, 831, 831, 831, 556, 636,
+ 637, 569, 191, 238, 271, 238, 236, 781, 1140, 333,
+ 659, 184, 107, 897, 668, 500, 689, 1218, 104, 217,
+ 260, 343, 649, 625, 215, 262, 556, 432, 500, 669,
+ 107, 1224, 755, 584, 333, 556, 233, 1212, 1178, 323,
+ 347, 769, 770, 771, 231, 774, 1364, 432, 620, 217,
+ 1234, 823, 343, 649, 694, 557, 559, 519, 657, 125,
+ 685, 625, 681, 150, 467, 688, 519, 965, 107, 688,
+ 236, 348, 556, 1364, 883, 898, 899, 1345, 1117, 231,
+ 1210, 236, 476, 918, 269, 711, 1250, 1344, 615, 557,
+ 557, 615, 615, 1212, 351, 280, 615, 847, 836, 557,
+ 1141, 236, 556, 1181, 556, 557, 559, 557, 1155, 557,
+ 505, 448, 557, 557, 557, 1140, 1140, 1140, 557, 368,
+ 1164, 557, 1101, 1102, 1145, 556, 1154, 1089, 556, 1211,
+ 1087, 348, 500, 1094, 1087, 285, 1087, 1218, 1108, 556,
+ 1108, 1344, 166, 246, 415, 556, 1071, 1072, 1073, 1074,
+ 1075, 1076, 1140, 1140, 518, 1158, 1158, 1220, 1363, 557,
+ 1037, 1378, 1018, 156, 864, 866, 199, 1140, 847, 348,
+ 847, 557, 671, 674, 350, 907, 823, 823, 870, 396,
+ 671, 556, 897, 557, 476, 435, 1029, 557, 559, 107,
+ 218, 218, 616, 795, 1224, 1212, 476, 556, 878, 907,
+ 909, 805, 556, 556, 813, 1212, 557, 556, 435, 1029,
+ 1212, 1212, 556, 556, 556, 519, 542, 985, 404, 985,
+ 985, 231, 1212, 616, 1212, 831, 642, 643, 1346, 121,
+ 165, 190, 207, 211, 232, 235, 250, 338, 388, 638,
+ 636, 1364, 878, 107, 914, 914, 1210, 782, 557, 253,
+ 556, 689, 309, 672, 264, 556, 786, 778, 556, 1210,
+ 557, 432, 98, 149, 157, 185, 240, 253, 265, 451,
+ 454, 664, 664, 1209, 1212, 1214, 557, 1040, 756, 218,
+ 177, 731, 236, 770, 418, 464, 772, 204, 775, 515,
+ 777, 1212, 107, 1252, 1040, 650, 1210, 557, 1376, 654,
+ 352, 1344, 686, 681, 685, 189, 203, 377, 1212, 130,
+ 138, 301, 1040, 823, 1095, 864, 885, 557, 559, 486,
+ 1105, 446, 446, 557, 710, 329, 504, 712, 713, 545,
+ 1251, 1212, 615, 1141, 1181, 557, 1150, 1178, 329, 538,
+ 125, 1056, 557, 559, 107, 1103, 184, 1115, 1116, 1141,
+ 147, 1211, 557, 1140, 556, 1087, 1094, 556, 557, 1108,
+ 557, 556, 436, 556, 557, 559, 1159, 1160, 1344, 505,
+ 1212, 557, 559, 334, 498, 849, 858, 615, 865, 897,
+ 556, 619, 871, 1210, 897, 669, 689, 1212, 467, 736,
+ 253, 500, 617, 435, 1029, 1212, 1181, 231, 808, 808,
+ 1181, 1181, 1140, 467, 1178, 1178, 626, 627, 1225, 822,
+ 823, 822, 823, 1211, 615, 557, 559, 549, 556, 594,
+ 644, 706, 982, 1364, 982, 333, 338, 388, 982, 982,
+ 1105, 914, 110, 258, 231, 329, 667, 556, 702, 1140,
+ 237, 367, 441, 348, 676, 677, 678, 467, 557, 1218,
+ 76, 787, 650, 680, 1212, 557, 731, 225, 807, 620,
+ 965, 1210, 523, 1086, 982, 418, 450, 776, 556, 217,
+ 731, 1040, 1014, 694, 681, 650, 680, 657, 556, 687,
+ 685, 686, 419, 419, 138, 351, 138, 694, 863, 557,
+ 892, 898, 1117, 199, 519, 519, 504, 710, 1220, 1358,
+ 1366, 80, 731, 557, 557, 557, 505, 1178, 247, 389,
+ 419, 1165, 1104, 1101, 556, 1141, 557, 559, 107, 1111,
+ 1112, 1344, 557, 1211, 1178, 557, 1178, 556, 1178, 1072,
+ 559, 107, 1040, 1105, 866, 435, 236, 689, 907, 871,
+ 872, 668, 689, 557, 782, 1212, 702, 1140, 467, 557,
+ 354, 425, 393, 809, 809, 557, 557, 557, 1212, 557,
+ 557, 557, 559, 1220, 985, 643, 594, 645, 646, 1364,
+ 1364, 338, 669, 549, 669, 1364, 1364, 204, 266, 703,
+ 557, 189, 498, 348, 678, 348, 677, 1212, 556, 557,
+ 559, 625, 432, 731, 823, 107, 107, 556, 1212, 773,
+ 1344, 1140, 778, 965, 694, 685, 625, 681, 556, 683,
+ 684, 1145, 1344, 688, 686, 687, 351, 351, 556, 261,
+ 867, 99, 275, 953, 238, 238, 1250, 119, 167, 489,
+ 1140, 1166, 1167, 1166, 1166, 557, 1108, 559, 1116, 1346,
+ 557, 559, 231, 1117, 557, 557, 557, 1071, 557, 1160,
+ 1162, 1032, 847, 516, 675, 557, 872, 672, 782, 1029,
+ 1212, 878, 125, 1029, 476, 626, 823, 557, 559, 669,
+ 418, 557, 455, 129, 329, 408, 435, 679, 679, 557,
+ 76, 432, 1212, 804, 1040, 731, 557, 1218, 1376, 686,
+ 681, 685, 1140, 557, 559, 869, 869, 687, 688, 864,
+ 556, 620, 334, 556, 948, 950, 954, 1015, 1024, 1031,
+ 1040, 878, 878, 1167, 418, 230, 375, 230, 375, 214,
+ 1168, 1168, 1168, 557, 1142, 1112, 355, 184, 333, 338,
+ 1113, 1114, 1366, 403, 1099, 557, 1105, 615, 556, 782,
+ 676, 1029, 823, 556, 646, 777, 93, 184, 338, 1212,
+ 731, 965, 556, 687, 685, 686, 557, 684, 823, 870,
+ 870, 688, 557, 866, 868, 688, 949, 950, 951, 1041,
+ 1042, 559, 559, 104, 167, 245, 329, 473, 1154, 1141,
+ 338, 1114, 1141, 556, 1140, 782, 1178, 217, 731, 779,
+ 780, 1220, 1346, 1363, 1364, 688, 686, 687, 869, 867,
+ 557, 559, 1105, 557, 560, 476, 236, 1167, 418, 356,
+ 147, 1140, 557, 557, 778, 557, 559, 687, 688, 870,
+ 620, 866, 951, 446, 446, 1111, 557, 1218, 780, 688,
+ 688, 519, 519, 557, 556, 1105, 238, 238, 779, 878,
+ 878, 557
+};
+
+ /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint16 yyr1[] =
+{
+ 0, 564, 565, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 566, 566,
+ 566, 566, 566, 566, 566, 566, 566, 566, 567, 568,
+ 569, 569, 569, 570, 570, 571, 571, 572, 572, 572,
+ 572, 572, 572, 572, 572, 572, 573, 573, 573, 573,
+ 573, 573, 574, 575, 575, 576, 576, 577, 577, 577,
+ 577, 578, 578, 578, 578, 578, 578, 579, 580, 581,
+ 581, 582, 582, 582, 582, 583, 583, 584, 584, 585,
+ 585, 585, 585, 585, 585, 586, 586, 586, 587, 587,
+ 587, 588, 588, 588, 588, 589, 589, 589, 589, 589,
+ 589, 589, 589, 589, 589, 589, 590, 590, 591, 591,
+ 592, 592, 593, 593, 593, 593, 594, 594, 594, 594,
+ 595, 595, 595, 595, 595, 595, 595, 596, 596, 596,
+ 597, 597, 598, 599, 599, 599, 599, 600, 600, 601,
+ 601, 602, 602, 603, 603, 603, 603, 603, 604, 605,
+ 605, 606, 606, 607, 608, 608, 608, 608, 608, 609,
+ 609, 609, 609, 609, 609, 609, 609, 609, 609, 609,
+ 609, 609, 609, 609, 609, 609, 609, 609, 610, 610,
+ 611, 611, 612, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 613, 613, 613, 613, 613, 613, 613, 613, 613,
+ 613, 614, 614, 615, 615, 615, 616, 616, 617, 617,
+ 618, 618, 618, 618, 619, 620, 620, 621, 621, 622,
+ 622, 622, 622, 623, 623, 624, 624, 624, 624, 625,
+ 625, 625, 625, 626, 627, 627, 628, 629, 629, 630,
+ 630, 630, 630, 631, 631, 632, 632, 633, 633, 634,
+ 634, 635, 635, 635, 636, 636, 637, 637, 638, 638,
+ 638, 638, 638, 638, 638, 638, 638, 638, 638, 638,
+ 638, 639, 639, 640, 640, 641, 641, 642, 642, 643,
+ 644, 644, 644, 644, 644, 645, 645, 646, 647, 647,
+ 647, 647, 647, 647, 648, 648, 648, 648, 648, 648,
+ 648, 648, 649, 649, 650, 650, 651, 651, 652, 652,
+ 653, 653, 653, 654, 654, 655, 656, 656, 657, 657,
+ 658, 658, 658, 658, 659, 659, 659, 659, 659, 659,
+ 659, 659, 659, 660, 660, 661, 661, 661, 661, 662,
+ 663, 663, 663, 664, 664, 664, 664, 664, 664, 664,
+ 664, 664, 665, 665, 666, 666, 666, 666, 666, 666,
+ 666, 667, 667, 668, 668, 669, 669, 670, 671, 671,
+ 672, 672, 672, 672, 673, 673, 674, 674, 675, 675,
+ 676, 676, 676, 676, 676, 677, 678, 679, 679, 679,
+ 679, 679, 680, 680, 681, 681, 682, 683, 683, 684,
+ 684, 684, 685, 685, 686, 686, 686, 687, 687, 687,
+ 687, 688, 688, 689, 689, 690, 691, 691, 692, 692,
+ 693, 694, 694, 694, 695, 695, 696, 697, 697, 698,
+ 699, 699, 700, 700, 701, 701, 702, 702, 703, 703,
+ 704, 704, 704, 704, 704, 704, 704, 704, 704, 704,
+ 704, 704, 704, 704, 705, 705, 706, 706, 706, 706,
+ 707, 707, 708, 708, 709, 709, 710, 710, 711, 711,
+ 712, 712, 713, 713, 714, 714, 715, 715, 716, 717,
+ 717, 718, 718, 719, 719, 720, 720, 721, 721, 721,
+ 721, 722, 723, 723, 724, 725, 725, 725, 725, 725,
+ 725, 725, 725, 725, 725, 725, 725, 725, 725, 725,
+ 725, 725, 725, 725, 725, 725, 725, 725, 725, 725,
+ 725, 725, 725, 726, 727, 727, 727, 727, 728, 728,
+ 729, 729, 730, 730, 731, 731, 732, 732, 733, 734,
+ 734, 735, 735, 735, 735, 736, 737, 738, 739, 739,
+ 740, 740, 741, 741, 742, 742, 743, 743, 743, 744,
+ 744, 744, 744, 745, 745, 746, 747, 747, 748, 748,
+ 749, 749, 750, 750, 751, 751, 752, 753, 754, 755,
+ 755, 756, 756, 757, 757, 758, 758, 759, 759, 760,
+ 760, 761, 761, 761, 761, 761, 762, 763, 763, 764,
+ 764, 765, 765, 765, 766, 766, 767, 767, 767, 767,
+ 767, 768, 768, 769, 769, 770, 771, 771, 772, 772,
+ 773, 774, 774, 775, 775, 776, 776, 777, 777, 778,
+ 778, 779, 779, 779, 780, 780, 780, 780, 781, 781,
+ 782, 782, 783, 783, 783, 783, 783, 783, 784, 784,
+ 785, 785, 786, 787, 787, 788, 789, 789, 789, 789,
+ 790, 791, 791, 791, 791, 791, 791, 791, 791, 791,
+ 791, 791, 791, 791, 791, 791, 791, 792, 793, 793,
+ 794, 794, 795, 795, 795, 795, 795, 795, 796, 797,
+ 797, 798, 799, 799, 800, 800, 801, 801, 801, 801,
+ 802, 802, 803, 804, 804, 805, 805, 805, 805, 805,
+ 806, 806, 807, 807, 808, 808, 808, 809, 809, 810,
+ 811, 811, 812, 812, 813, 813, 814, 814, 815, 815,
+ 816, 817, 818, 818, 818, 818, 818, 818, 818, 818,
+ 818, 818, 818, 818, 819, 819, 819, 819, 819, 819,
+ 819, 819, 819, 819, 819, 819, 819, 820, 820, 820,
+ 820, 820, 820, 820, 821, 821, 821, 822, 822, 823,
+ 823, 824, 824, 825, 825, 826, 827, 827, 827, 828,
+ 828, 828, 828, 828, 828, 828, 828, 828, 828, 828,
+ 828, 828, 828, 828, 828, 828, 828, 828, 829, 829,
+ 829, 829, 829, 829, 829, 829, 829, 829, 829, 829,
+ 829, 829, 830, 830, 830, 830, 830, 830, 830, 830,
+ 830, 830, 830, 830, 831, 831, 832, 832, 832, 832,
+ 832, 832, 832, 832, 832, 833, 833, 834, 834, 834,
+ 834, 834, 834, 835, 835, 835, 835, 835, 835, 835,
+ 835, 836, 836, 837, 837, 837, 837, 837, 837, 837,
+ 837, 837, 837, 837, 838, 838, 838, 838, 838, 838,
+ 838, 838, 838, 838, 838, 838, 838, 838, 839, 839,
+ 840, 840, 841, 842, 842, 843, 843, 843, 843, 843,
+ 844, 844, 845, 845, 845, 845, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 846, 846, 846, 846,
+ 846, 846, 846, 846, 846, 846, 847, 847, 848, 848,
+ 849, 849, 850, 851, 851, 852, 852, 853, 853, 854,
+ 855, 855, 856, 856, 856, 857, 857, 857, 858, 858,
+ 858, 858, 858, 858, 859, 859, 860, 860, 861, 861,
+ 862, 862, 863, 863, 864, 864, 865, 865, 866, 866,
+ 866, 867, 867, 868, 868, 869, 869, 870, 870, 871,
+ 871, 871, 872, 872, 872, 873, 873, 873, 873, 874,
+ 874, 875, 875, 876, 876, 877, 877, 878, 878, 878,
+ 878, 879, 879, 880, 880, 881, 881, 881, 881, 881,
+ 882, 882, 882, 882, 882, 883, 884, 885, 885, 885,
+ 886, 886, 886, 887, 888, 888, 888, 888, 889, 889,
+ 890, 891, 891, 892, 892, 893, 893, 893, 893, 893,
+ 893, 893, 893, 893, 893, 893, 893, 893, 893, 893,
+ 893, 893, 894, 894, 894, 894, 894, 895, 895, 896,
+ 896, 897, 897, 898, 899, 899, 900, 900, 900, 901,
+ 901, 902, 902, 903, 903, 903, 903, 903, 903, 904,
+ 904, 905, 905, 906, 906, 906, 906, 907, 907, 908,
+ 908, 909, 910, 911, 911, 912, 912, 913, 913, 913,
+ 914, 914, 914, 915, 916, 916, 917, 918, 918, 918,
+ 918, 919, 920, 920, 920, 920, 921, 921, 922, 922,
+ 922, 923, 923, 924, 925, 925, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 926, 926, 926, 926, 926, 926, 926, 926, 926,
+ 926, 927, 927, 928, 928, 929, 929, 929, 929, 929,
+ 929, 930, 930, 931, 931, 931, 931, 931, 931, 931,
+ 931, 931, 931, 931, 931, 931, 931, 931, 931, 931,
+ 931, 931, 931, 931, 931, 931, 931, 931, 931, 931,
+ 932, 933, 933, 934, 934, 935, 935, 935, 935, 935,
+ 936, 937, 937, 937, 937, 937, 937, 937, 937, 937,
+ 937, 937, 937, 937, 937, 937, 937, 937, 937, 937,
+ 937, 937, 937, 937, 937, 938, 939, 939, 940, 940,
+ 941, 941, 941, 941, 942, 943, 943, 944, 945, 945,
+ 945, 945, 945, 945, 946, 946, 947, 948, 948, 948,
+ 949, 949, 950, 950, 950, 950, 950, 951, 951, 952,
+ 952, 952, 952, 953, 953, 953, 954, 955, 955, 956,
+ 957, 957, 958, 958, 958, 958, 958, 958, 958, 958,
+ 958, 958, 958, 958, 958, 958, 959, 959, 959, 960,
+ 960, 960, 960, 960, 961, 961, 961, 962, 962, 963,
+ 963, 963, 964, 964, 964, 964, 965, 965, 965, 965,
+ 966, 967, 968, 968, 969, 969, 970, 970, 970, 971,
+ 971, 971, 971, 971, 971, 971, 972, 972, 973, 973,
+ 973, 974, 975, 975, 975, 975, 976, 976, 977, 978,
+ 979, 979, 980, 981, 981, 981, 981, 981, 981, 981,
+ 982, 982, 983, 984, 984, 984, 984, 984, 984, 985,
+ 985, 986, 987, 987, 987, 988, 988, 989, 989, 990,
+ 990, 991, 991, 992, 992, 993, 994, 994, 995, 995,
+ 995, 996, 996, 997, 997, 998, 998, 999, 999, 1000,
+ 1000, 1001, 1002, 1002, 1003, 1003, 1004, 1004, 1004, 1004,
+ 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1005, 1006,
+ 1006, 1007, 1008, 1008, 1009, 1009, 1009, 1010, 1010, 1011,
+ 1011, 1012, 1012, 1012, 1012, 1013, 1013, 1013, 1014, 1014,
+ 1015, 1016, 1016, 1017, 1017, 1017, 1017, 1017, 1018, 1018,
+ 1019, 1019, 1020, 1021, 1021, 1021, 1022, 1022, 1022, 1023,
+ 1023, 1024, 1025, 1025, 1026, 1027, 1027, 1028, 1028, 1028,
+ 1028, 1028, 1028, 1028, 1028, 1029, 1029, 1030, 1030, 1030,
+ 1031, 1032, 1032, 1033, 1033, 1034, 1035, 1035, 1036, 1037,
+ 1037, 1038, 1038, 1038, 1038, 1038, 1039, 1039, 1039, 1040,
+ 1040, 1041, 1041, 1042, 1042, 1042, 1042, 1042, 1042, 1042,
+ 1042, 1043, 1043, 1044, 1044, 1044, 1044, 1044, 1044, 1044,
+ 1045, 1045, 1045, 1046, 1046, 1047, 1048, 1048, 1048, 1049,
+ 1049, 1050, 1050, 1050, 1051, 1051, 1051, 1051, 1051, 1051,
+ 1051, 1051, 1051, 1052, 1052, 1053, 1053, 1053, 1054, 1054,
+ 1055, 1055, 1056, 1056, 1057, 1058, 1058, 1059, 1059, 1060,
+ 1060, 1060, 1060, 1061, 1061, 1062, 1062, 1062, 1062, 1062,
+ 1062, 1063, 1063, 1064, 1064, 1065, 1066, 1066, 1066, 1067,
+ 1067, 1068, 1068, 1069, 1069, 1070, 1070, 1071, 1071, 1072,
+ 1072, 1072, 1072, 1072, 1073, 1074, 1075, 1076, 1077, 1077,
+ 1078, 1078, 1079, 1079, 1080, 1080, 1081, 1082, 1082, 1082,
+ 1082, 1083, 1083, 1084, 1084, 1085, 1085, 1086, 1086, 1087,
+ 1087, 1087, 1087, 1087, 1087, 1087, 1087, 1087, 1087, 1088,
+ 1088, 1088, 1088, 1088, 1088, 1089, 1089, 1089, 1089, 1090,
+ 1090, 1091, 1091, 1091, 1091, 1091, 1092, 1092, 1092, 1092,
+ 1093, 1093, 1094, 1094, 1095, 1095, 1095, 1095, 1096, 1096,
+ 1097, 1097, 1097, 1098, 1099, 1099, 1100, 1100, 1101, 1102,
+ 1102, 1103, 1103, 1104, 1104, 1105, 1105, 1106, 1106, 1106,
+ 1107, 1107, 1108, 1108, 1109, 1110, 1110, 1111, 1111, 1112,
+ 1112, 1112, 1113, 1113, 1114, 1114, 1114, 1114, 1115, 1115,
+ 1116, 1116, 1117, 1117, 1117, 1117, 1117, 1117, 1118, 1118,
+ 1118, 1119, 1119, 1119, 1119, 1119, 1119, 1119, 1120, 1120,
+ 1120, 1120, 1121, 1121, 1122, 1122, 1123, 1123, 1123, 1123,
+ 1123, 1123, 1123, 1123, 1123, 1123, 1123, 1124, 1124, 1125,
+ 1125, 1126, 1126, 1127, 1128, 1129, 1129, 1130, 1130, 1131,
+ 1132, 1133, 1133, 1133, 1133, 1133, 1133, 1134, 1134, 1135,
+ 1135, 1135, 1135, 1136, 1137, 1137, 1137, 1138, 1138, 1138,
+ 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138, 1138,
+ 1138, 1139, 1139, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140, 1140,
+ 1140, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141,
+ 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141, 1141,
+ 1141, 1141, 1141, 1141, 1141, 1141, 1142, 1142, 1142, 1142,
+ 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142, 1142,
+ 1143, 1143, 1143, 1143, 1143, 1143, 1143, 1144, 1144, 1145,
+ 1145, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
+ 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
+ 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
+ 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146, 1146,
+ 1146, 1146, 1146, 1146, 1146, 1147, 1147, 1148, 1148, 1148,
+ 1148, 1149, 1150, 1150, 1151, 1151, 1152, 1152, 1153, 1153,
+ 1153, 1154, 1154, 1154, 1154, 1155, 1155, 1156, 1156, 1157,
+ 1157, 1158, 1158, 1159, 1159, 1160, 1161, 1161, 1161, 1162,
+ 1163, 1163, 1164, 1164, 1165, 1165, 1165, 1165, 1166, 1166,
+ 1167, 1167, 1167, 1167, 1167, 1168, 1168, 1168, 1168, 1168,
+ 1169, 1169, 1169, 1170, 1170, 1171, 1172, 1172, 1172, 1173,
+ 1173, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174, 1174,
+ 1174, 1174, 1174, 1175, 1175, 1176, 1176, 1177, 1177, 1177,
+ 1177, 1177, 1177, 1178, 1178, 1179, 1179, 1180, 1180, 1180,
+ 1181, 1181, 1182, 1182, 1182, 1183, 1183, 1184, 1184, 1185,
+ 1185, 1185, 1185, 1185, 1185, 1185, 1185, 1186, 1186, 1186,
+ 1186, 1187, 1187, 1188, 1189, 1189, 1190, 1190, 1190, 1190,
+ 1190, 1190, 1191, 1192, 1193, 1193, 1193, 1194, 1194, 1195,
+ 1196, 1196, 1197, 1198, 1198, 1199, 1199, 1200, 1200, 1201,
+ 1201, 1201, 1201, 1202, 1202, 1203, 1203, 1204, 1204, 1205,
+ 1205, 1206, 1206, 1207, 1207, 1208, 1208, 1208, 1208, 1209,
+ 1209, 1210, 1210, 1211, 1211, 1212, 1213, 1214, 1215, 1216,
+ 1217, 1218, 1218, 1219, 1219, 1219, 1219, 1219, 1219, 1219,
+ 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1219, 1220, 1221,
+ 1221, 1221, 1221, 1222, 1223, 1223, 1223, 1224, 1224, 1225,
+ 1225, 1225, 1225, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226, 1226,
+ 1226, 1226, 1226, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
+ 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
+ 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
+ 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
+ 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227, 1227,
+ 1227, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228,
+ 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228, 1228,
+ 1228, 1228, 1228, 1228, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229,
+ 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1229, 1230,
+ 1230, 1231, 1231, 1231, 1231, 1231, 1231, 1231, 1231, 1233,
+ 1232, 1234, 1232, 1235, 1236, 1236, 1236, 1236, 1237, 1237,
+ 1237, 1237, 1238, 1238, 1239, 1240, 1241, 1241, 1242, 1242,
+ 1242, 1243, 1243, 1244, 1244, 1245, 1245, 1246, 1246, 1246,
+ 1246, 1247, 1247, 1247, 1248, 1249, 1249, 1250, 1250, 1251,
+ 1251, 1251, 1251, 1252, 1252, 1253, 1254, 1255, 1256, 1256,
+ 1257, 1258, 1258, 1259, 1259, 1259, 1259, 1259, 1261, 1260,
+ 1262, 1263, 1264, 1264, 1265, 1265, 1265, 1265, 1266, 1266,
+ 1268, 1267, 1270, 1269, 1271, 1269, 1269, 1272, 1272, 1273,
+ 1273, 1273, 1274, 1274, 1274, 1274, 1275, 1275, 1276, 1276,
+ 1276, 1276, 1276, 1276, 1277, 1277, 1277, 1278, 1280, 1279,
+ 1281, 1282, 1281, 1283, 1283, 1284, 1284, 1285, 1285, 1286,
+ 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1286, 1287, 1287,
+ 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1287, 1288, 1288,
+ 1289, 1289, 1290, 1291, 1291, 1292, 1292, 1292, 1293, 1294,
+ 1295, 1295, 1295, 1295, 1296, 1296, 1296, 1297, 1297, 1298,
+ 1298, 1299, 1300, 1300, 1301, 1301, 1302, 1302, 1303, 1303,
+ 1304, 1305, 1305, 1306, 1306, 1306, 1307, 1307, 1307, 1307,
+ 1307, 1307, 1307, 1307, 1307, 1308, 1308, 1308, 1308, 1308,
+ 1309, 1309, 1310, 1311, 1312, 1313, 1313, 1314, 1315, 1316,
+ 1316, 1317, 1318, 1318, 1319, 1320, 1321, 1321, 1322, 1323,
+ 1324, 1324, 1325, 1326, 1326, 1326, 1326, 1326, 1327, 1327,
+ 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327, 1327,
+ 1327, 1327, 1327, 1328, 1328, 1329, 1329, 1330, 1330, 1330,
+ 1332, 1331, 1333, 1333, 1335, 1334, 1336, 1336, 1336, 1337,
+ 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1337, 1338,
+ 1338, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339,
+ 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339, 1339,
+ 1339, 1339, 1339, 1340, 1340, 1340, 1340, 1340, 1340, 1341,
+ 1341, 1341, 1341, 1341, 1341, 1341, 1342, 1343, 1343, 1343,
+ 1343, 1343, 1343, 1343, 1343, 1344, 1344, 1344, 1344, 1344,
+ 1344, 1344, 1345, 1345, 1345, 1345, 1345, 1345, 1346, 1346,
+ 1346, 1346, 1346, 1346, 1346, 1346, 1346, 1346, 1346, 1347,
+ 1347, 1347, 1347, 1347, 1348, 1348, 1348, 1348, 1349, 1349,
+ 1349, 1349, 1349, 1349, 1349, 1350, 1350, 1350, 1351, 1351,
+ 1351, 1351, 1351, 1351, 1352, 1352, 1353, 1354, 1354, 1355,
+ 1355, 1356, 1357, 1358, 1359, 1359, 1359, 1360, 1361, 1362,
+ 1363, 1364, 1365, 1366, 1366, 1367, 1367, 1368, 1368, 1368,
+ 1369, 1369, 1370, 1370, 1371, 1371, 1372, 1372, 1372, 1372,
+ 1372, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373,
+ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373,
+ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373,
+ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373,
+ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1373,
+ 1373, 1373, 1373, 1373, 1373, 1373, 1373, 1374, 1374, 1374,
+ 1374, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375, 1375,
+ 1375, 1376, 1376, 1376, 1376, 1377, 1377, 1378, 1378, 1379,
+ 1379, 1380, 1380
+};
+
+ /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
+static const yytype_uint8 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, 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, 1, 3,
+ 4, 3, 3, 2, 5, 3, 6, 4, 6, 6,
+ 5, 7, 6, 6, 5, 5, 6, 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, 4, 2, 4, 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, 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, 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, 5, 7, 1, 0, 7, 2,
+ 0, 3, 5, 5, 8, 2, 0, 2, 2, 2,
+ 1, 5, 2, 0, 2, 7, 6, 10, 6, 6,
+ 6, 6, 7, 6, 9, 9, 6, 6, 6, 7,
+ 6, 8, 8, 8, 8, 6, 6, 7, 7, 8,
+ 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, 5, 7, 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, 16,
+ 20, 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, 2, 2, 1,
+ 3, 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, 8, 9, 8, 6,
+ 6, 8, 9, 8, 9, 9, 7, 10, 1, 1,
+ 1, 1, 1, 1, 2, 1, 1, 2, 3, 3,
+ 3, 3, 2, 1, 2, 1, 3, 2, 1, 1,
+ 1, 1, 1, 1, 1, 1, 8, 8, 8, 8,
+ 8, 8, 9, 8, 8, 2, 0, 1, 2, 1,
+ 1, 1, 2, 1, 2, 2, 1, 1, 1, 1,
+ 1, 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, 7, 7, 10, 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, 8, 11, 6, 6, 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, 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, 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, 1, 3, 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, 1, 3, 1, 5, 5,
+ 6, 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, 3, 3, 2, 3,
+ 2, 5, 4, 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, 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, 1,
+ 3, 2, 1, 1, 1, 1, 0, 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, 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, 7, 1, 2, 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, 3, 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, 1, 4, 5, 4, 0, 2, 2, 2, 1,
+ 1, 0, 4, 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, 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, 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, 2,
+ 5, 6, 6, 7, 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, 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, 3, 3, 3, 2, 1, 3, 3, 0, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 3, 2, 3, 0, 3, 3, 2, 2,
+ 1, 0, 2, 2, 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, 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, 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, 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, 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
+};
+
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#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)
+
+/* Error token number */
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* 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
+
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value, Location); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+
+/*-----------------------------------.
+| Print this symbol's value on YYO. |
+`-----------------------------------*/
+
+static void
+yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ FILE *yyoutput = yyo;
+ YYUSE (yyoutput);
+ YYUSE (yylocationp);
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
+# endif
+ YYUSE (yytype);
+}
+
+
+/*---------------------------.
+| Print this symbol on YYO. |
+`---------------------------*/
+
+static void
+yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
+{
+ YYFPRINTF (yyo, "%s %s (",
+ yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
+
+ YY_LOCATION_PRINT (yyo, *yylocationp);
+ YYFPRINTF (yyo, ": ");
+ yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp);
+ YYFPRINTF (yyo, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *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 (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
+{
+ unsigned long yylno = yyrline[yyrule];
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr,
+ yystos[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)
+# define YY_SYMBOL_PRINT(Title, Type, 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
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+yystrlen (const char *yystr)
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ else
+ goto append;
+
+ append:
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
+}
+# endif
+
+/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
+ about the unexpected token YYTOKEN for the state stack whose top is
+ YYSSP.
+
+ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
+ not large enough to hold the message. In that case, also set
+ *YYMSG_ALLOC to the required number of bytes. Return 2 if the
+ required number of bytes is too large to store. */
+static int
+yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
+ yytype_int16 *yyssp, int yytoken)
+{
+ YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULLPTR;
+ /* Arguments of yyformat. */
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ /* Number of reported tokens (one for the "unexpected", one per
+ "expected"). */
+ int yycount = 0;
+
+ /* There are many possibilities here to consider:
+ - If this state is a consistent state with a default action, then
+ the only way this function was invoked is if the default action
+ is an error action. In that case, don't check for expected
+ tokens because there are none.
+ - The only way there can be no lookahead present (in yychar) is if
+ this state is a consistent state with a default action. Thus,
+ detecting the absence of a lookahead is sufficient to determine
+ that there is no unexpected or expected token to report. In that
+ case, just report a simple "syntax error".
+ - Don't assume there isn't a lookahead just because this state is a
+ consistent state with a default action. There might have been a
+ previous inconsistent state, consistent state with a non-default
+ action, or user semantic action that manipulated yychar.
+ - Of course, the expected token list depends on states to have
+ correct lookahead information, and it depends on the parser not
+ to perform extra reductions after fetching a lookahead from the
+ scanner and before detecting a syntax error. Thus, state merging
+ (from LALR or IELR) and default reductions corrupt the expected
+ token list. However, the list is correct for canonical LR with
+ one exception: it will still contain any token that will not be
+ accepted due to an error action in a later state.
+ */
+ if (yytoken != YYEMPTY)
+ {
+ int yyn = yypact[*yyssp];
+ yyarg[yycount++] = yytname[yytoken];
+ if (!yypact_value_is_default (yyn))
+ {
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. In other words, skip the first -YYN actions for
+ this state because they are default actions. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yyx;
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
+ && !yytable_value_is_error (yytable[yyx + yyn]))
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+ }
+ }
+ }
+
+ switch (yycount)
+ {
+# define YYCASE_(N, S) \
+ case N: \
+ yyformat = S; \
+ break
+ default: /* Avoid compiler warnings. */
+ YYCASE_(0, YY_("syntax error"));
+ YYCASE_(1, YY_("syntax error, unexpected %s"));
+ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
+ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
+ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
+ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
+# undef YYCASE_
+ }
+
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
+ yysize = yysize1;
+ else
+ return 2;
+ }
+
+ if (*yymsg_alloc < yysize)
+ {
+ *yymsg_alloc = 2 * yysize;
+ if (! (yysize <= *yymsg_alloc
+ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
+ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
+ return 1;
+ }
+
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ {
+ char *yyp = *yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyformat) != '\0')
+ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyformat += 2;
+ }
+ else
+ {
+ yyp++;
+ yyformat++;
+ }
+ }
+ return 0;
+}
+#endif /* YYERROR_VERBOSE */
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
+{
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ YYUSE (yytype);
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+}
+
+
+
+
+/* The lookahead symbol. */
+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)
+{
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ 'yyss': related to states.
+ 'yyvs': related to semantic values.
+ 'yyls': related to locations.
+
+ Refer to the stacks through separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
+
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken = 0;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+ YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#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;
+
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yylsp = yyls = yylsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ 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++;
+
+
+/*--------------------------------------------------------------------.
+| yynewstate -- set current state (the top of the stack) to yystate. |
+`--------------------------------------------------------------------*/
+yysetstate:
+ *yyssp = (yytype_int16) yystate;
+
+ 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. */
+ YYSIZE_T yysize = (YYSIZE_T) (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. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+ 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 * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yyls1, yysize * sizeof (*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;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (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;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ 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 YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = yylex ();
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ 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);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
+ *++yyvsp = yylval;
+ YY_IGNORE_MAYBE_UNINITIALIZED_END
+ *++yylsp = yylloc;
+ 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:
+#line 1628 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34580 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 4:
+#line 1630 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34586 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 5:
+#line 1632 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34592 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 6:
+#line 1634 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34598 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 7:
+#line 1636 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 8:
+#line 1638 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34610 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 9:
+#line 1640 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34616 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 10:
+#line 1642 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34622 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 11:
+#line 1644 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 12:
+#line 1646 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34634 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 13:
+#line 1648 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34640 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 14:
+#line 1650 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34646 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 15:
+#line 1652 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34652 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 16:
+#line 1654 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34658 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 17:
+#line 1656 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34664 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 18:
+#line 1658 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34670 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 19:
+#line 1660 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 20:
+#line 1662 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34682 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 21:
+#line 1664 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34688 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 22:
+#line 1666 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34694 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 23:
+#line 1668 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 24:
+#line 1670 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34706 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 25:
+#line 1672 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34712 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 26:
+#line 1674 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34718 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 27:
+#line 1676 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34724 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 28:
+#line 1678 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34730 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 29:
+#line 1680 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34736 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 30:
+#line 1682 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34742 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 31:
+#line 1684 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 32:
+#line 1686 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34754 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 33:
+#line 1688 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34760 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 34:
+#line 1690 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34766 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 35:
+#line 1692 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 36:
+#line 1694 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34778 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 37:
+#line 1696 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34784 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 38:
+#line 1698 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34790 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 39:
+#line 1700 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 34812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 40:
+#line 1718 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34818 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 41:
+#line 1720 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34824 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 42:
+#line 1722 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34830 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 43:
+#line 1724 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 44:
+#line 1726 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34842 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 45:
+#line 1728 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34848 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 46:
+#line 1730 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34854 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 47:
+#line 1732 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 48:
+#line 1734 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34866 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 49:
+#line 1736 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34872 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 50:
+#line 1738 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34878 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 51:
+#line 1740 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 52:
+#line 1742 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34890 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 53:
+#line 1744 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34896 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 54:
+#line 1746 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34902 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 55:
+#line 1748 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 56:
+#line 1750 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34914 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 57:
+#line 1752 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34920 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 58:
+#line 1754 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34926 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 59:
+#line 1756 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 60:
+#line 1758 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34938 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 61:
+#line 1760 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34944 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 62:
+#line 1762 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34950 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 63:
+#line 1764 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 64:
+#line 1766 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34962 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 65:
+#line 1768 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34968 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 66:
+#line 1770 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34974 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 67:
+#line 1772 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 68:
+#line 1774 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34986 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 69:
+#line 1776 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34992 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 70:
+#line 1778 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 34998 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 71:
+#line 1780 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 72:
+#line 1782 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35010 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 73:
+#line 1784 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35016 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 74:
+#line 1786 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35022 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 75:
+#line 1788 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 76:
+#line 1790 "preproc.y" /* yacc.c:1652 */
+ {
+ output_deallocate_prepare_statement((yyvsp[0].str));
+ }
+#line 35036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 77:
+#line 1794 "preproc.y" /* yacc.c:1652 */
+ { output_simple_statement((yyvsp[0].str), (strncmp((yyvsp[0].str), "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0); }
+#line 35042 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 78:
+#line 1796 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35048 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 79:
+#line 1798 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 35054 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 80:
+#line 1800 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 1, ECPGst_normal); }
+#line 35060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 81:
+#line 1802 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35066 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 82:
+#line 1804 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35072 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 83:
+#line 1806 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35078 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 84:
+#line 1808 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 85:
+#line 1810 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35090 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 86:
+#line 1812 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35096 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 87:
+#line 1814 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35102 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 88:
+#line 1816 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 89:
+#line 1818 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35114 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 90:
+#line 1820 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35120 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 91:
+#line 1822 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35126 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 92:
+#line 1824 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 93:
+#line 1826 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35138 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 94:
+#line 1828 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35165 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 95:
+#line 1851 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 96:
+#line 1853 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 1, ECPGst_normal); }
+#line 35177 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 97:
+#line 1855 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35183 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 98:
+#line 1857 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35189 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 99:
+#line 1859 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35195 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 100:
+#line 1861 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35201 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 101:
+#line 1863 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 35207 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 102:
+#line 1865 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35213 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 103:
+#line 1867 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35219 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 104:
+#line 1869 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35225 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 105:
+#line 1871 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35231 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 106:
+#line 1873 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35237 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 107:
+#line 1875 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 108:
+#line 1902 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35274 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 109:
+#line 1904 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35280 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 110:
+#line 1906 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35286 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 111:
+#line 1908 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35292 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 112:
+#line 1910 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35298 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 113:
+#line 1912 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35304 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 114:
+#line 1914 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35310 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 115:
+#line 1916 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35316 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 116:
+#line 1918 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35322 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 117:
+#line 1920 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35328 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 118:
+#line 1922 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 35334 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 119:
+#line 1924 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout, "{ ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", (yyvsp[0].str));
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 35344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 120:
+#line 1930 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35350 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 121:
+#line 1932 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 122:
+#line 1934 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 1, ECPGst_prepnormal); }
+#line 35362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 123:
+#line 1936 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35368 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 124:
+#line 1938 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35374 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 125:
+#line 1940 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 126:
+#line 1942 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35386 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 127:
+#line 1944 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_normal); }
+#line 35392 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 128:
+#line 1946 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout,"ECPGallocate_desc(__LINE__, %s);",(yyvsp[0].str));
+ whenever_action(0);
+ free((yyvsp[0].str));
+ }
+#line 35402 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 129:
+#line 1952 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35416 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 130:
+#line 1962 "preproc.y" /* yacc.c:1652 */
+ {
+ output_simple_statement((yyvsp[0].str), (strncmp((yyvsp[0].str), "ECPGset_var", strlen("ECPGset_var")) == 0) ? 4 : 0);
+ }
+#line 35424 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 131:
+#line 1966 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout,"ECPGdeallocate_desc(__LINE__, %s);",(yyvsp[0].str));
+ whenever_action(0);
+ free((yyvsp[0].str));
+ }
+#line 35434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 132:
+#line 1972 "preproc.y" /* yacc.c:1652 */
+ {
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 35442 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 133:
+#line 1976 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout, "{ ECPGdescribe(__LINE__, %d, %s,", compat, (yyvsp[0].str));
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ fprintf(base_yyout, "}");
+ output_line_number();
+
+ free((yyvsp[0].str));
+ }
+#line 35456 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 134:
+#line 1986 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35470 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 135:
+#line 1995 "preproc.y" /* yacc.c:1652 */
+ { output_statement((yyvsp[0].str), 0, ECPGst_exec_immediate); }
+#line 35476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 136:
+#line 1997 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35494 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 137:
+#line 2011 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35505 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 138:
+#line 2018 "preproc.y" /* yacc.c:1652 */
+ {
+ lookup_descriptor((yyvsp[0].str), connection);
+ output_get_descr_header((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 35515 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 139:
+#line 2024 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35530 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 140:
+#line 2035 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout, "{ ECPGsetcommit(__LINE__, \"%s\", %s);", (yyvsp[0].str), connection ? connection : "NULL");
+ whenever_action(2);
+ free((yyvsp[0].str));
+ }
+#line 35540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 141:
+#line 2041 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35553 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 142:
+#line 2050 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35564 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 143:
+#line 2057 "preproc.y" /* yacc.c:1652 */
+ {
+ lookup_descriptor((yyvsp[0].str), connection);
+ output_set_descr_header((yyvsp[0].str));
+ free((yyvsp[0].str));
+ }
+#line 35574 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 144:
+#line 2063 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 35587 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 145:
+#line 2072 "preproc.y" /* yacc.c:1652 */
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in VAR statement");
+
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 35598 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 146:
+#line 2079 "preproc.y" /* yacc.c:1652 */
+ {
+ if (connection)
+ mmerror(PARSE_ERROR, ET_ERROR, "AT option not allowed in WHENEVER statement");
+
+ output_simple_statement((yyvsp[0].str), 0);
+ }
+#line 35609 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 147:
+#line 2086 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = NULL; }
+#line 35615 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 148:
+#line 2092 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("call"),(yyvsp[0].str));
+}
+#line 35623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 149:
+#line 2100 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create role"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 150:
+#line 2108 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 35639 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 151:
+#line 2112 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 35647 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 152:
+#line 2116 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 35654 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 153:
+#line 2123 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35662 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 154:
+#line 2127 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 35669 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 155:
+#line 2134 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35677 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 156:
+#line 2138 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 35684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 157:
+#line 2145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("password"),(yyvsp[0].str));
+}
+#line 35692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 158:
+#line 2149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("password null");
+}
+#line 35700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 159:
+#line 2153 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("encrypted password"),(yyvsp[0].str));
+}
+#line 35708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 160:
+#line 2157 "preproc.y" /* yacc.c:1652 */
+ {
+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 35717 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 161:
+#line 2162 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inherit");
+}
+#line 35725 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 162:
+#line 2166 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("connection limit"),(yyvsp[0].str));
+}
+#line 35733 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 163:
+#line 2170 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("valid until"),(yyvsp[0].str));
+}
+#line 35741 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 164:
+#line 2174 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("user"),(yyvsp[0].str));
+}
+#line 35749 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 165:
+#line 2178 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 35757 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 166:
+#line 2186 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 35765 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 167:
+#line 2190 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("sysid"),(yyvsp[0].str));
+}
+#line 35773 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 168:
+#line 2194 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("admin"),(yyvsp[0].str));
+}
+#line 35781 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 169:
+#line 2198 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("role"),(yyvsp[0].str));
+}
+#line 35789 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 170:
+#line 2202 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in role"),(yyvsp[0].str));
+}
+#line 35797 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 171:
+#line 2206 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in group"),(yyvsp[0].str));
+}
+#line 35805 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 172:
+#line 2214 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create user"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35813 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 173:
+#line 2222 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter role"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35821 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 174:
+#line 2226 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter user"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35829 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 175:
+#line 2234 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 35836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 176:
+#line 2237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in database"),(yyvsp[0].str));
+}
+#line 35844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 177:
+#line 2245 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter role"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 178:
+#line 2249 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter role all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 179:
+#line 2253 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter user"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 180:
+#line 2257 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter user all"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 181:
+#line 2265 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop role"),(yyvsp[0].str));
+}
+#line 35884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 182:
+#line 2269 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop role if exists"),(yyvsp[0].str));
+}
+#line 35892 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 183:
+#line 2273 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop user"),(yyvsp[0].str));
+}
+#line 35900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 184:
+#line 2277 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop user if exists"),(yyvsp[0].str));
+}
+#line 35908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 185:
+#line 2281 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop group"),(yyvsp[0].str));
+}
+#line 35916 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 186:
+#line 2285 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop group if exists"),(yyvsp[0].str));
+}
+#line 35924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 187:
+#line 2293 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create group"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 188:
+#line 2301 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter group"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("user"),(yyvsp[0].str));
+}
+#line 35940 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 189:
+#line 2309 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("add");
+}
+#line 35948 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 190:
+#line 2313 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("drop");
+}
+#line 35956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 191:
+#line 2321 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create schema"),(yyvsp[-3].str),mm_strdup("authorization"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35964 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 192:
+#line 2325 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create schema"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 35972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 193:
+#line 2329 "preproc.y" /* yacc.c:1652 */
+ {
+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 35981 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 194:
+#line 2334 "preproc.y" /* yacc.c:1652 */
+ {
+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 35990 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 195:
+#line 2343 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 35998 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 196:
+#line 2347 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 36005 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 197:
+#line 2354 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36013 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 198:
+#line 2358 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 36020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 199:
+#line 2365 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 200:
+#line 2369 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 201:
+#line 2373 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 202:
+#line 2377 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 203:
+#line 2381 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 204:
+#line 2385 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 205:
+#line 2393 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 36076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 206:
+#line 2397 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set local"),(yyvsp[0].str));
+}
+#line 36084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 207:
+#line 2401 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set session"),(yyvsp[0].str));
+}
+#line 36092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 208:
+#line 2409 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("transaction"),(yyvsp[0].str));
+}
+#line 36100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 209:
+#line 2413 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("session characteristics as transaction"),(yyvsp[0].str));
+}
+#line 36108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 210:
+#line 2417 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 211:
+#line 2425 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 36124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 212:
+#line 2429 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 36132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 213:
+#line 2433 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("to default"));
+}
+#line 36140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 214:
+#line 2437 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("= default"));
+}
+#line 36148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 215:
+#line 2445 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 216:
+#line 2449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("from current"));
+}
+#line 36164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 217:
+#line 2453 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("time zone"),(yyvsp[0].str));
+}
+#line 36172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 218:
+#line 2457 "preproc.y" /* yacc.c:1652 */
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("catalog"),(yyvsp[0].str));
+}
+#line 36181 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 219:
+#line 2462 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 36189 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 220:
+#line 2466 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("names"),(yyvsp[0].str));
+}
+#line 36197 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 221:
+#line 2470 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("role"),(yyvsp[0].str));
+}
+#line 36205 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 222:
+#line 2474 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("session authorization"),(yyvsp[0].str));
+}
+#line 36213 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 223:
+#line 2478 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("session authorization default");
+}
+#line 36221 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 224:
+#line 2482 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("xml option"),(yyvsp[0].str));
+}
+#line 36229 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 225:
+#line 2486 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("transaction snapshot"),(yyvsp[0].str));
+}
+#line 36237 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 226:
+#line 2494 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36245 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 227:
+#line 2498 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 36253 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 228:
+#line 2506 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36261 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 229:
+#line 2510 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 36269 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 230:
+#line 2518 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36277 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 231:
+#line 2522 "preproc.y" /* yacc.c:1652 */
+ {
+ if ((yyvsp[0].str)[0] == '$')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36291 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 232:
+#line 2536 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("read uncommitted");
+}
+#line 36299 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 233:
+#line 2540 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("read committed");
+}
+#line 36307 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 234:
+#line 2544 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("repeatable read");
+}
+#line 36315 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 235:
+#line 2548 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("serializable");
+}
+#line 36323 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 236:
+#line 2556 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 36331 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 237:
+#line 2560 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 36339 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 238:
+#line 2564 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("on");
+}
+#line 36347 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 239:
+#line 2568 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36355 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 240:
+#line 2576 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36363 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 241:
+#line 2580 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36371 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 242:
+#line 2584 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36379 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 243:
+#line 2588 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 36387 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 244:
+#line 2592 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36395 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 245:
+#line 2596 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 36403 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 246:
+#line 2600 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("local");
+}
+#line 36411 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 247:
+#line 2608 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36419 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 248:
+#line 2612 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 36427 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 249:
+#line 2616 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 36434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 250:
+#line 2623 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36442 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 251:
+#line 2627 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36450 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 252:
+#line 2635 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 36458 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 253:
+#line 2643 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36466 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 254:
+#line 2647 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("time zone");
+}
+#line 36474 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 255:
+#line 2651 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("transaction isolation level");
+}
+#line 36482 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 256:
+#line 2655 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("session authorization");
+}
+#line 36490 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 257:
+#line 2663 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36498 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 258:
+#line 2667 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 36506 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 259:
+#line 2675 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 36514 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 260:
+#line 2679 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36522 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 261:
+#line 2687 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 36530 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 262:
+#line 2691 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36538 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 263:
+#line 2699 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("show"),(yyvsp[-1].str));
+}
+#line 36546 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 264:
+#line 2703 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("show time zone");
+}
+#line 36554 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 265:
+#line 2707 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("show transaction isolation level");
+}
+#line 36562 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 266:
+#line 2711 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("show session authorization");
+}
+#line 36570 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 267:
+#line 2715 "preproc.y" /* yacc.c:1652 */
+ {
+ mmerror(PARSE_ERROR, ET_ERROR, "SHOW ALL is not implemented");
+ (yyval.str) = EMPTY;
+ }
+#line 36579 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 268:
+#line 2724 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("set constraints"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36587 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 269:
+#line 2732 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 36595 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 270:
+#line 2736 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36603 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 271:
+#line 2744 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deferred");
+}
+#line 36611 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 272:
+#line 2748 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("immediate");
+}
+#line 36619 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 273:
+#line 2756 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("checkpoint");
+}
+#line 36627 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 274:
+#line 2764 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("discard all");
+}
+#line 36635 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 275:
+#line 2768 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("discard temp");
+}
+#line 36643 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 276:
+#line 2772 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("discard temporary");
+}
+#line 36651 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 277:
+#line 2776 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("discard plans");
+}
+#line 36659 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 278:
+#line 2780 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("discard sequences");
+}
+#line 36667 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 279:
+#line 2788 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36675 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 280:
+#line 2792 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36683 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 281:
+#line 2796 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36691 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 282:
+#line 2800 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter table if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36699 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 283:
+#line 2804 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36707 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 284:
+#line 2808 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36715 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 285:
+#line 2812 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter index"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36723 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 286:
+#line 2816 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter index if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36731 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 287:
+#line 2820 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter index"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36739 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 288:
+#line 2824 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36747 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 289:
+#line 2828 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36755 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 290:
+#line 2832 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36763 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 291:
+#line 2836 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36771 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 292:
+#line 2840 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter view"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36779 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 293:
+#line 2844 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter view if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36787 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 294:
+#line 2848 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter materialized view"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36795 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 295:
+#line 2852 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter materialized view if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36803 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 296:
+#line 2856 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36811 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 297:
+#line 2860 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36819 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 298:
+#line 2868 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 36827 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 299:
+#line 2872 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 36835 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 300:
+#line 2880 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("attach partition"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36843 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 301:
+#line 2884 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("detach partition"),(yyvsp[0].str));
+}
+#line 36851 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 302:
+#line 2892 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("attach partition"),(yyvsp[0].str));
+}
+#line 36859 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 303:
+#line 2900 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add"),(yyvsp[0].str));
+}
+#line 36867 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 304:
+#line 2904 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add if not exists"),(yyvsp[0].str));
+}
+#line 36875 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 305:
+#line 2908 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add column"),(yyvsp[0].str));
+}
+#line 36883 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 306:
+#line 2912 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add column if not exists"),(yyvsp[0].str));
+}
+#line 36891 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 307:
+#line 2916 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36899 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 308:
+#line 2920 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("drop not null"));
+}
+#line 36907 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 309:
+#line 2924 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set not null"));
+}
+#line 36915 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 310:
+#line 2928 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("drop expression"));
+}
+#line 36923 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 311:
+#line 2932 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("drop expression if exists"));
+}
+#line 36931 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 312:
+#line 2936 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 36939 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 313:
+#line 2940 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 36947 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 314:
+#line 2944 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 36955 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 315:
+#line 2948 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 36963 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 316:
+#line 2952 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("set storage"),(yyvsp[0].str));
+}
+#line 36971 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 317:
+#line 2956 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 36979 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 318:
+#line 2960 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 36987 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 319:
+#line 2964 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("drop identity"));
+}
+#line 36995 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 320:
+#line 2968 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("drop identity if exists"));
+}
+#line 37003 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 321:
+#line 2972 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-4].str),mm_strdup("if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37011 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 322:
+#line 2976 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37019 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 323:
+#line 2980 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 37027 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 324:
+#line 2984 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37035 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 325:
+#line 2988 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add"),(yyvsp[0].str));
+}
+#line 37043 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 326:
+#line 2992 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37051 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 327:
+#line 2996 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("validate constraint"),(yyvsp[0].str));
+}
+#line 37059 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 328:
+#line 3000 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop constraint if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37067 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 329:
+#line 3004 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37075 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 330:
+#line 3008 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set without oids");
+}
+#line 37083 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 331:
+#line 3012 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cluster on"),(yyvsp[0].str));
+}
+#line 37091 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 332:
+#line 3016 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set without cluster");
+}
+#line 37099 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 333:
+#line 3020 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set logged");
+}
+#line 37107 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 334:
+#line 3024 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set unlogged");
+}
+#line 37115 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 335:
+#line 3028 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable trigger"),(yyvsp[0].str));
+}
+#line 37123 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 336:
+#line 3032 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable always trigger"),(yyvsp[0].str));
+}
+#line 37131 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 337:
+#line 3036 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable replica trigger"),(yyvsp[0].str));
+}
+#line 37139 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 338:
+#line 3040 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable trigger all");
+}
+#line 37147 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 339:
+#line 3044 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable trigger user");
+}
+#line 37155 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 340:
+#line 3048 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("disable trigger"),(yyvsp[0].str));
+}
+#line 37163 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 341:
+#line 3052 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("disable trigger all");
+}
+#line 37171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 342:
+#line 3056 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("disable trigger user");
+}
+#line 37179 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 343:
+#line 3060 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable rule"),(yyvsp[0].str));
+}
+#line 37187 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 344:
+#line 3064 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable always rule"),(yyvsp[0].str));
+}
+#line 37195 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 345:
+#line 3068 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("enable replica rule"),(yyvsp[0].str));
+}
+#line 37203 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 346:
+#line 3072 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("disable rule"),(yyvsp[0].str));
+}
+#line 37211 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 347:
+#line 3076 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("inherit"),(yyvsp[0].str));
+}
+#line 37219 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 348:
+#line 3080 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("no inherit"),(yyvsp[0].str));
+}
+#line 37227 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 349:
+#line 3084 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("of"),(yyvsp[0].str));
+}
+#line 37235 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 350:
+#line 3088 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not of");
+}
+#line 37243 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 351:
+#line 3092 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 37251 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 352:
+#line 3096 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set tablespace"),(yyvsp[0].str));
+}
+#line 37259 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 353:
+#line 3100 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 37267 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 354:
+#line 3104 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 37275 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 355:
+#line 3108 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("replica identity"),(yyvsp[0].str));
+}
+#line 37283 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 356:
+#line 3112 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable row level security");
+}
+#line 37291 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 357:
+#line 3116 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("disable row level security");
+}
+#line 37299 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 358:
+#line 3120 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("force row level security");
+}
+#line 37307 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 359:
+#line 3124 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no force row level security");
+}
+#line 37315 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 360:
+#line 3128 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37323 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 361:
+#line 3136 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set default"),(yyvsp[0].str));
+}
+#line 37331 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 362:
+#line 3140 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("drop default");
+}
+#line 37339 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 363:
+#line 3148 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 37347 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 364:
+#line 3152 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 37355 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 365:
+#line 3156 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 366:
+#line 3163 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 37370 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 367:
+#line 3167 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37377 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 368:
+#line 3174 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 37385 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 369:
+#line 3178 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37392 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 370:
+#line 3185 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 37400 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 371:
+#line 3189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 37408 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 372:
+#line 3193 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 37416 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 373:
+#line 3197 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using index"),(yyvsp[0].str));
+}
+#line 37424 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 374:
+#line 3205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 37432 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 375:
+#line 3213 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 37440 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 376:
+#line 3217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37447 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 377:
+#line 3224 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37455 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 378:
+#line 3228 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 37463 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 379:
+#line 3236 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 37471 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 380:
+#line 3240 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37479 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 381:
+#line 3244 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("."),(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 37487 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 382:
+#line 3248 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 37495 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 383:
+#line 3256 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37503 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 384:
+#line 3260 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37511 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 385:
+#line 3268 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 37519 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 386:
+#line 3272 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("restart"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37527 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 387:
+#line 3276 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 37535 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 388:
+#line 3280 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set generated"),(yyvsp[0].str));
+}
+#line 37543 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 389:
+#line 3288 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("for values with ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 37551 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 390:
+#line 3292 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("for values in ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 37559 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 391:
+#line 3296 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("for values from ("),(yyvsp[-5].str),mm_strdup(") to ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 37567 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 392:
+#line 3300 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 37575 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 393:
+#line 3308 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37583 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 394:
+#line 3316 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37591 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 395:
+#line 3320 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 37599 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 396:
+#line 3328 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter type"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37607 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 397:
+#line 3336 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37615 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 398:
+#line 3340 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 37623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 399:
+#line 3348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("add attribute"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 400:
+#line 3352 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop attribute if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37639 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 401:
+#line 3356 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop attribute"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37647 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 402:
+#line 3360 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 37655 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 403:
+#line 3368 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ (yyval.str) = cat2_str(mm_strdup("close"), cursor_marker);
+ }
+#line 37664 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 404:
+#line 3373 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("close all");
+}
+#line 37672 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 405:
+#line 3381 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 37684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 406:
+#line 3389 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 37692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 407:
+#line 3397 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("from");
+}
+#line 37700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 408:
+#line 3401 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("to");
+}
+#line 37708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 409:
+#line 3409 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("program");
+}
+#line 37716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 410:
+#line 3413 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37723 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 411:
+#line 3420 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37731 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 412:
+#line 3424 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stdin");
+}
+#line 37739 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 413:
+#line 3428 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stdout");
+}
+#line 37747 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 414:
+#line 3436 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37755 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 415:
+#line 3440 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 37763 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 416:
+#line 3448 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37771 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 417:
+#line 3452 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37778 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 418:
+#line 3459 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 37786 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 419:
+#line 3463 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 37794 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 420:
+#line 3467 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("delimiter"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37802 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 421:
+#line 3471 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("null"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37810 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 422:
+#line 3475 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("csv");
+}
+#line 37818 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 423:
+#line 3479 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("header");
+}
+#line 37826 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 424:
+#line 3483 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("quote"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37834 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 425:
+#line 3487 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("escape"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37842 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 426:
+#line 3491 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("force quote"),(yyvsp[0].str));
+}
+#line 37850 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 427:
+#line 3495 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("force quote *");
+}
+#line 37858 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 428:
+#line 3499 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("force not null"),(yyvsp[0].str));
+}
+#line 37866 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 429:
+#line 3503 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("force null"),(yyvsp[0].str));
+}
+#line 37874 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 430:
+#line 3507 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("encoding"),(yyvsp[0].str));
+}
+#line 37882 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 431:
+#line 3515 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 37890 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 432:
+#line 3519 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37897 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 433:
+#line 3526 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("delimiters"),(yyvsp[0].str));
+}
+#line 37905 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 434:
+#line 3530 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37912 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 435:
+#line 3537 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("using");
+}
+#line 37920 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 436:
+#line 3541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37927 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 437:
+#line 3548 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37935 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 438:
+#line 3552 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 37943 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 439:
+#line 3560 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 37951 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 440:
+#line 3568 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37959 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 441:
+#line 3572 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37967 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 442:
+#line 3576 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("*");
+}
+#line 37975 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 443:
+#line 3580 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 37983 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 444:
+#line 3584 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 37990 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 445:
+#line 3591 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 37998 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 446:
+#line 3595 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38006 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 447:
+#line 3603 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38014 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 448:
+#line 3611 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38022 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 449:
+#line 3615 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38030 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 450:
+#line 3619 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38038 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 451:
+#line 3623 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38046 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 452:
+#line 3627 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38054 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 453:
+#line 3631 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38062 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 454:
+#line 3639 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("temporary");
+}
+#line 38070 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 455:
+#line 3643 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("temp");
+}
+#line 38078 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 456:
+#line 3647 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("local temporary");
+}
+#line 38086 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 457:
+#line 3651 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("local temp");
+}
+#line 38094 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 458:
+#line 3655 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("global temporary");
+}
+#line 38102 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 459:
+#line 3659 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("global temp");
+}
+#line 38110 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 460:
+#line 3663 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 38118 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 461:
+#line 3667 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38125 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 462:
+#line 3674 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38133 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 463:
+#line 3678 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 464:
+#line 3685 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 465:
+#line 3689 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38155 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 466:
+#line 3696 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38163 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 467:
+#line 3700 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 468:
+#line 3708 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38179 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 469:
+#line 3712 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38187 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 470:
+#line 3720 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38195 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 471:
+#line 3724 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38203 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 472:
+#line 3728 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38211 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 473:
+#line 3736 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38219 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 474:
+#line 3740 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38227 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 475:
+#line 3748 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38235 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 476:
+#line 3756 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38243 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 477:
+#line 3760 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("with options"),(yyvsp[0].str));
+}
+#line 38251 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 478:
+#line 3768 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38259 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 479:
+#line 3772 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38266 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 480:
+#line 3779 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38274 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 481:
+#line 3783 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38282 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 482:
+#line 3787 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38290 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 483:
+#line 3791 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 38298 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 484:
+#line 3799 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not null");
+}
+#line 38306 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 485:
+#line 3803 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 38314 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 486:
+#line 3807 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("unique"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38322 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 487:
+#line 3811 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("primary key"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38330 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 488:
+#line 3815 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("check ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 38338 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 489:
+#line 3819 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("default"),(yyvsp[0].str));
+}
+#line 38346 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 490:
+#line 3823 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("generated"),(yyvsp[-3].str),mm_strdup("as identity"),(yyvsp[0].str));
+}
+#line 38354 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 491:
+#line 3827 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("generated"),(yyvsp[-5].str),mm_strdup("as ("),(yyvsp[-2].str),mm_strdup(") stored"));
+}
+#line 38362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 492:
+#line 3831 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("references"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38370 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 493:
+#line 3839 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("always");
+}
+#line 38378 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 494:
+#line 3843 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("by default");
+}
+#line 38386 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 495:
+#line 3851 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 38394 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 496:
+#line 3855 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not deferrable");
+}
+#line 38402 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 497:
+#line 3859 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("initially deferred");
+}
+#line 38410 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 498:
+#line 3863 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("initially immediate");
+}
+#line 38418 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 499:
+#line 3871 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("like"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38426 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 500:
+#line 3879 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("including"),(yyvsp[0].str));
+}
+#line 38434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 501:
+#line 3883 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("excluding"),(yyvsp[0].str));
+}
+#line 38442 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 502:
+#line 3887 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38449 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 503:
+#line 3894 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("comments");
+}
+#line 38457 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 504:
+#line 3898 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("constraints");
+}
+#line 38465 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 505:
+#line 3902 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("defaults");
+}
+#line 38473 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 506:
+#line 3906 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("identity");
+}
+#line 38481 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 507:
+#line 3910 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("generated");
+}
+#line 38489 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 508:
+#line 3914 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("indexes");
+}
+#line 38497 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 509:
+#line 3918 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 38505 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 510:
+#line 3922 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("storage");
+}
+#line 38513 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 511:
+#line 3926 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 38521 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 512:
+#line 3934 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38529 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 513:
+#line 3938 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38537 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 514:
+#line 3946 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("check ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 38545 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 515:
+#line 3950 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38553 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 516:
+#line 3954 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("unique"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38561 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 517:
+#line 3958 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38569 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 518:
+#line 3962 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("primary key"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38577 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 519:
+#line 3966 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38585 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 520:
+#line 3970 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 38593 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 521:
+#line 3978 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no inherit");
+}
+#line 38601 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 522:
+#line 3982 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38608 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 523:
+#line 3989 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38616 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 524:
+#line 3993 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 525:
+#line 4000 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 526:
+#line 4004 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38639 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 527:
+#line 4012 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38647 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 528:
+#line 4020 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("include ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38655 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 529:
+#line 4024 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38662 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 530:
+#line 4031 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("match full");
+}
+#line 38670 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 531:
+#line 4035 "preproc.y" /* yacc.c:1652 */
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = mm_strdup("match partial");
+}
+#line 38679 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 532:
+#line 4040 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("match simple");
+}
+#line 38687 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 533:
+#line 4044 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38694 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 534:
+#line 4051 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38702 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 535:
+#line 4055 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38710 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 536:
+#line 4063 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("with"),(yyvsp[0].str));
+}
+#line 38718 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 537:
+#line 4067 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-5].str),mm_strdup("with operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38726 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 538:
+#line 4075 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("where ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38734 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 539:
+#line 4079 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38741 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 540:
+#line 4086 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38749 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 541:
+#line 4090 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38757 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 542:
+#line 4094 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38765 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 543:
+#line 4098 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38773 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 544:
+#line 4102 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 545:
+#line 4109 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on update"),(yyvsp[0].str));
+}
+#line 38788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 546:
+#line 4117 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on delete"),(yyvsp[0].str));
+}
+#line 38796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 547:
+#line 4125 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no action");
+}
+#line 38804 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 548:
+#line 4129 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 38812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 549:
+#line 4133 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 38820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 550:
+#line 4137 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set null");
+}
+#line 38828 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 551:
+#line 4141 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set default");
+}
+#line 38836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 552:
+#line 4149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("inherits ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 553:
+#line 4153 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38851 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 554:
+#line 4160 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38859 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 555:
+#line 4164 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38866 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 556:
+#line 4171 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("partition by"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 38874 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 557:
+#line 4179 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 38882 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 558:
+#line 4183 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 38890 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 559:
+#line 4191 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38898 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 560:
+#line 4195 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38906 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 561:
+#line 4199 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(")"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 38914 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 562:
+#line 4207 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 38922 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 563:
+#line 4211 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38929 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 564:
+#line 4218 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 38937 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 565:
+#line 4222 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("without oids");
+}
+#line 38945 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 566:
+#line 4226 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38952 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 567:
+#line 4233 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("on commit drop");
+}
+#line 38960 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 568:
+#line 4237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("on commit delete rows");
+}
+#line 38968 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 569:
+#line 4241 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("on commit preserve rows");
+}
+#line 38976 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 570:
+#line 4245 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38983 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 571:
+#line 4252 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("tablespace"),(yyvsp[0].str));
+}
+#line 38991 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 572:
+#line 4256 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 38998 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 573:
+#line 4263 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using index tablespace"),(yyvsp[0].str));
+}
+#line 39006 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 574:
+#line 4267 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39013 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 575:
+#line 4274 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using index"),(yyvsp[0].str));
+}
+#line 39021 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 576:
+#line 4282 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39029 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 577:
+#line 4286 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39037 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 578:
+#line 4294 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 39045 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 579:
+#line 4298 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics if exists"),(yyvsp[-3].str),mm_strdup("set statistics"),(yyvsp[0].str));
+}
+#line 39053 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 580:
+#line 4306 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39061 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 581:
+#line 4314 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with data");
+}
+#line 39069 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 582:
+#line 4318 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with no data");
+}
+#line 39077 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 583:
+#line 4322 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 584:
+#line 4329 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 585:
+#line 4333 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 586:
+#line 4341 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 587:
+#line 4349 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 39116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 588:
+#line 4353 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39123 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 589:
+#line 4360 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("refresh materialized view"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39131 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 590:
+#line 4368 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create"),(yyvsp[-3].str),mm_strdup("sequence"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39139 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 591:
+#line 4372 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create"),(yyvsp[-6].str),mm_strdup("sequence if not exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39147 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 592:
+#line 4380 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39155 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 593:
+#line 4384 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter sequence if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39163 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 594:
+#line 4392 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 595:
+#line 4396 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39178 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 596:
+#line 4403 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39186 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 597:
+#line 4407 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39193 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 598:
+#line 4414 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39201 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 599:
+#line 4418 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39209 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 600:
+#line 4426 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 39217 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 601:
+#line 4430 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cache"),(yyvsp[0].str));
+}
+#line 39225 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 602:
+#line 4434 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cycle");
+}
+#line 39233 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 603:
+#line 4438 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no cycle");
+}
+#line 39241 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 604:
+#line 4442 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("increment"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39249 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 605:
+#line 4446 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("maxvalue"),(yyvsp[0].str));
+}
+#line 39257 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 606:
+#line 4450 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("minvalue"),(yyvsp[0].str));
+}
+#line 39265 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 607:
+#line 4454 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no maxvalue");
+}
+#line 39273 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 608:
+#line 4458 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no minvalue");
+}
+#line 39281 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 609:
+#line 4462 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("owned by"),(yyvsp[0].str));
+}
+#line 39289 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 610:
+#line 4466 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("sequence name"),(yyvsp[0].str));
+}
+#line 39297 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 611:
+#line 4470 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("start"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39305 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 612:
+#line 4474 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 39313 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 613:
+#line 4478 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("restart"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39321 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 614:
+#line 4486 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("by");
+}
+#line 39329 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 615:
+#line 4490 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39336 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 616:
+#line 4497 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 617:
+#line 4501 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 39352 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 618:
+#line 4505 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 39360 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 619:
+#line 4509 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39368 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 620:
+#line 4517 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39376 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 621:
+#line 4521 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39384 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 622:
+#line 4529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("language"),(yyvsp[0].str));
+}
+#line 39392 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 623:
+#line 4533 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39400 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 624:
+#line 4541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("trusted");
+}
+#line 39408 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 625:
+#line 4545 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39415 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 626:
+#line 4552 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39423 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 627:
+#line 4556 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39431 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 628:
+#line 4564 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("inline"),(yyvsp[0].str));
+}
+#line 39439 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 629:
+#line 4568 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39446 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 630:
+#line 4575 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("validator"),(yyvsp[0].str));
+}
+#line 39454 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 631:
+#line 4579 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no validator");
+}
+#line 39462 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 632:
+#line 4587 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39470 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 633:
+#line 4591 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39477 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 634:
+#line 4598 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-3].str),mm_strdup("language"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39485 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 635:
+#line 4602 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-5].str),mm_strdup("language if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39493 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 636:
+#line 4610 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("procedural");
+}
+#line 39501 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 637:
+#line 4614 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39508 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 638:
+#line 4621 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 639:
+#line 4629 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("owner"),(yyvsp[0].str));
+}
+#line 39524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 640:
+#line 4633 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39531 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 641:
+#line 4640 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop tablespace"),(yyvsp[0].str));
+}
+#line 39539 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 642:
+#line 4644 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop tablespace if exists"),(yyvsp[0].str));
+}
+#line 39547 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 643:
+#line 4652 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create extension"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39555 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 644:
+#line 4656 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create extension if not exists"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39563 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 645:
+#line 4664 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39571 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 646:
+#line 4668 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39578 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 647:
+#line 4675 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 39586 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 648:
+#line 4679 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("version"),(yyvsp[0].str));
+}
+#line 39594 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 649:
+#line 4683 "preproc.y" /* yacc.c:1652 */
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 39603 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 650:
+#line 4688 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 39611 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 651:
+#line 4696 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter extension"),(yyvsp[-2].str),mm_strdup("update"),(yyvsp[0].str));
+}
+#line 39619 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 652:
+#line 4704 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39627 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 653:
+#line 4708 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39634 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 654:
+#line 4715 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to"),(yyvsp[0].str));
+}
+#line 39642 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 655:
+#line 4723 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("access method"),(yyvsp[0].str));
+}
+#line 39650 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 656:
+#line 4727 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("aggregate"),(yyvsp[0].str));
+}
+#line 39658 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 657:
+#line 4731 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39666 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 658:
+#line 4735 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("collation"),(yyvsp[0].str));
+}
+#line 39674 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 659:
+#line 4739 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("conversion"),(yyvsp[0].str));
+}
+#line 39682 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 660:
+#line 4743 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("domain"),(yyvsp[0].str));
+}
+#line 39690 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 661:
+#line 4747 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("function"),(yyvsp[0].str));
+}
+#line 39698 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 662:
+#line 4751 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("alter extension"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("language"),(yyvsp[0].str));
+}
+#line 39706 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 663:
+#line 4755 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("operator"),(yyvsp[0].str));
+}
+#line 39714 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 664:
+#line 4759 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39722 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 665:
+#line 4763 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39730 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 666:
+#line 4767 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("procedure"),(yyvsp[0].str));
+}
+#line 39738 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 667:
+#line 4771 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("routine"),(yyvsp[0].str));
+}
+#line 39746 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 668:
+#line 4775 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 39754 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 669:
+#line 4779 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("event trigger"),(yyvsp[0].str));
+}
+#line 39762 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 670:
+#line 4783 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("table"),(yyvsp[0].str));
+}
+#line 39770 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 671:
+#line 4787 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("text search parser"),(yyvsp[0].str));
+}
+#line 39778 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 672:
+#line 4791 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("text search dictionary"),(yyvsp[0].str));
+}
+#line 39786 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 673:
+#line 4795 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("text search template"),(yyvsp[0].str));
+}
+#line 39794 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 674:
+#line 4799 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("text search configuration"),(yyvsp[0].str));
+}
+#line 39802 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 675:
+#line 4803 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("sequence"),(yyvsp[0].str));
+}
+#line 39810 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 676:
+#line 4807 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("view"),(yyvsp[0].str));
+}
+#line 39818 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 677:
+#line 4811 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("materialized view"),(yyvsp[0].str));
+}
+#line 39826 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 678:
+#line 4815 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("foreign table"),(yyvsp[0].str));
+}
+#line 39834 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 679:
+#line 4819 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("foreign data wrapper"),(yyvsp[0].str));
+}
+#line 39842 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 680:
+#line 4823 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("server"),(yyvsp[0].str));
+}
+#line 39850 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 681:
+#line 4827 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 39858 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 682:
+#line 4831 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter extension"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("type"),(yyvsp[0].str));
+}
+#line 39866 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 683:
+#line 4839 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create foreign data wrapper"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39874 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 684:
+#line 4847 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("handler"),(yyvsp[0].str));
+}
+#line 39882 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 685:
+#line 4851 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no handler");
+}
+#line 39890 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 686:
+#line 4855 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("validator"),(yyvsp[0].str));
+}
+#line 39898 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 687:
+#line 4859 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no validator");
+}
+#line 39906 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 688:
+#line 4867 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39914 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 689:
+#line 4871 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39922 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 690:
+#line 4879 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39930 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 691:
+#line 4883 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39937 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 692:
+#line 4890 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign data wrapper"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39945 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 693:
+#line 4894 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter foreign data wrapper"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 39953 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 694:
+#line 4902 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("options ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39961 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 695:
+#line 4906 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 39968 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 696:
+#line 4913 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 39976 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 697:
+#line 4917 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 39984 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 698:
+#line 4925 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("options ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 39992 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 699:
+#line 4933 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40000 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 700:
+#line 4937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40008 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 701:
+#line 4945 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40016 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 702:
+#line 4949 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("set"),(yyvsp[0].str));
+}
+#line 40024 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 703:
+#line 4953 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("add"),(yyvsp[0].str));
+}
+#line 40032 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 704:
+#line 4957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop"),(yyvsp[0].str));
+}
+#line 40040 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 705:
+#line 4965 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40048 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 706:
+#line 4973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40056 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 707:
+#line 4981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40064 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 708:
+#line 4989 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40072 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 709:
+#line 4993 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40080 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 710:
+#line 5001 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("type"),(yyvsp[0].str));
+}
+#line 40088 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 711:
+#line 5005 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40095 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 712:
+#line 5012 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("version"),(yyvsp[0].str));
+}
+#line 40103 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 713:
+#line 5016 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("version null");
+}
+#line 40111 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 714:
+#line 5024 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40119 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 715:
+#line 5028 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40126 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 716:
+#line 5035 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter server"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40134 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 717:
+#line 5039 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40142 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 718:
+#line 5043 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40150 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 719:
+#line 5051 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40158 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 720:
+#line 5055 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40166 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 721:
+#line 5059 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40174 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 722:
+#line 5063 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40182 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 723:
+#line 5071 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter foreign table"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40190 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 724:
+#line 5075 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter foreign table if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40198 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 725:
+#line 5083 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40206 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 726:
+#line 5091 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("limit to");
+}
+#line 40214 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 727:
+#line 5095 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("except");
+}
+#line 40222 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 728:
+#line 5103 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40230 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 729:
+#line 5107 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40237 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 730:
+#line 5114 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create user mapping for"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40245 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 731:
+#line 5118 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40253 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 732:
+#line 5126 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40261 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 733:
+#line 5130 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 40269 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 734:
+#line 5138 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop user mapping for"),(yyvsp[-2].str),mm_strdup("server"),(yyvsp[0].str));
+}
+#line 40277 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 735:
+#line 5142 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop user mapping if exists for"),(yyvsp[-2].str),mm_strdup("server"),(yyvsp[0].str));
+}
+#line 40285 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 736:
+#line 5150 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter user mapping for"),(yyvsp[-3].str),mm_strdup("server"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40293 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 737:
+#line 5158 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40301 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 738:
+#line 5166 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40309 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 739:
+#line 5174 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("using ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40317 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 740:
+#line 5178 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 741:
+#line 5185 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("with check ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 742:
+#line 5189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40339 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 743:
+#line 5196 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to"),(yyvsp[0].str));
+}
+#line 40347 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 744:
+#line 5200 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40354 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 745:
+#line 5207 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to"),(yyvsp[0].str));
+}
+#line 40362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 746:
+#line 5211 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40369 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 747:
+#line 5218 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 40377 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 748:
+#line 5222 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40384 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 749:
+#line 5229 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for"),(yyvsp[0].str));
+}
+#line 40392 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 750:
+#line 5233 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40399 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 751:
+#line 5240 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 40407 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 752:
+#line 5244 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 40415 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 753:
+#line 5248 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 40423 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 754:
+#line 5252 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 40431 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 755:
+#line 5256 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 40439 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 756:
+#line 5264 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40447 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 757:
+#line 5272 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 40455 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 758:
+#line 5276 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 40463 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 759:
+#line 5284 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(15,mm_strdup("create 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 40471 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 760:
+#line 5288 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(16,mm_strdup("create 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 40479 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 761:
+#line 5296 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("before");
+}
+#line 40487 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 762:
+#line 5300 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("after");
+}
+#line 40495 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 763:
+#line 5304 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("instead of");
+}
+#line 40503 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 764:
+#line 5312 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40511 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 765:
+#line 5316 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("or"),(yyvsp[0].str));
+}
+#line 40519 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 766:
+#line 5324 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 40527 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 767:
+#line 5328 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 40535 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 768:
+#line 5332 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 40543 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 769:
+#line 5336 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("update of"),(yyvsp[0].str));
+}
+#line 40551 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 770:
+#line 5340 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("truncate");
+}
+#line 40559 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 771:
+#line 5348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("referencing"),(yyvsp[0].str));
+}
+#line 40567 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 772:
+#line 5352 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40574 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 773:
+#line 5359 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40582 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 774:
+#line 5363 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40590 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 775:
+#line 5371 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40598 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 776:
+#line 5379 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("new");
+}
+#line 40606 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 777:
+#line 5383 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("old");
+}
+#line 40614 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 778:
+#line 5391 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 40622 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 779:
+#line 5395 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 40630 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 780:
+#line 5403 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40638 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 781:
+#line 5411 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("for"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40646 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 782:
+#line 5415 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40653 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 783:
+#line 5422 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("each");
+}
+#line 40661 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 784:
+#line 5426 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40668 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 785:
+#line 5433 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 40676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 786:
+#line 5437 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("statement");
+}
+#line 40684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 787:
+#line 5445 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("when ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 788:
+#line 5449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40699 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 789:
+#line 5456 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("function");
+}
+#line 40707 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 790:
+#line 5460 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("procedure");
+}
+#line 40715 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 791:
+#line 5468 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40723 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 792:
+#line 5472 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 40731 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 793:
+#line 5476 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40738 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 794:
+#line 5483 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40746 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 795:
+#line 5487 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40754 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 796:
+#line 5491 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40762 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 797:
+#line 5495 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40770 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 798:
+#line 5503 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 40778 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 799:
+#line 5507 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40785 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 800:
+#line 5514 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 40792 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 801:
+#line 5517 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40800 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 802:
+#line 5525 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not deferrable");
+}
+#line 40808 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 803:
+#line 5529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 40816 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 804:
+#line 5533 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("initially immediate");
+}
+#line 40824 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 805:
+#line 5537 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("initially deferred");
+}
+#line 40832 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 806:
+#line 5541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not valid");
+}
+#line 40840 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 807:
+#line 5545 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no inherit");
+}
+#line 40848 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 808:
+#line 5553 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40856 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 809:
+#line 5557 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 40864 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 810:
+#line 5565 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 40872 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 811:
+#line 5569 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 40880 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 812:
+#line 5577 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup("in ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 40888 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 813:
+#line 5585 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sconst");
+}
+#line 40896 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 814:
+#line 5589 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup(", sconst"));
+}
+#line 40904 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 815:
+#line 5597 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter event trigger"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40912 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 816:
+#line 5605 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable");
+}
+#line 40920 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 817:
+#line 5609 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable replica");
+}
+#line 40928 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 818:
+#line 5613 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable always");
+}
+#line 40936 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 819:
+#line 5617 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("disable");
+}
+#line 40944 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 820:
+#line 5625 "preproc.y" /* yacc.c:1652 */
+ {
+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 40953 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 821:
+#line 5634 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create"),(yyvsp[-4].str),mm_strdup("aggregate"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40961 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 822:
+#line 5638 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create"),(yyvsp[-3].str),mm_strdup("aggregate"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40969 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 823:
+#line 5642 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create operator"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40977 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 824:
+#line 5646 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create type"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 40985 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 825:
+#line 5650 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("create type"),(yyvsp[0].str));
+}
+#line 40993 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 826:
+#line 5654 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create type"),(yyvsp[-4].str),mm_strdup("as ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41001 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 827:
+#line 5658 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create type"),(yyvsp[-5].str),mm_strdup("as enum ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41009 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 828:
+#line 5662 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create type"),(yyvsp[-3].str),mm_strdup("as range"),(yyvsp[0].str));
+}
+#line 41017 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 829:
+#line 5666 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search parser"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41025 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 830:
+#line 5670 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search dictionary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41033 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 831:
+#line 5674 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search template"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41041 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 832:
+#line 5678 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create text search configuration"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41049 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 833:
+#line 5682 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create collation"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41057 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 834:
+#line 5686 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("create collation if not exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41065 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 835:
+#line 5690 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create collation"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 41073 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 836:
+#line 5694 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create collation if not exists"),(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 41081 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 837:
+#line 5702 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41089 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 838:
+#line 5710 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41097 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 839:
+#line 5714 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41105 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 840:
+#line 5722 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 41113 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 841:
+#line 5726 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41121 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 842:
+#line 5734 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41129 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 843:
+#line 5738 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41137 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 844:
+#line 5742 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41145 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 845:
+#line 5746 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41153 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 846:
+#line 5750 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41161 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 847:
+#line 5754 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("none");
+}
+#line 41169 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 848:
+#line 5762 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41177 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 849:
+#line 5770 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41185 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 850:
+#line 5774 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41193 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 851:
+#line 5782 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 41201 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 852:
+#line 5790 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41209 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 853:
+#line 5794 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41216 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 854:
+#line 5801 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41224 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 855:
+#line 5805 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41232 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 856:
+#line 5813 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter type"),(yyvsp[-4].str),mm_strdup("add value"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41240 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 857:
+#line 5817 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41248 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 858:
+#line 5821 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41256 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 859:
+#line 5825 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41264 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 860:
+#line 5833 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("if not exists");
+}
+#line 41272 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 861:
+#line 5837 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41279 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 862:
+#line 5844 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41287 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 863:
+#line 5852 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41295 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 864:
+#line 5856 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41303 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 865:
+#line 5864 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("operator"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41311 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 866:
+#line 5868 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("operator"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41319 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 867:
+#line 5872 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("function"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41327 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 868:
+#line 5876 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("function"),(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 41335 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 869:
+#line 5880 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("storage"),(yyvsp[0].str));
+}
+#line 41343 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 870:
+#line 5888 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 41351 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 871:
+#line 5892 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41358 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 872:
+#line 5899 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("family"),(yyvsp[0].str));
+}
+#line 41366 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 873:
+#line 5903 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41373 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 874:
+#line 5910 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for search");
+}
+#line 41381 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 875:
+#line 5914 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for order by"),(yyvsp[0].str));
+}
+#line 41389 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 876:
+#line 5918 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41396 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 877:
+#line 5925 "preproc.y" /* yacc.c:1652 */
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = mm_strdup("recheck");
+}
+#line 41405 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 878:
+#line 5930 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41412 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 879:
+#line 5937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create operator family"),(yyvsp[-2].str),mm_strdup("using"),(yyvsp[0].str));
+}
+#line 41420 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 880:
+#line 5945 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41428 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 881:
+#line 5949 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41436 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 882:
+#line 5957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 883:
+#line 5961 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41452 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 884:
+#line 5969 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("operator"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41460 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 885:
+#line 5973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("function"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 41468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 886:
+#line 5981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop operator class"),(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 887:
+#line 5985 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41484 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 888:
+#line 5993 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop operator family"),(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41492 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 889:
+#line 5997 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41500 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 890:
+#line 6005 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop owned by"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41508 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 891:
+#line 6013 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("reassign owned by"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 41516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 892:
+#line 6021 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-4].str),mm_strdup("if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 893:
+#line 6025 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41532 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 894:
+#line 6029 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("drop"),(yyvsp[-4].str),mm_strdup("if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 895:
+#line 6033 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("drop"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 896:
+#line 6037 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("drop"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("on"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41556 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 897:
+#line 6041 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41564 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 898:
+#line 6045 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop type"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 899:
+#line 6049 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop type if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41580 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 900:
+#line 6053 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop domain"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41588 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 901:
+#line 6057 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop domain if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 902:
+#line 6061 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop index concurrently"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 903:
+#line 6065 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop index concurrently if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41612 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 904:
+#line 6073 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 41620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 905:
+#line 6077 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 41628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 906:
+#line 6081 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 41636 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 907:
+#line 6085 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("materialized view");
+}
+#line 41644 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 908:
+#line 6089 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 41652 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 909:
+#line 6093 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("foreign table");
+}
+#line 41660 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 910:
+#line 6097 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("collation");
+}
+#line 41668 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 911:
+#line 6101 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("conversion");
+}
+#line 41676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 912:
+#line 6105 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 41684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 913:
+#line 6109 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search parser");
+}
+#line 41692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 914:
+#line 6113 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search dictionary");
+}
+#line 41700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 915:
+#line 6117 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search template");
+}
+#line 41708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 916:
+#line 6121 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search configuration");
+}
+#line 41716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 917:
+#line 6129 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("access method");
+}
+#line 41724 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 918:
+#line 6133 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("event trigger");
+}
+#line 41732 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 919:
+#line 6137 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("extension");
+}
+#line 41740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 920:
+#line 6141 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("foreign data wrapper");
+}
+#line 41748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 921:
+#line 6145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 41756 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 922:
+#line 6149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 41764 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 923:
+#line 6153 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("server");
+}
+#line 41772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 924:
+#line 6161 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("policy");
+}
+#line 41780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 925:
+#line 6165 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rule");
+}
+#line 41788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 926:
+#line 6169 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("trigger");
+}
+#line 41796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 927:
+#line 6177 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41804 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 928:
+#line 6181 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 929:
+#line 6189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 930:
+#line 6193 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41828 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 931:
+#line 6201 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("."),(yyvsp[0].str));
+}
+#line 41836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 932:
+#line 6205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 41844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 933:
+#line 6213 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 41852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 934:
+#line 6217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 41860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 935:
+#line 6225 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("truncate"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 41868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 936:
+#line 6233 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("continue identity");
+}
+#line 41876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 937:
+#line 6237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restart identity");
+}
+#line 41884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 938:
+#line 6241 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 41891 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 939:
+#line 6248 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("comment on"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41899 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 940:
+#line 6252 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("comment on"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41907 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 941:
+#line 6256 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on type"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41915 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 942:
+#line 6260 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on domain"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41923 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 943:
+#line 6264 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on aggregate"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41931 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 944:
+#line 6268 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on function"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41939 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 945:
+#line 6272 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on operator"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41947 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 946:
+#line 6276 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41955 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 947:
+#line 6280 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 41963 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 948:
+#line 6284 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on policy"),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41971 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 949:
+#line 6288 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on procedure"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41979 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 950:
+#line 6292 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on routine"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41987 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 951:
+#line 6296 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on rule"),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 41995 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 952:
+#line 6300 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42003 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 953:
+#line 6304 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("comment on trigger"),(yyvsp[-4].str),mm_strdup("on"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 42011 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 954:
+#line 6308 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42019 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 955:
+#line 6312 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42027 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 956:
+#line 6316 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("comment on large object"),(yyvsp[-2].str),mm_strdup("is"),(yyvsp[0].str));
+}
+#line 42035 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 957:
+#line 6320 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42043 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 958:
+#line 6328 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 42051 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 959:
+#line 6332 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 42059 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 960:
+#line 6336 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 42067 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 961:
+#line 6340 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 42075 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 962:
+#line 6344 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 42083 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 963:
+#line 6348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 42091 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 964:
+#line 6352 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("materialized view");
+}
+#line 42099 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 965:
+#line 6356 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("collation");
+}
+#line 42107 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 966:
+#line 6360 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("conversion");
+}
+#line 42115 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 967:
+#line 6364 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("foreign table");
+}
+#line 42123 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 968:
+#line 6368 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search configuration");
+}
+#line 42131 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 969:
+#line 6372 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search dictionary");
+}
+#line 42139 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 970:
+#line 6376 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search parser");
+}
+#line 42147 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 971:
+#line 6380 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text search template");
+}
+#line 42155 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 972:
+#line 6388 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("access method");
+}
+#line 42163 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 973:
+#line 6392 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 42171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 974:
+#line 6396 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("event trigger");
+}
+#line 42179 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 975:
+#line 6400 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("extension");
+}
+#line 42187 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 976:
+#line 6404 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("foreign data wrapper");
+}
+#line 42195 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 977:
+#line 6408 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("language"));
+}
+#line 42203 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 978:
+#line 6412 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 42211 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 979:
+#line 6416 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("role");
+}
+#line 42219 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 980:
+#line 6420 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 42227 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 981:
+#line 6424 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("server");
+}
+#line 42235 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 982:
+#line 6428 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("subscription");
+}
+#line 42243 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 983:
+#line 6432 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 42251 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 984:
+#line 6440 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42259 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 985:
+#line 6444 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 42267 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 986:
+#line 6452 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42275 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 987:
+#line 6456 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42283 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 988:
+#line 6460 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42291 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 989:
+#line 6464 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42299 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 990:
+#line 6468 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42307 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 991:
+#line 6472 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42315 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 992:
+#line 6476 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42323 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 993:
+#line 6480 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42331 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 994:
+#line 6484 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42339 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 995:
+#line 6492 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for"),(yyvsp[0].str));
+}
+#line 42347 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 996:
+#line 6496 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 42354 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 997:
+#line 6503 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 42362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 998:
+#line 6507 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("foreign table");
+}
+#line 42370 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 999:
+#line 6511 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 42378 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1000:
+#line 6515 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 42386 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1001:
+#line 6519 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 42394 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1002:
+#line 6523 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("materialized view");
+}
+#line 42402 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1003:
+#line 6531 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 42410 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1004:
+#line 6535 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("event trigger");
+}
+#line 42418 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1005:
+#line 6539 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("language"));
+}
+#line 42426 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1006:
+#line 6543 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 42434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1007:
+#line 6547 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("role");
+}
+#line 42442 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1008:
+#line 6551 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 42450 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1009:
+#line 6555 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("subscription");
+}
+#line 42458 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1010:
+#line 6559 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 42466 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1011:
+#line 6567 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42474 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1012:
+#line 6571 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 42482 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1013:
+#line 6579 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("fetch"),(yyvsp[0].str));
+}
+#line 42490 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1014:
+#line 6583 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("move"),(yyvsp[0].str));
+}
+#line 42498 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1015:
+#line 6587 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat2_str(mm_strdup("fetch"), (yyvsp[-1].str));
+ }
+#line 42506 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1016:
+#line 6591 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ add_additional_variables((yyvsp[-1].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("fetch forward"), cursor_marker);
+ }
+#line 42516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1017:
+#line 6597 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ add_additional_variables((yyvsp[-1].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("fetch forward from"), cursor_marker);
+ }
+#line 42526 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1018:
+#line 6603 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ add_additional_variables((yyvsp[-1].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("fetch backward"), cursor_marker);
+ }
+#line 42536 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1019:
+#line 6609 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[-1].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[-1].str);
+ add_additional_variables((yyvsp[-1].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
+ }
+#line 42546 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1020:
+#line 6615 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ add_additional_variables((yyvsp[0].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("move forward"), cursor_marker);
+ }
+#line 42556 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1021:
+#line 6621 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ add_additional_variables((yyvsp[0].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("move forward from"), cursor_marker);
+ }
+#line 42566 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1022:
+#line 6627 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ add_additional_variables((yyvsp[0].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("move backward"), cursor_marker);
+ }
+#line 42576 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1023:
+#line 6633 "preproc.y" /* yacc.c:1652 */
+ {
+ char *cursor_marker = (yyvsp[0].str)[0] == ':' ? mm_strdup("$0") : (yyvsp[0].str);
+ add_additional_variables((yyvsp[0].str), false);
+ (yyval.str) = cat_str(2, mm_strdup("move backward from"), cursor_marker);
+ }
+#line 42586 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1024:
+#line 6643 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ if ((yyvsp[0].str)[0] == ':')
+ {
+ free((yyvsp[0].str));
+ (yyvsp[0].str) = mm_strdup("$0");
+ }
+
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42601 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1025:
+#line 6654 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42616 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1026:
+#line 6665 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1027:
+#line 6676 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42646 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1028:
+#line 6687 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42661 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1029:
+#line 6698 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1030:
+#line 6709 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42696 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1031:
+#line 6725 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1032:
+#line 6741 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42736 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1033:
+#line 6757 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42751 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1034:
+#line 6768 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42771 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1035:
+#line 6784 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42786 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1036:
+#line 6795 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42806 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1037:
+#line 6811 "preproc.y" /* yacc.c:1652 */
+ {
+ add_additional_variables((yyvsp[0].str), false);
+ 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 42821 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1038:
+#line 6826 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("from");
+}
+#line 42829 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1039:
+#line 6830 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 42837 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1040:
+#line 6838 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42845 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1041:
+#line 6842 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 42852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1042:
+#line 6849 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1043:
+#line 6857 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1044:
+#line 6861 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 42876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1045:
+#line 6869 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1046:
+#line 6873 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 42892 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1047:
+#line 6877 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all privileges");
+}
+#line 42900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1048:
+#line 6881 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("all ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1049:
+#line 6885 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("all privileges ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 42916 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1050:
+#line 6893 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1051:
+#line 6897 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 42932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1052:
+#line 6905 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("select"),(yyvsp[0].str));
+}
+#line 42940 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1053:
+#line 6909 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("references"),(yyvsp[0].str));
+}
+#line 42948 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1054:
+#line 6913 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("create"),(yyvsp[0].str));
+}
+#line 42956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1055:
+#line 6917 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 42964 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1056:
+#line 6925 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 42972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1057:
+#line 6929 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("table"),(yyvsp[0].str));
+}
+#line 42980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1058:
+#line 6933 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("sequence"),(yyvsp[0].str));
+}
+#line 42988 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1059:
+#line 6937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("foreign data wrapper"),(yyvsp[0].str));
+}
+#line 42996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1060:
+#line 6941 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("foreign server"),(yyvsp[0].str));
+}
+#line 43004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1061:
+#line 6945 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("function"),(yyvsp[0].str));
+}
+#line 43012 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1062:
+#line 6949 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("procedure"),(yyvsp[0].str));
+}
+#line 43020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1063:
+#line 6953 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("routine"),(yyvsp[0].str));
+}
+#line 43028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1064:
+#line 6957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("database"),(yyvsp[0].str));
+}
+#line 43036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1065:
+#line 6961 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("domain"),(yyvsp[0].str));
+}
+#line 43044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1066:
+#line 6965 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("language"),(yyvsp[0].str));
+}
+#line 43052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1067:
+#line 6969 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("large object"),(yyvsp[0].str));
+}
+#line 43060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1068:
+#line 6973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("schema"),(yyvsp[0].str));
+}
+#line 43068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1069:
+#line 6977 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("tablespace"),(yyvsp[0].str));
+}
+#line 43076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1070:
+#line 6981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("type"),(yyvsp[0].str));
+}
+#line 43084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1071:
+#line 6985 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all tables in schema"),(yyvsp[0].str));
+}
+#line 43092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1072:
+#line 6989 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all sequences in schema"),(yyvsp[0].str));
+}
+#line 43100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1073:
+#line 6993 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all functions in schema"),(yyvsp[0].str));
+}
+#line 43108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1074:
+#line 6997 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all procedures in schema"),(yyvsp[0].str));
+}
+#line 43116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1075:
+#line 7001 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("all routines in schema"),(yyvsp[0].str));
+}
+#line 43124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1076:
+#line 7009 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1077:
+#line 7013 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1078:
+#line 7021 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1079:
+#line 7025 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("group"),(yyvsp[0].str));
+}
+#line 43156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1080:
+#line 7033 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with grant option");
+}
+#line 43164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1081:
+#line 7037 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1082:
+#line 7044 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("grant"),(yyvsp[-4].str),mm_strdup("to"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43179 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1083:
+#line 7052 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("revoke"),(yyvsp[-4].str),mm_strdup("from"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43187 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1084:
+#line 7056 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 43195 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1085:
+#line 7064 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with admin option");
+}
+#line 43203 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1086:
+#line 7068 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43210 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1087:
+#line 7075 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("granted by"),(yyvsp[0].str));
+}
+#line 43218 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1088:
+#line 7079 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43225 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1089:
+#line 7086 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter default privileges"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43233 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1090:
+#line 7094 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43241 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1091:
+#line 7098 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43248 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1092:
+#line 7105 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("in schema"),(yyvsp[0].str));
+}
+#line 43256 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1093:
+#line 7109 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for role"),(yyvsp[0].str));
+}
+#line 43264 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1094:
+#line 7113 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for user"),(yyvsp[0].str));
+}
+#line 43272 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1095:
+#line 7121 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 43280 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1096:
+#line 7125 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 43288 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1097:
+#line 7129 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 43296 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1098:
+#line 7137 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tables");
+}
+#line 43304 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1099:
+#line 7141 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("functions");
+}
+#line 43312 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1100:
+#line 7145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("routines");
+}
+#line 43320 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1101:
+#line 7149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sequences");
+}
+#line 43328 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1102:
+#line 7153 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("types");
+}
+#line 43336 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1103:
+#line 7157 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schemas");
+}
+#line 43344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1104:
+#line 7165 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 43352 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1105:
+#line 7169 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 43360 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1106:
+#line 7177 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unique");
+}
+#line 43368 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1107:
+#line 7181 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43375 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1108:
+#line 7188 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("concurrently");
+}
+#line 43383 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1109:
+#line 7192 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43390 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1110:
+#line 7199 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43398 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1111:
+#line 7203 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43405 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1112:
+#line 7210 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 43413 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1113:
+#line 7214 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43420 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1114:
+#line 7221 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43428 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1115:
+#line 7225 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43436 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1116:
+#line 7233 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1117:
+#line 7237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43452 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1118:
+#line 7245 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43460 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1119:
+#line 7249 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1120:
+#line 7253 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 43476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1121:
+#line 7261 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("include ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43484 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1122:
+#line 7265 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43491 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1123:
+#line 7272 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43499 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1124:
+#line 7276 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43507 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1125:
+#line 7284 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 43515 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1126:
+#line 7288 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43522 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1127:
+#line 7295 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43530 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1128:
+#line 7299 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43537 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1129:
+#line 7306 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("asc");
+}
+#line 43545 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1130:
+#line 7310 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("desc");
+}
+#line 43553 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1131:
+#line 7314 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1132:
+#line 7321 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nulls first");
+}
+#line 43568 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1133:
+#line 7325 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nulls last");
+}
+#line 43576 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1134:
+#line 7329 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43583 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1135:
+#line 7336 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(8,mm_strdup("create"),(yyvsp[-6].str),mm_strdup("function"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("returns"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43591 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1136:
+#line 7340 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(9,mm_strdup("create"),(yyvsp[-9].str),mm_strdup("function"),(yyvsp[-7].str),(yyvsp[-6].str),mm_strdup("returns table ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 43599 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1137:
+#line 7344 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create"),(yyvsp[-4].str),mm_strdup("function"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43607 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1138:
+#line 7348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("create"),(yyvsp[-4].str),mm_strdup("procedure"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43615 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1139:
+#line 7356 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("or replace");
+}
+#line 43623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1140:
+#line 7360 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 43630 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1141:
+#line 7367 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43638 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1142:
+#line 7371 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("( )");
+}
+#line 43646 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1143:
+#line 7379 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43654 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1144:
+#line 7383 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43662 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1145:
+#line 7391 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43670 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1146:
+#line 7395 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43678 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1147:
+#line 7403 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43686 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1148:
+#line 7407 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43694 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1149:
+#line 7411 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43702 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1150:
+#line 7415 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43710 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1151:
+#line 7423 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43718 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1152:
+#line 7427 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("( )");
+}
+#line 43726 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1153:
+#line 7435 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43734 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1154:
+#line 7439 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43742 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1155:
+#line 7447 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43750 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1156:
+#line 7451 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43758 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1157:
+#line 7455 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43766 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1158:
+#line 7459 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43774 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1159:
+#line 7463 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43782 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1160:
+#line 7471 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 43790 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1161:
+#line 7475 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("out");
+}
+#line 43798 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1162:
+#line 7479 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inout");
+}
+#line 43806 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1163:
+#line 7483 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("in out");
+}
+#line 43814 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1164:
+#line 7487 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("variadic");
+}
+#line 43822 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1165:
+#line 7495 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43830 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1166:
+#line 7503 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43838 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1167:
+#line 7511 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43846 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1168:
+#line 7515 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("% type"));
+}
+#line 43854 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1169:
+#line 7519 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("setof"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("% type"));
+}
+#line 43862 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1170:
+#line 7527 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43870 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1171:
+#line 7531 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("default"),(yyvsp[0].str));
+}
+#line 43878 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1172:
+#line 7535 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 43886 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1173:
+#line 7543 "preproc.y" /* yacc.c:1652 */
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43895 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1174:
+#line 7552 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("( * )");
+}
+#line 43903 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1175:
+#line 7556 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43911 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1176:
+#line 7560 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("( order by"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43919 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1177:
+#line 7564 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-4].str),mm_strdup("order by"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 43927 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1178:
+#line 7572 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43935 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1179:
+#line 7576 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43943 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1180:
+#line 7584 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43951 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1181:
+#line 7592 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43959 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1182:
+#line 7596 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 43967 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1183:
+#line 7604 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 43975 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1184:
+#line 7608 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 43983 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1185:
+#line 7616 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("called on null input");
+}
+#line 43991 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1186:
+#line 7620 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("returns null on null input");
+}
+#line 43999 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1187:
+#line 7624 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("strict");
+}
+#line 44007 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1188:
+#line 7628 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("immutable");
+}
+#line 44015 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1189:
+#line 7632 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stable");
+}
+#line 44023 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1190:
+#line 7636 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("volatile");
+}
+#line 44031 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1191:
+#line 7640 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("external security definer");
+}
+#line 44039 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1192:
+#line 7644 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("external security invoker");
+}
+#line 44047 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1193:
+#line 7648 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("security definer");
+}
+#line 44055 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1194:
+#line 7652 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("security invoker");
+}
+#line 44063 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1195:
+#line 7656 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("leakproof");
+}
+#line 44071 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1196:
+#line 7660 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not leakproof");
+}
+#line 44079 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1197:
+#line 7664 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cost"),(yyvsp[0].str));
+}
+#line 44087 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1198:
+#line 7668 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("rows"),(yyvsp[0].str));
+}
+#line 44095 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1199:
+#line 7672 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("support"),(yyvsp[0].str));
+}
+#line 44103 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1200:
+#line 7676 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44111 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1201:
+#line 7680 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("parallel"),(yyvsp[0].str));
+}
+#line 44119 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1202:
+#line 7688 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 44127 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1203:
+#line 7692 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("language"),(yyvsp[0].str));
+}
+#line 44135 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1204:
+#line 7696 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("transform"),(yyvsp[0].str));
+}
+#line 44143 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1205:
+#line 7700 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("window");
+}
+#line 44151 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1206:
+#line 7704 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44159 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1207:
+#line 7712 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44167 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1208:
+#line 7716 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 44175 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1209:
+#line 7724 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for type"),(yyvsp[0].str));
+}
+#line 44183 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1210:
+#line 7728 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup(", for type"),(yyvsp[0].str));
+}
+#line 44191 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1211:
+#line 7736 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 44199 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1212:
+#line 7740 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 44206 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1213:
+#line 7747 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44214 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1214:
+#line 7755 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44222 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1215:
+#line 7759 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 44230 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1216:
+#line 7767 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44238 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1217:
+#line 7771 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44246 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1218:
+#line 7775 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44254 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1219:
+#line 7783 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44262 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1220:
+#line 7787 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44270 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1221:
+#line 7795 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 44278 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1222:
+#line 7799 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 44285 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1223:
+#line 7806 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop function"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44293 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1224:
+#line 7810 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop function if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44301 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1225:
+#line 7814 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop procedure"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44309 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1226:
+#line 7818 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop procedure if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44317 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1227:
+#line 7822 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop routine"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44325 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1228:
+#line 7826 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop routine if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44333 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1229:
+#line 7834 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop aggregate"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44341 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1230:
+#line 7838 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop aggregate if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44349 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1231:
+#line 7846 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop operator"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44357 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1232:
+#line 7850 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop operator if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44365 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1233:
+#line 7858 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 44373 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1234:
+#line 7862 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 44381 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1235:
+#line 7866 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("( none ,"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 44389 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1236:
+#line 7870 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-3].str),mm_strdup(", none )"));
+}
+#line 44397 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1237:
+#line 7878 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44405 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1238:
+#line 7882 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("."),(yyvsp[0].str));
+}
+#line 44413 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1239:
+#line 7890 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44421 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1240:
+#line 7894 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 44429 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1241:
+#line 7902 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44437 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1242:
+#line 7910 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("do"),(yyvsp[0].str));
+}
+#line 44445 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1243:
+#line 7918 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44453 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1244:
+#line 7922 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44461 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1245:
+#line 7930 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44469 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1246:
+#line 7934 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("language"),(yyvsp[0].str));
+}
+#line 44477 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1247:
+#line 7942 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44485 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1248:
+#line 7946 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44493 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1249:
+#line 7950 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44501 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1250:
+#line 7958 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("as implicit");
+}
+#line 44509 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1251:
+#line 7962 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("as assignment");
+}
+#line 44517 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1252:
+#line 7966 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 44524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1253:
+#line 7973 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44532 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1254:
+#line 7981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("if exists");
+}
+#line 44540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1255:
+#line 7985 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 44547 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1256:
+#line 7992 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44555 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1257:
+#line 8000 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("from sql with function"),(yyvsp[-6].str),mm_strdup(", to sql with function"),(yyvsp[0].str));
+}
+#line 44563 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1258:
+#line 8004 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("to sql with function"),(yyvsp[-6].str),mm_strdup(", from sql with function"),(yyvsp[0].str));
+}
+#line 44571 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1259:
+#line 8008 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from sql with function"),(yyvsp[0].str));
+}
+#line 44579 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1260:
+#line 8012 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("to sql with function"),(yyvsp[0].str));
+}
+#line 44587 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1261:
+#line 8020 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44595 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1262:
+#line 8028 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("reindex"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44603 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1263:
+#line 8032 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("reindex"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44611 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1264:
+#line 8036 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("reindex ("),(yyvsp[-4].str),mm_strdup(")"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44619 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1265:
+#line 8040 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("reindex ("),(yyvsp[-4].str),mm_strdup(")"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 44627 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1266:
+#line 8048 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 44635 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1267:
+#line 8052 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 44643 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1268:
+#line 8060 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 44651 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1269:
+#line 8064 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 44659 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1270:
+#line 8068 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 44667 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1271:
+#line 8076 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 44675 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1272:
+#line 8080 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 44683 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1273:
+#line 8088 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("verbose");
+}
+#line 44691 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1274:
+#line 8096 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 44699 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1275:
+#line 8100 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-2].str),mm_strdup("reset"),(yyvsp[0].str));
+}
+#line 44707 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1276:
+#line 8108 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter aggregate"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44715 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1277:
+#line 8112 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter collation"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44723 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1278:
+#line 8116 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter conversion"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44731 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1279:
+#line 8120 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44739 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1280:
+#line 8124 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44747 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1281:
+#line 8128 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44755 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1282:
+#line 8132 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign data wrapper"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44763 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1283:
+#line 8136 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44771 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1284:
+#line 8140 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter group"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44779 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1285:
+#line 8144 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44787 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1286:
+#line 8148 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44795 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1287:
+#line 8152 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44803 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1288:
+#line 8156 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44811 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1289:
+#line 8160 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44819 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1290:
+#line 8164 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44827 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1291:
+#line 8168 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44835 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1292:
+#line 8172 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44843 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1293:
+#line 8176 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter schema"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44851 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1294:
+#line 8180 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter server"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44859 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1295:
+#line 8184 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44867 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1296:
+#line 8188 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44875 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1297:
+#line 8192 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44883 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1298:
+#line 8196 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44891 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1299:
+#line 8200 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44899 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1300:
+#line 8204 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44907 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1301:
+#line 8208 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44915 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1302:
+#line 8212 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44923 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1303:
+#line 8216 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44931 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1304:
+#line 8220 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter index"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44939 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1305:
+#line 8224 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter index if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44947 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1306:
+#line 8228 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44955 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1307:
+#line 8232 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table if exists"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 44963 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1308:
+#line 8236 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44971 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1309:
+#line 8240 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44979 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1310:
+#line 8244 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44987 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1311:
+#line 8248 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 44995 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1312:
+#line 8252 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45003 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1313:
+#line 8256 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45011 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1314:
+#line 8260 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45019 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1315:
+#line 8264 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45027 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1316:
+#line 8268 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45035 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1317:
+#line 8272 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45043 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1318:
+#line 8276 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45051 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1319:
+#line 8280 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45059 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1320:
+#line 8284 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter event trigger"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45067 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1321:
+#line 8288 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter role"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45075 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1322:
+#line 8292 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter user"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45083 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1323:
+#line 8296 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45091 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1324:
+#line 8300 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45099 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1325:
+#line 8304 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search parser"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45107 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1326:
+#line 8308 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search dictionary"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45115 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1327:
+#line 8312 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search template"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45123 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1328:
+#line 8316 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45131 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1329:
+#line 8320 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter type"),(yyvsp[-3].str),mm_strdup("rename to"),(yyvsp[0].str));
+}
+#line 45139 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1330:
+#line 8324 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45147 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1331:
+#line 8332 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 45155 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1332:
+#line 8336 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 45162 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1333:
+#line 8343 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set data");
+}
+#line 45170 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1334:
+#line 8347 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 45177 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1335:
+#line 8354 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter function"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 45185 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1336:
+#line 8358 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter procedure"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 45193 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1337:
+#line 8362 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter routine"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 45201 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1338:
+#line 8366 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45209 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1339:
+#line 8370 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45217 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1340:
+#line 8374 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter index"),(yyvsp[-5].str),(yyvsp[-4].str),mm_strdup("depends on extension"),(yyvsp[0].str));
+}
+#line 45225 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1341:
+#line 8382 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no");
+}
+#line 45233 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1342:
+#line 8386 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 45240 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1343:
+#line 8393 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter aggregate"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45248 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1344:
+#line 8397 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter collation"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45256 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1345:
+#line 8401 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter conversion"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45264 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1346:
+#line 8405 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45272 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1347:
+#line 8409 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter extension"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45280 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1348:
+#line 8413 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45288 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1349:
+#line 8417 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter operator"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45296 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1350:
+#line 8421 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45304 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1351:
+#line 8425 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45312 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1352:
+#line 8429 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45320 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1353:
+#line 8433 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45328 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1354:
+#line 8437 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45336 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1355:
+#line 8441 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter table if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1356:
+#line 8445 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45352 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1357:
+#line 8449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search parser"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45360 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1358:
+#line 8453 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search dictionary"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45368 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1359:
+#line 8457 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search template"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45376 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1360:
+#line 8461 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45384 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1361:
+#line 8465 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45392 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1362:
+#line 8469 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter sequence if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45400 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1363:
+#line 8473 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45408 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1364:
+#line 8477 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter view if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45416 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1365:
+#line 8481 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45424 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1366:
+#line 8485 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter materialized view if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45432 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1367:
+#line 8489 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45440 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1368:
+#line 8493 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign table if exists"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45448 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1369:
+#line 8497 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter type"),(yyvsp[-3].str),mm_strdup("set schema"),(yyvsp[0].str));
+}
+#line 45456 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1370:
+#line 8505 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter operator"),(yyvsp[-4].str),mm_strdup("set ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45464 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1371:
+#line 8513 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45472 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1372:
+#line 8517 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45480 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1373:
+#line 8525 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("= none"));
+}
+#line 45488 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1374:
+#line 8529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 45496 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1375:
+#line 8537 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45504 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1376:
+#line 8541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45512 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1377:
+#line 8545 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45520 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1378:
+#line 8549 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45528 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1379:
+#line 8553 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45536 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1380:
+#line 8561 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter type"),(yyvsp[-4].str),mm_strdup("set ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45544 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1381:
+#line 8569 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter aggregate"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45552 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1382:
+#line 8573 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter collation"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1383:
+#line 8577 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter conversion"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45568 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1384:
+#line 8581 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45576 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1385:
+#line 8585 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45584 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1386:
+#line 8589 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter function"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45592 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1387:
+#line 8593 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45600 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1388:
+#line 8597 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter large object"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45608 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1389:
+#line 8601 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter operator"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45616 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1390:
+#line 8605 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45624 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1391:
+#line 8609 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45632 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1392:
+#line 8613 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter procedure"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45640 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1393:
+#line 8617 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter routine"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45648 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1394:
+#line 8621 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter schema"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45656 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1395:
+#line 8625 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter type"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45664 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1396:
+#line 8629 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter tablespace"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45672 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1397:
+#line 8633 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter statistics"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45680 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1398:
+#line 8637 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search dictionary"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45688 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1399:
+#line 8641 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45696 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1400:
+#line 8645 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter foreign data wrapper"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45704 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1401:
+#line 8649 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter server"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45712 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1402:
+#line 8653 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter event trigger"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45720 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1403:
+#line 8657 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45728 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1404:
+#line 8661 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-3].str),mm_strdup("owner to"),(yyvsp[0].str));
+}
+#line 45736 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1405:
+#line 8669 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create publication"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45744 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1406:
+#line 8677 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45752 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1407:
+#line 8681 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 45759 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1408:
+#line 8688 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for table"),(yyvsp[0].str));
+}
+#line 45767 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1409:
+#line 8692 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for all tables");
+}
+#line 45775 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1410:
+#line 8700 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 45783 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1411:
+#line 8704 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("add table"),(yyvsp[0].str));
+}
+#line 45791 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1412:
+#line 8708 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("set table"),(yyvsp[0].str));
+}
+#line 45799 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1413:
+#line 8712 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter publication"),(yyvsp[-3].str),mm_strdup("drop table"),(yyvsp[0].str));
+}
+#line 45807 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1414:
+#line 8720 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45815 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1415:
+#line 8728 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45823 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1416:
+#line 8732 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 45831 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1417:
+#line 8740 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45839 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1418:
+#line 8748 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-2].str),mm_strdup("set"),(yyvsp[0].str));
+}
+#line 45847 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1419:
+#line 8752 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-2].str),mm_strdup("connection"),(yyvsp[0].str));
+}
+#line 45855 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1420:
+#line 8756 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter subscription"),(yyvsp[-3].str),mm_strdup("refresh publication"),(yyvsp[0].str));
+}
+#line 45863 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1421:
+#line 8760 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter subscription"),(yyvsp[-4].str),mm_strdup("set publication"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45871 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1422:
+#line 8764 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter subscription"),(yyvsp[-1].str),mm_strdup("enable"));
+}
+#line 45879 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1423:
+#line 8768 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter subscription"),(yyvsp[-1].str),mm_strdup("disable"));
+}
+#line 45887 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1424:
+#line 8776 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop subscription"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45895 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1425:
+#line 8780 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("drop subscription if exists"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 45903 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1426:
+#line 8788 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 45911 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1427:
+#line 8796 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 45919 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1428:
+#line 8800 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45927 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1429:
+#line 8804 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 45935 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1430:
+#line 8812 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(";"),(yyvsp[0].str));
+}
+#line 45943 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1431:
+#line 8816 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45951 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1432:
+#line 8824 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45959 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1433:
+#line 8828 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45967 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1434:
+#line 8832 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45975 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1435:
+#line 8836 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45983 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1436:
+#line 8840 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45991 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1437:
+#line 8848 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 45999 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1438:
+#line 8852 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46006 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1439:
+#line 8859 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 46014 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1440:
+#line 8863 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 46022 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1441:
+#line 8867 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 46030 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1442:
+#line 8871 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 46038 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1443:
+#line 8879 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("instead");
+}
+#line 46046 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1444:
+#line 8883 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("also");
+}
+#line 46054 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1445:
+#line 8887 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46061 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1446:
+#line 8894 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("notify"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46069 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1447:
+#line 8902 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup(","),(yyvsp[0].str));
+}
+#line 46077 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1448:
+#line 8906 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1449:
+#line 8913 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("listen"),(yyvsp[0].str));
+}
+#line 46092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1450:
+#line 8921 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("unlisten"),(yyvsp[0].str));
+}
+#line 46100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1451:
+#line 8925 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unlisten *");
+}
+#line 46108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1452:
+#line 8933 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("abort"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1453:
+#line 8937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("begin"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1454:
+#line 8941 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("start transaction"),(yyvsp[0].str));
+}
+#line 46132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1455:
+#line 8945 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("commit"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1456:
+#line 8949 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("end"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1457:
+#line 8953 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("rollback"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1458:
+#line 8957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("savepoint"),(yyvsp[0].str));
+}
+#line 46164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1459:
+#line 8961 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("release savepoint"),(yyvsp[0].str));
+}
+#line 46172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1460:
+#line 8965 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("release"),(yyvsp[0].str));
+}
+#line 46180 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1461:
+#line 8969 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("rollback"),(yyvsp[-3].str),mm_strdup("to savepoint"),(yyvsp[0].str));
+}
+#line 46188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1462:
+#line 8973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("rollback"),(yyvsp[-2].str),mm_strdup("to"),(yyvsp[0].str));
+}
+#line 46196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1463:
+#line 8977 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("prepare transaction"),(yyvsp[0].str));
+}
+#line 46204 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1464:
+#line 8981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("commit prepared"),(yyvsp[0].str));
+}
+#line 46212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1465:
+#line 8985 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("rollback prepared"),(yyvsp[0].str));
+}
+#line 46220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1466:
+#line 8993 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("work");
+}
+#line 46228 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1467:
+#line 8997 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("transaction");
+}
+#line 46236 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1468:
+#line 9001 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46243 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1469:
+#line 9008 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("isolation level"),(yyvsp[0].str));
+}
+#line 46251 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1470:
+#line 9012 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("read only");
+}
+#line 46259 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1471:
+#line 9016 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("read write");
+}
+#line 46267 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1472:
+#line 9020 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 46275 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1473:
+#line 9024 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not deferrable");
+}
+#line 46283 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1474:
+#line 9032 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46291 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1475:
+#line 9036 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 46299 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1476:
+#line 9040 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46307 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1477:
+#line 9048 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46315 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1478:
+#line 9052 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46322 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1479:
+#line 9059 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("and chain");
+}
+#line 46330 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1480:
+#line 9063 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("and no chain");
+}
+#line 46338 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1481:
+#line 9067 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46345 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1482:
+#line 9074 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46353 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1483:
+#line 9078 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46361 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1484:
+#line 9082 "preproc.y" /* yacc.c:1652 */
+ {
+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 46370 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1485:
+#line 9087 "preproc.y" /* yacc.c:1652 */
+ {
+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 46379 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1486:
+#line 9096 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with check option");
+}
+#line 46387 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1487:
+#line 9100 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with cascaded check option");
+}
+#line 46395 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1488:
+#line 9104 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with local check option");
+}
+#line 46403 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1489:
+#line 9108 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46410 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1490:
+#line 9115 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("load"),(yyvsp[0].str));
+}
+#line 46418 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1491:
+#line 9123 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("create database"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46426 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1492:
+#line 9131 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1493:
+#line 9135 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46441 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1494:
+#line 9142 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46449 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1495:
+#line 9146 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46457 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1496:
+#line 9154 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46465 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1497:
+#line 9158 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46473 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1498:
+#line 9162 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("default"));
+}
+#line 46481 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1499:
+#line 9170 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46489 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1500:
+#line 9174 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("connection limit");
+}
+#line 46497 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1501:
+#line 9178 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("encoding");
+}
+#line 46505 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1502:
+#line 9182 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("location");
+}
+#line 46513 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1503:
+#line 9186 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("owner");
+}
+#line 46521 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1504:
+#line 9190 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 46529 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1505:
+#line 9194 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("template");
+}
+#line 46537 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1506:
+#line 9202 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("=");
+}
+#line 46545 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1507:
+#line 9206 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46552 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1508:
+#line 9213 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-2].str),mm_strdup("with"),(yyvsp[0].str));
+}
+#line 46560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1509:
+#line 9217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter database"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46568 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1510:
+#line 9221 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter database"),(yyvsp[-3].str),mm_strdup("set tablespace"),(yyvsp[0].str));
+}
+#line 46576 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1511:
+#line 9229 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter database"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46584 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1512:
+#line 9237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop database"),(yyvsp[0].str));
+}
+#line 46592 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1513:
+#line 9241 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("drop database if exists"),(yyvsp[0].str));
+}
+#line 46600 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1514:
+#line 9245 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("drop database"),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 46608 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1515:
+#line 9249 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46616 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1516:
+#line 9257 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46624 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1517:
+#line 9261 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 46632 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1518:
+#line 9269 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("force");
+}
+#line 46640 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1519:
+#line 9277 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter collation"),(yyvsp[-2].str),mm_strdup("refresh version"));
+}
+#line 46648 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1520:
+#line 9285 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("alter system set"),(yyvsp[0].str));
+}
+#line 46656 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1521:
+#line 9289 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("alter system reset"),(yyvsp[0].str));
+}
+#line 46664 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1522:
+#line 9297 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("create domain"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46672 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1523:
+#line 9305 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter domain"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46680 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1524:
+#line 9309 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("drop not null"));
+}
+#line 46688 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1525:
+#line 9313 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("set not null"));
+}
+#line 46696 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1526:
+#line 9317 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-2].str),mm_strdup("add"),(yyvsp[0].str));
+}
+#line 46704 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1527:
+#line 9321 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("alter domain"),(yyvsp[-4].str),mm_strdup("drop constraint"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46712 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1528:
+#line 9325 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46720 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1529:
+#line 9329 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter domain"),(yyvsp[-3].str),mm_strdup("validate constraint"),(yyvsp[0].str));
+}
+#line 46728 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1530:
+#line 9337 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("as");
+}
+#line 46736 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1531:
+#line 9341 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46743 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1532:
+#line 9348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("alter text search dictionary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46751 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1533:
+#line 9356 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46759 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1534:
+#line 9360 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46767 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1535:
+#line 9364 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46775 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1536:
+#line 9368 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46783 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1537:
+#line 9372 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("alter text search configuration"),(yyvsp[-4].str),mm_strdup("drop mapping for"),(yyvsp[0].str));
+}
+#line 46791 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1538:
+#line 9376 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46799 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1539:
+#line 9384 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 46807 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1540:
+#line 9388 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 46815 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1541:
+#line 9396 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 46823 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1542:
+#line 9404 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("cluster"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46831 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1543:
+#line 9408 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("cluster"),(yyvsp[0].str));
+}
+#line 46839 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1544:
+#line 9412 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("cluster"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("on"),(yyvsp[0].str));
+}
+#line 46847 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1545:
+#line 9420 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 46855 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1546:
+#line 9424 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46862 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1547:
+#line 9431 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("vacuum"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46870 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1548:
+#line 9435 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("vacuum ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 46878 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1549:
+#line 9443 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46886 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1550:
+#line 9447 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 46894 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1551:
+#line 9455 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46902 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1552:
+#line 9459 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 46910 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1553:
+#line 9467 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("analyze");
+}
+#line 46918 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1554:
+#line 9471 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("analyse");
+}
+#line 46926 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1555:
+#line 9479 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 46934 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1556:
+#line 9487 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46942 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1557:
+#line 9491 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46950 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1558:
+#line 9499 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46958 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1559:
+#line 9503 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46966 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1560:
+#line 9507 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46973 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1561:
+#line 9514 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 46981 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1562:
+#line 9518 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 46988 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1563:
+#line 9525 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("verbose");
+}
+#line 46996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1564:
+#line 9529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47003 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1565:
+#line 9536 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 47011 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1566:
+#line 9540 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47018 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1567:
+#line 9547 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 47026 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1568:
+#line 9551 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47033 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1569:
+#line 9558 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47041 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1570:
+#line 9562 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47048 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1571:
+#line 9569 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47056 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1572:
+#line 9577 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47064 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1573:
+#line 9581 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47072 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1574:
+#line 9589 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47080 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1575:
+#line 9593 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47087 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1576:
+#line 9600 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("explain"),(yyvsp[0].str));
+}
+#line 47095 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1577:
+#line 9604 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("explain"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47103 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1578:
+#line 9608 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("explain verbose"),(yyvsp[0].str));
+}
+#line 47111 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1579:
+#line 9612 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("explain ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 47119 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1580:
+#line 9620 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47127 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1581:
+#line 9624 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47135 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1582:
+#line 9628 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47143 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1583:
+#line 9632 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47151 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1584:
+#line 9636 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47159 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1585:
+#line 9640 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47167 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1586:
+#line 9644 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47175 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1587:
+#line 9648 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47183 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1588:
+#line 9652 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].exec).name;
+ }
+#line 47191 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1589:
+#line 9660 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47199 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1590:
+#line 9664 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47207 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1591:
+#line 9672 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47215 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1592:
+#line 9680 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47223 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1593:
+#line 9684 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47231 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1594:
+#line 9692 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47239 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1595:
+#line 9696 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47247 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1596:
+#line 9700 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47254 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1597:
+#line 9707 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.prep).name = (yyvsp[-3].str);
+ (yyval.prep).type = (yyvsp[-2].str);
+ (yyval.prep).stmt = (yyvsp[0].str);
+ }
+#line 47264 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1598:
+#line 9713 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.prep).name = (yyvsp[-2].str);
+ (yyval.prep).type = NULL;
+ (yyval.prep).stmt = (yyvsp[0].str);
+ }
+#line 47274 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1599:
+#line 9723 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47282 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1600:
+#line 9727 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47289 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1601:
+#line 9734 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47297 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1602:
+#line 9738 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47305 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1603:
+#line 9742 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47313 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1604:
+#line 9746 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47321 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1605:
+#line 9754 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.exec).name = (yyvsp[-2].str);
+ (yyval.exec).type = (yyvsp[-1].str);
+ }
+#line 47330 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1606:
+#line 9759 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 47338 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1607:
+#line 9763 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 47346 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1608:
+#line 9771 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47354 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1609:
+#line 9775 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47361 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1610:
+#line 9782 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 47369 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1611:
+#line 9790 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47377 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1612:
+#line 9794 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 47385 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1613:
+#line 9802 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47393 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1614:
+#line 9806 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("overriding"),(yyvsp[-2].str),mm_strdup("value"),(yyvsp[0].str));
+}
+#line 47401 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1615:
+#line 9810 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 47409 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1616:
+#line 9814 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("("),(yyvsp[-5].str),mm_strdup(") overriding"),(yyvsp[-2].str),mm_strdup("value"),(yyvsp[0].str));
+}
+#line 47417 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1617:
+#line 9818 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default values");
+}
+#line 47425 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1618:
+#line 9826 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 47433 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1619:
+#line 9830 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 47441 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1620:
+#line 9838 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47449 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1621:
+#line 9842 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47457 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1622:
+#line 9850 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47465 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1623:
+#line 9858 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("on conflict"),(yyvsp[-5].str),mm_strdup("do update set"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47473 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1624:
+#line 9862 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("on conflict"),(yyvsp[-2].str),mm_strdup("do nothing"));
+}
+#line 47481 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1625:
+#line 9866 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47488 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1626:
+#line 9873 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 47496 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1627:
+#line 9877 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on constraint"),(yyvsp[0].str));
+}
+#line 47504 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1628:
+#line 9881 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47511 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1629:
+#line 9888 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("returning"),(yyvsp[-1].str));
+}
+#line 47519 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1630:
+#line 9892 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47526 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1631:
+#line 9899 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 47534 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1632:
+#line 9907 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("using"),(yyvsp[0].str));
+}
+#line 47542 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1633:
+#line 9911 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47549 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1634:
+#line 9918 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("lock"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47557 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1635:
+#line 9926 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("in"),(yyvsp[-1].str),mm_strdup("mode"));
+}
+#line 47565 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1636:
+#line 9930 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1637:
+#line 9937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("access share");
+}
+#line 47580 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1638:
+#line 9941 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row share");
+}
+#line 47588 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1639:
+#line 9945 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row exclusive");
+}
+#line 47596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1640:
+#line 9949 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("share update exclusive");
+}
+#line 47604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1641:
+#line 9953 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("share");
+}
+#line 47612 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1642:
+#line 9957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("share row exclusive");
+}
+#line 47620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1643:
+#line 9961 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclusive");
+}
+#line 47628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1644:
+#line 9965 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("access exclusive");
+}
+#line 47636 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1645:
+#line 9973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 47644 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1646:
+#line 9977 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47651 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1647:
+#line 9984 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 47659 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1648:
+#line 9988 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("skip locked");
+}
+#line 47667 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1649:
+#line 9992 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47674 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1650:
+#line 9999 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 47682 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1651:
+#line 10007 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47690 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1652:
+#line 10011 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47698 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1653:
+#line 10019 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 47706 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1654:
+#line 10023 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-3].str),mm_strdup(") ="),(yyvsp[0].str));
+}
+#line 47714 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1655:
+#line 10031 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47722 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1656:
+#line 10039 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47730 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1657:
+#line 10043 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 47738 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1658:
+#line 10051 "preproc.y" /* yacc.c:1652 */
+ {
+ 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);
+
+ 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;
+ 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 47786 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1659:
+#line 10099 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47794 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1660:
+#line 10103 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 47806 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1661:
+#line 10115 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 47813 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1662:
+#line 10118 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("no scroll"));
+}
+#line 47821 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1663:
+#line 10122 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("scroll"));
+}
+#line 47829 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1664:
+#line 10126 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("binary"));
+}
+#line 47837 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1665:
+#line 10130 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("insensitive"));
+}
+#line 47845 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1666:
+#line 10138 "preproc.y" /* yacc.c:1652 */
+ {
+ if (compat == ECPG_COMPAT_INFORMIX_SE && autocommit)
+ (yyval.str) = mm_strdup("with hold");
+ else
+ (yyval.str) = EMPTY;
+ }
+#line 47856 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1667:
+#line 10145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with hold");
+}
+#line 47864 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1668:
+#line 10149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("without hold");
+}
+#line 47872 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1669:
+#line 10157 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47880 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1670:
+#line 10161 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47888 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1671:
+#line 10169 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47896 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1672:
+#line 10173 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 47904 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1673:
+#line 10181 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47912 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1674:
+#line 10185 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47920 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1675:
+#line 10189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47928 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1676:
+#line 10193 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47936 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1677:
+#line 10197 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47944 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1678:
+#line 10201 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47952 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1679:
+#line 10205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47960 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1680:
+#line 10209 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 47968 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1681:
+#line 10217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47976 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1682:
+#line 10221 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 47984 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1683:
+#line 10229 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 47992 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1684:
+#line 10233 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 48000 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1685:
+#line 10237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48008 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1686:
+#line 10241 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("table"),(yyvsp[0].str));
+}
+#line 48016 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1687:
+#line 10245 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("union"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48024 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1688:
+#line 10249 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("intersect"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48032 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1689:
+#line 10253 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("except"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48040 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1690:
+#line 10261 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 48048 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1691:
+#line 10265 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with"),(yyvsp[0].str));
+}
+#line 48056 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1692:
+#line 10269 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("with recursive"),(yyvsp[0].str));
+}
+#line 48064 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1693:
+#line 10277 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48072 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1694:
+#line 10281 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48080 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1695:
+#line 10289 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(7,(yyvsp[-6].str),(yyvsp[-5].str),mm_strdup("as"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48088 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1696:
+#line 10297 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("materialized");
+}
+#line 48096 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1697:
+#line 10301 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not materialized");
+}
+#line 48104 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1698:
+#line 10305 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48111 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1699:
+#line 10312 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48119 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1700:
+#line 10316 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48126 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1701:
+#line 10323 "preproc.y" /* yacc.c:1652 */
+ {
+ FoundInto = 1;
+ (yyval.str)= cat2_str(mm_strdup("into"), (yyvsp[0].str));
+ }
+#line 48135 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1702:
+#line 10327 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 48141 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1703:
+#line 10329 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1704:
+#line 10336 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("temporary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1705:
+#line 10340 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("temp"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1706:
+#line 10344 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("local temporary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1707:
+#line 10348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("local temp"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48180 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1708:
+#line 10352 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("global temporary"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1709:
+#line 10356 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("global temp"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1710:
+#line 10360 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("unlogged"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48204 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1711:
+#line 10364 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("table"),(yyvsp[0].str));
+}
+#line 48212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1712:
+#line 10368 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1713:
+#line 10376 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 48228 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1714:
+#line 10380 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48235 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1715:
+#line 10387 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 48243 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1716:
+#line 10391 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 48251 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1717:
+#line 10395 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48258 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1718:
+#line 10402 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 48266 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1719:
+#line 10406 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("distinct on ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48274 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1720:
+#line 10414 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 48282 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1721:
+#line 10418 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48289 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1722:
+#line 10425 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48297 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1723:
+#line 10429 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48304 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1724:
+#line 10436 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("order by"),(yyvsp[0].str));
+}
+#line 48312 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1725:
+#line 10444 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48320 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1726:
+#line 10448 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48328 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1727:
+#line 10456 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("using"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48336 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1728:
+#line 10460 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1729:
+#line 10468 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48352 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1730:
+#line 10472 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48360 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1731:
+#line 10476 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48368 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1732:
+#line 10480 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48376 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1733:
+#line 10488 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48384 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1734:
+#line 10492 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48391 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1735:
+#line 10499 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("limit"),(yyvsp[0].str));
+}
+#line 48399 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1736:
+#line 10503 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 48408 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1737:
+#line 10508 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("fetch"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("only"));
+}
+#line 48416 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1738:
+#line 10512 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("fetch"),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("with ties"));
+}
+#line 48424 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1739:
+#line 10516 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("fetch"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("only"));
+}
+#line 48432 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1740:
+#line 10520 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("fetch"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("with ties"));
+}
+#line 48440 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1741:
+#line 10528 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("offset"),(yyvsp[0].str));
+}
+#line 48448 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1742:
+#line 10532 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("offset"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48456 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1743:
+#line 10540 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48464 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1744:
+#line 10544 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 48472 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1745:
+#line 10552 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48480 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1746:
+#line 10560 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48488 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1747:
+#line 10564 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 48496 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1748:
+#line 10568 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 48504 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1749:
+#line 10576 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48512 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1750:
+#line 10580 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48520 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1751:
+#line 10588 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 48528 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1752:
+#line 10592 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rows");
+}
+#line 48536 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1753:
+#line 10600 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("first");
+}
+#line 48544 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1754:
+#line 10604 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("next");
+}
+#line 48552 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1755:
+#line 10612 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("group by"),(yyvsp[0].str));
+}
+#line 48560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1756:
+#line 10616 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48567 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1757:
+#line 10623 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48575 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1758:
+#line 10627 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48583 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1759:
+#line 10635 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48591 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1760:
+#line 10639 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48599 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1761:
+#line 10643 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48607 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1762:
+#line 10647 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48615 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1763:
+#line 10651 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1764:
+#line 10659 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("( )");
+}
+#line 48631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1765:
+#line 10667 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("rollup ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48639 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1766:
+#line 10675 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("cube ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48647 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1767:
+#line 10683 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("grouping sets ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48655 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1768:
+#line 10691 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("having"),(yyvsp[0].str));
+}
+#line 48663 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1769:
+#line 10695 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48670 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1770:
+#line 10702 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48678 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1771:
+#line 10706 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for read only");
+}
+#line 48686 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1772:
+#line 10714 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48694 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1773:
+#line 10718 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48701 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1774:
+#line 10725 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48709 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1775:
+#line 10729 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48717 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1776:
+#line 10737 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48725 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1777:
+#line 10745 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for update");
+}
+#line 48733 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1778:
+#line 10749 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for no key update");
+}
+#line 48741 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1779:
+#line 10753 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for share");
+}
+#line 48749 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1780:
+#line 10757 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for key share");
+}
+#line 48757 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1781:
+#line 10765 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("of"),(yyvsp[0].str));
+}
+#line 48765 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1782:
+#line 10769 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1783:
+#line 10776 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("values ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1784:
+#line 10780 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup(", ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1785:
+#line 10788 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 48796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1786:
+#line 10792 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 48803 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1787:
+#line 10799 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48811 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1788:
+#line 10803 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 48819 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1789:
+#line 10811 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48827 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1790:
+#line 10815 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48835 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1791:
+#line 10819 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48843 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1792:
+#line 10823 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("lateral"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48851 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1793:
+#line 10827 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48859 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1794:
+#line 10831 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("lateral"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48867 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1795:
+#line 10835 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 48878 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1796:
+#line 10842 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 48889 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1797:
+#line 10849 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48897 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1798:
+#line 10853 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 48905 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1799:
+#line 10861 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48913 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1800:
+#line 10865 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("cross join"),(yyvsp[0].str));
+}
+#line 48921 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1801:
+#line 10869 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("join"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48929 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1802:
+#line 10873 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("join"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 48937 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1803:
+#line 10877 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("natural"),(yyvsp[-2].str),mm_strdup("join"),(yyvsp[0].str));
+}
+#line 48945 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1804:
+#line 10881 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("natural join"),(yyvsp[0].str));
+}
+#line 48953 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1805:
+#line 10889 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("as"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48961 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1806:
+#line 10893 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("as"),(yyvsp[0].str));
+}
+#line 48969 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1807:
+#line 10897 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 48977 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1808:
+#line 10901 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48985 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1809:
+#line 10909 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 48993 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1810:
+#line 10913 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49000 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1811:
+#line 10920 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49008 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1812:
+#line 10924 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("as ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49016 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1813:
+#line 10928 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("as"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49024 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1814:
+#line 10932 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49032 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1815:
+#line 10936 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49039 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1816:
+#line 10943 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("full"),(yyvsp[0].str));
+}
+#line 49047 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1817:
+#line 10947 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("left"),(yyvsp[0].str));
+}
+#line 49055 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1818:
+#line 10951 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("right"),(yyvsp[0].str));
+}
+#line 49063 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1819:
+#line 10955 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inner");
+}
+#line 49071 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1820:
+#line 10963 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("outer");
+}
+#line 49079 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1821:
+#line 10967 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49086 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1822:
+#line 10974 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("using ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49094 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1823:
+#line 10978 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("on"),(yyvsp[0].str));
+}
+#line 49102 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1824:
+#line 10986 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49110 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1825:
+#line 10990 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("*"));
+}
+#line 49118 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1826:
+#line 10994 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("only"),(yyvsp[0].str));
+}
+#line 49126 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1827:
+#line 10998 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("only ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49134 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1828:
+#line 11006 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49142 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1829:
+#line 11010 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49150 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1830:
+#line 11018 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49158 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1831:
+#line 11022 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49166 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1832:
+#line 11026 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 49174 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1833:
+#line 11034 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("tablesample"),(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 49182 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1834:
+#line 11042 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("repeatable ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49190 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1835:
+#line 11046 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49197 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1836:
+#line 11053 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49205 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1837:
+#line 11057 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("rows from ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 49213 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1838:
+#line 11065 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49221 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1839:
+#line 11073 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49229 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1840:
+#line 11077 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49237 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1841:
+#line 11085 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("as ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49245 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1842:
+#line 11089 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49252 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1843:
+#line 11096 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with ordinality");
+}
+#line 49260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1844:
+#line 11100 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49267 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1845:
+#line 11107 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("where"),(yyvsp[0].str));
+}
+#line 49275 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1846:
+#line 11111 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49282 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1847:
+#line 11118 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("where"),(yyvsp[0].str));
+}
+#line 49290 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1848:
+#line 11122 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 49299 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1849:
+#line 11127 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49306 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1850:
+#line 11134 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49314 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1851:
+#line 11138 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49321 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1852:
+#line 11145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49329 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1853:
+#line 11149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49337 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1854:
+#line 11157 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49345 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1855:
+#line 11165 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("xmltable ("),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("columns"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49353 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1856:
+#line 11169 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 49361 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1857:
+#line 11177 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49369 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1858:
+#line 11181 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49377 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1859:
+#line 11189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49385 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1860:
+#line 11193 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49393 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1861:
+#line 11197 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("for ordinality"));
+}
+#line 49401 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1862:
+#line 11205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49409 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1863:
+#line 11209 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49417 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1864:
+#line 11217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49425 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1865:
+#line 11221 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("default"),(yyvsp[0].str));
+}
+#line 49433 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1866:
+#line 11225 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not null");
+}
+#line 49441 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1867:
+#line 11229 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 49449 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1868:
+#line 11237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49457 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1869:
+#line 11241 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 49465 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1870:
+#line 11249 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 49473 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1871:
+#line 11253 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("default"),(yyvsp[0].str));
+}
+#line 49481 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1872:
+#line 11261 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].index).str); }
+#line 49487 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1873:
+#line 11263 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("setof"), (yyvsp[-1].str), (yyvsp[0].index).str); }
+#line 49493 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1874:
+#line 11265 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup("array ["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 49501 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1875:
+#line 11269 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("setof"),(yyvsp[-4].str),mm_strdup("array ["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 49509 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1876:
+#line 11273 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("array"));
+}
+#line 49517 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1877:
+#line 11277 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("setof"),(yyvsp[-1].str),mm_strdup("array"));
+}
+#line 49525 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1878:
+#line 11285 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 49539 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1879:
+#line 11295 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 49553 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1880:
+#line 11305 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.index).index1 = mm_strdup("-1");
+ (yyval.index).index2 = mm_strdup("-1");
+ (yyval.index).str= EMPTY;
+ }
+#line 49563 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1881:
+#line 11315 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49571 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1882:
+#line 11319 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49579 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1883:
+#line 11323 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49587 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1884:
+#line 11327 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49595 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1885:
+#line 11331 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49603 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1886:
+#line 11335 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49611 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1887:
+#line 11339 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49619 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1888:
+#line 11347 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49627 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1889:
+#line 11351 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49635 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1890:
+#line 11355 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49643 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1891:
+#line 11359 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49651 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1892:
+#line 11367 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49659 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1893:
+#line 11371 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 49667 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1894:
+#line 11379 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49675 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1895:
+#line 11383 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49682 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1896:
+#line 11390 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("int");
+}
+#line 49690 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1897:
+#line 11394 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("integer");
+}
+#line 49698 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1898:
+#line 11398 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("smallint");
+}
+#line 49706 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1899:
+#line 11402 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("bigint");
+}
+#line 49714 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1900:
+#line 11406 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("real");
+}
+#line 49722 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1901:
+#line 11410 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("float"),(yyvsp[0].str));
+}
+#line 49730 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1902:
+#line 11414 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("double precision");
+}
+#line 49738 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1903:
+#line 11418 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("decimal"),(yyvsp[0].str));
+}
+#line 49746 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1904:
+#line 11422 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("dec"),(yyvsp[0].str));
+}
+#line 49754 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1905:
+#line 11426 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("numeric"),(yyvsp[0].str));
+}
+#line 49762 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1906:
+#line 11430 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("boolean");
+}
+#line 49770 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1907:
+#line 11438 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49778 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1908:
+#line 11442 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49785 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1909:
+#line 11449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49793 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1910:
+#line 11453 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49801 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1911:
+#line 11461 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49809 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1912:
+#line 11465 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49817 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1913:
+#line 11473 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("bit"),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49825 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1914:
+#line 11481 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("bit"),(yyvsp[0].str));
+}
+#line 49833 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1915:
+#line 11489 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49841 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1916:
+#line 11493 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49849 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1917:
+#line 11501 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49857 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1918:
+#line 11505 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49865 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1919:
+#line 11513 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 49873 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1920:
+#line 11521 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 49881 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1921:
+#line 11529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("character"),(yyvsp[0].str));
+}
+#line 49889 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1922:
+#line 11533 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("char"),(yyvsp[0].str));
+}
+#line 49897 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1923:
+#line 11537 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("varchar");
+}
+#line 49905 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1924:
+#line 11541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("national character"),(yyvsp[0].str));
+}
+#line 49913 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1925:
+#line 11545 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("national char"),(yyvsp[0].str));
+}
+#line 49921 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1926:
+#line 11549 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("nchar"),(yyvsp[0].str));
+}
+#line 49929 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1927:
+#line 11557 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("varying");
+}
+#line 49937 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1928:
+#line 11561 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 49944 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1929:
+#line 11568 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("timestamp ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 49952 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1930:
+#line 11572 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("timestamp"),(yyvsp[0].str));
+}
+#line 49960 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1931:
+#line 11576 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("time ("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 49968 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1932:
+#line 11580 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("time"),(yyvsp[0].str));
+}
+#line 49976 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1933:
+#line 11588 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("interval");
+}
+#line 49984 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1934:
+#line 11596 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with time zone");
+}
+#line 49992 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1935:
+#line 11600 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("without time zone");
+}
+#line 50000 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1936:
+#line 11604 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 50007 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1937:
+#line 11611 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("year");
+}
+#line 50015 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1938:
+#line 11615 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("month");
+}
+#line 50023 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1939:
+#line 11619 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("day");
+}
+#line 50031 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1940:
+#line 11623 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("hour");
+}
+#line 50039 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1941:
+#line 11627 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("minute");
+}
+#line 50047 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1942:
+#line 11631 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50055 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1943:
+#line 11635 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("year to month");
+}
+#line 50063 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1944:
+#line 11639 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("day to hour");
+}
+#line 50071 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1945:
+#line 11643 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("day to minute");
+}
+#line 50079 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1946:
+#line 11647 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("day to"),(yyvsp[0].str));
+}
+#line 50087 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1947:
+#line 11651 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("hour to minute");
+}
+#line 50095 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1948:
+#line 11655 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("hour to"),(yyvsp[0].str));
+}
+#line 50103 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1949:
+#line 11659 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("minute to"),(yyvsp[0].str));
+}
+#line 50111 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1950:
+#line 11663 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 50118 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1951:
+#line 11670 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("second");
+}
+#line 50126 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1952:
+#line 11674 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("second ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50134 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1953:
+#line 11682 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50142 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1954:
+#line 11686 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("::"),(yyvsp[0].str));
+}
+#line 50150 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1955:
+#line 11690 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("collate"),(yyvsp[0].str));
+}
+#line 50158 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1956:
+#line 11694 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("at time zone"),(yyvsp[0].str));
+}
+#line 50166 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1957:
+#line 11698 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 50174 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1958:
+#line 11702 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 50182 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1959:
+#line 11706 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("+"),(yyvsp[0].str));
+}
+#line 50190 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1960:
+#line 11710 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("-"),(yyvsp[0].str));
+}
+#line 50198 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1961:
+#line 11714 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("*"),(yyvsp[0].str));
+}
+#line 50206 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1962:
+#line 11718 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("/"),(yyvsp[0].str));
+}
+#line 50214 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1963:
+#line 11722 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("%"),(yyvsp[0].str));
+}
+#line 50222 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1964:
+#line 11726 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("^"),(yyvsp[0].str));
+}
+#line 50230 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1965:
+#line 11730 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<"),(yyvsp[0].str));
+}
+#line 50238 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1966:
+#line 11734 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">"),(yyvsp[0].str));
+}
+#line 50246 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1967:
+#line 11738 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 50254 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1968:
+#line 11742 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<="),(yyvsp[0].str));
+}
+#line 50262 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1969:
+#line 11746 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">="),(yyvsp[0].str));
+}
+#line 50270 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1970:
+#line 11750 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<>"),(yyvsp[0].str));
+}
+#line 50278 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1971:
+#line 11754 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50286 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1972:
+#line 11758 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50294 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1973:
+#line 11762 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50302 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1974:
+#line 11766 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 50310 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1975:
+#line 11770 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("or"),(yyvsp[0].str));
+}
+#line 50318 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1976:
+#line 11774 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("not"),(yyvsp[0].str));
+}
+#line 50326 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1977:
+#line 11778 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("not"),(yyvsp[0].str));
+}
+#line 50334 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1978:
+#line 11782 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("like"),(yyvsp[0].str));
+}
+#line 50342 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1979:
+#line 11786 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("like"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 50350 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1980:
+#line 11790 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("not like"),(yyvsp[0].str));
+}
+#line 50358 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1981:
+#line 11794 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("not like"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 50366 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1982:
+#line 11798 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("ilike"),(yyvsp[0].str));
+}
+#line 50374 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1983:
+#line 11802 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("ilike"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 50382 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1984:
+#line 11806 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("not ilike"),(yyvsp[0].str));
+}
+#line 50390 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1985:
+#line 11810 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("not ilike"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 50398 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1986:
+#line 11814 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("similar to"),(yyvsp[0].str));
+}
+#line 50406 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1987:
+#line 11818 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("similar to"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 50414 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1988:
+#line 11822 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("not similar to"),(yyvsp[0].str));
+}
+#line 50422 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1989:
+#line 11826 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-6].str),mm_strdup("not similar to"),(yyvsp[-2].str),mm_strdup("escape"),(yyvsp[0].str));
+}
+#line 50430 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1990:
+#line 11830 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is null"));
+}
+#line 50438 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1991:
+#line 11834 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("isnull"));
+}
+#line 50446 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1992:
+#line 11838 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not null"));
+}
+#line 50454 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1993:
+#line 11842 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("notnull"));
+}
+#line 50462 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1994:
+#line 11846 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("overlaps"),(yyvsp[0].str));
+}
+#line 50470 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1995:
+#line 11850 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is true"));
+}
+#line 50478 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1996:
+#line 11854 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not true"));
+}
+#line 50486 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1997:
+#line 11858 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is false"));
+}
+#line 50494 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1998:
+#line 11862 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not false"));
+}
+#line 50502 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 1999:
+#line 11866 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is unknown"));
+}
+#line 50510 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2000:
+#line 11870 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not unknown"));
+}
+#line 50518 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2001:
+#line 11874 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("is distinct from"),(yyvsp[0].str));
+}
+#line 50526 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2002:
+#line 11878 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-5].str),mm_strdup("is not distinct from"),(yyvsp[0].str));
+}
+#line 50534 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2003:
+#line 11882 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-5].str),mm_strdup("is of ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50542 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2004:
+#line 11886 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-6].str),mm_strdup("is not of ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50550 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2005:
+#line 11890 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),mm_strdup("between"),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 50558 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2006:
+#line 11894 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 50566 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2007:
+#line 11898 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("between symmetric"),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 50574 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2008:
+#line 11902 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-6].str),mm_strdup("not between symmetric"),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 50582 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2009:
+#line 11906 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("in"),(yyvsp[0].str));
+}
+#line 50590 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2010:
+#line 11910 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-3].str),mm_strdup("not in"),(yyvsp[0].str));
+}
+#line 50598 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2011:
+#line 11914 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50606 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2012:
+#line 11918 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50614 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2013:
+#line 11922 "preproc.y" /* yacc.c:1652 */
+ {
+mmerror(PARSE_ERROR, ET_WARNING, "unsupported feature will be passed to server");
+ (yyval.str) = cat_str(2,mm_strdup("unique"),(yyvsp[0].str));
+}
+#line 50623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2014:
+#line 11927 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is document"));
+}
+#line 50631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2015:
+#line 11931 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not document"));
+}
+#line 50639 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2016:
+#line 11935 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is normalized"));
+}
+#line 50647 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2017:
+#line 11939 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),mm_strdup("is"),(yyvsp[-1].str),mm_strdup("normalized"));
+}
+#line 50655 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2018:
+#line 11943 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not normalized"));
+}
+#line 50663 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2019:
+#line 11947 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-4].str),mm_strdup("is not"),(yyvsp[-1].str),mm_strdup("normalized"));
+}
+#line 50671 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2020:
+#line 11951 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 50679 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2021:
+#line 11959 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50687 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2022:
+#line 11963 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("::"),(yyvsp[0].str));
+}
+#line 50695 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2023:
+#line 11967 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 50703 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2024:
+#line 11971 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 50711 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2025:
+#line 11975 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("+"),(yyvsp[0].str));
+}
+#line 50719 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2026:
+#line 11979 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("-"),(yyvsp[0].str));
+}
+#line 50727 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2027:
+#line 11983 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("*"),(yyvsp[0].str));
+}
+#line 50735 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2028:
+#line 11987 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("/"),(yyvsp[0].str));
+}
+#line 50743 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2029:
+#line 11991 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("%"),(yyvsp[0].str));
+}
+#line 50751 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2030:
+#line 11995 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("^"),(yyvsp[0].str));
+}
+#line 50759 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2031:
+#line 11999 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<"),(yyvsp[0].str));
+}
+#line 50767 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2032:
+#line 12003 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">"),(yyvsp[0].str));
+}
+#line 50775 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2033:
+#line 12007 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("="),(yyvsp[0].str));
+}
+#line 50783 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2034:
+#line 12011 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<="),(yyvsp[0].str));
+}
+#line 50791 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2035:
+#line 12015 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(">="),(yyvsp[0].str));
+}
+#line 50799 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2036:
+#line 12019 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("<>"),(yyvsp[0].str));
+}
+#line 50807 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2037:
+#line 12023 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50815 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2038:
+#line 12027 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50823 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2039:
+#line 12031 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50831 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2040:
+#line 12035 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-4].str),mm_strdup("is distinct from"),(yyvsp[0].str));
+}
+#line 50839 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2041:
+#line 12039 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-5].str),mm_strdup("is not distinct from"),(yyvsp[0].str));
+}
+#line 50847 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2042:
+#line 12043 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-5].str),mm_strdup("is of ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50855 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2043:
+#line 12047 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-6].str),mm_strdup("is not of ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50863 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2044:
+#line 12051 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("is document"));
+}
+#line 50871 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2045:
+#line 12055 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("is not document"));
+}
+#line 50879 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2046:
+#line 12063 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50887 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2047:
+#line 12067 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50895 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2048:
+#line 12071 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50903 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2049:
+#line 12075 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 50911 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2050:
+#line 12079 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50919 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2051:
+#line 12083 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50927 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2052:
+#line 12087 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50935 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2053:
+#line 12091 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 50943 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2054:
+#line 12095 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("exists"),(yyvsp[0].str));
+}
+#line 50951 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2055:
+#line 12099 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("array"),(yyvsp[0].str));
+}
+#line 50959 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2056:
+#line 12103 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("array"),(yyvsp[0].str));
+}
+#line 50967 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2057:
+#line 12107 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50975 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2058:
+#line 12111 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 50983 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2059:
+#line 12115 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("grouping ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 50991 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2060:
+#line 12123 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-2].str),mm_strdup("( )"));
+}
+#line 50999 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2061:
+#line 12127 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51007 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2062:
+#line 12131 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("( variadic"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51015 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2063:
+#line 12135 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 51023 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2064:
+#line 12139 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("( all"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51031 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2065:
+#line 12143 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-5].str),mm_strdup("( distinct"),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51039 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2066:
+#line 12147 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-3].str),mm_strdup("( * )"));
+}
+#line 51047 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2067:
+#line 12155 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51055 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2068:
+#line 12159 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51063 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2069:
+#line 12167 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51071 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2070:
+#line 12171 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51079 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2071:
+#line 12179 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("collation for ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51087 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2072:
+#line 12183 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_date");
+}
+#line 51095 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2073:
+#line 12187 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_time");
+}
+#line 51103 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2074:
+#line 12191 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("current_time ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51111 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2075:
+#line 12195 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_timestamp");
+}
+#line 51119 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2076:
+#line 12199 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("current_timestamp ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51127 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2077:
+#line 12203 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("localtime");
+}
+#line 51135 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2078:
+#line 12207 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("localtime ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51143 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2079:
+#line 12211 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("localtimestamp");
+}
+#line 51151 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2080:
+#line 12215 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("localtimestamp ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51159 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2081:
+#line 12219 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_role");
+}
+#line 51167 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2082:
+#line 12223 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 51175 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2083:
+#line 12227 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 51183 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2084:
+#line 12231 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 51191 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2085:
+#line 12235 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_catalog");
+}
+#line 51199 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2086:
+#line 12239 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_schema");
+}
+#line 51207 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2087:
+#line 12243 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("cast ("),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51215 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2088:
+#line 12247 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("extract ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51223 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2089:
+#line 12251 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("normalize ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51231 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2090:
+#line 12255 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("normalize ("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51239 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2091:
+#line 12259 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("overlay ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51247 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2092:
+#line 12263 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("position ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51255 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2093:
+#line 12267 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("substring ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51263 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2094:
+#line 12271 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("treat ("),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51271 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2095:
+#line 12275 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ( both"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51279 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2096:
+#line 12279 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ( leading"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51287 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2097:
+#line 12283 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ( trailing"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51295 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2098:
+#line 12287 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("trim ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51303 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2099:
+#line 12291 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("nullif ("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51311 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2100:
+#line 12295 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("coalesce ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51319 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2101:
+#line 12299 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("greatest ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51327 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2102:
+#line 12303 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("least ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51335 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2103:
+#line 12307 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlconcat ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51343 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2104:
+#line 12311 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlelement ( name"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51351 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2105:
+#line 12315 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlelement ( name"),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51359 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2106:
+#line 12319 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlelement ( name"),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51367 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2107:
+#line 12323 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 51375 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2108:
+#line 12327 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("xmlexists ("),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51383 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2109:
+#line 12331 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlforest ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51391 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2110:
+#line 12335 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlparse ("),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51399 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2111:
+#line 12339 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlpi ( name"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51407 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2112:
+#line 12343 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("xmlpi ( name"),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51415 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2113:
+#line 12347 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("xmlroot ("),(yyvsp[-4].str),mm_strdup(","),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51423 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2114:
+#line 12351 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("xmlserialize ("),(yyvsp[-4].str),(yyvsp[-3].str),mm_strdup("as"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51431 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2115:
+#line 12359 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("version"),(yyvsp[0].str));
+}
+#line 51439 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2116:
+#line 12363 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("version no value");
+}
+#line 51447 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2117:
+#line 12371 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup(", standalone yes");
+}
+#line 51455 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2118:
+#line 12375 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup(", standalone no");
+}
+#line 51463 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2119:
+#line 12379 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup(", standalone no value");
+}
+#line 51471 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2120:
+#line 12383 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51478 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2121:
+#line 12390 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("xmlattributes ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51486 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2122:
+#line 12398 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51494 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2123:
+#line 12402 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 51502 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2124:
+#line 12410 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 51510 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2125:
+#line 12414 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51518 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2126:
+#line 12422 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("document");
+}
+#line 51526 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2127:
+#line 12426 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("content");
+}
+#line 51534 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2128:
+#line 12434 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("preserve whitespace");
+}
+#line 51542 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2129:
+#line 12438 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("strip whitespace");
+}
+#line 51550 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2130:
+#line 12442 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51557 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2131:
+#line 12449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("passing"),(yyvsp[0].str));
+}
+#line 51565 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2132:
+#line 12453 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("passing"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51573 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2133:
+#line 12457 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("passing"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51581 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2134:
+#line 12461 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("passing"),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51589 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2135:
+#line 12469 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("by ref");
+}
+#line 51597 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2136:
+#line 12473 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("by value");
+}
+#line 51605 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2137:
+#line 12481 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("within group ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51613 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2138:
+#line 12485 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2139:
+#line 12492 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("filter ( where"),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2140:
+#line 12496 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51635 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2141:
+#line 12503 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("window"),(yyvsp[0].str));
+}
+#line 51643 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2142:
+#line 12507 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51650 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2143:
+#line 12514 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51658 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2144:
+#line 12518 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 51666 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2145:
+#line 12526 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 51674 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2146:
+#line 12534 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("over"),(yyvsp[0].str));
+}
+#line 51682 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2147:
+#line 12538 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("over"),(yyvsp[0].str));
+}
+#line 51690 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2148:
+#line 12542 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51697 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2149:
+#line 12549 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,mm_strdup("("),(yyvsp[-4].str),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51705 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2150:
+#line 12557 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51713 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2151:
+#line 12561 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51720 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2152:
+#line 12568 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("partition by"),(yyvsp[0].str));
+}
+#line 51728 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2153:
+#line 12572 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51735 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2154:
+#line 12579 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("range"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51743 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2155:
+#line 12583 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("rows"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51751 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2156:
+#line 12587 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("groups"),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 51759 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2157:
+#line 12591 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51766 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2158:
+#line 12598 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51774 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2159:
+#line 12602 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("between"),(yyvsp[-2].str),mm_strdup("and"),(yyvsp[0].str));
+}
+#line 51782 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2160:
+#line 12610 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unbounded preceding");
+}
+#line 51790 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2161:
+#line 12614 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unbounded following");
+}
+#line 51798 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2162:
+#line 12618 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current row");
+}
+#line 51806 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2163:
+#line 12622 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("preceding"));
+}
+#line 51814 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2164:
+#line 12626 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),mm_strdup("following"));
+}
+#line 51822 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2165:
+#line 12634 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclude current row");
+}
+#line 51830 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2166:
+#line 12638 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclude group");
+}
+#line 51838 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2167:
+#line 12642 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclude ties");
+}
+#line 51846 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2168:
+#line 12646 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclude no others");
+}
+#line 51854 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2169:
+#line 12650 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 51861 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2170:
+#line 12657 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("row ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51869 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2171:
+#line 12661 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row ( )");
+}
+#line 51877 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2172:
+#line 12665 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51885 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2173:
+#line 12673 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("row ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51893 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2174:
+#line 12677 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row ( )");
+}
+#line 51901 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2175:
+#line 12685 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("("),(yyvsp[-3].str),mm_strdup(","),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 51909 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2176:
+#line 12693 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("any");
+}
+#line 51917 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2177:
+#line 12697 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("some");
+}
+#line 51925 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2178:
+#line 12701 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 51933 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2179:
+#line 12709 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51941 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2180:
+#line 12713 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 51949 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2181:
+#line 12721 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("+");
+}
+#line 51957 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2182:
+#line 12725 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("-");
+}
+#line 51965 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2183:
+#line 12729 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("*");
+}
+#line 51973 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2184:
+#line 12733 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("/");
+}
+#line 51981 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2185:
+#line 12737 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("%");
+}
+#line 51989 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2186:
+#line 12741 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("^");
+}
+#line 51997 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2187:
+#line 12745 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("<");
+}
+#line 52005 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2188:
+#line 12749 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup(">");
+}
+#line 52013 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2189:
+#line 12753 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("=");
+}
+#line 52021 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2190:
+#line 12757 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("<=");
+}
+#line 52029 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2191:
+#line 12761 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup(">=");
+}
+#line 52037 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2192:
+#line 12765 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("<>");
+}
+#line 52045 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2193:
+#line 12773 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52053 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2194:
+#line 12777 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52061 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2195:
+#line 12785 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52069 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2196:
+#line 12789 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52077 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2197:
+#line 12797 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52085 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2198:
+#line 12801 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("operator ("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52093 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2199:
+#line 12805 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("like");
+}
+#line 52101 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2200:
+#line 12809 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not like");
+}
+#line 52109 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2201:
+#line 12813 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("ilike");
+}
+#line 52117 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2202:
+#line 12817 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not ilike");
+}
+#line 52125 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2203:
+#line 12825 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52133 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2204:
+#line 12829 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52141 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2205:
+#line 12837 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52149 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2206:
+#line 12841 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52157 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2207:
+#line 12849 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52165 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2208:
+#line 12853 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(":="),(yyvsp[0].str));
+}
+#line 52173 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2209:
+#line 12857 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("=>"),(yyvsp[0].str));
+}
+#line 52181 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2210:
+#line 12865 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52189 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2211:
+#line 12869 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52197 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2212:
+#line 12877 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 52205 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2213:
+#line 12881 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 52213 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2214:
+#line 12885 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("[ ]");
+}
+#line 52221 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2215:
+#line 12893 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52229 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2216:
+#line 12897 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52237 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2217:
+#line 12905 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 52245 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2218:
+#line 12909 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52252 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2219:
+#line 12916 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2220:
+#line 12920 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("year");
+}
+#line 52268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2221:
+#line 12924 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("month");
+}
+#line 52276 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2222:
+#line 12928 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("day");
+}
+#line 52284 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2223:
+#line 12932 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("hour");
+}
+#line 52292 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2224:
+#line 12936 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("minute");
+}
+#line 52300 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2225:
+#line 12940 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("second");
+}
+#line 52308 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2226:
+#line 12944 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52316 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2227:
+#line 12952 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfc");
+}
+#line 52324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2228:
+#line 12956 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfd");
+}
+#line 52332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2229:
+#line 12960 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfkc");
+}
+#line 52340 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2230:
+#line 12964 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfkd");
+}
+#line 52348 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2231:
+#line 12972 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2232:
+#line 12976 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52364 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2233:
+#line 12984 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("placing"),(yyvsp[0].str));
+}
+#line 52372 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2234:
+#line 12992 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("in"),(yyvsp[0].str));
+}
+#line 52380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2235:
+#line 12996 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52387 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2236:
+#line 13003 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52395 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2237:
+#line 13007 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52403 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2238:
+#line 13011 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52411 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2239:
+#line 13015 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52419 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2240:
+#line 13019 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52427 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2241:
+#line 13023 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2242:
+#line 13030 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 52442 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2243:
+#line 13038 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("for"),(yyvsp[0].str));
+}
+#line 52450 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2244:
+#line 13046 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("from"),(yyvsp[0].str));
+}
+#line 52458 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2245:
+#line 13050 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("from"),(yyvsp[0].str));
+}
+#line 52466 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2246:
+#line 13054 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52474 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2247:
+#line 13062 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52482 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2248:
+#line 13066 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("("),(yyvsp[-1].str),mm_strdup(")"));
+}
+#line 52490 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2249:
+#line 13074 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("case"),(yyvsp[-3].str),(yyvsp[-2].str),(yyvsp[-1].str),mm_strdup("end"));
+}
+#line 52498 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2250:
+#line 13082 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52506 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2251:
+#line 13086 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52514 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2252:
+#line 13094 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4,mm_strdup("when"),(yyvsp[-2].str),mm_strdup("then"),(yyvsp[0].str));
+}
+#line 52522 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2253:
+#line 13102 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("else"),(yyvsp[0].str));
+}
+#line 52530 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2254:
+#line 13106 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52537 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2255:
+#line 13113 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52545 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2256:
+#line 13117 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52552 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2257:
+#line 13124 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2258:
+#line 13128 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52568 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2259:
+#line 13136 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("."),(yyvsp[0].str));
+}
+#line 52576 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2260:
+#line 13140 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup(". *");
+}
+#line 52584 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2261:
+#line 13144 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,mm_strdup("["),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 52592 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2262:
+#line 13148 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,mm_strdup("["),(yyvsp[-3].str),mm_strdup(":"),(yyvsp[-1].str),mm_strdup("]"));
+}
+#line 52600 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2263:
+#line 13156 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52608 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2264:
+#line 13160 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52615 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2265:
+#line 13167 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52623 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2266:
+#line 13171 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52631 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2267:
+#line 13179 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52638 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2268:
+#line 13182 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52646 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2269:
+#line 13190 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("asymmetric");
+}
+#line 52654 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2270:
+#line 13194 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52661 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2271:
+#line 13201 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52669 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2272:
+#line 13205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str)=EMPTY; }
+#line 52676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2273:
+#line 13212 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2274:
+#line 13216 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2275:
+#line 13224 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup("as"),(yyvsp[0].str));
+}
+#line 52700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2276:
+#line 13228 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2277:
+#line 13232 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2278:
+#line 13236 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("*");
+}
+#line 52724 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2279:
+#line 13244 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52732 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2280:
+#line 13248 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2281:
+#line 13256 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2282:
+#line 13260 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52756 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2283:
+#line 13268 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52764 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2284:
+#line 13272 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 52772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2285:
+#line 13280 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2286:
+#line 13288 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2287:
+#line 13296 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2288:
+#line 13304 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52804 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2289:
+#line 13312 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2290:
+#line 13320 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2291:
+#line 13328 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52828 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2292:
+#line 13332 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2293:
+#line 13340 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2294:
+#line 13344 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2295:
+#line 13348 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2296:
+#line 13352 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2297:
+#line 13356 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2298:
+#line 13360 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2299:
+#line 13364 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(6,(yyvsp[-5].str),mm_strdup("("),(yyvsp[-3].str),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 52892 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2300:
+#line 13368 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2301:
+#line 13372 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),(yyvsp[-1].str),(yyvsp[0].str));
+}
+#line 52908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2302:
+#line 13376 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5,(yyvsp[-4].str),mm_strdup("("),(yyvsp[-2].str),mm_strdup(")"),(yyvsp[0].str));
+}
+#line 52916 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2303:
+#line 13380 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 52924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2304:
+#line 13384 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 52932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2305:
+#line 13388 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 52940 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2306:
+#line 13391 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 52946 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2307:
+#line 13392 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 52952 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2308:
+#line 13398 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make_name(); }
+#line 52958 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2309:
+#line 13404 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52966 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2310:
+#line 13407 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 52972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2311:
+#line 13409 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("+"),(yyvsp[0].str));
+}
+#line 52980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2312:
+#line 13413 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(2,mm_strdup("-"),(yyvsp[0].str));
+}
+#line 52988 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2313:
+#line 13421 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 52996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2314:
+#line 13429 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2315:
+#line 13433 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 53012 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2316:
+#line 13437 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 53020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2317:
+#line 13445 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2318:
+#line 13449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(3,(yyvsp[-2].str),mm_strdup(","),(yyvsp[0].str));
+}
+#line 53036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2319:
+#line 13457 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2320:
+#line 13461 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2321:
+#line 13465 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2322:
+#line 13469 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+}
+#line 53068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2323:
+#line 13477 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("abort");
+}
+#line 53076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2324:
+#line 13481 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("absolute");
+}
+#line 53084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2325:
+#line 13485 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("access");
+}
+#line 53092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2326:
+#line 13489 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("action");
+}
+#line 53100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2327:
+#line 13493 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("add");
+}
+#line 53108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2328:
+#line 13497 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("admin");
+}
+#line 53116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2329:
+#line 13501 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("after");
+}
+#line 53124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2330:
+#line 13505 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("aggregate");
+}
+#line 53132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2331:
+#line 13509 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("also");
+}
+#line 53140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2332:
+#line 13513 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("alter");
+}
+#line 53148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2333:
+#line 13517 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("always");
+}
+#line 53156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2334:
+#line 13521 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("assertion");
+}
+#line 53164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2335:
+#line 13525 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("assignment");
+}
+#line 53172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2336:
+#line 13529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("at");
+}
+#line 53180 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2337:
+#line 13533 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("attach");
+}
+#line 53188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2338:
+#line 13537 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("attribute");
+}
+#line 53196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2339:
+#line 13541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("backward");
+}
+#line 53204 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2340:
+#line 13545 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("before");
+}
+#line 53212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2341:
+#line 13549 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("begin");
+}
+#line 53220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2342:
+#line 13553 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("by");
+}
+#line 53228 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2343:
+#line 13557 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cache");
+}
+#line 53236 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2344:
+#line 13561 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("call");
+}
+#line 53244 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2345:
+#line 13565 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("called");
+}
+#line 53252 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2346:
+#line 13569 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cascade");
+}
+#line 53260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2347:
+#line 13573 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cascaded");
+}
+#line 53268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2348:
+#line 13577 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("catalog");
+}
+#line 53276 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2349:
+#line 13581 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("chain");
+}
+#line 53284 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2350:
+#line 13585 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("characteristics");
+}
+#line 53292 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2351:
+#line 13589 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("checkpoint");
+}
+#line 53300 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2352:
+#line 13593 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("class");
+}
+#line 53308 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2353:
+#line 13597 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("close");
+}
+#line 53316 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2354:
+#line 13601 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cluster");
+}
+#line 53324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2355:
+#line 13605 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("columns");
+}
+#line 53332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2356:
+#line 13609 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("comment");
+}
+#line 53340 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2357:
+#line 13613 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("comments");
+}
+#line 53348 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2358:
+#line 13617 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("commit");
+}
+#line 53356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2359:
+#line 13621 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("committed");
+}
+#line 53364 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2360:
+#line 13625 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("configuration");
+}
+#line 53372 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2361:
+#line 13629 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("conflict");
+}
+#line 53380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2362:
+#line 13633 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("constraints");
+}
+#line 53388 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2363:
+#line 13637 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("content");
+}
+#line 53396 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2364:
+#line 13641 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("continue");
+}
+#line 53404 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2365:
+#line 13645 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("conversion");
+}
+#line 53412 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2366:
+#line 13649 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("copy");
+}
+#line 53420 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2367:
+#line 13653 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cost");
+}
+#line 53428 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2368:
+#line 13657 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("csv");
+}
+#line 53436 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2369:
+#line 13661 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cube");
+}
+#line 53444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2370:
+#line 13665 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cursor");
+}
+#line 53452 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2371:
+#line 13669 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cycle");
+}
+#line 53460 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2372:
+#line 13673 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("data");
+}
+#line 53468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2373:
+#line 13677 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("database");
+}
+#line 53476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2374:
+#line 13681 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deallocate");
+}
+#line 53484 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2375:
+#line 13685 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("declare");
+}
+#line 53492 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2376:
+#line 13689 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("defaults");
+}
+#line 53500 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2377:
+#line 13693 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deferred");
+}
+#line 53508 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2378:
+#line 13697 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("definer");
+}
+#line 53516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2379:
+#line 13701 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("delete");
+}
+#line 53524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2380:
+#line 13705 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("delimiter");
+}
+#line 53532 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2381:
+#line 13709 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("delimiters");
+}
+#line 53540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2382:
+#line 13713 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("depends");
+}
+#line 53548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2383:
+#line 13717 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("detach");
+}
+#line 53556 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2384:
+#line 13721 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("dictionary");
+}
+#line 53564 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2385:
+#line 13725 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("disable");
+}
+#line 53572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2386:
+#line 13729 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("discard");
+}
+#line 53580 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2387:
+#line 13733 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("document");
+}
+#line 53588 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2388:
+#line 13737 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("domain");
+}
+#line 53596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2389:
+#line 13741 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("double");
+}
+#line 53604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2390:
+#line 13745 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("drop");
+}
+#line 53612 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2391:
+#line 13749 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("each");
+}
+#line 53620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2392:
+#line 13753 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enable");
+}
+#line 53628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2393:
+#line 13757 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("encoding");
+}
+#line 53636 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2394:
+#line 13761 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("encrypted");
+}
+#line 53644 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2395:
+#line 13765 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("enum");
+}
+#line 53652 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2396:
+#line 13769 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("escape");
+}
+#line 53660 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2397:
+#line 13773 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("event");
+}
+#line 53668 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2398:
+#line 13777 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclude");
+}
+#line 53676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2399:
+#line 13781 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("excluding");
+}
+#line 53684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2400:
+#line 13785 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exclusive");
+}
+#line 53692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2401:
+#line 13789 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("execute");
+}
+#line 53700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2402:
+#line 13793 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("explain");
+}
+#line 53708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2403:
+#line 13797 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("expression");
+}
+#line 53716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2404:
+#line 13801 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("extension");
+}
+#line 53724 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2405:
+#line 13805 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("external");
+}
+#line 53732 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2406:
+#line 13809 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("family");
+}
+#line 53740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2407:
+#line 13813 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("filter");
+}
+#line 53748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2408:
+#line 13817 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("first");
+}
+#line 53756 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2409:
+#line 13821 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("following");
+}
+#line 53764 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2410:
+#line 13825 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("force");
+}
+#line 53772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2411:
+#line 13829 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("forward");
+}
+#line 53780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2412:
+#line 13833 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("function");
+}
+#line 53788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2413:
+#line 13837 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("functions");
+}
+#line 53796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2414:
+#line 13841 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("generated");
+}
+#line 53804 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2415:
+#line 13845 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("global");
+}
+#line 53812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2416:
+#line 13849 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("granted");
+}
+#line 53820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2417:
+#line 13853 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("groups");
+}
+#line 53828 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2418:
+#line 13857 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("handler");
+}
+#line 53836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2419:
+#line 13861 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("header");
+}
+#line 53844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2420:
+#line 13865 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("hold");
+}
+#line 53852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2421:
+#line 13869 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("identity");
+}
+#line 53860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2422:
+#line 13873 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("if");
+}
+#line 53868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2423:
+#line 13877 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("immediate");
+}
+#line 53876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2424:
+#line 13881 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("immutable");
+}
+#line 53884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2425:
+#line 13885 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("implicit");
+}
+#line 53892 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2426:
+#line 13889 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("import");
+}
+#line 53900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2427:
+#line 13893 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("include");
+}
+#line 53908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2428:
+#line 13897 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("including");
+}
+#line 53916 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2429:
+#line 13901 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("increment");
+}
+#line 53924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2430:
+#line 13905 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("index");
+}
+#line 53932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2431:
+#line 13909 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("indexes");
+}
+#line 53940 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2432:
+#line 13913 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inherit");
+}
+#line 53948 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2433:
+#line 13917 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inherits");
+}
+#line 53956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2434:
+#line 13921 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inline");
+}
+#line 53964 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2435:
+#line 13925 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("insensitive");
+}
+#line 53972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2436:
+#line 13929 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("insert");
+}
+#line 53980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2437:
+#line 13933 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("instead");
+}
+#line 53988 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2438:
+#line 13937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("invoker");
+}
+#line 53996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2439:
+#line 13941 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("isolation");
+}
+#line 54004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2440:
+#line 13945 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("key");
+}
+#line 54012 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2441:
+#line 13949 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("label");
+}
+#line 54020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2442:
+#line 13953 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("language");
+}
+#line 54028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2443:
+#line 13957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("large");
+}
+#line 54036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2444:
+#line 13961 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("last");
+}
+#line 54044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2445:
+#line 13965 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("leakproof");
+}
+#line 54052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2446:
+#line 13969 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("level");
+}
+#line 54060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2447:
+#line 13973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("listen");
+}
+#line 54068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2448:
+#line 13977 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("load");
+}
+#line 54076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2449:
+#line 13981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("local");
+}
+#line 54084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2450:
+#line 13985 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("location");
+}
+#line 54092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2451:
+#line 13989 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("lock");
+}
+#line 54100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2452:
+#line 13993 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("locked");
+}
+#line 54108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2453:
+#line 13997 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("logged");
+}
+#line 54116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2454:
+#line 14001 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("mapping");
+}
+#line 54124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2455:
+#line 14005 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("match");
+}
+#line 54132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2456:
+#line 14009 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("materialized");
+}
+#line 54140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2457:
+#line 14013 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("maxvalue");
+}
+#line 54148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2458:
+#line 14017 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("method");
+}
+#line 54156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2459:
+#line 14021 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("minvalue");
+}
+#line 54164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2460:
+#line 14025 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("mode");
+}
+#line 54172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2461:
+#line 14029 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("move");
+}
+#line 54180 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2462:
+#line 14033 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("name");
+}
+#line 54188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2463:
+#line 14037 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("names");
+}
+#line 54196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2464:
+#line 14041 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("new");
+}
+#line 54204 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2465:
+#line 14045 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("next");
+}
+#line 54212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2466:
+#line 14049 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfc");
+}
+#line 54220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2467:
+#line 14053 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfd");
+}
+#line 54228 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2468:
+#line 14057 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfkc");
+}
+#line 54236 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2469:
+#line 14061 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nfkd");
+}
+#line 54244 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2470:
+#line 14065 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("no");
+}
+#line 54252 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2471:
+#line 14069 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("normalized");
+}
+#line 54260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2472:
+#line 14073 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nothing");
+}
+#line 54268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2473:
+#line 14077 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("notify");
+}
+#line 54276 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2474:
+#line 14081 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nowait");
+}
+#line 54284 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2475:
+#line 14085 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nulls");
+}
+#line 54292 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2476:
+#line 14089 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("object");
+}
+#line 54300 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2477:
+#line 14093 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("of");
+}
+#line 54308 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2478:
+#line 14097 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("off");
+}
+#line 54316 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2479:
+#line 14101 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("oids");
+}
+#line 54324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2480:
+#line 14105 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("old");
+}
+#line 54332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2481:
+#line 14109 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("operator");
+}
+#line 54340 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2482:
+#line 14113 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("option");
+}
+#line 54348 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2483:
+#line 14117 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("options");
+}
+#line 54356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2484:
+#line 14121 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("ordinality");
+}
+#line 54364 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2485:
+#line 14125 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("others");
+}
+#line 54372 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2486:
+#line 14129 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("over");
+}
+#line 54380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2487:
+#line 14133 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("overriding");
+}
+#line 54388 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2488:
+#line 14137 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("owned");
+}
+#line 54396 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2489:
+#line 14141 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("owner");
+}
+#line 54404 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2490:
+#line 14145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("parallel");
+}
+#line 54412 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2491:
+#line 14149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("parser");
+}
+#line 54420 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2492:
+#line 14153 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("partial");
+}
+#line 54428 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2493:
+#line 14157 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("partition");
+}
+#line 54436 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2494:
+#line 14161 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("passing");
+}
+#line 54444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2495:
+#line 14165 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("password");
+}
+#line 54452 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2496:
+#line 14169 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("plans");
+}
+#line 54460 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2497:
+#line 14173 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("policy");
+}
+#line 54468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2498:
+#line 14177 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("preceding");
+}
+#line 54476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2499:
+#line 14181 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("prepare");
+}
+#line 54484 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2500:
+#line 14185 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("prepared");
+}
+#line 54492 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2501:
+#line 14189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("preserve");
+}
+#line 54500 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2502:
+#line 14193 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("prior");
+}
+#line 54508 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2503:
+#line 14197 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("privileges");
+}
+#line 54516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2504:
+#line 14201 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("procedural");
+}
+#line 54524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2505:
+#line 14205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("procedure");
+}
+#line 54532 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2506:
+#line 14209 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("procedures");
+}
+#line 54540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2507:
+#line 14213 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("program");
+}
+#line 54548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2508:
+#line 14217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("publication");
+}
+#line 54556 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2509:
+#line 14221 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("quote");
+}
+#line 54564 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2510:
+#line 14225 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("range");
+}
+#line 54572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2511:
+#line 14229 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("read");
+}
+#line 54580 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2512:
+#line 14233 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("reassign");
+}
+#line 54588 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2513:
+#line 14237 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("recheck");
+}
+#line 54596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2514:
+#line 14241 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("recursive");
+}
+#line 54604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2515:
+#line 14245 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("ref");
+}
+#line 54612 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2516:
+#line 14249 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("referencing");
+}
+#line 54620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2517:
+#line 14253 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("refresh");
+}
+#line 54628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2518:
+#line 14257 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("reindex");
+}
+#line 54636 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2519:
+#line 14261 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("relative");
+}
+#line 54644 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2520:
+#line 14265 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("release");
+}
+#line 54652 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2521:
+#line 14269 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rename");
+}
+#line 54660 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2522:
+#line 14273 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("repeatable");
+}
+#line 54668 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2523:
+#line 14277 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("replace");
+}
+#line 54676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2524:
+#line 14281 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("replica");
+}
+#line 54684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2525:
+#line 14285 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("reset");
+}
+#line 54692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2526:
+#line 14289 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restart");
+}
+#line 54700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2527:
+#line 14293 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("restrict");
+}
+#line 54708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2528:
+#line 14297 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("returns");
+}
+#line 54716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2529:
+#line 14301 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("revoke");
+}
+#line 54724 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2530:
+#line 14305 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("role");
+}
+#line 54732 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2531:
+#line 14309 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rollback");
+}
+#line 54740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2532:
+#line 14313 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rollup");
+}
+#line 54748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2533:
+#line 14317 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("routine");
+}
+#line 54756 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2534:
+#line 14321 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("routines");
+}
+#line 54764 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2535:
+#line 14325 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rows");
+}
+#line 54772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2536:
+#line 14329 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("rule");
+}
+#line 54780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2537:
+#line 14333 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("savepoint");
+}
+#line 54788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2538:
+#line 14337 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schema");
+}
+#line 54796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2539:
+#line 14341 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("schemas");
+}
+#line 54804 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2540:
+#line 14345 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("scroll");
+}
+#line 54812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2541:
+#line 14349 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("search");
+}
+#line 54820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2542:
+#line 14353 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("security");
+}
+#line 54828 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2543:
+#line 14357 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sequence");
+}
+#line 54836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2544:
+#line 14361 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sequences");
+}
+#line 54844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2545:
+#line 14365 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("serializable");
+}
+#line 54852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2546:
+#line 14369 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("server");
+}
+#line 54860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2547:
+#line 14373 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("session");
+}
+#line 54868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2548:
+#line 14377 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("set");
+}
+#line 54876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2549:
+#line 14381 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sets");
+}
+#line 54884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2550:
+#line 14385 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("share");
+}
+#line 54892 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2551:
+#line 14389 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("show");
+}
+#line 54900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2552:
+#line 14393 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("simple");
+}
+#line 54908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2553:
+#line 14397 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("skip");
+}
+#line 54916 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2554:
+#line 14401 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("snapshot");
+}
+#line 54924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2555:
+#line 14405 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sql");
+}
+#line 54932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2556:
+#line 14409 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stable");
+}
+#line 54940 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2557:
+#line 14413 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("standalone");
+}
+#line 54948 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2558:
+#line 14417 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("start");
+}
+#line 54956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2559:
+#line 14421 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("statement");
+}
+#line 54964 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2560:
+#line 14425 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("statistics");
+}
+#line 54972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2561:
+#line 14429 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stdin");
+}
+#line 54980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2562:
+#line 14433 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stdout");
+}
+#line 54988 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2563:
+#line 14437 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("storage");
+}
+#line 54996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2564:
+#line 14441 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("stored");
+}
+#line 55004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2565:
+#line 14445 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("strict");
+}
+#line 55012 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2566:
+#line 14449 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("strip");
+}
+#line 55020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2567:
+#line 14453 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("subscription");
+}
+#line 55028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2568:
+#line 14457 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("support");
+}
+#line 55036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2569:
+#line 14461 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("sysid");
+}
+#line 55044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2570:
+#line 14465 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("system");
+}
+#line 55052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2571:
+#line 14469 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tables");
+}
+#line 55060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2572:
+#line 14473 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tablespace");
+}
+#line 55068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2573:
+#line 14477 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("temp");
+}
+#line 55076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2574:
+#line 14481 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("template");
+}
+#line 55084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2575:
+#line 14485 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("temporary");
+}
+#line 55092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2576:
+#line 14489 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("text");
+}
+#line 55100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2577:
+#line 14493 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("ties");
+}
+#line 55108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2578:
+#line 14497 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("transaction");
+}
+#line 55116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2579:
+#line 14501 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("transform");
+}
+#line 55124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2580:
+#line 14505 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("trigger");
+}
+#line 55132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2581:
+#line 14509 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("truncate");
+}
+#line 55140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2582:
+#line 14513 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("trusted");
+}
+#line 55148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2583:
+#line 14517 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("type");
+}
+#line 55156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2584:
+#line 14521 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("types");
+}
+#line 55164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2585:
+#line 14525 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("uescape");
+}
+#line 55172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2586:
+#line 14529 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unbounded");
+}
+#line 55180 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2587:
+#line 14533 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("uncommitted");
+}
+#line 55188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2588:
+#line 14537 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unencrypted");
+}
+#line 55196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2589:
+#line 14541 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unknown");
+}
+#line 55204 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2590:
+#line 14545 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unlisten");
+}
+#line 55212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2591:
+#line 14549 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unlogged");
+}
+#line 55220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2592:
+#line 14553 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("until");
+}
+#line 55228 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2593:
+#line 14557 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("update");
+}
+#line 55236 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2594:
+#line 14561 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("vacuum");
+}
+#line 55244 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2595:
+#line 14565 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("valid");
+}
+#line 55252 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2596:
+#line 14569 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("validate");
+}
+#line 55260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2597:
+#line 14573 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("validator");
+}
+#line 55268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2598:
+#line 14577 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("value");
+}
+#line 55276 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2599:
+#line 14581 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("varying");
+}
+#line 55284 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2600:
+#line 14585 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("version");
+}
+#line 55292 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2601:
+#line 14589 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("view");
+}
+#line 55300 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2602:
+#line 14593 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("views");
+}
+#line 55308 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2603:
+#line 14597 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("volatile");
+}
+#line 55316 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2604:
+#line 14601 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("whitespace");
+}
+#line 55324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2605:
+#line 14605 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("within");
+}
+#line 55332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2606:
+#line 14609 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("without");
+}
+#line 55340 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2607:
+#line 14613 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("work");
+}
+#line 55348 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2608:
+#line 14617 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("wrapper");
+}
+#line 55356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2609:
+#line 14621 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("write");
+}
+#line 55364 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2610:
+#line 14625 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xml");
+}
+#line 55372 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2611:
+#line 14629 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("yes");
+}
+#line 55380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2612:
+#line 14633 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("zone");
+}
+#line 55388 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2613:
+#line 14641 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("between");
+}
+#line 55396 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2614:
+#line 14645 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("bigint");
+}
+#line 55404 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2615:
+#line 14649 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("bit");
+}
+#line 55412 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2616:
+#line 14653 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("boolean");
+}
+#line 55420 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2617:
+#line 14657 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("character");
+}
+#line 55428 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2618:
+#line 14661 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("coalesce");
+}
+#line 55436 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2619:
+#line 14665 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("dec");
+}
+#line 55444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2620:
+#line 14669 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("decimal");
+}
+#line 55452 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2621:
+#line 14673 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("exists");
+}
+#line 55460 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2622:
+#line 14677 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("extract");
+}
+#line 55468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2623:
+#line 14681 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("float");
+}
+#line 55476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2624:
+#line 14685 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("greatest");
+}
+#line 55484 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2625:
+#line 14689 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("grouping");
+}
+#line 55492 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2626:
+#line 14693 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inout");
+}
+#line 55500 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2627:
+#line 14697 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("integer");
+}
+#line 55508 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2628:
+#line 14701 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("interval");
+}
+#line 55516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2629:
+#line 14705 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("least");
+}
+#line 55524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2630:
+#line 14709 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("national");
+}
+#line 55532 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2631:
+#line 14713 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nchar");
+}
+#line 55540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2632:
+#line 14717 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("none");
+}
+#line 55548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2633:
+#line 14721 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("normalize");
+}
+#line 55556 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2634:
+#line 14725 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("nullif");
+}
+#line 55564 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2635:
+#line 14729 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("numeric");
+}
+#line 55572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2636:
+#line 14733 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("out");
+}
+#line 55580 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2637:
+#line 14737 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("overlay");
+}
+#line 55588 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2638:
+#line 14741 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("position");
+}
+#line 55596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2639:
+#line 14745 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("precision");
+}
+#line 55604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2640:
+#line 14749 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("real");
+}
+#line 55612 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2641:
+#line 14753 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("row");
+}
+#line 55620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2642:
+#line 14757 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("setof");
+}
+#line 55628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2643:
+#line 14761 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("smallint");
+}
+#line 55636 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2644:
+#line 14765 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("substring");
+}
+#line 55644 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2645:
+#line 14769 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("time");
+}
+#line 55652 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2646:
+#line 14773 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("timestamp");
+}
+#line 55660 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2647:
+#line 14777 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("treat");
+}
+#line 55668 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2648:
+#line 14781 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("trim");
+}
+#line 55676 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2649:
+#line 14785 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("varchar");
+}
+#line 55684 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2650:
+#line 14789 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlattributes");
+}
+#line 55692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2651:
+#line 14793 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlconcat");
+}
+#line 55700 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2652:
+#line 14797 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlelement");
+}
+#line 55708 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2653:
+#line 14801 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlexists");
+}
+#line 55716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2654:
+#line 14805 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlforest");
+}
+#line 55724 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2655:
+#line 14809 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlnamespaces");
+}
+#line 55732 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2656:
+#line 14813 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlparse");
+}
+#line 55740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2657:
+#line 14817 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlpi");
+}
+#line 55748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2658:
+#line 14821 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlroot");
+}
+#line 55756 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2659:
+#line 14825 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmlserialize");
+}
+#line 55764 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2660:
+#line 14829 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("xmltable");
+}
+#line 55772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2661:
+#line 14837 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("authorization");
+}
+#line 55780 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2662:
+#line 14841 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("binary");
+}
+#line 55788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2663:
+#line 14845 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("collation");
+}
+#line 55796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2664:
+#line 14849 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("concurrently");
+}
+#line 55804 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2665:
+#line 14853 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cross");
+}
+#line 55812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2666:
+#line 14857 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_schema");
+}
+#line 55820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2667:
+#line 14861 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("freeze");
+}
+#line 55828 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2668:
+#line 14865 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("full");
+}
+#line 55836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2669:
+#line 14869 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("ilike");
+}
+#line 55844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2670:
+#line 14873 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("inner");
+}
+#line 55852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2671:
+#line 14877 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("is");
+}
+#line 55860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2672:
+#line 14881 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("isnull");
+}
+#line 55868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2673:
+#line 14885 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("join");
+}
+#line 55876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2674:
+#line 14889 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("left");
+}
+#line 55884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2675:
+#line 14893 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("like");
+}
+#line 55892 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2676:
+#line 14897 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("natural");
+}
+#line 55900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2677:
+#line 14901 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("notnull");
+}
+#line 55908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2678:
+#line 14905 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("outer");
+}
+#line 55916 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2679:
+#line 14909 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("overlaps");
+}
+#line 55924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2680:
+#line 14913 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("right");
+}
+#line 55932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2681:
+#line 14917 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("similar");
+}
+#line 55940 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2682:
+#line 14921 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("tablesample");
+}
+#line 55948 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2683:
+#line 14925 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("verbose");
+}
+#line 55956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2684:
+#line 14933 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("all");
+}
+#line 55964 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2685:
+#line 14937 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("analyse");
+}
+#line 55972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2686:
+#line 14941 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("analyze");
+}
+#line 55980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2687:
+#line 14945 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("and");
+}
+#line 55988 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2688:
+#line 14949 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("any");
+}
+#line 55996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2689:
+#line 14953 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("array");
+}
+#line 56004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2690:
+#line 14957 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("as");
+}
+#line 56012 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2691:
+#line 14961 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("asc");
+}
+#line 56020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2692:
+#line 14965 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("asymmetric");
+}
+#line 56028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2693:
+#line 14969 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("both");
+}
+#line 56036 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2694:
+#line 14973 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("case");
+}
+#line 56044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2695:
+#line 14977 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("cast");
+}
+#line 56052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2696:
+#line 14981 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("check");
+}
+#line 56060 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2697:
+#line 14985 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("collate");
+}
+#line 56068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2698:
+#line 14989 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("column");
+}
+#line 56076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2699:
+#line 14993 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("constraint");
+}
+#line 56084 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2700:
+#line 14997 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("create");
+}
+#line 56092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2701:
+#line 15001 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_catalog");
+}
+#line 56100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2702:
+#line 15005 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_date");
+}
+#line 56108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2703:
+#line 15009 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_role");
+}
+#line 56116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2704:
+#line 15013 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_time");
+}
+#line 56124 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2705:
+#line 15017 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_timestamp");
+}
+#line 56132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2706:
+#line 15021 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("current_user");
+}
+#line 56140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2707:
+#line 15025 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("default");
+}
+#line 56148 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2708:
+#line 15029 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("deferrable");
+}
+#line 56156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2709:
+#line 15033 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("desc");
+}
+#line 56164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2710:
+#line 15037 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("distinct");
+}
+#line 56172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2711:
+#line 15041 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("do");
+}
+#line 56180 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2712:
+#line 15045 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("else");
+}
+#line 56188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2713:
+#line 15049 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("end");
+}
+#line 56196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2714:
+#line 15053 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("except");
+}
+#line 56204 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2715:
+#line 15057 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("false");
+}
+#line 56212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2716:
+#line 15061 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("fetch");
+}
+#line 56220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2717:
+#line 15065 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("for");
+}
+#line 56228 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2718:
+#line 15069 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("foreign");
+}
+#line 56236 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2719:
+#line 15073 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("from");
+}
+#line 56244 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2720:
+#line 15077 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("grant");
+}
+#line 56252 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2721:
+#line 15081 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("group");
+}
+#line 56260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2722:
+#line 15085 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("having");
+}
+#line 56268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2723:
+#line 15089 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("in");
+}
+#line 56276 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2724:
+#line 15093 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("initially");
+}
+#line 56284 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2725:
+#line 15097 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("intersect");
+}
+#line 56292 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2726:
+#line 15101 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("into");
+}
+#line 56300 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2727:
+#line 15105 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("lateral");
+}
+#line 56308 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2728:
+#line 15109 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("leading");
+}
+#line 56316 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2729:
+#line 15113 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("limit");
+}
+#line 56324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2730:
+#line 15117 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("localtime");
+}
+#line 56332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2731:
+#line 15121 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("localtimestamp");
+}
+#line 56340 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2732:
+#line 15125 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("not");
+}
+#line 56348 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2733:
+#line 15129 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("null");
+}
+#line 56356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2734:
+#line 15133 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("offset");
+}
+#line 56364 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2735:
+#line 15137 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("on");
+}
+#line 56372 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2736:
+#line 15141 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("only");
+}
+#line 56380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2737:
+#line 15145 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("or");
+}
+#line 56388 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2738:
+#line 15149 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("order");
+}
+#line 56396 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2739:
+#line 15153 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("placing");
+}
+#line 56404 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2740:
+#line 15157 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("primary");
+}
+#line 56412 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2741:
+#line 15161 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("references");
+}
+#line 56420 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2742:
+#line 15165 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("returning");
+}
+#line 56428 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2743:
+#line 15169 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("select");
+}
+#line 56436 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2744:
+#line 15173 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("session_user");
+}
+#line 56444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2745:
+#line 15177 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("some");
+}
+#line 56452 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2746:
+#line 15181 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("symmetric");
+}
+#line 56460 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2747:
+#line 15185 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("table");
+}
+#line 56468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2748:
+#line 15189 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("then");
+}
+#line 56476 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2749:
+#line 15193 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("trailing");
+}
+#line 56484 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2750:
+#line 15197 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("true");
+}
+#line 56492 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2751:
+#line 15201 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("unique");
+}
+#line 56500 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2752:
+#line 15205 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("user");
+}
+#line 56508 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2753:
+#line 15209 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("using");
+}
+#line 56516 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2754:
+#line 15213 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("variadic");
+}
+#line 56524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2755:
+#line 15217 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("when");
+}
+#line 56532 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2756:
+#line 15221 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("where");
+}
+#line 56540 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2757:
+#line 15225 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("window");
+}
+#line 56548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2758:
+#line 15229 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("with");
+}
+#line 56556 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2761:
+#line 15242 "preproc.y" /* yacc.c:1652 */
+ { connection = NULL; }
+#line 56562 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2763:
+#line 15245 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout, "%s", (yyvsp[0].str));
+ free((yyvsp[0].str));
+ output_line_number();
+ }
+#line 56572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2765:
+#line 15251 "preproc.y" /* yacc.c:1652 */
+ { fprintf(base_yyout, "%s", (yyvsp[0].str)); free((yyvsp[0].str)); }
+#line 56578 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2766:
+#line 15252 "preproc.y" /* yacc.c:1652 */
+ { fprintf(base_yyout, "%s", (yyvsp[0].str)); free((yyvsp[0].str)); }
+#line 56584 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2767:
+#line 15253 "preproc.y" /* yacc.c:1652 */
+ { braces_open++; fputs("{", base_yyout); }
+#line 56590 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2768:
+#line 15255 "preproc.y" /* yacc.c:1652 */
+ {
+ remove_typedefs(braces_open);
+ remove_variables(braces_open--);
+ if (braces_open == 0)
+ {
+ free(current_function);
+ current_function = NULL;
+ }
+ fputs("}", base_yyout);
+ }
+#line 56605 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2769:
+#line 15267 "preproc.y" /* yacc.c:1652 */
+ {FoundInto = 0;}
+#line 56611 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2770:
+#line 15268 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56622 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2771:
+#line 15274 "preproc.y" /* yacc.c:1652 */
+ {FoundInto = 0;}
+#line 56628 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2772:
+#line 15275 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56639 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2773:
+#line 15284 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56653 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2774:
+#line 15299 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(5, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str), mm_strdup(","), (yyvsp[-1].str)); }
+#line 56659 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2775:
+#line 15301 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("NULL, NULL, NULL, \"DEFAULT\""); }
+#line 56665 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2776:
+#line 15304 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("NULL,"), (yyvsp[0].str), mm_strdup(", NULL")); }
+#line 56671 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2777:
+#line 15306 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[0].str), mm_strdup(", NULL, NULL, NULL")); }
+#line 56677 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2778:
+#line 15310 "preproc.y" /* yacc.c:1652 */
+ {
+ /* 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 56693 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2779:
+#line 15322 "preproc.y" /* yacc.c:1652 */
+ {
+ /* 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 56713 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2780:
+#line 15338 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 56721 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2781:
+#line 15342 "preproc.y" /* yacc.c:1652 */
+ {
+ /* 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 56734 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2782:
+#line 15352 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 56740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2783:
+#line 15353 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 56746 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2784:
+#line 15357 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56760 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2785:
+#line 15369 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56771 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2786:
+#line 15377 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 56777 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2787:
+#line 15378 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 56783 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2788:
+#line 15381 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 56789 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2789:
+#line 15382 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make3_str((yyvsp[-2].str), mm_strdup("."), (yyvsp[0].str)); }
+#line 56795 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2790:
+#line 15383 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make_name(); }
+#line 56801 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2791:
+#line 15386 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make2_str(mm_strdup(":"), (yyvsp[0].str)); }
+#line 56807 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2792:
+#line 15387 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 56813 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2793:
+#line 15390 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 56819 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2794:
+#line 15391 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("NULL"); }
+#line 56825 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2795:
+#line 15394 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 56831 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2796:
+#line 15395 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("NULL, NULL"); }
+#line 56837 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2797:
+#line 15399 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[0].str), mm_strdup(", NULL")); }
+#line 56843 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2798:
+#line 15401 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 56849 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2799:
+#line 15403 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-3].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 56855 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2800:
+#line 15405 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 56861 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2801:
+#line 15409 "preproc.y" /* yacc.c:1652 */
+ {
+ if ((yyvsp[0].str)[0] == '\"')
+ (yyval.str) = (yyvsp[0].str);
+ else
+ (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\""));
+ }
+#line 56872 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2802:
+#line 15416 "preproc.y" /* yacc.c:1652 */
+ {
+ if ((yyvsp[0].str)[0] == '\"')
+ (yyval.str) = (yyvsp[0].str);
+ else
+ (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\""));
+ }
+#line 56883 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2803:
+#line 15423 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56901 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2804:
+#line 15439 "preproc.y" /* yacc.c:1652 */
+ {
+ /* 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 56937 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2805:
+#line 15473 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56951 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2806:
+#line 15482 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 56957 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2807:
+#line 15486 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = make2_str((yyvsp[-1].str), (yyvsp[0].str));
+ }
+#line 56965 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2808:
+#line 15490 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 56979 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2809:
+#line 15502 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 56985 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2810:
+#line 15504 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make2_str(mm_strdup("="), (yyvsp[0].str)); }
+#line 56991 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2811:
+#line 15506 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make2_str(mm_strdup("="), (yyvsp[0].str)); }
+#line 56997 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2812:
+#line 15508 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make2_str(mm_strdup("="), (yyvsp[0].str)); }
+#line 57003 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2813:
+#line 15512 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57021 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2814:
+#line 15525 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57027 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2815:
+#line 15533 "preproc.y" /* yacc.c:1652 */
+ {
+ 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));
+ const char *con = connection ? connection : "NULL";
+ char *comment;
+
+ 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;
+ 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 57086 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2816:
+#line 15590 "preproc.y" /* yacc.c:1652 */
+ {
+ /* execute immediate means prepare the statement and
+ * immediately execute it */
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 57096 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2818:
+#line 15600 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57102 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2819:
+#line 15601 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57108 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2820:
+#line 15604 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57114 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2821:
+#line 15606 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57120 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2822:
+#line 15607 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 57126 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2823:
+#line 15610 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57132 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2824:
+#line 15611 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("year to minute"); }
+#line 57138 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2825:
+#line 15612 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("year to second"); }
+#line 57144 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2826:
+#line 15613 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("day to day"); }
+#line 57150 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2827:
+#line 15614 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("month to month"); }
+#line 57156 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2828:
+#line 15621 "preproc.y" /* yacc.c:1652 */
+ { fputs("/* exec sql begin declare section */", base_yyout); }
+#line 57162 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2829:
+#line 15623 "preproc.y" /* yacc.c:1652 */
+ {
+ fprintf(base_yyout, "%s/* exec sql end declare section */", (yyvsp[-1].str));
+ free((yyvsp[-1].str));
+ output_line_number();
+ }
+#line 57172 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2830:
+#line 15630 "preproc.y" /* yacc.c:1652 */
+ {}
+#line 57178 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2831:
+#line 15632 "preproc.y" /* yacc.c:1652 */
+ {}
+#line 57184 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2832:
+#line 15634 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 57190 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2833:
+#line 15635 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2834:
+#line 15638 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57202 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2835:
+#line 15639 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57208 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2836:
+#line 15640 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 57214 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2837:
+#line 15641 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 57220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2838:
+#line 15644 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57226 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2839:
+#line 15645 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 57232 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2840:
+#line 15649 "preproc.y" /* yacc.c:1652 */
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+#line 57242 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2841:
+#line 15655 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57254 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2842:
+#line 15665 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57268 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2843:
+#line 15675 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(5, actual_startline[struct_level], (yyvsp[-4].str), (yyvsp[-3].type).type_str, (yyvsp[-1].str), mm_strdup(";\n"));
+ }
+#line 57276 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2844:
+#line 15679 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57290 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2845:
+#line 15689 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat_str(4, actual_startline[struct_level], (yyvsp[-3].type).type_str, (yyvsp[-1].str), mm_strdup(";\n"));
+ }
+#line 57298 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2846:
+#line 15693 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = cat2_str((yyvsp[-1].str), mm_strdup(";"));
+ }
+#line 57306 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2847:
+#line 15698 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) =cat2_str(mm_strdup(":"), (yyvsp[0].str)); }
+#line 57312 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2848:
+#line 15699 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 57318 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2849:
+#line 15703 "preproc.y" /* yacc.c:1652 */
+ {(yyval.str) = cat2_str ((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 57324 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2850:
+#line 15704 "preproc.y" /* yacc.c:1652 */
+ {(yyval.str) = (yyvsp[0].str); }
+#line 57330 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2851:
+#line 15705 "preproc.y" /* yacc.c:1652 */
+ {(yyval.str) = (yyvsp[0].str); }
+#line 57336 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2852:
+#line 15708 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("extern"); }
+#line 57342 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2853:
+#line 15709 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("static"); }
+#line 57348 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2854:
+#line 15710 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("register"); }
+#line 57354 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2855:
+#line 15711 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("auto"); }
+#line 57360 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2856:
+#line 15714 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("const"); }
+#line 57366 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2857:
+#line 15715 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("volatile"); }
+#line 57372 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2858:
+#line 15719 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 57384 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2859:
+#line 15727 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 57405 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2860:
+#line 15744 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 57417 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2861:
+#line 15752 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57444 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2862:
+#line 15775 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57562 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2863:
+#line 15889 "preproc.y" /* yacc.c:1652 */
+ {
+ /* 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 57598 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2864:
+#line 15923 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("enum"), (yyvsp[-1].str), (yyvsp[0].str)); }
+#line 57604 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2865:
+#line 15925 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str(mm_strdup("enum"), (yyvsp[0].str)); }
+#line 57610 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2866:
+#line 15927 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str(mm_strdup("enum"), (yyvsp[0].str)); }
+#line 57616 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2867:
+#line 15931 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("{"), (yyvsp[-1].str), mm_strdup("}")); }
+#line 57622 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2868:
+#line 15934 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57633 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2869:
+#line 15941 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57679 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2870:
+#line 15984 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57685 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2871:
+#line 15986 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57695 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2872:
+#line 15992 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57706 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2873:
+#line 16001 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 57716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2874:
+#line 16007 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.struct_union).su = mm_strdup("union");
+ (yyval.struct_union).symbol = (yyvsp[0].str);
+ }
+#line 57725 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2875:
+#line 16014 "preproc.y" /* yacc.c:1652 */
+ {
+ ECPGstruct_sizeof = mm_strdup(""); /* This must not be NULL to distinguish from simple types. */
+ (yyval.str) = mm_strdup("struct");
+ }
+#line 57734 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2876:
+#line 16019 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = mm_strdup("union");
+ }
+#line 57742 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2877:
+#line 16024 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum)=(yyvsp[0].type_enum); }
+#line 57748 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2878:
+#line 16025 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum)=(yyvsp[0].type_enum); }
+#line 57754 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2879:
+#line 16028 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_short; }
+#line 57760 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2880:
+#line 16029 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_short; }
+#line 57766 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2881:
+#line 16030 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_int; }
+#line 57772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2882:
+#line 16031 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_int; }
+#line 57778 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2883:
+#line 16032 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_long; }
+#line 57784 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2884:
+#line 16033 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_long; }
+#line 57790 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2885:
+#line 16034 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_long_long; }
+#line 57796 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2886:
+#line 16035 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_long_long; }
+#line 57802 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2887:
+#line 16036 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_unsigned_char; }
+#line 57808 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2888:
+#line 16039 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_short; }
+#line 57814 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2889:
+#line 16040 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_short; }
+#line 57820 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2890:
+#line 16041 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_int; }
+#line 57826 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2891:
+#line 16042 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_long; }
+#line 57832 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2892:
+#line 16043 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_long; }
+#line 57838 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2893:
+#line 16044 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_long_long; }
+#line 57844 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2894:
+#line 16045 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_long_long; }
+#line 57850 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2895:
+#line 16046 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_bool; }
+#line 57856 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2896:
+#line 16047 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_char; }
+#line 57862 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2897:
+#line 16048 "preproc.y" /* yacc.c:1652 */
+ { (yyval.type_enum) = ECPGt_double; }
+#line 57868 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2900:
+#line 16056 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 57874 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2901:
+#line 16058 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57885 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2902:
+#line 16067 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 57986 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2903:
+#line 16166 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 57992 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2904:
+#line 16168 "preproc.y" /* yacc.c:1652 */
+ {
+ initializer = 1;
+ (yyval.str) = cat2_str(mm_strdup("="), (yyvsp[0].str));
+ }
+#line 58001 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2905:
+#line 16174 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58007 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2906:
+#line 16175 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("*"); }
+#line 58013 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2907:
+#line 16176 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("**"); }
+#line 58019 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2908:
+#line 16183 "preproc.y" /* yacc.c:1652 */
+ {
+ /* this is only supported for compatibility */
+ (yyval.str) = cat_str(3, mm_strdup("/* declare statement"), (yyvsp[0].str), mm_strdup("*/"));
+ }
+#line 58028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2909:
+#line 16191 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58034 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2910:
+#line 16194 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58040 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2911:
+#line 16195 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("\"CURRENT\""); }
+#line 58046 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2912:
+#line 16196 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("\"ALL\""); }
+#line 58052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2913:
+#line 16197 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("\"CURRENT\""); }
+#line 58058 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2914:
+#line 16200 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 58064 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2915:
+#line 16201 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("\"DEFAULT\""); }
+#line 58070 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2916:
+#line 16202 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2917:
+#line 16206 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58082 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2918:
+#line 16208 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 58088 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2919:
+#line 16215 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58094 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2920:
+#line 16216 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("all"); }
+#line 58100 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2921:
+#line 16223 "preproc.y" /* yacc.c:1652 */
+ {
+ if ((yyvsp[-1].str)[0] == ':')
+ remove_variable_from_list(&argsinsert, find_variable((yyvsp[-1].str) + 1));
+ (yyval.str) = (yyvsp[-1].str);
+ }
+#line 58110 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2922:
+#line 16230 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2923:
+#line 16231 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58122 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2924:
+#line 16234 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58128 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2925:
+#line 16235 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58134 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2926:
+#line 16239 "preproc.y" /* yacc.c:1652 */
+ {
+ add_variable_to_head(&argsinsert, descriptor_variable((yyvsp[0].str),0), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 58143 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2927:
+#line 16244 "preproc.y" /* yacc.c:1652 */
+ {
+ add_variable_to_head(&argsinsert, sqlda_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 58152 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2928:
+#line 16251 "preproc.y" /* yacc.c:1652 */
+ {
+ add_variable_to_head(&argsresult, descriptor_variable((yyvsp[0].str),1), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 58161 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2929:
+#line 16256 "preproc.y" /* yacc.c:1652 */
+ {
+ add_variable_to_head(&argsresult, sqlda_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 58170 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2930:
+#line 16263 "preproc.y" /* yacc.c:1652 */
+ {
+ add_variable_to_head(&argsresult, sqlda_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = EMPTY;
+ }
+#line 58179 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2933:
+#line 16272 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58190 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2934:
+#line 16278 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58196 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2935:
+#line 16279 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58202 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2936:
+#line 16282 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58208 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2937:
+#line 16283 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(2, mm_strdup("+"), (yyvsp[0].str)); }
+#line 58214 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2938:
+#line 16284 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(2, mm_strdup("-"), (yyvsp[0].str)); }
+#line 58220 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2939:
+#line 16285 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58226 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2940:
+#line 16286 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(2, mm_strdup("+"), (yyvsp[0].str)); }
+#line 58232 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2941:
+#line 16287 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(2, mm_strdup("-"), (yyvsp[0].str)); }
+#line 58238 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2942:
+#line 16288 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58244 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2943:
+#line 16289 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58250 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2944:
+#line 16290 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58256 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2945:
+#line 16297 "preproc.y" /* yacc.c:1652 */
+ {
+ const char *con = connection ? connection : "NULL";
+ mmerror(PARSE_ERROR, ET_WARNING, "using unsupported DESCRIBE statement");
+ (yyval.str) = (char *) mm_alloc(sizeof("1, , ") + strlen(con) + strlen((yyvsp[-1].str)));
+ sprintf((yyval.str), "1, %s, %s", con, (yyvsp[-1].str));
+ }
+#line 58267 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2946:
+#line 16304 "preproc.y" /* yacc.c:1652 */
+ {
+ const char *con = connection ? connection : "NULL";
+ struct variable *var;
+
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+
+ (yyval.str) = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen((yyvsp[-1].str)));
+ sprintf((yyval.str), "0, %s, %s", con, (yyvsp[-1].str));
+ }
+#line 58283 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2947:
+#line 16316 "preproc.y" /* yacc.c:1652 */
+ {
+ const char *con = connection ? connection : "NULL";
+ (yyval.str) = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen((yyvsp[-1].str)));
+ sprintf((yyval.str), "0, %s, %s", con, (yyvsp[-1].str));
+ }
+#line 58293 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2948:
+#line 16322 "preproc.y" /* yacc.c:1652 */
+ {
+ const char *con = connection ? connection : "NULL";
+ mmerror(PARSE_ERROR, ET_WARNING, "using unsupported DESCRIBE statement");
+ (yyval.str) = (char *) mm_alloc(sizeof("1, , ") + strlen(con) + strlen((yyvsp[-1].str)));
+ sprintf((yyval.str), "1, %s, %s", con, (yyvsp[-1].str));
+ }
+#line 58304 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2949:
+#line 16329 "preproc.y" /* yacc.c:1652 */
+ {
+ const char *con = connection ? connection : "NULL";
+ (yyval.str) = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen((yyvsp[-1].str)));
+ sprintf((yyval.str), "0, %s, %s", con, (yyvsp[-1].str));
+ }
+#line 58314 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2950:
+#line 16336 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("output"); }
+#line 58320 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2951:
+#line 16337 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58326 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2952:
+#line 16350 "preproc.y" /* yacc.c:1652 */
+ {
+ add_descriptor((yyvsp[0].str),connection);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 58335 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2953:
+#line 16361 "preproc.y" /* yacc.c:1652 */
+ {
+ drop_descriptor((yyvsp[0].str),connection);
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 58344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2954:
+#line 16372 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 58350 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2957:
+#line 16380 "preproc.y" /* yacc.c:1652 */
+ { push_assignment((yyvsp[-2].str), (yyvsp[0].dtype_enum)); }
+#line 58356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2958:
+#line 16385 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[-1].str); }
+#line 58362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2961:
+#line 16393 "preproc.y" /* yacc.c:1652 */
+ {
+ push_assignment((yyvsp[0].str), (yyvsp[-2].dtype_enum));
+ }
+#line 58370 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2962:
+#line 16399 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58382 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2963:
+#line 16407 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 58390 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2964:
+#line 16412 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_count; }
+#line 58396 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2965:
+#line 16420 "preproc.y" /* yacc.c:1652 */
+ { (yyval.descriptor).str = (yyvsp[-1].str); (yyval.descriptor).name = (yyvsp[-3].str); }
+#line 58402 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2968:
+#line 16427 "preproc.y" /* yacc.c:1652 */
+ { push_assignment((yyvsp[-2].str), (yyvsp[0].dtype_enum)); }
+#line 58408 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2969:
+#line 16431 "preproc.y" /* yacc.c:1652 */
+ { (yyval.descriptor).str = (yyvsp[-1].str); (yyval.descriptor).name = (yyvsp[-3].str); }
+#line 58414 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2972:
+#line 16439 "preproc.y" /* yacc.c:1652 */
+ {
+ push_assignment((yyvsp[0].str), (yyvsp[-2].dtype_enum));
+ }
+#line 58422 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2973:
+#line 16445 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58434 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2974:
+#line 16454 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.str) = (yyvsp[0].str);
+ }
+#line 58442 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2975:
+#line 16459 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58455 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2976:
+#line 16469 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58468 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2977:
+#line 16479 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58482 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2978:
+#line 16490 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_cardinality; }
+#line 58488 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2979:
+#line 16491 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_data; }
+#line 58494 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2980:
+#line 16492 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_di_code; }
+#line 58500 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2981:
+#line 16493 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_di_precision; }
+#line 58506 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2982:
+#line 16494 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_indicator; }
+#line 58512 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2983:
+#line 16495 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_key_member; }
+#line 58518 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2984:
+#line 16496 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_length; }
+#line 58524 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2985:
+#line 16497 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_name; }
+#line 58530 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2986:
+#line 16498 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_nullable; }
+#line 58536 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2987:
+#line 16499 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_octet; }
+#line 58542 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2988:
+#line 16500 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_precision; }
+#line 58548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2989:
+#line 16501 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_length; }
+#line 58554 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2990:
+#line 16502 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_ret_octet; }
+#line 58560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2991:
+#line 16503 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_scale; }
+#line 58566 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2992:
+#line 16504 "preproc.y" /* yacc.c:1652 */
+ { (yyval.dtype_enum) = ECPGd_type; }
+#line 58572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2993:
+#line 16511 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58578 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2994:
+#line 16512 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58584 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2995:
+#line 16515 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("on"); }
+#line 58590 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2996:
+#line 16516 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("off"); }
+#line 58596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2997:
+#line 16523 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58602 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2998:
+#line 16524 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58608 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 2999:
+#line 16525 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58614 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3000:
+#line 16532 "preproc.y" /* yacc.c:1652 */
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+#line 58624 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3001:
+#line 16538 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58637 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3002:
+#line 16548 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("reference"); }
+#line 58643 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3003:
+#line 16549 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 58649 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3004:
+#line 16556 "preproc.y" /* yacc.c:1652 */
+ {
+ /* reset this variable so we see if there was */
+ /* an initializer specified */
+ initializer = 0;
+ }
+#line 58659 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3005:
+#line 16562 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58722 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3006:
+#line 16627 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58732 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3007:
+#line 16633 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58742 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3008:
+#line 16639 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 58752 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3009:
+#line 16647 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.action).code = W_NOTHING;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("continue");
+ }
+#line 58762 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3010:
+#line 16653 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.action).code = W_SQLPRINT;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("sqlprint");
+ }
+#line 58772 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3011:
+#line 16659 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.action).code = W_STOP;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("stop");
+ }
+#line 58782 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3012:
+#line 16665 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 58792 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3013:
+#line 16671 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 58802 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3014:
+#line 16677 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 58812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3015:
+#line 16683 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.action).code = W_BREAK;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("break");
+ }
+#line 58822 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3016:
+#line 16689 "preproc.y" /* yacc.c:1652 */
+ {
+ (yyval.action).code = W_CONTINUE;
+ (yyval.action).command = NULL;
+ (yyval.action).str = mm_strdup("continue");
+ }
+#line 58832 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3017:
+#line 16695 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 58842 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3018:
+#line 16701 "preproc.y" /* yacc.c:1652 */
+ {
+ (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 58852 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3019:
+#line 16711 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58858 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3020:
+#line 16712 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 58864 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3021:
+#line 16715 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("break"); }
+#line 58870 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3022:
+#line 16716 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("cardinality"); }
+#line 58876 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3023:
+#line 16717 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("count"); }
+#line 58882 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3024:
+#line 16718 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("datetime_interval_code"); }
+#line 58888 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3025:
+#line 16719 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("datetime_interval_precision"); }
+#line 58894 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3026:
+#line 16720 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("found"); }
+#line 58900 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3027:
+#line 16721 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("go"); }
+#line 58906 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3028:
+#line 16722 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("goto"); }
+#line 58912 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3029:
+#line 16723 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("identified"); }
+#line 58918 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3030:
+#line 16724 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("indicator"); }
+#line 58924 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3031:
+#line 16725 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("key_member"); }
+#line 58930 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3032:
+#line 16726 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("length"); }
+#line 58936 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3033:
+#line 16727 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("nullable"); }
+#line 58942 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3034:
+#line 16728 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("octet_length"); }
+#line 58948 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3035:
+#line 16729 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("returned_length"); }
+#line 58954 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3036:
+#line 16730 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("returned_octet_length"); }
+#line 58960 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3037:
+#line 16731 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("scale"); }
+#line 58966 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3038:
+#line 16732 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("section"); }
+#line 58972 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3039:
+#line 16733 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("sqlerror"); }
+#line 58978 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3040:
+#line 16734 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("sqlprint"); }
+#line 58984 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3041:
+#line 16735 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("sqlwarning"); }
+#line 58990 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3042:
+#line 16736 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("stop"); }
+#line 58996 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3043:
+#line 16739 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("connect"); }
+#line 59002 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3044:
+#line 16740 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("describe"); }
+#line 59008 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3045:
+#line 16741 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("disconnect"); }
+#line 59014 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3046:
+#line 16742 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("open"); }
+#line 59020 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3047:
+#line 16743 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("var"); }
+#line 59026 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3048:
+#line 16744 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("whenever"); }
+#line 59032 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3049:
+#line 16748 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("bool"); }
+#line 59038 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3050:
+#line 16749 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("long"); }
+#line 59044 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3051:
+#line 16750 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("output"); }
+#line 59050 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3052:
+#line 16751 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("short"); }
+#line 59056 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3053:
+#line 16752 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("struct"); }
+#line 59062 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3054:
+#line 16753 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("signed"); }
+#line 59068 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3055:
+#line 16754 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("unsigned"); }
+#line 59074 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3056:
+#line 16757 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59080 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3057:
+#line 16760 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59086 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3058:
+#line 16761 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59092 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3059:
+#line 16762 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59098 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3060:
+#line 16763 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59104 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3061:
+#line 16764 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59110 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3062:
+#line 16765 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3063:
+#line 16766 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("char"); }
+#line 59122 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3064:
+#line 16767 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("values"); }
+#line 59128 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3065:
+#line 16780 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59134 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3066:
+#line 16781 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3067:
+#line 16782 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59146 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3068:
+#line 16783 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59152 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3069:
+#line 16784 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59158 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3070:
+#line 16785 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("char"); }
+#line 59164 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3071:
+#line 16786 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("values"); }
+#line 59170 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3072:
+#line 16791 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59176 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3073:
+#line 16792 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59182 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3074:
+#line 16793 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59188 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3075:
+#line 16794 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59194 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3076:
+#line 16795 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59200 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3077:
+#line 16796 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59206 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3078:
+#line 16802 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59212 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3079:
+#line 16803 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59218 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3080:
+#line 16804 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("char"); }
+#line 59224 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3081:
+#line 16805 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("current"); }
+#line 59230 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3082:
+#line 16806 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("input"); }
+#line 59236 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3083:
+#line 16807 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("int"); }
+#line 59242 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3084:
+#line 16808 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("to"); }
+#line 59248 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3085:
+#line 16809 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("union"); }
+#line 59254 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3086:
+#line 16810 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("values"); }
+#line 59260 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3087:
+#line 16811 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59266 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3088:
+#line 16812 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59272 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3089:
+#line 16815 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59278 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3090:
+#line 16816 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59284 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3091:
+#line 16817 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59290 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3092:
+#line 16818 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59296 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3093:
+#line 16819 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("connection"); }
+#line 59302 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3094:
+#line 16822 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59308 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3095:
+#line 16823 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59314 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3096:
+#line 16824 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59320 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3097:
+#line 16825 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59326 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3098:
+#line 16828 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("auto"); }
+#line 59332 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3099:
+#line 16829 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("const"); }
+#line 59338 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3100:
+#line 16830 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("extern"); }
+#line 59344 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3101:
+#line 16831 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("register"); }
+#line 59350 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3102:
+#line 16832 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("static"); }
+#line 59356 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3103:
+#line 16833 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("typedef"); }
+#line 59362 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3104:
+#line 16834 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("volatile"); }
+#line 59368 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3105:
+#line 16851 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59374 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3106:
+#line 16852 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59380 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3107:
+#line 16853 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("connection"); }
+#line 59386 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3108:
+#line 16856 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("day"); }
+#line 59392 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3109:
+#line 16857 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("hour"); }
+#line 59398 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3110:
+#line 16858 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("minute"); }
+#line 59404 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3111:
+#line 16859 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("month"); }
+#line 59410 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3112:
+#line 16860 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("second"); }
+#line 59416 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3113:
+#line 16861 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("year"); }
+#line 59422 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3116:
+#line 16868 "preproc.y" /* yacc.c:1652 */
+ {
+ reset_variables();
+ pacounter = 1;
+ }
+#line 59431 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3117:
+#line 16874 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 59437 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3118:
+#line 16875 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59443 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3119:
+#line 16879 "preproc.y" /* yacc.c:1652 */
+ { add_variable_to_head(&argsresult, find_variable((yyvsp[-1].str)), find_variable((yyvsp[0].str))); }
+#line 59449 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3120:
+#line 16881 "preproc.y" /* yacc.c:1652 */
+ { add_variable_to_head(&argsresult, find_variable((yyvsp[0].str)), &no_indicator); }
+#line 59455 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3121:
+#line 16886 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 59467 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3122:
+#line 16896 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 59480 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3123:
+#line 16907 "preproc.y" /* yacc.c:1652 */
+ {
+ add_variable_to_head(&argsinsert, find_variable((yyvsp[0].str)), &no_indicator);
+ (yyval.str) = create_questionmarks((yyvsp[0].str), false);
+ }
+#line 59489 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3124:
+#line 16913 "preproc.y" /* yacc.c:1652 */
+ { check_indicator((find_variable((yyvsp[0].str)))->type); (yyval.str) = (yyvsp[0].str); }
+#line 59495 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3125:
+#line 16914 "preproc.y" /* yacc.c:1652 */
+ { check_indicator((find_variable((yyvsp[0].str)))->type); (yyval.str) = (yyvsp[0].str); }
+#line 59501 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3126:
+#line 16915 "preproc.y" /* yacc.c:1652 */
+ { check_indicator((find_variable((yyvsp[0].str)))->type); (yyval.str) = (yyvsp[0].str); }
+#line 59507 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3127:
+#line 16919 "preproc.y" /* yacc.c:1652 */
+ {
+ /* 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 59542 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3128:
+#line 16951 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make_name(); }
+#line 59548 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3129:
+#line 16953 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59554 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3130:
+#line 16955 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make_name(); }
+#line 59560 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3131:
+#line 16957 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59566 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3132:
+#line 16959 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59572 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3133:
+#line 16961 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59578 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3134:
+#line 16962 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 59584 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3135:
+#line 16966 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make3_str(mm_strdup("\""), (yyvsp[0].str), mm_strdup("\"")); }
+#line 59590 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3136:
+#line 16968 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make3_str(mm_strdup("("), (yyvsp[0].str), mm_strdup(")")); }
+#line 59596 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3137:
+#line 16975 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59602 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3138:
+#line 16976 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("()"); }
+#line 59608 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3139:
+#line 16978 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("("), (yyvsp[-1].str), mm_strdup(")")); }
+#line 59614 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3140:
+#line 16981 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59620 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3141:
+#line 16983 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat2_str((yyvsp[-1].str), (yyvsp[0].str)); }
+#line 59626 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3142:
+#line 16986 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59632 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3143:
+#line 16987 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup(","), (yyvsp[0].str)); }
+#line 59638 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3144:
+#line 16990 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59644 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3145:
+#line 16991 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("{"), (yyvsp[-1].str), mm_strdup("}")); }
+#line 59650 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3146:
+#line 16994 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59656 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3147:
+#line 16995 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("("); }
+#line 59662 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3148:
+#line 16996 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup(")"); }
+#line 59668 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3149:
+#line 16997 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup(","); }
+#line 59674 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3150:
+#line 16998 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup(";"); }
+#line 59680 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3151:
+#line 17001 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59686 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3152:
+#line 17002 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59692 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3153:
+#line 17003 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59698 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3154:
+#line 17004 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 59704 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3155:
+#line 17005 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("*"); }
+#line 59710 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3156:
+#line 17006 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("+"); }
+#line 59716 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3157:
+#line 17007 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("-"); }
+#line 59722 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3158:
+#line 17008 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("/"); }
+#line 59728 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3159:
+#line 17009 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("%"); }
+#line 59734 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3160:
+#line 17010 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("NULL"); }
+#line 59740 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3161:
+#line 17011 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("+="); }
+#line 59746 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3162:
+#line 17012 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("&&"); }
+#line 59752 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3163:
+#line 17013 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = make_name(); }
+#line 59758 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3164:
+#line 17014 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("auto"); }
+#line 59764 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3165:
+#line 17015 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("const"); }
+#line 59770 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3166:
+#line 17016 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("--"); }
+#line 59776 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3167:
+#line 17017 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("/="); }
+#line 59782 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3168:
+#line 17018 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup(".*"); }
+#line 59788 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3169:
+#line 17019 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("=="); }
+#line 59794 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3170:
+#line 17020 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("extern"); }
+#line 59800 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3171:
+#line 17021 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("++"); }
+#line 59806 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3172:
+#line 17022 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("<<"); }
+#line 59812 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3173:
+#line 17023 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("->"); }
+#line 59818 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3174:
+#line 17024 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("->*"); }
+#line 59824 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3175:
+#line 17025 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("%="); }
+#line 59830 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3176:
+#line 17026 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("*="); }
+#line 59836 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3177:
+#line 17027 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("!="); }
+#line 59842 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3178:
+#line 17028 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("||"); }
+#line 59848 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3179:
+#line 17029 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("register"); }
+#line 59854 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3180:
+#line 17030 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup(">>"); }
+#line 59860 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3181:
+#line 17031 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("static"); }
+#line 59866 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3182:
+#line 17032 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("-="); }
+#line 59872 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3183:
+#line 17033 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("typedef"); }
+#line 59878 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3184:
+#line 17034 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("volatile"); }
+#line 59884 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3185:
+#line 17035 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("bool"); }
+#line 59890 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3186:
+#line 17036 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("enum"); }
+#line 59896 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3187:
+#line 17037 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("hour"); }
+#line 59902 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3188:
+#line 17038 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("int"); }
+#line 59908 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3189:
+#line 17039 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("long"); }
+#line 59914 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3190:
+#line 17040 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("minute"); }
+#line 59920 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3191:
+#line 17041 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("month"); }
+#line 59926 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3192:
+#line 17042 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("second"); }
+#line 59932 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3193:
+#line 17043 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("short"); }
+#line 59938 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3194:
+#line 17044 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("signed"); }
+#line 59944 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3195:
+#line 17045 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("struct"); }
+#line 59950 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3196:
+#line 17046 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("unsigned"); }
+#line 59956 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3197:
+#line 17047 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("year"); }
+#line 59962 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3198:
+#line 17048 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("char"); }
+#line 59968 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3199:
+#line 17049 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("float"); }
+#line 59974 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3200:
+#line 17050 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("to"); }
+#line 59980 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3201:
+#line 17051 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("union"); }
+#line 59986 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3202:
+#line 17052 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("varchar"); }
+#line 59992 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3203:
+#line 17053 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("["); }
+#line 59998 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3204:
+#line 17054 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("]"); }
+#line 60004 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3205:
+#line 17055 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("="); }
+#line 60010 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3206:
+#line 17056 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup(":"); }
+#line 60016 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3207:
+#line 17059 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60022 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3208:
+#line 17060 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60028 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3209:
+#line 17061 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("all"); }
+#line 60034 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3210:
+#line 17062 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = mm_strdup("all"); }
+#line 60040 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3211:
+#line 17065 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60046 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3212:
+#line 17066 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, mm_strdup("("), (yyvsp[-1].str), mm_strdup(")")); }
+#line 60052 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3213:
+#line 17067 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("+"), (yyvsp[0].str)); }
+#line 60058 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3214:
+#line 17068 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("-"), (yyvsp[0].str)); }
+#line 60064 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3215:
+#line 17069 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("*"), (yyvsp[0].str)); }
+#line 60070 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3216:
+#line 17070 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("/"), (yyvsp[0].str)); }
+#line 60076 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3217:
+#line 17071 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = cat_str(3, (yyvsp[-2].str), mm_strdup("%"), (yyvsp[0].str)); }
+#line 60082 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3218:
+#line 17072 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60088 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3219:
+#line 17073 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60094 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3220:
+#line 17074 "preproc.y" /* yacc.c:1652 */
+ { 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 60104 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3221:
+#line 17081 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60110 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3222:
+#line 17082 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60116 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3223:
+#line 17083 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60122 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3224:
+#line 17084 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60128 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3225:
+#line 17087 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60134 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3226:
+#line 17088 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60140 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3227:
+#line 17091 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60146 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3228:
+#line 17092 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60152 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3229:
+#line 17095 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60158 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3230:
+#line 17097 "preproc.y" /* yacc.c:1652 */
+ {
+ 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 60171 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3231:
+#line 17107 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = EMPTY; }
+#line 60177 "preproc.c" /* yacc.c:1652 */
+ break;
+
+ case 3232:
+#line 17108 "preproc.y" /* yacc.c:1652 */
+ { (yyval.str) = (yyvsp[0].str); }
+#line 60183 "preproc.c" /* yacc.c:1652 */
+ break;
+
+
+#line 60187 "preproc.c" /* yacc.c:1652 */
+ 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 ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++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 ? YYEMPTY : YYTRANSLATE (yychar);
+
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
+ yyssp, yytoken)
+ {
+ char const *yymsgp = YY_("syntax error");
+ int yysyntax_error_status;
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ if (yysyntax_error_status == 0)
+ yymsgp = yymsg;
+ else if (yysyntax_error_status == 1)
+ {
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
+ if (!yymsg)
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ yysyntax_error_status = 2;
+ }
+ else
+ {
+ yysyntax_error_status = YYSYNTAX_ERROR;
+ yymsgp = yymsg;
+ }
+ }
+ yyerror (yymsgp);
+ if (yysyntax_error_status == 2)
+ goto yyexhaustedlab;
+ }
+# undef YYSYNTAX_ERROR
+#endif
+ }
+
+ 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. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (!yypact_value_is_default (yyn))
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ 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",
+ yystos[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;
+ /* Using YYLLOC is tempting, but would change the location of
+ the lookahead. YYLOC is available though. */
+ YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
+ *++yylsp = yyloc;
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[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 || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+
+/*-----------------------------------------------------.
+| yyreturn -- parsing is finished, return the result. |
+`-----------------------------------------------------*/
+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",
+ yystos[*yyssp], yyvsp, yylsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ return yyresult;
+}
+#line 17111 "preproc.y" /* yacc.c:1918 */
+
+
+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..8039d7e
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc.h
@@ -0,0 +1,645 @@
+/* A Bison parser, made by GNU Bison 3.3.2. */
+
+/* Bison interface for Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 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. */
+
+/* Undocumented macros, especially those whose name start with YY_,
+ are private implementation details. Do not rely on them. */
+
+#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 type. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ enum yytokentype
+ {
+ SQL_ALLOCATE = 258,
+ SQL_AUTOCOMMIT = 259,
+ SQL_BOOL = 260,
+ SQL_BREAK = 261,
+ SQL_CARDINALITY = 262,
+ SQL_CONNECT = 263,
+ SQL_COUNT = 264,
+ SQL_DATETIME_INTERVAL_CODE = 265,
+ SQL_DATETIME_INTERVAL_PRECISION = 266,
+ SQL_DESCRIBE = 267,
+ SQL_DESCRIPTOR = 268,
+ SQL_DISCONNECT = 269,
+ SQL_FOUND = 270,
+ SQL_FREE = 271,
+ SQL_GET = 272,
+ SQL_GO = 273,
+ SQL_GOTO = 274,
+ SQL_IDENTIFIED = 275,
+ SQL_INDICATOR = 276,
+ SQL_KEY_MEMBER = 277,
+ SQL_LENGTH = 278,
+ SQL_LONG = 279,
+ SQL_NULLABLE = 280,
+ SQL_OCTET_LENGTH = 281,
+ SQL_OPEN = 282,
+ SQL_OUTPUT = 283,
+ SQL_REFERENCE = 284,
+ SQL_RETURNED_LENGTH = 285,
+ SQL_RETURNED_OCTET_LENGTH = 286,
+ SQL_SCALE = 287,
+ SQL_SECTION = 288,
+ SQL_SHORT = 289,
+ SQL_SIGNED = 290,
+ SQL_SQLERROR = 291,
+ SQL_SQLPRINT = 292,
+ SQL_SQLWARNING = 293,
+ SQL_START = 294,
+ SQL_STOP = 295,
+ SQL_STRUCT = 296,
+ SQL_UNSIGNED = 297,
+ SQL_VAR = 298,
+ SQL_WHENEVER = 299,
+ S_ADD = 300,
+ S_AND = 301,
+ S_ANYTHING = 302,
+ S_AUTO = 303,
+ S_CONST = 304,
+ S_DEC = 305,
+ S_DIV = 306,
+ S_DOTPOINT = 307,
+ S_EQUAL = 308,
+ S_EXTERN = 309,
+ S_INC = 310,
+ S_LSHIFT = 311,
+ S_MEMPOINT = 312,
+ S_MEMBER = 313,
+ S_MOD = 314,
+ S_MUL = 315,
+ S_NEQUAL = 316,
+ S_OR = 317,
+ S_REGISTER = 318,
+ S_RSHIFT = 319,
+ S_STATIC = 320,
+ S_SUB = 321,
+ S_VOLATILE = 322,
+ S_TYPEDEF = 323,
+ CSTRING = 324,
+ CVARIABLE = 325,
+ CPP_LINE = 326,
+ IP = 327,
+ IDENT = 328,
+ UIDENT = 329,
+ FCONST = 330,
+ SCONST = 331,
+ USCONST = 332,
+ BCONST = 333,
+ XCONST = 334,
+ Op = 335,
+ ICONST = 336,
+ PARAM = 337,
+ TYPECAST = 338,
+ DOT_DOT = 339,
+ COLON_EQUALS = 340,
+ EQUALS_GREATER = 341,
+ LESS_EQUALS = 342,
+ GREATER_EQUALS = 343,
+ NOT_EQUALS = 344,
+ ABORT_P = 345,
+ ABSOLUTE_P = 346,
+ ACCESS = 347,
+ ACTION = 348,
+ ADD_P = 349,
+ ADMIN = 350,
+ AFTER = 351,
+ AGGREGATE = 352,
+ ALL = 353,
+ ALSO = 354,
+ ALTER = 355,
+ ALWAYS = 356,
+ ANALYSE = 357,
+ ANALYZE = 358,
+ AND = 359,
+ ANY = 360,
+ ARRAY = 361,
+ AS = 362,
+ ASC = 363,
+ ASSERTION = 364,
+ ASSIGNMENT = 365,
+ ASYMMETRIC = 366,
+ AT = 367,
+ ATTACH = 368,
+ ATTRIBUTE = 369,
+ AUTHORIZATION = 370,
+ BACKWARD = 371,
+ BEFORE = 372,
+ BEGIN_P = 373,
+ BETWEEN = 374,
+ BIGINT = 375,
+ BINARY = 376,
+ BIT = 377,
+ BOOLEAN_P = 378,
+ BOTH = 379,
+ BY = 380,
+ CACHE = 381,
+ CALL = 382,
+ CALLED = 383,
+ CASCADE = 384,
+ CASCADED = 385,
+ CASE = 386,
+ CAST = 387,
+ CATALOG_P = 388,
+ CHAIN = 389,
+ CHAR_P = 390,
+ CHARACTER = 391,
+ CHARACTERISTICS = 392,
+ CHECK = 393,
+ CHECKPOINT = 394,
+ CLASS = 395,
+ CLOSE = 396,
+ CLUSTER = 397,
+ COALESCE = 398,
+ COLLATE = 399,
+ COLLATION = 400,
+ COLUMN = 401,
+ COLUMNS = 402,
+ COMMENT = 403,
+ COMMENTS = 404,
+ COMMIT = 405,
+ COMMITTED = 406,
+ CONCURRENTLY = 407,
+ CONFIGURATION = 408,
+ CONFLICT = 409,
+ CONNECTION = 410,
+ CONSTRAINT = 411,
+ CONSTRAINTS = 412,
+ CONTENT_P = 413,
+ CONTINUE_P = 414,
+ CONVERSION_P = 415,
+ COPY = 416,
+ COST = 417,
+ CREATE = 418,
+ CROSS = 419,
+ CSV = 420,
+ CUBE = 421,
+ CURRENT_P = 422,
+ CURRENT_CATALOG = 423,
+ CURRENT_DATE = 424,
+ CURRENT_ROLE = 425,
+ CURRENT_SCHEMA = 426,
+ CURRENT_TIME = 427,
+ CURRENT_TIMESTAMP = 428,
+ CURRENT_USER = 429,
+ CURSOR = 430,
+ CYCLE = 431,
+ DATA_P = 432,
+ DATABASE = 433,
+ DAY_P = 434,
+ DEALLOCATE = 435,
+ DEC = 436,
+ DECIMAL_P = 437,
+ DECLARE = 438,
+ DEFAULT = 439,
+ DEFAULTS = 440,
+ DEFERRABLE = 441,
+ DEFERRED = 442,
+ DEFINER = 443,
+ DELETE_P = 444,
+ DELIMITER = 445,
+ DELIMITERS = 446,
+ DEPENDS = 447,
+ DESC = 448,
+ DETACH = 449,
+ DICTIONARY = 450,
+ DISABLE_P = 451,
+ DISCARD = 452,
+ DISTINCT = 453,
+ DO = 454,
+ DOCUMENT_P = 455,
+ DOMAIN_P = 456,
+ DOUBLE_P = 457,
+ DROP = 458,
+ EACH = 459,
+ ELSE = 460,
+ ENABLE_P = 461,
+ ENCODING = 462,
+ ENCRYPTED = 463,
+ END_P = 464,
+ ENUM_P = 465,
+ ESCAPE = 466,
+ EVENT = 467,
+ EXCEPT = 468,
+ EXCLUDE = 469,
+ EXCLUDING = 470,
+ EXCLUSIVE = 471,
+ EXECUTE = 472,
+ EXISTS = 473,
+ EXPLAIN = 474,
+ EXPRESSION = 475,
+ EXTENSION = 476,
+ EXTERNAL = 477,
+ EXTRACT = 478,
+ FALSE_P = 479,
+ FAMILY = 480,
+ FETCH = 481,
+ FILTER = 482,
+ FIRST_P = 483,
+ FLOAT_P = 484,
+ FOLLOWING = 485,
+ FOR = 486,
+ FORCE = 487,
+ FOREIGN = 488,
+ FORWARD = 489,
+ FREEZE = 490,
+ FROM = 491,
+ FULL = 492,
+ FUNCTION = 493,
+ FUNCTIONS = 494,
+ GENERATED = 495,
+ GLOBAL = 496,
+ GRANT = 497,
+ GRANTED = 498,
+ GREATEST = 499,
+ GROUP_P = 500,
+ GROUPING = 501,
+ GROUPS = 502,
+ HANDLER = 503,
+ HAVING = 504,
+ HEADER_P = 505,
+ HOLD = 506,
+ HOUR_P = 507,
+ IDENTITY_P = 508,
+ IF_P = 509,
+ ILIKE = 510,
+ IMMEDIATE = 511,
+ IMMUTABLE = 512,
+ IMPLICIT_P = 513,
+ IMPORT_P = 514,
+ IN_P = 515,
+ INCLUDE = 516,
+ INCLUDING = 517,
+ INCREMENT = 518,
+ INDEX = 519,
+ INDEXES = 520,
+ INHERIT = 521,
+ INHERITS = 522,
+ INITIALLY = 523,
+ INLINE_P = 524,
+ INNER_P = 525,
+ INOUT = 526,
+ INPUT_P = 527,
+ INSENSITIVE = 528,
+ INSERT = 529,
+ INSTEAD = 530,
+ INT_P = 531,
+ INTEGER = 532,
+ INTERSECT = 533,
+ INTERVAL = 534,
+ INTO = 535,
+ INVOKER = 536,
+ IS = 537,
+ ISNULL = 538,
+ ISOLATION = 539,
+ JOIN = 540,
+ KEY = 541,
+ LABEL = 542,
+ LANGUAGE = 543,
+ LARGE_P = 544,
+ LAST_P = 545,
+ LATERAL_P = 546,
+ LEADING = 547,
+ LEAKPROOF = 548,
+ LEAST = 549,
+ LEFT = 550,
+ LEVEL = 551,
+ LIKE = 552,
+ LIMIT = 553,
+ LISTEN = 554,
+ LOAD = 555,
+ LOCAL = 556,
+ LOCALTIME = 557,
+ LOCALTIMESTAMP = 558,
+ LOCATION = 559,
+ LOCK_P = 560,
+ LOCKED = 561,
+ LOGGED = 562,
+ MAPPING = 563,
+ MATCH = 564,
+ MATERIALIZED = 565,
+ MAXVALUE = 566,
+ METHOD = 567,
+ MINUTE_P = 568,
+ MINVALUE = 569,
+ MODE = 570,
+ MONTH_P = 571,
+ MOVE = 572,
+ NAME_P = 573,
+ NAMES = 574,
+ NATIONAL = 575,
+ NATURAL = 576,
+ NCHAR = 577,
+ NEW = 578,
+ NEXT = 579,
+ NFC = 580,
+ NFD = 581,
+ NFKC = 582,
+ NFKD = 583,
+ NO = 584,
+ NONE = 585,
+ NORMALIZE = 586,
+ NORMALIZED = 587,
+ NOT = 588,
+ NOTHING = 589,
+ NOTIFY = 590,
+ NOTNULL = 591,
+ NOWAIT = 592,
+ NULL_P = 593,
+ NULLIF = 594,
+ NULLS_P = 595,
+ NUMERIC = 596,
+ OBJECT_P = 597,
+ OF = 598,
+ OFF = 599,
+ OFFSET = 600,
+ OIDS = 601,
+ OLD = 602,
+ ON = 603,
+ ONLY = 604,
+ OPERATOR = 605,
+ OPTION = 606,
+ OPTIONS = 607,
+ OR = 608,
+ ORDER = 609,
+ ORDINALITY = 610,
+ OTHERS = 611,
+ OUT_P = 612,
+ OUTER_P = 613,
+ OVER = 614,
+ OVERLAPS = 615,
+ OVERLAY = 616,
+ OVERRIDING = 617,
+ OWNED = 618,
+ OWNER = 619,
+ PARALLEL = 620,
+ PARSER = 621,
+ PARTIAL = 622,
+ PARTITION = 623,
+ PASSING = 624,
+ PASSWORD = 625,
+ PLACING = 626,
+ PLANS = 627,
+ POLICY = 628,
+ POSITION = 629,
+ PRECEDING = 630,
+ PRECISION = 631,
+ PRESERVE = 632,
+ PREPARE = 633,
+ PREPARED = 634,
+ PRIMARY = 635,
+ PRIOR = 636,
+ PRIVILEGES = 637,
+ PROCEDURAL = 638,
+ PROCEDURE = 639,
+ PROCEDURES = 640,
+ PROGRAM = 641,
+ PUBLICATION = 642,
+ QUOTE = 643,
+ RANGE = 644,
+ READ = 645,
+ REAL = 646,
+ REASSIGN = 647,
+ RECHECK = 648,
+ RECURSIVE = 649,
+ REF = 650,
+ REFERENCES = 651,
+ REFERENCING = 652,
+ REFRESH = 653,
+ REINDEX = 654,
+ RELATIVE_P = 655,
+ RELEASE = 656,
+ RENAME = 657,
+ REPEATABLE = 658,
+ REPLACE = 659,
+ REPLICA = 660,
+ RESET = 661,
+ RESTART = 662,
+ RESTRICT = 663,
+ RETURNING = 664,
+ RETURNS = 665,
+ REVOKE = 666,
+ RIGHT = 667,
+ ROLE = 668,
+ ROLLBACK = 669,
+ ROLLUP = 670,
+ ROUTINE = 671,
+ ROUTINES = 672,
+ ROW = 673,
+ ROWS = 674,
+ RULE = 675,
+ SAVEPOINT = 676,
+ SCHEMA = 677,
+ SCHEMAS = 678,
+ SCROLL = 679,
+ SEARCH = 680,
+ SECOND_P = 681,
+ SECURITY = 682,
+ SELECT = 683,
+ SEQUENCE = 684,
+ SEQUENCES = 685,
+ SERIALIZABLE = 686,
+ SERVER = 687,
+ SESSION = 688,
+ SESSION_USER = 689,
+ SET = 690,
+ SETS = 691,
+ SETOF = 692,
+ SHARE = 693,
+ SHOW = 694,
+ SIMILAR = 695,
+ SIMPLE = 696,
+ SKIP = 697,
+ SMALLINT = 698,
+ SNAPSHOT = 699,
+ SOME = 700,
+ SQL_P = 701,
+ STABLE = 702,
+ STANDALONE_P = 703,
+ START = 704,
+ STATEMENT = 705,
+ STATISTICS = 706,
+ STDIN = 707,
+ STDOUT = 708,
+ STORAGE = 709,
+ STORED = 710,
+ STRICT_P = 711,
+ STRIP_P = 712,
+ SUBSCRIPTION = 713,
+ SUBSTRING = 714,
+ SUPPORT = 715,
+ SYMMETRIC = 716,
+ SYSID = 717,
+ SYSTEM_P = 718,
+ TABLE = 719,
+ TABLES = 720,
+ TABLESAMPLE = 721,
+ TABLESPACE = 722,
+ TEMP = 723,
+ TEMPLATE = 724,
+ TEMPORARY = 725,
+ TEXT_P = 726,
+ THEN = 727,
+ TIES = 728,
+ TIME = 729,
+ TIMESTAMP = 730,
+ TO = 731,
+ TRAILING = 732,
+ TRANSACTION = 733,
+ TRANSFORM = 734,
+ TREAT = 735,
+ TRIGGER = 736,
+ TRIM = 737,
+ TRUE_P = 738,
+ TRUNCATE = 739,
+ TRUSTED = 740,
+ TYPE_P = 741,
+ TYPES_P = 742,
+ UESCAPE = 743,
+ UNBOUNDED = 744,
+ UNCOMMITTED = 745,
+ UNENCRYPTED = 746,
+ UNION = 747,
+ UNIQUE = 748,
+ UNKNOWN = 749,
+ UNLISTEN = 750,
+ UNLOGGED = 751,
+ UNTIL = 752,
+ UPDATE = 753,
+ USER = 754,
+ USING = 755,
+ VACUUM = 756,
+ VALID = 757,
+ VALIDATE = 758,
+ VALIDATOR = 759,
+ VALUE_P = 760,
+ VALUES = 761,
+ VARCHAR = 762,
+ VARIADIC = 763,
+ VARYING = 764,
+ VERBOSE = 765,
+ VERSION_P = 766,
+ VIEW = 767,
+ VIEWS = 768,
+ VOLATILE = 769,
+ WHEN = 770,
+ WHERE = 771,
+ WHITESPACE_P = 772,
+ WINDOW = 773,
+ WITH = 774,
+ WITHIN = 775,
+ WITHOUT = 776,
+ WORK = 777,
+ WRAPPER = 778,
+ WRITE = 779,
+ XML_P = 780,
+ XMLATTRIBUTES = 781,
+ XMLCONCAT = 782,
+ XMLELEMENT = 783,
+ XMLEXISTS = 784,
+ XMLFOREST = 785,
+ XMLNAMESPACES = 786,
+ XMLPARSE = 787,
+ XMLPI = 788,
+ XMLROOT = 789,
+ XMLSERIALIZE = 790,
+ XMLTABLE = 791,
+ YEAR_P = 792,
+ YES_P = 793,
+ ZONE = 794,
+ NOT_LA = 795,
+ NULLS_LA = 796,
+ WITH_LA = 797,
+ POSTFIXOP = 798,
+ UMINUS = 799
+ };
+#endif
+
+/* Value type. */
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+
+union YYSTYPE
+{
+#line 586 "preproc.y" /* yacc.c:1921 */
+
+ 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;
+
+#line 619 "preproc.h" /* yacc.c:1921 */
+};
+
+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..7b862a8
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc.y
@@ -0,0 +1,17123 @@
+/* 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);
+
+/*
+ * 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;
+ }
+}
+%}
+
+%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;
+}
+/* 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> 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> 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> ExclusionWhereClause
+%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> 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> DropPLangStmt
+%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> AlterForeignTableStmt
+%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> drop_type_any_name
+%type <str> drop_type_name
+%type <str> drop_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_type_any_name
+%type <str> comment_type_name
+%type <str> comment_text
+%type <str> SecLabelStmt
+%type <str> opt_provider
+%type <str> security_label_type_any_name
+%type <str> security_label_type_name
+%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> createfunc_opt_list
+%type <str> common_func_opt_item
+%type <str> createfunc_opt_item
+%type <str> func_as
+%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> reindex_option_list
+%type <str> reindex_option_elem
+%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> publication_name_list
+%type <str> publication_name_item
+%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> 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> vac_analyze_option_list
+%type <str> analyze_keyword
+%type <str> vac_analyze_option_elem
+%type <str> vac_analyze_option_name
+%type <str> vac_analyze_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 <str> explain_option_list
+%type <str> explain_option_elem
+%type <str> explain_option_name
+%type <str> explain_option_arg
+%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_with_clause
+%type <str> into_clause
+%type <str> OptTempTableName
+%type <str> opt_table
+%type <str> all_or_distinct
+%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> func_alias_clause
+%type <str> join_type
+%type <str> join_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> 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> overlay_placing
+%type <str> position_list
+%type <str> substr_list
+%type <str> substr_from
+%type <str> substr_for
+%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> database_name
+%type <str> access_method
+%type <str> attr_name
+%type <str> index_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> unreserved_keyword
+%type <str> col_name_keyword
+%type <str> type_func_name_keyword
+%type <str> reserved_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> ECPGDescribe
+%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
+/* 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
+ ASSERTION ASSIGNMENT ASYMMETRIC AT ATTACH ATTRIBUTE AUTHORIZATION
+
+ BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT
+ BOOLEAN_P BOTH 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 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 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 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 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
+
+
+
+ %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
+ %left POSTFIXOP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %nonassoc UNBOUNDED
+ %nonassoc IDENT
+%nonassoc CSTRING GENERATED NULL_P 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
+
+ %right PRESERVE STRIP_P
+
+%%
+prog: statements;
+/* rules */
+ 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); }
+| AlterForeignTableStmt
+ { 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); }
+| DropPLangStmt
+ { 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
+ {
+ 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
+ {
+ 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);
+ }
+ | 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
+ {
+ fprintf(base_yyout, "{ ECPGdescribe(__LINE__, %d, %s,", compat, $1);
+ dump_variables(argsresult, 1);
+ fputs("ECPGt_EORT);", base_yyout);
+ fprintf(base_yyout, "}");
+ output_line_number();
+
+ free($1);
+ }
+ | 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 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_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
+ {
+ $$ = cat_str(2,mm_strdup("detach partition"),$3);
+}
+;
+
+
+ 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 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;
+ $$ = 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 create_generic_options ColQualList
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+;
+
+
+ columnOptions:
+ ColId ColQualList
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| ColId WITH OPTIONS ColQualList
+ {
+ $$ = cat_str(3,$1,mm_strdup("with options"),$4);
+}
+;
+
+
+ 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");
+}
+| 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 ExclusionWhereClause 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(")"));
+}
+;
+
+
+ ExclusionWhereClause:
+ 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 access_method
+ {
+ $$ = 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 index_name
+ {
+ $$ = cat_str(2,mm_strdup("using index"),$3);
+}
+;
+
+
+ CreateStatsStmt:
+ CREATE STATISTICS any_name opt_name_list ON expr_list 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 expr_list FROM from_list
+ {
+ $$ = cat_str(7,mm_strdup("create statistics if not exists"),$6,$7,mm_strdup("on"),$9,mm_strdup("from"),$11);
+}
+;
+
+
+ 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 NonReservedWord_or_Sconst
+ {
+ $$ = cat_str(6,mm_strdup("create"),$2,$3,$4,mm_strdup("language"),$6);
+}
+| CREATE opt_or_replace opt_trusted opt_procedural LANGUAGE NonReservedWord_or_Sconst 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; }
+;
+
+
+ DropPLangStmt:
+ DROP opt_procedural LANGUAGE NonReservedWord_or_Sconst opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop"),$2,mm_strdup("language"),$4,$5);
+}
+| DROP opt_procedural LANGUAGE IF_P EXISTS NonReservedWord_or_Sconst opt_drop_behavior
+ {
+ $$ = cat_str(5,mm_strdup("drop"),$2,mm_strdup("language if exists"),$6,$7);
+}
+;
+
+
+ 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 ACCESS METHOD name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("access method"),$7);
+}
+| 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 COLLATION any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("collation"),$6);
+}
+| ALTER EXTENSION name add_drop CONVERSION_P any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("conversion"),$6);
+}
+| 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 opt_procedural LANGUAGE name
+ {
+ $$ = cat_str(6,mm_strdup("alter extension"),$3,$4,$5,mm_strdup("language"),$7);
+}
+| 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 access_method
+ {
+ $$ = 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 access_method
+ {
+ $$ = 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 SCHEMA name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("schema"),$6);
+}
+| ALTER EXTENSION name add_drop EVENT TRIGGER name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("event trigger"),$7);
+}
+| ALTER EXTENSION name add_drop TABLE any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("table"),$6);
+}
+| ALTER EXTENSION name add_drop TEXT_P SEARCH PARSER any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("text search parser"),$8);
+}
+| ALTER EXTENSION name add_drop TEXT_P SEARCH DICTIONARY any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("text search dictionary"),$8);
+}
+| ALTER EXTENSION name add_drop TEXT_P SEARCH TEMPLATE any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("text search template"),$8);
+}
+| ALTER EXTENSION name add_drop TEXT_P SEARCH CONFIGURATION any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("text search configuration"),$8);
+}
+| ALTER EXTENSION name add_drop SEQUENCE any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("sequence"),$6);
+}
+| ALTER EXTENSION name add_drop VIEW any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("view"),$6);
+}
+| ALTER EXTENSION name add_drop MATERIALIZED VIEW any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("materialized view"),$7);
+}
+| ALTER EXTENSION name add_drop FOREIGN TABLE any_name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("foreign table"),$7);
+}
+| ALTER EXTENSION name add_drop FOREIGN DATA_P WRAPPER name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("foreign data wrapper"),$8);
+}
+| ALTER EXTENSION name add_drop SERVER name
+ {
+ $$ = cat_str(5,mm_strdup("alter extension"),$3,$4,mm_strdup("server"),$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);
+}
+;
+
+
+ AlterForeignTableStmt:
+ 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);
+}
+;
+
+
+ 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 TRIGGER name TriggerActionTime TriggerEvents ON qualified_name TriggerReferencing TriggerForSpec TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')'
+ {
+ $$ = cat_str(15,mm_strdup("create trigger"),$3,$4,$5,mm_strdup("on"),$7,$8,$9,$10,mm_strdup("execute"),$12,$13,mm_strdup("("),$15,mm_strdup(")"));
+}
+| CREATE CONSTRAINT TRIGGER name AFTER TriggerEvents ON qualified_name OptConstrFromTable ConstraintAttributeSpec FOR EACH ROW TriggerWhen EXECUTE FUNCTION_or_PROCEDURE func_name '(' TriggerFuncArgs ')'
+ {
+ $$ = cat_str(16,mm_strdup("create constraint trigger"),$4,mm_strdup("after"),$6,mm_strdup("on"),$8,$9,$10,mm_strdup("for each row"),$14,mm_strdup("execute"),$16,$17,mm_strdup("("),$19,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 access_method 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 access_method
+ {
+ $$ = cat_str(4,mm_strdup("create operator family"),$4,mm_strdup("using"),$6);
+}
+;
+
+
+ AlterOpFamilyStmt:
+ ALTER OPERATOR FAMILY any_name USING access_method 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 access_method 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 access_method 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 access_method 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 access_method 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 access_method 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 drop_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 drop_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 drop_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 drop_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);
+}
+;
+
+
+ drop_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");
+}
+;
+
+
+ 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");
+}
+| PUBLICATION
+ {
+ $$ = mm_strdup("publication");
+}
+| SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SERVER
+ {
+ $$ = mm_strdup("server");
+}
+;
+
+
+ drop_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 comment_type_any_name any_name IS comment_text
+ {
+ $$ = cat_str(5,mm_strdup("comment on"),$3,$4,mm_strdup("is"),$6);
+}
+| COMMENT ON comment_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 POLICY name ON any_name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on policy"),$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 RULE name ON any_name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on rule"),$4,mm_strdup("on"),$6,mm_strdup("is"),$8);
+}
+| 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 TRIGGER name ON any_name IS comment_text
+ {
+ $$ = cat_str(6,mm_strdup("comment on trigger"),$4,mm_strdup("on"),$6,mm_strdup("is"),$8);
+}
+| COMMENT ON OPERATOR CLASS any_name USING access_method 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 access_method 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_type_any_name:
+ COLUMN
+ {
+ $$ = mm_strdup("column");
+}
+| INDEX
+ {
+ $$ = mm_strdup("index");
+}
+| SEQUENCE
+ {
+ $$ = mm_strdup("sequence");
+}
+| STATISTICS
+ {
+ $$ = mm_strdup("statistics");
+}
+| TABLE
+ {
+ $$ = mm_strdup("table");
+}
+| VIEW
+ {
+ $$ = mm_strdup("view");
+}
+| MATERIALIZED VIEW
+ {
+ $$ = mm_strdup("materialized view");
+}
+| COLLATION
+ {
+ $$ = mm_strdup("collation");
+}
+| CONVERSION_P
+ {
+ $$ = mm_strdup("conversion");
+}
+| FOREIGN TABLE
+ {
+ $$ = mm_strdup("foreign table");
+}
+| TEXT_P SEARCH CONFIGURATION
+ {
+ $$ = mm_strdup("text search configuration");
+}
+| TEXT_P SEARCH DICTIONARY
+ {
+ $$ = mm_strdup("text search dictionary");
+}
+| TEXT_P SEARCH PARSER
+ {
+ $$ = mm_strdup("text search parser");
+}
+| TEXT_P SEARCH TEMPLATE
+ {
+ $$ = mm_strdup("text search template");
+}
+;
+
+
+ comment_type_name:
+ ACCESS METHOD
+ {
+ $$ = mm_strdup("access method");
+}
+| DATABASE
+ {
+ $$ = mm_strdup("database");
+}
+| 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");
+}
+| ROLE
+ {
+ $$ = mm_strdup("role");
+}
+| SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SERVER
+ {
+ $$ = mm_strdup("server");
+}
+| SUBSCRIPTION
+ {
+ $$ = mm_strdup("subscription");
+}
+| TABLESPACE
+ {
+ $$ = mm_strdup("tablespace");
+}
+;
+
+
+ comment_text:
+ ecpg_sconst
+ {
+ $$ = $1;
+}
+| NULL_P
+ {
+ $$ = mm_strdup("null");
+}
+;
+
+
+ SecLabelStmt:
+ SECURITY LABEL opt_provider ON security_label_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 security_label_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_type_any_name:
+ COLUMN
+ {
+ $$ = mm_strdup("column");
+}
+| FOREIGN TABLE
+ {
+ $$ = mm_strdup("foreign table");
+}
+| SEQUENCE
+ {
+ $$ = mm_strdup("sequence");
+}
+| TABLE
+ {
+ $$ = mm_strdup("table");
+}
+| VIEW
+ {
+ $$ = mm_strdup("view");
+}
+| MATERIALIZED VIEW
+ {
+ $$ = mm_strdup("materialized view");
+}
+;
+
+
+ security_label_type_name:
+ DATABASE
+ {
+ $$ = mm_strdup("database");
+}
+| EVENT TRIGGER
+ {
+ $$ = mm_strdup("event trigger");
+}
+| opt_procedural LANGUAGE
+ {
+ $$ = cat_str(2,$1,mm_strdup("language"));
+}
+| PUBLICATION
+ {
+ $$ = mm_strdup("publication");
+}
+| ROLE
+ {
+ $$ = mm_strdup("role");
+}
+| SCHEMA
+ {
+ $$ = mm_strdup("schema");
+}
+| SUBSCRIPTION
+ {
+ $$ = mm_strdup("subscription");
+}
+| TABLESPACE
+ {
+ $$ = mm_strdup("tablespace");
+}
+;
+
+
+ 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;
+ add_additional_variables($3, false);
+ $$ = 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;
+ add_additional_variables($4, false);
+ $$ = 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;
+ add_additional_variables($3, false);
+ $$ = 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;
+ add_additional_variables($4, false);
+ $$ = cat_str(2, mm_strdup("fetch backward from"), cursor_marker);
+ }
+ | MOVE FORWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ add_additional_variables($3, false);
+ $$ = cat_str(2, mm_strdup("move forward"), cursor_marker);
+ }
+ | MOVE FORWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ add_additional_variables($4, false);
+ $$ = cat_str(2, mm_strdup("move forward from"), cursor_marker);
+ }
+ | MOVE BACKWARD cursor_name
+ {
+ char *cursor_marker = $3[0] == ':' ? mm_strdup("$0") : $3;
+ add_additional_variables($3, false);
+ $$ = cat_str(2, mm_strdup("move backward"), cursor_marker);
+ }
+ | MOVE BACKWARD from_in cursor_name
+ {
+ char *cursor_marker = $4[0] == ':' ? mm_strdup("$0") : $4;
+ add_additional_variables($4, false);
+ $$ = cat_str(2, mm_strdup("move backward from"), cursor_marker);
+ }
+;
+
+
+ fetch_args:
+ cursor_name
+ {
+ add_additional_variables($1, false);
+ if ($1[0] == ':')
+ {
+ free($1);
+ $1 = mm_strdup("$0");
+ }
+
+ $$ = $1;
+}
+| from_in cursor_name
+ {
+ add_additional_variables($2, false);
+ if ($2[0] == ':')
+ {
+ free($2);
+ $2 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(2,$1,$2);
+}
+| NEXT opt_from_in cursor_name
+ {
+ add_additional_variables($3, false);
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("next"),$2,$3);
+}
+| PRIOR opt_from_in cursor_name
+ {
+ add_additional_variables($3, false);
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("prior"),$2,$3);
+}
+| FIRST_P opt_from_in cursor_name
+ {
+ add_additional_variables($3, false);
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("first"),$2,$3);
+}
+| LAST_P opt_from_in cursor_name
+ {
+ add_additional_variables($3, false);
+ 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
+ {
+ add_additional_variables($4, false);
+ 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
+ {
+ add_additional_variables($4, false);
+ 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
+ {
+ add_additional_variables($3, false);
+ 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
+ {
+ add_additional_variables($3, false);
+ if ($3[0] == ':')
+ {
+ free($3);
+ $3 = mm_strdup("$0");
+ }
+
+ $$ = cat_str(3,mm_strdup("all"),$2,$3);
+}
+| FORWARD SignedIconst opt_from_in cursor_name
+ {
+ add_additional_variables($4, false);
+ 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
+ {
+ add_additional_variables($4, false);
+ 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
+ {
+ add_additional_variables($4, false);
+ 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
+ {
+ add_additional_variables($4, false);
+ 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
+ {
+ $$ = cat_str(7,mm_strdup("grant"),$2,mm_strdup("on"),$4,mm_strdup("to"),$6,$7);
+}
+;
+
+
+ RevokeStmt:
+ REVOKE privileges ON 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 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);
+}
+;
+
+
+ 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 index_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:
+ index_name
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ access_method_clause:
+ USING access_method
+ {
+ $$ = 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 createfunc_opt_list
+ {
+ $$ = cat_str(8,mm_strdup("create"),$2,mm_strdup("function"),$4,$5,mm_strdup("returns"),$7,$8);
+}
+| CREATE opt_or_replace FUNCTION func_name func_args_with_defaults RETURNS TABLE '(' table_func_column_list ')' createfunc_opt_list
+ {
+ $$ = cat_str(9,mm_strdup("create"),$2,mm_strdup("function"),$4,$5,mm_strdup("returns table ("),$9,mm_strdup(")"),$11);
+}
+| CREATE opt_or_replace FUNCTION func_name func_args_with_defaults createfunc_opt_list
+ {
+ $$ = cat_str(6,mm_strdup("create"),$2,mm_strdup("function"),$4,$5,$6);
+}
+| CREATE opt_or_replace PROCEDURE func_name func_args_with_defaults createfunc_opt_list
+ {
+ $$ = cat_str(6,mm_strdup("create"),$2,mm_strdup("procedure"),$4,$5,$6);
+}
+;
+
+
+ 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);
+}
+;
+
+
+ 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);
+}
+;
+
+
+ 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 '(' reindex_option_list ')' reindex_target_type opt_concurrently qualified_name
+ {
+ $$ = cat_str(6,mm_strdup("reindex ("),$3,mm_strdup(")"),$5,$6,$7);
+}
+| REINDEX '(' reindex_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");
+}
+;
+
+
+ reindex_option_list:
+ reindex_option_elem
+ {
+ $$ = $1;
+}
+| reindex_option_list ',' reindex_option_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ reindex_option_elem:
+ VERBOSE
+ {
+ $$ = mm_strdup("verbose");
+}
+;
+
+
+ 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 database_name RENAME TO database_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 access_method 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 access_method 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 access_method 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 access_method 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 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 access_method 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 access_method 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 publication_name_list opt_definition
+ {
+ $$ = cat_str(7,mm_strdup("create subscription"),$3,mm_strdup("connection"),$5,mm_strdup("publication"),$7,$8);
+}
+;
+
+
+ publication_name_list:
+ publication_name_item
+ {
+ $$ = $1;
+}
+| publication_name_list ',' publication_name_item
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ publication_name_item:
+ ColLabel
+ {
+ $$ = $1;
+}
+;
+
+
+ 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 SET PUBLICATION 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);
+}
+| BEGIN_P opt_transaction transaction_mode_list_or_empty
+ {
+ $$ = cat_str(3,mm_strdup("begin"),$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);
+}
+| END_P opt_transaction opt_transaction_chain
+ {
+ $$ = cat_str(3,mm_strdup("end"),$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);
+}
+;
+
+
+ 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 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 database_name WITH createdb_opt_list
+ {
+ $$ = cat_str(4,mm_strdup("alter database"),$3,mm_strdup("with"),$5);
+}
+| ALTER DATABASE database_name createdb_opt_list
+ {
+ $$ = cat_str(3,mm_strdup("alter database"),$3,$4);
+}
+| ALTER DATABASE database_name SET TABLESPACE name
+ {
+ $$ = cat_str(4,mm_strdup("alter database"),$3,mm_strdup("set tablespace"),$6);
+}
+;
+
+
+ AlterDatabaseSetStmt:
+ ALTER DATABASE database_name SetResetClause
+ {
+ $$ = cat_str(3,mm_strdup("alter database"),$3,$4);
+}
+;
+
+
+ DropdbStmt:
+ DROP DATABASE database_name
+ {
+ $$ = cat_str(2,mm_strdup("drop database"),$3);
+}
+| DROP DATABASE IF_P EXISTS database_name
+ {
+ $$ = cat_str(2,mm_strdup("drop database if exists"),$5);
+}
+| DROP DATABASE 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 database_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 opt_verbose
+ {
+ $$ = cat_str(2,mm_strdup("cluster"),$2);
+}
+| CLUSTER opt_verbose index_name ON qualified_name
+ {
+ $$ = cat_str(5,mm_strdup("cluster"),$2,$3,mm_strdup("on"),$5);
+}
+;
+
+
+ cluster_index_specification:
+ USING index_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 '(' vac_analyze_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 '(' vac_analyze_option_list ')' opt_vacuum_relation_list
+ {
+ $$ = cat_str(5,$1,mm_strdup("("),$3,mm_strdup(")"),$5);
+}
+;
+
+
+ vac_analyze_option_list:
+ vac_analyze_option_elem
+ {
+ $$ = $1;
+}
+| vac_analyze_option_list ',' vac_analyze_option_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ analyze_keyword:
+ ANALYZE
+ {
+ $$ = mm_strdup("analyze");
+}
+| ANALYSE
+ {
+ $$ = mm_strdup("analyse");
+}
+;
+
+
+ vac_analyze_option_elem:
+ vac_analyze_option_name vac_analyze_option_arg
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ vac_analyze_option_name:
+ NonReservedWord
+ {
+ $$ = $1;
+}
+| analyze_keyword
+ {
+ $$ = $1;
+}
+;
+
+
+ vac_analyze_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 '(' explain_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;
+ }
+;
+
+
+ explain_option_list:
+ explain_option_elem
+ {
+ $$ = $1;
+}
+| explain_option_list ',' explain_option_elem
+ {
+ $$ = cat_str(3,$1,mm_strdup(","),$3);
+}
+;
+
+
+ explain_option_elem:
+ explain_option_name explain_option_arg
+ {
+ $$ = cat_str(2,$1,$2);
+}
+;
+
+
+ explain_option_name:
+ NonReservedWord
+ {
+ $$ = $1;
+}
+| analyze_keyword
+ {
+ $$ = $1;
+}
+;
+
+
+ explain_option_arg:
+ opt_boolean_or_string
+ {
+ $$ = $1;
+}
+| NumericOnly
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ 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);
+
+ 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;
+ 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 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 all_or_distinct select_clause
+ {
+ $$ = cat_str(4,$1,mm_strdup("union"),$3,$4);
+}
+| select_clause INTERSECT all_or_distinct select_clause
+ {
+ $$ = cat_str(4,$1,mm_strdup("intersect"),$3,$4);
+}
+| select_clause EXCEPT all_or_distinct 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 ')'
+ {
+ $$ = cat_str(7,$1,$2,mm_strdup("as"),$4,mm_strdup("("),$6,mm_strdup(")"));
+}
+;
+
+
+ opt_materialized:
+ MATERIALIZED
+ {
+ $$ = mm_strdup("materialized");
+}
+| NOT MATERIALIZED
+ {
+ $$ = mm_strdup("not materialized");
+}
+|
+ {
+ $$=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; }
+;
+
+
+ all_or_distinct:
+ 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 group_by_list
+ {
+ $$ = cat_str(2,mm_strdup("group by"),$3);
+}
+|
+ {
+ $$=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; }
+;
+
+
+ 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 join_outer
+ {
+ $$ = cat_str(2,mm_strdup("full"),$2);
+}
+| LEFT join_outer
+ {
+ $$ = cat_str(2,mm_strdup("left"),$2);
+}
+| RIGHT join_outer
+ {
+ $$ = cat_str(2,mm_strdup("right"),$2);
+}
+| INNER_P
+ {
+ $$ = mm_strdup("inner");
+}
+;
+
+
+ join_outer:
+ OUTER_P
+ {
+ $$ = mm_strdup("outer");
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ join_qual:
+ USING '(' name_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("using ("),$3,mm_strdup(")"));
+}
+| 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 qual_Op %prec POSTFIXOP
+ {
+ $$ = 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 IS OF '(' type_list ')' %prec IS
+ {
+ $$ = cat_str(4,$1,mm_strdup("is of ("),$5,mm_strdup(")"));
+}
+| a_expr IS NOT OF '(' type_list ')' %prec IS
+ {
+ $$ = cat_str(4,$1,mm_strdup("is not of ("),$6,mm_strdup(")"));
+}
+| 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 qual_Op %prec POSTFIXOP
+ {
+ $$ = 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 OF '(' type_list ')' %prec IS
+ {
+ $$ = cat_str(4,$1,mm_strdup("is of ("),$5,mm_strdup(")"));
+}
+| b_expr IS NOT OF '(' type_list ')' %prec IS
+ {
+ $$ = cat_str(4,$1,mm_strdup("is not of ("),$6,mm_strdup(")"));
+}
+| 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(")"));
+}
+| POSITION '(' position_list ')'
+ {
+ $$ = cat_str(3,mm_strdup("position ("),$3,mm_strdup(")"));
+}
+| SUBSTRING '(' substr_list ')'
+ {
+ $$ = 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);
+}
+;
+
+
+ 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);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ 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 overlay_placing substr_from substr_for
+ {
+ $$ = cat_str(4,$1,$2,$3,$4);
+}
+| a_expr overlay_placing substr_from
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+;
+
+
+ overlay_placing:
+ PLACING a_expr
+ {
+ $$ = cat_str(2,mm_strdup("placing"),$2);
+}
+;
+
+
+ position_list:
+ b_expr IN_P b_expr
+ {
+ $$ = cat_str(3,$1,mm_strdup("in"),$3);
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ substr_list:
+ a_expr substr_from substr_for
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| a_expr substr_for substr_from
+ {
+ $$ = cat_str(3,$1,$2,$3);
+}
+| a_expr substr_from
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| a_expr substr_for
+ {
+ $$ = cat_str(2,$1,$2);
+}
+| expr_list
+ {
+ $$ = $1;
+}
+|
+ {
+ $$=EMPTY; }
+;
+
+
+ substr_from:
+ FROM a_expr
+ {
+ $$ = cat_str(2,mm_strdup("from"),$2);
+}
+;
+
+
+ substr_for:
+ FOR a_expr
+ {
+ $$ = cat_str(2,mm_strdup("for"),$2);
+}
+;
+
+
+ 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 ecpg_ident
+ {
+ $$ = 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;
+}
+;
+
+
+ database_name:
+ ColId
+ {
+ $$ = $1;
+}
+;
+
+
+ access_method:
+ ColId
+ {
+ $$ = $1;
+}
+;
+
+
+ attr_name:
+ ColLabel
+ {
+ $$ = $1;
+}
+;
+
+
+ index_name:
+ ColId
+ {
+ $$ = $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_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;
+}
+;
+
+
+ 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");
+}
+| ASSERTION
+ {
+ $$ = mm_strdup("assertion");
+}
+| ASSIGNMENT
+ {
+ $$ = mm_strdup("assignment");
+}
+| AT
+ {
+ $$ = mm_strdup("at");
+}
+| ATTACH
+ {
+ $$ = mm_strdup("attach");
+}
+| ATTRIBUTE
+ {
+ $$ = mm_strdup("attribute");
+}
+| BACKWARD
+ {
+ $$ = mm_strdup("backward");
+}
+| BEFORE
+ {
+ $$ = mm_strdup("before");
+}
+| BEGIN_P
+ {
+ $$ = mm_strdup("begin");
+}
+| 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");
+}
+| 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");
+}
+| 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");
+}
+| 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");
+}
+| 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");
+}
+;
+
+
+/* trailer */
+/* src/interfaces/ecpg/preproc/ecpg.trailer */
+
+statements: /*EMPTY*/
+ | statements statement
+ ;
+
+statement: ecpgstart at stmt ';' { connection = NULL; }
+ | ecpgstart stmt ';'
+ | 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: database_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 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));
+ const char *con = connection ? connection : "NULL";
+ char *comment;
+
+ 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;
+ 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: database_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
+ {
+ const char *con = connection ? connection : "NULL";
+ mmerror(PARSE_ERROR, ET_WARNING, "using unsupported DESCRIBE statement");
+ $$ = (char *) mm_alloc(sizeof("1, , ") + strlen(con) + strlen($3));
+ sprintf($$, "1, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE opt_output prepared_name using_descriptor
+ {
+ const char *con = connection ? connection : "NULL";
+ struct variable *var;
+
+ var = argsinsert->variable;
+ remove_variable_from_list(&argsinsert, var);
+ add_variable_to_head(&argsresult, var, &no_indicator);
+
+ $$ = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen($3));
+ sprintf($$, "0, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_descriptor
+ {
+ const char *con = connection ? connection : "NULL";
+ $$ = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen($3));
+ sprintf($$, "0, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE INPUT_P prepared_name into_sqlda
+ {
+ const char *con = connection ? connection : "NULL";
+ mmerror(PARSE_ERROR, ET_WARNING, "using unsupported DESCRIBE statement");
+ $$ = (char *) mm_alloc(sizeof("1, , ") + strlen(con) + strlen($3));
+ sprintf($$, "1, %s, %s", con, $3);
+ }
+ | SQL_DESCRIBE opt_output prepared_name into_sqlda
+ {
+ const char *con = connection ? connection : "NULL";
+ $$ = (char *) mm_alloc(sizeof("0, , ") + strlen(con) + strlen($3));
+ sprintf($$, "0, %s, %s", con, $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 { $$ = $2; }
+ | DEALLOCATE PREPARE prepared_name { $$ = $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..51d5f94
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/preproc_extern.h
@@ -0,0 +1,127 @@
+/* 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 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..20b2790
--- /dev/null
+++ b/src/interfaces/ecpg/preproc/type.h
@@ -0,0 +1,203 @@
+/*
+ * 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 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;
+};
+
+#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..e712fa8
--- /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/ 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..1e67d2b
--- /dev/null
+++ b/src/interfaces/ecpg/test/ecpg_schedule
@@ -0,0 +1,60 @@
+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: 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..853453d
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test1-minGW32.stderr
@@ -0,0 +1,78 @@
+[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: could not open database: 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: could not open database: 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: could not open database: 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: could not open database: could not connect to server: Connection refused (0x0000274D/10061)
+ Is the server running on host "localhost" and accepting
+ TCP/IP connections on port 20?
+
+[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..1986fc5
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test1.stderr
@@ -0,0 +1,78 @@
+[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: could not open database: 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: could not open database: 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: could not open database: 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: could not open database: could not connect to server: Connection refused
+ Is the server running on host "127.0.0.1" and accepting
+ TCP/IP connections on port 20?
+
+[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..ff13e4e
--- /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..6ae5b58
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test5.c
@@ -0,0 +1,162 @@
+/* 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"
+
+
+ { ECPGconnect(__LINE__, 0, "" , "regress_ecpg_user2" , "insecure" , "main", 0); }
+#line 43 "test5.pgc"
+
+ { ECPGdisconnect(__LINE__, "main");}
+#line 44 "test5.pgc"
+
+
+ { 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/" , "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..a54df17
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/connect-test5.stderr
@@ -0,0 +1,92 @@
+[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 <DEFAULT> on <DEFAULT> port <DEFAULT> for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: could not open database: 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 43: could not connect to database "<DEFAULT>" on line 43
+[NO_PID]: sqlca: code: -402, state: 08001
+[NO_PID]: raising sqlcode -220 on line 44: connection "main" does not exist on line 44
+[NO_PID]: sqlca: code: -220, state: 08003
+[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> for user regress_ecpg_user2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGconnect: could not open database: 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..0256609
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-define.c
@@ -0,0 +1,185 @@
+/* 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 <stdlib.h>
+#include <stdio.h>
+
+
+#line 1 "regression.h"
+
+
+
+
+
+
+#line 6 "define.pgc"
+
+
+/* exec sql whenever sqlerror sqlprint ; */
+#line 8 "define.pgc"
+
+
+
+
+
+/* exec sql type intarray is int [ 6 ] */
+#line 13 "define.pgc"
+
+typedef int intarray[ 6];
+
+int
+main(void)
+{
+/* exec sql begin declare section */
+
+
+ typedef char string [ 8 ];
+
+#line 22 "define.pgc"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 23 "define.pgc"
+ intarray amount ;
+
+#line 24 "define.pgc"
+ char name [ 6 ] [ 8 ] ;
+
+#line 37 "define.pgc"
+ char letter [ 6 ] [ 1 ] ;
+
+#if 0
+
+#line 39 "define.pgc"
+ int not_used ;
+
+#endif
+/* exec sql end declare section */
+#line 46 "define.pgc"
+
+ int i,j;
+
+ ECPGdebug(1, stderr);
+
+ { ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0);
+#line 51 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 51 "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 53 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 53 "define.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 54 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 54 "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 56 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 56 "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 57 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 57 "define.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 58 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 58 "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 60 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 60 "define.pgc"
+
+
+ for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
+ {
+ /* exec sql begin declare section */
+
+
+
+
+#line 65 "define.pgc"
+ string n ;
+
+#line 66 "define.pgc"
+ char l = letter [ i ] [ 0 ] ;
+
+#line 67 "define.pgc"
+ int a = amount [ i ] ;
+/* exec sql end declare section */
+#line 68 "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 74 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 74 "define.pgc"
+
+ { ECPGtrans(__LINE__, NULL, "commit");
+#line 75 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 75 "define.pgc"
+
+ { ECPGdisconnect(__LINE__, "CURRENT");
+#line 76 "define.pgc"
+
+if (sqlca.sqlcode < 0) sqlprint();}
+#line 76 "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..869dc46
--- /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 53: 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 53: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 53: OK: CREATE TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 54: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 56: 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 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 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 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 58: action "commit"; connection "ecpg1_regression"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 60: 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 60: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 60: correctly got 2 tuples with 3 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: false offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: true offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: 1 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: 2 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: f offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 60: RESULT: t offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 74: 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 74: using PQexec
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 74: OK: DROP TABLE
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ECPGtrans on line 75: 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..d20abfa
--- /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 'abcdef' , N'abcdef' as foo , E'abc\\bdef' as \"foo\" , U&'d\\0061t\\0061' as U&\"foo\" , 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..c6b71a3
--- /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 'abcdef' , N'abcdef' as foo , E'abc\bdef' as "foo" , U&'d\0061t\0061' as U&"foo" , 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: abcdef 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: abcdef 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: abcdef 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..3d4dd79
--- /dev/null
+++ b/src/interfaces/ecpg/test/expected/preproc-strings.stdout
@@ -0,0 +1,2 @@
+abcdef abcdef abcdef 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-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..cac91dc
--- /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"
+
+
+ sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f')");
+ { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_immediate, command, 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..96b46bd
--- /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..a7e4015
--- /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)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..6c7adb0
--- /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) 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..956a599
--- /dev/null
+++ b/src/interfaces/ecpg/test/pg_regress_ecpg.c
@@ -0,0 +1,181 @@
+/*-------------------------------------------------------------------------
+ *
+ * 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-2020, 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"
+
+#define LINEBUFSIZE 300
+
+static void
+ecpg_filter(const char *sourcefile, const char *outfile)
+{
+ /*
+ * Create a filtered copy of sourcefile, replacing #line x
+ * "./../bla/foo.h" with #line x "foo.h"
+ */
+ FILE *s,
+ *t;
+ char linebuf[LINEBUFSIZE];
+
+ 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);
+ }
+
+ while (fgets(linebuf, LINEBUFSIZE, s))
+ {
+ /* check for "#line " in the beginning */
+ if (strstr(linebuf, "#line ") == linebuf)
+ {
+ char *p = strchr(linebuf, '"');
+ char *n;
+ 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)
+ {
+ n = (char *) malloc(plen);
+ StrNCpy(n, p + 1, plen);
+ replace_string(linebuf, n, "");
+ }
+ }
+ fputs(linebuf, t);
+ }
+ fclose(s);
+ fclose(t);
+}
+
+/*
+ * 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];
+ char *outfile_stdout,
+ expectfile_stdout[MAXPGPATH];
+ char *outfile_stderr,
+ expectfile_stderr[MAXPGPATH];
+ char *outfile_source,
+ expectfile_source[MAXPGPATH];
+ char cmd[MAXPGPATH * 3];
+ char *testname_dash;
+ char *appnameenv;
+
+ snprintf(inprg, sizeof(inprg), "%s/%s", inputdir, testname);
+
+ testname_dash = strdup(testname);
+ replace_string(testname_dash, "/", "-");
+ snprintf(expectfile_stdout, sizeof(expectfile_stdout),
+ "%s/expected/%s.stdout",
+ outputdir, testname_dash);
+ snprintf(expectfile_stderr, sizeof(expectfile_stderr),
+ "%s/expected/%s.stderr",
+ outputdir, testname_dash);
+ snprintf(expectfile_source, sizeof(expectfile_source),
+ "%s/expected/%s.c",
+ outputdir, testname_dash);
+
+ /*
+ * We can use replace_string() here because the replacement string does
+ * not occupy more space than the replaced one.
+ */
+ outfile_stdout = strdup(expectfile_stdout);
+ replace_string(outfile_stdout, "/expected/", "/results/");
+ outfile_stderr = strdup(expectfile_stderr);
+ replace_string(outfile_stderr, "/expected/", "/results/");
+ outfile_source = strdup(expectfile_source);
+ replace_string(outfile_source, "/expected/", "/results/");
+
+ 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");
+
+ snprintf(insource, sizeof(insource), "%s.c", testname);
+ ecpg_filter(insource, outfile_source);
+
+ snprintf(inprg, sizeof(inprg), "%s/%s", inputdir, testname);
+
+ snprintf(cmd, sizeof(cmd),
+ "\"%s\" >\"%s\" 2>\"%s\"",
+ inprg,
+ outfile_stdout,
+ outfile_stderr);
+
+ appnameenv = psprintf("PGAPPNAME=ecpg/%s", testname_dash);
+ putenv(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(appnameenv);
+
+ free(testname_dash);
+ free(outfile_stdout);
+ free(outfile_stderr);
+ free(outfile_source);
+
+ return pid;
+}
+
+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);
+}
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..d360da7
--- /dev/null
+++ b/src/interfaces/ecpg/test/preproc/define.pgc
@@ -0,0 +1,79 @@
+#include <stdlib.h>
+#include <string.h>
+#include <stdlib.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..2968d54
--- /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 'abcdef',
+ N'abcdef' AS foo,
+ E'abc\bdef' AS "foo",
+ U&'d\0061t\0061' AS U&"foo",
+ 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..613bdeb
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/.gitignore
@@ -0,0 +1,48 @@
+/array
+/array.c
+/binary
+/binary.c
+/bytea
+/bytea.c
+/code100
+/code100.c
+/copystdout
+/copystdout.c
+/createtableas
+/createtableas.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..170bcd7
--- /dev/null
+++ b/src/interfaces/ecpg/test/sql/Makefile
@@ -0,0 +1,35 @@
+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 \
+ 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/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..5f02fd5
--- /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..cc9814e
--- /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;
+
+ 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++)
+ {
+ 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..e149b91
--- /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)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..3209da2
--- /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) 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..d491997
--- /dev/null
+++ b/src/interfaces/libpq/Makefile
@@ -0,0 +1,133 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/interfaces/libpq library
+#
+# Portions Copyright (c) 1996-2020, 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-protocol2.o \
+ fe-protocol3.o \
+ fe-secure.o \
+ legacy-pqsignal.o \
+ libpq-events.o \
+ pqexpbuffer.o \
+ fe-auth.o
+
+ifeq ($(with_openssl),yes)
+OBJS += \
+ fe-secure-common.o \
+ 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
+
+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..bbc1f90
--- /dev/null
+++ b/src/interfaces/libpq/exports.txt
@@ -0,0 +1,181 @@
+# 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
diff --git a/src/interfaces/libpq/fe-auth-scram.c b/src/interfaces/libpq/fe-auth-scram.c
new file mode 100644
index 0000000..6d266e9
--- /dev/null
+++ b/src/interfaces/libpq/fe-auth-scram.c
@@ -0,0 +1,860 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-auth-scram.c
+ * The front-end (client) implementation of SCRAM authentication.
+ *
+ * Portions Copyright (c) 1996-2020, 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/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);
+static void 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (empty message)\n"));
+ goto error;
+ }
+ if (inputlen != strlen(input))
+ {
+ printfPQExpBuffer(&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 = true;
+ else
+ {
+ *success = false;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("incorrect server signature\n"));
+ }
+ *done = true;
+ state->state = FE_SCRAM_FINISHED;
+ break;
+
+ default:
+ /* shouldn't happen */
+ printfPQExpBuffer(&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.
+ */
+static char *
+read_attr_value(char **input, char attr, PQExpBuffer errorMessage)
+{
+ char *begin = *input;
+ char *end;
+
+ if (*begin != attr)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("malformed SCRAM message (attribute \"%c\" expected)\n"),
+ attr);
+ return NULL;
+ }
+ begin++;
+
+ if (*begin != '=')
+ {
+ printfPQExpBuffer(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))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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. */
+ calculate_client_proof(state,
+ state->client_final_message_without_proof,
+ client_proof);
+
+ 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);
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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 generated 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid SCRAM response (nonce mismatch)\n"));
+ return false;
+ }
+
+ state->nonce = strdup(nonce);
+ if (state->nonce == NULL)
+ {
+ printfPQExpBuffer(&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 generated 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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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 generated an error string */
+ return false;
+ }
+ state->iterations = strtol(iterations_str, &endptr, 10);
+ if (*endptr != '\0' || state->iterations < 1)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("malformed SCRAM message (invalid iteration count)\n"));
+ return false;
+ }
+
+ if (*input != '\0')
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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);
+
+ printfPQExpBuffer(&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 generated an error message */
+ return false;
+ }
+
+ if (*input != '\0')
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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.
+ */
+static void
+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;
+ scram_HMAC_ctx ctx;
+
+ /*
+ * Calculate SaltedPassword, and store it in 'state' so that we can reuse
+ * it later in verify_server_signature.
+ */
+ scram_SaltedPassword(state->password, state->salt, state->saltlen,
+ state->iterations, state->SaltedPassword);
+
+ scram_ClientKey(state->SaltedPassword, ClientKey);
+ scram_H(ClientKey, SCRAM_KEY_LEN, StoredKey);
+
+ scram_HMAC_init(&ctx, StoredKey, SCRAM_KEY_LEN);
+ scram_HMAC_update(&ctx,
+ state->client_first_message_bare,
+ strlen(state->client_first_message_bare));
+ scram_HMAC_update(&ctx, ",", 1);
+ scram_HMAC_update(&ctx,
+ state->server_first_message,
+ strlen(state->server_first_message));
+ scram_HMAC_update(&ctx, ",", 1);
+ scram_HMAC_update(&ctx,
+ client_final_message_without_proof,
+ strlen(client_final_message_without_proof));
+ scram_HMAC_final(ClientSignature, &ctx);
+
+ for (i = 0; i < SCRAM_KEY_LEN; i++)
+ result[i] = ClientKey[i] ^ ClientSignature[i];
+}
+
+/*
+ * Validate the server signature, received as part of the final exchange
+ * message received from the server.
+ */
+static bool
+verify_server_signature(fe_scram_state *state)
+{
+ uint8 expected_ServerSignature[SCRAM_KEY_LEN];
+ uint8 ServerKey[SCRAM_KEY_LEN];
+ scram_HMAC_ctx ctx;
+
+ scram_ServerKey(state->SaltedPassword, ServerKey);
+
+ /* calculate ServerSignature */
+ scram_HMAC_init(&ctx, ServerKey, SCRAM_KEY_LEN);
+ scram_HMAC_update(&ctx,
+ state->client_first_message_bare,
+ strlen(state->client_first_message_bare));
+ scram_HMAC_update(&ctx, ",", 1);
+ scram_HMAC_update(&ctx,
+ state->server_first_message,
+ strlen(state->server_first_message));
+ scram_HMAC_update(&ctx, ",", 1);
+ scram_HMAC_update(&ctx,
+ state->client_final_message_without_proof,
+ strlen(state->client_final_message_without_proof));
+ scram_HMAC_final(expected_ServerSignature, &ctx);
+
+ if (memcmp(expected_ServerSignature, state->ServerSignature, SCRAM_KEY_LEN) != 0)
+ return false;
+
+ 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..9f5403d
--- /dev/null
+++ b/src/interfaces/libpq/fe-auth.c
@@ -0,0 +1,1280 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-auth.c
+ * The front-end (client) authorization routines
+ *
+ * Portions Copyright (c) 1996-2020, 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)
+ {
+ printfPQExpBuffer(&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'))
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("host name must be specified\n"));
+ return STATUS_ERROR;
+ }
+
+ if (conn->gctx)
+ {
+ printfPQExpBuffer(&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)
+ printfPQExpBuffer(&conn->errorMessage, "%s: SSPI error %x\n",
+ mprefix, (unsigned int) r);
+ else
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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.
+ */
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("duplicate SSPI authentication request\n"));
+ return STATUS_ERROR;
+ }
+
+ /*
+ * Retrieve credentials handle
+ */
+ conn->sspicred = malloc(sizeof(CredHandle));
+ if (conn->sspicred == NULL)
+ {
+ printfPQExpBuffer(&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'))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("channel binding required, but SSL not in use\n"));
+ goto error;
+ }
+
+ if (conn->sasl_state)
+ {
+ printfPQExpBuffer(&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))
+ {
+ printfPQExpBuffer(&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 */
+ {
+ printfPQExpBuffer(&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.
+ */
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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')
+ {
+ printfPQExpBuffer(&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', true, 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);
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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);
+
+ printfPQExpBuffer(&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];
+
+ printfPQExpBuffer(&conn->errorMessage,
+ "pg_local_sendauth: sendmsg: %s\n",
+ strerror_r(errno, sebuf, sizeof(sebuf)));
+ return STATUS_ERROR;
+ }
+ return STATUS_OK;
+#else
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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;
+ }
+ /* Packet has a message type as of protocol 3.0 */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ ret = pqPacketSend(conn, 'p', pwd_to_send, strlen(pwd_to_send) + 1);
+ else
+ ret = pqPacketSend(conn, 0, 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))
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("channel binding required, but server authenticated client without channel binding\n"));
+ result = false;
+ }
+ break;
+ default:
+ printfPQExpBuffer(&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)
+{
+ if (!check_expected_areq(areq, conn))
+ return STATUS_ERROR;
+
+ switch (areq)
+ {
+ case AUTH_REQ_OK:
+ break;
+
+ case AUTH_REQ_KRB4:
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("Kerberos 4 authentication not supported\n"));
+ return STATUS_ERROR;
+
+ case AUTH_REQ_KRB5:
+ printfPQExpBuffer(&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:
+ printfPQExpBuffer(&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:
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSPI authentication not supported\n"));
+ return STATUS_ERROR;
+#endif /* !define(ENABLE_GSS) */
+#endif /* ENABLE_SSPI */
+
+
+ case AUTH_REQ_CRYPT:
+ printfPQExpBuffer(&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')
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ PQnoPasswordSupplied);
+ return STATUS_ERROR;
+ }
+ if (pg_password_sendauth(conn, password, areq) != STATUS_OK)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ "fe_sendauth: invalid authentication request from server: AUTH_REQ_SASL_CONT without AUTH_REQ_SASL\n");
+ return STATUS_ERROR;
+ }
+ if (pg_SASL_continue(conn, payloadlen,
+ (areq == AUTH_REQ_SASL_FIN)) != STATUS_OK)
+ {
+ /* Use error message, if set already */
+ if (conn->errorMessage.len == 0)
+ printfPQExpBuffer(&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:
+ printfPQExpBuffer(&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 put a suitable error message in *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)
+ printfPQExpBuffer(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)
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("could not look up local user ID %d: %s\n"),
+ (int) user_id,
+ strerror_r(pwerr, pwdbuf, sizeof(pwdbuf)));
+ else
+ printfPQExpBuffer(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)
+ printfPQExpBuffer(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;
+
+ /* 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);
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unrecognized password encryption algorithm \"%s\"\n"),
+ algorithm);
+ return NULL;
+ }
+
+ if (!crypt_pwd)
+ printfPQExpBuffer(&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..dc4b15d
--- /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-2020, 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..f80f4e9
--- /dev/null
+++ b/src/interfaces/libpq/fe-connect.c
@@ -0,0 +1,7255 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-connect.c
+ * functions related to setting up a connection to the backend
+ *
+ * Portions Copyright (c) 1996-2020, 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 DefaultTty ""
+#define DefaultOption ""
+#define DefaultAuthtype ""
+#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[] = {
+ /*
+ * "authtype" is no longer used, so mark it "don't show". We keep it in
+ * the array so as not to reject conninfo strings from old apps that might
+ * still try to set it.
+ */
+ {"authtype", "PGAUTHTYPE", DefaultAuthtype, NULL,
+ "Database-Authtype", "D", 20, -1},
+
+ {"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)},
+
+ /*
+ * "tty" is no longer used either, but keep it present for backwards
+ * compatibility.
+ */
+ {"tty", "PGTTY", DefaultTty, NULL,
+ "Backend-Debug-TTY", "D", 40,
+ offsetof(struct pg_conn, pgtty)},
+
+ {"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)},
+
+ {"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", "", 11, /* sizeof("read-write") = 11 */
+ 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;
+ }
+}
+
+
+/*
+ * 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;
+
+ /* 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->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
+ */
+ 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
+ */
+ 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)
+ {
+ printfPQExpBuffer(&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;
+ printfPQExpBuffer(&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_absolute_path(ch->host))
+ ch->type = CHT_UNIX_SOCKET;
+#endif
+ }
+ else
+ {
+ if (ch->host)
+ free(ch->host);
+#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;
+ printfPQExpBuffer(&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;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid channel_binding value: \"%s\"\n"),
+ 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;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid sslmode value: \"%s\"\n"),
+ 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;
+ printfPQExpBuffer(&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;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid ssl_min_protocol_version value: \"%s\"\n"),
+ conn->ssl_min_protocol_version);
+ return false;
+ }
+ if (!sslVerifyProtocolVersion(conn->ssl_max_protocol_version))
+ {
+ conn->status = CONNECTION_BAD;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid ssl_max_protocol_version value: \"%s\"\n"),
+ 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;
+ printfPQExpBuffer(&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;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid gssencmode value: \"%s\"\n"),
+ conn->gssencmode);
+ return false;
+ }
+#ifndef ENABLE_GSS
+ if (strcmp(conn->gssencmode, "require") == 0)
+ {
+ conn->status = CONNECTION_BAD;
+ printfPQExpBuffer(&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;
+ }
+
+ /*
+ * 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;
+ }
+
+ /*
+ * Validate target_session_attrs option.
+ */
+ if (conn->target_session_attrs)
+ {
+ if (strcmp(conn->target_session_attrs, "any") != 0
+ && strcmp(conn->target_session_attrs, "read-write") != 0)
+ {
+ conn->status = CONNECTION_BAD;
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid target_session_attrs value: \"%s\"\n"),
+ conn->target_session_attrs);
+ return false;
+ }
+ }
+
+ /*
+ * 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;
+ printfPQExpBuffer(&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
+ */
+ 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 (pgtty && pgtty[0] != '\0')
+ {
+ if (conn->pgtty)
+ free(conn->pgtty);
+ conn->pgtty = strdup(pgtty);
+ if (!conn->pgtty)
+ 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;
+ printfPQExpBuffer(&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';
+}
+
+/* ----------
+ * connectFailureMessage -
+ * create a friendly error message on connection failure.
+ * ----------
+ */
+static void
+connectFailureMessage(PGconn *conn, int errorno)
+{
+ char sebuf[PG_STRERROR_R_BUFLEN];
+
+#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("could not connect to server: %s\n"
+ "\tIs the server running locally and accepting\n"
+ "\tconnections on Unix domain socket \"%s\"?\n"),
+ SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)),
+ service);
+ }
+ else
+#endif /* HAVE_UNIX_SOCKETS */
+ {
+ char host_addr[NI_MAXHOST];
+ const char *displayed_host;
+ const char *displayed_port;
+
+ /*
+ * Optionally display the network address with the hostname. This is
+ * useful to distinguish between IPv4 and IPv6 connections.
+ */
+ getHostaddr(conn, host_addr, NI_MAXHOST);
+
+ /* 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 &&
+ strlen(host_addr) > 0 &&
+ strcmp(displayed_host, host_addr) != 0)
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("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"),
+ SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)),
+ displayed_host, host_addr,
+ displayed_port);
+ else
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not connect to server: %s\n"
+ "\tIs the server running on host \"%s\" and accepting\n"
+ "\tTCP/IP connections on port %s?\n"),
+ SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)),
+ displayed_host,
+ displayed_port);
+ }
+}
+
+/*
+ * 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("setsockopt(%s) failed: %s\n"),
+ 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("setsockopt(%s) failed: %s\n"),
+ "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("setsockopt(%s) failed: %s\n"),
+ "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("WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"),
+ 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("setsockopt(%s) failed: %s\n"),
+ "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())
+ {
+ printfPQExpBuffer(&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;
+
+ /*
+ * Ensure errorMessage is empty, too. PQconnectPoll will append messages
+ * to it in the process of scanning for a working server. Thus, if we
+ * fail to connect to multiple hosts, the final error message will include
+ * details about each failure.
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /*
+ * 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;
+
+ /*
+ * 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:
+
+ /*
+ * Reset stored error messages since we now have a working
+ * connection
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+ 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);
+ }
+}
+
+/*
+ * This subroutine saves conn->errorMessage, which will be restored back by
+ * restoreErrorMessage subroutine. Returns false on OOM failure.
+ */
+static bool
+saveErrorMessage(PGconn *conn, PQExpBuffer savedMessage)
+{
+ initPQExpBuffer(savedMessage);
+ appendPQExpBufferStr(savedMessage,
+ conn->errorMessage.data);
+ if (PQExpBufferBroken(savedMessage))
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return false;
+ }
+ /* Clear whatever is in errorMessage now */
+ resetPQExpBuffer(&conn->errorMessage);
+ return true;
+}
+
+/*
+ * Restores saved error messages back to conn->errorMessage, prepending them
+ * to whatever is in conn->errorMessage already. (This does the right thing
+ * if anything's been added to conn->errorMessage since saveErrorMessage.)
+ */
+static void
+restoreErrorMessage(PGconn *conn, PQExpBuffer savedMessage)
+{
+ appendPQExpBufferStr(savedMessage, conn->errorMessage.data);
+ resetPQExpBuffer(&conn->errorMessage);
+ appendPQExpBufferStr(&conn->errorMessage, savedMessage->data);
+ /* If any step above hit OOM, just report that */
+ if (PQExpBufferBroken(savedMessage) ||
+ PQExpBufferBroken(&conn->errorMessage))
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ termPQExpBuffer(savedMessage);
+}
+
+/* ----------------
+ * 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;
+ PQExpBufferData savedMessage;
+
+ 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:
+ {
+ /* 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;
+
+ /* We allow pqSetenvPoll to decide whether to proceed. */
+ case CONNECTION_SETENV:
+ break;
+
+ /* Special cases: proceed without waiting. */
+ case CONNECTION_SSL_STARTUP:
+ case CONNECTION_NEEDED:
+ case CONNECTION_CHECK_WRITABLE:
+ case CONNECTION_CONSUME:
+ case CONNECTION_GSS_STARTUP:
+ 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)
+ {
+ /*
+ * Oops, no more hosts. An appropriate error message is already
+ * set up, so just set the right status.
+ */
+ goto error_return;
+ }
+ conn->whichhost++;
+
+ /* 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;
+ 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 error msg */
+ memcpy(&conn->raddr.addr, addr_cur->ai_addr,
+ addr_cur->ai_addrlen);
+ conn->raddr.salen = addr_cur->ai_addrlen;
+
+ /* set connip */
+ if (conn->connip != NULL)
+ {
+ free(conn->connip);
+ conn->connip = NULL;
+ }
+
+ getHostaddr(conn, host_addr, NI_MAXHOST);
+ if (strlen(host_addr) > 0)
+ conn->connip = strdup(host_addr);
+
+ /*
+ * purposely ignore strdup failure; not a big problem if
+ * it fails anyway.
+ */
+
+ conn->sock = socket(addr_cur->ai_family, SOCK_STREAM, 0);
+ if (conn->sock == PGINVALID_SOCKET)
+ {
+ /*
+ * 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;
+ }
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not create socket: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ goto error_return;
+ }
+
+ /*
+ * 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("setsockopt(%s) failed: %s\n"),
+ "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
+
+ /*
+ * 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.
+ */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ startpacket = pqBuildStartupPacket3(conn, &packetlen,
+ EnvironmentOptions);
+ else
+ startpacket = pqBuildStartupPacket2(conn, &packetlen,
+ EnvironmentOptions);
+ if (!startpacket)
+ {
+ /*
+ * will not appendbuffer here, since it's likely to also
+ * run out of memory
+ */
+ printfPQExpBuffer(&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 */
+ if (pqsecure_initialize(conn) != 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)
+ {
+ /* 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)
+ {
+ /* 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;
+ }
+
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ /* Read message length word */
+ if (pqGetInt(&msgLength, 4, conn))
+ {
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+ }
+ else
+ {
+ /* Set phony message length to disable checks below */
+ msgLength = 8;
+ }
+
+ /*
+ * 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.
+ */
+ 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;
+
+ /*
+ * The postmaster typically won't end its message with a
+ * newline, so add one to conform to libpq conventions.
+ */
+ appendPQExpBufferChar(&conn->errorMessage, '\n');
+
+ /*
+ * If we tried to open the connection in 3.0 protocol,
+ * fall back to 2.0 protocol.
+ */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ conn->pversion = PG_PROTOCOL(2, 0);
+ need_new_connection = true;
+ goto keep_going;
+ }
+
+ goto error_return;
+ }
+
+ /*
+ * Can't process if message body isn't all here yet.
+ *
+ * (In protocol 2.0 case, we are assuming messages carry at
+ * least 4 bytes of data.)
+ */
+ 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 (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ if (pqGetErrorNotice3(conn, true))
+ {
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+ }
+ else
+ {
+ 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;
+
+ /* 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;
+
+ /*
+ * Ensure the password salt is in the input buffer, if it's an
+ * MD5 request. All the other authentication methods that
+ * contain extra data in the authentication request are only
+ * supported in protocol version 3, in which case we already
+ * read the whole message above.
+ */
+ if (areq == AUTH_REQ_MD5 && PG_PROTOCOL_MAJOR(conn->pversion) < 3)
+ {
+ msgLength += 4;
+
+ avail = conn->inEnd - conn->inCursor;
+ if (avail < 4)
+ {
+ /*
+ * 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) 4,
+ conn))
+ goto error_return;
+ /* We'll come back when there is more data */
+ return PGRES_POLLING_READING;
+ }
+ }
+
+ /*
+ * 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);
+ conn->errorMessage.len = strlen(conn->errorMessage.data);
+
+ /* 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;
+ }
+
+ /* Fire up post-connection housekeeping if needed */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) < 3)
+ {
+ conn->status = CONNECTION_SETENV;
+ conn->setenv_state = SETENV_STATE_CLIENT_ENCODING_SEND;
+ conn->next_eo = EnvironmentOptions;
+ return PGRES_POLLING_WRITING;
+ }
+
+ /* Almost there now ... */
+ conn->status = CONNECTION_CHECK_TARGET;
+ goto keep_going;
+ }
+
+ case CONNECTION_CHECK_TARGET:
+ {
+ /*
+ * If a read-write connection is required, see if we have one.
+ *
+ * Servers before 7.4 lack the transaction_read_only GUC, but
+ * by the same token they don't have any read-only mode, so we
+ * may just skip the test in that case.
+ */
+ if (conn->sversion >= 70400 &&
+ conn->target_session_attrs != NULL &&
+ strcmp(conn->target_session_attrs, "read-write") == 0)
+ {
+ /*
+ * Save existing error messages across the PQsendQuery
+ * attempt. This is necessary because PQsendQuery is
+ * going to reset conn->errorMessage, so we would lose
+ * error messages related to previous hosts we have tried
+ * and failed to connect to.
+ */
+ if (!saveErrorMessage(conn, &savedMessage))
+ goto error_return;
+
+ conn->status = CONNECTION_OK;
+ if (!PQsendQuery(conn,
+ "SHOW transaction_read_only"))
+ {
+ restoreErrorMessage(conn, &savedMessage);
+ goto error_return;
+ }
+ conn->status = CONNECTION_CHECK_WRITABLE;
+ restoreErrorMessage(conn, &savedMessage);
+ return PGRES_POLLING_READING;
+ }
+
+ /* We can release the address list now. */
+ release_conn_addrinfo(conn);
+
+ /* We are open for business! */
+ conn->status = CONNECTION_OK;
+ return PGRES_POLLING_OK;
+ }
+
+ case CONNECTION_SETENV:
+ {
+ /*
+ * Do post-connection housekeeping (only needed in protocol
+ * 2.0).
+ *
+ * We pretend that the connection is OK for the duration of
+ * these queries.
+ */
+ conn->status = CONNECTION_OK;
+
+ switch (pqSetenvPoll(conn))
+ {
+ case PGRES_POLLING_OK: /* Success */
+ break;
+
+ case PGRES_POLLING_READING: /* Still going */
+ conn->status = CONNECTION_SETENV;
+ return PGRES_POLLING_READING;
+
+ case PGRES_POLLING_WRITING: /* Still going */
+ conn->status = CONNECTION_SETENV;
+ return PGRES_POLLING_WRITING;
+
+ default:
+ goto error_return;
+ }
+
+ /* Almost there now ... */
+ conn->status = CONNECTION_CHECK_TARGET;
+ goto keep_going;
+ }
+
+ case CONNECTION_CONSUME:
+ {
+ conn->status = CONNECTION_OK;
+ if (!PQconsumeInput(conn))
+ goto error_return;
+
+ if (PQisBusy(conn))
+ {
+ conn->status = CONNECTION_CONSUME;
+ return PGRES_POLLING_READING;
+ }
+
+ /*
+ * Call PQgetResult() again to consume NULL result.
+ */
+ res = PQgetResult(conn);
+ if (res != NULL)
+ {
+ PQclear(res);
+ conn->status = CONNECTION_CONSUME;
+ goto keep_going;
+ }
+
+ /* We can release the address list now. */
+ release_conn_addrinfo(conn);
+
+ /* We are open for business! */
+ conn->status = CONNECTION_OK;
+ return PGRES_POLLING_OK;
+ }
+ case CONNECTION_CHECK_WRITABLE:
+ {
+ const char *displayed_host;
+ const char *displayed_port;
+
+ if (!saveErrorMessage(conn, &savedMessage))
+ goto error_return;
+
+ conn->status = CONNECTION_OK;
+ if (!PQconsumeInput(conn))
+ {
+ restoreErrorMessage(conn, &savedMessage);
+ goto error_return;
+ }
+
+ if (PQisBusy(conn))
+ {
+ conn->status = CONNECTION_CHECK_WRITABLE;
+ restoreErrorMessage(conn, &savedMessage);
+ return PGRES_POLLING_READING;
+ }
+
+ res = PQgetResult(conn);
+ if (res && (PQresultStatus(res) == PGRES_TUPLES_OK) &&
+ PQntuples(res) == 1)
+ {
+ char *val;
+
+ val = PQgetvalue(res, 0, 0);
+ if (strncmp(val, "on", 2) == 0)
+ {
+ /* Not writable; fail this connection. */
+ PQclear(res);
+ restoreErrorMessage(conn, &savedMessage);
+
+ /* Append error report to conn->errorMessage. */
+ 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;
+
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not make a writable "
+ "connection to server "
+ "\"%s:%s\"\n"),
+ displayed_host, displayed_port);
+
+ /* 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;
+ }
+
+ /* Session is read-write, so we're good. */
+ PQclear(res);
+ termPQExpBuffer(&savedMessage);
+
+ /*
+ * Finish reading any remaining messages before being
+ * considered as ready.
+ */
+ conn->status = CONNECTION_CONSUME;
+ goto keep_going;
+ }
+
+ /*
+ * Something went wrong with "SHOW transaction_read_only". We
+ * should try next addresses.
+ */
+ if (res)
+ PQclear(res);
+ restoreErrorMessage(conn, &savedMessage);
+
+ /* Append error report to conn->errorMessage. */
+ 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;
+ appendPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("test \"SHOW transaction_read_only\" failed "
+ "on server \"%s:%s\"\n"),
+ displayed_host, displayed_port);
+
+ /* Close connection politely. */
+ conn->status = CONNECTION_OK;
+ sendTerminateConn(conn);
+
+ /* Try next address */
+ conn->try_next_addr = 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(1, 1), &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->xactStatus = PQTRANS_IDLE;
+ conn->options_valid = false;
+ conn->nonblocking = false;
+ conn->setenv_state = SETENV_STATE_IDLE;
+ conn->client_encoding = PG_SQL_ASCII;
+ conn->std_strings = false; /* unless server says differently */
+ conn->verbosity = PQERRORS_DEFAULT;
+ conn->show_context = PQSHOW_CONTEXT_ERRORS;
+ conn->sock = PGINVALID_SOCKET;
+
+ /*
+ * 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->pgtty)
+ free(conn->pgtty);
+ 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->sslcompression)
+ free(conn->sslcompression);
+ 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->last_query)
+ free(conn->last_query);
+ 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', false, 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.
+ */
+ pqDropConnection(conn, true);
+ conn->status = CONNECTION_BAD; /* Well, not really _bad_ - just absent */
+ conn->asyncStatus = PGASYNC_IDLE;
+ conn->xactStatus = PQTRANS_IDLE;
+ 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;
+ printfPQExpBuffer(&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;
+ printfPQExpBuffer(&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;
+ char sebuf[PG_STRERROR_R_BUFLEN];
+ 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)
+ {
+ strncat(errbuf, SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)),
+ 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.
+ *
+ * Note: all messages sent with this routine have a length word, whether
+ * it's protocol 2.0 or 3.0.
+ */
+int
+pqPacketSend(PGconn *conn, char pack_type,
+ const void *buf, size_t buf_len)
+{
+ /* Start the message. */
+ if (pqPutMsgStart(pack_type, true, 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 returned in the third argument 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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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) == '?')
+ {
+ printfPQExpBuffer(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) == '?')
+ {
+ printfPQExpBuffer(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) == '?')
+ {
+ printfPQExpBuffer(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) == '?')
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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);
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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 */
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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))
+ {
+ printfPQExpBuffer(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))
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("out of memory\n"));
+ free(result);
+ return 3;
+ }
+ }
+ found_keyword = true;
+ break;
+ }
+ }
+ if (!found_keyword)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("unterminated quoted string in connection info string\n"));
+ return 3;
+ }
+
+ return 0;
+}
+
+#endif /* USE_LDAP */
+
+#define MAXBUFSIZE 256
+
+/*
+ * 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)
+ {
+ printfPQExpBuffer(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 linenr = 0,
+ i;
+ FILE *f;
+ char buf[MAXBUFSIZE],
+ *line;
+
+ f = fopen(serviceFile, "r");
+ if (f == NULL)
+ {
+ printfPQExpBuffer(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)
+ {
+ fclose(f);
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("line %d too long in service file \"%s\"\n"),
+ linenr,
+ serviceFile);
+ return 2;
+ }
+
+ /* 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)
+ {
+ /* group info already read */
+ fclose(f);
+ return 0;
+ }
+
+ 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:
+ fclose(f);
+ return 0;
+ case 1:
+ case 3:
+ fclose(f);
+ return 3;
+ case 2:
+ continue;
+ }
+ }
+#endif
+
+ key = line;
+ val = strchr(line, '=');
+ if (val == NULL)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("syntax error in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ fclose(f);
+ return 3;
+ }
+ *val++ = '\0';
+
+ if (strcmp(key, "service") == 0)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("nested service specifications not supported in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ fclose(f);
+ return 3;
+ }
+
+ /*
+ * 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)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("out of memory\n"));
+ fclose(f);
+ return 3;
+ }
+ found_keyword = true;
+ break;
+ }
+ }
+
+ if (!found_keyword)
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("syntax error in service file \"%s\", line %d\n"),
+ serviceFile,
+ linenr);
+ fclose(f);
+ return 3;
+ }
+ }
+ }
+ }
+
+ fclose(f);
+
+ return 0;
+}
+
+
+/*
+ * 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)
+ {
+ printfPQExpBuffer(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 left in 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)
+ {
+ printfPQExpBuffer(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 != '=')
+ {
+ printfPQExpBuffer(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')
+ {
+ printfPQExpBuffer(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
+ * left in 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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)
+ printfPQExpBuffer(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)
+ printfPQExpBuffer(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)
+ printfPQExpBuffer(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))
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("out of memory\n"));
+ goto cleanup;
+ }
+
+ /* need a modifiable copy of the input URI */
+ buf = strdup(uri);
+ if (buf == NULL)
+ {
+ printfPQExpBuffer(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 */
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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 != ',')
+ {
+ printfPQExpBuffer(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;
+
+ /*
+ * Scan the params string for '=' and '&', marking the end of keyword
+ * and value respectively.
+ */
+ for (;;)
+ {
+ if (*p == '=')
+ {
+ /* Was there '=' already? */
+ if (value != NULL)
+ {
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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.
+ */
+ if (!conninfo_storeval(connOptions, keyword, value,
+ errorMessage, true, false))
+ {
+ /* Insert generic message if conninfo_storeval didn't give one. */
+ if (errorMessage->len == 0)
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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)))
+ {
+ printfPQExpBuffer(errorMessage,
+ libpq_gettext("invalid percent-encoded token: \"%s\"\n"),
+ str);
+ free(buf);
+ return NULL;
+ }
+
+ c = (hi << 4) | lo;
+ if (c == 0)
+ {
+ printfPQExpBuffer(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)
+ printfPQExpBuffer(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)
+ {
+ printfPQExpBuffer(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 */
+ 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 "";
+}
+
+char *
+PQtty(const PGconn *conn)
+{
+ if (!conn)
+ return NULL;
+ return conn->pgtty;
+}
+
+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");
+
+ 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;
+}
+
+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
+ {
+ /*
+ * In protocol 2 we have to assume the setting will stick, and adjust
+ * our state immediately. In protocol 3 and up we can rely on the
+ * backend to report the parameter value, and we'll change state at
+ * that time.
+ */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) < 3)
+ pqSaveParameterStatus(conn, "client_encoding", encoding);
+ 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;
+}
+
+void
+PQtrace(PGconn *conn, FILE *debug_port)
+{
+ if (conn == NULL)
+ return;
+ PQuntrace(conn);
+ conn->Pfdebug = debug_port;
+}
+
+void
+PQuntrace(PGconn *conn)
+{
+ if (conn == NULL)
+ return;
+ if (conn->Pfdebug)
+ {
+ fflush(conn->Pfdebug);
+ conn->Pfdebug = NULL;
+ }
+}
+
+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_absolute_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 procotol 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..eea0237
--- /dev/null
+++ b/src/interfaces/libpq/fe-exec.c
@@ -0,0 +1,3860 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-exec.c
+ * functions related to sending a query down to the backend
+ *
+ * Portions Copyright (c) 1996-2020, 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"
+};
+
+/*
+ * 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 bool PQsendQueryStart(PGconn *conn);
+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);
+
+
+/* ----------------
+ * 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.data);
+ 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, const char *msg)
+{
+ if (!res)
+ return;
+ if (msg && *msg)
+ res->errMsg = pqResultStrdup(res, msg);
+ else
+ res->errMsg = NULL;
+}
+
+/*
+ * pqCatenateResultError -
+ * concatenate a new error message to the one already in a PGresult
+ */
+void
+pqCatenateResultError(PGresult *res, const char *msg)
+{
+ PQExpBufferData errorBuf;
+
+ if (!res || !msg)
+ return;
+ initPQExpBuffer(&errorBuf);
+ if (res->errMsg)
+ appendPQExpBufferStr(&errorBuf, res->errMsg);
+ appendPQExpBufferStr(&errorBuf, msg);
+ pqSetResultError(res, errorBuf.data);
+ termPQExpBuffer(&errorBuf);
+}
+
+/*
+ * 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. It differs from a
+ * plain call on PQmakeEmptyPGresult() in that if there is already an
+ * async result with status PGRES_FATAL_ERROR, the current error message
+ * is APPENDED to the old error message instead of replacing it. This
+ * behavior lets us report multiple error conditions properly, if necessary.
+ * (An example where this is needed is when the backend sends an 'E' message
+ * and immediately closes the connection --- we want to report both the
+ * backend error and the connection closure error.)
+ */
+void
+pqSaveErrorResult(PGconn *conn)
+{
+ /*
+ * If no old async result, just let PQmakeEmptyPGresult make one. Likewise
+ * if old result is not an error message.
+ */
+ if (conn->result == NULL ||
+ conn->result->resultStatus != PGRES_FATAL_ERROR ||
+ conn->result->errMsg == NULL)
+ {
+ pqClearAsyncResult(conn);
+ conn->result = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+ }
+ else
+ {
+ /* Else, concatenate error message to existing async result. */
+ pqCatenateResultError(conn->result, conn->errorMessage.data);
+ }
+}
+
+/*
+ * As above, and append 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)
+{
+ /*
+ * Ensure conn->result is an error result, and add anything in
+ * conn->errorMessage to it.
+ */
+ pqSaveErrorResult(conn);
+
+ /*
+ * Now append write_err_msg to that. If it's null because of previous
+ * strdup failure, do what we can. (It's likely our machinations here are
+ * all getting OOM failures as well, but ...)
+ */
+ if (conn->write_err_msg && conn->write_err_msg[0] != '\0')
+ pqCatenateResultError(conn->result, conn->write_err_msg);
+ else
+ pqCatenateResultError(conn->result,
+ libpq_gettext("write to server failed\n"));
+}
+
+/*
+ * 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 and make sure PQerrorMessage will agree with the result's
+ * error string.
+ */
+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);
+ else
+ {
+ /*
+ * Make sure PQerrorMessage agrees with result; it could be different
+ * if we have concatenated messages.
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+ appendPQExpBufferStr(&conn->errorMessage,
+ PQresultErrorMessage(res));
+ }
+
+ /*
+ * 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, don't bother invoking the receiver.
+ */
+ res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, false);
+ if (res->errMsg)
+ {
+ sprintf(res->errMsg, "%s\n", msgBuf);
+
+ /*
+ * 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;
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "pqSaveParameterStatus: '%s' = '%s'\n",
+ name, value);
+
+ /*
+ * 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;
+ }
+
+ /*
+ * Special hacks: remember client_encoding and
+ * standard_conforming_strings, and convert server version to a numeric
+ * form. We keep the first two of these 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)
+ {
+ 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 */
+ }
+}
+
+
+/*
+ * 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;
+ }
+
+ return 1;
+
+fail:
+ /* release locally allocated PGresult, if we made one */
+ if (res != conn->result)
+ PQclear(res);
+ return 0;
+}
+
+
+/*
+ * PQsendQuery
+ * Submit a query, but don't wait for it to finish
+ *
+ * Returns: 1 if successfully submitted
+ * 0 if error (conn->errorMessage is set)
+ */
+int
+PQsendQuery(PGconn *conn, const char *query)
+{
+ if (!PQsendQueryStart(conn))
+ return 0;
+
+ /* check the argument */
+ if (!query)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("command string is a null pointer\n"));
+ return 0;
+ }
+
+ /* construct the outgoing Query message */
+ if (pqPutMsgStart('Q', false, conn) < 0 ||
+ pqPuts(query, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ {
+ /* error message should be set up already */
+ return 0;
+ }
+
+ /* remember we are using simple query protocol */
+ conn->queryclass = PGQUERY_SIMPLE;
+
+ /* and remember the query text too, if possible */
+ /* if insufficient memory, last_query just winds up NULL */
+ if (conn->last_query)
+ free(conn->last_query);
+ conn->last_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 (pqFlush(conn) < 0)
+ {
+ /* error message should be set up already */
+ return 0;
+ }
+
+ /* OK, it's launched! */
+ conn->asyncStatus = PGASYNC_BUSY;
+ return 1;
+}
+
+/*
+ * PQsendQueryParams
+ * Like PQsendQuery, but use protocol 3.0 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))
+ return 0;
+
+ /* check the arguments */
+ if (!command)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("command string is a null pointer\n"));
+ return 0;
+ }
+ if (nParams < 0 || nParams > 65535)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ 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)
+{
+ if (!PQsendQueryStart(conn))
+ return 0;
+
+ /* check the arguments */
+ if (!stmtName)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("statement name is a null pointer\n"));
+ return 0;
+ }
+ if (!query)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("command string is a null pointer\n"));
+ return 0;
+ }
+ if (nParams < 0 || nParams > 65535)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ return 0;
+ }
+
+ /* This isn't gonna work on a 2.0 server */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) < 3)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("function requires at least protocol version 3.0\n"));
+ return 0;
+ }
+
+ /* construct the Parse message */
+ if (pqPutMsgStart('P', false, 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;
+
+ /* construct the Sync message */
+ if (pqPutMsgStart('S', false, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* remember we are doing just a Parse */
+ conn->queryclass = PGQUERY_PREPARE;
+
+ /* and remember the query text too, if possible */
+ /* if insufficient memory, last_query just winds up NULL */
+ if (conn->last_query)
+ free(conn->last_query);
+ conn->last_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 (pqFlush(conn) < 0)
+ goto sendFailed;
+
+ /* OK, it's launched! */
+ conn->asyncStatus = PGASYNC_BUSY;
+ return 1;
+
+sendFailed:
+ /* error message should be set up already */
+ return 0;
+}
+
+/*
+ * PQsendQueryPrepared
+ * Like PQsendQuery, but execute a previously prepared statement,
+ * using protocol 3.0 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))
+ return 0;
+
+ /* check the arguments */
+ if (!stmtName)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("statement name is a null pointer\n"));
+ return 0;
+ }
+ if (nParams < 0 || nParams > 65535)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("number of parameters must be between 0 and 65535\n"));
+ return 0;
+ }
+
+ return PQsendQueryGuts(conn,
+ NULL, /* no command to parse */
+ stmtName,
+ nParams,
+ NULL, /* no param types */
+ paramValues,
+ paramLengths,
+ paramFormats,
+ resultFormat);
+}
+
+/*
+ * Common startup code for PQsendQuery and sibling routines
+ */
+static bool
+PQsendQueryStart(PGconn *conn)
+{
+ if (!conn)
+ return false;
+
+ /* clear the error string */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* Don't try to send if we know there's no live connection. */
+ if (conn->status != CONNECTION_OK)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("no connection to the server\n"));
+ return false;
+ }
+ /* Can't send while already busy, either. */
+ if (conn->asyncStatus != PGASYNC_IDLE)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("another command is already in progress\n"));
+ return false;
+ }
+
+ /* 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 protocol-3.0 query sending
+ * 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;
+
+ /* This isn't gonna work on a 2.0 server */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) < 3)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("function requires at least protocol version 3.0\n"));
+ return 0;
+ }
+
+ /*
+ * We will send Parse (if needed), Bind, Describe Portal, Execute, Sync,
+ * using specified statement name and the unnamed portal.
+ */
+
+ if (command)
+ {
+ /* construct the Parse message */
+ if (pqPutMsgStart('P', false, 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', false, 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
+ {
+ printfPQExpBuffer(&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', false, conn) < 0 ||
+ pqPutc('P', conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Execute message */
+ if (pqPutMsgStart('E', false, conn) < 0 ||
+ pqPuts("", conn) < 0 ||
+ pqPutInt(0, 4, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Sync message */
+ if (pqPutMsgStart('S', false, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* remember we are using extended query protocol */
+ conn->queryclass = PGQUERY_EXTENDED;
+
+ /* and remember the query text too, if possible */
+ /* if insufficient memory, last_query just winds up NULL */
+ if (conn->last_query)
+ free(conn->last_query);
+ if (command)
+ conn->last_query = strdup(command);
+ else
+ conn->last_query = NULL;
+
+ /*
+ * 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! */
+ conn->asyncStatus = PGASYNC_BUSY;
+ return 1;
+
+sendFailed:
+ /* 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->queryclass != PGQUERY_SIMPLE &&
+ conn->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)
+{
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ pqParseInput3(conn);
+ else
+ pqParseInput2(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, or if we
+ * had a write failure.
+ */
+ return conn->asyncStatus == PGASYNC_BUSY || conn->write_failed;
+}
+
+
+/*
+ * 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).
+ */
+
+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_READY:
+ 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:
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("unexpected asyncStatus: %d\n"),
+ (int) conn->asyncStatus);
+ res = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+ break;
+ }
+
+ 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))
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"),
+ res->events[i].name);
+ pqSetResultError(res, conn->errorMessage.data);
+ 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 protocol 3.0 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 v3.0 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 protocol 3.0 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;
+
+ /*
+ * 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)
+ {
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ /* In protocol 3, we can 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
+ {
+ /* In older protocols we have to punt */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("COPY IN state must be terminated first\n"));
+ return false;
+ }
+ }
+ else if (resultStatus == PGRES_COPY_OUT)
+ {
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ /*
+ * In protocol 3, we can 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
+ {
+ /* In older protocols we have to punt */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("COPY OUT state must be terminated first\n"));
+ return false;
+ }
+ }
+ else if (resultStatus == PGRES_COPY_BOTH)
+ {
+ /* We don't allow PQexec during COPY BOTH */
+ printfPQExpBuffer(&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 --- but merge error messages if we get more than one error
+ * result.
+ *
+ * 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)
+ {
+ if (lastResult->resultStatus == PGRES_FATAL_ERROR &&
+ result->resultStatus == PGRES_FATAL_ERROR)
+ {
+ pqCatenateResultError(lastResult, result->errMsg);
+ PQclear(result);
+ result = lastResult;
+
+ /*
+ * Make sure PQerrorMessage agrees with concatenated result
+ */
+ resetPQExpBuffer(&conn->errorMessage);
+ appendPQExpBufferStr(&conn->errorMessage, result->errMsg);
+ }
+ else
+ 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)
+{
+ /* Treat null desc_target as empty string */
+ if (!desc_target)
+ desc_target = "";
+
+ if (!PQsendQueryStart(conn))
+ return 0;
+
+ /* This isn't gonna work on a 2.0 server */
+ if (PG_PROTOCOL_MAJOR(conn->pversion) < 3)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("function requires at least protocol version 3.0\n"));
+ return 0;
+ }
+
+ /* construct the Describe message */
+ if (pqPutMsgStart('D', false, conn) < 0 ||
+ pqPutc(desc_type, conn) < 0 ||
+ pqPuts(desc_target, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* construct the Sync message */
+ if (pqPutMsgStart('S', false, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ goto sendFailed;
+
+ /* remember we are doing a Describe */
+ conn->queryclass = PGQUERY_DESCRIBE;
+
+ /* reset last_query string (not relevant now) */
+ if (conn->last_query)
+ {
+ free(conn->last_query);
+ conn->last_query = NULL;
+ }
+
+ /*
+ * 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! */
+ conn->asyncStatus = PGASYNC_BUSY;
+ return 1;
+
+sendFailed:
+ /* 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)
+ {
+ printfPQExpBuffer(&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 even in protocol 2.0
+ * case.)
+ */
+ 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 (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ if (pqPutMsgStart('d', false, conn) < 0 ||
+ pqPutnchar(buffer, nbytes, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+ else
+ {
+ if (pqPutMsgStart(0, false, 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)
+ {
+ printfPQExpBuffer(&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 (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ if (errormsg)
+ {
+ /* Send COPY FAIL */
+ if (pqPutMsgStart('f', false, conn) < 0 ||
+ pqPuts(errormsg, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+ else
+ {
+ /* Send COPY DONE */
+ if (pqPutMsgStart('c', false, 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->queryclass != PGQUERY_SIMPLE)
+ {
+ if (pqPutMsgStart('S', false, conn) < 0 ||
+ pqPutMsgEnd(conn) < 0)
+ return -1;
+ }
+ }
+ else
+ {
+ if (errormsg)
+ {
+ /* Oops, no way to do this in 2.0 */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("function requires at least protocol version 3.0\n"));
+ return -1;
+ }
+ else
+ {
+ /* Send old-style end-of-data marker */
+ if (pqPutMsgStart(0, false, conn) < 0 ||
+ pqPutnchar("\\.\n", 3, 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;
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("no COPY in progress\n"));
+ return -2;
+ }
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ return pqGetCopyData3(conn, buffer, async);
+ else
+ return pqGetCopyData2(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;
+
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ return pqGetline3(conn, s, maxlen);
+ else
+ return pqGetline2(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;
+
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ return pqGetlineAsync3(conn, buffer, bufsize);
+ else
+ return pqGetlineAsync2(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.
+ *
+ * When using protocol 3.0 this is deprecated; it's cleaner to use PQgetResult
+ * to get the transfer status. Note however that when using 2.0 protocol,
+ * recovering from a copy failure often requires a PQreset. PQendcopy will
+ * take care of that, PQgetResult won't.
+ *
+ * RETURNS:
+ * 0 on success
+ * 1 on failure
+ */
+int
+PQendcopy(PGconn *conn)
+{
+ if (!conn)
+ return 0;
+
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ return pqEndcopy3(conn);
+ else
+ return pqEndcopy2(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;
+
+ /* clear the error string */
+ resetPQExpBuffer(&conn->errorMessage);
+
+ if (conn->sock == PGINVALID_SOCKET || conn->asyncStatus != PGASYNC_IDLE ||
+ conn->result != NULL)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("connection in wrong state\n"));
+ return NULL;
+ }
+
+ if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ return pqFunctionCall3(conn, fnid,
+ result_buf, result_len,
+ result_is_int,
+ args, nargs);
+ else
+ return pqFunctionCall2(conn, fnid,
+ result_buf, result_len,
+ result_is_int,
+ args, nargs);
+}
+
+
+/* ====== 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 >= sizeof pgresStatus / sizeof pgresStatus[0])
+ 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);
+
+ /*
+ * Currently, we pass this off to fe-protocol3.c in all cases; it will
+ * behave reasonably sanely with an error reported by fe-protocol2.c as
+ * well. If necessary, we could record the protocol version in PGresults
+ * so as to be able to invoke a version-specific message formatter, but
+ * for now there's no need.
+ */
+ 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.
+ */
+ /* 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);
+}
+
+
+/*
+ * 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)
+ printfPQExpBuffer(&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;
+ }
+ 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;
+
+ /* 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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ printfPQExpBuffer(&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;
+ 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..f87e7b2
--- /dev/null
+++ b/src/interfaces/libpq/fe-gssapi-common.c
@@ -0,0 +1,131 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-gssapi-common.c
+ * The front-end (client) GSSAPI common code
+ *
+ * Portions Copyright (c) 1996-2020, 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)
+{
+ resetPQExpBuffer(&conn->errorMessage);
+ 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'))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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..1569252
--- /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-2020, 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..a94ce06
--- /dev/null
+++ b/src/interfaces/libpq/fe-lobj.c
@@ -0,0 +1,1102 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-lobj.c
+ * Front-end large object interface
+ *
+ * Portions Copyright (c) 1996-2020, 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_truncate\n"));
+ 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)
+ {
+ printfPQExpBuffer(&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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ if (lo_initialize(conn) < 0)
+ return -1;
+ }
+
+ if (conn->lobjfuncs->fn_lo_truncate64 == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_truncate64\n"));
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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)
+ {
+ printfPQExpBuffer(&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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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)
+ {
+ printfPQExpBuffer(&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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ if (lo_initialize(conn) < 0)
+ return -1;
+ }
+
+ if (conn->lobjfuncs->fn_lo_lseek64 == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_lseek64\n"));
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_create\n"));
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ if (lo_initialize(conn) < 0)
+ return -1;
+ }
+
+ if (conn->lobjfuncs->fn_lo_tell64 == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_tell64\n"));
+ 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 (conn == NULL || conn->lobjfuncs == NULL)
+ {
+ 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];
+
+ /*
+ * open the file to be read in
+ */
+ fd = open(filename, O_RDONLY | PG_BINARY, 0666);
+ if (fd < 0)
+ { /* error */
+ printfPQExpBuffer(&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);
+ 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);
+ 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);
+ 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)
+ {
+ printfPQExpBuffer(&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 the large object interface for an existing connection.
+ * We ask the backend about the functions OID's in 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;
+
+ if (!conn)
+ return -1;
+
+ /*
+ * Allocate the structure to hold the functions OID's
+ */
+ lobjfuncs = (PGlobjfuncs *) malloc(sizeof(PGlobjfuncs));
+ if (lobjfuncs == NULL)
+ {
+ printfPQExpBuffer(&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. In 7.3 and later
+ * we need to be schema-safe. lo_create only exists in 8.1 and up.
+ * lo_truncate only exists in 8.3 and up.
+ */
+ if (conn->sversion >= 70300)
+ 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')";
+ else
+ query = "select proname, oid from pg_proc "
+ "where proname = 'lo_open' "
+ "or proname = 'lo_close' "
+ "or proname = 'lo_creat' "
+ "or proname = 'lo_unlink' "
+ "or proname = 'lo_lseek' "
+ "or proname = 'lo_tell' "
+ "or proname = 'loread' "
+ "or proname = 'lowrite'";
+
+ res = PQexec(conn, query);
+ if (res == NULL)
+ {
+ free(lobjfuncs);
+ return -1;
+ }
+
+ if (res->resultStatus != PGRES_TUPLES_OK)
+ {
+ free(lobjfuncs);
+ PQclear(res);
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_open\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_close == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_close\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_creat == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_creat\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_unlink == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_unlink\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_lseek == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_lseek\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_tell == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lo_tell\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_read == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function loread\n"));
+ free(lobjfuncs);
+ return -1;
+ }
+ if (lobjfuncs->fn_lo_write == 0)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("cannot determine OID of function lowrite\n"));
+ 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..9273984
--- /dev/null
+++ b/src/interfaces/libpq/fe-misc.c
@@ -0,0 +1,1314 @@
+/*-------------------------------------------------------------------------
+ *
+ * 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-2020, 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;
+}
+
+/*
+ * fputnbytes: print exactly N bytes to a file
+ *
+ * We avoid using %.*s here because it can misbehave if the data
+ * is not valid in what libc thinks is the prevailing encoding.
+ */
+static void
+fputnbytes(FILE *f, const char *str, size_t n)
+{
+ while (n-- > 0)
+ fputc(*str++, f);
+}
+
+
+/*
+ * 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++];
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "From backend> %c\n", *result);
+
+ return 0;
+}
+
+
+/*
+ * pqPutc: write 1 char to the current message
+ */
+int
+pqPutc(char c, PGconn *conn)
+{
+ if (pqPutMsgBytes(&c, 1, conn))
+ return EOF;
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "To backend> %c\n", c);
+
+ 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;
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "From backend> \"%s\"\n",
+ buf->data);
+
+ 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;
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "To backend> \"%s\"\n", s);
+
+ 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;
+
+ if (conn->Pfdebug)
+ {
+ fprintf(conn->Pfdebug, "From backend (%lu)> ", (unsigned long) len);
+ fputnbytes(conn->Pfdebug, s, len);
+ fprintf(conn->Pfdebug, "\n");
+ }
+
+ 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;
+
+ if (conn->Pfdebug)
+ {
+ fprintf(conn->Pfdebug, "From backend (%lu)> ", (unsigned long) len);
+ fputnbytes(conn->Pfdebug, conn->inBuffer + conn->inCursor, len);
+ fprintf(conn->Pfdebug, "\n");
+ }
+
+ 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;
+
+ if (conn->Pfdebug)
+ {
+ fprintf(conn->Pfdebug, "To backend> ");
+ fputnbytes(conn->Pfdebug, s, len);
+ fprintf(conn->Pfdebug, "\n");
+ }
+
+ 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;
+ }
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "From backend (#%lu)> %d\n", (unsigned long) bytes, *result);
+
+ 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;
+ }
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "To backend (%lu#)> %d\n", (unsigned long) bytes, value);
+
+ 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 */
+ printfPQExpBuffer(&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 */
+ printfPQExpBuffer(&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)
+ *
+ * force_len forces the message to have a length word; otherwise, we add
+ * a length word if protocol 3.
+ *
+ * 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. If we are sending a message without length word
+ * (pre protocol 3.0 only), then outMsgStart is -1. The state variable
+ * conn->outMsgEnd is the end of the data collected so far.
+ */
+int
+pqPutMsgStart(char msg_type, bool force_len, 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? */
+ if (force_len || PG_PROTOCOL_MAJOR(conn->pversion) >= 3)
+ {
+ lenPos = endPos;
+ /* allow room for message length */
+ endPos += 4;
+ }
+ else
+ lenPos = -1;
+
+ /* 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 */
+
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "To backend> Msg %c\n",
+ msg_type ? msg_type : ' ');
+
+ 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)
+{
+ if (conn->Pfdebug)
+ fprintf(conn->Pfdebug, "To backend> Msg complete, length %u\n",
+ conn->outMsgEnd - conn->outCount);
+
+ /* 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);
+ }
+
+ /* 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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ if (SOCK_ERRNO == EINTR)
+ goto retry3;
+ /* Some systems return EAGAIN/EWOULDBLOCK for no data */
+#ifdef EAGAIN
+ if (SOCK_ERRNO == EAGAIN)
+ return someread;
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ if (SOCK_ERRNO == EWOULDBLOCK)
+ return someread;
+#endif
+ /* We might get ECONNRESET here if using TCP and backend died */
+#ifdef ECONNRESET
+ if (SOCK_ERRNO == ECONNRESET)
+ goto definitelyFailed;
+#endif
+ /* 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)
+ {
+ if (SOCK_ERRNO == EINTR)
+ goto retry4;
+ /* Some systems return EAGAIN/EWOULDBLOCK for no data */
+#ifdef EAGAIN
+ if (SOCK_ERRNO == EAGAIN)
+ return 0;
+#endif
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
+ if (SOCK_ERRNO == EWOULDBLOCK)
+ return 0;
+#endif
+ /* We might get ECONNRESET here if using TCP and backend died */
+#ifdef ECONNRESET
+ if (SOCK_ERRNO == ECONNRESET)
+ goto definitelyFailed;
+#endif
+ /* 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:
+ printfPQExpBuffer(&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 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("connection not open\n"));
+ conn->write_failed = true;
+ /* Transfer error message to conn->write_err_msg, if possible */
+ /* (strdup failure is OK, we'll cope later) */
+ conn->write_err_msg = strdup(conn->errorMessage.data);
+ resetPQExpBuffer(&conn->errorMessage);
+ /* 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).
+ *
+ * Note: this assumes that pqsecure_write and its children
+ * will overwrite not append to conn->errorMessage. If
+ * that's ever changed, we could remember the length of
+ * conn->errorMessage at entry to this routine, and then
+ * save and delete just what was appended.
+ */
+ conn->write_err_msg = strdup(conn->errorMessage.data);
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* 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->Pfdebug)
+ fflush(conn->Pfdebug);
+
+ if (conn->outCount > 0)
+ 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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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];
+
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("select() failed: %s\n"),
+ 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.
+ */
+int
+PQmblen(const char *s, int encoding)
+{
+ return 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)
+{
+ static 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;
+
+ already_bound = true;
+ /* No relocatable lookup here because the binary could be anywhere */
+ ldir = getenv("PGLOCALEDIR");
+ if (!ldir)
+ ldir = LOCALEDIR;
+ bindtextdomain(PG_TEXTDOMAIN("libpq"), ldir);
+#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..8096934
--- /dev/null
+++ b/src/interfaces/libpq/fe-print.c
@@ -0,0 +1,782 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-print.c
+ * functions for pretty-printing query results
+ *
+ * Portions Copyright (c) 1996-2020, 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"
+
+#define PQmblenBounded(s, e) strnlen(s, PQmblen(s, e))
+
+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-protocol2.c b/src/interfaces/libpq/fe-protocol2.c
new file mode 100644
index 0000000..9360c54
--- /dev/null
+++ b/src/interfaces/libpq/fe-protocol2.c
@@ -0,0 +1,1612 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-protocol2.c
+ * functions that are specific to frontend/backend protocol version 2
+ *
+ * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-protocol2.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 "port/pg_bswap.h"
+
+static int getRowDescriptions(PGconn *conn);
+static int getAnotherTuple(PGconn *conn, bool binary);
+static int pqGetErrorNotice2(PGconn *conn, bool isError);
+static void checkXactStatus(PGconn *conn, const char *cmdTag);
+static int getNotify(PGconn *conn);
+
+
+/*
+ * pqSetenvPoll
+ *
+ * Polls the process of passing the values of a standard set of environment
+ * variables to the backend.
+ */
+PostgresPollingStatusType
+pqSetenvPoll(PGconn *conn)
+{
+ PGresult *res;
+
+ if (conn == NULL || conn->status == CONNECTION_BAD)
+ return PGRES_POLLING_FAILED;
+
+ /* Check whether there are any data for us */
+ switch (conn->setenv_state)
+ {
+ /* These are reading states */
+ case SETENV_STATE_CLIENT_ENCODING_WAIT:
+ case SETENV_STATE_OPTION_WAIT:
+ case SETENV_STATE_QUERY1_WAIT:
+ case SETENV_STATE_QUERY2_WAIT:
+ {
+ /* 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 SETENV_STATE_CLIENT_ENCODING_SEND:
+ case SETENV_STATE_OPTION_SEND:
+ case SETENV_STATE_QUERY1_SEND:
+ case SETENV_STATE_QUERY2_SEND:
+ break;
+
+ /* Should we raise an error if called when not active? */
+ case SETENV_STATE_IDLE:
+ return PGRES_POLLING_OK;
+
+ default:
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid setenv state %c, probably indicative of memory corruption\n"),
+ conn->setenv_state);
+ goto error_return;
+ }
+
+ /* We will loop here until there is nothing left to do in this call. */
+ for (;;)
+ {
+ switch (conn->setenv_state)
+ {
+ /*
+ * The _CLIENT_ENCODING_SEND code is slightly different from
+ * _OPTION_SEND below (e.g., no getenv() call), which is why a
+ * different state is used.
+ */
+ case SETENV_STATE_CLIENT_ENCODING_SEND:
+ {
+ char setQuery[100]; /* note length limit in
+ * sprintf below */
+ const char *val = conn->client_encoding_initial;
+
+ if (val)
+ {
+ if (pg_strcasecmp(val, "default") == 0)
+ sprintf(setQuery, "SET client_encoding = DEFAULT");
+ else
+ sprintf(setQuery, "SET client_encoding = '%.60s'",
+ val);
+#ifdef CONNECTDEBUG
+ fprintf(stderr,
+ "Sending client_encoding with %s\n",
+ setQuery);
+#endif
+ if (!PQsendQuery(conn, setQuery))
+ goto error_return;
+
+ conn->setenv_state = SETENV_STATE_CLIENT_ENCODING_WAIT;
+ }
+ else
+ conn->setenv_state = SETENV_STATE_OPTION_SEND;
+ break;
+ }
+
+ case SETENV_STATE_OPTION_SEND:
+ {
+ /*
+ * Send SET commands for stuff directed by Environment
+ * Options. Note: we assume that SET commands won't start
+ * transaction blocks, even in a 7.3 server with
+ * autocommit off.
+ */
+ char setQuery[100]; /* note length limit in
+ * sprintf below */
+
+ if (conn->next_eo->envName)
+ {
+ const char *val;
+
+ if ((val = getenv(conn->next_eo->envName)))
+ {
+ if (pg_strcasecmp(val, "default") == 0)
+ sprintf(setQuery, "SET %s = DEFAULT",
+ conn->next_eo->pgName);
+ else
+ sprintf(setQuery, "SET %s = '%.60s'",
+ conn->next_eo->pgName, val);
+#ifdef CONNECTDEBUG
+ fprintf(stderr,
+ "Use environment variable %s to send %s\n",
+ conn->next_eo->envName, setQuery);
+#endif
+ if (!PQsendQuery(conn, setQuery))
+ goto error_return;
+
+ conn->setenv_state = SETENV_STATE_OPTION_WAIT;
+ }
+ else
+ conn->next_eo++;
+ }
+ else
+ {
+ /* No more options to send, so move on to querying */
+ conn->setenv_state = SETENV_STATE_QUERY1_SEND;
+ }
+ break;
+ }
+
+ case SETENV_STATE_CLIENT_ENCODING_WAIT:
+ {
+ if (PQisBusy(conn))
+ return PGRES_POLLING_READING;
+
+ res = PQgetResult(conn);
+
+ if (res)
+ {
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ goto error_return;
+ }
+ PQclear(res);
+ /* Keep reading until PQgetResult returns NULL */
+ }
+ else
+ {
+ /* Query finished, so send the next option */
+ conn->setenv_state = SETENV_STATE_OPTION_SEND;
+ }
+ break;
+ }
+
+ case SETENV_STATE_OPTION_WAIT:
+ {
+ if (PQisBusy(conn))
+ return PGRES_POLLING_READING;
+
+ res = PQgetResult(conn);
+
+ if (res)
+ {
+ if (PQresultStatus(res) != PGRES_COMMAND_OK)
+ {
+ PQclear(res);
+ goto error_return;
+ }
+ PQclear(res);
+ /* Keep reading until PQgetResult returns NULL */
+ }
+ else
+ {
+ /* Query finished, so send the next option */
+ conn->next_eo++;
+ conn->setenv_state = SETENV_STATE_OPTION_SEND;
+ }
+ break;
+ }
+
+ case SETENV_STATE_QUERY1_SEND:
+ {
+ /*
+ * Issue query to get information we need. Here we must
+ * use begin/commit in case autocommit is off by default
+ * in a 7.3 server.
+ *
+ * Note: version() exists in all protocol-2.0-supporting
+ * backends. In 7.3 it would be safer to write
+ * pg_catalog.version(), but we can't do that without
+ * causing problems on older versions.
+ */
+ if (!PQsendQuery(conn, "begin; select version(); end"))
+ goto error_return;
+
+ conn->setenv_state = SETENV_STATE_QUERY1_WAIT;
+ return PGRES_POLLING_READING;
+ }
+
+ case SETENV_STATE_QUERY1_WAIT:
+ {
+ if (PQisBusy(conn))
+ return PGRES_POLLING_READING;
+
+ res = PQgetResult(conn);
+
+ if (res)
+ {
+ char *val;
+
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ /* ignore begin/commit command results */
+ PQclear(res);
+ continue;
+ }
+
+ if (PQresultStatus(res) != PGRES_TUPLES_OK ||
+ PQntuples(res) != 1)
+ {
+ PQclear(res);
+ goto error_return;
+ }
+
+ /*
+ * Extract server version and save as if
+ * ParameterStatus
+ */
+ val = PQgetvalue(res, 0, 0);
+ if (val && strncmp(val, "PostgreSQL ", 11) == 0)
+ {
+ char *ptr;
+
+ /* strip off PostgreSQL part */
+ val += 11;
+
+ /*
+ * strip off platform part (scribbles on result,
+ * naughty naughty)
+ */
+ ptr = strchr(val, ' ');
+ if (ptr)
+ *ptr = '\0';
+
+ pqSaveParameterStatus(conn, "server_version",
+ val);
+ }
+
+ PQclear(res);
+ /* Keep reading until PQgetResult returns NULL */
+ }
+ else
+ {
+ /* Query finished, move to next */
+ conn->setenv_state = SETENV_STATE_QUERY2_SEND;
+ }
+ break;
+ }
+
+ case SETENV_STATE_QUERY2_SEND:
+ {
+ const char *query;
+
+ /*
+ * pg_client_encoding does not exist in pre-7.2 servers.
+ * So we need to be prepared for an error here. Do *not*
+ * start a transaction block, except in 7.3 servers where
+ * we need to prevent autocommit-off from starting a
+ * transaction anyway.
+ */
+ if (conn->sversion >= 70300 &&
+ conn->sversion < 70400)
+ query = "begin; select pg_catalog.pg_client_encoding(); end";
+ else
+ query = "select pg_client_encoding()";
+ if (!PQsendQuery(conn, query))
+ goto error_return;
+
+ conn->setenv_state = SETENV_STATE_QUERY2_WAIT;
+ return PGRES_POLLING_READING;
+ }
+
+ case SETENV_STATE_QUERY2_WAIT:
+ {
+ if (PQisBusy(conn))
+ return PGRES_POLLING_READING;
+
+ res = PQgetResult(conn);
+
+ if (res)
+ {
+ const char *val;
+
+ if (PQresultStatus(res) == PGRES_COMMAND_OK)
+ {
+ /* ignore begin/commit command results */
+ PQclear(res);
+ continue;
+ }
+
+ if (PQresultStatus(res) == PGRES_TUPLES_OK &&
+ PQntuples(res) == 1)
+ {
+ /* Extract client encoding and save it */
+ val = PQgetvalue(res, 0, 0);
+ if (val && *val) /* null should not happen, but */
+ pqSaveParameterStatus(conn, "client_encoding",
+ val);
+ }
+ else
+ {
+ /*
+ * Error: presumably function not available, so
+ * use PGCLIENTENCODING or SQL_ASCII as the
+ * fallback.
+ */
+ val = getenv("PGCLIENTENCODING");
+ if (val && *val)
+ pqSaveParameterStatus(conn, "client_encoding",
+ val);
+ else
+ pqSaveParameterStatus(conn, "client_encoding",
+ "SQL_ASCII");
+ }
+
+ PQclear(res);
+ /* Keep reading until PQgetResult returns NULL */
+ }
+ else
+ {
+ /* Query finished, so we're done */
+ conn->setenv_state = SETENV_STATE_IDLE;
+ return PGRES_POLLING_OK;
+ }
+ break;
+ }
+
+ default:
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("invalid state %c, "
+ "probably indicative of memory corruption\n"),
+ conn->setenv_state);
+ goto error_return;
+ }
+ }
+
+ /* Unreachable */
+
+error_return:
+ conn->setenv_state = SETENV_STATE_IDLE;
+ return PGRES_POLLING_FAILED;
+}
+
+
+/*
+ * 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
+pqParseInput2(PGconn *conn)
+{
+ char id;
+
+ /*
+ * Loop to parse successive complete messages available in the buffer.
+ */
+ for (;;)
+ {
+ /*
+ * Quit if in COPY_OUT state: we expect raw data from the server until
+ * PQendcopy is called. Don't try to parse it according to the normal
+ * protocol. (This is bogus. The data lines ought to be part of the
+ * protocol and have identifying leading characters.)
+ */
+ if (conn->asyncStatus == PGASYNC_COPY_OUT)
+ return;
+
+ /*
+ * OK to try to read a message type code.
+ */
+ conn->inCursor = conn->inStart;
+ if (pqGetc(&id, conn))
+ return;
+
+ /*
+ * NOTIFY and NOTICE messages can happen in any state besides COPY
+ * OUT; 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.
+ */
+ if (id == 'A')
+ {
+ if (getNotify(conn))
+ return;
+ }
+ else if (id == 'N')
+ {
+ if (pqGetErrorNotice2(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 displayed using the notice processor;
+ * 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 (pqGetErrorNotice2(conn, false /* treat as notice */ ))
+ return;
+ }
+ else
+ {
+ pqInternalNotice(&conn->noticeHooks,
+ "message type 0x%02x arrived from server while idle",
+ id);
+ /* Discard the unexpected message; good idea?? */
+ conn->inStart = conn->inEnd;
+ break;
+ }
+ }
+ 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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ if (conn->result)
+ {
+ strlcpy(conn->result->cmdStatus, conn->workBuffer.data,
+ CMDSTATUS_LEN);
+ }
+ checkXactStatus(conn, conn->workBuffer.data);
+ conn->asyncStatus = PGASYNC_READY;
+ break;
+ case 'E': /* error return */
+ if (pqGetErrorNotice2(conn, true))
+ return;
+ conn->asyncStatus = PGASYNC_READY;
+ break;
+ case 'Z': /* backend is ready for new query */
+ conn->asyncStatus = PGASYNC_IDLE;
+ break;
+ case 'I': /* empty query */
+ /* read and throw away the closing '\0' */
+ if (pqGetc(&id, conn))
+ return;
+ if (id != '\0')
+ pqInternalNotice(&conn->noticeHooks,
+ "unexpected character %c following empty query response (\"I\" message)",
+ id);
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_EMPTY_QUERY);
+ if (!conn->result)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ conn->asyncStatus = PGASYNC_READY;
+ 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 'P': /* synchronous (normal) portal */
+ if (pqGets(&conn->workBuffer, conn))
+ return;
+ /* We pretty much ignore this message type... */
+ break;
+ case 'T': /* row descriptions (start of query results) */
+ if (conn->result == NULL)
+ {
+ /* First 'T' in a query sequence */
+ if (getRowDescriptions(conn))
+ return;
+ /* getRowDescriptions() moves inStart itself */
+ continue;
+ }
+ 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 'D': /* ASCII data tuple */
+ if (conn->result != NULL)
+ {
+ /* Read another tuple of a normal query response */
+ if (getAnotherTuple(conn, false))
+ return;
+ /* getAnotherTuple() moves inStart itself */
+ continue;
+ }
+ else
+ {
+ pqInternalNotice(&conn->noticeHooks,
+ "server sent data (\"D\" message) without prior row description (\"T\" message)");
+ /* Discard the unexpected message; good idea?? */
+ conn->inStart = conn->inEnd;
+ return;
+ }
+ break;
+ case 'B': /* Binary data tuple */
+ if (conn->result != NULL)
+ {
+ /* Read another tuple of a normal query response */
+ if (getAnotherTuple(conn, true))
+ return;
+ /* getAnotherTuple() moves inStart itself */
+ continue;
+ }
+ else
+ {
+ pqInternalNotice(&conn->noticeHooks,
+ "server sent binary data (\"B\" message) without prior row description (\"T\" message)");
+ /* Discard the unexpected message; good idea?? */
+ conn->inStart = conn->inEnd;
+ return;
+ }
+ break;
+ case 'G': /* Start Copy In */
+ conn->asyncStatus = PGASYNC_COPY_IN;
+ break;
+ case 'H': /* Start Copy Out */
+ conn->asyncStatus = PGASYNC_COPY_OUT;
+ break;
+
+ /*
+ * Don't need to process CopyBothResponse here because it
+ * never arrives from the server during protocol 2.0.
+ */
+ default:
+ printfPQExpBuffer(&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);
+ /* Discard the unexpected message; good idea?? */
+ conn->inStart = conn->inEnd;
+ conn->asyncStatus = PGASYNC_READY;
+ return;
+ } /* switch on protocol character */
+ }
+ /* Successfully consumed this message */
+ conn->inStart = conn->inCursor;
+ }
+}
+
+/*
+ * parseInput subroutine to read a 'T' (row descriptions) message.
+ * We build a PGresult structure containing the attribute data.
+ * Returns: 0 if completed message, EOF if error or not enough data
+ * received yet.
+ *
+ * Note that if we run out of data, we have to suspend and reprocess
+ * the message after more data is received. Otherwise, conn->inStart
+ * must get advanced past the processed data.
+ */
+static int
+getRowDescriptions(PGconn *conn)
+{
+ PGresult *result;
+ int nfields;
+ const char *errmsg;
+ int i;
+
+ 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. */
+ /* the next two bytes are the number of fields */
+ if (pqGetInt(&(result->numAttributes), 2, conn))
+ goto EOFexit;
+ 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));
+ }
+
+ /* get type info */
+ for (i = 0; i < nfields; i++)
+ {
+ int typid;
+ int typlen;
+ int atttypmod;
+
+ if (pqGets(&conn->workBuffer, conn) ||
+ pqGetInt(&typid, 4, conn) ||
+ pqGetInt(&typlen, 2, conn) ||
+ pqGetInt(&atttypmod, 4, conn))
+ goto EOFexit;
+
+ /*
+ * Since pqGetInt treats 2-byte integers as unsigned, we need to
+ * coerce the result to signed form.
+ */
+ typlen = (int) ((int16) typlen);
+
+ 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 = 0;
+ result->attDescs[i].columnid = 0;
+ result->attDescs[i].format = 0;
+ result->attDescs[i].typid = typid;
+ result->attDescs[i].typlen = typlen;
+ result->attDescs[i].atttypmod = atttypmod;
+ }
+
+ /* Success! */
+ conn->result = result;
+
+ /* Advance inStart to show that the "T" message has been processed. */
+ conn->inStart = conn->inCursor;
+
+ /*
+ * 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 the failed message. Unfortunately we don't know for sure where
+ * the end is, so just throw away everything in the input buffer. This is
+ * not very desirable but it's the best we can do in protocol v2.
+ */
+ conn->inStart = conn->inEnd;
+
+ /*
+ * 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");
+
+ printfPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
+
+ /*
+ * XXX: if PQmakeEmptyPGresult() fails, there's probably not much we can
+ * do to recover...
+ */
+ conn->result = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+ conn->asyncStatus = PGASYNC_READY;
+
+EOFexit:
+ if (result && result != conn->result)
+ PQclear(result);
+ return EOF;
+}
+
+/*
+ * parseInput subroutine to read a 'B' or 'D' (row data) message.
+ * We fill rowbuf with column pointers and then call the row processor.
+ * Returns: 0 if completed message, EOF if error or not enough data
+ * received yet.
+ *
+ * Note that if we run out of data, we have to suspend and reprocess
+ * the message after more data is received. Otherwise, conn->inStart
+ * must get advanced past the processed data.
+ */
+static int
+getAnotherTuple(PGconn *conn, bool binary)
+{
+ PGresult *result = conn->result;
+ int nfields = result->numAttributes;
+ const char *errmsg;
+ PGdataValue *rowbuf;
+
+ /* the backend sends us a bitmap of which attributes are null */
+ char std_bitmap[64]; /* used unless it doesn't fit */
+ char *bitmap = std_bitmap;
+ int i;
+ size_t nbytes; /* the number of bytes in bitmap */
+ char bmap; /* One byte of the bitmap */
+ int bitmap_index; /* Its index */
+ int bitcnt; /* number of bits examined in current byte */
+ int vlen; /* length of the current field value */
+
+ /* 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;
+ }
+
+ /* Save format specifier */
+ result->binary = binary;
+
+ /*
+ * If it's binary, fix the column format indicators. We assume the
+ * backend will consistently send either B or D, not a mix.
+ */
+ if (binary)
+ {
+ for (i = 0; i < nfields; i++)
+ result->attDescs[i].format = 1;
+ }
+
+ /* Get the null-value bitmap */
+ nbytes = (nfields + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
+ /* malloc() only for unusually large field counts... */
+ if (nbytes > sizeof(std_bitmap))
+ {
+ bitmap = (char *) malloc(nbytes);
+ if (!bitmap)
+ {
+ errmsg = NULL; /* means "out of memory", see below */
+ goto advance_and_error;
+ }
+ }
+
+ if (pqGetnchar(bitmap, nbytes, conn))
+ goto EOFexit;
+
+ /* Scan the fields */
+ bitmap_index = 0;
+ bmap = bitmap[bitmap_index];
+ bitcnt = 0;
+
+ for (i = 0; i < nfields; i++)
+ {
+ /* get the value length */
+ if (!(bmap & 0200))
+ vlen = NULL_LEN;
+ else if (pqGetInt(&vlen, 4, conn))
+ goto EOFexit;
+ else
+ {
+ if (!binary)
+ vlen = vlen - 4;
+ if (vlen < 0)
+ vlen = 0;
+ }
+ 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))
+ goto EOFexit;
+ }
+
+ /* advance the bitmap stuff */
+ bitcnt++;
+ if (bitcnt == BITS_PER_BYTE)
+ {
+ bitmap_index++;
+ bmap = bitmap[bitmap_index];
+ bitcnt = 0;
+ }
+ else
+ bmap <<= 1;
+ }
+
+ /* Release bitmap now if we allocated it */
+ if (bitmap != std_bitmap)
+ free(bitmap);
+ bitmap = NULL;
+
+ /* Advance inStart to show that the "D" message has been processed. */
+ conn->inStart = conn->inCursor;
+
+ /* Process the collected row */
+ errmsg = NULL;
+ if (pqRowProcessor(conn, &errmsg))
+ return 0; /* normal, successful exit */
+
+ goto set_error_result; /* pqRowProcessor failed, report it */
+
+advance_and_error:
+
+ /*
+ * Discard the failed message. Unfortunately we don't know for sure where
+ * the end is, so just throw away everything in the input buffer. This is
+ * not very desirable but it's the best we can do in protocol v2.
+ */
+ conn->inStart = conn->inEnd;
+
+set_error_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");
+
+ printfPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
+
+ /*
+ * XXX: if PQmakeEmptyPGresult() fails, there's probably not much we can
+ * do to recover...
+ */
+ conn->result = PQmakeEmptyPGresult(conn, PGRES_FATAL_ERROR);
+ conn->asyncStatus = PGASYNC_READY;
+
+EOFexit:
+ if (bitmap != NULL && bitmap != std_bitmap)
+ free(bitmap);
+ return EOF;
+}
+
+
+/*
+ * 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 has already been consumed.
+ * Exit: returns 0 if successfully consumed message.
+ * returns EOF if not enough data.
+ */
+static int
+pqGetErrorNotice2(PGconn *conn, bool isError)
+{
+ PGresult *res = NULL;
+ PQExpBufferData workBuf;
+ char *startp;
+ char *splitp;
+
+ /*
+ * 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 message 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.
+ */
+ initPQExpBuffer(&workBuf);
+ if (pqGets(&workBuf, conn))
+ goto failure;
+
+ /*
+ * Make a PGresult to hold the message. 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;
+ res->errMsg = pqResultStrdup(res, workBuf.data);
+ }
+
+ /*
+ * Break the message into fields. We can't do very much here, but we can
+ * split the severity code off, and remove trailing newlines. Also, we use
+ * the heuristic that the primary message extends only to the first
+ * newline --- anything after that is detail message. (In some cases it'd
+ * be better classed as hint, but we can hardly be expected to guess that
+ * here.)
+ */
+ while (workBuf.len > 0 && workBuf.data[workBuf.len - 1] == '\n')
+ workBuf.data[--workBuf.len] = '\0';
+ splitp = strstr(workBuf.data, ": ");
+ if (splitp)
+ {
+ /* what comes before the colon is severity */
+ *splitp = '\0';
+ pqSaveMessageField(res, PG_DIAG_SEVERITY, workBuf.data);
+ startp = splitp + 3;
+ }
+ else
+ {
+ /* can't find a colon? oh well... */
+ startp = workBuf.data;
+ }
+ splitp = strchr(startp, '\n');
+ if (splitp)
+ {
+ /* what comes before the newline is primary message */
+ *splitp++ = '\0';
+ pqSaveMessageField(res, PG_DIAG_MESSAGE_PRIMARY, startp);
+ /* the rest is detail; strip any leading whitespace */
+ while (*splitp && isspace((unsigned char) *splitp))
+ splitp++;
+ pqSaveMessageField(res, PG_DIAG_MESSAGE_DETAIL, splitp);
+ }
+ else
+ {
+ /* single-line message, so all primary */
+ pqSaveMessageField(res, PG_DIAG_MESSAGE_PRIMARY, startp);
+ }
+
+ /*
+ * Either save error as current async result, or just emit the notice.
+ * Also, if it's an error and we were in a transaction block, assume the
+ * server has now gone to error-in-transaction state.
+ */
+ if (isError)
+ {
+ pqClearAsyncResult(conn); /* redundant, but be safe */
+ conn->result = res;
+ resetPQExpBuffer(&conn->errorMessage);
+ if (res && !PQExpBufferDataBroken(workBuf) && res->errMsg)
+ appendPQExpBufferStr(&conn->errorMessage, res->errMsg);
+ else
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ if (conn->xactStatus == PQTRANS_INTRANS)
+ conn->xactStatus = PQTRANS_INERROR;
+ }
+ else
+ {
+ if (res)
+ {
+ if (res->noticeHooks.noticeRec != NULL)
+ res->noticeHooks.noticeRec(res->noticeHooks.noticeRecArg, res);
+ PQclear(res);
+ }
+ }
+
+ termPQExpBuffer(&workBuf);
+ return 0;
+
+failure:
+ if (res)
+ PQclear(res);
+ termPQExpBuffer(&workBuf);
+ return EOF;
+}
+
+/*
+ * checkXactStatus - attempt to track transaction-block status of server
+ *
+ * This is called each time we receive a command-complete message. By
+ * watching for messages from BEGIN/COMMIT/ROLLBACK commands, we can do
+ * a passable job of tracking the server's xact status. BUT: this does
+ * not work at all on 7.3 servers with AUTOCOMMIT OFF. (Man, was that
+ * feature ever a mistake.) Caveat user.
+ *
+ * The tags known here are all those used as far back as 7.0; is it worth
+ * adding those from even-older servers?
+ */
+static void
+checkXactStatus(PGconn *conn, const char *cmdTag)
+{
+ if (strcmp(cmdTag, "BEGIN") == 0)
+ conn->xactStatus = PQTRANS_INTRANS;
+ else if (strcmp(cmdTag, "COMMIT") == 0)
+ conn->xactStatus = PQTRANS_IDLE;
+ else if (strcmp(cmdTag, "ROLLBACK") == 0)
+ conn->xactStatus = PQTRANS_IDLE;
+ else if (strcmp(cmdTag, "START TRANSACTION") == 0) /* 7.3 only */
+ conn->xactStatus = PQTRANS_INTRANS;
+
+ /*
+ * Normally we get into INERROR state by detecting an Error message.
+ * However, if we see one of these tags then we know for sure the server
+ * is in abort state ...
+ */
+ else if (strcmp(cmdTag, "*ABORT STATE*") == 0) /* pre-7.3 only */
+ conn->xactStatus = PQTRANS_INERROR;
+}
+
+/*
+ * 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;
+ int nmlen;
+ PGnotify *newNotify;
+
+ if (pqGetInt(&be_pid, 4, conn))
+ return EOF;
+ if (pqGets(&conn->workBuffer, conn))
+ return EOF;
+
+ /*
+ * Store the relation name 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(conn->workBuffer.data);
+ newNotify = (PGnotify *) malloc(sizeof(PGnotify) + nmlen + 1);
+ if (newNotify)
+ {
+ newNotify->relname = (char *) newNotify + sizeof(PGnotify);
+ strcpy(newNotify->relname, conn->workBuffer.data);
+ /* fake up an empty-string extra field */
+ newNotify->extra = newNotify->relname + nmlen;
+ newNotify->be_pid = be_pid;
+ newNotify->next = NULL;
+ if (conn->notifyTail)
+ conn->notifyTail->next = newNotify;
+ else
+ conn->notifyHead = newNotify;
+ conn->notifyTail = newNotify;
+ }
+
+ return 0;
+}
+
+
+/*
+ * PQgetCopyData - read a row of data from the backend during COPY OUT
+ *
+ * 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
+pqGetCopyData2(PGconn *conn, char **buffer, int async)
+{
+ bool found;
+ int msgLength;
+
+ for (;;)
+ {
+ /*
+ * Do we have a complete line of data?
+ */
+ conn->inCursor = conn->inStart;
+ found = false;
+ while (conn->inCursor < conn->inEnd)
+ {
+ char c = conn->inBuffer[conn->inCursor++];
+
+ if (c == '\n')
+ {
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ goto nodata;
+ msgLength = conn->inCursor - conn->inStart;
+
+ /*
+ * If it's the end-of-data marker, consume it, exit COPY_OUT mode, and
+ * let caller read status with PQgetResult().
+ */
+ if (msgLength == 3 &&
+ strncmp(&conn->inBuffer[conn->inStart], "\\.\n", 3) == 0)
+ {
+ conn->inStart = conn->inCursor;
+ conn->asyncStatus = PGASYNC_BUSY;
+ return -1;
+ }
+
+ /*
+ * Pass the line back to the caller.
+ */
+ *buffer = (char *) malloc(msgLength + 1);
+ if (*buffer == NULL)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory\n"));
+ return -2;
+ }
+ memcpy(*buffer, &conn->inBuffer[conn->inStart], msgLength);
+ (*buffer)[msgLength] = '\0'; /* Add terminating null */
+
+ /* Mark message consumed */
+ conn->inStart = conn->inCursor;
+
+ return msgLength;
+
+nodata:
+ /* 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;
+ }
+}
+
+
+/*
+ * PQgetline - gets a newline-terminated string from the backend.
+ *
+ * See fe-exec.c for documentation.
+ */
+int
+pqGetline2(PGconn *conn, char *s, int maxlen)
+{
+ int result = 1; /* return value if buffer overflows */
+
+ if (conn->sock == PGINVALID_SOCKET ||
+ conn->asyncStatus != PGASYNC_COPY_OUT)
+ {
+ *s = '\0';
+ return EOF;
+ }
+
+ /*
+ * Since this is a purely synchronous routine, we don't bother to maintain
+ * conn->inCursor; there is no need to back up.
+ */
+ while (maxlen > 1)
+ {
+ if (conn->inStart < conn->inEnd)
+ {
+ char c = conn->inBuffer[conn->inStart++];
+
+ if (c == '\n')
+ {
+ result = 0; /* success exit */
+ break;
+ }
+ *s++ = c;
+ maxlen--;
+ }
+ else
+ {
+ /* need to load more data */
+ if (pqWait(true, false, conn) ||
+ pqReadData(conn) < 0)
+ {
+ result = EOF;
+ break;
+ }
+ }
+ }
+ *s = '\0';
+
+ return result;
+}
+
+/*
+ * PQgetlineAsync - gets a COPY data row without blocking.
+ *
+ * See fe-exec.c for documentation.
+ */
+int
+pqGetlineAsync2(PGconn *conn, char *buffer, int bufsize)
+{
+ int avail;
+
+ if (conn->asyncStatus != PGASYNC_COPY_OUT)
+ return -1; /* we are not doing a copy... */
+
+ /*
+ * Move data from libpq's buffer to the caller's. We want to accept data
+ * only in units of whole lines, not partial lines. This ensures that we
+ * can recognize the terminator line "\\.\n". (Otherwise, if it happened
+ * to cross a packet/buffer boundary, we might hand the first one or two
+ * characters off to the caller, which we shouldn't.)
+ */
+
+ conn->inCursor = conn->inStart;
+
+ avail = bufsize;
+ while (avail > 0 && conn->inCursor < conn->inEnd)
+ {
+ char c = conn->inBuffer[conn->inCursor++];
+
+ *buffer++ = c;
+ --avail;
+ if (c == '\n')
+ {
+ /* Got a complete line; mark the data removed from libpq */
+ conn->inStart = conn->inCursor;
+ /* Is it the endmarker line? */
+ if (bufsize - avail == 3 && buffer[-3] == '\\' && buffer[-2] == '.')
+ return -1;
+ /* No, return the data line to the caller */
+ return bufsize - avail;
+ }
+ }
+
+ /*
+ * We don't have a complete line. We'd prefer to leave it in libpq's
+ * buffer until the rest arrives, but there is a special case: what if the
+ * line is longer than the buffer the caller is offering us? In that case
+ * we'd better hand over a partial line, else we'd get into an infinite
+ * loop. Do this in a way that ensures we can't misrecognize a terminator
+ * line later: leave last 3 characters in libpq buffer.
+ */
+ if (avail == 0 && bufsize > 3)
+ {
+ conn->inStart = conn->inCursor - 3;
+ return bufsize - 3;
+ }
+ return 0;
+}
+
+/*
+ * PQendcopy
+ *
+ * See fe-exec.c for documentation.
+ */
+int
+pqEndcopy2(PGconn *conn)
+{
+ PGresult *result;
+
+ if (conn->asyncStatus != PGASYNC_COPY_IN &&
+ conn->asyncStatus != PGASYNC_COPY_OUT)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("no COPY in progress\n"));
+ 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;
+
+ /* non blocking connections may have to abort at this point. */
+ if (pqIsnonblocking(conn) && PQisBusy(conn))
+ return 1;
+
+ /* Return to active duty */
+ conn->asyncStatus = PGASYNC_BUSY;
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /* 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);
+
+ /*
+ * The worst case is that we've lost sync with the backend entirely due to
+ * application screwup of the copy in/out protocol. To recover, reset the
+ * connection (talk about using a sledgehammer...)
+ */
+ pqInternalNotice(&conn->noticeHooks,
+ "lost synchronization with server, resetting connection");
+
+ /*
+ * Users doing non-blocking connections need to handle the reset
+ * themselves, they'll need to check the connection status if we return an
+ * error.
+ */
+ if (pqIsnonblocking(conn))
+ PQresetStart(conn);
+ else
+ PQreset(conn);
+
+ return 1;
+}
+
+
+/*
+ * PQfn - Send a function call to the POSTGRES backend.
+ *
+ * See fe-exec.c for documentation.
+ */
+PGresult *
+pqFunctionCall2(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 i;
+
+ /* PQfn already validated connection state */
+
+ if (pqPutMsgStart('F', false, conn) < 0 || /* function call msg */
+ pqPuts(" ", conn) < 0 || /* dummy string */
+ pqPutInt(fnid, 4, conn) != 0 || /* function id */
+ pqPutInt(nargs, 4, 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].isint)
+ {
+ if (pqPutInt(args[i].u.integer, 4, conn))
+ return NULL;
+ }
+ else
+ {
+ if (pqPutnchar((char *) args[i].u.ptr, args[i].len, conn))
+ 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.
+ */
+ conn->inCursor = conn->inStart;
+ needInput = true;
+
+ if (pqGetc(&id, conn))
+ 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 (pqGetc(&id, conn))
+ continue;
+ if (id == 'G')
+ {
+ /* function returned nonempty value */
+ if (pqGetInt(actual_result_len, 4, conn))
+ continue;
+ if (result_is_int)
+ {
+ if (pqGetInt(result_buf, 4, conn))
+ continue;
+ }
+ else
+ {
+ if (pqGetnchar((char *) result_buf,
+ *actual_result_len,
+ conn))
+ continue;
+ }
+ if (pqGetc(&id, conn)) /* get the last '0' */
+ continue;
+ }
+ if (id == '0')
+ {
+ /* correctly finished function result message */
+ status = PGRES_COMMAND_OK;
+ }
+ else
+ {
+ /* The backend violates the protocol. */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("protocol error: id=0x%x\n"),
+ id);
+ pqSaveErrorResult(conn);
+ conn->inStart = conn->inCursor;
+ return pqPrepareAsyncResult(conn);
+ }
+ break;
+ case 'E': /* error return */
+ if (pqGetErrorNotice2(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 (pqGetErrorNotice2(conn, false))
+ continue;
+ break;
+ case 'Z': /* backend is ready for new query */
+ /* consume the message and exit */
+ conn->inStart = conn->inCursor;
+ /* if we saved a result object (probably an error), use it */
+ if (conn->result)
+ return pqPrepareAsyncResult(conn);
+ return PQmakeEmptyPGresult(conn, status);
+ default:
+ /* The backend violates the protocol. */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("protocol error: id=0x%x\n"),
+ id);
+ pqSaveErrorResult(conn);
+ conn->inStart = conn->inCursor;
+ return pqPrepareAsyncResult(conn);
+ }
+ /* Completed this message, keep going */
+ conn->inStart = conn->inCursor;
+ 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 *
+pqBuildStartupPacket2(PGconn *conn, int *packetlen,
+ const PQEnvironmentOption *options)
+{
+ StartupPacket *startpacket;
+
+ *packetlen = sizeof(StartupPacket);
+ startpacket = (StartupPacket *) malloc(sizeof(StartupPacket));
+ if (!startpacket)
+ return NULL;
+
+ MemSet(startpacket, 0, sizeof(StartupPacket));
+
+ startpacket->protoVersion = pg_hton32(conn->pversion);
+
+ /* strncpy is safe here: postmaster will handle full fields correctly */
+ strncpy(startpacket->user, conn->pguser, SM_USER);
+ strncpy(startpacket->database, conn->dbName, SM_DATABASE);
+ strncpy(startpacket->tty, conn->pgtty, SM_TTY);
+
+ if (conn->pgoptions)
+ strncpy(startpacket->options, conn->pgoptions, SM_OPTIONS);
+
+ return (char *) startpacket;
+}
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c
new file mode 100644
index 0000000..04fd4ba
--- /dev/null
+++ b/src/interfaces/libpq/fe-protocol3.c
@@ -0,0 +1,2178 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-protocol3.c
+ * functions that are specific to frontend/backend protocol version 3
+ *
+ * Portions Copyright (c) 1996-2020, 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')
+
+#define PQmblenBounded(s, e) strnlen(s, PQmblen(s, e))
+
+
+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
+ {
+ 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)
+ {
+ printfPQExpBuffer(&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': /* backend is ready for new query */
+ if (getReadyForQuery(conn))
+ return;
+ conn->asyncStatus = PGASYNC_IDLE;
+ break;
+ case 'I': /* empty query */
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_EMPTY_QUERY);
+ if (!conn->result)
+ {
+ printfPQExpBuffer(&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->queryclass == PGQUERY_PREPARE)
+ {
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_COMMAND_OK);
+ if (!conn->result)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ pqSaveErrorResult(conn);
+ }
+ }
+ conn->asyncStatus = PGASYNC_READY;
+ }
+ break;
+ case '2': /* Bind Complete */
+ case '3': /* Close Complete */
+ /* Nothing to do for these message types */
+ 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->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->queryclass == PGQUERY_DESCRIBE)
+ {
+ if (conn->result == NULL)
+ {
+ conn->result = PQmakeEmptyPGresult(conn,
+ PGRES_COMMAND_OK);
+ if (!conn->result)
+ {
+ printfPQExpBuffer(&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 */
+ printfPQExpBuffer(&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:
+ printfPQExpBuffer(&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)
+ {
+ /* Normal case: parsing agrees with specified length */
+ conn->inStart = conn->inCursor;
+ }
+ else
+ {
+ /* Trouble --- report it */
+ printfPQExpBuffer(&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)
+{
+ printfPQExpBuffer(&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 GetResult 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->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->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");
+
+ printfPQExpBuffer(&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");
+ printfPQExpBuffer(&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");
+
+ printfPQExpBuffer(&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 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 && conn->last_query && res)
+ res->errQuery = pqResultStrdup(res, conn->last_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)
+ res->errMsg = pqResultStrdup(res, workBuf.data);
+ pqClearAsyncResult(conn); /* redundant, but be safe */
+ conn->result = res;
+ if (PQExpBufferDataBroken(workBuf))
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("out of memory"));
+ 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. */
+ 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;
+ }
+
+ /* 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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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', false, 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->queryclass != PGQUERY_SIMPLE)
+ {
+ if (pqPutMsgStart('S', false, 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;
+ resetPQExpBuffer(&conn->errorMessage);
+
+ /*
+ * 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;
+
+ /* PQfn already validated connection state */
+
+ if (pqPutMsgStart('F', false, 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. */
+ printfPQExpBuffer(&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);
+ }
+ /* 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..48512b6
--- /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-2020, 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'))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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);
+ printfPQExpBuffer(&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'))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("server certificate for \"%s\" does not match host name \"%s\"\n"),
+ first_name, host);
+ }
+ else
+ {
+ printfPQExpBuffer(&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..8e483f6
--- /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-2020, 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..d70189c
--- /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-2020, 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 put into 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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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))
+ {
+ printfPQExpBuffer(&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 = htonl(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 put into 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 = ntohl(*(uint32 *) PqGSSRecvBuffer);
+
+ if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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;
+
+ printfPQExpBuffer(&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 = ntohl(*(uint32 *) PqGSSRecvBuffer);
+ if (input.length > PQ_GSS_RECV_BUFFER_SIZE - sizeof(uint32))
+ {
+ printfPQExpBuffer(&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 = htonl(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..d609a38
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure-openssl.c
@@ -0,0 +1,1790 @@
+/*-------------------------------------------------------------------------
+ *
+ * fe-secure-openssl.c
+ * OpenSSL support
+ *
+ *
+ * Portions Copyright (c) 1996-2020, 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.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 ssl_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 (ssl_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 */
+ printfPQExpBuffer(&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)
+ printfPQExpBuffer(&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
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: %s\n"),
+ SOCK_STRERROR(result_errno,
+ sebuf, sizeof(sebuf)));
+ }
+ else
+ {
+ printfPQExpBuffer(&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);
+
+ printfPQExpBuffer(&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.
+ */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL connection has been closed unexpectedly\n"));
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ default:
+ printfPQExpBuffer(&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 */
+ printfPQExpBuffer(&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)
+ printfPQExpBuffer(&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
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: %s\n"),
+ SOCK_STRERROR(result_errno,
+ sebuf, sizeof(sebuf)));
+ }
+ else
+ {
+ printfPQExpBuffer(&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);
+
+ printfPQExpBuffer(&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.
+ */
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL connection has been closed unexpectedly\n"));
+ result_errno = ECONNRESET;
+ n = -1;
+ break;
+ default:
+ printfPQExpBuffer(&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))
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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))
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("could not generate peer certificate hash\n"));
+ return NULL;
+ }
+
+ /* save result */
+ cert_hash = malloc(hash_size);
+ if (cert_hash == NULL)
+ {
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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)
+{
+#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 (ssl_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);
+ }
+ }
+#endif /* HAVE_CRYPTO_LOCK */
+#endif /* ENABLE_THREAD_SAFETY */
+
+ if (!ssl_lib_initialized)
+ {
+ 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 && ssl_open_connections > 0)
+ --ssl_open_connections;
+
+ if (pq_init_crypto_lib && ssl_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))
+ 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());
+
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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)
+ {
+ if (conn->sslcrl && strlen(conn->sslcrl) > 0)
+ strlcpy(fnbuf, conn->sslcrl, sizeof(fnbuf));
+ else if (have_homedir)
+ snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, ROOT_CRL_FILE);
+ else
+ fnbuf[0] = '\0';
+
+ /* Set the flags to check against the complete CRL chain */
+ if (fnbuf[0] != '\0' &&
+ X509_STORE_load_locations(cvstore, fnbuf, NULL) == 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')
+ printfPQExpBuffer(&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
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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;
+
+ /*
+ * 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)
+ {
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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)
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("certificate present, but not private key file \"%s\"\n"),
+ fnbuf);
+ return -1;
+ }
+#ifndef WIN32
+ if (!S_ISREG(buf.st_mode) || buf.st_mode & (S_IRWXG | S_IRWXO))
+ {
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\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)
+ {
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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)
+ printfPQExpBuffer(&conn->errorMessage,
+ libpq_gettext("SSL SYSCALL error: %s\n"),
+ SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
+ else
+ printfPQExpBuffer(&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);
+
+ printfPQExpBuffer(&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:
+ printfPQExpBuffer(&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());
+
+ printfPQExpBuffer(&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)
+ {
+ /*
+ * 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.
+ */
+ destroy_needed = true;
+
+ SSL_shutdown(conn->ssl);
+ SSL_free(conn->ssl);
+ conn->ssl = NULL;
+ conn->ssl_in_use = false;
+ }
+
+ 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
+
+ /*
+ * This will remove our SSL locking hooks, if this is the last SSL
+ * connection, which means we must wait to call it until after all 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();
+}
+
+
+/*
+ * 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_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..3311fd7
--- /dev/null
+++ b/src/interfaces/libpq/fe-secure.c
@@ -0,0 +1,555 @@
+/*-------------------------------------------------------------------------
+ *
+ * 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-2020, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ *
+ * IDENTIFICATION
+ * src/interfaces/libpq/fe-secure.c
+ *
+ * NOTES
+ *
+ * We don't provide informational callbacks here (like
+ * info_cb() in be-secure.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>
+
+#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)
+{
+ int r = 0;
+
+#ifdef USE_SSL
+ r = pgtls_init(conn);
+#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
+ if (conn->ssl_in_use)
+ pgtls_close(conn);
+#endif
+}
+
+/*
+ * Read data from a secure connection.
+ *
+ * On failure, this function is responsible for putting a suitable message
+ * into 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;
+
+#ifdef ECONNRESET
+ case ECONNRESET:
+ printfPQExpBuffer(&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;
+#endif
+
+ default:
+ printfPQExpBuffer(&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 putting a suitable message
+ * into 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);
+
+#ifdef ECONNRESET
+ /* FALL THRU */
+
+ case ECONNRESET:
+#endif
+ printfPQExpBuffer(&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:
+ printfPQExpBuffer(&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;
+}
+
+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_SSL */
+
+/* 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/legacy-pqsignal.c b/src/interfaces/libpq/legacy-pqsignal.c
new file mode 100644
index 0000000..4703adb
--- /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-2020, 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..d050d7f
--- /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-2020, 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..5108a55
--- /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-2020, 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..3b6a9fb
--- /dev/null
+++ b/src/interfaces/libpq/libpq-fe.h
@@ -0,0 +1,632 @@
+/*-------------------------------------------------------------------------
+ *
+ * libpq-fe.h
+ * This file contains definitions for structures and
+ * externs for functions used by frontend postgres applications.
+ *
+ * Portions Copyright (c) 1996-2020, 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"
+
+/*
+ * 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, /* Negotiating environment. */
+ CONNECTION_SSL_STARTUP, /* Negotiating SSL. */
+ CONNECTION_NEEDED, /* Internal state: connect() needed */
+ CONNECTION_CHECK_WRITABLE, /* Check if we could make a writable
+ * connection. */
+ CONNECTION_CONSUME, /* Wait for any pending message and consume
+ * them. */
+ CONNECTION_GSS_STARTUP, /* Negotiating GSSAPI. */
+ CONNECTION_CHECK_TARGET /* Check if we have a proper target connection */
+} 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 */
+} 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;
+
+/* 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 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);
+
+/* Enable/disable tracing */
+extern void PQtrace(PGconn *conn, FILE *debug_port);
+extern void PQuntrace(PGconn *conn);
+
+/* 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-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 */
+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);
+
+/* 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);
+
+/* 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..1de91ae
--- /dev/null
+++ b/src/interfaces/libpq/libpq-int.h
@@ -0,0 +1,823 @@
+/*-------------------------------------------------------------------------
+ *
+ * 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-2020, 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, /* result ready for PQgetResult */
+ 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 */
+} PGAsyncStatusType;
+
+/* PGQueryClass tracks which query protocol we are now executing */
+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 */
+} PGQueryClass;
+
+/* PGSetenvStatusType defines the state of the pqSetenv state machine */
+
+/* (this is used only for 2.0-protocol connections) */
+typedef enum
+{
+ SETENV_STATE_CLIENT_ENCODING_SEND, /* About to send an Environment Option */
+ SETENV_STATE_CLIENT_ENCODING_WAIT, /* Waiting for above send to complete */
+ SETENV_STATE_OPTION_SEND, /* About to send an Environment Option */
+ SETENV_STATE_OPTION_WAIT, /* Waiting for above send to complete */
+ SETENV_STATE_QUERY1_SEND, /* About to send a status query */
+ SETENV_STATE_QUERY1_WAIT, /* Waiting for query to complete */
+ SETENV_STATE_QUERY2_SEND, /* About to send a status query */
+ SETENV_STATE_QUERY2_WAIT, /* Waiting for query to complete */
+ SETENV_STATE_IDLE
+} PGSetenvStatusType;
+
+/* 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;
+
+/*
+ * 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 *pgtty; /* tty on which the backend messages is
+ * displayed (OBSOLETE, NOT USED) */
+ 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 *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 */
+
+ /* Type of connection to make. Possible values: any, read-write. */
+ char *target_session_attrs;
+
+ /* Optional file to write trace info to */
+ FILE *Pfdebug;
+
+ /* 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 */
+ PGQueryClass queryclass;
+ char *last_query; /* last SQL command, or NULL if unknown */
+ 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 */
+ 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 */
+
+ /* 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 */
+ 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 */
+ PGSetenvStatusType setenv_state; /* for 2.0 protocol only */
+ const PQEnvironmentOption *next_eo;
+ 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 */
+ 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
+#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 */
+ 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, const char *msg);
+extern void pqCatenateResultError(PGresult *res, const char *msg);
+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);
+
+/* === in fe-protocol2.c === */
+
+extern PostgresPollingStatusType pqSetenvPoll(PGconn *conn);
+
+extern char *pqBuildStartupPacket2(PGconn *conn, int *packetlen,
+ const PQEnvironmentOption *options);
+extern void pqParseInput2(PGconn *conn);
+extern int pqGetCopyData2(PGconn *conn, char **buffer, int async);
+extern int pqGetline2(PGconn *conn, char *s, int maxlen);
+extern int pqGetlineAsync2(PGconn *conn, char *buffer, int bufsize);
+extern int pqEndcopy2(PGconn *conn);
+extern PGresult *pqFunctionCall2(PGconn *conn, Oid fnid,
+ int *result_buf, int *actual_result_len,
+ int result_is_int,
+ const PQArgBlock *args, int nargs);
+
+/* === 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, bool force_len, 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 *);
+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.
+ *
+ * Returns 0 if OK, -1 on failure (with a message in conn->errorMessage).
+ */
+extern int pgtls_init(PGconn *conn);
+
+/*
+ * 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 putting a suitable message
+ * into 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 putting a suitable message
+ * into 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
+
+/* === 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)
+
+#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..d9df6f9
--- /dev/null
+++ b/src/interfaces/libpq/nls.mk
@@ -0,0 +1,6 @@
+# src/interfaces/libpq/nls.mk
+CATALOG_NAME = libpq
+AVAIL_LANGUAGES = cs de es fr it ja ko ru sv tr 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-protocol2.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..31985f4
--- /dev/null
+++ b/src/interfaces/libpq/po/de.po
@@ -0,0 +1,1273 @@
+# German message translation file for libpq
+# Peter Eisentraut <peter@eisentraut.org>, 2001 - 2021.
+#
+# Use these quotes: »%s«
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-04-04 22:09+0000\n"
+"PO-Revision-Date: 2021-04-05 10:43+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:212
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (leere Nachricht)\n"
+
+#: fe-auth-scram.c:218
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Länge stimmt nicht überein)\n"
+
+#: fe-auth-scram.c:265
+msgid "incorrect server signature\n"
+msgstr "falsche Serversignatur\n"
+
+#: fe-auth-scram.c:274
+msgid "invalid SCRAM exchange state\n"
+msgstr "ungültiger Zustand des SCRAM-Austauschs\n"
+
+#: fe-auth-scram.c:296
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (Attribut »%c« erwartet)\n"
+
+#: fe-auth-scram.c:305
+#, 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:346
+msgid "could not generate nonce\n"
+msgstr "konnte Nonce nicht erzeugen\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:2957 fe-connect.c:4605 fe-connect.c:4861
+#: fe-connect.c:4980 fe-connect.c:5233 fe-connect.c:5313 fe-connect.c:5412
+#: fe-connect.c:5668 fe-connect.c:5697 fe-connect.c:5769 fe-connect.c:5793
+#: fe-connect.c:5811 fe-connect.c:5912 fe-connect.c:5921 fe-connect.c:6277
+#: fe-connect.c:6427 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:961
+#: fe-protocol3.c:1665 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 "Speicher aufgebraucht\n"
+
+#: fe-auth-scram.c:364
+msgid "could not encode nonce\n"
+msgstr "konnte Nonce nicht kodieren\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "konnte Client-Proof nicht kodieren\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "ungültige SCRAM-Antwort (Nonce stimmt nicht überein)\n"
+
+#: fe-auth-scram.c:651
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (ungültiges Salt)\n"
+
+#: fe-auth-scram.c:665
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "fehlerhafte SCRAM-Nachricht (ungültige Iterationszahl)\n"
+
+#: fe-auth-scram.c:671
+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:702
+#, 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:718
+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:737
+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:388 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:349
+msgid "duplicate SSPI authentication request\n"
+msgstr "doppelte SSPI-Authentifizierungsanfrage\n"
+
+#: fe-auth.c:374
+msgid "could not acquire SSPI credentials"
+msgstr "konnte SSPI-Credentials nicht erhalten"
+
+#: fe-auth.c:429
+msgid "channel binding required, but SSL not in use\n"
+msgstr "Channel-Binding wurde verlangt, aber SSL wird nicht verwendet\n"
+
+#: fe-auth.c:436
+msgid "duplicate SASL authentication request\n"
+msgstr "doppelte SASL-Authentifizierungsanfrage\n"
+
+#: fe-auth.c:492
+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:509
+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:521
+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:529
+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:635
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "Speicher aufgebraucht beim Anlegen des SASL-Puffers (%d)\n"
+
+#: fe-auth.c:660
+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:737
+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:875
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Authentifizierung mit Kerberos 4 nicht unterstützt\n"
+
+#: fe-auth.c:880
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Authentifizierung mit Kerberos 5 nicht unterstützt\n"
+
+#: fe-auth.c:951
+msgid "GSSAPI authentication not supported\n"
+msgstr "Authentifizierung mit GSSAPI nicht unterstützt\n"
+
+#: fe-auth.c:983
+msgid "SSPI authentication not supported\n"
+msgstr "Authentifizierung mit SSPI nicht unterstützt\n"
+
+#: fe-auth.c:991
+msgid "Crypt authentication not supported\n"
+msgstr "Authentifizierung mit Crypt nicht unterstützt\n"
+
+#: fe-auth.c:1057
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "Authentifizierungsmethode %u nicht unterstützt\n"
+
+#: fe-auth.c:1104
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "Fehler beim Nachschlagen des Benutzernamens: Fehlercode %lu\n"
+
+#: fe-auth.c:1114 fe-connect.c:2834
+#, 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:1119 fe-connect.c:2839
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "lokaler Benutzer mit ID %d existiert nicht\n"
+
+#: fe-auth.c:1221
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "unerwartete Form der Ergebnismenge von SHOW\n"
+
+#: fe-auth.c:1230
+msgid "password_encryption value too long\n"
+msgstr "Wert von password_encryption ist zu lang\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "unbekannter Passwortverschlüsselungsalgorithmus »%s«\n"
+
+#: fe-connect.c:1075
+#, 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:1156
+#, 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:1249
+#, c-format
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "ungültiger channel_binding-Wert: »%s«\n"
+
+#: fe-connect.c:1275
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "ungültiger sslmode-Wert: »%s«\n"
+
+#: fe-connect.c:1296
+#, 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:1317
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "ungültiger ssl_min_protocol_version-Wert: »%s«\n"
+
+#: fe-connect.c:1325
+#, c-format
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "ungültiger ssl_max_protocol_version-Wert: »%s«\n"
+
+#: fe-connect.c:1342
+msgid "invalid SSL protocol version range\n"
+msgstr "ungültiges SSL-Protokollsintervall\n"
+
+#: fe-connect.c:1357
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "ungültiger gssencmode-Wert: »%s«\n"
+
+#: fe-connect.c:1366
+#, 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:1401
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "ungültiger target_session_attrs-Wert: »%s«\n"
+
+#: fe-connect.c:1619
+#, 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: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 ""
+"konnte nicht mit dem Server verbinden: %s\n"
+"\tLäuft der Server lokal und akzeptiert er Verbindungen\n"
+"\tauf dem Unix-Domain-Socket »%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 ""
+"konnte nicht mit dem Server verbinden: %s\n"
+"\tLäuft der Server auf dem Host »%s« (%s) und akzeptiert er\n"
+"\tTCP/IP-Verbindungen auf Port %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 ""
+"konnte nicht mit dem Server verbinden: %s\n"
+"\tLäuft der Server auf dem Host »%s« und akzeptiert er\n"
+"\tTCP/IP-Verbindungen auf Port %s?\n"
+
+#: fe-connect.c:1795
+#, 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: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) fehlgeschlagen: %s\n"
+
+#: fe-connect.c:1947
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) fehlgeschlagen: %ui\n"
+
+#: fe-connect.c:2313
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "ungültiger Verbindungszustand, möglicherweise ein Speicherproblem\n"
+
+#: fe-connect.c:2379
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "ungültige Portnummer: »%s«\n"
+
+#: fe-connect.c:2395
+#, 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:2408
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "konnte Netzwerkadresse »%s« nicht interpretieren: %s\n"
+
+#: fe-connect.c:2421
+#, 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:2436
+#, 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:2560
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "konnte Socket nicht erzeugen: %s\n"
+
+#: fe-connect.c:2582
+#, 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:2592
+#, 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:2610
+msgid "keepalives parameter must be an integer\n"
+msgstr "Parameter »keepalives« muss eine ganze Zahl sein\n"
+
+#: fe-connect.c:2750
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "konnte Socket-Fehlerstatus nicht ermitteln: %s\n"
+
+#: fe-connect.c:2778
+#, 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:2820
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "Parameter »requirepeer« wird auf dieser Plattform nicht unterstützt\n"
+
+#: fe-connect.c:2823
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "konnte Credentials von Gegenstelle nicht ermitteln: %s\n"
+
+#: fe-connect.c:2847
+#, 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:2887
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "konnte Paket zur GSSAPI-Verhandlung nicht senden: %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-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:2931
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "konnte Paket zur SSL-Verhandlung nicht senden: %s\n"
+
+#: fe-connect.c:2970
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "konnte Startpaket nicht senden: %s\n"
+
+#: fe-connect.c:3040
+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:3067
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "ungültige Antwort auf SSL-Verhandlungspaket empfangen: %c\n"
+
+#: fe-connect.c:3156
+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:3168
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "ungültige Antwort auf GSSAPI-Verhandlungspaket empfangen: %c\n"
+
+#: fe-connect.c:3234 fe-connect.c:3265
+#, 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:3506
+msgid "unexpected message from server during startup\n"
+msgstr "unerwartete Nachricht vom Server beim Start\n"
+
+#: fe-connect.c:3711
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "konnte keine schreibbare Verbindung zum Server »%s:%s« aufbauen\n"
+
+#: fe-connect.c:3757
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "Test »SHOW transaction_read_only« fehlgeschlagen auf Server »%s:%s«\n"
+
+#: fe-connect.c:3772
+#, 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:4211 fe-connect.c:4271
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc »%s« während PGEVT_CONNRESET-Ereignis fehlgeschlagen\n"
+
+#: fe-connect.c:4618
+#, 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:4633
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "ungültige LDAP-URL »%s«: Distinguished Name fehlt\n"
+
+#: fe-connect.c:4645 fe-connect.c:4700
+#, 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:4656 fe-connect.c:4715
+#, 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:4667
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "ungültige LDAP-URL »%s«: kein Filter\n"
+
+#: fe-connect.c:4688
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "ungültige LDAP-URL »%s«: ungültige Portnummer\n"
+
+#: fe-connect.c:4724
+msgid "could not create LDAP structure\n"
+msgstr "konnte LDAP-Struktur nicht erzeugen\n"
+
+#: fe-connect.c:4800
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "Suche auf LDAP-Server fehlgeschlagen: %s\n"
+
+#: fe-connect.c:4811
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "LDAP-Suche ergab mehr als einen Eintrag\n"
+
+#: fe-connect.c:4812 fe-connect.c:4824
+msgid "no entry found on LDAP lookup\n"
+msgstr "kein Eintrag gefunden bei LDAP-Suche\n"
+
+#: fe-connect.c:4835 fe-connect.c:4848
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "Attribut hat keine Werte bei LDAP-Suche\n"
+
+#: fe-connect.c:4900 fe-connect.c:4919 fe-connect.c:5451
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "fehlendes »=« nach »%s« in der Zeichenkette der Verbindungsdaten\n"
+
+#: fe-connect.c:4992 fe-connect.c:5636 fe-connect.c:6410
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "ungültige Verbindungsoption »%s«\n"
+
+#: fe-connect.c:5008 fe-connect.c:5500
+msgid "unterminated quoted string in connection info string\n"
+msgstr "fehlendes schließendes Anführungszeichen (\") in der Zeichenkette der Verbindungsdaten\n"
+
+#: fe-connect.c:5091
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "Definition von Service »%s« nicht gefunden\n"
+
+#: fe-connect.c:5114
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "Servicedatei »%s« nicht gefunden\n"
+
+#: fe-connect.c:5129
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "Zeile %d zu lang in Servicedatei »%s«\n"
+
+#: fe-connect.c:5201 fe-connect.c:5245
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "Syntaxfehler in Servicedatei »%s«, Zeile %d\n"
+
+#: fe-connect.c:5212
+#, 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:5932
+#, 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:6009
+#, 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:6016
+#, 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:6031
+#, 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:6160
+#, 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:6180
+#, 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:6231
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "ungültiger URI-Query-Parameter: »%s«\n"
+
+#: fe-connect.c:6305
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "ungültiges Prozent-kodiertes Token: »%s«\n"
+
+#: fe-connect.c:6315
+#, 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:6678
+msgid "connection pointer is NULL\n"
+msgstr "Verbindung ist ein NULL-Zeiger\n"
+
+#: fe-connect.c:6974
+#, 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:6983
+#, 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:7091
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "Passwort wurde aus Datei »%s« gelesen\n"
+
+#: fe-exec.c:444 fe-exec.c:2821
+#, 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: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:328
+#: fe-protocol3.c:692 fe-protocol3.c:920
+msgid "out of memory"
+msgstr "Speicher aufgebraucht"
+
+#: fe-exec.c:506 fe-protocol2.c:1396 fe-protocol3.c:1873
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:815
+msgid "write to server failed\n"
+msgstr "Schreiben zum Server fehlgeschlagen\n"
+
+#: fe-exec.c:896
+msgid "NOTICE"
+msgstr "HINWEIS"
+
+#: fe-exec.c:954
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult kann nicht mehr als INT_MAX Tupel enthalten"
+
+#: fe-exec.c:966
+msgid "size_t overflow"
+msgstr "Überlauf von size_t"
+
+#: fe-exec.c:1243 fe-exec.c:1301 fe-exec.c:1347
+msgid "command string is a null pointer\n"
+msgstr "Befehlszeichenkette ist ein NULL-Zeiger\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 "Anzahl der Parameter muss zwischen 0 und 65535 sein\n"
+
+#: fe-exec.c:1341 fe-exec.c:1442
+msgid "statement name is a null pointer\n"
+msgstr "Anweisungsname ist ein NULL-Zeiger\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 "Funktion erfordert mindestens Protokollversion 3.0\n"
+
+#: fe-exec.c:1479
+msgid "no connection to the server\n"
+msgstr "keine Verbindung mit dem Server\n"
+
+#: fe-exec.c:1486
+msgid "another command is already in progress\n"
+msgstr "ein anderer Befehl ist bereits in Ausführung\n"
+
+#: fe-exec.c:1600
+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:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "unerwarteter asyncStatus: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc »%s« während PGEVT_RESULTCREATE-Ereignis fehlgeschlagen\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY von neuem PQexec beendet"
+
+#: fe-exec.c:2051
+msgid "COPY IN state must be terminated first\n"
+msgstr "COPY-IN-Zustand muss erst beendet werden\n"
+
+#: fe-exec.c:2071
+msgid "COPY OUT state must be terminated first\n"
+msgstr "COPY-OUT-Zustand muss erst beendet werden\n"
+
+#: fe-exec.c:2079
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec ist während COPY BOTH nicht erlaubt\n"
+
+#: fe-exec.c:2325 fe-exec.c:2392 fe-exec.c:2482 fe-protocol2.c:1353
+#: fe-protocol3.c:1804
+msgid "no COPY in progress\n"
+msgstr "keine COPY in Ausführung\n"
+
+#: fe-exec.c:2672
+msgid "connection in wrong state\n"
+msgstr "Verbindung im falschen Zustand\n"
+
+#: fe-exec.c:2703
+msgid "invalid ExecStatusType code"
+msgstr "ungültiger ExecStatusType-Kode"
+
+#: fe-exec.c:2730
+msgid "PGresult is not an error result\n"
+msgstr "PGresult ist kein Fehlerresultat\n"
+
+#: fe-exec.c:2805 fe-exec.c:2828
+#, 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:2843
+#, 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:3153
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "konnte Ergebnis vom Server nicht interpretieren: %s"
+
+#: fe-exec.c:3392 fe-exec.c:3476
+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:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "kann OID der Funktion lo_truncate nicht ermitteln\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "Argument von lo_truncate überschreitet Bereich für ganze Zahlen\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "kann OID der Funktion lo_truncate64 nicht ermitteln\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "Argument von lo_read überschreitet Bereich für ganze Zahlen\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "Argument von lo_write überschreitet Bereich für ganze Zahlen\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "kann OID der Funktion lo_lseek64 nicht ermitteln\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "kann OID der Funktion lo_create nicht ermitteln\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "kann OID der Funktion lo_tell64 nicht ermitteln\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "konnte Datei »%s« nicht öffnen: %s\n"
+
+#: fe-lobj.c:761
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "konnte nicht aus Datei »%s« lesen: %s\n"
+
+#: fe-lobj.c:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "konnte nicht in Datei »%s« schreiben: %s\n"
+
+#: fe-lobj.c:946
+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-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "kann OID der Funktion lo_open nicht ermitteln\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "kann OID der Funktion lo_close nicht ermitteln\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "kann OID der Funktion lo_creat nicht ermitteln\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "kann OID der Funktion lo_unlink nicht ermitteln\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "kann OID der Funktion lo_lseek nicht ermitteln\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "kann OID der Funktion lo_tell nicht ermitteln\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "kann OID der Funktion loread nicht ermitteln\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "kann OID der Funktion lowrite nicht ermitteln\n"
+
+#: fe-misc.c:289
+#, 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:325
+#, 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:636 fe-misc.c:869
+msgid "connection not open\n"
+msgstr "Verbindung nicht offen\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 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:1063
+msgid "timeout expired\n"
+msgstr "Timeout abgelaufen\n"
+
+#: fe-misc.c:1108
+msgid "invalid socket\n"
+msgstr "ungültiges Socket\n"
+
+#: fe-misc.c:1131
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() fehlgeschlagen: %s\n"
+
+#: fe-protocol2.c:87
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "ungültiger Setenv-Zustand %c, möglicherweise ein Speicherproblem\n"
+
+#: fe-protocol2.c:384
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "ungültiger Zustand %c, möglicherweise ein Speicherproblem\n"
+
+#: fe-protocol2.c:473 fe-protocol3.c:183
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "Nachricht vom Typ 0x%02x kam vom Server im Ruhezustand"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "unerwartetes Zeichen %c kam nach Antwort auf leere Anfrage (»I«-Nachricht)"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "Server sendete Daten (»D«-Nachricht) ohne vorherige Zeilenbeschreibung (»T«-Nachricht)"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "Server sendete binäre Daten (»B«-Nachricht) ohne vorherige Zeilenbeschreibung (»T«-Nachricht)"
+
+#: fe-protocol2.c:626 fe-protocol3.c:403
+#, 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-protocol2.c:755 fe-protocol2.c:930 fe-protocol3.c:603 fe-protocol3.c:809
+msgid "out of memory for query result"
+msgstr "Speicher für Anfrageergebnis aufgebraucht"
+
+#: fe-protocol2.c:1408
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "Synchronisation mit Server verloren, Verbindung wird zurückgesetzt"
+
+#: fe-protocol2.c:1530 fe-protocol2.c:1562 fe-protocol3.c:2061
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "Protokollfehler: id=0x%x\n"
+
+#: fe-protocol3.c:360
+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:424
+#, 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:444
+#, 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:494 fe-protocol3.c:534
+msgid "insufficient data in \"T\" message"
+msgstr "nicht genug Daten in »T«-Nachricht"
+
+#: fe-protocol3.c:672
+msgid "insufficient data in \"t\" message"
+msgstr "nicht genug Daten in »t«-Nachricht"
+
+#: fe-protocol3.c:731 fe-protocol3.c:763 fe-protocol3.c:781
+msgid "insufficient data in \"D\" message"
+msgstr "nicht genug Daten in »D«-Nachricht"
+
+#: fe-protocol3.c:737
+msgid "unexpected field count in \"D\" message"
+msgstr "unerwartete Feldzahl in »D«-Nachricht"
+
+#: fe-protocol3.c:974
+msgid "no error message available\n"
+msgstr "keine Fehlermeldung verfügbar\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1022 fe-protocol3.c:1041
+#, c-format
+msgid " at character %s"
+msgstr " bei Zeichen %s"
+
+#: fe-protocol3.c:1054
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETAIL: %s\n"
+
+#: fe-protocol3.c:1057
+#, c-format
+msgid "HINT: %s\n"
+msgstr "TIP: %s\n"
+
+#: fe-protocol3.c:1060
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "ANFRAGE: %s\n"
+
+#: fe-protocol3.c:1067
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "KONTEXT: %s\n"
+
+#: fe-protocol3.c:1076
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "SCHEMANAME: %s\n"
+
+#: fe-protocol3.c:1080
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABELLENNAME: %s\n"
+
+#: fe-protocol3.c:1084
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "SPALTENNAME: %s\n"
+
+#: fe-protocol3.c:1088
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATENTYPNAME: %s\n"
+
+#: fe-protocol3.c:1092
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "CONSTRAINT-NAME: %s\n"
+
+#: fe-protocol3.c:1104
+msgid "LOCATION: "
+msgstr "ORT: "
+
+#: fe-protocol3.c:1106
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1108
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1303
+#, c-format
+msgid "LINE %d: "
+msgstr "ZEILE %d: "
+
+#: fe-protocol3.c:1698
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: Text COPY OUT nicht ausgeführt\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:1291
+#, 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:1295
+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:1304
+#, 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:1354
+#, 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:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "konnte SSL-Kontext nicht erzeugen: %s\n"
+
+#: fe-secure-openssl.c:854
+#, 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:865
+#, 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:883
+#, 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:894
+#, 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:930
+#, 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: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 ""
+"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: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 ""
+"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:1009
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "konnte Zertifikatdatei »%s« nicht öffnen: %s\n"
+
+#: fe-secure-openssl.c:1028
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "konnte Zertifikatdatei »%s« nicht lesen: %s\n"
+
+#: fe-secure-openssl.c:1053
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "konnte SSL-Verbindung nicht aufbauen: %s\n"
+
+#: fe-secure-openssl.c:1107
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "konnte SSL-Engine »%s« nicht laden: %s\n"
+
+#: fe-secure-openssl.c:1119
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "konnte SSL-Engine »%s« nicht initialisieren: %s\n"
+
+#: fe-secure-openssl.c:1135
+#, 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:1149
+#, 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:1186
+#, 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:1194
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "WARNUNG: private Schlüsseldatei »%s« erlaubt Lesezugriff für Gruppe oder Andere; Rechte sollten u=rw (0600) oder weniger sein\n"
+
+#: fe-secure-openssl.c:1219
+#, 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:1237
+#, 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:1337
+#, 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:1373
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "Zertifikat konnte nicht ermittelt werden: %s\n"
+
+#: fe-secure-openssl.c:1462
+#, c-format
+msgid "no SSL error reported"
+msgstr "kein SSL-Fehler berichtet"
+
+#: fe-secure-openssl.c:1471
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL-Fehlercode %lu"
+
+#: fe-secure-openssl.c:1718
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "WARNUNG: sslpassword abgeschnitten\n"
+
+#: fe-secure.c:275
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "konnte keine Daten vom Server empfangen: %s\n"
+
+#: fe-secure.c:390
+#, 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/es.po b/src/interfaces/libpq/po/es.po
new file mode 100644
index 0000000..c0aad7a
--- /dev/null
+++ b/src/interfaces/libpq/po/es.po
@@ -0,0 +1,1290 @@
+# Spanish message translation file for libpq 2013-08-30 12:42-0400\n"
+#
+# Copyright (c) 2002-2019, 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, 2018
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL) 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-05-13 13:53+0000\n"
+"PO-Revision-Date: 2020-09-12 22:47-0300\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: Poedit 2.3\n"
+
+#: fe-auth-scram.c:212
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "mensaje SCRAM mal formado (mensaje vacío)\n"
+
+#: fe-auth-scram.c:218
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "mensaje SCRAM mal formado (longitud no coincide)\n"
+
+#: fe-auth-scram.c:265
+msgid "incorrect server signature\n"
+msgstr "signatura de servidor incorrecta\n"
+
+#: fe-auth-scram.c:274
+msgid "invalid SCRAM exchange state\n"
+msgstr "estado de intercambio SCRAM no es válido\n"
+
+#: fe-auth-scram.c:296
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "mensaje SCRAM mal formado (se esperaba atributo «%c»)\n"
+
+#: fe-auth-scram.c:305
+#, 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:346
+msgid "could not generate nonce\n"
+msgstr "no se pude generar 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:2957 fe-connect.c:4605 fe-connect.c:4861
+#: fe-connect.c:4980 fe-connect.c:5233 fe-connect.c:5313 fe-connect.c:5412
+#: fe-connect.c:5668 fe-connect.c:5697 fe-connect.c:5769 fe-connect.c:5793
+#: fe-connect.c:5811 fe-connect.c:5912 fe-connect.c:5921 fe-connect.c:6277
+#: fe-connect.c:6427 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:961
+#: fe-protocol3.c:1665 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 "memoria agotada\n"
+
+#: fe-auth-scram.c:364
+msgid "could not encode nonce\n"
+msgstr "no se pude generar nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "no se pudo codificar la prueba del cliente\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "respuesta SCRAM no es válida (nonce no coincide)\n"
+
+#: fe-auth-scram.c:651
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "mensaje SCRAM mal formado (sal no válida)\n"
+
+#: fe-auth-scram.c:665
+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:671
+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:702
+#, 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:718
+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:737
+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:388 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:349
+msgid "duplicate SSPI authentication request\n"
+msgstr "petición de autentificación SSPI duplicada\n"
+
+#: fe-auth.c:374
+msgid "could not acquire SSPI credentials"
+msgstr "no se pudo obtener las credenciales SSPI"
+
+#: fe-auth.c:429
+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:436
+msgid "duplicate SASL authentication request\n"
+msgstr "petición de autentificación SASL duplicada\n"
+
+#: fe-auth.c:492
+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:509
+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:521
+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:529
+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:635
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "memoria agotada creando el búfer SASL (%d)\n"
+
+#: fe-auth.c:660
+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:737
+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:875
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "el método de autentificación Kerberos 4 no está soportado\n"
+
+#: fe-auth.c:880
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "el método de autentificación Kerberos 5 no está soportado\n"
+
+#: fe-auth.c:951
+msgid "GSSAPI authentication not supported\n"
+msgstr "el método de autentificación GSSAPI no está soportado\n"
+
+#: fe-auth.c:983
+msgid "SSPI authentication not supported\n"
+msgstr "el método de autentificación SSPI no está soportado\n"
+
+#: fe-auth.c:991
+msgid "Crypt authentication not supported\n"
+msgstr "el método de autentificación Crypt no está soportado\n"
+
+#: fe-auth.c:1057
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "el método de autentificación %u no está soportado\n"
+
+#: fe-auth.c:1104
+#, 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:1114 fe-connect.c:2834
+#, 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:1119 fe-connect.c:2839
+#, 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:1221
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "SHOW retornó un conjunto de resultados con estructura inesperada\n"
+
+#: fe-auth.c:1230
+msgid "password_encryption value too long\n"
+msgstr "el valor para password_encryption es demasiado largo\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "algoritmo para cifrado de contraseña «%s» desconocido\n"
+
+#: fe-connect.c:1075
+#, 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:1156
+#, 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:1249
+#, c-format
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "valor cidr no válido: «%s»\n"
+
+#: fe-connect.c:1275
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "valor sslmode no válido: «%s»\n"
+
+#: fe-connect.c:1296
+#, 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:1317
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "valor sslmode no válido: «%s»\n"
+
+#: fe-connect.c:1325
+#, c-format
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "valor sslmode no válido: «%s»\n"
+
+#: fe-connect.c:1342
+msgid "invalid SSL protocol version range\n"
+msgstr "rango de protocolo SSL no válido \n"
+
+#: fe-connect.c:1357
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "valor gssencmode no válido: «%s»\n"
+
+#: fe-connect.c:1366
+#, 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:1401
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "valor para target_session_attrs no válido: «%s»\n"
+
+#: fe-connect.c:1619
+#, 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: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 ""
+"no se pudo conectar con el servidor: %s\n"
+"\t¿Está el servidor en ejecución localmente y aceptando\n"
+"\tconexiones en el socket de dominio Unix «%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 ""
+"no se pudo conectar con el servidor: %s\n"
+"\t¿Está el servidor en ejecución en el servidor «%s» (%s) y aceptando\n"
+"\tconexiones TCP/IP en el puerto %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 ""
+"no se pudo conectar con el servidor: %s\n"
+"\t¿Está el servidor en ejecución en el servidor «%s» y aceptando\n"
+"\tconexiones TCP/IP en el puerto %s?\n"
+
+#: fe-connect.c:1795
+#, 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: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) falló: %s\n"
+
+#: fe-connect.c:1947
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+
+#: fe-connect.c:2313
+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:2379
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "número de puerto no válido: «%s»\n"
+
+#: fe-connect.c:2395
+#, 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:2408
+#, 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:2421
+#, 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:2436
+#, 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:2560
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "no se pudo crear el socket: %s\n"
+
+#: fe-connect.c:2582
+#, 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:2592
+#, 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:2610
+msgid "keepalives parameter must be an integer\n"
+msgstr "el parámetro de keepalives debe ser un entero\n"
+
+#: fe-connect.c:2750
+#, 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:2778
+#, 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:2820
+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:2823
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "no se pudo obtener credenciales de la contraparte: %s\n"
+
+#: fe-connect.c:2847
+#, 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:2887
+#, 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:2899
+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:2931
+#, 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:2970
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "no se pudo enviar el paquete de inicio: %s\n"
+
+#: fe-connect.c:3040
+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:3067
+#, 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:3156
+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:3168
+#, 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:3234 fe-connect.c:3265
+#, 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:3506
+msgid "unexpected message from server during startup\n"
+msgstr "se ha recibido un mensaje inesperado del servidor durante el inicio\n"
+
+#: fe-connect.c:3711
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "no se pudo establecer una conexión de escritura al servidor: «%s:%s»\n"
+
+#: fe-connect.c:3757
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "la prueba «SHOW transaction_read_only» falló en el servidor «%s:%s»\n"
+
+#: fe-connect.c:3772
+#, 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:4211 fe-connect.c:4271
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc «%s» falló durante el evento PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4618
+#, 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:4633
+#, 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:4645 fe-connect.c:4700
+#, 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:4656 fe-connect.c:4715
+#, 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:4667
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "URL LDAP no válida «%s»: no tiene filtro\n"
+
+#: fe-connect.c:4688
+#, 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:4724
+msgid "could not create LDAP structure\n"
+msgstr "no se pudo crear estructura LDAP\n"
+
+#: fe-connect.c:4800
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "búsqueda en servidor LDAP falló: %s\n"
+
+#: fe-connect.c:4811
+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:4812 fe-connect.c:4824
+msgid "no entry found on LDAP lookup\n"
+msgstr "no se encontró ninguna entrada en búsqueda LDAP\n"
+
+#: fe-connect.c:4835 fe-connect.c:4848
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "la búsqueda LDAP entregó atributo sin valores\n"
+
+#: fe-connect.c:4900 fe-connect.c:4919 fe-connect.c:5451
+#, 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:4992 fe-connect.c:5636 fe-connect.c:6410
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "opción de conexión no válida «%s»\n"
+
+#: fe-connect.c:5008 fe-connect.c:5500
+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:5091
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "la definición de servicio «%s» no fue encontrada\n"
+
+#: fe-connect.c:5114
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "el archivo de servicio «%s» no fue encontrado\n"
+
+#: fe-connect.c:5129
+#, 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:5201 fe-connect.c:5245
+#, 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:5212
+#, 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:5932
+#, 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:6009
+#, 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:6016
+#, 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:6031
+#, 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:6160
+#, 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:6180
+#, 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:6231
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "parámetro de URI no válido: «%s»\n"
+
+#: fe-connect.c:6305
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "elemento escapado con %% no válido: «%s»\n"
+
+#: fe-connect.c:6315
+#, 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:6678
+msgid "connection pointer is NULL\n"
+msgstr "el puntero de conexión es NULL\n"
+
+#: fe-connect.c:6974
+#, 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:6983
+#, 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:7091
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "contraseña obtenida desde el archivo «%s»\n"
+
+#: fe-exec.c:444 fe-exec.c:2821
+#, 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: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:328
+#: fe-protocol3.c:692 fe-protocol3.c:920
+msgid "out of memory"
+msgstr "memoria agotada"
+
+#: fe-exec.c:506 fe-protocol2.c:1396 fe-protocol3.c:1873
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:815
+msgid "write to server failed\n"
+msgstr "falló escritura al servidor\n"
+
+#: fe-exec.c:896
+msgid "NOTICE"
+msgstr "AVISO"
+
+#: fe-exec.c:954
+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:966
+msgid "size_t overflow"
+msgstr "desbordamiento de size_t"
+
+#: fe-exec.c:1243 fe-exec.c:1301 fe-exec.c:1347
+msgid "command string is a null pointer\n"
+msgstr "la cadena de orden es un puntero nulo\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 "el número de parámetros debe estar entre 0 y 65535\n"
+
+#: fe-exec.c:1341 fe-exec.c:1442
+msgid "statement name is a null pointer\n"
+msgstr "el nombre de sentencia es un puntero nulo\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 "la función requiere protocolo 3.0 o superior\n"
+
+#: fe-exec.c:1479
+msgid "no connection to the server\n"
+msgstr "no hay conexión con el servidor\n"
+
+#: fe-exec.c:1486
+msgid "another command is already in progress\n"
+msgstr "hay otra orden en ejecución\n"
+
+#: fe-exec.c:1600
+msgid "length must be given for binary parameter\n"
+msgstr "el largo debe ser especificado para un parámetro binario\n"
+
+#: fe-exec.c:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "asyncStatus no esperado: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc «%s» falló durante el evento PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminado por un nuevo PQexec"
+
+#: fe-exec.c:2051
+msgid "COPY IN state must be terminated first\n"
+msgstr "el estado COPY IN debe ser terminado primero\n"
+
+#: fe-exec.c:2071
+msgid "COPY OUT state must be terminated first\n"
+msgstr "el estado COPY OUT debe ser terminado primero\n"
+
+#: fe-exec.c:2079
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec no está permitido durante COPY BOTH\n"
+
+#: fe-exec.c:2325 fe-exec.c:2392 fe-exec.c:2482 fe-protocol2.c:1353
+#: fe-protocol3.c:1804
+msgid "no COPY in progress\n"
+msgstr "no hay COPY alguno en ejecución\n"
+
+#: fe-exec.c:2672
+msgid "connection in wrong state\n"
+msgstr "la conexión está en un estado incorrecto\n"
+
+#: fe-exec.c:2703
+msgid "invalid ExecStatusType code"
+msgstr "el código de ExecStatusType no es válido"
+
+#: fe-exec.c:2730
+msgid "PGresult is not an error result\n"
+msgstr "PGresult no es un resultado de error\n"
+
+#: fe-exec.c:2805 fe-exec.c:2828
+#, 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:2843
+#, 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:3153
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "no se pudo interpretar el resultado del servidor: %s"
+
+#: fe-exec.c:3392 fe-exec.c:3476
+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:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "no se puede determinar el OID de la función lo_truncate\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "el argumento de lo_truncate excede el rango de enteros\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "no se puede determinar el OID de la función lo_truncate64\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "el argumento de lo_read excede el rango de enteros\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "el argumento de lo_write excede el rango de enteros\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "no se puede determinar el OID de la función lo_lseek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "no se puede determinar el OID de la función lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "no se puede determinar el OID de la función lo_tell64\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "no se pudo abrir el archivo «%s»: %s\n"
+
+#: fe-lobj.c:761
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "no se pudo leer el archivo «%s»: %s\n"
+
+#: fe-lobj.c:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "no se pudo escribir a archivo «%s»: %s\n"
+
+#: fe-lobj.c:946
+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-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "no se puede determinar el OID de la función lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "no se puede determinar el OID de la función lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "no se puede determinar el OID de la función lo_creat\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "no se puede determinar el OID de la función lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "no se puede determinar el OID de la función lo_lseek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "no se puede determinar el OID de la función lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "no se puede determinar el OID de la función loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "no se puede determinar el OID de la función lowrite\n"
+
+#: fe-misc.c:289
+#, 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:325
+#, 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:636 fe-misc.c:869
+msgid "connection not open\n"
+msgstr "la conexión no está abierta\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 ""
+"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:1063
+msgid "timeout expired\n"
+msgstr "tiempo de espera agotado\n"
+
+#: fe-misc.c:1108
+msgid "invalid socket\n"
+msgstr "socket no válido\n"
+
+#: fe-misc.c:1131
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() fallida: %s\n"
+
+#: fe-protocol2.c:87
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "el estado de setenv %c no es válido, probablemente por corrupción de memoria\n"
+
+#: fe-protocol2.c:384
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "el estado %c no es válido, probablemente por corrupción de memoria\n"
+
+#: fe-protocol2.c:473 fe-protocol3.c:183
+#, 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-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "carácter %c no esperado, siguiendo una respuesta de consulta vacía (mensaje «I»)"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "el servidor envió datos (mensaje «D») sin precederlos con una descripción de fila (mensaje «T»)"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "el servidor envió datos binarios (mensaje «B») sin precederlos con una description de fila (mensaje «T»)"
+
+#: fe-protocol2.c:626 fe-protocol3.c:403
+#, 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-protocol2.c:755 fe-protocol2.c:930 fe-protocol3.c:603 fe-protocol3.c:809
+msgid "out of memory for query result"
+msgstr "no hay suficiente memoria para el resultado de la consulta"
+
+#: fe-protocol2.c:1408
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "se perdió la sincronía con el servidor, reseteando la conexión"
+
+#: fe-protocol2.c:1530 fe-protocol2.c:1562 fe-protocol3.c:2061
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "error de protocolo: id=0x%x\n"
+
+#: fe-protocol3.c:360
+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:424
+#, 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:444
+#, 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:494 fe-protocol3.c:534
+msgid "insufficient data in \"T\" message"
+msgstr "datos insuficientes en el mensaje «T»"
+
+#: fe-protocol3.c:672
+#, fuzzy
+#| msgid "insufficient data in \"T\" message"
+msgid "insufficient data in \"t\" message"
+msgstr "datos insuficientes en el mensaje «T»"
+
+#: fe-protocol3.c:731 fe-protocol3.c:763 fe-protocol3.c:781
+msgid "insufficient data in \"D\" message"
+msgstr "datos insuficientes en el mensaje «D»"
+
+#: fe-protocol3.c:737
+msgid "unexpected field count in \"D\" message"
+msgstr "cantidad de campos inesperada en mensaje «D»"
+
+#: fe-protocol3.c:974
+msgid "no error message available\n"
+msgstr "no hay mensaje de error disponible\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1022 fe-protocol3.c:1041
+#, c-format
+msgid " at character %s"
+msgstr " en el carácter %s"
+
+#: fe-protocol3.c:1054
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETALLE: %s\n"
+
+#: fe-protocol3.c:1057
+#, c-format
+msgid "HINT: %s\n"
+msgstr "SUGERENCIA: %s\n"
+
+#: fe-protocol3.c:1060
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "CONSULTA: %s\n"
+
+#: fe-protocol3.c:1067
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXTO: %s\n"
+
+#: fe-protocol3.c:1076
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "NOMBRE DE ESQUEMA: %s\n"
+
+#: fe-protocol3.c:1080
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "NOMBRE DE TABLA: %s\n"
+
+#: fe-protocol3.c:1084
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "NOMBRE DE COLUMNA: %s\n"
+
+#: fe-protocol3.c:1088
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "NOMBRE TIPO DE DATO: %s\n"
+
+#: fe-protocol3.c:1092
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "NOMBRE DE RESTRICCIÓN: %s\n"
+
+#: fe-protocol3.c:1104
+msgid "LOCATION: "
+msgstr "UBICACIÓN: "
+
+#: fe-protocol3.c:1106
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1108
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1303
+#, c-format
+msgid "LINE %d: "
+msgstr "LÍNEA %d: "
+
+#: fe-protocol3.c:1698
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: no se está haciendo COPY OUT de texto\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:1291
+#, 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:1295
+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:1304
+#, 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:1354
+#, 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:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "no se pudo crear un contexto SSL: %s\n"
+
+#: fe-secure-openssl.c:854
+#, 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:865
+#, 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:883
+#, 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:894
+#, 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:930
+#, 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: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 ""
+"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: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 ""
+"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:1009
+#, 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:1028
+#, 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:1053
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "no se pudo establecer conexión SSL: %s\n"
+
+#: fe-secure-openssl.c:1107
+#, 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:1119
+#, 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:1135
+#, 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:1149
+#, 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:1186
+#, 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:1194
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "el archivo de la llave privada «%s» tiene permiso de lectura para el grupo u otros; los permisos deberían ser u=rw (0600) o menos\n"
+
+#: fe-secure-openssl.c:1219
+#, 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:1237
+#, 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:1337
+#, 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:1373
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "el certificado no pudo ser obtenido: %s\n"
+
+#: fe-secure-openssl.c:1462
+#, c-format
+msgid "no SSL error reported"
+msgstr "código de error SSL no reportado"
+
+#: fe-secure-openssl.c:1471
+#, c-format
+msgid "SSL error code %lu"
+msgstr "código de error SSL %lu"
+
+#: fe-secure-openssl.c:1718
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "ADVERTENCIA: sslpassword truncada\n"
+
+#: fe-secure.c:275
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "no se pudo recibir datos del servidor: %s\n"
+
+#: fe-secure.c:390
+#, 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"
+
+#~ msgid "extraneous data in \"D\" message"
+#~ msgstr "datos ininteligibles en mensaje «D»"
+
+#~ msgid "extraneous data in \"t\" message"
+#~ msgstr "datos ininteligibles en mensaje «t»"
+
+#~ msgid "extraneous data in \"T\" message"
+#~ msgstr "datos ininteligibles en mensaje «T»"
diff --git a/src/interfaces/libpq/po/fr.po b/src/interfaces/libpq/po/fr.po
new file mode 100644
index 0000000..094361a
--- /dev/null
+++ b/src/interfaces/libpq/po/fr.po
@@ -0,0 +1,1399 @@
+# 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 12\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-04-09 11:09+0000\n"
+"PO-Revision-Date: 2021-04-11 09:47+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.4.2\n"
+
+#: fe-auth-scram.c:212
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "message SCRAM malformé (message vide)\n"
+
+#: fe-auth-scram.c:218
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "message SCRAM malformé (pas de correspondance sur la longueur)\n"
+
+#: fe-auth-scram.c:265
+msgid "incorrect server signature\n"
+msgstr "signature invalide du serveur\n"
+
+#: fe-auth-scram.c:274
+msgid "invalid SCRAM exchange state\n"
+msgstr "état d'échange SCRAM invalide\n"
+
+#: fe-auth-scram.c:296
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "message SCRAM malformé (attribut « %c » attendu)\n"
+
+#: fe-auth-scram.c:305
+#, 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:346
+msgid "could not generate nonce\n"
+msgstr "n'a pas pu générer le 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:2957 fe-connect.c:4605 fe-connect.c:4861
+#: fe-connect.c:4980 fe-connect.c:5233 fe-connect.c:5313 fe-connect.c:5412
+#: fe-connect.c:5668 fe-connect.c:5697 fe-connect.c:5769 fe-connect.c:5793
+#: fe-connect.c:5811 fe-connect.c:5912 fe-connect.c:5921 fe-connect.c:6277
+#: fe-connect.c:6427 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:961
+#: fe-protocol3.c:1665 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 "mémoire épuisée\n"
+
+#: fe-auth-scram.c:364
+msgid "could not encode nonce\n"
+msgstr "n'a pas pu encoder le nonce\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "n'a pas pu encoder la preuve du client\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "réponse SCRAM invalide (pas de correspondance sur nonce)\n"
+
+#: fe-auth-scram.c:651
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "message SCRAM malformé (sel invalide)\n"
+
+#: fe-auth-scram.c:665
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "message SCRAM malformé (décompte d'itération invalide)\n"
+
+#: fe-auth-scram.c:671
+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:702
+#, 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:718
+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:737
+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:388 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:349
+msgid "duplicate SSPI authentication request\n"
+msgstr "requête d'authentification SSPI dupliquée\n"
+
+#: fe-auth.c:374
+msgid "could not acquire SSPI credentials"
+msgstr "n'a pas pu récupérer les pièces d'identité SSPI"
+
+#: fe-auth.c:429
+msgid "channel binding required, but SSL not in use\n"
+msgstr "lien de canal requis, mais SSL non utilisé\n"
+
+#: fe-auth.c:436
+msgid "duplicate SASL authentication request\n"
+msgstr "requête d'authentification SASL dupliquée\n"
+
+#: fe-auth.c:492
+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:509
+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:521
+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:529
+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:635
+#, 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:660
+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:737
+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:875
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "authentification Kerberos 4 non supportée\n"
+
+#: fe-auth.c:880
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "authentification Kerberos 5 non supportée\n"
+
+#: fe-auth.c:951
+msgid "GSSAPI authentication not supported\n"
+msgstr "authentification GSSAPI non supportée\n"
+
+#: fe-auth.c:983
+msgid "SSPI authentication not supported\n"
+msgstr "authentification SSPI non supportée\n"
+
+#: fe-auth.c:991
+msgid "Crypt authentication not supported\n"
+msgstr "authentification crypt non supportée\n"
+
+#: fe-auth.c:1057
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "méthode d'authentification %u non supportée\n"
+
+#: fe-auth.c:1104
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "échec de la recherche du nom d'utilisateur : code erreur %lu\n"
+
+#: fe-auth.c:1114 fe-connect.c:2834
+#, 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:1119 fe-connect.c:2839
+#, 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:1221
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "forme du résultat inattendu pour SHOW\n"
+
+#: fe-auth.c:1230
+msgid "password_encryption value too long\n"
+msgstr "la valeur de password_encryption est trop longue\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "algorithme de chiffrement du mot de passe « %s » non reconnu\n"
+
+#: fe-connect.c:1075
+#, 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:1156
+#, 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:1249
+#, c-format
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "valeur de channel_binding invalide : « %s »\n"
+
+#: fe-connect.c:1275
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "valeur sslmode invalide : « %s »\n"
+
+#: fe-connect.c:1296
+#, 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:1317
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "valeur ssl_min_protocol_version invalide : « %s »\n"
+
+#: fe-connect.c:1325
+#, c-format
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "valeur ssl_max_protocol_version invalide : « %s »\n"
+
+#: fe-connect.c:1342
+msgid "invalid SSL protocol version range\n"
+msgstr "intervalle de version invalide pour le protocole SSL\n"
+
+#: fe-connect.c:1357
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "valeur gssencmode invalide : « %s »\n"
+
+#: fe-connect.c:1366
+#, 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:1401
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "valeur target_session_attrs invalide : « %s »\n"
+
+#: fe-connect.c:1619
+#, 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: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 ""
+"n'a pas pu se connecter au serveur : %s\n"
+"\tLe serveur est-il actif localement et accepte-t-il les connexions sur la\n"
+" \tsocket Unix « %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 ""
+"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"
+
+#: 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 ""
+"n'a pas pu se connecter au serveur : %s\n"
+"\tLe serveur est-il actif sur l'hôte « %s » et accepte-t-il les connexions\n"
+"\tTCP/IP sur le port %s ?\n"
+
+#: fe-connect.c:1795
+#, 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: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) a échoué : %s\n"
+
+#: fe-connect.c:1947
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) a échoué : %ui\n"
+
+#: fe-connect.c:2313
+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:2379
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "numéro de port invalide : « %s »\n"
+
+#: fe-connect.c:2395
+#, 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:2408
+#, 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:2421
+#, 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:2436
+#, 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:2560
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "n'a pas pu créer la socket : %s\n"
+
+#: fe-connect.c:2582
+#, 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:2592
+#, 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:2610
+msgid "keepalives parameter must be an integer\n"
+msgstr "le paramètre keepalives doit être un entier\n"
+
+#: fe-connect.c:2750
+#, 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:2778
+#, 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:2820
+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:2823
+#, 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:2847
+#, 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:2887
+#, 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:2899
+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:2931
+#, 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:2970
+#, 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:3040
+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:3067
+#, 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:3156
+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:3168
+#, 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:3234 fe-connect.c:3265
+#, 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:3506
+msgid "unexpected message from server during startup\n"
+msgstr "message inattendu du serveur lors du démarrage\n"
+
+#: fe-connect.c:3711
+#, c-format
+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"
+
+#: fe-connect.c:3757
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "le test \"SHOW transaction_read_only\" a échoué sur le serveur \"%s:%s\"\n"
+
+#: fe-connect.c:3772
+#, 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:4211 fe-connect.c:4271
+#, 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:4618
+#, 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:4633
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "URL LDAP « %s » invalide : le « distinguished name » manque\n"
+
+#: fe-connect.c:4645 fe-connect.c:4700
+#, 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:4656 fe-connect.c:4715
+#, 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:4667
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "URL LDAP « %s » invalide : aucun filtre\n"
+
+#: fe-connect.c:4688
+#, 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:4724
+msgid "could not create LDAP structure\n"
+msgstr "n'a pas pu créer la structure LDAP\n"
+
+#: fe-connect.c:4800
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "échec de la recherche sur le serveur LDAP : %s\n"
+
+#: fe-connect.c:4811
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "plusieurs entrées trouvées pendant la recherche LDAP\n"
+
+#: fe-connect.c:4812 fe-connect.c:4824
+msgid "no entry found on LDAP lookup\n"
+msgstr "aucune entrée trouvée pendant la recherche LDAP\n"
+
+#: fe-connect.c:4835 fe-connect.c:4848
+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:4900 fe-connect.c:4919 fe-connect.c:5451
+#, 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:4992 fe-connect.c:5636 fe-connect.c:6410
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "option de connexion « %s » invalide\n"
+
+#: fe-connect.c:5008 fe-connect.c:5500
+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:5091
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "définition du service « %s » introuvable\n"
+
+#: fe-connect.c:5114
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "fichier de service « %s » introuvable\n"
+
+#: fe-connect.c:5129
+#, 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:5201 fe-connect.c:5245
+#, 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:5212
+#, 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:5932
+#, 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:6009
+#, 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:6016
+#, 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:6031
+#, 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:6160
+#, 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:6180
+#, 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:6231
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "paramètre de la requête URI invalide : « %s »\n"
+
+#: fe-connect.c:6305
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "jeton encodé en pourcentage invalide : « %s »\n"
+
+#: fe-connect.c:6315
+#, 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:6678
+msgid "connection pointer is NULL\n"
+msgstr "le pointeur de connexion est NULL\n"
+
+#: fe-connect.c:6974
+#, 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:6983
+#, 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:7091
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "mot de passe récupéré dans le fichier « %s »\n"
+
+#: fe-exec.c:444 fe-exec.c:2821
+#, 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: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:328
+#: fe-protocol3.c:692 fe-protocol3.c:920
+msgid "out of memory"
+msgstr "mémoire épuisée"
+
+#: fe-exec.c:506 fe-protocol2.c:1396 fe-protocol3.c:1873
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:815
+msgid "write to server failed\n"
+msgstr "échec en écriture vers le serveur\n"
+
+#: fe-exec.c:896
+msgid "NOTICE"
+msgstr "NOTICE"
+
+#: fe-exec.c:954
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult ne supporte pas plus de INT_MAX lignes"
+
+#: fe-exec.c:966
+msgid "size_t overflow"
+msgstr "saturation de size_t"
+
+#: fe-exec.c:1243 fe-exec.c:1301 fe-exec.c:1347
+msgid "command string is a null pointer\n"
+msgstr "la chaîne de commande est un pointeur nul\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 "le nombre de paramètres doit être compris entre 0 et 65535\n"
+
+#: fe-exec.c:1341 fe-exec.c:1442
+msgid "statement name is a null pointer\n"
+msgstr "le nom de l'instruction est un pointeur nul\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 "la fonction nécessite au minimum le protocole 3.0\n"
+
+#: fe-exec.c:1479
+msgid "no connection to the server\n"
+msgstr "aucune connexion au serveur\n"
+
+#: fe-exec.c:1486
+msgid "another command is already in progress\n"
+msgstr "une autre commande est déjà en cours\n"
+
+#: fe-exec.c:1600
+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:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "asyncStatus inattendu : %d\n"
+
+#: fe-exec.c:1883
+#, 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:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminé par un nouveau PQexec"
+
+#: fe-exec.c:2051
+msgid "COPY IN state must be terminated first\n"
+msgstr "l'état COPY IN doit d'abord être terminé\n"
+
+#: fe-exec.c:2071
+msgid "COPY OUT state must be terminated first\n"
+msgstr "l'état COPY OUT doit d'abord être terminé\n"
+
+#: fe-exec.c:2079
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec non autorisé pendant COPY BOTH\n"
+
+#: fe-exec.c:2325 fe-exec.c:2392 fe-exec.c:2482 fe-protocol2.c:1353
+#: fe-protocol3.c:1804
+msgid "no COPY in progress\n"
+msgstr "aucun COPY en cours\n"
+
+#: fe-exec.c:2672
+msgid "connection in wrong state\n"
+msgstr "connexion dans un état erroné\n"
+
+#: fe-exec.c:2703
+msgid "invalid ExecStatusType code"
+msgstr "code ExecStatusType invalide"
+
+#: fe-exec.c:2730
+msgid "PGresult is not an error result\n"
+msgstr "PGresult n'est pas un résultat d'erreur\n"
+
+#: fe-exec.c:2805 fe-exec.c:2828
+#, 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:2843
+#, 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:3153
+#, 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:3392 fe-exec.c:3476
+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:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_truncate\n"
+
+#: fe-lobj.c:170
+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:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_truncate64\n"
+
+#: fe-lobj.c:279
+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:334
+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:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_lseek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_tell64\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "n'a pas pu ouvrir le fichier « %s » : %s\n"
+
+#: fe-lobj.c:761
+#, 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:835 fe-lobj.c:859
+#, 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:946
+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-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_creat\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_lseek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "ne peut pas déterminer l'OID de la fonction loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "ne peut pas déterminer l'OID de la fonction lowrite\n"
+
+#: fe-misc.c:289
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "entier de taille %lu non supporté par pqGetInt"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "entier de taille %lu non supporté par pqPutInt"
+
+#: fe-misc.c:636 fe-misc.c:869
+msgid "connection not open\n"
+msgstr "la connexion n'est pas active\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 ""
+"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:1063
+msgid "timeout expired\n"
+msgstr "le délai est dépassé\n"
+
+#: fe-misc.c:1108
+msgid "invalid socket\n"
+msgstr "socket invalide\n"
+
+#: fe-misc.c:1131
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "échec de select() : %s\n"
+
+#: fe-protocol2.c:87
+#, c-format
+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"
+
+#: fe-protocol2.c:384
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "état %c invalide, indiquant probablement une corruption de la mémoire\n"
+
+#: fe-protocol2.c:473 fe-protocol3.c:183
+#, 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-protocol2.c:523
+#, c-format
+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 »)"
+
+#: fe-protocol2.c:589
+#, c-format
+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 »)"
+
+#: fe-protocol2.c:607
+#, c-format
+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 »)"
+
+#: fe-protocol2.c:626 fe-protocol3.c:403
+#, 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-protocol2.c:755 fe-protocol2.c:930 fe-protocol3.c:603 fe-protocol3.c:809
+msgid "out of memory for query result"
+msgstr "mémoire épuisée pour le résultat de la requête"
+
+#: fe-protocol2.c:1408
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "synchronisation perdue avec le serveur, réinitialisation de la connexion"
+
+#: fe-protocol2.c:1530 fe-protocol2.c:1562 fe-protocol3.c:2061
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "erreur de protocole : id=0x%x\n"
+
+#: fe-protocol3.c:360
+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:424
+#, 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:444
+#, 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:494 fe-protocol3.c:534
+msgid "insufficient data in \"T\" message"
+msgstr "données insuffisantes dans le message « T »"
+
+#: fe-protocol3.c:672
+msgid "insufficient data in \"t\" message"
+msgstr "données insuffisantes dans le message « t »"
+
+#: fe-protocol3.c:731 fe-protocol3.c:763 fe-protocol3.c:781
+msgid "insufficient data in \"D\" message"
+msgstr "données insuffisantes dans le message « D »"
+
+#: fe-protocol3.c:737
+msgid "unexpected field count in \"D\" message"
+msgstr "nombre de champs inattendu dans le message « D »"
+
+#: fe-protocol3.c:974
+msgid "no error message available\n"
+msgstr "aucun message d'erreur disponible\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1022 fe-protocol3.c:1041
+#, c-format
+msgid " at character %s"
+msgstr " au caractère %s"
+
+#: fe-protocol3.c:1054
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DÉTAIL : %s\n"
+
+#: fe-protocol3.c:1057
+#, c-format
+msgid "HINT: %s\n"
+msgstr "ASTUCE : %s\n"
+
+#: fe-protocol3.c:1060
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "REQUÊTE : %s\n"
+
+#: fe-protocol3.c:1067
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXTE : %s\n"
+
+#: fe-protocol3.c:1076
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "NOM DE SCHÉMA : %s\n"
+
+#: fe-protocol3.c:1080
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "NOM DE TABLE : %s\n"
+
+#: fe-protocol3.c:1084
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "NOM DE COLONNE : %s\n"
+
+#: fe-protocol3.c:1088
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "NOM DU TYPE DE DONNÉES : %s\n"
+
+#: fe-protocol3.c:1092
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "NOM DE CONTRAINTE : %s\n"
+
+#: fe-protocol3.c:1104
+msgid "LOCATION: "
+msgstr "EMPLACEMENT : "
+
+#: fe-protocol3.c:1106
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1108
+#, c-format
+msgid "%s:%s"
+msgstr "%s : %s"
+
+#: fe-protocol3.c:1303
+#, c-format
+msgid "LINE %d: "
+msgstr "LIGNE %d : "
+
+#: fe-protocol3.c:1698
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline : ne va pas réaliser un COPY OUT au format texte\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 wrap GSSAPI"
+
+#: fe-secure-gssapi.c:209
+msgid "outgoing GSSAPI message would not use confidentiality\n"
+msgstr "le message sortant GSSAPI n'utilisera 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 unwrap GSSAPI"
+
+#: fe-secure-gssapi.c:403
+msgid "incoming GSSAPI message did not use confidentiality\n"
+msgstr "le message entrant GSSAPI n'utilisait 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:1291
+#, 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:1295
+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:1304
+#, 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:1354
+#, 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:815
+#, 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:854
+#, 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:865
+#, 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:883
+#, 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:894
+#, 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:930
+#, 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: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'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: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 ""
+"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:1009
+#, 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:1028
+#, 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:1053
+#, 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:1107
+#, 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:1119
+#, 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:1135
+#, 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:1149
+#, 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:1186
+#, 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:1194
+#, 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"
+
+#: fe-secure-openssl.c:1219
+#, 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:1237
+#, 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:1337
+#, 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:1373
+#, 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:1462
+#, c-format
+msgid "no SSL error reported"
+msgstr "aucune erreur SSL reportée"
+
+#: fe-secure-openssl.c:1471
+#, c-format
+msgid "SSL error code %lu"
+msgstr "erreur SSL %lu"
+
+#: fe-secure-openssl.c:1718
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "ATTENTION : sslpassword tronqué\n"
+
+#: fe-secure.c:275
+#, 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:390
+#, 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 "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 "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 maximum version of SSL protocol: %s\n"
+#~ msgstr "n'a pas pu mettre en place la version maximale du protocole SSL : %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 "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 "setsockopt(TCP_KEEPIDLE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPIDLE) a échoué : %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPALIVE) a échoué : %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPINTVL) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPINTVL) a échoué : %s\n"
+
+#~ msgid "setsockopt(SO_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(SO_KEEPALIVE) a échoué : %s\n"
+
+#~ msgid "could not acquire mutex: %s\n"
+#~ msgstr "n'a pas pu acquérir le mutex : %s\n"
+
+#~ msgid "unrecognized return value from row processor"
+#~ msgstr "valeur de retour du traitement de la ligne non reconnue"
+
+#~ 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 "could not read private key file \"%s\": %s\n"
+#~ msgstr "n'a pas pu lire la clé privée « %s » : %s\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"
+
+#~ 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 "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"
+
+#~ 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 restore nonblocking mode on socket: %s\n"
+#~ msgstr "n'a pas pu rétablir le mode non-bloquant pour la socket : %s\n"
+
+#~ msgid "Kerberos 5 authentication rejected: %*s\n"
+#~ msgstr "authentification Kerberos 5 rejetée : %*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 "socket not open\n"
+#~ msgstr "socket non ouvert\n"
+
+#~ msgid "failed to generate nonce\n"
+#~ msgstr "échec pour la génération de nonce\n"
+
+#~ msgid "no GSSAPI support; cannot require GSSAPI\n"
+#~ msgstr "pas de support de GSSAPI : ne peut pas nécessiter GSSAPI\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 »"
diff --git a/src/interfaces/libpq/po/it.po b/src/interfaces/libpq/po/it.po
new file mode 100644
index 0000000..737f35b
--- /dev/null
+++ b/src/interfaces/libpq/po/it.po
@@ -0,0 +1,1148 @@
+#
+# libpq.po
+# Italian message translation file for libpq
+#
+# 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
+# Fabrizio Mazzoni <veramente@libero.it>, 2003.
+# Gaetano Mendola <mendola@bigfoot.com>, 2003.
+#
+# This file is distributed under the same license as the PostgreSQL package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (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:59+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"
+
+#: fe-auth-scram.c:189
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "messaggio SCRAM malformato (messaggio vuoto)\n"
+
+#: fe-auth-scram.c:195
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "messaggio SCRAM malformato (lunghezza errata)\n"
+
+#: fe-auth-scram.c:244
+msgid "incorrect server signature\n"
+msgstr "firma del server non corretta\n"
+
+#: fe-auth-scram.c:253
+msgid "invalid SCRAM exchange state\n"
+msgstr "stato di scambio SCRAM non valido\n"
+
+#: fe-auth-scram.c:276
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "messaggio SCRAM malformato (atteso attributo \"%c\")\n"
+
+#: fe-auth-scram.c:285
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "messaggio SCRAM malformato (atteso carattere \"=\" per l'attributo \"%c\")\n"
+
+#: fe-auth-scram.c:326
+msgid "could not generate nonce\n"
+msgstr "generazione del nonce fallita\n"
+
+#: fe-auth-scram.c:334 fe-auth-scram.c:401 fe-auth-scram.c:523
+#: fe-auth-scram.c:543 fe-auth-scram.c:569 fe-auth-scram.c:583
+#: fe-auth-scram.c:625 fe-auth.c:227 fe-auth.c:362 fe-auth.c:432 fe-auth.c:467
+#: fe-auth.c:643 fe-auth.c:802 fe-auth.c:1114 fe-auth.c:1262 fe-connect.c:835
+#: fe-connect.c:1264 fe-connect.c:1440 fe-connect.c:1922 fe-connect.c:1945
+#: fe-connect.c:2606 fe-connect.c:4152 fe-connect.c:4404 fe-connect.c:4523
+#: fe-connect.c:4773 fe-connect.c:4853 fe-connect.c:4952 fe-connect.c:5208
+#: fe-connect.c:5237 fe-connect.c:5309 fe-connect.c:5333 fe-connect.c:5351
+#: fe-connect.c:5452 fe-connect.c:5461 fe-connect.c:5817 fe-connect.c:5967
+#: fe-exec.c:2702 fe-exec.c:3449 fe-exec.c:3614 fe-lobj.c:895
+#: fe-protocol2.c:1213 fe-protocol3.c:999 fe-protocol3.c:1685
+#: fe-secure-common.c:110 fe-secure-openssl.c:438 fe-secure-openssl.c:1025
+msgid "out of memory\n"
+msgstr "memoria esaurita\n"
+
+#: fe-auth-scram.c:561
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "risposta SCRAM non valida (il nonce non combacia)\n"
+
+#: fe-auth-scram.c:600
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "messaggio SCRAM malformato (numero di iterazione non valido)\n"
+
+#: fe-auth-scram.c:606
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "messaggio SCRAM malformato (dati non riconosciuti dopo il primo messaggio del server)\n"
+
+#: fe-auth-scram.c:636
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "errore ricevuto dal server durante lo scambio SCRAM: %s\n"
+
+#: fe-auth-scram.c:652
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "messaggio SCRAM malformato (dati non riconosciuti dopo il messaggio finale del server)\n"
+
+#: fe-auth-scram.c:660
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "messaggio SCRAM malformato (firma del server non valida)\n"
+
+#: fe-auth.c:122
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "memoria esaurita nell'allocazione del buffer GSSAPI (%d)\n"
+
+# DV: non ne sono convinto
+#: fe-auth.c:177
+msgid "GSSAPI continuation error"
+msgstr "GSSAPI errore di continuazione"
+
+#: fe-auth.c:207 fe-auth.c:461 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "il nome dell'host deve essere specificato\n"
+
+#: fe-auth.c:214
+msgid "duplicate GSS authentication request\n"
+msgstr "richiesta di autenticazione GSS duplicata\n"
+
+# non è che mi torni tanto così
+#: fe-auth.c:240
+msgid "GSSAPI name import error"
+msgstr "errore di importazione del nome GSSAPI"
+
+#: fe-auth.c:303
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "memoria esaurita nell'allocazione del buffer SSPI (%d)\n"
+
+#: fe-auth.c:351
+msgid "SSPI continuation error"
+msgstr "SSPI errore di continuazione"
+
+#: fe-auth.c:422
+msgid "duplicate SSPI authentication request\n"
+msgstr "richiesta di autenticazione SSPI duplicata\n"
+
+#: fe-auth.c:447
+msgid "could not acquire SSPI credentials"
+msgstr "non è stato possibile ottenere le credenziali SSPI"
+
+#: fe-auth.c:501
+msgid "duplicate SASL authentication request\n"
+msgstr "doppia richiesta di autenticazione SASL\n"
+
+#: fe-auth.c:549
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr "il server ha offerto autenticazione SCRAM-SHA-256-PLUS su una connessione non SSL\n"
+
+#: fe-auth.c:561
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "nessuno dei meccanismi di autenticazione SASL del server è supportato\n"
+
+#: fe-auth.c:667
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "memoria esaurita nell'allocazione del buffer SASL (%d)\n"
+
+#: fe-auth.c:692
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "ricevuto AuthenticationSASLFinal dal server, ma l'autenticazione SASL non è stata completata\n"
+
+#: fe-auth.c:769
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "il metodo di autenticazione SCM_CRED non è supportato\n"
+
+#: fe-auth.c:860
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "l'autenticazione Kerberos 4 non è supportata\n"
+
+#: fe-auth.c:865
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "l'autenticazione Kerberos 5 non è supportata\n"
+
+#: fe-auth.c:936
+msgid "GSSAPI authentication not supported\n"
+msgstr "l'autenticazione GSSAPI non è supportata\n"
+
+#: fe-auth.c:968
+msgid "SSPI authentication not supported\n"
+msgstr "l'autenticazione SSPI non è supportata\n"
+
+#: fe-auth.c:976
+msgid "Crypt authentication not supported\n"
+msgstr "l'autenticazione Crypt non è supportata\n"
+
+#: fe-auth.c:1042
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "l'autenticazione %u non è supportata\n"
+
+#: fe-auth.c:1089
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "ricerca del nome utente fallita: codice di errore %lu\n"
+
+#: fe-auth.c:1099 fe-connect.c:2533
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "ricerca dell'ID utente locale %d non riuscita: %s\n"
+
+#: fe-auth.c:1104 fe-connect.c:2538
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "l'utente locale con ID %d non esiste\n"
+
+#: fe-auth.c:1206
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "il risultato restituito da SHOW ha una forma imprevista\n"
+
+#: fe-auth.c:1215
+msgid "password_encryption value too long\n"
+msgstr "valore di password_encryption troppo lungo\n"
+
+#: fe-auth.c:1255
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "algoritmo di criptaggio della password \"%s\" sconosciuto\n"
+
+#: fe-connect.c:1018
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "non è possibile far combaciare %d nomi host con %d valori hostaddr\n"
+
+#: fe-connect.c:1094
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "non è possibile far combaciare %d numeri di porta con %d host\n"
+
+#: fe-connect.c:1190
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "valore sslmode errato: \"%s\"\n"
+
+#: fe-connect.c:1211
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "valore sslmode \"%s\" non valido quando il supporto SSL non è compilato\n"
+
+#: fe-connect.c:1246
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "valore per target_session_attrs non valido: \"%s\"\n"
+
+#: fe-connect.c:1464
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "impostazione del socket in modalità TCP no delay fallita: %s\n"
+
+#: fe-connect.c:1494
+#, 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 ""
+"connessione al server fallita: %s\n"
+"\tVerifica che il server locale sia in funzione e che\n"
+"\taccetti connessioni sul socket di dominio Unix \"%s\"\n"
+
+#: fe-connect.c:1552
+#, 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 ""
+"connessione al server fallita: %s\n"
+"\tVerifica che il server all'indirizzo \"%s\" (%s) sia in funzione\n"
+"\te che accetti connessioni TCP/IP sulla porta %s\n"
+
+#: fe-connect.c:1561
+#, 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 ""
+"connessione al server fallita: %s\n"
+"\tVerifica che il server all'indirizzo \"%s\" sia in funzione\n"
+"\te che accetti connessioni TCP/IP sulla porta %s\n"
+
+#: fe-connect.c:1612 fe-connect.c:1644 fe-connect.c:1677 fe-connect.c:2325
+#, c-format
+msgid "setsockopt(%s) failed: %s\n"
+msgstr "setsockopt(%s) fallita: %s\n"
+
+#: fe-connect.c:1726
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "chiamata WSAIoctl(SIO_KEEPALIVE_VALS) fallito: %ui\n"
+
+#: fe-connect.c:2035
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "stato della connessione non valido, probabilmente indica una corruzione della memoria\n"
+
+#: fe-connect.c:2101
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "numero di porta non valido: \"%s\"\n"
+
+#: fe-connect.c:2117
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "conversione del nome host \"%s\" in indirizzo fallita: %s\n"
+
+#: fe-connect.c:2130
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "interpretazione dell'indirizzo di rete \"%s\" fallita: %s\n"
+
+#: fe-connect.c:2143
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Il percorso del socket di dominio unix \"%s\" è troppo lungo (massimo %d byte)\n"
+
+#: fe-connect.c:2158
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "conversione del percorso del socket di dominio Unix \"%s\" in indirizzo fallita: %s\n"
+
+#: fe-connect.c:2262
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "creazione del socket fallita: %s\n"
+
+#: fe-connect.c:2284
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "impostazione del socket in modalità non bloccante fallita: %s\n"
+
+#: fe-connect.c:2294
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "impostazione del socket in modalità close-on-exec fallita: %s\n"
+
+#: fe-connect.c:2312
+msgid "keepalives parameter must be an integer\n"
+msgstr "il parametro keepalives dev'essere un intero\n"
+
+#: fe-connect.c:2450
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "lettura dello stato di errore del socket fallita: %s\n"
+
+#: fe-connect.c:2478
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "non è stato possibile ottenere l'indirizzo del client dal socket: %s\n"
+
+#: fe-connect.c:2520
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "il parametro requirepeer non è supportato su questa piattaforma\n"
+
+#: fe-connect.c:2523
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "non è stato possibile ottenere le credenziali del peer: %s\n"
+
+#: fe-connect.c:2546
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer specifica \"%s\", ma il vero nome utente del peer è \"%s\"\n"
+
+#: fe-connect.c:2580
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "invio del pacchetto di negoziazione SSL fallito: %s\n"
+
+#: fe-connect.c:2619
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "invio del pacchetto di avvio fallito: %s\n"
+
+#: fe-connect.c:2689
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "il server non supporta SSL, ma SSL è stato richiesto\n"
+
+#: fe-connect.c:2715
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "ricevuta risposta errata alla negoziazione SSL: %c\n"
+
+#: fe-connect.c:2792 fe-connect.c:2825
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "prevista richiesta di autenticazione dal server, ma è stato ricevuto %c\n"
+
+#: fe-connect.c:3052
+msgid "unexpected message from server during startup\n"
+msgstr "messaggio imprevisto dal server durante l'avvio\n"
+
+#: fe-connect.c:3282
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "errore nello stabilire una connessione scrivibile col server \"%s:%s\"\n"
+
+#: fe-connect.c:3328
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "test \"SHOW transaction_read_only\" fallito sul server \"%s:%s\"\n"
+
+#: fe-connect.c:3343
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "stato connessione errato %d, probabilmente indica una corruzione di memoria\n"
+
+#: fe-connect.c:3758 fe-connect.c:3818
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc \"%s\" fallito durante l'evento PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4165
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "URL LDAP \"%s\" non corretta: lo schema deve essere ldap://\n"
+
+#: fe-connect.c:4180
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "URL LDAP \"%s\" non corretta: distinguished name non trovato\n"
+
+#: fe-connect.c:4191 fe-connect.c:4244
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "URL LDAP \"%s\" non corretta: deve avere esattamente un attributo\n"
+
+#: fe-connect.c:4201 fe-connect.c:4258
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "URL LDAP \"%s\" non corretta: deve essere specificato la portata della ricerca (base/one/sub)\n"
+
+#: fe-connect.c:4212
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "URL LDAP \"%s\" non corretta: filtro non specificato\n"
+
+#: fe-connect.c:4233
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "URL LDAP \"%s\" non corretta: numero di porta non valido\n"
+
+#: fe-connect.c:4267
+msgid "could not create LDAP structure\n"
+msgstr "creazione della struttura dati LDAP fallita\n"
+
+#: fe-connect.c:4343
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "ricerca del server LDAP fallita: %s\n"
+
+#: fe-connect.c:4354
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "trovata più di una voce nella ricerca LDAP\n"
+
+#: fe-connect.c:4355 fe-connect.c:4367
+msgid "no entry found on LDAP lookup\n"
+msgstr "nessun elemento trovato per la ricerca LDAP\n"
+
+#: fe-connect.c:4378 fe-connect.c:4391
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "l'attributo non ha valori nella ricerca LDAP\n"
+
+#: fe-connect.c:4443 fe-connect.c:4462 fe-connect.c:4991
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "manca \"=\" dopo \"%s\" nella stringa di connessione\n"
+
+#: fe-connect.c:4535 fe-connect.c:5176 fe-connect.c:5950
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "opzione di connessione errata \"%s\"\n"
+
+#: fe-connect.c:4551 fe-connect.c:5040
+msgid "unterminated quoted string in connection info string\n"
+msgstr "stringa tra virgolette non terminata nella stringa di connessione\n"
+
+#: fe-connect.c:4634
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "il file di definizione di servizio \"%s\" non è stato trovato\n"
+
+#: fe-connect.c:4657
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "il file di servizio \"%s\" non è stato trovato\n"
+
+#: fe-connect.c:4670
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "la riga %d nel file di servizio \"%s\" è troppo lunga\n"
+
+#: fe-connect.c:4741 fe-connect.c:4785
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "errore di sintassi del file di servizio \"%s\", alla riga %d\n"
+
+#: fe-connect.c:4752
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "specifiche di servizio annidate non supportate nel file di servizio \"%s\", linea %d\n"
+
+#: fe-connect.c:5472
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "URI invalida propagata alla routine di parsing interna: \"%s\"\n"
+
+#: fe-connect.c:5549
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "fine stringa raggiunta cercando un \"]\" corrispondente nell'indirizzo host IPv6 nella URI: \"%s\"\n"
+
+#: fe-connect.c:5556
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "l'indirizzo host IPv6 non dev'essere assente nella URI: \"%s\"\n"
+
+#: fe-connect.c:5571
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "carattere inatteso \"%c\" in posizione %d nella uri URI (atteso \":\" oppure \"/\"): \"%s\"\n"
+
+#: fe-connect.c:5700
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "separatore chiave/valore \"=\" in eccesso nei parametri della URI: \"%s\"\n"
+
+#: fe-connect.c:5720
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "separatore chiave/valore \"=\" mancante nei parametri della URI: \"%s\"\n"
+
+#: fe-connect.c:5771
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "parametro URI non valido: \"%s\"\n"
+
+#: fe-connect.c:5845
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "simbolo percent-encoded non valido \"%s\"\n"
+
+#: fe-connect.c:5855
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "valore non ammesso %%00 nel valore percent-encoded: \"%s\"\n"
+
+#: fe-connect.c:6201
+msgid "connection pointer is NULL\n"
+msgstr "il puntatore della connessione è NULL\n"
+
+#: fe-connect.c:6499
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ATTENZIONE: il file delle password \"%s\" non è un file regolare\n"
+
+#: fe-connect.c:6508
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr ""
+"ATTENZIONE: Il file delle password %s ha privilegi di accesso in lettura e scrittura per tutti;\n"
+"i permessi dovrebbero essere u=rw (0600) o inferiori\n"
+
+#: fe-connect.c:6602
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "password ottenuta dal file \"%s\"\n"
+
+#: fe-exec.c:437 fe-exec.c:2776
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "la riga numero %d non è compreso tra 0 e %d"
+
+#: fe-exec.c:498 fe-protocol2.c:502 fe-protocol2.c:537 fe-protocol2.c:1056
+#: fe-protocol3.c:208 fe-protocol3.c:235 fe-protocol3.c:252 fe-protocol3.c:332
+#: fe-protocol3.c:727 fe-protocol3.c:958
+msgid "out of memory"
+msgstr "memoria esaurita"
+
+#: fe-exec.c:499 fe-protocol2.c:1402 fe-protocol3.c:1893
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:847
+msgid "NOTICE"
+msgstr "NOTIFICA"
+
+#: fe-exec.c:905
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult non può supportare più di INT_MAX tuple"
+
+#: fe-exec.c:917
+msgid "size_t overflow"
+msgstr "overflow size_t"
+
+#: fe-exec.c:1192 fe-exec.c:1250 fe-exec.c:1296
+msgid "command string is a null pointer\n"
+msgstr "il testo del comando è un puntatore nullo\n"
+
+#: fe-exec.c:1256 fe-exec.c:1302 fe-exec.c:1397
+msgid "number of parameters must be between 0 and 65535\n"
+msgstr "il numero di parametri deve essere tra 0 e 65535\n"
+
+#: fe-exec.c:1290 fe-exec.c:1391
+msgid "statement name is a null pointer\n"
+msgstr "il nome dell'istruzione è un puntatore nullo\n"
+
+#: fe-exec.c:1310 fe-exec.c:1473 fe-exec.c:2191 fe-exec.c:2390
+msgid "function requires at least protocol version 3.0\n"
+msgstr "la funzione richiede almeno il protocollo versione 3.0\n"
+
+#: fe-exec.c:1428
+msgid "no connection to the server\n"
+msgstr "nessuna connessione al server\n"
+
+#: fe-exec.c:1435
+msgid "another command is already in progress\n"
+msgstr "un altro comando è in esecuzione\n"
+
+#: fe-exec.c:1549
+msgid "length must be given for binary parameter\n"
+msgstr "la lunghezza deve essere fornita per i parametri binari\n"
+
+#: fe-exec.c:1821
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "asyncStatus imprevisto: %d\n"
+
+#: fe-exec.c:1841
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc \"%s\" fallito durante l'evento PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2001
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminato da una nuova PQexec"
+
+#: fe-exec.c:2009
+msgid "COPY IN state must be terminated first\n"
+msgstr "lo stato COPY IN deve prima essere terminato\n"
+
+#: fe-exec.c:2029
+msgid "COPY OUT state must be terminated first\n"
+msgstr "lo stato COPY OUT deve prima essere terminato\n"
+
+# NON SONO ASSOLUTAMENTE CONVINTO!
+#: fe-exec.c:2037
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec not consentito durante COPY BOTH\n"
+
+#: fe-exec.c:2280 fe-exec.c:2347 fe-exec.c:2437 fe-protocol2.c:1359
+#: fe-protocol3.c:1824
+msgid "no COPY in progress\n"
+msgstr "nessun comando COPY in corso\n"
+
+#: fe-exec.c:2627
+msgid "connection in wrong state\n"
+msgstr "la connessione è in uno stato errato\n"
+
+#: fe-exec.c:2658
+msgid "invalid ExecStatusType code"
+msgstr "codice ExecStatusType errato"
+
+#: fe-exec.c:2685
+msgid "PGresult is not an error result\n"
+msgstr "PGresult non è un risultato di errore\n"
+
+#: fe-exec.c:2760 fe-exec.c:2783
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "la colonna numero %d non è compreso tra 0 e %d"
+
+#: fe-exec.c:2798
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "il parametro numero %d non è compreso tra 0 e %d"
+
+#: fe-exec.c:3108
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "errore nell'interpretazione del risultato dal server: %s"
+
+#: fe-exec.c:3347 fe-exec.c:3431
+msgid "incomplete multibyte character\n"
+msgstr "carattere multibyte incompleto\n"
+
+#: fe-lobj.c:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "non è possibile determinare l'OID della funzione lo_truncate\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "l'argomento di lo_truncate supera l'intervallo degli interi\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "non è possibile determinare l'OID della funzione lo_truncate64\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "l'argomento di lo_read supera l'intervallo degli interi\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "l'argomento di lo_write supera l'intervallo degli interi\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "non è possibile determinare l'OID della funzione lo_seek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "non è possibile determinare l'OID della funzione lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "non è possibile determinare l'OID della funzione lo_tell64\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "apertura del file \"%s\" fallita: %s\n"
+
+#: fe-lobj.c:761
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "lettura dal file \"%s\" fallita: %s\n"
+
+#: fe-lobj.c:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "scrittura nel file \"%s\" fallita: %s\n"
+
+#: fe-lobj.c:946
+msgid "query to initialize large object functions did not return data\n"
+msgstr "la query per inizializzare le funzioni large object non hanno restituito dati\n"
+
+#: fe-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "non è possibile determinare l'OID della funzione lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "non è possibile determinare l'OID della funzione lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "non è possibile determinare l'OID della funzione lo_create\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "non è possibile determinare l'OID della funzione lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "non è possibile determinare l'OID della funzione lo_seek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "non è possibile determinare l'OID della funzione lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "non è possibile determinare l'OID della funzione loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "non è possibile determinare l'OID della funzione lowrite\n"
+
+#: fe-misc.c:290
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "intero di dimensione %lu non supportato da pqGetInt"
+
+#: fe-misc.c:326
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "intero di dimensione %lu non supportato da pqPutInt"
+
+#: fe-misc.c:637 fe-misc.c:838
+msgid "connection not open\n"
+msgstr "connessione non aperta\n"
+
+#: fe-misc.c:807 fe-secure-openssl.c:206 fe-secure-openssl.c:314
+#: fe-secure.c:261 fe-secure.c:371
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"il server ha chiuso la connessione inaspettatamente\n"
+"\tQuesto probabilmente indica che il server ha terminato in modo anormale\n"
+"\tprima o durante l'elaborazione della richiesta.\n"
+
+#: fe-misc.c:1009
+msgid "timeout expired\n"
+msgstr "timeout scaduto\n"
+
+#: fe-misc.c:1054
+msgid "invalid socket\n"
+msgstr "socket non valido\n"
+
+#: fe-misc.c:1077
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() fallita: %s\n"
+
+#: fe-protocol2.c:90
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "stato %c di setenv non valido, probabilmente indica una corruzione di memoria\n"
+
+#: fe-protocol2.c:389
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "stato %c non valido, probabilmente indica una corruzione di memoria\n"
+
+#: fe-protocol2.c:478 fe-protocol3.c:185
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "messaggio tipo 0x%02x arrivato dal server mentre era inattivo"
+
+#: fe-protocol2.c:528
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "carattere %c non previsto a seguito di una risposta vuota ad una query (messaggio \"I\")"
+
+#: fe-protocol2.c:594
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "il server ha spedito dati (messaggio di tipo \"D\") senza prima il descrittore di riga (messaggio di tipo \"T\")"
+
+#: fe-protocol2.c:612
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "il server ha spedito dati binari (messaggio di tipo \"B\") senza prima il descrittore di riga (messaggio di tipo \"T\")"
+
+#: fe-protocol2.c:632 fe-protocol3.c:411
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "risposta inattesa dal server; il primo carattere ricevuto era \"%c\"\n"
+
+#: fe-protocol2.c:761 fe-protocol2.c:936 fe-protocol3.c:626 fe-protocol3.c:853
+msgid "out of memory for query result"
+msgstr "memoria esaurita per il risultato della query"
+
+#: fe-protocol2.c:1414
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "persa la sincronizzazione con il server, sto resettando la connessione"
+
+#: fe-protocol2.c:1548 fe-protocol2.c:1580 fe-protocol3.c:2096
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "errore di protocollo: id=0x%x\n"
+
+#: fe-protocol3.c:367
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr "il server ha spedito dati (messaggio di tipo \"D\") senza prima il descrittore di riga (messaggio di tipo \"T\")\n"
+
+#: fe-protocol3.c:432
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "i contenuti del messaggio non sono in accordo con la lunghezza del tipo di messaggio \"%c\"\n"
+
+#: fe-protocol3.c:453
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "persa la sincronizzazione con il server: ricevuto il tipo di messaggio \"%c\" di lunghezza %d\n"
+
+#: fe-protocol3.c:504 fe-protocol3.c:544
+msgid "insufficient data in \"T\" message"
+msgstr "dati insufficienti nel messaggio di tipo \"T\""
+
+#: fe-protocol3.c:577
+msgid "extraneous data in \"T\" message"
+msgstr "dati estranei nel messaggio di tipo \"T\""
+
+#: fe-protocol3.c:690
+msgid "extraneous data in \"t\" message"
+msgstr "dati estranei nel messaggio di tipo \"t\""
+
+#: fe-protocol3.c:761 fe-protocol3.c:793 fe-protocol3.c:811
+msgid "insufficient data in \"D\" message"
+msgstr "dati insufficienti nel messaggio di tipo \"D\""
+
+#: fe-protocol3.c:767
+msgid "unexpected field count in \"D\" message"
+msgstr "numero dei campi non previsto nel messaggio di tipo \"D\""
+
+#: fe-protocol3.c:820
+msgid "extraneous data in \"D\" message"
+msgstr "dati estranei nel messaggio di tipo \"D\""
+
+#: fe-protocol3.c:1012
+msgid "no error message available\n"
+msgstr "nessun messaggio di errore disponibile\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1042 fe-protocol3.c:1061
+#, c-format
+msgid " at character %s"
+msgstr " al carattere %s"
+
+#: fe-protocol3.c:1074
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETTAGLI: %s\n"
+
+#: fe-protocol3.c:1077
+#, c-format
+msgid "HINT: %s\n"
+msgstr "NOTA: %s\n"
+
+#: fe-protocol3.c:1080
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "QUERY: %s\n"
+
+#: fe-protocol3.c:1087
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTESTO: %s\n"
+
+#: fe-protocol3.c:1096
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "NOME SCHEMA: %s\n"
+
+#: fe-protocol3.c:1100
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "NOME TABELLA: %s\n"
+
+#: fe-protocol3.c:1104
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "NOME COLONNA: %s\n"
+
+#: fe-protocol3.c:1108
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "NOME TIPO DATI: %s\n"
+
+#: fe-protocol3.c:1112
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "NOME VINCOLO: %s\n"
+
+#: fe-protocol3.c:1124
+msgid "LOCATION: "
+msgstr "POSIZIONE: "
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1128
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1323
+#, c-format
+msgid "LINE %d: "
+msgstr "RIGA %d: "
+
+#: fe-protocol3.c:1718
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: COPY OUT testuale ignorato\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "Il nome del certificato SSL contiene null\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "il nome dell'host dev'essere specificato per una connessione SSL verificata\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "il certificato per il server \"%s\" non combacia col nome host \"%s\"\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "impossibile ottenere il nome dell'host del server dal certificato del server\n"
+
+#: fe-secure-openssl.c:211 fe-secure-openssl.c:319 fe-secure-openssl.c:1219
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "errore SSL SYSCALL: %s\n"
+
+#: fe-secure-openssl.c:218 fe-secure-openssl.c:326 fe-secure-openssl.c:1223
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "errore SSL SYSCALL: rilevato EOF\n"
+
+#: fe-secure-openssl.c:229 fe-secure-openssl.c:337 fe-secure-openssl.c:1232
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "errore SSL: %s\n"
+
+#: fe-secure-openssl.c:244 fe-secure-openssl.c:352
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "la connessione SSL è stata chiusa inaspettatamente\n"
+
+#: fe-secure-openssl.c:250 fe-secure-openssl.c:358 fe-secure-openssl.c:1241
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "codice di errore SSL sconosciuto: %d\n"
+
+#: fe-secure-openssl.c:398
+msgid "could not determine server certificate signature algorithm\n"
+msgstr "impossibile determinare l'algoritmo di firma del certificato del server\n"
+
+#: fe-secure-openssl.c:419
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "impossibile trovare il digest per il NID %s\n"
+
+#: fe-secure-openssl.c:429
+msgid "could not generate peer certificate hash\n"
+msgstr "impossibile generare l'hash del certificato del peer\n"
+
+#: fe-secure-openssl.c:486
+msgid "SSL certificate's name entry is missing\n"
+msgstr "manca il nome del certificato SSL\n"
+
+#: fe-secure-openssl.c:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "creazione del contesto SSL fallita: %s\n"
+
+#: fe-secure-openssl.c:852
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "lettura del file di certificato radice \"%s\" fallita: %s\n"
+
+#: fe-secure-openssl.c:880
+#, c-format
+msgid "SSL library does not support CRL certificates (file \"%s\")\n"
+msgstr "la libreria SSL non supporta i certificati di tipo CRL (file \"%s\")\n"
+
+#: fe-secure-openssl.c:908
+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 ""
+"directory utente non trovata per la locazione del file di certificato radice\n"
+"Per favore fornisci il file oppure cambia sslmode per disabilitare la verifica del certificato del server.\n"
+
+#: fe-secure-openssl.c:912
+#, 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 ""
+"il file \"%s\" del certificato radice non esiste\n"
+"Per favore fornisci il file oppure cambia sslmode per disabilitare la verifica del certificato del server.\n"
+
+#: fe-secure-openssl.c:943
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "apertura del file di certificato \"%s\" fallita: %s\n"
+
+#: fe-secure-openssl.c:962
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "lettura del file di certificato \"%s\" fallita: %s\n"
+
+#: fe-secure-openssl.c:987
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "non è stato possibile stabilire una connessione SSL: %s\n"
+
+#: fe-secure-openssl.c:1041
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "caricamento del motore SSL \"%s\" fallito: %s\n"
+
+#: fe-secure-openssl.c:1053
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "inizializzazione del motore SSL \"%s\" fallita: %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "lettura del file della chiave privata SSL \"%s\" dal motore \"%s\" fallita: %s\n"
+
+#: fe-secure-openssl.c:1083
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "caricamento della chiave privata SSL \"%s\" dal motore \"%s\" fallito: %s\n"
+
+#: fe-secure-openssl.c:1120
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "certificato trovato, ma non la chiave privata \"%s\"\n"
+
+#: fe-secure-openssl.c:1128
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "Il file della chiave privata \"%s\" ha privilegi di accesso in lettura e scrittura per tutti; i permessi dovrebbero essere u=rw (0600) o inferiori\n"
+
+#: fe-secure-openssl.c:1139
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "caricamento del file della chiave privata \"%s\" fallito: %s\n"
+
+#: fe-secure-openssl.c:1153
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "il certificato non corrisponde con il file della chiave privata \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1262
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "non è stato possibile possibile ottenere il certificato: %s\n"
+
+#: fe-secure-openssl.c:1351
+#, c-format
+msgid "no SSL error reported"
+msgstr "nessun errore SSL riportato"
+
+#: fe-secure-openssl.c:1360
+#, c-format
+msgid "SSL error code %lu"
+msgstr "codice di errore SSL: %lu"
+
+#: fe-secure.c:269
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "ricezione dati dal server fallita: %s\n"
+
+#: fe-secure.c:378
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "invio dati al server fallito: %s\n"
+
+#: win32.c:317
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "errore socket sconosciuto: 0x%08X/%d"
diff --git a/src/interfaces/libpq/po/ja.po b/src/interfaces/libpq/po/ja.po
new file mode 100644
index 0000000..3e08d46
--- /dev/null
+++ b/src/interfaces/libpq/po/ja.po
@@ -0,0 +1,1272 @@
+# Japanese message translation file for libpq
+# Copyright (C) 2019 PostgreSQL Global Development Group
+# This file is distributed under the same license as the pg_archivecleanup (PostgreSQL) package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL 13)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-08-21 23:39+0900\n"
+"PO-Revision-Date: 2020-08-22 00:02+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: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:1423 fe-connect.c:1599 fe-connect.c:2204
+#: fe-connect.c:2227 fe-connect.c:2956 fe-connect.c:4602 fe-connect.c:4858
+#: fe-connect.c:4977 fe-connect.c:5230 fe-connect.c:5310 fe-connect.c:5409
+#: fe-connect.c:5665 fe-connect.c:5694 fe-connect.c:5766 fe-connect.c:5790
+#: fe-connect.c:5808 fe-connect.c:5909 fe-connect.c:5918 fe-connect.c:6274
+#: fe-connect.c:6424 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 "クライアントの証明のエンコードに失敗しました\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "不正なSCRAM応答 (nonce の不一致)\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メッセージのフォーマット異常 (server-first-message 終端の余分なデータ)\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メッセージのフォーマット異常 (server-final-message 終端の余分なデータ)\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 "GSSAI続行エラー"
+
+#: 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 "サーバが非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 "Crypt認証はサポートされていません\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:2838
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "ローカルユーザID%dが見つかりませんでした: %s\n"
+
+#: fe-auth.c:1119 fe-connect.c:2843
+#, 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個のhostaddrの値との突き合せはできません\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 fe-connect.c:1275 fe-connect.c:1317 fe-connect.c:1326
+#: fe-connect.c:1359 fe-connect.c:1404
+#, c-format
+msgid "invalid %s value: \"%s\"\n"
+msgstr "%s の値が不正: \"%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:1344
+msgid "invalid SSL protocol version range\n"
+msgstr "不正なSSLプロトコルバージョン範囲\n"
+
+#: fe-connect.c:1369
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "gssencmodeの値\"%s\"はGSSAPIサポートがコンパイルされていない場合は不正\n"
+
+#: fe-connect.c:1623
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "TCPソケットを非遅延モードに設定できませんでした: %s\n"
+
+#: fe-connect.c:1684
+#, 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"
+" ローカルにサーバが稼動していますか?\n"
+" Unixドメインソケット\"%s\"で通信を受け付けていますか?\n"
+
+#: fe-connect.c:1721
+#, 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:1729
+#, 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:1799
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "接続オプション\"%2$s\"に対する不正な整数値\"%1$s\"\n"
+
+#: fe-connect.c:1829 fe-connect.c:1863 fe-connect.c:1898 fe-connect.c:1985
+#: fe-connect.c:2627
+#, c-format
+msgid "setsockopt(%s) failed: %s\n"
+msgstr "setsockopt(%s)が失敗しました: %s\n"
+
+#: fe-connect.c:1951
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS)に失敗しました:%ui\n"
+
+#: fe-connect.c:2317
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "接続状態が不正です。メモリ障害の可能性があります\n"
+
+#: fe-connect.c:2383
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "不正なポート番号です: \"%s\"\n"
+
+#: fe-connect.c:2399
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "ホスト名\"%s\"をアドレスに変換できませんでした: %s\n"
+
+#: fe-connect.c:2412
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "ネットワークアドレス\"%s\"をパースできませんでした: %s\n"
+
+#: fe-connect.c:2425
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Unixドメインソケットのパス\"%s\"が長すぎます(最大 %d バイト)\n"
+
+#: fe-connect.c:2440
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "Unixドメインソケットのパス\"%s\"をアドレスに変換できませんでした: %s\n"
+
+#: fe-connect.c:2564
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "ソケットを作成できませんでした: %s\n"
+
+#: fe-connect.c:2586
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "ソケットを非ブロッキングモードに設定できませんでした: %s\n"
+
+#: fe-connect.c:2596
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "ソケットをclose-on-execモードに設定できませんでした: %s\n"
+
+#: fe-connect.c:2614
+msgid "keepalives parameter must be an integer\n"
+msgstr "keepaliveのパラメータは整数でなければなりません\n"
+
+#: fe-connect.c:2754
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "ソケットのエラー状態を入手できませんでした: %s\n"
+
+#: fe-connect.c:2782
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "ソケットからクライアントアドレスを入手できませんでした: %s\n"
+
+#: fe-connect.c:2824
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "このプラットフォームでは requirepeer パラメータはサポートされていません\n"
+
+#: fe-connect.c:2827
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "ピアの資格証明を入手できませんでした: %s\n"
+
+#: fe-connect.c:2851
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeerは\"%s\"を指定していますが、実際のピア名は\"%s\"です\n"
+
+#: fe-connect.c:2891
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "GSSAPIネゴシエーションパケットを送信できませんでした: %s\n"
+
+#: fe-connect.c:2903
+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:2930
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "SSLネゴシエーションパケットを送信できませんでした: %s\n"
+
+#: fe-connect.c:2969
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "開始パケットを送信できませんでした: %s\n"
+
+#: fe-connect.c:3039
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "サーバはSSLをサポートしていませんが、SSLが要求されました\n"
+
+#: fe-connect.c:3065
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "SSLネゴシエーションに対して不正な応答を受信しました: %c\n"
+
+#: fe-connect.c:3155
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "サーバはGSSAPI暗号化をサポートしていませんが、要求されました\n"
+
+#: fe-connect.c:3166
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "GSSAPIネゴシエーションに対して不正な応答を受信しました: %c\n"
+
+#: fe-connect.c:3233 fe-connect.c:3264
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "サーバからの認証要求を想定していましたが、%cを受信しました\n"
+
+#: fe-connect.c:3506
+msgid "unexpected message from server during startup\n"
+msgstr "起動時にサーバから想定外のメッセージがありました\n"
+
+#: fe-connect.c:3711
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "サーバ\"%s:%s\"への書き込み可能な接続を確立できませんでした\n"
+
+#: fe-connect.c:3757
+#, 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:3772
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "接続状態%dが不正です。メモリ障害の可能性があります\n"
+
+#: fe-connect.c:4208 fe-connect.c:4268
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEVT_CONNRESETイベント中にPGEventProc \"%s\"に失敗しました\n"
+
+#: fe-connect.c:4615
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "不正なLDAP URL\"%s\":スキーマはldap://でなければなりません\n"
+
+#: fe-connect.c:4630
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "不正なLDAP URL \"%s\": 区別名がありません\n"
+
+#: fe-connect.c:4642 fe-connect.c:4697
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "不正なLDAP URL \"%s\": 正確に1つの属性を持たなければなりません\n"
+
+#: fe-connect.c:4653 fe-connect.c:4712
+#, 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:4664
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "不正なLDAP URL \"%s\": フィルタがありません\n"
+
+#: fe-connect.c:4685
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "不正なLDAP URL \"%s\": ポート番号が不正です\n"
+
+#: fe-connect.c:4721
+msgid "could not create LDAP structure\n"
+msgstr "LDAP構造体を作成できませんでした\n"
+
+#: fe-connect.c:4797
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "LDAPサーバで検索に失敗しました: %s\n"
+
+#: fe-connect.c:4808
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "LDAP検索結果が複数ありました\n"
+
+#: fe-connect.c:4809 fe-connect.c:4821
+msgid "no entry found on LDAP lookup\n"
+msgstr "LDAP検索結果が空でした\n"
+
+#: fe-connect.c:4832 fe-connect.c:4845
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "LDAP検索で属性に値がありませんでした\n"
+
+#: fe-connect.c:4897 fe-connect.c:4916 fe-connect.c:5448
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "接続情報文字列において\"%s\"の後に\"=\"がありませんでした\n"
+
+#: fe-connect.c:4989 fe-connect.c:5633 fe-connect.c:6407
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "接続オプション\"%s\"は不正です\n"
+
+#: fe-connect.c:5005 fe-connect.c:5497
+msgid "unterminated quoted string in connection info string\n"
+msgstr "接続情報文字列において閉じていない引用符がありました\n"
+
+#: fe-connect.c:5088
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "サービス定義\"%s\"がみつかりません\n"
+
+#: fe-connect.c:5111
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "サービスファイル\"%s\"がみつかりません\n"
+
+#: fe-connect.c:5126
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "サービスファイル\"%2$s\"の行%1$dが長すぎます。\n"
+
+#: fe-connect.c:5198 fe-connect.c:5242
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "サービスファイル\"%s\"の行%dに構文エラーがあります\n"
+
+#: fe-connect.c:5209
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "サービスファイル\"%s\"ではネストしたサービス指定はサポートされていません、行%d\n"
+
+#: fe-connect.c:5929
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "内部パーサ処理へ伝わった不正なURI: \"%s\"\n"
+
+#: fe-connect.c:6006
+#, 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:6013
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "URI \"%s\"内のIPv6ホストアドレスが空である可能性があります\n"
+
+#: fe-connect.c:6028
+#, 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:6157
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "URI問い合わせパラメータ内に余分なキーと値を分ける\"=\"があります: \"%s\"\n"
+
+#: fe-connect.c:6177
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "URI問い合わせパラメータ内にキーと値を分ける\\\"=\\\"がありません: \"%s\"\n"
+
+#: fe-connect.c:6228
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "不正なURI問い合わせパラメータ:\"%s\"\n"
+
+#: fe-connect.c:6302
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "不正なパーセント符号化トークン: \"%s\"\n"
+
+#: fe-connect.c:6312
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "パーセント符号化された値では%%00値は許されません: \"%s\"\n"
+
+#: fe-connect.c:6675
+msgid "connection pointer is NULL\n"
+msgstr "接続ポインタはNULLです\n"
+
+#: fe-connect.c:6974
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "WARNING: パスワードファイル\"%s\"がテキストファイルではありません\n"
+
+#: fe-connect.c:6983
+#, 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:7024
+#, c-format
+msgid "WARNING: line %d too long in password file \"%s\"\n"
+msgstr "警告: パスワードファイル\"%2$s\"中の行%1$dが長すぎます\n"
+
+#: fe-connect.c:7103
+#, 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は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 "コマンド文字列がヌルポインタです\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 "文の名前がヌルポインタです\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.0が必要です\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 "想定外のasyncStatus: %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 "PGresutがエラー結果ではありません\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 "ラージオブジェクト機能を初期化する問い合わせがデータを返しませんでした\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_creat関数の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:276
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "サイズ%luの整数はpqGetIntでサポートされていません"
+
+#: fe-misc.c:312
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "サイズ%luの整数はpqPutIntでサポートされていません"
+
+#: fe-misc.c:623 fe-misc.c:856
+msgid "connection not open\n"
+msgstr "接続はオープンされていません\n"
+
+#: fe-misc.c:792 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"
+" おそらく要求の処理前または処理中にサーバが異常終了\n"
+" したことを意味しています。\n"
+
+#: fe-misc.c:1050
+msgid "timeout expired\n"
+msgstr "タイムアウト期間が過ぎました\n"
+
+#: fe-misc.c:1095
+msgid "invalid socket\n"
+msgstr "不正なソケットです\n"
+
+#: fe-misc.c:1118
+#, 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 "setenv状態%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 "待機中にサーバからメッセージ種類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 "サーバが事前の行記述(\"T\"メッセージ)なしにデータ(\"D\"メッセージ)を送信しました"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "サーバが事前の行記述(\"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 "サーバが事前の行記述(\"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 "DETAIL: %s\n"
+
+#: fe-protocol3.c:1091
+#, c-format
+msgid "HINT: %s\n"
+msgstr "HINT: %s\n"
+
+#: fe-protocol3.c:1094
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "QUERY: %s\n"
+
+#: fe-protocol3.c:1101
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "CONTEXT: %s\n"
+
+#: fe-protocol3.c:1110
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "SCHEMA NAME: %s\n"
+
+#: fe-protocol3.c:1114
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABLE NAME: %s\n"
+
+#: fe-protocol3.c:1118
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "COLUMN NAME: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATATYPE NAME: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "CONSTRAINT NAME: %s\n"
+
+#: fe-protocol3.c:1138
+msgid "LOCATION: "
+msgstr "LOCATION: "
+
+#: 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: テキストの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セキュリティコンテキストを初期化できませんでした"
+
+#: fe-secure-gssapi.c:673
+msgid "GSSAPI size check error"
+msgstr "GSSAPIサイズチェックエラー"
+
+#: fe-secure-gssapi.c:684
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPIコンテクスト確立エラー"
+
+#: 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 "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:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "SSLコンテキストを作成できませんでした: %s\n"
+
+#: fe-secure-openssl.c:854
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "不正なSSLプロトコル最小バージョンの値\"%s\"\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 "不正なSSLプロトコル最大バージョンの値\"%s\"\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"
+
+#~ msgid "SSL library does not support CRL certificates (file \"%s\")\n"
+#~ msgstr "SSLライブラリがCRL証明書(\"%s\")をオープンできませんでした\n"
+
+#~ msgid "invalid target_session_attrs value: \"%s\"\n"
+#~ msgstr "target_session_attrsの値が不正です: \"%s\"\n"
+
+#~ msgid "invalid gssencmode value: \"%s\"\n"
+#~ msgstr "gssencmodeの値が不正です: \"%s\"\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..ac21a95
--- /dev/null
+++ b/src/interfaces/libpq/po/ru.po
@@ -0,0 +1,1402 @@
+# 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.
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL current)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2021-01-26 17:52+0300\n"
+"PO-Revision-Date: 2020-09-07 15:43+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: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 "не удалось сгенерировать разовый код\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:2957 fe-connect.c:4605 fe-connect.c:4861
+#: fe-connect.c:4980 fe-connect.c:5233 fe-connect.c:5313 fe-connect.c:5412
+#: fe-connect.c:5668 fe-connect.c:5697 fe-connect.c:5769 fe-connect.c:5793
+#: fe-connect.c:5811 fe-connect.c:5912 fe-connect.c:5921 fe-connect.c:6277
+#: fe-connect.c:6427 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 "не удалось оформить разовый код\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "не удалось закодировать подтверждение клиента\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 ""
+"сервер предложил аутентификацию SCRAM-SHA-256-PLUS для соединения, не "
+"защищённого SSL\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 ""
+"c сервера получено сообщение 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 "аутентификация Crypt не поддерживается\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 "найти локального пользователя по идентификатору (%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) со значениями hostaddr (%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 "значение sslmode \"%s\" недопустимо для сборки без поддержки SSL\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 ""
+"значение gssencmode \"%s\" недопустимо для сборки без поддержки GSSAPI\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-передачи без задержки: %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соединения через Unix-сокет \"%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 и принимает TCP-соединения (порт %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 ""
+"не удалось подключиться к серверу: %s\n"
+"\tОн действительно работает по адресу \"%s\"\n"
+"\t и принимает TCP-соединения (порт %s)?\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 "длина пути Unix-сокета \"%s\" превышает предел (%d байт)\n"
+
+#: fe-connect.c:2436
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "преобразовать путь Unix-сокета \"%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 "не удалось перевести сокет в неблокирующий режим: %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 ""
+"requirepeer допускает подключение только к \"%s\", но сервер работает под "
+"именем \"%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:2931
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "не удалось отправить пакет согласования SSL: %s\n"
+
+#: fe-connect.c:2970
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "не удалось отправить стартовый пакет: %s\n"
+
+#: fe-connect.c:3040
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "затребовано подключение через SSL, но сервер не поддерживает SSL\n"
+
+#: fe-connect.c:3067
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "получен неверный ответ при согласовании SSL: %c\n"
+
+#: fe-connect.c:3156
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "затребовано шифрование GSSAPI, но сервер его не поддерживает\n"
+
+#: fe-connect.c:3168
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "получен неверный ответ при согласовании GSSAPI: %c\n"
+
+#: fe-connect.c:3234 fe-connect.c:3265
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "ожидался запрос аутентификации от сервера, но получено: %c\n"
+
+#: fe-connect.c:3506
+msgid "unexpected message from server during startup\n"
+msgstr "неожиданное сообщение от сервера в начале работы\n"
+
+#: fe-connect.c:3711
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr ""
+"не удалось установить подключение для чтения/записи к серверу \"%s:%s\"\n"
+
+#: fe-connect.c:3757
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr ""
+"проверка \"SHOW transaction_read_only\" не пройдена на сервере \"%s:%s\"\n"
+
+#: fe-connect.c:3772
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "неверное состояние соединения %d - возможно разрушение памяти\n"
+
+#: fe-connect.c:4211 fe-connect.c:4271
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "ошибка в PGEventProc \"%s\" при обработке события PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4618
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "некорректный адрес LDAP \"%s\": схема должна быть ldap://\n"
+
+#: fe-connect.c:4633
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "некорректный адрес LDAP \"%s\": отсутствует уникальное имя\n"
+
+#: fe-connect.c:4645 fe-connect.c:4700
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "некорректный адрес LDAP \"%s\": должен быть только один атрибут\n"
+
+#: fe-connect.c:4656 fe-connect.c:4715
+#, 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:4667
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "некорректный адрес LDAP \"%s\": нет фильтра\n"
+
+#: fe-connect.c:4688
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "некорректный адрес LDAP \"%s\": неверный номер порта\n"
+
+#: fe-connect.c:4724
+msgid "could not create LDAP structure\n"
+msgstr "не удалось создать структуру LDAP\n"
+
+#: fe-connect.c:4800
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "ошибка поиска на сервере LDAP: %s\n"
+
+#: fe-connect.c:4811
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "при поиске LDAP найдено более одного вхождения\n"
+
+#: fe-connect.c:4812 fe-connect.c:4824
+msgid "no entry found on LDAP lookup\n"
+msgstr "при поиске LDAP ничего не найдено\n"
+
+#: fe-connect.c:4835 fe-connect.c:4848
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "атрибут не содержит значений при поиске LDAP\n"
+
+#: fe-connect.c:4900 fe-connect.c:4919 fe-connect.c:5451
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "в строке соединения нет \"=\" после \"%s\"\n"
+
+#: fe-connect.c:4992 fe-connect.c:5636 fe-connect.c:6410
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "неверный параметр соединения \"%s\"\n"
+
+#: fe-connect.c:5008 fe-connect.c:5500
+msgid "unterminated quoted string in connection info string\n"
+msgstr "в строке соединения не хватает закрывающей кавычки\n"
+
+#: fe-connect.c:5091
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "определение службы \"%s\" не найдено\n"
+
+#: fe-connect.c:5114
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "файл определений служб \"%s\" не найден\n"
+
+#: fe-connect.c:5129
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "слишком длинная строка (%d) в файле определений служб \"%s\"\n"
+
+#: fe-connect.c:5201 fe-connect.c:5245
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "синтаксическая ошибка в файле определения служб \"%s\" (строка %d)\n"
+
+#: fe-connect.c:5212
+#, c-format
+msgid ""
+"nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr ""
+"рекурсивные определения служб не поддерживаются (файл определения служб \"%s"
+"\", строка %d)\n"
+
+#: fe-connect.c:5932
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "во внутреннюю процедуру разбора строки передан ошибочный URI: \"%s\"\n"
+
+#: fe-connect.c:6009
+#, 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:6016
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "IPv6, содержащийся в URI, не может быть пустым: \"%s\"\n"
+
+#: fe-connect.c:6031
+#, c-format
+msgid ""
+"unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): "
+"\"%s\"\n"
+msgstr ""
+"неожиданный символ \"%c\" в позиции %d в URI (ожидалось \":\" или \"/\"): "
+"\"%s\"\n"
+
+#: fe-connect.c:6160
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "лишний разделитель ключа/значения \"=\" в параметрах URI: \"%s\"\n"
+
+#: fe-connect.c:6180
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "в параметрах URI не хватает разделителя ключа/значения \"=\": \"%s\"\n"
+
+#: fe-connect.c:6231
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "неверный параметр в URI: \"%s\"\n"
+
+#: fe-connect.c:6305
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "неверный символ, закодированный с %%: \"%s\"\n"
+
+#: fe-connect.c:6315
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "недопустимое значение %%00 для символа, закодированного с %%: \"%s\"\n"
+
+#: fe-connect.c:6678
+msgid "connection pointer is NULL\n"
+msgstr "нулевой указатель соединения\n"
+
+#: fe-connect.c:6974
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ПРЕДУПРЕЖДЕНИЕ: файл паролей \"%s\" - не обычный файл\n"
+
+#: fe-connect.c:6983
+#, 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:7091
+#, 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 вне диапазона 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 "указатель на командную строку нулевой\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 "указатель на имя оператора нулевой\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.0\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 "неожиданный asyncStatus: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "ошибка в PGEventProc \"%s\" при обработке события PGEVT_RESULTCREATE\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "операция COPY прервана вызовом PQexec"
+
+#: 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 "вызов PQexec не допускается в процессе 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 не выполняется\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 "не удалось определить OID функции lo_truncate\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 "не удалось определить OID функции lo_truncate64\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 "не удалось определить OID функции lo_lseek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "не удалось определить OID функции lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "не удалось определить OID функции lo_tell64\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 "запрос инициализации функций для больших объектов не вернул данные\n"
+
+#: fe-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "не удалось определить OID функции lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "не удалось определить OID функции lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "не удалось определить OID функции lo_creat\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "не удалось определить OID функции lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "не удалось определить OID функции lo_lseek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "не удалось определить OID функции lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "не удалось определить OID функции loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "не удалось определить OID функции lowrite\n"
+
+#: fe-misc.c:289
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "функция pqGetInt не поддерживает integer размером %lu байт"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "функция pqPutInt не поддерживает integer размером %lu байт"
+
+#: 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 "неверное состояние setenv %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 "от сервера во время простоя получено сообщение типа 0x%02x"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "неожиданный символ %c вслед за пустым ответом (сообщение \"I\")"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid ""
+"server sent data (\"D\" message) without prior row description (\"T\" "
+"message)"
+msgstr ""
+"сервер отправил данные (сообщение \"D\") без предварительного описания "
+"строки (сообщение \"T\")"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid ""
+"server sent binary data (\"B\" message) without prior row description (\"T\" "
+"message)"
+msgstr ""
+"сервер отправил двоичные данные (сообщение \"B\") без предварительного "
+"описания строки (сообщение \"T\")"
+
+#: 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 ""
+"сервер отправил данные (сообщение \"D\") без предварительного описания "
+"строки (сообщение \"T\")\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 можно вызывать только во время COPY OUT с текстом\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: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 "не удалось найти алгоритм хеширования по 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:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "не удалось создать контекст SSL: %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 ENGINE \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1119
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "не удалось инициализировать модуль 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 "не удалось прочитать закрытый ключ 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"
+
+#~ 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..6d7f4aa
--- /dev/null
+++ b/src/interfaces/libpq/po/sv.po
@@ -0,0 +1,1294 @@
+# 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.
+#
+# Use these quotes: "%s"
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-08-27 21:39+0000\n"
+"PO-Revision-Date: 2020-08-30 07:05+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:212
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "felaktigt SCRAM-meddelande (tomt meddelande)\n"
+
+#: fe-auth-scram.c:218
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "felaktigt SCRAM-meddelande (längden stämmer inte)\n"
+
+#: fe-auth-scram.c:265
+msgid "incorrect server signature\n"
+msgstr "felaktig serversignatur\n"
+
+#: fe-auth-scram.c:274
+msgid "invalid SCRAM exchange state\n"
+msgstr "ogiltig SCRAM-utbytesstatus\n"
+
+#: fe-auth-scram.c:296
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "felaktigt SCRAM-meddelande (förväntade attribut %c)\n"
+
+#: fe-auth-scram.c:305
+#, 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:346
+msgid "could not generate nonce\n"
+msgstr "kunde inte skapa engångsnummer\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 "slut på minne\n"
+
+#: fe-auth-scram.c:364
+msgid "could not encode nonce\n"
+msgstr "kunde inte koda engångsnummer\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "kunde inte koda klientbevis\n"
+
+#: fe-auth-scram.c:618
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "ogiltigt SCRAM-svar (engångsnummer matchar inte)\n"
+
+#: fe-auth-scram.c:651
+msgid "malformed SCRAM message (invalid salt)\n"
+msgstr "felaktigt SCRAM-meddelande (ogiltigt salt)\n"
+
+#: fe-auth-scram.c:665
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "felaktigt SCRAM-meddelande (ogiltig iterationsräknare)\n"
+
+#: fe-auth-scram.c:671
+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:702
+#, 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:718
+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:737
+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:388 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:349
+msgid "duplicate SSPI authentication request\n"
+msgstr "duplicerad autentiseringsbegäran från SSPI\n"
+
+#: fe-auth.c:374
+msgid "could not acquire SSPI credentials"
+msgstr "kunde inte hämta SSPI-referenser"
+
+#: fe-auth.c:429
+msgid "channel binding required, but SSL not in use\n"
+msgstr "kräver kanalbindning, men SSL används inte\n"
+
+#: fe-auth.c:436
+msgid "duplicate SASL authentication request\n"
+msgstr "duplicerad autentiseringsbegäran från SASL\n"
+
+#: fe-auth.c:492
+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:509
+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:521
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "ingen av serverns SASL-autentiseringsmekanismer stöds\n"
+
+#: fe-auth.c:529
+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:635
+#, 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:660
+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:737
+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:875
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Kerberos-4-autentisering stöds ej\n"
+
+#: fe-auth.c:880
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Kerberos-5-autentisering stöds ej\n"
+
+#: fe-auth.c:951
+msgid "GSSAPI authentication not supported\n"
+msgstr "GSSAPI-autentisering stöds ej\n"
+
+#: fe-auth.c:983
+msgid "SSPI authentication not supported\n"
+msgstr "SSPI-autentisering stöds ej\n"
+
+#: fe-auth.c:991
+msgid "Crypt authentication not supported\n"
+msgstr "Crypt-autentisering stöds ej\n"
+
+#: fe-auth.c:1057
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "autentiseringsmetod %u stöds ej\n"
+
+#: fe-auth.c:1104
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "misslyckad sökning efter användarnamn: felkod %lu\n"
+
+#: fe-auth.c:1114 fe-connect.c:2834
+#, 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:1119 fe-connect.c:2839
+#, 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:1221
+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:1230
+msgid "password_encryption value too long\n"
+msgstr "password_encryption-värdet är för långt\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "okänd lösenordskrypteringsalgoritm \"%s\"\n"
+
+#: fe-connect.c:1075
+#, 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:1156
+#, 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:1249
+#, c-format
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "ogiltigt channel_binding-värde: \"%s\"\n"
+
+#: fe-connect.c:1275
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "ogiltigt värde för ssl-läge: \"%s\"\n"
+
+#: fe-connect.c:1296
+#, 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:1317
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "ogiltigt ssl_min_protocol_version-värde: \"%s\"\n"
+
+#: fe-connect.c:1325
+#, c-format
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "ogiltigt ssl_max_protocol_version-värde: \"%s\"\n"
+
+#: fe-connect.c:1342
+msgid "invalid SSL protocol version range\n"
+msgstr "ogiltigt intervall för SSL-protokollversion\n"
+
+#: fe-connect.c:1357
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "ogiltigt värde för gssencmode: \"%s\"\n"
+
+#: fe-connect.c:1366
+#, 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:1401
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "ogiltigt target_session_attrs-värde: \"%s\"\n"
+
+#: fe-connect.c:1619
+#, 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: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 ""
+"kan inte ansluta till servern: %s\n"
+"\tKör servern på lokalt och accepterar den\n"
+"\tanslutningar på Unix-uttaget \"%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 ""
+"kunde inte ansluta till servern: %s\n"
+"\tKör servern på värden \"%s\" (%s) och accepterar\n"
+"\tden TCP/IP-uppkopplingar på port %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 ""
+"kunde inte ansluta till servern: %s\n"
+"\tKör servern på värden \"%s\" och accepterar\n"
+"\tden TCP/IP-uppkopplingar på porten %s?\n"
+
+#: fe-connect.c:1795
+#, 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: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) misslyckades: %s\n"
+
+#: fe-connect.c:1947
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) misslyckades: %ui\n"
+
+#: fe-connect.c:2313
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "ogiltigt förbindelsetillstånd, antagligen korrupt minne\n"
+
+#: fe-connect.c:2379
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "ogiltigt portnummer \"%s\"\n"
+
+#: fe-connect.c:2395
+#, 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:2408
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "kunde inte parsa nätverksadress \"%s\": %s\n"
+
+#: fe-connect.c:2421
+#, 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:2436
+#, 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:2560
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "kan inte skapa uttag: %s\n"
+
+#: fe-connect.c:2582
+#, 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:2592
+#, 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:2610
+msgid "keepalives parameter must be an integer\n"
+msgstr "keepalives-parameter måste vara ett heltal\n"
+
+#: fe-connect.c:2750
+#, 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:2778
+#, 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:2820
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "requirepeer-parameter stöds inte på denna plattform\n"
+
+#: fe-connect.c:2823
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "kunde inte hämta andra sidans referenser: %s\n"
+
+#: fe-connect.c:2847
+#, 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:2887
+#, 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:2899
+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:2926
+#, 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:2965
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "kan inte skicka startpaketet: %s\n"
+
+#: fe-connect.c:3035
+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:3061
+#, 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:3151
+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:3162
+#, 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:3229 fe-connect.c:3260
+#, 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:3502
+msgid "unexpected message from server during startup\n"
+msgstr "oväntat meddelande från servern under starten\n"
+
+#: fe-connect.c:3707
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "kunde inte upprätta en skrivbar anslutning till 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\" misslyckades på server \"%s:%s\"\n"
+
+#: fe-connect.c:3768
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "ogiltigt förbindelsetillstånd %d, antagligen korrupt minne\n"
+
+#: fe-connect.c:4204 fe-connect.c:4264
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc \"%s\" misslyckades under PGEVT_CONNRESET-händelse\n"
+
+#: fe-connect.c:4611
+#, 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:4626
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "ogiltig LDAP URL \"%s\": saknar urskiljbart namn\n"
+
+#: fe-connect.c:4638 fe-connect.c:4693
+#, 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:4649 fe-connect.c:4708
+#, 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:4660
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "ogiltigt LDAP URL \"%s\": inget filter\n"
+
+#: fe-connect.c:4681
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "ogiltig LDAP URL \"%s\": ogiltigt portnummer\n"
+
+#: fe-connect.c:4717
+msgid "could not create LDAP structure\n"
+msgstr "kunde inte skapa LDAP-struktur\n"
+
+#: fe-connect.c:4793
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "uppslagning av LDAP-server misslyckades: %s\n"
+
+#: fe-connect.c:4804
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "mer än en post hittad i LDAP-uppslagning\n"
+
+#: fe-connect.c:4805 fe-connect.c:4817
+msgid "no entry found on LDAP lookup\n"
+msgstr "ingen post hittad i LDAP-uppslagning\n"
+
+#: fe-connect.c:4828 fe-connect.c:4841
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "attributet har inga värden i LDAP-uppslagning\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 "\"=\" efter \"%s\" saknas i förbindelseinfosträng\n"
+
+#: fe-connect.c:4985 fe-connect.c:5629 fe-connect.c:6403
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "ogiltig förbindelseparameter \"%s\"\n"
+
+#: fe-connect.c:5001 fe-connect.c:5493
+msgid "unterminated quoted string in connection info string\n"
+msgstr "icke terminerad sträng i uppkopplingsinformationen\n"
+
+#: fe-connect.c:5084
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "definition av service \"%s\" hittades inte\n"
+
+#: fe-connect.c:5107
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "servicefil \"%s\" hittades inte\n"
+
+#: fe-connect.c:5122
+#, 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:5194 fe-connect.c:5238
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "syntaxfel i servicefel \"%s\", rad %d\n"
+
+#: fe-connect.c:5205
+#, 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:5925
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "ogiltig URI propagerad till intern parsningsrutin: \"%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 "nådde slutet på strängen när vi letade efter matchande \"]\" i IPv6-värdadress i URI: \"%s\"\n"
+
+#: fe-connect.c:6009
+#, 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:6024
+#, 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:6153
+#, 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:6173
+#, 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:6224
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "ogiltig URI-frågeparameter: \"%s\"\n"
+
+#: fe-connect.c:6298
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "ogiltigt procent-kodad symbol: \"%s\"\n"
+
+#: fe-connect.c:6308
+#, 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:6671
+msgid "connection pointer is NULL\n"
+msgstr "anslutningspekare är NULL\n"
+
+#: fe-connect.c:6970
+#, 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:6979
+#, 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:7020
+#, c-format
+msgid "WARNING: line %d too long in password file \"%s\"\n"
+msgstr "VARNING: rad %d för lång i lösenordsfil \"%s\"\n"
+
+#: fe-connect.c:7099
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "lösenord hämtat från fil \"%s\"\n"
+
+#: fe-exec.c:444 fe-exec.c:2821
+#, 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: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 "slut på minne"
+
+#: 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 "skrivning till servern misslyckades\n"
+
+#: fe-exec.c:896
+msgid "NOTICE"
+msgstr "NOTIS"
+
+#: fe-exec.c:954
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult stöder inte mer än INT_MAX tupler"
+
+#: fe-exec.c:966
+msgid "size_t overflow"
+msgstr "size_t-överspill"
+
+#: fe-exec.c:1243 fe-exec.c:1301 fe-exec.c:1347
+msgid "command string is a null pointer\n"
+msgstr "kommandosträngen är en null-pekare\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 "antal parametrar måste bara mellan 0 och 65535\n"
+
+#: fe-exec.c:1341 fe-exec.c:1442
+msgid "statement name is a null pointer\n"
+msgstr "satsens namn är en null-pekare\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 "funktionen kräver minst protokollversion 3.0\n"
+
+#: fe-exec.c:1479
+msgid "no connection to the server\n"
+msgstr "inte förbunden till servern\n"
+
+#: fe-exec.c:1486
+msgid "another command is already in progress\n"
+msgstr "ett annat kommando pågår redan\n"
+
+#: fe-exec.c:1600
+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:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "oväntad asyncStatus: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc \"%s\" misslyckades under PGEVT_RESULTCREATE-händelse\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY terminerad av ny PQexec"
+
+#: fe-exec.c:2051
+msgid "COPY IN state must be terminated first\n"
+msgstr "COPY IN-läge måste avslutas först\n"
+
+#: fe-exec.c:2071
+msgid "COPY OUT state must be terminated first\n"
+msgstr "COPY OUT-läge måste avslutas först\n"
+
+#: fe-exec.c:2079
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec tillåts inte under 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 "ingen COPY pågår\n"
+
+#: fe-exec.c:2672
+msgid "connection in wrong state\n"
+msgstr "förbindelse i felaktigt tillstånd\n"
+
+#: fe-exec.c:2703
+msgid "invalid ExecStatusType code"
+msgstr "ogiltig ExecStatusType-kod"
+
+#: fe-exec.c:2730
+msgid "PGresult is not an error result\n"
+msgstr "PGresult är inte ett felresultat\n"
+
+#: fe-exec.c:2805 fe-exec.c:2828
+#, 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:2843
+#, 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:3153
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "kunde inte tolka svaret från servern: %s"
+
+#: fe-exec.c:3392 fe-exec.c:3476
+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:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "kan inte ta reda på OID för funktionen lo_truncate\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "argumentet till lo_truncate överskrider heltalsintervallet\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "kan inte ta reda på OID för funktionen lo_truncate64\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "ett argument till lo_read överskriver heltalsintervallet\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "ett argument till lo_write överskriver heltalsintervallet\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "kan inte ta reda på OID för funktionen lo_lseek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "kan inte ta reda på OID för funktionen lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "kan inte ta reda på OID för funktionen lo_tell64\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "kan inte öppna fil \"%s\": %s\n"
+
+#: fe-lobj.c:761
+#, 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:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "kan inte skriva till fil \"%s\": %s\n"
+
+#: fe-lobj.c:946
+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-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "kan inte ta reda på OID för funktionen lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "kan inte ta reda på OID för funktionen lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "kan inte ta reda på OID för funktionen lo_create\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "kan inte ta reda på OID för funktionen lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "kan inte ta reda på OID för funktionen lo_lseek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "kan inte ta reda på OID för funktionen lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "kan inte ta reda på OID för funktionen loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "kan inte ta reda på OID för funktionen lowrite\n"
+
+#: fe-misc.c:289
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "heltal med storlek %lu stöds inte av pqGetInt"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "heltal med storlek %lu stöds inte av pqPutInt"
+
+#: fe-misc.c:636 fe-misc.c:869
+msgid "connection not open\n"
+msgstr "förbindelse inte öppen\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 ""
+"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:1063
+msgid "timeout expired\n"
+msgstr "timeout utgången\n"
+
+#: fe-misc.c:1108
+msgid "invalid socket\n"
+msgstr "ogiltigt uttag\n"
+
+#: fe-misc.c:1131
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() misslyckades: %s\n"
+
+#: fe-protocol2.c:87
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "ogiltigt setenv-tillstånd %c, indikerar troligen ett minnesfel\n"
+
+#: fe-protocol2.c:384
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "ogiltigt tillstånd %c, indikerar troligen ett minnesfel\n"
+
+#: fe-protocol2.c:473 fe-protocol3.c:183
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "meddelandetyp 0x%02x kom från server under viloperiod"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "oväntat tecken %c följer på ett tomt frågesvar (meddelande \"I\")"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "servern skickade data (meddelande \"D\") utan föregående radbeskrivning (meddelande \"T\")"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "servern skickade binärdata (meddelande \"B\") utan föregående radbeskrivning (meddelande \"T\")"
+
+#: fe-protocol2.c:626 fe-protocol3.c:408
+#, 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-protocol2.c:755 fe-protocol2.c:930 fe-protocol3.c:622 fe-protocol3.c:849
+msgid "out of memory for query result"
+msgstr "slut på minnet för frågeresultat"
+
+#: fe-protocol2.c:1408
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "tappade synkronisering med servern, startar o, uppkopplingen"
+
+#: fe-protocol2.c:1530 fe-protocol2.c:1562 fe-protocol3.c:2095
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "protokollfel: id=0x%x\n"
+
+#: fe-protocol3.c:365
+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:429
+#, 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:449
+#, 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:500 fe-protocol3.c:540
+msgid "insufficient data in \"T\" message"
+msgstr "otillräckligt med data i \"T\"-meddelande"
+
+#: fe-protocol3.c:573
+msgid "extraneous data in \"T\" message"
+msgstr "extra data i \"T\"-meddelande"
+
+#: fe-protocol3.c:686
+msgid "extraneous data in \"t\" message"
+msgstr "extra data i \"t\"-meddelande"
+
+#: fe-protocol3.c:757 fe-protocol3.c:789 fe-protocol3.c:807
+msgid "insufficient data in \"D\" message"
+msgstr "otillräckligt med data i \"D\"-meddelande"
+
+#: fe-protocol3.c:763
+msgid "unexpected field count in \"D\" message"
+msgstr "oväntat fältantal i \"D\"-meddelande"
+
+#: fe-protocol3.c:816
+msgid "extraneous data in \"D\" message"
+msgstr "extra data i \"D\"-meddelande"
+
+#: fe-protocol3.c:1008
+msgid "no error message available\n"
+msgstr "inget felmeddelande finns tillgängligt\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1056 fe-protocol3.c:1075
+#, c-format
+msgid " at character %s"
+msgstr " vid tecken %s"
+
+#: fe-protocol3.c:1088
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "DETALJ: %s\n"
+
+#: fe-protocol3.c:1091
+#, c-format
+msgid "HINT: %s\n"
+msgstr "TIPS: %s\n"
+
+#: fe-protocol3.c:1094
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "FRÅGA: %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 "SCHEMANAMN: %s\n"
+
+#: fe-protocol3.c:1114
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABELLNAMN: %s\n"
+
+#: fe-protocol3.c:1118
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "KOLUMNNAMN: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "DATATYPNAMN: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "VILLKORSNAMN: %s\n"
+
+#: fe-protocol3.c:1138
+msgid "LOCATION: "
+msgstr "PLATS: "
+
+#: 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 "RAD %d: "
+
+#: fe-protocol3.c:1732
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: utför inte text-COPY OUT\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:673
+msgid "GSSAPI size check error"
+msgstr "GSSAPI-fel vid kontroll av storlek"
+
+#: fe-secure-gssapi.c:684
+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:1291
+#, 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:1295
+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:1304
+#, 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:1354
+#, 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 namn saknas\n"
+
+#: fe-secure-openssl.c:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "kan inte skapa SSL-omgivning: %s\n"
+
+#: fe-secure-openssl.c:854
+#, 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:865
+#, 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:883
+#, 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:894
+#, 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:930
+#, 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: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 ""
+"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: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 ""
+"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:1009
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "kunde inte öppna certifikatfil \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1028
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "kunde inte läsa certifikatfil \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1053
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "kan inte skapa SSL-förbindelse: %s\n"
+
+#: fe-secure-openssl.c:1107
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "kunde inte ladda SSL-motor \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1119
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "kunde inte initiera SSL-motor \"%s\": %s\n"
+
+#: fe-secure-openssl.c:1135
+#, 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:1149
+#, 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:1186
+#, 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:1194
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "privata nyckelfilen \"%s\" har läsrättigheter för gruppen eller världen; rättigheten skall vara u=rw (0600) eller mindre\n"
+
+#: fe-secure-openssl.c:1219
+#, 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:1237
+#, 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:1337
+#, 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:1373
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "certifikatet kunde inte hämtas: %s\n"
+
+#: fe-secure-openssl.c:1462
+#, c-format
+msgid "no SSL error reported"
+msgstr "inget SSL-fel rapporterat"
+
+#: fe-secure-openssl.c:1471
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL-felkod %lu"
+
+#: fe-secure-openssl.c:1718
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "VARNING: sslpassword trunkerat\n"
+
+#: fe-secure.c:275
+#, 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:390
+#, 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"
+
+#~ msgid "could not set minimum version of SSL protocol: %s\n"
+#~ msgstr "kunde inte sätta minimal version för SSL-protokoll: %s\n"
+
+#~ msgid "could not set maximum version of SSL protocol: %s\n"
+#~ msgstr "kunde inte sätta maximal version för SSL-protokollet: %s\n"
diff --git a/src/interfaces/libpq/po/tr.po b/src/interfaces/libpq/po/tr.po
new file mode 100644
index 0000000..855dad7
--- /dev/null
+++ b/src/interfaces/libpq/po/tr.po
@@ -0,0 +1,1247 @@
+# translation of libpq.po to Turkish
+# Devrim GUNDUZ <devrim@CommandPrompt.com> 2004, 2005, 2006, 2007.
+# Nicolai TUFAR <ntufar@gmail.com> 2004, 2005, 2006, 2007.
+# Abdullah GÜLNER <agulner@gmail.com> 2017, 2018.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq-tr\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2019-05-05 21:38+0000\n"
+"PO-Revision-Date: 2019-06-14 10:49+0300\n"
+"Last-Translator: Abdullah GÜLNER\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"
+"X-Generator: Poedit 1.8.7.1\n"
+"X-Poedit-Basepath: /home/ntufar/pg/pgsql/src/interfaces/libpq\n"
+"X-Poedit-SearchPath-0: /home/ntufar/pg/pgsql/src/interfaces/libpq\n"
+
+#: fe-auth-scram.c:183
+msgid "malformed SCRAM message (empty message)\n"
+msgstr "hatalı SCRAM mesajı (boş mesaj)\n"
+
+#: fe-auth-scram.c:189
+msgid "malformed SCRAM message (length mismatch)\n"
+msgstr "hatalı SCRAM mesajı (uzunluk uyuşmazlığı)\n"
+
+#: fe-auth-scram.c:238
+msgid "incorrect server signature\n"
+msgstr "sunucu imzası yanlış\n"
+
+#: fe-auth-scram.c:247
+msgid "invalid SCRAM exchange state\n"
+msgstr "geçersiz SCRAM değişim durumu\n"
+
+#: fe-auth-scram.c:270
+#, c-format
+msgid "malformed SCRAM message (attribute \"%c\" expected)\n"
+msgstr "hatalı SCRAM mesajı (\"%c\" niteliği bekleniyor)\n"
+
+#: fe-auth-scram.c:279
+#, c-format
+msgid "malformed SCRAM message (expected character \"=\" for attribute \"%c\")\n"
+msgstr "hatalı SCRAM mesajı (\"%c\" niteliği için \"=\" karakteri bekleniyor)\n"
+
+#: fe-auth-scram.c:320
+msgid "could not generate nonce\n"
+msgstr "nonce oluşturulamadı\n"
+
+#: fe-auth-scram.c:328 fe-auth-scram.c:395 fe-auth-scram.c:517
+#: fe-auth-scram.c:537 fe-auth-scram.c:563 fe-auth-scram.c:577
+#: fe-auth-scram.c:619 fe-auth.c:290 fe-auth.c:360 fe-auth.c:395 fe-auth.c:581
+#: fe-auth.c:740 fe-auth.c:1052 fe-auth.c:1200 fe-connect.c:858
+#: fe-connect.c:1320 fe-connect.c:1496 fe-connect.c:2085 fe-connect.c:2108
+#: fe-connect.c:2830 fe-connect.c:4512 fe-connect.c:4764 fe-connect.c:4883
+#: fe-connect.c:5133 fe-connect.c:5213 fe-connect.c:5312 fe-connect.c:5568
+#: fe-connect.c:5597 fe-connect.c:5669 fe-connect.c:5693 fe-connect.c:5711
+#: fe-connect.c:5812 fe-connect.c:5821 fe-connect.c:6177 fe-connect.c:6327
+#: fe-exec.c:2748 fe-exec.c:3495 fe-exec.c:3660 fe-lobj.c:895
+#: fe-protocol2.c:1213 fe-protocol3.c:999 fe-protocol3.c:1703
+#: fe-secure-common.c:110 fe-secure-openssl.c:438 fe-secure-openssl.c:1025
+msgid "out of memory\n"
+msgstr "yetersiz bellek\n"
+
+#: fe-auth-scram.c:555
+msgid "invalid SCRAM response (nonce mismatch)\n"
+msgstr "geçersiz SCRAM cevabı (nonce uyuşmazlığı)\n"
+
+#: fe-auth-scram.c:594
+msgid "malformed SCRAM message (invalid iteration count)\n"
+msgstr "hatalı SCRAM mesajı (geçersiz iterasyon sayısı)\n"
+
+#: fe-auth-scram.c:600
+msgid "malformed SCRAM message (garbage at end of server-first-message)\n"
+msgstr "hatalı SCRAM mesajı (sunucu-ilk-mesajı sonunda anlamsız değer)\n"
+
+#: fe-auth-scram.c:630
+#, c-format
+msgid "error received from server in SCRAM exchange: %s\n"
+msgstr "SCRAM değişimi işleminde sunucudan hata alındı: %s\n"
+
+#: fe-auth-scram.c:646
+msgid "malformed SCRAM message (garbage at end of server-final-message)\n"
+msgstr "hatalı SCRAM mesajı (sunucu-son-mesajı sonunda anlamsız değer)\n"
+
+#: fe-auth-scram.c:654
+msgid "malformed SCRAM message (invalid server signature)\n"
+msgstr "hatalı SCRAM mesajı (geçersiz sunucu imzası)\n"
+
+#: fe-auth.c:77
+#, c-format
+msgid "out of memory allocating GSSAPI buffer (%d)\n"
+msgstr "GSSAPI tamponu ayrılırken yetersiz bellek hatası (%d)\n"
+
+#: fe-auth.c:132
+msgid "GSSAPI continuation error"
+msgstr "GSSAPI devam hatası"
+
+#: fe-auth.c:159 fe-auth.c:389 fe-secure-common.c:98
+msgid "host name must be specified\n"
+msgstr "sunucu adı belirtilmelidir\n"
+
+#: fe-auth.c:166
+msgid "duplicate GSS authentication request\n"
+msgstr "çift GSS yetkilendirme isteği\n"
+
+#: fe-auth.c:231
+#, c-format
+msgid "out of memory allocating SSPI buffer (%d)\n"
+msgstr "GSSAPI tamponu ayrılırken yetersiz bellek hatası (%d)\n"
+
+#: fe-auth.c:279
+msgid "SSPI continuation error"
+msgstr "SSPI devam hatası"
+
+#: fe-auth.c:350
+msgid "duplicate SSPI authentication request\n"
+msgstr "çift SSPI yetkilendirme isteği\n"
+
+#: fe-auth.c:375
+msgid "could not acquire SSPI credentials"
+msgstr "SSPI kimlik bilgileri alınamadı"
+
+#: fe-auth.c:429
+msgid "duplicate SASL authentication request\n"
+msgstr "çift SASL yetkilendirme isteği\n"
+
+#: fe-auth.c:487
+msgid "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection\n"
+msgstr ""
+"sunucu SSL'li olmayan bir bağlantı üzerinde SCRAM-SHA-256-PLUS kimlik doğrulaması önerdi\n"
+" \n"
+
+#: fe-auth.c:499
+msgid "none of the server's SASL authentication mechanisms are supported\n"
+msgstr "sunucunun SASL yetkilendirme mekanizmalarından hiçbiri desteklenmiyor\n"
+
+#: fe-auth.c:605
+#, c-format
+msgid "out of memory allocating SASL buffer (%d)\n"
+msgstr "SASL tamponu ayrılırken yetersiz bellek hatası (%d)\n"
+
+#: fe-auth.c:630
+msgid "AuthenticationSASLFinal received from server, but SASL authentication was not completed\n"
+msgstr "sunucudan AuthenticationSASLFinal alındı, fakat SASL yetkilendirmesi tamamlanmadı\n"
+
+#: fe-auth.c:707
+msgid "SCM_CRED authentication method not supported\n"
+msgstr "SCM_CRED yetkilendirme yöntemi desteklenmiyor.\n"
+
+#: fe-auth.c:798
+msgid "Kerberos 4 authentication not supported\n"
+msgstr "Kerberos 4 yetkilendirmesi desteklenmiyor\n"
+
+#: fe-auth.c:803
+msgid "Kerberos 5 authentication not supported\n"
+msgstr "Kerberos 5 yetkilendirmesi desteklenmiyor\n"
+
+#: fe-auth.c:874
+msgid "GSSAPI authentication not supported\n"
+msgstr "GSSAPI yetkilendirmesi desteklenmiyor\n"
+
+#: fe-auth.c:906
+msgid "SSPI authentication not supported\n"
+msgstr "SSPI yetkilendirmesi desteklenmiyor\n"
+
+#: fe-auth.c:914
+msgid "Crypt authentication not supported\n"
+msgstr "Crypt yetkilendirmesi desteklenmiyor\n"
+
+#: fe-auth.c:980
+#, c-format
+msgid "authentication method %u not supported\n"
+msgstr "%u yetkilendirme sistemi desteklenmiyor\n"
+
+#: fe-auth.c:1027
+#, c-format
+msgid "user name lookup failure: error code %lu\n"
+msgstr "kullanıcı adı arama başarısız: hata kodu %lu\n"
+
+#: fe-auth.c:1037 fe-connect.c:2717
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "yerel kullanıcı ID %d bulunamadı: %s\n"
+
+#: fe-auth.c:1042 fe-connect.c:2722
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "yerel kullanıcı ID %d mevcut değildir\n"
+
+#: fe-auth.c:1144
+msgid "unexpected shape of result set returned for SHOW\n"
+msgstr "SHOW için döndürülen sonuç kümesi beklenmeyen şekilde \n"
+
+#: fe-auth.c:1153
+msgid "password_encryption value too long\n"
+msgstr "parola şifreleme (password_encryption) değeri çok uzun\n"
+
+#: fe-auth.c:1193
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "bilinmeyen parola şifreleme algoritması \"%s\"\n"
+
+#: fe-connect.c:1041
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "%d sunucu adları %d sunucu adresleriyle eşleştirilemedi\n"
+
+#: fe-connect.c:1117
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "%d kapı (port) numaraları %d sunucuları ile eşleştirilemedi\n"
+
+#: fe-connect.c:1213
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "geçersiz sslmode değeri: \"%s\"\n"
+
+#: fe-connect.c:1234
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "\"%s\" sslmode değeri, SSL desteği derlenmeyince geçersizdir\n"
+
+#: fe-connect.c:1258
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "geçersiz gssencmode değeri: \"%s\"\n"
+
+#: fe-connect.c:1268
+msgid "no GSSAPI support; cannot require GSSAPI\n"
+msgstr "GSSAPI desteği yok; GSSAPI gerektiremez\n"
+
+#: fe-connect.c:1302
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "geçersiz target_session_attrs değeri: \"%s\"\n"
+
+#: fe-connect.c:1520
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "soket TCP no delay moduna ayarlanamadı: %s\n"
+
+#: fe-connect.c:1583
+#, 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 ""
+"sunucuya bağlanılamadı: %s\n"
+"\tSunucu yerelde çalışıyor ve \"%s\" Unix domain\n"
+"\tsoketi üzerinden bağlantılara izin veriyor mu?\n"
+
+#: fe-connect.c:1620
+#, 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 ""
+"sunucuya bağlanılamadı: %s\n"
+"\tSunucu \"%s\" (%s) makinasında çalışıyor ve\n"
+"\t %s portundan TCP/IP bağlantılarına izin veriyor mu?\n"
+
+#: fe-connect.c:1628
+#, 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 ""
+"sunucuya bağlanılamadı: %s\n"
+"\tSunucu \"%s\" makiansında çalışıyor ve\n"
+"\t %s portundan TCP/IP bağlantılarına izin veriyor mu?\n"
+
+#: fe-connect.c:1679
+#, c-format
+msgid "invalid integer value \"%s\" for keyword \"%s\"\n"
+msgstr "\"%2$s\" anahtar kelimesi için geçersiz tamsayı değeri \"%1$s\"\n"
+
+#: fe-connect.c:1709 fe-connect.c:1743 fe-connect.c:1778 fe-connect.c:1865
+#: fe-connect.c:2507
+#, c-format
+msgid "setsockopt(%s) failed: %s\n"
+msgstr "setsockopt(%s) başarısız oldu: %s\n"
+
+#: fe-connect.c:1831
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "WSAIoctl(SIO_KEEPALIVE_VALS) başarısız oldu: %ui\n"
+
+#: fe-connect.c:2199
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "geçersiz bağlantı durumu, hafızanın zarar görmüş olmasının işareti olabilir\n"
+
+#: fe-connect.c:2267
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "geçersiz port numarası: \"%s\"\n"
+
+#: fe-connect.c:2283
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "\"%s\" makine adı bir adrese çevirilemedi: %s\n"
+
+#: fe-connect.c:2296
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "ağ adresi \"%s\" ayrıştırılamadı: %s\n"
+
+#: fe-connect.c:2309
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Unix-domain soket yolu \"%s\" çok uzun (azami %d bayt)\n"
+
+#: fe-connect.c:2324
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "\"%s\" Unix domain soket yolu adrese çevirilemedi: %s\n"
+
+#: fe-connect.c:2444
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "soket oluşturulamadı: %s\n"
+
+#: fe-connect.c:2466
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "soket bloklamasız ( non-blocking ) moda ayarlanamadı: %s\n"
+
+#: fe-connect.c:2476
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "soket close-on-exec moduna ayarlanamadı: %s\n"
+
+#: fe-connect.c:2494
+msgid "keepalives parameter must be an integer\n"
+msgstr "keepalives parametresi tamsayı olmalıdır\n"
+
+#: fe-connect.c:2634
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "soket hata durumu alınamadı: %s\n"
+
+#: fe-connect.c:2662
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "soketten istemci adresi alınamadı: %s\n"
+
+#: fe-connect.c:2704
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "bu platformda requirepeer parametresi desteklenmiyor \n"
+
+#: fe-connect.c:2707
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "karşı tarafın kimlik bilgileri alınamadı: %s \n"
+
+#: fe-connect.c:2730
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "requirepeer \"%s\" belirtiyor, ancak gerçek karşı taraf (peer) kullanıcı adı \"%s\"\n"
+
+#: fe-connect.c:2765
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "GSSAPI anlaşma (negotiation) paketi gönderilemedi: %s\n"
+
+#: fe-connect.c:2777
+msgid "GSSAPI encryption required, but was impossible (possibly no ccache, no server support, or using a local socket)\n"
+msgstr "GSSAPI şifrelemesi gerekli, fakat mümkün değil (muhtemelen ccache yok, sunucu desteği yok ya da yerel soket kullanılıyor)\n"
+
+#: fe-connect.c:2804
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "SSL anlaşma (negotiation) paketi gönderilemedi: %s\n"
+
+#: fe-connect.c:2843
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "başlangıç paketi gönderilemedi: %s\n"
+
+#: fe-connect.c:2913
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "sunucu SSL desteklemiyor, ama SSL gerekli idi\n"
+
+#: fe-connect.c:2939
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "ssl görüşmesine geçersiz yanıt alındı: %c\n"
+
+#: fe-connect.c:3029
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "sunucu GSSAPI şifrelemesi desteklemiyor, ama gerekli idi\n"
+
+#: fe-connect.c:3040
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "GSSAPI görüşmesine geçersiz yanıt alındı: %c\n"
+
+#: fe-connect.c:3108 fe-connect.c:3141
+#, c-format
+msgid "expected authentication request from server, but received %c\n"
+msgstr "sunucudan yetkilendirme isteği beklendi ancak %c alındı\n"
+
+#: fe-connect.c:3388
+msgid "unexpected message from server during startup\n"
+msgstr "başlangıç sırasında sunucudan beklenmeyen bir mesaj alındı\n"
+
+#: fe-connect.c:3615
+#, c-format
+msgid "could not make a writable connection to server \"%s:%s\"\n"
+msgstr "sunucuya yazılabilir (writable) bağlantı sağlanamadı \"%s:%s\"\n"
+
+#: fe-connect.c:3661
+#, c-format
+msgid "test \"SHOW transaction_read_only\" failed on server \"%s:%s\"\n"
+msgstr "\"SHOW transaction_read_only\" testi sunucuda başarısız oldu \"%s:%s\"\n"
+
+#: fe-connect.c:3676
+#, c-format
+msgid "invalid connection state %d, probably indicative of memory corruption\n"
+msgstr "%d - geçersiz bağlantı durumu, bellekteki veri zarar görmüş olabilir\n"
+
+#: fe-connect.c:4118 fe-connect.c:4178
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "PGEventProc \"%s\" işlemi PGEVT_CONNRESET işlemi sırasında başarısız oldu\n"
+
+#: fe-connect.c:4525
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "geçersiz LDAP URL \"%s\": şema, ldap:// ile başlamalıdir\n"
+
+#: fe-connect.c:4540
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "geçersiz LDAP URL \"%s\": distinguished isim eksik\n"
+
+#: fe-connect.c:4551 fe-connect.c:4604
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "geçersiz LDAP URL \"%s\": tam olarak bir nitelik (attribute) içermelidir\n"
+
+#: fe-connect.c:4561 fe-connect.c:4618
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have search scope (base/one/sub)\n"
+msgstr "geçersiz LDAP URL \"%s\": arama kapsamı içermelidir (base/one/sub)\n"
+
+#: fe-connect.c:4572
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "geçersiz LDAP URL \"%s\": filtre eksik\n"
+
+#: fe-connect.c:4593
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "geçersiz LDAP URL \"%s\": geçersiz port numarası\n"
+
+#: fe-connect.c:4627
+msgid "could not create LDAP structure\n"
+msgstr "LDAP yapısı oluşturma hatası\n"
+
+#: fe-connect.c:4703
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "LDAP sonucunda sorgulama hatası: %s\n"
+
+#: fe-connect.c:4714
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "LDAP sorgusu sonucunda birden fazla giriş bulundu\n"
+
+#: fe-connect.c:4715 fe-connect.c:4727
+msgid "no entry found on LDAP lookup\n"
+msgstr "LDAP sorgusu sonucunda hiçbir giriş bulunamadı\n"
+
+#: fe-connect.c:4738 fe-connect.c:4751
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "LDAP sorgusu sonucunda bulunan attribute, hiçbir değer içermiyor\n"
+
+#: fe-connect.c:4803 fe-connect.c:4822 fe-connect.c:5351
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "bağlantı bilgi katarında \"%s\" bilgisinden sonra \"=\" işareti eksik\n"
+
+#: fe-connect.c:4895 fe-connect.c:5536 fe-connect.c:6310
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "geçersiz bağlantı seçeneği \"%s\"\n"
+
+#: fe-connect.c:4911 fe-connect.c:5400
+msgid "unterminated quoted string in connection info string\n"
+msgstr "bağlantı bilgi katarında sonlandırılmamış tırnaklı katar\n"
+
+#: fe-connect.c:4994
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "\"%s\" servisinin tanımı bulunamadı\n"
+
+#: fe-connect.c:5017
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "\"%s\" servis dosyası bulunamadı\n"
+
+#: fe-connect.c:5030
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "\"%2$s\" servis dosyasında %1$d no'lu satır çok uzun \n"
+
+#: fe-connect.c:5101 fe-connect.c:5145
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "\"%s\" servis dosyasında yazım hatası, satır no %d\n"
+
+#: fe-connect.c:5112
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "\"%s\" servis dosyası satır no %d , desteklenmeyen içiçe servis tanımlamaları\n"
+
+#: fe-connect.c:5832
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "dahili çözümleyici yordamına aktarılan geçersiz URI: \"%s\"\n"
+
+#: fe-connect.c:5909
+#, c-format
+msgid "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"
+msgstr "URI içinde IPv6 sunucu adresinde eşleşen \"]\" aranırken dize sonuna ulaşıldı: \"%s\"\n"
+
+#: fe-connect.c:5916
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "URI içinde IPv6 sunuu adresi boş olamaz: \"%s\"\n"
+
+#: fe-connect.c:5931
+#, c-format
+msgid "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"
+msgstr "URI içinde %2$d pozisyonunda beklenmeyen karakter \"%1$c\" (\":\" veya \"/\" bekleniyordu): \"%3$s\"\n"
+
+#: fe-connect.c:6060
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "URI sorgu parametresinde fazla anahtar/değer ayıracı \"=\": \"%s\"\n"
+
+#: fe-connect.c:6080
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "URI sorgu parametresinde eksik anahtar/değer ayıracı \"=\": \"%s\"\n"
+
+#: fe-connect.c:6131
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "geçersiz URI sorgu parametresi: \"%s\"\n"
+
+#: fe-connect.c:6205
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "geçersiz percent-encoded andacı (token)\"%s\"\n"
+
+#: fe-connect.c:6215
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "percent-encoded değeri içinde yasak değer %%00: \"%s\"\n"
+
+#: fe-connect.c:6580
+msgid "connection pointer is NULL\n"
+msgstr "bağlantı belirteci NULL'dur\n"
+
+#: fe-connect.c:6878
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "UYARI: \"%s\" password dosyası düz metin dosyası değildir\n"
+
+#: fe-connect.c:6887
+#, c-format
+msgid "WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "UYARI: \"%s\" şifre dosyası herkes ya da grup tarafından erişilebilir durumda; dosyanın izinleri u=rw (0600) ya da daha az olmalı\n"
+
+#: fe-connect.c:6981
+#, c-format
+msgid "password retrieved from file \"%s\"\n"
+msgstr "\"%s\" dosyasından parola okundu\n"
+
+#: fe-exec.c:445 fe-exec.c:2822
+#, c-format
+msgid "row number %d is out of range 0..%d"
+msgstr "%d satır numarası, 0..%d sınırının dışında"
+
+#: fe-exec.c:506 fe-protocol2.c:502 fe-protocol2.c:537 fe-protocol2.c:1056
+#: fe-protocol3.c:208 fe-protocol3.c:235 fe-protocol3.c:252 fe-protocol3.c:332
+#: fe-protocol3.c:727 fe-protocol3.c:958
+msgid "out of memory"
+msgstr "yetersiz bellek"
+
+#: fe-exec.c:507 fe-protocol2.c:1402 fe-protocol3.c:1911
+#, c-format
+msgid "%s"
+msgstr "%s"
+
+#: fe-exec.c:816
+msgid "write to server failed\n"
+msgstr "sunucuya yazma başarısız oldu\n"
+
+#: fe-exec.c:897
+msgid "NOTICE"
+msgstr "BİLGİ"
+
+#: fe-exec.c:955
+msgid "PGresult cannot support more than INT_MAX tuples"
+msgstr "PGresult INT_MAX değerinden daha fazla satır (Tuple) destekleyemez"
+
+#: fe-exec.c:967
+msgid "size_t overflow"
+msgstr "size_t taşması"
+
+#: fe-exec.c:1244 fe-exec.c:1302 fe-exec.c:1348
+msgid "command string is a null pointer\n"
+msgstr "komut katarı null belirteçtir\n"
+
+#: fe-exec.c:1308 fe-exec.c:1354 fe-exec.c:1449
+msgid "number of parameters must be between 0 and 65535\n"
+msgstr "parametrelerin sayısı 0 ve 65535 arasında olmalı\n"
+
+#: fe-exec.c:1342 fe-exec.c:1443
+msgid "statement name is a null pointer\n"
+msgstr "durum adı null belirteçtir\n"
+
+#: fe-exec.c:1362 fe-exec.c:1525 fe-exec.c:2234 fe-exec.c:2436
+msgid "function requires at least protocol version 3.0\n"
+msgstr "fonksiyon en az 3.0 prokolüne gereksinim duyuyor.\n"
+
+#: fe-exec.c:1480
+msgid "no connection to the server\n"
+msgstr "sunucuya bağlantı yok\n"
+
+#: fe-exec.c:1487
+msgid "another command is already in progress\n"
+msgstr "şu anda işlenen başka bir komut var\n"
+
+#: fe-exec.c:1601
+msgid "length must be given for binary parameter\n"
+msgstr "binary parametresinin uzunluğu belirtilmelidir\n"
+
+#: fe-exec.c:1864
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "beklenmeyen asyncStatus: %d\n"
+
+#: fe-exec.c:1884
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "PGEventProc \"%s\" işlemi PGEVT_RESULTCREATE işlemi sırasında başarısız oldu\n"
+
+#: fe-exec.c:2044
+msgid "COPY terminated by new PQexec"
+msgstr "COPY, yeni PQexec tarafından sonlandırıldı"
+
+#: fe-exec.c:2052
+msgid "COPY IN state must be terminated first\n"
+msgstr "Öncelikle COPY IN durumu sonlandırılmalıdır\n"
+
+#: fe-exec.c:2072
+msgid "COPY OUT state must be terminated first\n"
+msgstr "Öncelikle COPY OUT durumu sonlandırılmalıdır\n"
+
+#: fe-exec.c:2080
+msgid "PQexec not allowed during COPY BOTH\n"
+msgstr "PQexec için COPY BOTH sırasında izin verilmiyor\n"
+
+#: fe-exec.c:2326 fe-exec.c:2393 fe-exec.c:2483 fe-protocol2.c:1359
+#: fe-protocol3.c:1842
+msgid "no COPY in progress\n"
+msgstr "çalışan COPY süreci yok\n"
+
+#: fe-exec.c:2673
+msgid "connection in wrong state\n"
+msgstr "bağlantı yanlış durumda\n"
+
+#: fe-exec.c:2704
+msgid "invalid ExecStatusType code"
+msgstr "geçersiz ExecStatusType kodu"
+
+#: fe-exec.c:2731
+msgid "PGresult is not an error result\n"
+msgstr "PGresult bir hata sonucu değildir\n"
+
+#: fe-exec.c:2806 fe-exec.c:2829
+#, c-format
+msgid "column number %d is out of range 0..%d"
+msgstr "%d kolon numarası, 0..%d aralığının dışında"
+
+#: fe-exec.c:2844
+#, c-format
+msgid "parameter number %d is out of range 0..%d"
+msgstr "%d sayılı parametre aralık dışında: 0..%d"
+
+#: fe-exec.c:3154
+#, c-format
+msgid "could not interpret result from server: %s"
+msgstr "sunucudan gelen yanıt yorumlanamadı: %s"
+
+#: fe-exec.c:3393 fe-exec.c:3477
+msgid "incomplete multibyte character\n"
+msgstr "tamamlanmamış çoklu bayt karakteri\n"
+
+#: fe-lobj.c:154
+msgid "cannot determine OID of function lo_truncate\n"
+msgstr "lo_truncate fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:170
+msgid "argument of lo_truncate exceeds integer range\n"
+msgstr "lo_truncate argümanı tamsayı aralığını aşıyor\n"
+
+#: fe-lobj.c:221
+msgid "cannot determine OID of function lo_truncate64\n"
+msgstr "lo_truncate64 fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:279
+msgid "argument of lo_read exceeds integer range\n"
+msgstr "lo_read argümanı tamsayı aralığını aşıyor\n"
+
+#: fe-lobj.c:334
+msgid "argument of lo_write exceeds integer range\n"
+msgstr "lo_write argümanı tamsayı aralığını aşıyor\n"
+
+#: fe-lobj.c:425
+msgid "cannot determine OID of function lo_lseek64\n"
+msgstr "lo_lseek64 fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "lo_create fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "lo_tell64 fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:706 fe-lobj.c:815
+#, c-format
+msgid "could not open file \"%s\": %s\n"
+msgstr "\"%s\" dosyası açılamadı: %s\n"
+
+#: fe-lobj.c:761
+#, c-format
+msgid "could not read from file \"%s\": %s\n"
+msgstr "\"%s\" dosyasından okuma hatası: %s\n"
+
+#: fe-lobj.c:835 fe-lobj.c:859
+#, c-format
+msgid "could not write to file \"%s\": %s\n"
+msgstr "\"%s\" dosyasına yazılamadı: %s\n"
+
+#: fe-lobj.c:946
+msgid "query to initialize large object functions did not return data\n"
+msgstr "large object fonksiyonlarını ilklendirecek sorgu veri döndürmedi\n"
+
+#: fe-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "lo_open fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "lo_close fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "lo_create fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "lo_unlink fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "lo_lseek fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "lo_tell fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "loread fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "lowrite fonksiyonunun OID'i belirlenemiyor\n"
+
+#: fe-misc.c:290
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "%lu büyüklüğündeki tamsayılar pqGetInt tarafından desteklenmez"
+
+#: fe-misc.c:326
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "%lu büyüklüğündeki tamsayılar pqPutInt tarafından desteklenmez"
+
+#: fe-misc.c:637 fe-misc.c:859
+msgid "connection not open\n"
+msgstr "bağlantı açık değil\n"
+
+#: fe-misc.c:807 fe-secure-openssl.c:206 fe-secure-openssl.c:314
+#: fe-secure.c:268 fe-secure.c:385
+msgid ""
+"server closed the connection unexpectedly\n"
+"\tThis probably means the server terminated abnormally\n"
+"\tbefore or while processing the request.\n"
+msgstr ""
+"sunucu bağlantıyı beklenmedik şekilde kapattı\n"
+"\tBu muhtemelen sunucunun isteği işlemeden önce ya da \n"
+"\tisteği işlerken anormal olarak kapandığı anlamına gelir.\n"
+
+#: fe-misc.c:1046
+msgid "timeout expired\n"
+msgstr "zamanaşımı süresi sona derdi\n"
+
+#: fe-misc.c:1091
+msgid "invalid socket\n"
+msgstr "geçersiz soket\n"
+
+#: fe-misc.c:1114
+#, c-format
+msgid "select() failed: %s\n"
+msgstr "select() başarısız oldu: %s\n"
+
+#: fe-protocol2.c:90
+#, c-format
+msgid "invalid setenv state %c, probably indicative of memory corruption\n"
+msgstr "geçersiz setenv durumu %c, belleğin zarar görmesinin bir işareti olabilir\n"
+
+#: fe-protocol2.c:389
+#, c-format
+msgid "invalid state %c, probably indicative of memory corruption\n"
+msgstr "geçersiz %c durumu, belleğin zarar görmesinin bir işareti olabilir\n"
+
+#: fe-protocol2.c:478 fe-protocol3.c:185
+#, c-format
+msgid "message type 0x%02x arrived from server while idle"
+msgstr "sunucu boş durumdayken sunucudan 0x%02x ileti tipi geldi"
+
+#: fe-protocol2.c:528
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "boş sorgu yanıtını takip eden geçersiz karakter:%c (\"I\" mesajı)"
+
+#: fe-protocol2.c:594
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "sunucu önceki satır tanımı (\"T\" mesajı) olmadan veri (\"D\" mesajı) gönderdi"
+
+#: fe-protocol2.c:612
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "sunucu önceki satır tanımı (\"T\" mesajı) olmadan ikili veri (\"B\" mesajı) gönderdi"
+
+#: fe-protocol2.c:632 fe-protocol3.c:411
+#, c-format
+msgid "unexpected response from server; first received character was \"%c\"\n"
+msgstr "sunucudan beklenmeyen bir yanıt alındı; alınan ilk karakter\"%c\" idi\n"
+
+#: fe-protocol2.c:761 fe-protocol2.c:936 fe-protocol3.c:626 fe-protocol3.c:853
+msgid "out of memory for query result"
+msgstr "sorgu sonucu için yetersiz bellek"
+
+#: fe-protocol2.c:1414
+#, c-format
+msgid "lost synchronization with server, resetting connection"
+msgstr "sunucu ile eşzamanlama kayboldu, bağlantı yeniden açılıyor"
+
+#: fe-protocol2.c:1536 fe-protocol2.c:1568 fe-protocol3.c:2099
+#, c-format
+msgid "protocol error: id=0x%x\n"
+msgstr "protokol hatası: id=0x%x\n"
+
+#: fe-protocol3.c:367
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)\n"
+msgstr ""
+"sunucu, önceki satır tanımı (\"T\" mesajı) olmadan veri (\"D\" mesajı) gönderdi\n"
+"\n"
+
+#: fe-protocol3.c:432
+#, c-format
+msgid "message contents do not agree with length in message type \"%c\"\n"
+msgstr "ileti içeriği,\"%c\" ileti tipinin içindeki uzunlukla aynı değil\n"
+
+#: fe-protocol3.c:453
+#, c-format
+msgid "lost synchronization with server: got message type \"%c\", length %d\n"
+msgstr "sunucu ile eşzamanlılık kayboldu: \"%c\" ileti tipi alındı, uzunluğu %d\n"
+
+#: fe-protocol3.c:504 fe-protocol3.c:544
+msgid "insufficient data in \"T\" message"
+msgstr "\"T\" mesajında yetersiz veri"
+
+#: fe-protocol3.c:577
+msgid "extraneous data in \"T\" message"
+msgstr "\"T\" mesajında ilgisiz veri"
+
+#: fe-protocol3.c:690
+msgid "extraneous data in \"t\" message"
+msgstr "\"t\" mesajında ilgisiz veri"
+
+#: fe-protocol3.c:761 fe-protocol3.c:793 fe-protocol3.c:811
+msgid "insufficient data in \"D\" message"
+msgstr "\"D\" mesajında yetersiz veri"
+
+#: fe-protocol3.c:767
+msgid "unexpected field count in \"D\" message"
+msgstr "\"D\" mesajında beklenmeyen alan sayısı"
+
+#: fe-protocol3.c:820
+msgid "extraneous data in \"D\" message"
+msgstr "\"D\" mesajında ilgisiz veri"
+
+#: fe-protocol3.c:1012
+msgid "no error message available\n"
+msgstr "hata mesajı bulunmuyor\n"
+
+#. translator: %s represents a digit string
+#: fe-protocol3.c:1060 fe-protocol3.c:1079
+#, c-format
+msgid " at character %s"
+msgstr " %s. karakterde"
+
+#: fe-protocol3.c:1092
+#, c-format
+msgid "DETAIL: %s\n"
+msgstr "AYRINTI: %s\n"
+
+#: fe-protocol3.c:1095
+#, c-format
+msgid "HINT: %s\n"
+msgstr "İPUCU: %s\n"
+
+#: fe-protocol3.c:1098
+#, c-format
+msgid "QUERY: %s\n"
+msgstr "SORGU: %s\n"
+
+#: fe-protocol3.c:1105
+#, c-format
+msgid "CONTEXT: %s\n"
+msgstr "BAĞLAM: %s\n"
+
+#: fe-protocol3.c:1114
+#, c-format
+msgid "SCHEMA NAME: %s\n"
+msgstr "ŞEMA ADI: %s\n"
+
+#: fe-protocol3.c:1118
+#, c-format
+msgid "TABLE NAME: %s\n"
+msgstr "TABLO ADI: %s\n"
+
+#: fe-protocol3.c:1122
+#, c-format
+msgid "COLUMN NAME: %s\n"
+msgstr "SÜTUN ADI: %s\n"
+
+#: fe-protocol3.c:1126
+#, c-format
+msgid "DATATYPE NAME: %s\n"
+msgstr "VERİ TİPİ ADI: %s\n"
+
+#: fe-protocol3.c:1130
+#, c-format
+msgid "CONSTRAINT NAME: %s\n"
+msgstr "KISITLAMA ADI: %s\n"
+
+#: fe-protocol3.c:1142
+msgid "LOCATION: "
+msgstr "YER: "
+
+#: fe-protocol3.c:1144
+#, c-format
+msgid "%s, "
+msgstr "%s, "
+
+#: fe-protocol3.c:1146
+#, c-format
+msgid "%s:%s"
+msgstr "%s:%s"
+
+#: fe-protocol3.c:1341
+#, c-format
+msgid "LINE %d: "
+msgstr "SATIR %d: "
+
+#: fe-protocol3.c:1736
+msgid "PQgetline: not doing text COPY OUT\n"
+msgstr "PQgetline: COPY OUT metnini yapmıyor\n"
+
+#: fe-secure-common.c:124
+msgid "SSL certificate's name contains embedded null\n"
+msgstr "SSL sertifikasının ismi gömülü olarak null içeriyor\n"
+
+#: fe-secure-common.c:171
+msgid "host name must be specified for a verified SSL connection\n"
+msgstr "doğrulanmış bir SSL bağlantısı için makina adı belirtilmelidir\n"
+
+#: fe-secure-common.c:196
+#, c-format
+msgid "server certificate for \"%s\" does not match host name \"%s\"\n"
+msgstr "\"%s\" için olan sunucu sertifikası \"%s\" olan makina adı ile eşleşmiyor\n"
+
+#: fe-secure-common.c:202
+msgid "could not get server's host name from server certificate\n"
+msgstr "sunucunun makina adı sunucu sertifikasından alınamadı\n"
+
+#: fe-secure-openssl.c:211 fe-secure-openssl.c:319 fe-secure-openssl.c:1219
+#, c-format
+msgid "SSL SYSCALL error: %s\n"
+msgstr "SSL SYSCALL hatası: %s\n"
+
+#: fe-secure-openssl.c:218 fe-secure-openssl.c:326 fe-secure-openssl.c:1223
+msgid "SSL SYSCALL error: EOF detected\n"
+msgstr "SSL SYSCALL hatası: EOF bulundu\n"
+
+#: fe-secure-openssl.c:229 fe-secure-openssl.c:337 fe-secure-openssl.c:1232
+#, c-format
+msgid "SSL error: %s\n"
+msgstr "SSL hatası: %s\n"
+
+#: fe-secure-openssl.c:244 fe-secure-openssl.c:352
+msgid "SSL connection has been closed unexpectedly\n"
+msgstr "SSL bağlantısı beklenmeyen şekilde sonlandırıldı\n"
+
+#: fe-secure-openssl.c:250 fe-secure-openssl.c:358 fe-secure-openssl.c:1241
+#, c-format
+msgid "unrecognized SSL error code: %d\n"
+msgstr "tanımlanamayan SSL hata kodu: %d\n"
+
+#: fe-secure-openssl.c:398
+msgid "could not determine server certificate signature algorithm\n"
+msgstr ""
+"sunucu sertifika imza algoritması belirlenemedi\n"
+"\n"
+
+#: fe-secure-openssl.c:419
+#, c-format
+msgid "could not find digest for NID %s\n"
+msgstr "NID %s için özet (digest) bulunamadı\n"
+
+#: fe-secure-openssl.c:429
+msgid "could not generate peer certificate hash\n"
+msgstr "karşı tarafın sertifika hash'i oluşturulamadı\n"
+
+#: fe-secure-openssl.c:486
+msgid "SSL certificate's name entry is missing\n"
+msgstr ""
+"SSL sertifikasının isim girişi eksik\n"
+"\n"
+
+#: fe-secure-openssl.c:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "SSL bağlamı oluşturulamadı: %s\n"
+
+#: fe-secure-openssl.c:852
+#, c-format
+msgid "could not read root certificate file \"%s\": %s\n"
+msgstr "\"%s\"kök sertifika dosyası okunamadı: %s\n"
+
+#: fe-secure-openssl.c:880
+#, c-format
+msgid "SSL library does not support CRL certificates (file \"%s\")\n"
+msgstr "kurulu SSL kütüphanesi CRL sertifikalarını desteklemiyor (dosya adı \"%s\")\n"
+
+#: fe-secure-openssl.c:908
+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 ""
+"kök sertifika dosyasının ev dizini bulunamadı\n"
+"Ya bir dosya adı belirtin, ya da sunucu sertifika doğrulamasını kapatmak için sslmode ayarını değiştirin.\n"
+
+#: fe-secure-openssl.c:912
+#, 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\" kök sertifika dosyası mevcut değil\n"
+"Ya bu dosyayı oluşturun ya da sslmode ayarını sunucu sertifika doğrulamasını kapatmak için değiştirin.\n"
+
+#: fe-secure-openssl.c:943
+#, c-format
+msgid "could not open certificate file \"%s\": %s\n"
+msgstr "\"%s\" sertifikası açılamadı: %s\n"
+
+#: fe-secure-openssl.c:962
+#, c-format
+msgid "could not read certificate file \"%s\": %s\n"
+msgstr "\"%s\" sertifikası okunamadı: %s\n"
+
+#: fe-secure-openssl.c:987
+#, c-format
+msgid "could not establish SSL connection: %s\n"
+msgstr "SSL bağlantısı sağlanamadı: %s\n"
+
+#: fe-secure-openssl.c:1041
+#, c-format
+msgid "could not load SSL engine \"%s\": %s\n"
+msgstr "\"%s\" SSL motoru yüklenemedi: %s\n"
+
+#: fe-secure-openssl.c:1053
+#, c-format
+msgid "could not initialize SSL engine \"%s\": %s\n"
+msgstr "\"%s\" SSL motoru ilklendirilemedi: %s\n"
+
+#: fe-secure-openssl.c:1069
+#, c-format
+msgid "could not read private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "\"%2$s\" motorundan \"%1$s\" özel SSL anahtarı okunamadı: %3$s\n"
+
+#: fe-secure-openssl.c:1083
+#, c-format
+msgid "could not load private SSL key \"%s\" from engine \"%s\": %s\n"
+msgstr "\"%2$s\" motorundan \"%1$s\" özel SSL anahtarı yüklenemedi: %3$s\n"
+
+#: fe-secure-openssl.c:1120
+#, c-format
+msgid "certificate present, but not private key file \"%s\"\n"
+msgstr "sertifika mevcut ancak özel anahtar (private key) mevcut değil \"%s\"\n"
+
+#: fe-secure-openssl.c:1128
+#, c-format
+msgid "private key file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"
+msgstr "\"%s\" özel anahtar (private key) dosyası herkes ya da grup tarafından erişilebilir durumda; dosyanın izinleri u=rw (0600) ya da daha az olmalı\n"
+
+#: fe-secure-openssl.c:1139
+#, c-format
+msgid "could not load private key file \"%s\": %s\n"
+msgstr "özel anahtar (private key) dosyası \"%s\" okunamıyor: %s\n"
+
+#: fe-secure-openssl.c:1153
+#, c-format
+msgid "certificate does not match private key file \"%s\": %s\n"
+msgstr "sertifika, \"%s\" özel anahtar (private key) dosyası ile uyuşmuyor: %s\n"
+
+#: fe-secure-openssl.c:1262
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "sertifika elde edilemedi: %s\n"
+
+#: fe-secure-openssl.c:1351
+#, c-format
+msgid "no SSL error reported"
+msgstr "SSL hatası raporlanmadı"
+
+#: fe-secure-openssl.c:1360
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL hata kodu: %lu"
+
+#: fe-secure.c:276
+#, c-format
+msgid "could not receive data from server: %s\n"
+msgstr "sunucudan veri alınamadı: %s\n"
+
+#: fe-secure.c:392
+#, c-format
+msgid "could not send data to server: %s\n"
+msgstr "sunucuya veri gönderilemedi: %s\n"
+
+#: win32.c:317
+#, c-format
+msgid "unrecognized socket error: 0x%08X/%d"
+msgstr "bilinmeyen soket hatası: 0x%08X/%d"
+
+#~ msgid "certificate could not be validated: %s\n"
+#~ msgstr "sertifika doğrulanamadı: %s\n"
+
+#~ msgid "private key file \"%s\" has wrong permissions\n"
+#~ msgstr "\"%s\" özel anahtarı yanlış izinlere sahip\n"
+
+#~ msgid "invalid value of PGSSLKEY environment variable\n"
+#~ msgstr "PGSSLKEY ortam değişkeni için geçersiz değer\n"
+
+#~ msgid "could not get user information\n"
+#~ msgstr "kullanıcı bilgisi alınamadı\n"
+
+#~ msgid "server common name \"%s\" does not resolve to %ld.%ld.%ld.%ld\n"
+#~ msgstr "Sunucu ortak adı olan \"%s\" %ld.%ld.%ld.%ld adresine çözülemiyor\n"
+
+#~ msgid "unsupported protocol\n"
+#~ msgstr "desteklenmeyen protokol\n"
+
+#~ msgid "could not get information about host \"%s\": %s\n"
+#~ msgstr "\"%s\" sunucusu hakkında bilgi alınamadı: %s\n"
+
+#~ msgid "error querying socket: %s\n"
+#~ msgstr "soketi sorgularken hata oluştu: %s\n"
+
+#~ msgid "root certificate file \"%s\" does not exist"
+#~ msgstr "kök sertifika dosyası \"%s\" mevcut değildir"
+
+#~ msgid "invalid sslverify value: \"%s\"\n"
+#~ msgstr "geçersiz sslverify değeri: \"%s\"\n"
+
+#~ msgid "could not read private key file \"%s\": %s\n"
+#~ msgstr "\"%s\" özel anahtar dosyası okunamadı: %s\n"
+
+#~ msgid "private key file \"%s\" changed during execution\n"
+#~ msgstr "\"%s\" özel anahtar dosyası çalışma anında açılamadı\n"
+
+#~ msgid "could not open private key file \"%s\": %s\n"
+#~ msgstr "\"%s\" özel anahtar dosyası açılamadı: %s\n"
+
+#~ msgid "verified SSL connections are only supported when connecting to a host name"
+#~ msgstr "Onaylanmış SSL bağlantıları sadece bir sunucu adına bağlanıldığı zaman geçerlidir"
+
+#~ msgid "could not get home directory to locate client certificate files\n"
+#~ msgstr "İstemci sertifika dosyalarının olduğu ev dizini bulunamadı\n"
+
+#~ msgid "socket not open\n"
+#~ msgstr "soket açık değil\n"
+
+#~ msgid "could not get home directory to locate service definition file"
+#~ msgstr "servis dosyasının olduğu ev dizini bulunamadı"
+
+#~ msgid "setsockopt(SO_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(SO_KEEPALIVE) başarısız oldu: %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPINTVL) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPINTVL) başarısız oldu: %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPALIVE) failed: %s\n"
+#~ msgstr "setsockopt(SO_REUSEADDR) başarısız oldu: %s\n"
+
+#~ msgid "setsockopt(TCP_KEEPIDLE) failed: %s\n"
+#~ msgstr "setsockopt(TCP_KEEPIDLE) başarısız oldu: %s\n"
+
+#~ msgid "could not restore non-blocking mode on socket: %s\n"
+#~ msgstr "could not restore non-blocking mode on socket: %s\n"
+
+#~ msgid "Kerberos 5 authentication rejected: %*s\n"
+#~ msgstr "Kerberos 5 yetkilendirmesi kabul edilmedi: %*s\n"
+
+#~ msgid "could not set socket to blocking mode: %s\n"
+#~ msgstr "soket engelleme moduna ayarlanamadı: %s\n"
+
+#~ msgid "GSSAPI name import error"
+#~ msgstr "GSSAPI ad aktarma hatası"
diff --git a/src/interfaces/libpq/po/uk.po b/src/interfaces/libpq/po/uk.po
new file mode 100644
index 0000000..3920b7d
--- /dev/null
+++ b/src/interfaces/libpq/po/uk.po
@@ -0,0 +1,1273 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: postgresql\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-09-21 21:09+0000\n"
+"PO-Revision-Date: 2020-09-22 13:43\n"
+"Last-Translator: pasha_golub\n"
+"Language-Team: Ukrainian\n"
+"Language: uk\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: /DEV_13/libpq.pot\n"
+"X-Crowdin-File-ID: 486\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 "не вдалося згенерувати одноразовий ідентифікатор\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 "не вдалося закодувати одноразовий ідентифікатор\n"
+
+#: fe-auth-scram.c:563
+msgid "could not encode client proof\n"
+msgstr "не вдалося закодувати підтвердження клієнта\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 "сервер запропонував автентифікацію SCRAM-SHA-256-PLUS через підключення без SSL\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 "Автентифікація Crypt не підтримується\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 "не вдалося знайти локального користувача за ідентифікатором: %d: %s\n"
+
+#: fe-auth.c:1119 fe-connect.c:2839
+#, c-format
+msgid "local user with ID %d does not exist\n"
+msgstr "локального користувача з ідентифікатором %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 значеннями hostaddr\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 "значення sslmode \"%s\" неприпустиме, якщо підтримку протоколу SSL не скомпільовано\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 "значення gssencmode \"%s\" неприпустиме, якщо підтримку протоколу GSSAPI не скомпільовано\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-режим без затримки: %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"
+" Чи дійсно працює сервер локально і приймає\n"
+" підключення через домен сокету Unix \"%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"
+" Чи дійсно сервер працює на хості \"%s\" (%s) і приймає\n"
+" TCP/IP підключення на порту %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 "не вдалося підключитися до сервера: %s\n"
+" Чи дійсно сервер працює на хості \"%s\" і приймає\n"
+" TCP/IP підключення на порту %s?\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 "Шлях Unix-сокету \"%s\" занадто довгий (максимум %d байтів)\n"
+
+#: fe-connect.c:2436
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "не вдалося перекласти шлях Unix-сокету \"%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 "не вдалося встановити сокет у режим без блокування: %s\n"
+
+#: fe-connect.c:2592
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "не вдалося встановити сокет у режим закриття по виконанню: %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 "requirepeer вказує на \"%s\", але фактичне ім'я вузла \"%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 "помилка тесту \"SHOW transaction_read_only\" на сервері \"%s:%s\"\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 "Помилка у PGEventProc \"%s\" під час події PGEVT_CONNRESET\n"
+
+#: fe-connect.c:4611
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": схема має бути ldap://\n"
+
+#: fe-connect.c:4626
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": відсутнє унікальне ім'я\n"
+
+#: fe-connect.c:4638 fe-connect.c:4693
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%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 "неприпустима URL-адреса протоколу LDAP \"%s\": відсутня область пошуку (base/one/sub)\n"
+
+#: fe-connect.c:4660
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%s\": відсутній фільтр\n"
+
+#: fe-connect.c:4681
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "неприпустима URL-адреса протоколу LDAP \"%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 "досягнуто кінця рядка під час пошуку відповідного \"]\" в адресі 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\" на позиції %d в URI (очікувалося \":\" або \"/\"): \"%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 "неприпустимий параметр запиту URI: \"%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 "нульове значення вказівника підключення \n"
+
+#: fe-connect.c:6967
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "ПОПЕРЕДЖЕННЯ: файл паролів \"%s\" не є простим файлом\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 поза діапазоном 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 "рядок команди є нульовим вказівником\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 "ім’я оператора є пустим вказівником\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.0\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 "неочікуваний asyncStatus: %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "Помилка у PGEventProc \"%s\" під час події PGEVT_RESULTCREAT\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY завершено новим PQexec"
+
+#: 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 "PQexec не дозволяється під час 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 у процесі\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 "неможливо визначити ідентифікатор OID функції lo_truncate\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 "неможливо визначити ідентифікатор OID функції lo_truncate64\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 "неможливо визначити ідентифікатор OID функції lo_lseek64\n"
+
+#: fe-lobj.c:521
+msgid "cannot determine OID of function lo_create\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_create\n"
+
+#: fe-lobj.c:600
+msgid "cannot determine OID of function lo_tell64\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_tell64\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 "запит на ініціалізацію функцій для великих об’єктів не повернув дані\n"
+
+#: fe-lobj.c:995
+msgid "cannot determine OID of function lo_open\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_open\n"
+
+#: fe-lobj.c:1002
+msgid "cannot determine OID of function lo_close\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_close\n"
+
+#: fe-lobj.c:1009
+msgid "cannot determine OID of function lo_creat\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_creat\n"
+
+#: fe-lobj.c:1016
+msgid "cannot determine OID of function lo_unlink\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_unlink\n"
+
+#: fe-lobj.c:1023
+msgid "cannot determine OID of function lo_lseek\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_lseek\n"
+
+#: fe-lobj.c:1030
+msgid "cannot determine OID of function lo_tell\n"
+msgstr "неможливо визначити ідентифікатор OID функції lo_tell\n"
+
+#: fe-lobj.c:1037
+msgid "cannot determine OID of function loread\n"
+msgstr "неможливо визначити ідентифікатор OID функції loread\n"
+
+#: fe-lobj.c:1044
+msgid "cannot determine OID of function lowrite\n"
+msgstr "неможливо визначити ідентифікатор OID функції lowrite\n"
+
+#: fe-misc.c:289
+#, c-format
+msgid "integer of size %lu not supported by pqGetInt"
+msgstr "pqGetInt не підтримує ціле число розміром %lu"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "pqPutInt не підтримує ціле число розміром %lu"
+
+#: 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"
+" Це може означати, що сервер завершив роботу ненормально до або під час обробки запиту.\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 "неприпустимий стан setenv %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 "отримано тип повідомлення 0x%02x від сервера під час бездіяльності"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "неочікуваний символ %c слідом за пустою відповіддю на запит (\"I\" повідомлення)"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "сервер передав дані (повідомлення \"D\") без попереднього опису рядка (повідомлення \"T\")"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "сервер передав бінарні дані (повідомлення \"B\") без попереднього опису рядка (повідомлення \"T\")"
+
+#: 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 "сервер передав дані (повідомлення \"D\") без попереднього опису рядка (повідомлення \"T\")\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 можна викликати лише під час 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"
+
+#: fe-secure-gssapi.c:673
+msgid "GSSAPI size check error"
+msgstr "помилка перевірки розміру GSSAPI"
+
+#: fe-secure-gssapi.c:684
+msgid "GSSAPI context establishment error"
+msgstr "помилка встановлення контексту GSSAPI"
+
+#: 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 "не вдалося знайти дайджест для 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:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "не вдалося створити контекст SSL: %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"
+
+#~ msgid "WARNING: line %d too long in password file \"%s\"\n"
+#~ msgstr "ПОПЕРЕДЖЕННЯ: рядок %d занадто довгий у файлі паролю \"%s\"\n"
+
diff --git a/src/interfaces/libpq/po/zh_CN.po b/src/interfaces/libpq/po/zh_CN.po
new file mode 100644
index 0000000..c128306
--- /dev/null
+++ b/src/interfaces/libpq/po/zh_CN.po
@@ -0,0 +1,1280 @@
+# simplified Chinese translation file for libpq
+# Bao Wei <weibao@forevertek.com>, 2002
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libpq (PostgreSQL) 13\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@lists.postgresql.org\n"
+"POT-Creation-Date: 2020-06-05 01:39+0000\n"
+"PO-Revision-Date: 2020-06-20 16:25+0800\n"
+"Last-Translator: Jie Zhang <zhangjie2@cn.fujitsu.com>\n"
+"Language-Team: Chinese (Simplified) <zhangjie2@cn.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: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:886 fe-connect.c:1413 fe-connect.c:1589 fe-connect.c:2199
+#: fe-connect.c:2222 fe-connect.c:2948 fe-connect.c:4617 fe-connect.c:4873
+#: fe-connect.c:4992 fe-connect.c:5245 fe-connect.c:5325 fe-connect.c:5424
+#: fe-connect.c:5680 fe-connect.c:5709 fe-connect.c:5781 fe-connect.c:5805
+#: fe-connect.c:5823 fe-connect.c:5924 fe-connect.c:5933 fe-connect.c:6289
+#: fe-connect.c:6439 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 "无法对客户端证明进行编码\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消息 (无效的salt)\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 "服务器通过非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 "不支持Crypt认证\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:2830
+#, c-format
+msgid "could not look up local user ID %d: %s\n"
+msgstr "无法查找本地用户ID %d: %s\n"
+
+#: fe-auth.c:1119 fe-connect.c:2835
+#, 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 "密码_加密值太长\n"
+
+#: fe-auth.c:1270
+#, c-format
+msgid "unrecognized password encryption algorithm \"%s\"\n"
+msgstr "无法识别的密码加密算法 \"%s\"\n"
+
+#: fe-connect.c:1069
+#, c-format
+msgid "could not match %d host names to %d hostaddr values\n"
+msgstr "无法将主机名 %d 与主机地址 %d匹配\n"
+
+#: fe-connect.c:1150
+#, c-format
+msgid "could not match %d port numbers to %d hosts\n"
+msgstr "无法将端口号 %d与主机%d匹配\n"
+
+#: fe-connect.c:1243
+#, c-format
+msgid "invalid channel_binding value: \"%s\"\n"
+msgstr "通道绑定值无效: \"%s\"\n"
+
+#: fe-connect.c:1269
+#, c-format
+msgid "invalid sslmode value: \"%s\"\n"
+msgstr "无效的 sslmode 值: \"%s\"\n"
+
+#: fe-connect.c:1290
+#, c-format
+msgid "sslmode value \"%s\" invalid when SSL support is not compiled in\n"
+msgstr "无效的 sslmode 值 \"%s\" 当没有把 SSL 支持编译进来时\n"
+
+#: fe-connect.c:1311
+#, c-format
+msgid "invalid ssl_min_protocol_version value: \"%s\"\n"
+msgstr "无效的 ssl_min_protocol_version 值: \"%s\"\n"
+
+#: fe-connect.c:1319
+#, c-format
+msgid "invalid ssl_max_protocol_version value: \"%s\"\n"
+msgstr "无效的 ssl_max_protocol_version 值: \"%s\"\n"
+
+#: fe-connect.c:1336
+msgid "invalid SSL protocol version range\n"
+msgstr "无效的SSL协议版本范围\n"
+
+#: fe-connect.c:1351
+#, c-format
+msgid "invalid gssencmode value: \"%s\"\n"
+msgstr "无效的 gssencmode 值: \"%s\"\n"
+
+#: fe-connect.c:1360
+#, c-format
+msgid "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in\n"
+msgstr "无效的 gssencmode 值 \"%s\" 当没有把 GSSAPI 支持编译进来时\n"
+
+#: fe-connect.c:1395
+#, c-format
+msgid "invalid target_session_attrs value: \"%s\"\n"
+msgstr "无效的 target_session_attrs 值: \"%s\"\n"
+
+#: fe-connect.c:1613
+#, c-format
+msgid "could not set socket to TCP no delay mode: %s\n"
+msgstr "无法将套接字设置为 TCP 无延迟模式: %s\n"
+
+#: fe-connect.c:1674
+#, 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服务器是否在本地运行并且在 Unix 域套接字\n"
+"\t\"%s\"上准备接受联接?\n"
+
+#: fe-connect.c:1711
+#, 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"
+"%s 上的 TCP/IP 联接?\n"
+
+#: fe-connect.c:1719
+#, 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"
+"%s 上的 TCP/IP 联接?\n"
+
+#: fe-connect.c:1789
+#, c-format
+msgid "invalid integer value \"%s\" for connection option \"%s\"\n"
+msgstr "连接选项\"%2$s\"的整数值\"%1$s\"无效\n"
+
+#: fe-connect.c:1819 fe-connect.c:1853 fe-connect.c:1888 fe-connect.c:1975
+#: fe-connect.c:2619
+#, c-format
+msgid "setsockopt(%s) failed: %s\n"
+msgstr "执行setsockopt(%s) 失败: %s\n"
+
+#: fe-connect.c:1941
+#, c-format
+msgid "WSAIoctl(SIO_KEEPALIVE_VALS) failed: %ui\n"
+msgstr "执行WSAIoctl(SIO_KEEPALIVE_VALS)失败:%u\n"
+
+#: fe-connect.c:2312
+msgid "invalid connection state, probably indicative of memory corruption\n"
+msgstr "无效的联接状态, 可能是存储器数据被破坏的标志\n"
+
+#: fe-connect.c:2378
+#, c-format
+msgid "invalid port number: \"%s\"\n"
+msgstr "无效端口号: \"%s\"\n"
+
+#: fe-connect.c:2394
+#, c-format
+msgid "could not translate host name \"%s\" to address: %s\n"
+msgstr "无法解释主机名 \"%s\" 到地址: %s\n"
+
+#: fe-connect.c:2407
+#, c-format
+msgid "could not parse network address \"%s\": %s\n"
+msgstr "无法分析网络地址\"%s\": %s\n"
+
+#: fe-connect.c:2420
+#, c-format
+msgid "Unix-domain socket path \"%s\" is too long (maximum %d bytes)\n"
+msgstr "Unix域的套接字路径\"%s\"超长(最大为%d字节)\n"
+
+#: fe-connect.c:2435
+#, c-format
+msgid "could not translate Unix-domain socket path \"%s\" to address: %s\n"
+msgstr "无法解释 Unix-domian 套接字路径 \"%s\" 到地址: %s\n"
+
+#: fe-connect.c:2556
+#, c-format
+msgid "could not create socket: %s\n"
+msgstr "无法创建套接字: %s\n"
+
+#: fe-connect.c:2578
+#, c-format
+msgid "could not set socket to nonblocking mode: %s\n"
+msgstr "无法设置套接字为非阻塞模式: %s\n"
+
+#: fe-connect.c:2588
+#, c-format
+msgid "could not set socket to close-on-exec mode: %s\n"
+msgstr "无法将套接字设置为执行时关闭 (close-on-exec) 模式: %s\n"
+
+#: fe-connect.c:2606
+msgid "keepalives parameter must be an integer\n"
+msgstr "参数keepalives必须是一个整数\n"
+
+#: fe-connect.c:2746
+#, c-format
+msgid "could not get socket error status: %s\n"
+msgstr "无法获取套接字错误状态: %s\n"
+
+#: fe-connect.c:2774
+#, c-format
+msgid "could not get client address from socket: %s\n"
+msgstr "无法从套接字获取客户端地址: %s\n"
+
+#: fe-connect.c:2816
+msgid "requirepeer parameter is not supported on this platform\n"
+msgstr "在此平台上不支持requirepeer参数\n"
+
+#: fe-connect.c:2819
+#, c-format
+msgid "could not get peer credentials: %s\n"
+msgstr "无法获得对等(peer)证书:%s\n"
+
+#: fe-connect.c:2843
+#, c-format
+msgid "requirepeer specifies \"%s\", but actual peer user name is \"%s\"\n"
+msgstr "期望对方用户指定值为 \"%s\", 但实际的对方用户名为 \"%s\"\n"
+
+#: fe-connect.c:2883
+#, c-format
+msgid "could not send GSSAPI negotiation packet: %s\n"
+msgstr "无法发送 GSSAPI 握手包: %s\n"
+
+#: fe-connect.c:2895
+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:2922
+#, c-format
+msgid "could not send SSL negotiation packet: %s\n"
+msgstr "无法发送 SSL 握手包: %s\n"
+
+#: fe-connect.c:2961
+#, c-format
+msgid "could not send startup packet: %s\n"
+msgstr "无法发送启动包: %s\n"
+
+#: fe-connect.c:3031
+msgid "server does not support SSL, but SSL was required\n"
+msgstr "服务器不支持 SSL, 但是要求使用 SSL\n"
+
+#: fe-connect.c:3057
+#, c-format
+msgid "received invalid response to SSL negotiation: %c\n"
+msgstr "收到对 SSL 握手的无效响应: %c\n"
+
+#: fe-connect.c:3147
+msgid "server doesn't support GSSAPI encryption, but it was required\n"
+msgstr "服务器不支持 GSSAPI, 但这是必须的\n"
+
+#: fe-connect.c:3158
+#, c-format
+msgid "received invalid response to GSSAPI negotiation: %c\n"
+msgstr "收到对 GSSAPI 握手的无效响应: %c\n"
+
+#: fe-connect.c:3225 fe-connect.c:3256
+#, 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:4223 fe-connect.c:4283
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_CONNRESET event\n"
+msgstr "在PGEVT_CONNRESET事件触发期间执行PGEventProc \"%s\"错误\n"
+
+#: fe-connect.c:4630
+#, c-format
+msgid "invalid LDAP URL \"%s\": scheme must be ldap://\n"
+msgstr "无效LDAP URL\"%s\": 模式必须是ldap://\n"
+
+#: fe-connect.c:4645
+#, c-format
+msgid "invalid LDAP URL \"%s\": missing distinguished name\n"
+msgstr "无效LDAP URL \"%s\": 丢失可区分的名称\n"
+
+#: fe-connect.c:4657 fe-connect.c:4712
+#, c-format
+msgid "invalid LDAP URL \"%s\": must have exactly one attribute\n"
+msgstr "无效LDAP URL \"%s\": 只能有一个属性\n"
+
+#: fe-connect.c:4668 fe-connect.c:4727
+#, 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:4679
+#, c-format
+msgid "invalid LDAP URL \"%s\": no filter\n"
+msgstr "无效的 LDAP URL \"%s\": 没有过滤器\n"
+
+#: fe-connect.c:4700
+#, c-format
+msgid "invalid LDAP URL \"%s\": invalid port number\n"
+msgstr "无效LDAP URL \"%s\": 无效端口号\n"
+
+#: fe-connect.c:4736
+msgid "could not create LDAP structure\n"
+msgstr "无法创建LDAP结构\n"
+
+#: fe-connect.c:4812
+#, c-format
+msgid "lookup on LDAP server failed: %s\n"
+msgstr "在LDAP服务器上的查找失败: %s\n"
+
+#: fe-connect.c:4823
+msgid "more than one entry found on LDAP lookup\n"
+msgstr "在LDAP搜索上找到多个入口\n"
+
+#: fe-connect.c:4824 fe-connect.c:4836
+msgid "no entry found on LDAP lookup\n"
+msgstr "在LDAP查找上没有发现入口\n"
+
+#: fe-connect.c:4847 fe-connect.c:4860
+msgid "attribute has no values on LDAP lookup\n"
+msgstr "在LDAP查找上的属性没有值\n"
+
+#: fe-connect.c:4912 fe-connect.c:4931 fe-connect.c:5463
+#, c-format
+msgid "missing \"=\" after \"%s\" in connection info string\n"
+msgstr "在联接信息字串里的 \"%s\" 后面缺少 \"=\"\n"
+
+#: fe-connect.c:5004 fe-connect.c:5648 fe-connect.c:6422
+#, c-format
+msgid "invalid connection option \"%s\"\n"
+msgstr "非法联接选项 \"%s\"\n"
+
+#: fe-connect.c:5020 fe-connect.c:5512
+msgid "unterminated quoted string in connection info string\n"
+msgstr "联接信息字串中未结束的引号字串\n"
+
+#: fe-connect.c:5103
+#, c-format
+msgid "definition of service \"%s\" not found\n"
+msgstr "错误:没有找到服务\"%s\"的定义\n"
+
+#: fe-connect.c:5126
+#, c-format
+msgid "service file \"%s\" not found\n"
+msgstr "错误:没有找到服务文件\"%s\"\n"
+
+#: fe-connect.c:5141
+#, c-format
+msgid "line %d too long in service file \"%s\"\n"
+msgstr "在服务文件\"%2$s\"中的第%1$d行的长度太长\n"
+
+#: fe-connect.c:5213 fe-connect.c:5257
+#, c-format
+msgid "syntax error in service file \"%s\", line %d\n"
+msgstr "在服务文件\"%s\"的第%d行出现语法错误\n"
+
+#: fe-connect.c:5224
+#, c-format
+msgid "nested service specifications not supported in service file \"%s\", line %d\n"
+msgstr "在服务文件\"%s\"的第%d行出现不支持的嵌套服务说明\n"
+
+#: fe-connect.c:5944
+#, c-format
+msgid "invalid URI propagated to internal parser routine: \"%s\"\n"
+msgstr "无效的URI传入内部解析器处理程序: \"%s\"\n"
+
+#: fe-connect.c:6021
+#, 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:6028
+#, c-format
+msgid "IPv6 host address may not be empty in URI: \"%s\"\n"
+msgstr "URI:\"%s\"中的IPv6主机地址可能不为空\n"
+
+#: fe-connect.c:6043
+#, 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:6172
+#, c-format
+msgid "extra key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "遇到多余的键/值分隔符\"=\"在URI查询参数里: \"%s\"\n"
+
+#: fe-connect.c:6192
+#, c-format
+msgid "missing key/value separator \"=\" in URI query parameter: \"%s\"\n"
+msgstr "缺少相应的键/值分隔符\"=\"在URI查询参数里: \"%s\"\n"
+
+#: fe-connect.c:6243
+#, c-format
+msgid "invalid URI query parameter: \"%s\"\n"
+msgstr "无效的URI查询参数: \"%s\"\n"
+
+#: fe-connect.c:6317
+#, c-format
+msgid "invalid percent-encoded token: \"%s\"\n"
+msgstr "无效的百分号编码令牌: \"%s\"\n"
+
+#: fe-connect.c:6327
+#, c-format
+msgid "forbidden value %%00 in percent-encoded value: \"%s\"\n"
+msgstr "在百分值编码的值: \"%s\"里禁止使用 %%00\n"
+
+#: fe-connect.c:6690
+msgid "connection pointer is NULL\n"
+msgstr "联接指针是 NULL\n"
+
+#: fe-connect.c:6989
+#, c-format
+msgid "WARNING: password file \"%s\" is not a plain file\n"
+msgstr "警告: 口令文件\"%s\"不是普通文本文件\n"
+
+#: fe-connect.c:6998
+#, 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:7039
+#, c-format
+msgid "WARNING: line %d too long in password file \"%s\"\n"
+msgstr "警告:在密码文件\"%2$s\"中的第%1$d行的长度太长\n"
+
+#: fe-connect.c:7118
+#, 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 超出了范围 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 "命令字串是一个空指针\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 "声明名字是一个空指针\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.0 版本的协议\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 "对于2进制参数必须指定长度\n"
+
+#: fe-exec.c:1863
+#, c-format
+msgid "unexpected asyncStatus: %d\n"
+msgstr "意外的 asyncStatus(异步状态): %d\n"
+
+#: fe-exec.c:1883
+#, c-format
+msgid "PGEventProc \"%s\" failed during PGEVT_RESULTCREATE event\n"
+msgstr "在PGEVT_CONNRESET事件触发期间执行PGEventProc \"%s\"错误\n"
+
+#: fe-exec.c:2043
+msgid "COPY terminated by new PQexec"
+msgstr "COPY 被一个新的 PQexec 终止"
+
+#: 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_creat 的 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_creat 的 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 "初始化大对象函数的查询没有返回数据\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_creat 的 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 "pqGetInt 不支持大小为 %lu 的整数"
+
+#: fe-misc.c:325
+#, c-format
+msgid "integer of size %lu not supported by pqPutInt"
+msgstr "pqPutInt 不支持大小为 %lu 的整数"
+
+#: 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"
+"或者正在处理请求的时候意外中止\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 "无效的 setenv 状态 %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 "当空闲时收到服务起发送过来的消息类型 0x%02x"
+
+#: fe-protocol2.c:523
+#, c-format
+msgid "unexpected character %c following empty query response (\"I\" message)"
+msgstr "unexpected character %c following empty query response (\"I\" message)"
+
+#: fe-protocol2.c:589
+#, c-format
+msgid "server sent data (\"D\" message) without prior row description (\"T\" message)"
+msgstr "server sent data (\"D\" message) without prior row description (\"T\" message)"
+
+#: fe-protocol2.c:607
+#, c-format
+msgid "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+msgstr "server sent binary data (\"B\" message) without prior row description (\"T\" message)"
+
+#: 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 "server sent data (\"D\" message) without prior row description (\"T\" message)\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: not doing text COPY OUT\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:673
+msgid "GSSAPI size check error"
+msgstr "GSSAPI大小检查错误"
+
+#: fe-secure-gssapi.c:684
+msgid "GSSAPI context establishment error"
+msgstr "GSSAPI上下文创建错误"
+
+#: 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 错误: 发现结束符\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:1313
+#, 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:815
+#, c-format
+msgid "could not create SSL context: %s\n"
+msgstr "无法创建 SSL 环境: %s\n"
+
+#: fe-secure-openssl.c:854
+#, c-format
+msgid "invalid value \"%s\" for minimum SSL protocol version\n"
+msgstr "最小SSL协议版本的值\"%s\"无效\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 "最大SSL协议版本的值\"%s\"无效\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 ""
+"无法获取home目录以定位根认证文件\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 "无法从引擎\"%2$s\"读取私有SSL钥\"%1$s\": %3$s\n"
+
+#: fe-secure-openssl.c:1149
+#, 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: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:1332
+#, c-format
+msgid "certificate could not be obtained: %s\n"
+msgstr "无法获得证书: %s\n"
+
+#: fe-secure-openssl.c:1421
+#, c-format
+msgid "no SSL error reported"
+msgstr "没有报告SSL错误"
+
+#: fe-secure-openssl.c:1430
+#, c-format
+msgid "SSL error code %lu"
+msgstr "SSL 错误代码 %lu"
+
+#: fe-secure-openssl.c:1677
+#, c-format
+msgid "WARNING: sslpassword truncated\n"
+msgstr "警告:ssl密码被截断\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/pqexpbuffer.c b/src/interfaces/libpq/pqexpbuffer.c
new file mode 100644
index 0000000..bd5ef77
--- /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-2020, 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..65cd367
--- /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-2020, 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..fd801c1
--- /dev/null
+++ b/src/interfaces/libpq/pthread-win32.c
@@ -0,0 +1,60 @@
+/*-------------------------------------------------------------------------
+*
+* pthread-win32.c
+* partial pthread implementation for win32
+*
+* Copyright (c) 2004-2020, 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..54db4f1
--- /dev/null
+++ b/src/interfaces/libpq/test/regress.pl
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+
+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..1fb25e8
--- /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-2020, 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..cd19ec9
--- /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-2020, 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..c42d7ab
--- /dev/null
+++ b/src/interfaces/libpq/win32.h
@@ -0,0 +1,34 @@
+/*
+ * 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 */
+#undef EINTR
+#define EINTR WSAEINTR
+#ifndef EWOULDBLOCK
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#endif
+#ifndef ECONNRESET
+#define ECONNRESET WSAECONNRESET
+#endif
+#ifndef EINPROGRESS
+#define EINPROGRESS WSAEINPROGRESS
+#endif
+
+/*
+ * support for handling Windows Socket errors
+ */
+extern const char *winsock_strerror(int err, char *strerrbuf, size_t buflen);
+
+#endif