summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian1998-09-01 04:40:42 +0000
committerBruce Momjian1998-09-01 04:40:42 +0000
commitfa1a8d6a97068295fe30ac646aec7493a6305bc2 (patch)
tree645f7cef3c78fbab4d6d7bbc7c9a61ad2893d273 /src
parentaf74855a608da4cd7ef88ceb2241ec1c75537f39 (diff)
OK, folks, here is the pgindent output.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/common/heaptuple.c5
-rw-r--r--src/backend/access/common/printtup.c6
-rw-r--r--src/backend/access/common/tupdesc.c4
-rw-r--r--src/backend/access/gist/gist.c42
-rw-r--r--src/backend/access/gist/gistget.c6
-rw-r--r--src/backend/access/gist/gistscan.c9
-rw-r--r--src/backend/access/hash/hash.c10
-rw-r--r--src/backend/access/hash/hashfunc.c10
-rw-r--r--src/backend/access/heap/heapam.c41
-rw-r--r--src/backend/access/index/indexam.c6
-rw-r--r--src/backend/access/index/istrat.c31
-rw-r--r--src/backend/access/nbtree/nbtcompare.c9
-rw-r--r--src/backend/access/nbtree/nbtinsert.c4
-rw-r--r--src/backend/access/nbtree/nbtree.c83
-rw-r--r--src/backend/access/nbtree/nbtscan.c18
-rw-r--r--src/backend/access/nbtree/nbtsearch.c15
-rw-r--r--src/backend/access/nbtree/nbtsort.c20
-rw-r--r--src/backend/access/rtree/rtget.c5
-rw-r--r--src/backend/access/rtree/rtree.c32
-rw-r--r--src/backend/access/rtree/rtscan.c11
-rw-r--r--src/backend/access/rtree/rtstrat.c5
-rw-r--r--src/backend/access/transam/transam.c5
-rw-r--r--src/backend/access/transam/transsup.c8
-rw-r--r--src/backend/access/transam/varsup.c10
-rw-r--r--src/backend/access/transam/xact.c4
-rw-r--r--src/backend/bootstrap/bootstrap.c7
-rw-r--r--src/backend/catalog/aclchk.c52
-rw-r--r--src/backend/catalog/catalog.c6
-rw-r--r--src/backend/catalog/heap.c53
-rw-r--r--src/backend/catalog/index.c118
-rw-r--r--src/backend/catalog/indexing.c18
-rw-r--r--src/backend/catalog/pg_aggregate.c4
-rw-r--r--src/backend/catalog/pg_operator.c25
-rw-r--r--src/backend/catalog/pg_proc.c3
-rw-r--r--src/backend/catalog/pg_type.c26
-rw-r--r--src/backend/commands/_deadcode/version.c6
-rw-r--r--src/backend/commands/async.c76
-rw-r--r--src/backend/commands/cluster.c9
-rw-r--r--src/backend/commands/command.c10
-rw-r--r--src/backend/commands/copy.c68
-rw-r--r--src/backend/commands/creatinh.c7
-rw-r--r--src/backend/commands/dbcommands.c19
-rw-r--r--src/backend/commands/defind.c26
-rw-r--r--src/backend/commands/explain.c12
-rw-r--r--src/backend/commands/proclang.c4
-rw-r--r--src/backend/commands/recipe.c42
-rw-r--r--src/backend/commands/remove.c50
-rw-r--r--src/backend/commands/rename.c46
-rw-r--r--src/backend/commands/sequence.c29
-rw-r--r--src/backend/commands/trigger.c13
-rw-r--r--src/backend/commands/user.c10
-rw-r--r--src/backend/commands/vacuum.c81
-rw-r--r--src/backend/commands/variable.c4
-rw-r--r--src/backend/commands/view.c4
-rw-r--r--src/backend/executor/execAmi.c5
-rw-r--r--src/backend/executor/execFlatten.c5
-rw-r--r--src/backend/executor/execMain.c45
-rw-r--r--src/backend/executor/execQual.c19
-rw-r--r--src/backend/executor/execScan.c16
-rw-r--r--src/backend/executor/execUtils.c7
-rw-r--r--src/backend/executor/functions.c11
-rw-r--r--src/backend/executor/nodeAgg.c647
-rw-r--r--src/backend/executor/nodeAppend.c10
-rw-r--r--src/backend/executor/nodeGroup.c5
-rw-r--r--src/backend/executor/nodeHash.c5
-rw-r--r--src/backend/executor/nodeHashjoin.c8
-rw-r--r--src/backend/executor/nodeIndexscan.c108
-rw-r--r--src/backend/executor/nodeMaterial.c4
-rw-r--r--src/backend/executor/nodeMergejoin.c63
-rw-r--r--src/backend/executor/nodeSeqscan.c8
-rw-r--r--src/backend/executor/nodeSubplan.c4
-rw-r--r--src/backend/executor/nodeTee.c36
-rw-r--r--src/backend/executor/spi.c5
-rw-r--r--src/backend/libpq/auth.c8
-rw-r--r--src/backend/libpq/be-fsstubs.c13
-rw-r--r--src/backend/libpq/hba.c10
-rw-r--r--src/backend/libpq/portal.c4
-rw-r--r--src/backend/libpq/pqcomm.c68
-rw-r--r--src/backend/libpq/pqpacket.c5
-rw-r--r--src/backend/libpq/pqsignal.c4
-rw-r--r--src/backend/main/main.c8
-rw-r--r--src/backend/nodes/copyfuncs.c14
-rw-r--r--src/backend/nodes/equalfuncs.c8
-rw-r--r--src/backend/nodes/list.c12
-rw-r--r--src/backend/nodes/outfuncs.c12
-rw-r--r--src/backend/nodes/print.c15
-rw-r--r--src/backend/nodes/readfuncs.c14
-rw-r--r--src/backend/optimizer/geqo/geqo_eval.c70
-rw-r--r--src/backend/optimizer/geqo/geqo_main.c4
-rw-r--r--src/backend/optimizer/geqo/geqo_misc.c6
-rw-r--r--src/backend/optimizer/geqo/geqo_paths.c18
-rw-r--r--src/backend/optimizer/geqo/minspantree.c18
-rw-r--r--src/backend/optimizer/path/allpaths.c25
-rw-r--r--src/backend/optimizer/path/clausesel.c14
-rw-r--r--src/backend/optimizer/path/costsize.c6
-rw-r--r--src/backend/optimizer/path/hashutils.c6
-rw-r--r--src/backend/optimizer/path/indxpath.c230
-rw-r--r--src/backend/optimizer/path/joinpath.c48
-rw-r--r--src/backend/optimizer/path/joinrels.c70
-rw-r--r--src/backend/optimizer/path/joinutils.c16
-rw-r--r--src/backend/optimizer/path/mergeutils.c4
-rw-r--r--src/backend/optimizer/path/orindxpath.c39
-rw-r--r--src/backend/optimizer/path/predmig.c17
-rw-r--r--src/backend/optimizer/path/prune.c20
-rw-r--r--src/backend/optimizer/path/xfunc.c69
-rw-r--r--src/backend/optimizer/plan/createplan.c37
-rw-r--r--src/backend/optimizer/plan/initsplan.c20
-rw-r--r--src/backend/optimizer/plan/planmain.c19
-rw-r--r--src/backend/optimizer/plan/planner.c284
-rw-r--r--src/backend/optimizer/plan/setrefs.c446
-rw-r--r--src/backend/optimizer/plan/subselect.c25
-rw-r--r--src/backend/optimizer/prep/preptlist.c39
-rw-r--r--src/backend/optimizer/prep/prepunion.c25
-rw-r--r--src/backend/optimizer/util/clauseinfo.c12
-rw-r--r--src/backend/optimizer/util/clauses.c8
-rw-r--r--src/backend/optimizer/util/indexnode.c6
-rw-r--r--src/backend/optimizer/util/joininfo.c10
-rw-r--r--src/backend/optimizer/util/keys.c4
-rw-r--r--src/backend/optimizer/util/pathnode.c20
-rw-r--r--src/backend/optimizer/util/plancat.c13
-rw-r--r--src/backend/optimizer/util/relnode.c5
-rw-r--r--src/backend/optimizer/util/tlist.c26
-rw-r--r--src/backend/parser/analyze.c108
-rw-r--r--src/backend/parser/gram.c18450
-rw-r--r--src/backend/parser/keywords.c11
-rw-r--r--src/backend/parser/parse.h455
-rw-r--r--src/backend/parser/parse_agg.c4
-rw-r--r--src/backend/parser/parse_clause.c264
-rw-r--r--src/backend/parser/parse_coerce.c260
-rw-r--r--src/backend/parser/parse_expr.c16
-rw-r--r--src/backend/parser/parse_func.c173
-rw-r--r--src/backend/parser/parse_node.c31
-rw-r--r--src/backend/parser/parse_oper.c191
-rw-r--r--src/backend/parser/parse_relation.c22
-rw-r--r--src/backend/parser/parse_target.c196
-rw-r--r--src/backend/parser/parse_type.c4
-rw-r--r--src/backend/parser/parser.c6
-rw-r--r--src/backend/parser/scan.c2157
-rw-r--r--src/backend/port/dynloader/aix.h4
-rw-r--r--src/backend/port/dynloader/alpha.h4
-rw-r--r--src/backend/port/dynloader/bsd.c2
-rw-r--r--src/backend/port/dynloader/bsd.h4
-rw-r--r--src/backend/port/dynloader/bsdi.h2
-rw-r--r--src/backend/port/dynloader/dgux.h4
-rw-r--r--src/backend/port/dynloader/irix5.h2
-rw-r--r--src/backend/port/dynloader/linux.h4
-rw-r--r--src/backend/port/dynloader/nextstep.h10
-rw-r--r--src/backend/port/dynloader/sco.h4
-rwxr-xr-xsrc/backend/port/dynloader/solaris_i386.h4
-rwxr-xr-xsrc/backend/port/dynloader/solaris_sparc.h4
-rw-r--r--src/backend/port/dynloader/sunos4.h4
-rw-r--r--src/backend/port/dynloader/svr4.h4
-rw-r--r--src/backend/port/dynloader/ultrix4.h4
-rw-r--r--src/backend/port/dynloader/univel.h2
-rw-r--r--src/backend/port/dynloader/unixware.h2
-rw-r--r--src/backend/port/hpux/fixade.h12
-rw-r--r--src/backend/port/hpux/port-protos.h4
-rw-r--r--src/backend/port/snprintf.c41
-rw-r--r--src/backend/port/strcasecmp.c4
-rw-r--r--src/backend/port/strtol.c2
-rw-r--r--src/backend/port/strtoul.c2
-rw-r--r--src/backend/port/sunos4/float.h4
-rw-r--r--src/backend/postmaster/postmaster.c217
-rw-r--r--src/backend/regex/engine.c111
-rw-r--r--src/backend/regex/regcomp.c110
-rw-r--r--src/backend/regex/regerror.c2
-rw-r--r--src/backend/regex/regexec.c28
-rw-r--r--src/backend/regex/regfree.c7
-rw-r--r--src/backend/rewrite/locks.c65
-rw-r--r--src/backend/rewrite/rewriteDefine.c57
-rw-r--r--src/backend/rewrite/rewriteHandler.c234
-rw-r--r--src/backend/rewrite/rewriteManip.c222
-rw-r--r--src/backend/rewrite/rewriteRemove.c19
-rw-r--r--src/backend/rewrite/rewriteSupport.c13
-rw-r--r--src/backend/storage/buffer/buf_init.c6
-rw-r--r--src/backend/storage/buffer/bufmgr.c40
-rw-r--r--src/backend/storage/buffer/freelist.c4
-rw-r--r--src/backend/storage/buffer/s_lock.c38
-rw-r--r--src/backend/storage/file/fd.c4
-rw-r--r--src/backend/storage/ipc/ipc.c35
-rw-r--r--src/backend/storage/ipc/shmem.c53
-rw-r--r--src/backend/storage/ipc/shmqueue.c18
-rw-r--r--src/backend/storage/ipc/sinval.c5
-rw-r--r--src/backend/storage/ipc/sinvaladt.c22
-rw-r--r--src/backend/storage/ipc/spin.c12
-rw-r--r--src/backend/storage/large_object/inv_api.c82
-rw-r--r--src/backend/storage/lmgr/lmgr.c37
-rw-r--r--src/backend/storage/lmgr/lock.c318
-rw-r--r--src/backend/storage/lmgr/multi.c45
-rw-r--r--src/backend/storage/lmgr/proc.c30
-rw-r--r--src/backend/storage/page/bufpage.c7
-rw-r--r--src/backend/storage/smgr/md.c6
-rw-r--r--src/backend/storage/smgr/mm.c6
-rw-r--r--src/backend/storage/smgr/smgr.c8
-rw-r--r--src/backend/tcop/dest.c10
-rw-r--r--src/backend/tcop/fastpath.c6
-rw-r--r--src/backend/tcop/postgres.c218
-rw-r--r--src/backend/tcop/pquery.c4
-rw-r--r--src/backend/tcop/utility.c90
-rw-r--r--src/backend/tioga/Arr_TgRecipe.h12
-rw-r--r--src/backend/tioga/Varray.h2
-rw-r--r--src/backend/tioga/tgRecipe.c5
-rw-r--r--src/backend/tioga/tgRecipe.h6
-rw-r--r--src/backend/utils/adt/acl.c10
-rw-r--r--src/backend/utils/adt/arrayfuncs.c50
-rw-r--r--src/backend/utils/adt/cash.c55
-rw-r--r--src/backend/utils/adt/chunk.c16
-rw-r--r--src/backend/utils/adt/date.c259
-rw-r--r--src/backend/utils/adt/dt.c63
-rw-r--r--src/backend/utils/adt/float.c10
-rw-r--r--src/backend/utils/adt/geo_ops.c71
-rw-r--r--src/backend/utils/adt/int.c4
-rw-r--r--src/backend/utils/adt/int8.c36
-rw-r--r--src/backend/utils/adt/like.c20
-rw-r--r--src/backend/utils/adt/misc.c10
-rw-r--r--src/backend/utils/adt/name.c4
-rw-r--r--src/backend/utils/adt/not_in.c6
-rw-r--r--src/backend/utils/adt/numutils.c4
-rw-r--r--src/backend/utils/adt/oid.c24
-rw-r--r--src/backend/utils/adt/oracle_compat.c12
-rw-r--r--src/backend/utils/adt/regexp.c4
-rw-r--r--src/backend/utils/adt/regproc.c82
-rw-r--r--src/backend/utils/adt/ruleutils.c2136
-rw-r--r--src/backend/utils/adt/selfuncs.c5
-rw-r--r--src/backend/utils/adt/sets.c6
-rw-r--r--src/backend/utils/adt/varchar.c91
-rw-r--r--src/backend/utils/adt/varlena.c92
-rw-r--r--src/backend/utils/adt/version.c13
-rw-r--r--src/backend/utils/cache/catcache.c8
-rw-r--r--src/backend/utils/cache/fcache.c7
-rw-r--r--src/backend/utils/cache/inval.c25
-rw-r--r--src/backend/utils/cache/lsyscache.c8
-rw-r--r--src/backend/utils/cache/relcache.c54
-rw-r--r--src/backend/utils/cache/syscache.c28
-rw-r--r--src/backend/utils/error/assert.c4
-rw-r--r--src/backend/utils/error/elog.c59
-rw-r--r--src/backend/utils/error/exc.c8
-rw-r--r--src/backend/utils/fmgr/fmgr.c4
-rw-r--r--src/backend/utils/hash/dynahash.c6
-rw-r--r--src/backend/utils/init/findbe.c12
-rw-r--r--src/backend/utils/init/miscinit.c13
-rw-r--r--src/backend/utils/init/postinit.c12
-rw-r--r--src/backend/utils/mb/common.c57
-rw-r--r--src/backend/utils/mb/conv.c684
-rw-r--r--src/backend/utils/mb/mbutils.c269
-rw-r--r--src/backend/utils/mb/utftest.c44
-rw-r--r--src/backend/utils/mb/variable.c70
-rw-r--r--src/backend/utils/mb/wchar.c569
-rw-r--r--src/backend/utils/mb/wstrcmp.c22
-rw-r--r--src/backend/utils/mb/wstrncmp.c45
-rw-r--r--src/backend/utils/misc/database.c16
-rw-r--r--src/backend/utils/misc/superuser.c6
-rw-r--r--src/backend/utils/misc/trace.c178
-rw-r--r--src/backend/utils/mmgr/aset.c5
-rw-r--r--src/backend/utils/mmgr/mcxt.c5
-rw-r--r--src/backend/utils/mmgr/palloc.c6
-rw-r--r--src/backend/utils/mmgr/portalmem.c4
-rw-r--r--src/backend/utils/time/tqual.c12
-rw-r--r--src/bin/pg_dump/common.c8
-rw-r--r--src/bin/pg_dump/pg_dump.c55
-rw-r--r--src/bin/pg_dump/pg_dump.h26
-rw-r--r--src/bin/pg_encoding/pg_encoding.c47
-rw-r--r--src/bin/psql/psql.c217
-rw-r--r--src/bin/psql/psqlHelp.h4
-rw-r--r--src/bin/psql/stringutils.c5
-rw-r--r--src/bin/psql/stringutils.h4
-rw-r--r--src/include/access/attnum.h4
-rw-r--r--src/include/access/funcindex.h4
-rw-r--r--src/include/access/genam.h22
-rw-r--r--src/include/access/gist.h11
-rw-r--r--src/include/access/gistscan.h5
-rw-r--r--src/include/access/giststrat.h5
-rw-r--r--src/include/access/hash.h31
-rw-r--r--src/include/access/heapam.h106
-rw-r--r--src/include/access/hio.h7
-rw-r--r--src/include/access/htup.h4
-rw-r--r--src/include/access/ibit.h4
-rw-r--r--src/include/access/iqual.h7
-rw-r--r--src/include/access/istrat.h19
-rw-r--r--src/include/access/itup.h13
-rw-r--r--src/include/access/nbtree.h55
-rw-r--r--src/include/access/printtup.h4
-rw-r--r--src/include/access/relscan.h4
-rw-r--r--src/include/access/rtree.h19
-rw-r--r--src/include/access/rtscan.h4
-rw-r--r--src/include/access/rtstrat.h7
-rw-r--r--src/include/access/sdir.h4
-rw-r--r--src/include/access/skey.h7
-rw-r--r--src/include/access/strat.h6
-rw-r--r--src/include/access/transam.h25
-rw-r--r--src/include/access/tupdesc.h11
-rw-r--r--src/include/access/valid.h4
-rw-r--r--src/include/access/xact.h24
-rw-r--r--src/include/bootstrap/bootstrap.h7
-rw-r--r--src/include/c.h38
-rw-r--r--src/include/catalog/catalog.h4
-rw-r--r--src/include/catalog/catname.h4
-rw-r--r--src/include/catalog/heap.h8
-rw-r--r--src/include/catalog/index.h19
-rw-r--r--src/include/catalog/indexing.h16
-rw-r--r--src/include/catalog/pg_aggregate.h12
-rw-r--r--src/include/catalog/pg_am.h4
-rw-r--r--src/include/catalog/pg_amop.h10
-rw-r--r--src/include/catalog/pg_amproc.h6
-rw-r--r--src/include/catalog/pg_attrdef.h2
-rw-r--r--src/include/catalog/pg_attribute.h62
-rw-r--r--src/include/catalog/pg_class.h4
-rw-r--r--src/include/catalog/pg_database.h5
-rw-r--r--src/include/catalog/pg_description.h6
-rw-r--r--src/include/catalog/pg_group.h4
-rw-r--r--src/include/catalog/pg_index.h4
-rw-r--r--src/include/catalog/pg_inheritproc.h4
-rw-r--r--src/include/catalog/pg_inherits.h4
-rw-r--r--src/include/catalog/pg_ipl.h4
-rw-r--r--src/include/catalog/pg_language.h4
-rw-r--r--src/include/catalog/pg_listener.h4
-rw-r--r--src/include/catalog/pg_log.h4
-rw-r--r--src/include/catalog/pg_opclass.h4
-rw-r--r--src/include/catalog/pg_operator.h67
-rw-r--r--src/include/catalog/pg_parg.h4
-rw-r--r--src/include/catalog/pg_proc.h73
-rw-r--r--src/include/catalog/pg_relcheck.h2
-rw-r--r--src/include/catalog/pg_rewrite.h4
-rw-r--r--src/include/catalog/pg_shadow.h6
-rw-r--r--src/include/catalog/pg_statistic.h4
-rw-r--r--src/include/catalog/pg_trigger.h2
-rw-r--r--src/include/catalog/pg_type.h13
-rw-r--r--src/include/catalog/pg_variable.h4
-rw-r--r--src/include/catalog/pg_version.h4
-rw-r--r--src/include/commands/async.h4
-rw-r--r--src/include/commands/cluster.h4
-rw-r--r--src/include/commands/command.h10
-rw-r--r--src/include/commands/copy.h7
-rw-r--r--src/include/commands/creatinh.h4
-rw-r--r--src/include/commands/dbcommands.h4
-rw-r--r--src/include/commands/defrem.h13
-rw-r--r--src/include/commands/explain.h4
-rw-r--r--src/include/commands/proclang.h2
-rw-r--r--src/include/commands/recipe.h4
-rw-r--r--src/include/commands/rename.h10
-rw-r--r--src/include/commands/sequence.h4
-rw-r--r--src/include/commands/trigger.h2
-rw-r--r--src/include/commands/user.h2
-rw-r--r--src/include/commands/vacuum.h14
-rw-r--r--src/include/commands/variable.h4
-rw-r--r--src/include/commands/version.h4
-rw-r--r--src/include/commands/view.h4
-rw-r--r--src/include/executor/execFlatten.h4
-rw-r--r--src/include/executor/execdebug.h22
-rw-r--r--src/include/executor/execdefs.h4
-rw-r--r--src/include/executor/execdesc.h7
-rw-r--r--src/include/executor/executor.h57
-rw-r--r--src/include/executor/functions.h10
-rw-r--r--src/include/executor/hashjoin.h4
-rw-r--r--src/include/executor/nodeAgg.h4
-rw-r--r--src/include/executor/nodeAppend.h4
-rw-r--r--src/include/executor/nodeGroup.h4
-rw-r--r--src/include/executor/nodeHash.h13
-rw-r--r--src/include/executor/nodeHashjoin.h7
-rw-r--r--src/include/executor/nodeIndexscan.h4
-rw-r--r--src/include/executor/nodeMaterial.h4
-rw-r--r--src/include/executor/nodeMergejoin.h4
-rw-r--r--src/include/executor/nodeNestloop.h4
-rw-r--r--src/include/executor/nodeResult.h4
-rw-r--r--src/include/executor/nodeSeqscan.h4
-rw-r--r--src/include/executor/nodeSort.h4
-rw-r--r--src/include/executor/nodeSubplan.h2
-rw-r--r--src/include/executor/nodeTee.h4
-rw-r--r--src/include/executor/nodeUnique.h4
-rw-r--r--src/include/executor/spi.h5
-rw-r--r--src/include/executor/tuptable.h4
-rw-r--r--src/include/lib/dllist.h4
-rw-r--r--src/include/lib/fstack.h4
-rw-r--r--src/include/lib/hasht.h4
-rw-r--r--src/include/lib/lispsort.h4
-rw-r--r--src/include/lib/qsort.h7
-rw-r--r--src/include/lib/stringinfo.h4
-rw-r--r--src/include/libpq/auth.h4
-rw-r--r--src/include/libpq/be-fsstubs.h4
-rw-r--r--src/include/libpq/hba.h8
-rw-r--r--src/include/libpq/libpq-be.h14
-rw-r--r--src/include/libpq/libpq-fs.h10
-rw-r--r--src/include/libpq/libpq.h28
-rw-r--r--src/include/libpq/pqcomm.h21
-rw-r--r--src/include/libpq/pqsignal.h4
-rw-r--r--src/include/mb/pg_wchar.h140
-rw-r--r--src/include/miscadmin.h15
-rw-r--r--src/include/nodes/execnodes.h32
-rw-r--r--src/include/nodes/makefuncs.h18
-rw-r--r--src/include/nodes/memnodes.h4
-rw-r--r--src/include/nodes/nodeFuncs.h4
-rw-r--r--src/include/nodes/nodes.h12
-rw-r--r--src/include/nodes/params.h4
-rw-r--r--src/include/nodes/parsenodes.h15
-rw-r--r--src/include/nodes/pg_list.h4
-rw-r--r--src/include/nodes/plannodes.h16
-rw-r--r--src/include/nodes/primnodes.h4
-rw-r--r--src/include/nodes/print.h7
-rw-r--r--src/include/nodes/readfuncs.h4
-rw-r--r--src/include/nodes/relation.h14
-rw-r--r--src/include/optimizer/clauseinfo.h12
-rw-r--r--src/include/optimizer/clauses.h10
-rw-r--r--src/include/optimizer/cost.h23
-rw-r--r--src/include/optimizer/geqo.h6
-rw-r--r--src/include/optimizer/geqo_copy.h4
-rw-r--r--src/include/optimizer/geqo_gene.h4
-rw-r--r--src/include/optimizer/geqo_misc.h6
-rw-r--r--src/include/optimizer/geqo_mutation.h4
-rw-r--r--src/include/optimizer/geqo_paths.h6
-rw-r--r--src/include/optimizer/geqo_pool.h4
-rw-r--r--src/include/optimizer/geqo_random.h4
-rw-r--r--src/include/optimizer/geqo_recombination.h4
-rw-r--r--src/include/optimizer/geqo_selection.h4
-rw-r--r--src/include/optimizer/internal.h4
-rw-r--r--src/include/optimizer/joininfo.h6
-rw-r--r--src/include/optimizer/keys.h6
-rw-r--r--src/include/optimizer/ordering.h13
-rw-r--r--src/include/optimizer/pathnode.h25
-rw-r--r--src/include/optimizer/paths.h32
-rw-r--r--src/include/optimizer/plancat.h19
-rw-r--r--src/include/optimizer/planmain.h26
-rw-r--r--src/include/optimizer/planner.h4
-rw-r--r--src/include/optimizer/prep.h10
-rw-r--r--src/include/optimizer/subselect.h2
-rw-r--r--src/include/optimizer/tlist.h6
-rw-r--r--src/include/optimizer/var.h4
-rw-r--r--src/include/optimizer/xfunc.h18
-rw-r--r--src/include/parser/analyze.h4
-rw-r--r--src/include/parser/gramparse.h4
-rw-r--r--src/include/parser/keywords.h4
-rw-r--r--src/include/parser/parse_agg.h7
-rw-r--r--src/include/parser/parse_clause.h10
-rw-r--r--src/include/parser/parse_coerce.h17
-rw-r--r--src/include/parser/parse_expr.h4
-rw-r--r--src/include/parser/parse_func.h14
-rw-r--r--src/include/parser/parse_node.h13
-rw-r--r--src/include/parser/parse_oper.h4
-rw-r--r--src/include/parser/parse_relation.h16
-rw-r--r--src/include/parser/parse_target.h20
-rw-r--r--src/include/parser/parse_type.h4
-rw-r--r--src/include/parser/parser.h4
-rw-r--r--src/include/parser/parsetree.h4
-rw-r--r--src/include/parser/scansup.h4
-rw-r--r--src/include/port/linux.h3
-rwxr-xr-xsrc/include/port/solaris_i386.h6
-rw-r--r--src/include/port/univel.h2
-rw-r--r--src/include/port/unixware.h4
-rw-r--r--src/include/postgres.h6
-rw-r--r--src/include/regex/cdefs.h12
-rw-r--r--src/include/regex/regex.h9
-rw-r--r--src/include/regex/regex2.h14
-rw-r--r--src/include/regex/regexp.h2
-rw-r--r--src/include/rewrite/locks.h7
-rw-r--r--src/include/rewrite/prs2lock.h4
-rw-r--r--src/include/rewrite/rewriteDefine.h4
-rw-r--r--src/include/rewrite/rewriteHandler.h4
-rw-r--r--src/include/rewrite/rewriteManip.h15
-rw-r--r--src/include/rewrite/rewriteRemove.h4
-rw-r--r--src/include/rewrite/rewriteSupport.h7
-rw-r--r--src/include/rusagestub.h4
-rw-r--r--src/include/storage/backendid.h4
-rw-r--r--src/include/storage/block.h4
-rw-r--r--src/include/storage/buf.h4
-rw-r--r--src/include/storage/buf_internals.h15
-rw-r--r--src/include/storage/bufmgr.h10
-rw-r--r--src/include/storage/bufpage.h7
-rw-r--r--src/include/storage/fd.h4
-rw-r--r--src/include/storage/ipc.h16
-rw-r--r--src/include/storage/item.h4
-rw-r--r--src/include/storage/itemid.h4
-rw-r--r--src/include/storage/itempos.h4
-rw-r--r--src/include/storage/itemptr.h4
-rw-r--r--src/include/storage/large_object.h4
-rw-r--r--src/include/storage/lmgr.h28
-rw-r--r--src/include/storage/lock.h33
-rw-r--r--src/include/storage/multilev.h24
-rw-r--r--src/include/storage/off.h4
-rw-r--r--src/include/storage/page.h4
-rw-r--r--src/include/storage/pagenum.h4
-rw-r--r--src/include/storage/pos.h4
-rw-r--r--src/include/storage/proc.h18
-rw-r--r--src/include/storage/s_lock.h120
-rw-r--r--src/include/storage/shmem.h19
-rw-r--r--src/include/storage/sinval.h7
-rw-r--r--src/include/storage/sinvaladt.h7
-rw-r--r--src/include/storage/smgr.h22
-rw-r--r--src/include/storage/spin.h4
-rw-r--r--src/include/tcop/dest.h7
-rw-r--r--src/include/tcop/fastpath.h4
-rw-r--r--src/include/tcop/pquery.h9
-rw-r--r--src/include/tcop/tcopdebug.h4
-rw-r--r--src/include/tcop/tcopprot.h13
-rw-r--r--src/include/tcop/utility.h4
-rw-r--r--src/include/utils/acl.h13
-rw-r--r--src/include/utils/array.h28
-rw-r--r--src/include/utils/bit.h4
-rw-r--r--src/include/utils/builtins.h14
-rw-r--r--src/include/utils/cash.h2
-rw-r--r--src/include/utils/catcache.h16
-rw-r--r--src/include/utils/datetime.h4
-rw-r--r--src/include/utils/datum.h7
-rw-r--r--src/include/utils/dt.h18
-rw-r--r--src/include/utils/dynahash.h4
-rw-r--r--src/include/utils/dynamic_loader.h6
-rw-r--r--src/include/utils/elog.h4
-rw-r--r--src/include/utils/exc.h10
-rw-r--r--src/include/utils/excid.h4
-rw-r--r--src/include/utils/fcache.h4
-rw-r--r--src/include/utils/fcache2.h4
-rw-r--r--src/include/utils/fmgrtab.h4
-rw-r--r--src/include/utils/geo_decls.h10
-rw-r--r--src/include/utils/hsearch.h7
-rw-r--r--src/include/utils/int8.h16
-rw-r--r--src/include/utils/inval.h4
-rw-r--r--src/include/utils/lselect.h15
-rw-r--r--src/include/utils/lsyscache.h7
-rw-r--r--src/include/utils/mcxt.h7
-rw-r--r--src/include/utils/memutils.h9
-rw-r--r--src/include/utils/module.h4
-rw-r--r--src/include/utils/nabstime.h6
-rw-r--r--src/include/utils/palloc.h4
-rw-r--r--src/include/utils/portal.h7
-rw-r--r--src/include/utils/ps_status.h10
-rw-r--r--src/include/utils/psort.h4
-rw-r--r--src/include/utils/rel.h7
-rw-r--r--src/include/utils/rel2.h7
-rw-r--r--src/include/utils/relcache.h4
-rw-r--r--src/include/utils/sets.h4
-rw-r--r--src/include/utils/syscache.h23
-rw-r--r--src/include/utils/tqual.h24
-rw-r--r--src/include/utils/trace.h51
-rw-r--r--src/interfaces/ecpg/include/ecpgerrno.h6
-rw-r--r--src/interfaces/ecpg/include/ecpglib.h44
-rw-r--r--src/interfaces/ecpg/include/ecpgtype.h32
-rw-r--r--src/interfaces/ecpg/include/sqlca.h73
-rw-r--r--src/interfaces/ecpg/lib/ecpglib.c970
-rw-r--r--src/interfaces/ecpg/lib/typename.c2
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.c60
-rw-r--r--src/interfaces/ecpg/preproc/ecpg_keywords.c4
-rw-r--r--src/interfaces/ecpg/preproc/extern.h70
-rw-r--r--src/interfaces/ecpg/preproc/type.c331
-rw-r--r--src/interfaces/ecpg/preproc/type.h18
-rw-r--r--src/interfaces/libpgtcl/libpgtcl.h4
-rw-r--r--src/interfaces/libpgtcl/pgtcl.c201
-rw-r--r--src/interfaces/libpgtcl/pgtclCmds.c1512
-rw-r--r--src/interfaces/libpgtcl/pgtclCmds.h86
-rw-r--r--src/interfaces/libpgtcl/pgtclId.c975
-rw-r--r--src/interfaces/libpgtcl/pgtclId.h51
-rw-r--r--src/interfaces/libpq/fe-auth.c25
-rw-r--r--src/interfaces/libpq/fe-auth.h9
-rw-r--r--src/interfaces/libpq/fe-connect.c237
-rw-r--r--src/interfaces/libpq/fe-exec.c258
-rw-r--r--src/interfaces/libpq/fe-lobj.c4
-rw-r--r--src/interfaces/libpq/fe-misc.c121
-rw-r--r--src/interfaces/libpq/fe-print.c47
-rw-r--r--src/interfaces/libpq/libpq-fe.h124
-rw-r--r--src/interfaces/libpq/libpq-int.h44
-rw-r--r--src/interfaces/libpq/libpqdll.c6
-rw-r--r--src/interfaces/libpq/pqsignal.c4
-rw-r--r--src/interfaces/libpq/pqsignal.h4
-rw-r--r--src/interfaces/libpq/win32.h2
-rw-r--r--src/interfaces/python/pgmodule.c30
-rw-r--r--src/pl/plpgsql/src/pl_comp.c2200
-rw-r--r--src/pl/plpgsql/src/pl_exec.c3657
-rw-r--r--src/pl/plpgsql/src/pl_funcs.c949
-rw-r--r--src/pl/plpgsql/src/pl_handler.c239
-rw-r--r--src/pl/plpgsql/src/plpgsql.h637
-rw-r--r--src/pl/tcl/pltcl.c45
-rw-r--r--src/test/examples/testlibpq.c6
-rw-r--r--src/test/locale/test-ctype.c69
-rw-r--r--src/test/locale/test-pgsql-locale.c18
-rwxr-xr-xsrc/tools/pgindent/pgindent2
-rw-r--r--src/tutorial/funcs.c7
-rw-r--r--src/utils/getopt.c92
574 files changed, 26547 insertions, 24071 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
index 432bfe02ab..20b075d99b 100644
--- a/src/backend/access/common/heaptuple.c
+++ b/src/backend/access/common/heaptuple.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.40 1998/09/01 03:20:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.41 1998/09/01 04:26:39 momjian Exp $
*
* NOTES
* The old interface functions have been converted to macros
@@ -935,7 +935,8 @@ heap_modifytuple(HeapTuple tuple,
(char *) &tuple->t_oid,
((char *) &tuple->t_hoff - (char *) &tuple->t_oid)); /* XXX */
newTuple->t_infomask = infomask;
- newTuple->t_natts = numberOfAttributes; /* fix t_natts just in case */
+ newTuple->t_natts = numberOfAttributes; /* fix t_natts just in
+ * case */
return newTuple;
}
diff --git a/src/backend/access/common/printtup.c b/src/backend/access/common/printtup.c
index d9b37bcf87..68459beb01 100644
--- a/src/backend/access/common/printtup.c
+++ b/src/backend/access/common/printtup.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.34 1998/09/01 03:20:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.35 1998/09/01 04:26:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -82,8 +82,10 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
Datum attr;
bool isnull;
Oid typoutput;
+
#ifdef MULTIBYTE
unsigned char *p;
+
#endif
/* ----------------
@@ -147,7 +149,7 @@ printtup(HeapTuple tuple, TupleDesc typeinfo)
outputstr = "<unprintable>";
pq_putint(strlen(outputstr) + VARHDRSZ, VARHDRSZ);
pq_putnchar(outputstr, strlen(outputstr));
- }
+ }
}
}
diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c
index df51228305..4e33e362a1 100644
--- a/src/backend/access/common/tupdesc.c
+++ b/src/backend/access/common/tupdesc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.43 1998/09/01 03:20:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.44 1998/09/01 04:26:41 momjian Exp $
*
* NOTES
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -75,7 +75,7 @@ CreateTemplateTupleDesc(int natts)
* ----------------------------------------------------------------
*/
TupleDesc
-CreateTupleDesc(int natts, Form_pg_attribute *attrs)
+CreateTupleDesc(int natts, Form_pg_attribute * attrs)
{
TupleDesc desc;
diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c
index f316ba2b3c..cb5917b206 100644
--- a/src/backend/access/gist/gist.c
+++ b/src/backend/access/gist/gist.c
@@ -33,42 +33,32 @@
#endif
/* non-export function prototypes */
-static InsertIndexResult
-gistdoinsert(Relation r, IndexTuple itup,
+static InsertIndexResult gistdoinsert(Relation r, IndexTuple itup,
GISTSTATE *GISTstate);
-static InsertIndexResult
-gistentryinsert(Relation r, GISTSTACK *stk,
+static InsertIndexResult gistentryinsert(Relation r, GISTSTACK *stk,
IndexTuple tup,
GISTSTATE *giststate);
-static void
-gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
+static void gistentryinserttwo(Relation r, GISTSTACK *stk, IndexTuple ltup,
IndexTuple rtup, GISTSTATE *giststate);
-static void
-gistAdjustKeys(Relation r, GISTSTACK *stk, BlockNumber blk,
+static void gistAdjustKeys(Relation r, GISTSTACK *stk, BlockNumber blk,
char *datum, int att_size, GISTSTATE *giststate);
-static void
-gistintinsert(Relation r, GISTSTACK *stk, IndexTuple ltup,
+static void gistintinsert(Relation r, GISTSTACK *stk, IndexTuple ltup,
IndexTuple rtup, GISTSTATE *giststate);
-static InsertIndexResult
-gistSplit(Relation r, Buffer buffer,
+static InsertIndexResult gistSplit(Relation r, Buffer buffer,
GISTSTACK *stack, IndexTuple itup,
GISTSTATE *giststate);
-static void
-gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt,
+static void gistnewroot(GISTSTATE *giststate, Relation r, IndexTuple lt,
IndexTuple rt);
static void GISTInitBuffer(Buffer b, uint32 f);
-static BlockNumber
-gistChooseSubtree(Relation r, IndexTuple itup, int level,
+static BlockNumber gistChooseSubtree(Relation r, IndexTuple itup, int level,
GISTSTATE *giststate,
GISTSTACK **retstack, Buffer *leafbuf);
-static OffsetNumber
-gistchoose(Relation r, Page p, IndexTuple it,
+static OffsetNumber gistchoose(Relation r, Page p, IndexTuple it,
GISTSTATE *giststate);
static int gistnospace(Page p, IndexTuple it);
void gistdelete(Relation r, ItemPointer tid);
static IndexTuple gist_tuple_replacekey(Relation r, GISTENTRY entry, IndexTuple t);
-static void
-gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
+static void gistcentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l);
static char *int_range_out(INTRANGE *r);
@@ -169,7 +159,7 @@ gistbuild(Relation heap,
slot = NULL;
econtext = NULL;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
/* int the tuples as we insert them */
nh = ni = 0;
@@ -193,7 +183,7 @@ gistbuild(Relation heap,
ni++;
continue;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -207,7 +197,7 @@ gistbuild(Relation heap,
slot->val = htup;
if (ExecQual((List *) pred, econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
ni++;
@@ -286,7 +276,7 @@ gistbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX
ExecDestroyTupleTable(tupleTable, true);
pfree(econtext);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -1168,7 +1158,7 @@ initGISTstate(GISTSTATE *giststate, Relation index)
itupform = (Form_pg_index) GETSTRUCT(htup);
if (!HeapTupleIsValid(htup))
elog(ERROR, "initGISTstate: index %d not found",
- RelationGetRelid(index));
+ RelationGetRelid(index));
giststate->haskeytype = itupform->indhaskeytype;
if (giststate->haskeytype)
{
@@ -1377,4 +1367,4 @@ int_range_out(INTRANGE *r)
return result;
}
-#endif /* defined GISTDEBUG */
+#endif /* defined GISTDEBUG */
diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c
index d34ee84d76..35708bf653 100644
--- a/src/backend/access/gist/gistget.c
+++ b/src/backend/access/gist/gistget.c
@@ -28,15 +28,13 @@
#endif
-static OffsetNumber
-gistfindnext(IndexScanDesc s, Page p, OffsetNumber n,
+static OffsetNumber gistfindnext(IndexScanDesc s, Page p, OffsetNumber n,
ScanDirection dir);
static RetrieveIndexResult gistscancache(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistfirst(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult gistnext(IndexScanDesc s, ScanDirection dir);
static ItemPointer gistheapptr(Relation r, ItemPointer itemp);
-static bool
-gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
+static bool gistindex_keytest(IndexTuple tuple, TupleDesc tupdesc,
int scanKeySize, ScanKey key, GISTSTATE *giststate,
Relation r, Page p, OffsetNumber offset);
diff --git a/src/backend/access/gist/gistscan.c b/src/backend/access/gist/gistscan.c
index b440cbc5e9..f74316cb33 100644
--- a/src/backend/access/gist/gistscan.c
+++ b/src/backend/access/gist/gistscan.c
@@ -29,14 +29,11 @@
/* routines defined and used here */
static void gistregscan(IndexScanDesc s);
static void gistdropscan(IndexScanDesc s);
-static void
-gistadjone(IndexScanDesc s, int op, BlockNumber blkno,
+static void gistadjone(IndexScanDesc s, int op, BlockNumber blkno,
OffsetNumber offnum);
-static void
-adjuststack(GISTSTACK *stk, BlockNumber blkno,
+static void adjuststack(GISTSTACK *stk, BlockNumber blkno,
OffsetNumber offnum);
-static void
-adjustiptr(IndexScanDesc s, ItemPointer iptr,
+static void adjustiptr(IndexScanDesc s, ItemPointer iptr,
int op, BlockNumber blkno, OffsetNumber offnum);
/*
diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c
index 2a12171d0b..e6ca98c709 100644
--- a/src/backend/access/hash/hash.c
+++ b/src/backend/access/hash/hash.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.21 1998/09/01 03:20:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.22 1998/09/01 04:26:48 momjian Exp $
*
* NOTES
* This file contains only the public interface routines.
@@ -118,7 +118,7 @@ hashbuild(Relation heap,
tupleTable = 0;
slot = 0;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
/* build the index */
nhtups = nitups = 0;
@@ -145,7 +145,7 @@ hashbuild(Relation heap,
nitups++;
continue;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -159,7 +159,7 @@ hashbuild(Relation heap,
slot->val = htup;
if (ExecQual((List *) pred, econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
nitups++;
@@ -232,7 +232,7 @@ hashbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX
ExecDestroyTupleTable(tupleTable, true);
pfree(econtext);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
diff --git a/src/backend/access/hash/hashfunc.c b/src/backend/access/hash/hashfunc.c
index 9376ad2e57..c2f928161a 100644
--- a/src/backend/access/hash/hashfunc.c
+++ b/src/backend/access/hash/hashfunc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.11 1998/09/01 03:20:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.12 1998/09/01 04:26:49 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
@@ -136,11 +136,11 @@ hashoid(Oid key)
uint32
hashoid8(Oid *key)
{
- int i;
- uint32 result = 0;
+ int i;
+ uint32 result = 0;
- for (i=0; i < 8; i++)
- result = result ^ (~(uint32)key[i]);
+ for (i = 0; i < 8; i++)
+ result = result ^ (~(uint32) key[i]);
return result;
}
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index bb98e2800c..3b66dd57b2 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.34 1998/09/01 03:21:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.35 1998/09/01 04:26:51 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -109,10 +109,10 @@ static bool ImmediateInvalidation;
*/
static void
initscan(HeapScanDesc scan,
- Relation relation,
- int atend,
- unsigned nkeys,
- ScanKey key)
+ Relation relation,
+ int atend,
+ unsigned nkeys,
+ ScanKey key)
{
if (!RelationGetNumberOfBlocks(relation))
{
@@ -258,7 +258,7 @@ heapgettup(Relation relation,
elog(DEBUG, "heapgettup: relation(%c)=`%s', %p",
relation->rd_rel->relkind, &relation->rd_rel->relname,
snapshot);
-#endif /* !defined(HEAPDEBUGALL) */
+#endif /* !defined(HEAPDEBUGALL) */
if (!ItemPointerIsValid(tid))
Assert(!PointerIsValid(tid));
@@ -283,12 +283,12 @@ heapgettup(Relation relation,
/* assume it is a valid TID XXX */
if (ItemPointerIsValid(tid) == false)
{
- *buf= InvalidBuffer;
+ *buf = InvalidBuffer;
return NULL;
}
*buf = RelationGetBufferWithBuffer(relation,
- ItemPointerGetBlockNumber(tid),
- *buf);
+ ItemPointerGetBlockNumber(tid),
+ *buf);
#ifndef NO_BUFFERISVALID
if (!BufferIsValid(*buf))
@@ -414,6 +414,7 @@ heapgettup(Relation relation,
if (ItemPointerGetBlockNumber(iptr) != page)
{
+
/*
* set block id to the correct page number --- this is
* a hack to support the virtual fragment concept
@@ -762,7 +763,7 @@ elog(DEBUG, "heap_getnext([%s,nkeys=%d],backw=%d) called", \
#define HEAPDEBUG_5
#define HEAPDEBUG_6
#define HEAPDEBUG_7
-#endif /* !defined(HEAPDEBUGALL) */
+#endif /* !defined(HEAPDEBUGALL) */
HeapTuple
@@ -990,7 +991,7 @@ heap_getnext(HeapScanDesc scandesc, int backw)
* value, and they are required to BuffferRelease() it when they
* are done. If they want to make a copy of it before releasing it,
* they can call heap_copytyple().
-
+
* ----------------
*/
HeapTuple
@@ -1005,8 +1006,8 @@ heap_fetch(Relation relation,
HeapTuple tuple;
OffsetNumber offnum;
- AssertMacro(PointerIsValid(userbuf)); /* see comments above */
-
+ AssertMacro(PointerIsValid(userbuf)); /* see comments above */
+
/* ----------------
* increment access statistics
* ----------------
@@ -1074,7 +1075,8 @@ heap_fetch(Relation relation,
* ----------------
*/
- *userbuf = buffer; /* user is required to ReleaseBuffer() this */
+ *userbuf = buffer; /* user is required to ReleaseBuffer()
+ * this */
return tuple;
}
@@ -1193,7 +1195,7 @@ heap_delete(Relation relation, ItemPointer tid)
{ /* XXX L_SH better ??? */
elog(ERROR, "heap_delete: failed ReadBuffer");
}
-#endif /* NO_BUFFERISVALID */
+#endif /* NO_BUFFERISVALID */
dp = (PageHeader) BufferGetPage(buf);
lp = PageGetItemId(dp, ItemPointerGetOffsetNumber(tid));
@@ -1206,10 +1208,11 @@ heap_delete(Relation relation, ItemPointer tid)
Assert(HeapTupleIsValid(tp));
if (TupleUpdatedByCurXactAndCmd(tp))
{
+
/*
- Vadim says this is no longer needed 1998/6/15
- elog(NOTICE, "Non-functional delete, tuple already deleted");
- */
+ * Vadim says this is no longer needed 1998/6/15 elog(NOTICE,
+ * "Non-functional delete, tuple already deleted");
+ */
if (IsSystemRelationName(RelationGetRelationName(relation)->data))
RelationUnsetLockForWrite(relation);
ReleaseBuffer(buf);
@@ -1309,7 +1312,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple replace_tuple)
/* XXX L_SH better ??? */
elog(ERROR, "amreplace: failed ReadBuffer");
}
-#endif /* NO_BUFFERISVALID */
+#endif /* NO_BUFFERISVALID */
dp = (Page) BufferGetPage(buffer);
lp = PageGetItemId(dp, ItemPointerGetOffsetNumber(otid));
diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c
index fdfbddde91..4c2289ce16 100644
--- a/src/backend/access/index/indexam.c
+++ b/src/backend/access/index/indexam.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.24 1998/09/01 03:21:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.25 1998/09/01 04:26:55 momjian Exp $
*
* INTERFACE ROUTINES
* index_open - open an index relation by relationId
@@ -112,7 +112,7 @@
CppAsString(x), CppAsString(y)) \
: (void)NULL \
)
-
+
#define GET_SCAN_PROCEDURE(x,y) \
( \
procedure = scan->relation->rd_am->y, \
@@ -331,7 +331,7 @@ index_getnext(IndexScanDesc scan,
* have the am's gettuple proc do all the work.
* ----------------
*/
- result = (RetrieveIndexResult)fmgr(procedure, scan, direction);
+ result = (RetrieveIndexResult) fmgr(procedure, scan, direction);
return result;
}
diff --git a/src/backend/access/index/istrat.c b/src/backend/access/index/istrat.c
index b92faa655f..403a51f3ba 100644
--- a/src/backend/access/index/istrat.c
+++ b/src/backend/access/index/istrat.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.27 1998/09/01 03:21:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.28 1998/09/01 04:26:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,16 +29,13 @@
#ifdef USE_ASSERT_CHECKING
static bool StrategyEvaluationIsValid(StrategyEvaluation evaluation);
-static bool
-StrategyExpressionIsValid(StrategyExpression expression,
+static bool StrategyExpressionIsValid(StrategyExpression expression,
StrategyNumber maxStrategy);
static ScanKey StrategyMapGetScanKeyEntry(StrategyMap map,
StrategyNumber strategyNumber);
-static bool
-StrategyOperatorIsValid(StrategyOperator operator,
+static bool StrategyOperatorIsValid(StrategyOperator operator,
StrategyNumber maxStrategy);
-static bool
-StrategyTermIsValid(StrategyTerm term,
+static bool StrategyTermIsValid(StrategyTerm term,
StrategyNumber maxStrategy);
#endif
@@ -378,8 +375,8 @@ RelationInvokeStrategy(Relation relation,
termData.degree = 1;
strategyMap = IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
- evaluation->maxStrategy,
- attributeNumber);
+ evaluation->maxStrategy,
+ attributeNumber);
entry = StrategyMapGetScanKeyEntry(strategyMap, strategy);
@@ -456,9 +453,7 @@ RelationInvokeStrategy(Relation relation,
}
if (index == (*termP)->degree)
- {
return StrategyTermEvaluate(*termP, strategyMap, left, right);
- }
termP += 1;
}
@@ -494,7 +489,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
else
{
ScanKeyData scanKeyData;
-
+
ScanKeyEntryInitialize(&scanKeyData, 0,
ObjectIdAttributeNumber,
F_OIDEQ,
@@ -502,7 +497,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
scan = heap_beginscan(operatorRelation, false, SnapshotNow,
1, &scanKeyData);
-
+
tuple = heap_getnext(scan, 0);
}
@@ -521,7 +516,7 @@ OperatorRelationFillScanKeyEntry(Relation operatorRelation,
if (IsBootstrapProcessingMode())
heap_endscan(scan);
-
+
if (!RegProcedureIsValid(entry->sk_procedure))
{
elog(ERROR,
@@ -565,7 +560,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
ScanKeyEntryInitialize(&entry[0], 0, Anum_pg_index_indexrelid,
F_OIDEQ,
ObjectIdGetDatum(indexObjectId));
-
+
relation = heap_openr(IndexRelationName);
scan = heap_beginscan(relation, false, SnapshotNow, 1, entry);
tuple = heap_getnext(scan, 0);
@@ -601,7 +596,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
heap_endscan(scan);
heap_close(relation);
}
-
+
/* if support routines exist for this access method, load them */
if (maxSupportNumber > 0)
{
@@ -615,7 +610,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
relation = heap_openr(AccessMethodProcedureRelationName);
for (attributeNumber = 1; attributeNumber <= maxAttributeNumber;
- attributeNumber++)
+ attributeNumber++)
{
int16 support;
Form_pg_amproc form;
@@ -723,4 +718,4 @@ IndexStrategyDisplay(IndexStrategy indexStrategy,
}
}
-#endif /* defined(ISTRATDEBUG) */
+#endif /* defined(ISTRATDEBUG) */
diff --git a/src/backend/access/nbtree/nbtcompare.c b/src/backend/access/nbtree/nbtcompare.c
index 65db2d3e1a..b4b3156593 100644
--- a/src/backend/access/nbtree/nbtcompare.c
+++ b/src/backend/access/nbtree/nbtcompare.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.18 1998/09/01 03:21:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.19 1998/09/01 04:26:59 momjian Exp $
*
* NOTES
* These functions are stored in pg_amproc. For each operator class
@@ -87,10 +87,11 @@ btoidcmp(Oid a, Oid b)
int32
btoid8cmp(Oid *a, Oid *b)
{
- int i;
- for (i=0; i < 8; i++)
+ int i;
+
+ for (i = 0; i < 8; i++)
/* we use this because we need the int4gt, etc */
- if (!int4eq(a[i], b[i]))
+ if (!int4eq(a[i], b[i]))
if (int4gt(a[i], b[i]))
return 1;
else
diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c
index f6a34e97ac..c2fa05eb22 100644
--- a/src/backend/access/nbtree/nbtinsert.c
+++ b/src/backend/access/nbtree/nbtinsert.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.29 1998/09/01 03:21:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.30 1998/09/01 04:27:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,7 +54,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
int natts = rel->rd_rel->relnatts;
InsertIndexResult res;
Buffer buffer;
-
+
itup = &(btitem->bti_itup);
/* we need a scan key to do our search, so build one */
diff --git a/src/backend/access/nbtree/nbtree.c b/src/backend/access/nbtree/nbtree.c
index 082cfe3628..d486bb432d 100644
--- a/src/backend/access/nbtree/nbtree.c
+++ b/src/backend/access/nbtree/nbtree.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.31 1998/09/01 03:21:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.32 1998/09/01 04:27:03 momjian Exp $
*
* NOTES
* This file contains only the public interface routines.
@@ -44,7 +44,7 @@ bool BuildingBtree = false; /* see comment in btbuild() */
bool FastBuild = true; /* use sort/build instead of insertion
* build */
-static void _bt_restscan(IndexScanDesc scan);
+static void _bt_restscan(IndexScanDesc scan);
/*
* btbuild() -- build a new btree index.
@@ -151,7 +151,7 @@ btbuild(Relation heap,
*/
usefast = false;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
/* start a heap scan */
/* build the index */
@@ -184,7 +184,7 @@ btbuild(Relation heap,
nitups++;
continue;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -198,7 +198,7 @@ btbuild(Relation heap,
slot->val = htup;
if (ExecQual((List *) pred, econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
nitups++;
@@ -283,7 +283,7 @@ btbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX
ExecDestroyTupleTable(tupleTable, true);
pfree(econtext);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -361,14 +361,13 @@ btinsert(Relation rel, Datum *datum, char *nulls, ItemPointer ht_ctid, Relation
/*
* See comments in btbuild.
*
- * if (itup->t_info & INDEX_NULL_MASK)
- return (InsertIndexResult) NULL;
+ * if (itup->t_info & INDEX_NULL_MASK) return (InsertIndexResult) NULL;
*/
btitem = _bt_formitem(itup);
res = _bt_doinsert(rel, btitem,
- IndexIsUnique(RelationGetRelid(rel)), heapRel);
+ IndexIsUnique(RelationGetRelid(rel)), heapRel);
pfree(btitem);
pfree(itup);
@@ -397,27 +396,26 @@ btgettuple(IndexScanDesc scan, ScanDirection dir)
if (ItemPointerIsValid(&(scan->currentItemData)))
{
+
/*
* Now we don't adjust scans on insertion (comments in
- * nbtscan.c:_bt_scandel()) and I hope that we will unlock
- * current index page before leaving index in LLL: this
- * means that current index tuple could be moved right
- * before we get here and we have to restore our scan
- * position. We save heap TID pointed by current index
- * tuple and use it. This will work untill we start
- * to re-use (move heap tuples) without vacuum...
- * - vadim 07/29/98
+ * nbtscan.c:_bt_scandel()) and I hope that we will unlock current
+ * index page before leaving index in LLL: this means that current
+ * index tuple could be moved right before we get here and we have
+ * to restore our scan position. We save heap TID pointed by
+ * current index tuple and use it. This will work untill we start
+ * to re-use (move heap tuples) without vacuum... - vadim 07/29/98
*/
_bt_restscan(scan);
res = _bt_next(scan, dir);
}
else
res = _bt_first(scan, dir);
-
+
/* Save heap TID to use it in _bt_restscan */
if (res)
- ((BTScanOpaque)scan->opaque)->curHeapIptr = res->heap_iptr;
-
+ ((BTScanOpaque) scan->opaque)->curHeapIptr = res->heap_iptr;
+
return (char *) res;
}
@@ -627,33 +625,34 @@ btdelete(Relation rel, ItemPointer tid)
static void
_bt_restscan(IndexScanDesc scan)
{
- Relation rel = scan->relation;
- BTScanOpaque so = (BTScanOpaque) scan->opaque;
- Buffer buf = so->btso_curbuf;
- Page page = BufferGetPage(buf);
- ItemPointer current = &(scan->currentItemData);
- OffsetNumber offnum = ItemPointerGetOffsetNumber(current),
- maxoff = PageGetMaxOffsetNumber(page);
- BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page);
- ItemPointerData target = so->curHeapIptr;
- BTItem item;
- BlockNumber blkno;
+ Relation rel = scan->relation;
+ BTScanOpaque so = (BTScanOpaque) scan->opaque;
+ Buffer buf = so->btso_curbuf;
+ Page page = BufferGetPage(buf);
+ ItemPointer current = &(scan->currentItemData);
+ OffsetNumber offnum = ItemPointerGetOffsetNumber(current),
+ maxoff = PageGetMaxOffsetNumber(page);
+ BTPageOpaque opaque = (BTPageOpaque) PageGetSpecialPointer(page);
+ ItemPointerData target = so->curHeapIptr;
+ BTItem item;
+ BlockNumber blkno;
if (maxoff >= offnum)
{
- /*
- * if the item is where we left it or has just moved right
- * on this page, we're done
+
+ /*
+ * if the item is where we left it or has just moved right on this
+ * page, we're done
*/
- for ( ;
+ for (;
offnum <= maxoff;
offnum = OffsetNumberNext(offnum))
{
item = (BTItem) PageGetItem(page, PageGetItemId(page, offnum));
if (item->bti_itup.t_tid.ip_blkid.bi_hi == \
- target.ip_blkid.bi_hi && \
+ target.ip_blkid.bi_hi && \
item->bti_itup.t_tid.ip_blkid.bi_lo == \
- target.ip_blkid.bi_lo && \
+ target.ip_blkid.bi_lo && \
item->bti_itup.t_tid.ip_posid == target.ip_posid)
{
current->ip_posid = offnum;
@@ -662,8 +661,8 @@ _bt_restscan(IndexScanDesc scan)
}
}
- /*
- * By here, the item we're looking for moved right at least one page
+ /*
+ * By here, the item we're looking for moved right at least one page
*/
for (;;)
{
@@ -678,15 +677,15 @@ _bt_restscan(IndexScanDesc scan)
opaque = (BTPageOpaque) PageGetSpecialPointer(page);
/* see if it's on this page */
- for (offnum = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY ;
+ for (offnum = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
offnum <= maxoff;
offnum = OffsetNumberNext(offnum))
{
item = (BTItem) PageGetItem(page, PageGetItemId(page, offnum));
if (item->bti_itup.t_tid.ip_blkid.bi_hi == \
- target.ip_blkid.bi_hi && \
+ target.ip_blkid.bi_hi && \
item->bti_itup.t_tid.ip_blkid.bi_lo == \
- target.ip_blkid.bi_lo && \
+ target.ip_blkid.bi_lo && \
item->bti_itup.t_tid.ip_posid == target.ip_posid)
{
ItemPointerSet(current, blkno, offnum);
diff --git a/src/backend/access/nbtree/nbtscan.c b/src/backend/access/nbtree/nbtscan.c
index 11b7659376..55869592e4 100644
--- a/src/backend/access/nbtree/nbtscan.c
+++ b/src/backend/access/nbtree/nbtscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.17 1998/09/01 03:21:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.18 1998/09/01 04:27:04 momjian Exp $
*
*
* NOTES
@@ -166,10 +166,10 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
so->btso_curbuf = buf;
if (ItemPointerIsValid(current))
{
- Page page = BufferGetPage(buf);
- BTItem btitem = (BTItem) PageGetItem(page,
- PageGetItemId(page, ItemPointerGetOffsetNumber(current)));
-
+ Page page = BufferGetPage(buf);
+ BTItem btitem = (BTItem) PageGetItem(page,
+ PageGetItemId(page, ItemPointerGetOffsetNumber(current)));
+
so->curHeapIptr = btitem->bti_itup.t_tid;
}
}
@@ -209,10 +209,10 @@ _bt_scandel(IndexScanDesc scan, int op, BlockNumber blkno, OffsetNumber offno)
scan->currentItemData = tmp;
if (ItemPointerIsValid(current))
{
- Page page = BufferGetPage(buf);
- BTItem btitem = (BTItem) PageGetItem(page,
- PageGetItemId(page, ItemPointerGetOffsetNumber(current)));
-
+ Page page = BufferGetPage(buf);
+ BTItem btitem = (BTItem) PageGetItem(page,
+ PageGetItemId(page, ItemPointerGetOffsetNumber(current)));
+
so->mrkHeapIptr = btitem->bti_itup.t_tid;
}
}
diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c
index 8584f20587..6e6732010d 100644
--- a/src/backend/access/nbtree/nbtsearch.c
+++ b/src/backend/access/nbtree/nbtsearch.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.37 1998/09/01 03:21:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.38 1998/09/01 04:27:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,14 +28,11 @@
#endif
-static BTStack
-_bt_searchr(Relation rel, int keysz, ScanKey scankey,
+static BTStack _bt_searchr(Relation rel, int keysz, ScanKey scankey,
Buffer *bufP, BTStack stack_in);
-static OffsetNumber
-_bt_firsteq(Relation rel, TupleDesc itupdesc, Page page,
+static OffsetNumber _bt_firsteq(Relation rel, TupleDesc itupdesc, Page page,
Size keysz, ScanKey scankey, OffsetNumber offnum);
-static int
-_bt_compare(Relation rel, TupleDesc itupdesc, Page page,
+static int _bt_compare(Relation rel, TupleDesc itupdesc, Page page,
int keysz, ScanKey scankey, OffsetNumber offnum);
static bool
_bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir);
@@ -219,8 +216,8 @@ _bt_moveright(Relation rel,
if (_bt_skeycmp(rel, keysz, scankey, page,
PageGetItemId(page, P_FIRSTKEY),
BTEqualStrategyNumber))
- elog(FATAL, "btree: BTP_CHAIN flag was expected in %s (access = %s)",
- rel->rd_rel->relname, access ? "bt_write" : "bt_read");
+ elog(FATAL, "btree: BTP_CHAIN flag was expected in %s (access = %s)",
+ rel->rd_rel->relname, access ? "bt_write" : "bt_read");
if (_bt_skeycmp(rel, keysz, scankey, page,
PageGetItemId(page, offmax),
BTEqualStrategyNumber))
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 5fb3145c36..30d74ced97 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -5,7 +5,7 @@
*
*
* IDENTIFICATION
- * $Id: nbtsort.c,v 1.32 1998/09/01 03:21:19 momjian Exp $
+ * $Id: nbtsort.c,v 1.33 1998/09/01 04:27:07 momjian Exp $
*
* NOTES
*
@@ -184,7 +184,7 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
return 1; /* 1 > 2 */
}
else if (k2->btsk_item == (BTItem) NULL)
- return -1; /* 1 < 2 */
+ return -1; /* 1 < 2 */
for (i = 0; i < _bt_nattr; i++)
{
@@ -198,14 +198,14 @@ _bt_isortcmp(BTSortKey *k1, BTSortKey *k2)
return 1; /* NULL ">" NOT_NULL */
}
else if (k2_nulls[i] != ' ') /* k2 attr is NULL */
- return -1; /* NOT_NULL "<" NULL */
+ return -1; /* NOT_NULL "<" NULL */
if (_bt_invokestrat(_bt_sortrel, i + 1, BTGreaterStrategyNumber,
k1_datum[i], k2_datum[i]))
return 1; /* 1 > 2 */
else if (_bt_invokestrat(_bt_sortrel, i + 1, BTGreaterStrategyNumber,
k2_datum[i], k1_datum[i]))
- return -1; /* 1 < 2 */
+ return -1; /* 1 < 2 */
}
if (_bt_inspool->isunique && !equal_isnull)
@@ -731,7 +731,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
printf("_bt_spool: inserted <%x> into output tape %d\n",
d, btspool->bts_tape);
}
-#endif /* FASTBUILD_DEBUG && FASTBUILD_SPOOL */
+#endif /* FASTBUILD_DEBUG && FASTBUILD_SPOOL */
}
/*
@@ -975,7 +975,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
printf("_bt_buildadd: moved <%x> to offset %d at level %d\n",
d, n, state->btps_level);
}
-#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
+#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
#endif
}
@@ -1058,7 +1058,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
printf("_bt_buildadd: inserted <%x> at offset %d at level %d\n",
d, off, state->btps_level);
}
-#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
+#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
#endif
if (last_bti == (BTItem) NULL)
first_off = P_FIRSTKEY;
@@ -1254,7 +1254,7 @@ _bt_merge(Relation index, BTSpool *btspool)
npass, nruns, d, t,
BufferGetBlockNumber(state->btps_buf));
}
-#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
+#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
}
else
{
@@ -1283,7 +1283,7 @@ _bt_merge(Relation index, BTSpool *btspool)
npass, nruns, d, t,
btspool->bts_tape);
}
-#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
+#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
}
if (btsk.btsk_datum != (Datum *) NULL)
@@ -1408,7 +1408,7 @@ _bt_upperbuild(Relation index)
printf("_bt_upperbuild: inserting <%x> at %d\n",
d, state->btps_level);
}
-#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
+#endif /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
_bt_buildadd(index, state, nbti, 0);
pfree((void *) nbti);
}
diff --git a/src/backend/access/rtree/rtget.c b/src/backend/access/rtree/rtget.c
index 644240e650..4df0adf5c4 100644
--- a/src/backend/access/rtree/rtget.c
+++ b/src/backend/access/rtree/rtget.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.11 1998/09/01 03:21:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.12 1998/09/01 04:27:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,8 +27,7 @@
#endif
-static OffsetNumber
-findnext(IndexScanDesc s, Page p, OffsetNumber n,
+static OffsetNumber findnext(IndexScanDesc s, Page p, OffsetNumber n,
ScanDirection dir);
static RetrieveIndexResult rtscancache(IndexScanDesc s, ScanDirection dir);
static RetrieveIndexResult rtfirst(IndexScanDesc s, ScanDirection dir);
diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c
index 2352b9b7e7..a9b2eff681 100644
--- a/src/backend/access/rtree/rtree.c
+++ b/src/backend/access/rtree/rtree.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.27 1998/09/01 03:21:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.28 1998/09/01 04:27:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,25 +50,19 @@ typedef struct RTSTATE
} RTSTATE;
/* non-export function prototypes */
-static InsertIndexResult
-rtdoinsert(Relation r, IndexTuple itup,
+static InsertIndexResult rtdoinsert(Relation r, IndexTuple itup,
RTSTATE *rtstate);
-static void
-rttighten(Relation r, RTSTACK *stk, char *datum, int att_size,
+static void rttighten(Relation r, RTSTACK *stk, char *datum, int att_size,
RTSTATE *rtstate);
-static InsertIndexResult
-dosplit(Relation r, Buffer buffer, RTSTACK *stack,
+static InsertIndexResult dosplit(Relation r, Buffer buffer, RTSTACK *stack,
IndexTuple itup, RTSTATE *rtstate);
-static void
-rtintinsert(Relation r, RTSTACK *stk, IndexTuple ltup,
+static void rtintinsert(Relation r, RTSTACK *stk, IndexTuple ltup,
IndexTuple rtup, RTSTATE *rtstate);
static void rtnewroot(Relation r, IndexTuple lt, IndexTuple rt);
-static void
-picksplit(Relation r, Page page, SPLITVEC *v, IndexTuple itup,
+static void picksplit(Relation r, Page page, SPLITVEC *v, IndexTuple itup,
RTSTATE *rtstate);
static void RTInitBuffer(Buffer b, uint32 f);
-static OffsetNumber
-choose(Relation r, Page p, IndexTuple it,
+static OffsetNumber choose(Relation r, Page p, IndexTuple it,
RTSTATE *rtstate);
static int nospace(Page p, IndexTuple it);
static void initRtstate(RTSTATE *rtstate, Relation index);
@@ -163,12 +157,12 @@ rtbuild(Relation heap,
tupleTable = NULL;
slot = NULL;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
/* count the tuples as we insert them */
nh = ni = 0;
- scan = heap_beginscan(heap, 0, SnapshotNow, 0, (ScanKey) NULL);
+ scan = heap_beginscan(heap, 0, SnapshotNow, 0, (ScanKey) NULL);
while (HeapTupleIsValid(htup = heap_getnext(scan, 0)))
{
@@ -188,7 +182,7 @@ rtbuild(Relation heap,
ni++;
continue;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -202,7 +196,7 @@ rtbuild(Relation heap,
slot->val = htup;
if (ExecQual((List *) pred, econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
ni++;
@@ -263,7 +257,7 @@ rtbuild(Relation heap,
#ifndef OMIT_PARTIAL_INDEX
ExecDestroyTupleTable(tupleTable, true);
pfree(econtext);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -1042,4 +1036,4 @@ _rtdump(Relation r)
}
}
-#endif /* defined RTDEBUG */
+#endif /* defined RTDEBUG */
diff --git a/src/backend/access/rtree/rtscan.c b/src/backend/access/rtree/rtscan.c
index 21e1f1c311..6d0bb632e7 100644
--- a/src/backend/access/rtree/rtscan.c
+++ b/src/backend/access/rtree/rtscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.18 1998/09/01 03:21:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.19 1998/09/01 04:27:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,14 +30,11 @@
/* routines defined and used here */
static void rtregscan(IndexScanDesc s);
static void rtdropscan(IndexScanDesc s);
-static void
-rtadjone(IndexScanDesc s, int op, BlockNumber blkno,
+static void rtadjone(IndexScanDesc s, int op, BlockNumber blkno,
OffsetNumber offnum);
-static void
-adjuststack(RTSTACK *stk, BlockNumber blkno,
+static void adjuststack(RTSTACK *stk, BlockNumber blkno,
OffsetNumber offnum);
-static void
-adjustiptr(IndexScanDesc s, ItemPointer iptr,
+static void adjustiptr(IndexScanDesc s, ItemPointer iptr,
int op, BlockNumber blkno, OffsetNumber offnum);
/*
diff --git a/src/backend/access/rtree/rtstrat.c b/src/backend/access/rtree/rtstrat.c
index 04c5728888..f610bfc2ed 100644
--- a/src/backend/access/rtree/rtstrat.c
+++ b/src/backend/access/rtree/rtstrat.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.9 1998/09/01 03:21:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtstrat.c,v 1.10 1998/09/01 04:27:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,8 +18,7 @@
#include <access/rtree.h>
#include <access/istrat.h>
-static StrategyNumber
-RelationGetRTStrategy(Relation r,
+static StrategyNumber RelationGetRTStrategy(Relation r,
AttrNumber attnum, RegProcedure proc);
/*
diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c
index 284400116d..5bcce3c2d7 100644
--- a/src/backend/access/transam/transam.c
+++ b/src/backend/access/transam/transam.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.18 1998/09/01 03:21:31 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.19 1998/09/01 04:27:15 momjian Exp $
*
* NOTES
* This file contains the high level access-method interface to the
@@ -29,8 +29,7 @@
static int RecoveryCheckingEnabled(void);
static void TransRecover(Relation logRelation);
static bool TransactionLogTest(TransactionId transactionId, XidStatus status);
-static void
-TransactionLogUpdate(TransactionId transactionId,
+static void TransactionLogUpdate(TransactionId transactionId,
XidStatus status);
/* ----------------
diff --git a/src/backend/access/transam/transsup.c b/src/backend/access/transam/transsup.c
index 51879019c8..6f1b09b577 100644
--- a/src/backend/access/transam/transsup.c
+++ b/src/backend/access/transam/transsup.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.16 1998/01/07 21:02:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.17 1998/09/01 04:27:16 momjian Exp $
*
* NOTES
* This file contains support functions for the high
@@ -23,11 +23,9 @@
#include <access/xact.h>
#include <storage/lmgr.h>
-static XidStatus
-TransBlockGetXidStatus(Block tblock,
+static XidStatus TransBlockGetXidStatus(Block tblock,
TransactionId transactionId);
-static void
-TransBlockSetXidStatus(Block tblock,
+static void TransBlockSetXidStatus(Block tblock,
TransactionId transactionId, XidStatus xstatus);
/* ----------------------------------------------------------------
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index ef669df70e..2c49c05c12 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.16 1998/07/21 06:17:13 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/varsup.c,v 1.17 1998/09/01 04:27:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,7 @@ static void VariableRelationPutNextOid(Oid *oidP);
*/
int OidGenLockId;
-VariableCache ShmemVariableCache = NULL;
+VariableCache ShmemVariableCache = NULL;
/* ----------------------------------------------------------------
* variable relation query/update routines
@@ -292,11 +292,11 @@ GetNewTransactionId(TransactionId *xid)
}
SpinAcquire(OidGenLockId); /* not good for concurrency... */
-
+
if (ShmemVariableCache->xid_count == 0)
{
TransactionId nextid;
-
+
VariableRelationGetNextXid(&nextid);
TransactionIdStore(nextid, &(ShmemVariableCache->nextXid));
ShmemVariableCache->xid_count = VAR_XID_PREFETCH;
@@ -307,7 +307,7 @@ GetNewTransactionId(TransactionId *xid)
TransactionIdStore(ShmemVariableCache->nextXid, xid);
TransactionIdAdd(&(ShmemVariableCache->nextXid), 1);
(ShmemVariableCache->xid_count)--;
-
+
SpinRelease(OidGenLockId);
}
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index e40f49fc87..d082c805cd 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.22 1998/09/01 03:21:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.23 1998/09/01 04:27:19 momjian Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@@ -898,7 +898,7 @@ CommitTransaction()
* ----------------
*/
- /* handle commit for large objects [ PA, 7/17/98 ] */
+ /* handle commit for large objects [ PA, 7/17/98 ] */
_lo_commit();
CloseSequences();
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 18497cb2f2..2f8fd05310 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -7,7 +7,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.50 1998/09/01 03:21:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.51 1998/09/01 04:27:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -325,7 +325,8 @@ BootstrapMain(int argc, char *argv[])
DataDir = optarg;
break;
case 'd':
- DebugMode = true; /* print out debugging info while parsing */
+ DebugMode = true; /* print out debugging info while
+ * parsing */
break;
case 'C':
Noversion = true;
@@ -601,7 +602,7 @@ DefineAttr(char *name, char *type, int attnum)
printf("<%s %s> ", attrtypes[attnum]->attname.data, type);
attrtypes[attnum]->attnum = 1 + attnum; /* fillatt */
attlen = attrtypes[attnum]->attlen = Procid[typeoid].len;
- attrtypes[attnum]->attbyval = (attlen == 1) || (attlen == 2) ||(attlen == 4);
+ attrtypes[attnum]->attbyval = (attlen == 1) || (attlen == 2) || (attlen == 4);
attrtypes[attnum]->attalign = 'i';
}
attrtypes[attnum]->attcacheoff = -1;
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 3d778d2609..d432269a36 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.15 1998/09/01 03:21:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.16 1998/09/01 04:27:27 momjian Exp $
*
* NOTES
* See acl.h.
@@ -185,7 +185,7 @@ get_grosysid(char *groname)
tuple = SearchSysCacheTuple(GRONAME,
PointerGetDatum(groname),
- 0, 0, 0);
+ 0, 0, 0);
if (HeapTupleIsValid(tuple))
id = ((Form_pg_group) GETSTRUCT(tuple))->grosysid;
else
@@ -201,7 +201,7 @@ get_groname(AclId grosysid)
tuple = SearchSysCacheTuple(GROSYSID,
ObjectIdGetDatum(grosysid),
- 0, 0, 0);
+ 0, 0, 0);
if (HeapTupleIsValid(tuple))
name = (((Form_pg_group) GETSTRUCT(tuple))->groname).data;
else
@@ -229,13 +229,13 @@ in_group(AclId uid, AclId gid)
}
tuple = SearchSysCacheTuple(GROSYSID,
ObjectIdGetDatum(gid),
- 0, 0, 0);
+ 0, 0, 0);
if (HeapTupleIsValid(tuple) &&
!heap_attisnull(tuple, Anum_pg_group_grolist))
{
tmp = (IdList *) heap_getattr(tuple,
Anum_pg_group_grolist,
- RelationGetDescr(relation),
+ RelationGetDescr(relation),
(bool *) NULL);
/* XXX make me a function */
num = IDLIST_NUM(tmp);
@@ -369,7 +369,7 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_aclcheck: user \"%s\" not found",
usename);
@@ -420,8 +420,8 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
#ifndef ACLDEBUG
tuple = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(relname),
- 0, 0, 0);
+ PointerGetDatum(relname),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
elog(ERROR, "pg_aclcheck: class \"%s\" not found",
@@ -450,10 +450,10 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
relation = heap_openr(RelationRelationName);
ownerId = (int4) heap_getattr(tuple,
- Anum_pg_class_relowner,
- RelationGetDescr(relation),
- (bool *) NULL);
- acl = aclownerdefault(relname, (AclId)ownerId);
+ Anum_pg_class_relowner,
+ RelationGetDescr(relation),
+ (bool *) NULL);
+ acl = aclownerdefault(relname, (AclId) ownerId);
}
#else
{ /* This is why the syscache is great... */
@@ -469,14 +469,14 @@ pg_aclcheck(char *relname, char *usename, AclMode mode)
return ACLCHECK_NO_CLASS;
}
tuple = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(relname),
- 0, 0, 0);
+ PointerGetDatum(relname),
+ 0, 0, 0);
if (HeapTupleIsValid(tuple) &&
!heap_attisnull(tuple, Anum_pg_class_relacl))
{
tmp = (Acl *) heap_getattr(tuple,
Anum_pg_class_relacl,
- RelationGetDescr(relation),
+ RelationGetDescr(relation),
(bool *) NULL);
acl = makeacl(ACL_NUM(tmp));
memmove((char *) acl, (char *) tmp, ACL_SIZE(tmp));
@@ -501,7 +501,7 @@ pg_ownercheck(char *usename,
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_ownercheck: user \"%s\" not found",
usename);
@@ -520,7 +520,7 @@ pg_ownercheck(char *usename,
}
tuple = SearchSysCacheTuple(cacheid, PointerGetDatum(value),
- 0, 0, 0);
+ 0, 0, 0);
switch (cacheid)
{
case OPROID:
@@ -568,7 +568,7 @@ pg_func_ownercheck(char *usename,
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_func_ownercheck: user \"%s\" not found",
usename);
@@ -587,10 +587,10 @@ pg_func_ownercheck(char *usename,
}
tuple = SearchSysCacheTuple(PRONAME,
- PointerGetDatum(funcname),
- Int32GetDatum(nargs),
- PointerGetDatum(arglist),
- 0);
+ PointerGetDatum(funcname),
+ Int32GetDatum(nargs),
+ PointerGetDatum(arglist),
+ 0);
if (!HeapTupleIsValid(tuple))
func_error("pg_func_ownercheck", funcname, nargs, arglist, NULL);
@@ -610,7 +610,7 @@ pg_aggr_ownercheck(char *usename,
tuple = SearchSysCacheTuple(USENAME,
PointerGetDatum(usename),
- 0, 0, 0);
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "pg_aggr_ownercheck: user \"%s\" not found",
usename);
@@ -629,9 +629,9 @@ pg_aggr_ownercheck(char *usename,
}
tuple = SearchSysCacheTuple(AGGNAME,
- PointerGetDatum(aggname),
- ObjectIdGetDatum(basetypeID),
- 0, 0);
+ PointerGetDatum(aggname),
+ ObjectIdGetDatum(basetypeID),
+ 0, 0);
if (!HeapTupleIsValid(tuple))
agg_error("pg_aggr_ownercheck", aggname, basetypeID);
diff --git a/src/backend/catalog/catalog.c b/src/backend/catalog/catalog.c
index 5db4be0310..cb9d5ff836 100644
--- a/src/backend/catalog/catalog.c
+++ b/src/backend/catalog/catalog.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.17 1998/09/01 03:21:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/catalog.c,v 1.18 1998/09/01 04:27:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -174,7 +174,7 @@ fillatt(TupleDesc tupleDesc)
for (i = 0; i < natts;)
{
tuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum((*attributeP)->atttypid),
+ ObjectIdGetDatum((*attributeP)->atttypid),
0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
@@ -193,7 +193,7 @@ fillatt(TupleDesc tupleDesc)
*/
if (!(*attributeP)->attisset)
{
- typp = (Form_pg_type) GETSTRUCT(tuple); /* XXX */
+ typp = (Form_pg_type) GETSTRUCT(tuple); /* XXX */
(*attributeP)->attlen = typp->typlen;
(*attributeP)->attbyval = typp->typbyval;
}
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c
index d6c252f7ba..bcac947978 100644
--- a/src/backend/catalog/heap.c
+++ b/src/backend/catalog/heap.c
@@ -7,12 +7,12 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.63 1998/09/01 03:21:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.64 1998/09/01 04:27:29 momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
* heap_create_with_catalog() - Create a cataloged relation
- * heap_destroy_with_catalog() - Removes named relation from catalogs
+ * heap_destroy_with_catalog() - Removes named relation from catalogs
*
* NOTES
* this code taken from access/heap/create.c, which contains
@@ -65,10 +65,9 @@
#include <string.h>
#endif
-static void
-AddPgRelationTuple(Relation pg_class_desc,
- Relation new_rel_desc, Oid new_rel_oid, unsigned natts,
- char relkind);
+static void AddPgRelationTuple(Relation pg_class_desc,
+ Relation new_rel_desc, Oid new_rel_oid, unsigned natts,
+ char relkind);
static void AddToTempRelList(Relation r);
static void DeletePgAttributeTuples(Relation rel);
static void DeletePgRelationTuple(Relation rel);
@@ -317,7 +316,7 @@ heap_create(char *name,
* ----------------
*/
- rel->rd_tmpunlinked = TRUE; /* change once table is created */
+ rel->rd_tmpunlinked = TRUE; /* change once table is created */
rel->rd_fd = (File) smgrcreate(DEFAULT_SMGR, rel);
rel->rd_tmpunlinked = FALSE;
@@ -479,8 +478,8 @@ RelationAlreadyExists(Relation pg_class_desc, char *relname)
if (!IsBootstrapProcessingMode())
{
tup = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(relname),
- 0, 0, 0);
+ PointerGetDatum(relname),
+ 0, 0, 0);
if (HeapTupleIsValid(tup))
return true;
else
@@ -878,7 +877,7 @@ RelationRemoveInheritance(Relation relation)
HeapScanDesc scan;
ScanKeyData entry;
bool found = false;
-
+
/* ----------------
* open pg_inherits
* ----------------
@@ -892,7 +891,7 @@ RelationRemoveInheritance(Relation relation)
*/
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_inherits_inhparent,
F_OIDEQ,
- ObjectIdGetDatum(RelationGetRelid(relation)));
+ ObjectIdGetDatum(RelationGetRelid(relation)));
scan = heap_beginscan(catalogRelation,
false,
@@ -972,10 +971,10 @@ RelationRemoveIndexes(Relation relation)
ScanKeyData entry;
indexRelation = heap_openr(IndexRelationName);
-
+
ScanKeyEntryInitialize(&entry, 0x0, Anum_pg_index_indrelid,
F_OIDEQ,
- ObjectIdGetDatum(RelationGetRelid(relation)));
+ ObjectIdGetDatum(RelationGetRelid(relation)));
scan = heap_beginscan(indexRelation,
false,
@@ -1008,8 +1007,8 @@ DeletePgRelationTuple(Relation rel)
pg_class_desc = heap_openr(RelationRelationName);
tup = SearchSysCacheTupleCopy(RELOID,
- ObjectIdGetDatum(rel->rd_att->attrs[0]->attrelid),
- 0, 0, 0);
+ ObjectIdGetDatum(rel->rd_att->attrs[0]->attrelid),
+ 0, 0, 0);
if (!HeapTupleIsValid(tup))
{
heap_close(pg_class_desc);
@@ -1023,7 +1022,7 @@ DeletePgRelationTuple(Relation rel)
*/
heap_delete(pg_class_desc, &tup->t_ctid);
pfree(tup);
-
+
heap_close(pg_class_desc);
}
@@ -1038,7 +1037,7 @@ DeletePgAttributeTuples(Relation rel)
Relation pg_attribute_desc;
HeapTuple tup;
int2 attnum;
-
+
/* ----------------
* open pg_attribute
* ----------------
@@ -1052,19 +1051,19 @@ DeletePgAttributeTuples(Relation rel)
RelationSetLockForWrite(pg_attribute_desc);
for (attnum = FirstLowInvalidHeapAttributeNumber + 1;
- attnum <= rel->rd_att->natts;
- attnum++)
+ attnum <= rel->rd_att->natts;
+ attnum++)
{
if (HeapTupleIsValid(tup = SearchSysCacheTupleCopy(ATTNUM,
- ObjectIdGetDatum(RelationGetRelid(rel)),
- Int16GetDatum(attnum),
- 0, 0)))
+ ObjectIdGetDatum(RelationGetRelid(rel)),
+ Int16GetDatum(attnum),
+ 0, 0)))
{
heap_delete(pg_attribute_desc, &tup->t_ctid);
pfree(tup);
}
}
-
+
/* ----------------
* Release the write lock
* ----------------
@@ -1107,9 +1106,9 @@ DeletePgTypeTuple(Relation rel)
* ----------------
*/
ScanKeyEntryInitialize(&key, 0,
- Anum_pg_type_typrelid,
- F_OIDEQ,
- ObjectIdGetDatum(RelationGetRelid(rel)));
+ Anum_pg_type_typrelid,
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
pg_type_scan = heap_beginscan(pg_type_desc,
0,
@@ -1470,7 +1469,7 @@ start:;
}
}
else if ((exprType(expr) != atp->atttypid)
- && !IS_BINARY_COMPATIBLE(exprType(expr), atp->atttypid))
+ && !IS_BINARY_COMPATIBLE(exprType(expr), atp->atttypid))
elog(ERROR, "DEFAULT: type mismatched");
adbin = nodeToString(expr);
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index ad8725a254..7d98a51bc5 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.59 1998/09/01 03:21:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.60 1998/09/01 04:27:31 momjian Exp $
*
*
* INTERFACE ROUTINES
@@ -65,32 +65,28 @@
/* non-export function prototypes */
static Oid
-RelationNameGetObjectId(char *relationName, Relation pg_class);
+ RelationNameGetObjectId(char *relationName, Relation pg_class);
static Oid GetHeapRelationOid(char *heapRelationName, char *indexRelationName);
static TupleDesc BuildFuncTupleDesc(FuncIndexInfo *funcInfo);
-static TupleDesc
-ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
+static TupleDesc ConstructTupleDescriptor(Oid heapoid, Relation heapRelation,
List *attributeList,
int numatts, AttrNumber *attNums);
static void ConstructIndexReldesc(Relation indexRelation, Oid amoid);
static Oid UpdateRelationRelation(Relation indexRelation);
-static void
-InitializeAttributeOids(Relation indexRelation,
+static void InitializeAttributeOids(Relation indexRelation,
int numatts,
Oid indexoid);
static void
AppendAttributeTuples(Relation indexRelation, int numatts);
-static void
-UpdateIndexRelation(Oid indexoid, Oid heapoid,
+static void UpdateIndexRelation(Oid indexoid, Oid heapoid,
FuncIndexInfo *funcInfo, int natts,
- AttrNumber *attNums, Oid *classOids, Node *predicate,
+ AttrNumber *attNums, Oid *classOids, Node *predicate,
List *attributeList, bool islossy, bool unique);
-static void
-DefaultBuild(Relation heapRelation, Relation indexRelation,
+static void DefaultBuild(Relation heapRelation, Relation indexRelation,
int numberOfAttributes, AttrNumber *attributeNumber,
IndexStrategy indexStrategy, uint16 parameterCount,
- Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
+ Datum *parameter, FuncIndexInfoPtr funcInfo, PredInfo *predInfo);
/* ----------------------------------------------------------------
* sysatts is a structure containing attribute tuple forms
@@ -147,12 +143,12 @@ RelationNameGetObjectId(char *relationName,
if (!IsBootstrapProcessingMode())
{
- HeapTuple tuple;
-
+ HeapTuple tuple;
+
tuple = SearchSysCacheTuple(RELNAME,
PointerGetDatum(relationName),
0, 0, 0);
-
+
if (HeapTupleIsValid(tuple))
return tuple->t_oid;
else
@@ -614,7 +610,9 @@ static void
AppendAttributeTuples(Relation indexRelation, int numatts)
{
Relation pg_attribute;
- HeapTuple init_tuple, cur_tuple = NULL, new_tuple;
+ HeapTuple init_tuple,
+ cur_tuple = NULL,
+ new_tuple;
bool hasind;
Relation idescs[Num_pg_attr_indices];
@@ -651,8 +649,8 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
value[Anum_pg_attribute_attcacheoff - 1] = Int32GetDatum(-1);
init_tuple = heap_addheader(Natts_pg_attribute,
- sizeof *(indexRelation->rd_att->attrs[0]),
- (char *) (indexRelation->rd_att->attrs[0]));
+ sizeof *(indexRelation->rd_att->attrs[0]),
+ (char *) (indexRelation->rd_att->attrs[0]));
hasind = false;
if (!IsBootstrapProcessingMode() && pg_attribute->rd_rel->relhasindex)
@@ -666,12 +664,12 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
* ----------------
*/
cur_tuple = heap_modifytuple(init_tuple,
- pg_attribute,
- value,
- nullv,
- replace);
+ pg_attribute,
+ value,
+ nullv,
+ replace);
pfree(init_tuple);
-
+
heap_insert(pg_attribute, cur_tuple);
if (hasind)
CatalogIndexInsert(idescs, Num_pg_attr_indices, pg_attribute, cur_tuple);
@@ -696,13 +694,13 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
value[Anum_pg_attribute_attnum - 1] = Int16GetDatum(i + 1);
new_tuple = heap_modifytuple(cur_tuple,
- pg_attribute,
- value,
- nullv,
- replace);
+ pg_attribute,
+ value,
+ nullv,
+ replace);
pfree(cur_tuple);
- heap_insert(pg_attribute,new_tuple);
+ heap_insert(pg_attribute, new_tuple);
if (hasind)
CatalogIndexInsert(idescs, Num_pg_attr_indices, pg_attribute, new_tuple);
@@ -711,7 +709,7 @@ AppendAttributeTuples(Relation indexRelation, int numatts)
* so we free the original and use the copy..
* ----------------
*/
- cur_tuple = new_tuple;
+ cur_tuple = new_tuple;
}
if (cur_tuple)
@@ -898,10 +896,10 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
pg_index = heap_openr(IndexRelationName);
tuple = SearchSysCacheTuple(INDEXRELID,
- ObjectIdGetDatum(indexoid),
- 0, 0, 0);
+ ObjectIdGetDatum(indexoid),
+ 0, 0, 0);
Assert(HeapTupleIsValid(tuple));
-
+
for (i = 0; i < Natts_pg_index; i++)
{
nulls[i] = heap_attisnull(tuple, i + 1) ? 'n' : ' ';
@@ -1103,7 +1101,7 @@ index_create(char *heapRelationName,
if (!HeapTupleIsValid(proc_tup))
{
func_error("index_create", FIgetname(funcInfo),
- FIgetnArgs(funcInfo), FIgetArglist(funcInfo), NULL);
+ FIgetnArgs(funcInfo), FIgetArglist(funcInfo), NULL);
}
FIgetProcOid(funcInfo) = proc_tup->t_oid;
}
@@ -1178,7 +1176,7 @@ index_destroy(Oid indexId)
Relation attributeRelation;
HeapTuple tuple;
int16 attnum;
-
+
Assert(OidIsValid(indexId));
/* why open it here? bjm 1998/08/20 */
@@ -1206,12 +1204,12 @@ index_destroy(Oid indexId)
*/
attributeRelation = heap_openr(AttributeRelationName);
- attnum = 1; /* indexes start at 1 */
+ attnum = 1; /* indexes start at 1 */
while (HeapTupleIsValid(tuple = SearchSysCacheTupleCopy(ATTNUM,
- ObjectIdGetDatum(indexId),
- Int16GetDatum(attnum),
- 0, 0)))
+ ObjectIdGetDatum(indexId),
+ Int16GetDatum(attnum),
+ 0, 0)))
{
heap_delete(attributeRelation, &tuple->t_ctid);
pfree(tuple);
@@ -1224,15 +1222,15 @@ index_destroy(Oid indexId)
* ----------------
*/
tuple = SearchSysCacheTupleCopy(INDEXRELID,
- ObjectIdGetDatum(indexId),
- 0, 0, 0);
+ ObjectIdGetDatum(indexId),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(NOTICE, "IndexRelationDestroy: %s's INDEX tuple missing",
RelationGetRelationName(userindexRelation));
indexRelation = heap_openr(IndexRelationName);
-
+
heap_delete(indexRelation, &tuple->t_ctid);
pfree(tuple);
heap_close(indexRelation);
@@ -1281,12 +1279,12 @@ FormIndexDatum(int numberOfAttributes,
{
offset = AttrNumberGetAttrOffset(i);
- datum[offset] = PointerGetDatum(GetIndexValue(heapTuple,
- heapDescriptor,
- offset,
- attributeNumber,
- fInfo,
- &isNull));
+ datum[offset] = PointerGetDatum(GetIndexValue(heapTuple,
+ heapDescriptor,
+ offset,
+ attributeNumber,
+ fInfo,
+ &isNull));
nullv[offset] = (isNull) ? 'n' : ' ';
}
@@ -1311,7 +1309,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
Datum values[Natts_pg_class];
char nulls[Natts_pg_class];
char replace[Natts_pg_class];
- HeapScanDesc pg_class_scan = NULL;
+ HeapScanDesc pg_class_scan = NULL;
/* ----------------
* This routine handles updates for both the heap and index relation
@@ -1356,14 +1354,14 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
ScanKeyData key[1];
ScanKeyEntryInitialize(&key[0], 0,
- ObjectIdAttributeNumber,
- F_OIDEQ,
- ObjectIdGetDatum(relid));
+ ObjectIdAttributeNumber,
+ F_OIDEQ,
+ ObjectIdGetDatum(relid));
pg_class_scan = heap_beginscan(pg_class, 0, SnapshotNow, 1, key);
tuple = heap_getnext(pg_class_scan, 0);
}
-
+
if (!HeapTupleIsValid(tuple))
{
if (IsBootstrapProcessingMode())
@@ -1436,7 +1434,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
pfree(tuple);
else
heap_endscan(pg_class_scan);
-
+
heap_close(pg_class);
heap_close(whichRel);
}
@@ -1478,7 +1476,7 @@ DefaultBuild(Relation heapRelation,
AttrNumber *attributeNumber,
IndexStrategy indexStrategy, /* not used */
uint16 parameterCount, /* not used */
- Datum *parameter, /* not used */
+ Datum *parameter, /* not used */
FuncIndexInfoPtr funcInfo,
PredInfo *predInfo)
{
@@ -1543,7 +1541,7 @@ DefaultBuild(Relation heapRelation,
tupleTable = ExecCreateTupleTable(1);
slot = ExecAllocTableSlot(tupleTable);
econtext = makeNode(ExprContext);
- /* last parameter was junk being sent bjm 1998/08/17 */
+ /* last parameter was junk being sent bjm 1998/08/17 */
FillDummyExprContext(econtext, slot, heapDescriptor, InvalidBuffer);
}
else
@@ -1552,7 +1550,7 @@ DefaultBuild(Relation heapRelation,
tupleTable = 0;
slot = NULL;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
/* ----------------
* Ok, begin our scan of the base relation.
@@ -1560,7 +1558,7 @@ DefaultBuild(Relation heapRelation,
*/
scan = heap_beginscan(heapRelation, /* relation */
0, /* start at end */
- SnapshotNow,/* seeself */
+ SnapshotNow, /* seeself */
0, /* number of keys */
(ScanKey) NULL); /* scan key */
@@ -1591,7 +1589,7 @@ DefaultBuild(Relation heapRelation,
indtuples++;
continue;
}
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
/*
@@ -1605,7 +1603,7 @@ DefaultBuild(Relation heapRelation,
slot->val = heapTuple;
if (ExecQual((List *) predicate, econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
indtuples++;
@@ -1643,7 +1641,7 @@ DefaultBuild(Relation heapRelation,
{
#ifndef OMIT_PARTIAL_INDEX
ExecDestroyTupleTable(tupleTable, false);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
pfree(nullv);
diff --git a/src/backend/catalog/indexing.c b/src/backend/catalog/indexing.c
index 8fa94148c0..ad66f89269 100644
--- a/src/backend/catalog/indexing.c
+++ b/src/backend/catalog/indexing.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.25 1998/09/01 03:21:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.26 1998/09/01 04:27:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -126,8 +126,8 @@ CatalogIndexInsert(Relation *idescs,
indexDescriptor = RelationGetDescr(idescs[i]);
pgIndexTup = SearchSysCacheTupleCopy(INDEXRELID,
- ObjectIdGetDatum(idescs[i]->rd_id),
- 0, 0, 0);
+ ObjectIdGetDatum(idescs[i]->rd_id),
+ 0, 0, 0);
Assert(pgIndexTup);
pgIndexP = (Form_pg_index) GETSTRUCT(pgIndexTup);
@@ -228,7 +228,7 @@ CatalogIndexFetchTuple(Relation heapRelation,
RetrieveIndexResult indexRes;
HeapTuple tuple = NULL;
Buffer buffer;
-
+
sd = index_beginscan(idesc, false, num_keys, skey);
while ((indexRes = index_getnext(sd, ForwardScanDirection)))
{
@@ -239,7 +239,7 @@ CatalogIndexFetchTuple(Relation heapRelation,
pfree(indexRes);
if (HeapTupleIsValid(tuple))
break;
- }
+ }
if (HeapTupleIsValid(tuple))
{
@@ -270,13 +270,13 @@ AttributeNameIndexScan(Relation heapRelation,
ScanKeyEntryInitialize(&skey[0],
(bits16) 0x0,
(AttrNumber) 1,
- (RegProcedure)F_OIDEQ,
+ (RegProcedure) F_OIDEQ,
ObjectIdGetDatum(relid));
ScanKeyEntryInitialize(&skey[1],
(bits16) 0x0,
(AttrNumber) 2,
- (RegProcedure)F_NAMEEQ,
+ (RegProcedure) F_NAMEEQ,
NameGetDatum(attname));
idesc = index_openr(AttributeNameIndex);
@@ -299,13 +299,13 @@ AttributeNumIndexScan(Relation heapRelation,
ScanKeyEntryInitialize(&skey[0],
(bits16) 0x0,
(AttrNumber) 1,
- (RegProcedure)F_OIDEQ,
+ (RegProcedure) F_OIDEQ,
ObjectIdGetDatum(relid));
ScanKeyEntryInitialize(&skey[1],
(bits16) 0x0,
(AttrNumber) 2,
- (RegProcedure)F_INT2EQ,
+ (RegProcedure) F_INT2EQ,
Int16GetDatum(attnum));
idesc = index_openr(AttributeNumIndex);
diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c
index c9370df540..00b16c20f6 100644
--- a/src/backend/catalog/pg_aggregate.c
+++ b/src/backend/catalog/pg_aggregate.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.16 1998/09/01 03:21:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.17 1998/09/01 04:27:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -78,7 +78,7 @@ AggregateCreate(char *aggName,
Oid xret2 = InvalidOid;
Oid fret = InvalidOid;
Oid fnArgs[8];
- NameData aname;
+ NameData aname;
TupleDesc tupDesc;
MemSet(fnArgs, 0, 8 * sizeof(Oid));
diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c
index a2123fc7c5..a296c9057c 100644
--- a/src/backend/catalog/pg_operator.c
+++ b/src/backend/catalog/pg_operator.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.28 1998/09/01 03:21:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.29 1998/09/01 04:27:36 momjian Exp $
*
* NOTES
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -35,28 +35,23 @@
#include <string.h>
#endif
-static Oid
-OperatorGetWithOpenRelation(Relation pg_operator_desc,
+static Oid OperatorGetWithOpenRelation(Relation pg_operator_desc,
const char *operatorName,
Oid leftObjectId,
Oid rightObjectId);
-static Oid
-OperatorGet(char *operatorName,
+static Oid OperatorGet(char *operatorName,
char *leftTypeName,
char *rightTypeName);
-static Oid
-OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
+static Oid OperatorShellMakeWithOpenRelation(Relation pg_operator_desc,
char *operatorName,
Oid leftObjectId,
Oid rightObjectId);
-static Oid
-OperatorShellMake(char *operatorName,
+static Oid OperatorShellMake(char *operatorName,
char *leftTypeName,
char *rightTypeName);
-static void
-OperatorDef(char *operatorName,
+static void OperatorDef(char *operatorName,
int definedOK,
char *leftTypeName,
char *rightTypeName,
@@ -120,7 +115,7 @@ OperatorGetWithOpenRelation(Relation pg_operator_desc,
*/
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* no cache? */
+ SnapshotSelf, /* no cache? */
3,
opKey);
@@ -475,7 +470,7 @@ OperatorDef(char *operatorName,
char *name[4];
Oid typeId[8];
int nargs;
- NameData oname;
+ NameData oname;
TupleDesc tupDesc;
static ScanKeyData opKey[3] = {
@@ -796,7 +791,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* no cache? */
+ SnapshotSelf, /* no cache? */
1,
opKey);
@@ -872,7 +867,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* no cache? */
+ SnapshotSelf, /* no cache? */
1,
opKey);
diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c
index 006286f6f7..074bda3876 100644
--- a/src/backend/catalog/pg_proc.c
+++ b/src/backend/catalog/pg_proc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.22 1998/09/01 03:21:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.23 1998/09/01 04:27:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -129,6 +129,7 @@ ProcedureCreate(char *procedureName,
if (!strcmp(languageName, "sql"))
{
+
/*
* If this call is defining a set, check if the set is already
* defined by looking to see whether this call's function text
diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c
index 3375cfe591..d9f9023f31 100644
--- a/src/backend/catalog/pg_type.c
+++ b/src/backend/catalog/pg_type.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.29 1998/09/01 03:21:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.30 1998/09/01 04:27:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,8 +33,7 @@
#include <string.h>
#endif
-static Oid
-TypeShellMakeWithOpenRelation(Relation pg_type_desc,
+static Oid TypeShellMakeWithOpenRelation(Relation pg_type_desc,
char *typeName);
/* ----------------------------------------------------------------
@@ -178,7 +177,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName)
*/
i = 0;
namestrcpy(&name, typeName);
- values[i++] = NameGetDatum(&name); /* 1 */
+ values[i++] = NameGetDatum(&name); /* 1 */
values[i++] = (Datum) InvalidOid; /* 2 */
values[i++] = (Datum) (int16) 0; /* 3 */
values[i++] = (Datum) (int16) 0; /* 4 */
@@ -379,17 +378,17 @@ TypeCreate(char *typeName,
* ----------------
*/
i = 0;
- namestrcpy(&name,typeName);
+ namestrcpy(&name, typeName);
values[i++] = NameGetDatum(&name); /* 1 */
values[i++] = (Datum) GetUserId(); /* 2 */
values[i++] = (Datum) internalSize; /* 3 */
values[i++] = (Datum) externalSize; /* 4 */
- values[i++] = (Datum) passedByValue;/* 5 */
+ values[i++] = (Datum) passedByValue; /* 5 */
values[i++] = (Datum) typeType; /* 6 */
values[i++] = (Datum) (bool) 1; /* 7 */
values[i++] = (Datum) typDelim; /* 8 */
values[i++] = (Datum) (typeType == 'c' ? relationOid : InvalidOid); /* 9 */
- values[i++] = (Datum) elementObjectId;/* 10 */
+ values[i++] = (Datum) elementObjectId; /* 10 */
/*
* arguments to type input and output functions must be 0
@@ -431,7 +430,7 @@ TypeCreate(char *typeName,
func_error("TypeCreate", procname, 1, argList, NULL);
}
- values[i++] = (Datum) tup->t_oid; /* 11 - 14 */
+ values[i++] = (Datum) tup->t_oid; /* 11 - 14 */
}
/* ----------------
@@ -444,7 +443,7 @@ TypeCreate(char *typeName,
* initialize the default value for this type.
* ----------------
*/
- values[i] = (Datum) fmgr(F_TEXTIN, /* 16 */
+ values[i] = (Datum) fmgr(F_TEXTIN, /* 16 */
PointerIsValid(defaultTypeValue)
? defaultTypeValue : "-"); /* XXX default
* typdefault */
@@ -534,8 +533,9 @@ TypeRename(char *oldTypeName, char *newTypeName)
{
Relation pg_type_desc;
Relation idescs[Num_pg_type_indices];
- HeapTuple oldtup, newtup;
-
+ HeapTuple oldtup,
+ newtup;
+
pg_type_desc = heap_openr(TypeRelationName);
oldtup = SearchSysCacheTupleCopy(TYPNAME,
@@ -547,7 +547,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
heap_close(pg_type_desc);
elog(ERROR, "TypeRename: type %s not defined", oldTypeName);
}
-
+
newtup = SearchSysCacheTuple(TYPNAME,
PointerGetDatum(newTypeName),
0, 0, 0);
@@ -557,7 +557,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
heap_close(pg_type_desc);
elog(ERROR, "TypeRename: type %s already defined", newTypeName);
}
-
+
namestrcpy(&(((Form_pg_type) GETSTRUCT(oldtup))->typname), newTypeName);
setheapoverride(true);
diff --git a/src/backend/commands/_deadcode/version.c b/src/backend/commands/_deadcode/version.c
index 063b8f2f63..fc7d5dbc4f 100644
--- a/src/backend/commands/_deadcode/version.c
+++ b/src/backend/commands/_deadcode/version.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.14 1998/08/19 02:01:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.15 1998/09/01 04:28:09 momjian Exp $
*
* NOTES
* At the point the version is defined, 2 physical relations are created
@@ -303,7 +303,7 @@ VersionDelete(char *vname, char *bname, char *snapshot)
vname, vname, vname, bname, bname, snapshot, bname);
eval_as_new_xact(rule_buf);
-#endif /* OLD_REWRITE */
+#endif /* OLD_REWRITE */
}
#endif
@@ -355,7 +355,7 @@ VersionReplace(char *vname, char *bname, char *snapshot)
vname, vname, vname, attr_list, bname, bname, snapshot, vname, bname);
eval_as_new_xact(rule_buf);
-#endif /* OLD_REWRITE */
+#endif /* OLD_REWRITE */
/* printf("%s\n",rule_buf); */
}
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c
index b057455923..1212197717 100644
--- a/src/backend/commands/async.c
+++ b/src/backend/commands/async.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.39 1998/09/01 03:21:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.40 1998/09/01 04:27:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,10 +64,10 @@
#include <utils/ps_status.h>
#define NotifyUnlock pg_options[OPT_NOTIFYUNLOCK]
-#define NotifyHack pg_options[OPT_NOTIFYHACK]
+#define NotifyHack pg_options[OPT_NOTIFYHACK]
extern TransactionState CurrentTransactionState;
-extern CommandDest whereToSendOutput;
+extern CommandDest whereToSendOutput;
GlobalMemory notifyContext = NULL;
@@ -119,7 +119,7 @@ Async_NotifyHandler(SIGNAL_ARGS)
else
{
TPRINTF(TRACE_NOTIFY, "Async_NotifyHandler: "
- "process in middle of transaction, state=%d, blockstate=%d",
+ "process in middle of transaction, state=%d, blockstate=%d",
CurrentTransactionState->state,
CurrentTransactionState->blockState);
notifyFrontEndPending = 1;
@@ -213,13 +213,12 @@ Async_Notify(char *relname)
heap_endscan(sRel);
/*
- * Note: if the write lock is unset we can get multiple tuples
- * with same oid if other backends notify the same relation.
- * Use this option at your own risk.
+ * Note: if the write lock is unset we can get multiple tuples with
+ * same oid if other backends notify the same relation. Use this
+ * option at your own risk.
*/
- if (NotifyUnlock) {
+ if (NotifyUnlock)
RelationUnsetLockForWrite(lRel);
- }
heap_close(lRel);
@@ -318,12 +317,13 @@ Async_NotifyAtCommit()
heap_close(lRel);
/*
- * Notify the frontend inside the current transaction while
- * we still have a valid write lock on pg_listeners. This
- * avoid waiting until all other backends have finished
- * with pg_listener.
+ * Notify the frontend inside the current transaction while we
+ * still have a valid write lock on pg_listeners. This avoid
+ * waiting until all other backends have finished with
+ * pg_listener.
*/
- if (notifyFrontEndPending) {
+ if (notifyFrontEndPending)
+ {
/* The aux version is called inside transaction */
Async_NotifyFrontEnd_Aux();
}
@@ -333,14 +333,14 @@ Async_NotifyAtCommit()
}
else
{
+
/*
- * No notifies issued by us. If notifyFrontEndPending has been set
- * by Async_NotifyHandler notify the frontend of pending notifies
- * from other backends.
+ * No notifies issued by us. If notifyFrontEndPending has been
+ * set by Async_NotifyHandler notify the frontend of pending
+ * notifies from other backends.
*/
- if (notifyFrontEndPending) {
+ if (notifyFrontEndPending)
Async_NotifyFrontEnd();
- }
}
ClearPendingNotify();
@@ -368,7 +368,8 @@ Async_NotifyAtCommit()
void
Async_NotifyAtAbort()
{
- if (pendingNotifies) {
+ if (pendingNotifies)
+ {
ClearPendingNotify();
DLFreeList(pendingNotifies);
}
@@ -380,9 +381,7 @@ Async_NotifyAtAbort()
{
/* don't forget to notify front end */
if (notifyFrontEndPending)
- {
Async_NotifyFrontEnd();
- }
}
}
@@ -423,7 +422,8 @@ Async_Listen(char *relname, int pid)
char *relnamei;
TupleDesc tupDesc;
- if (whereToSendOutput != Remote) {
+ if (whereToSendOutput != Remote)
+ {
elog(NOTICE, "Async_Listen: "
"listen not available on interactive sessions");
return;
@@ -459,7 +459,8 @@ Async_Listen(char *relname, int pid)
if (pid == MyProcPid)
alreadyListener = 1;
}
- if (alreadyListener) {
+ if (alreadyListener)
+ {
/* No need to scan the rest of the table */
break;
}
@@ -521,7 +522,8 @@ Async_Unlisten(char *relname, int pid)
HeapTuple lTuple;
/* Handle specially the `unlisten "*"' command */
- if ((!relname) || (*relname == '\0') || (strcmp(relname,"*")==0)) {
+ if ((!relname) || (*relname == '\0') || (strcmp(relname, "*") == 0))
+ {
Async_UnlistenAll();
return;
}
@@ -575,15 +577,13 @@ Async_UnlistenAll()
sRel = heap_beginscan(lRel, 0, SnapshotNow, 1, key);
while (HeapTupleIsValid(lTuple = heap_getnext(sRel, 0)))
- {
heap_delete(lRel, &lTuple->t_ctid);
- }
heap_endscan(sRel);
RelationUnsetLockForWrite(lRel);
heap_close(lRel);
TPRINTF(TRACE_NOTIFY, "Async_UnlistenAll: done");
}
-
+
/*
* --------------------------------------------------------------
* Async_UnlistenOnExit --
@@ -654,7 +654,7 @@ Async_NotifyFrontEnd_Aux()
#define MAX_DONE 64
- char *done[MAX_DONE];
+ char *done[MAX_DONE];
int ndone = 0;
int i;
@@ -687,13 +687,16 @@ Async_NotifyFrontEnd_Aux()
&isnull);
/*
- * This hack deletes duplicate tuples which can be left
- * in the table if the NotifyUnlock option is set.
- * I'm further investigating this. -- dz
+ * This hack deletes duplicate tuples which can be left in the
+ * table if the NotifyUnlock option is set. I'm further
+ * investigating this. -- dz
*/
- if (NotifyHack) {
- for (i=0; i<ndone; i++) {
- if (strcmp(DatumGetName(d)->data, done[i]) == 0) {
+ if (NotifyHack)
+ {
+ for (i = 0; i < ndone; i++)
+ {
+ if (strcmp(DatumGetName(d)->data, done[i]) == 0)
+ {
TPRINTF(TRACE_NOTIFY,
"Async_NotifyFrontEnd: duplicate %s",
DatumGetName(d)->data);
@@ -701,9 +704,8 @@ Async_NotifyFrontEnd_Aux()
continue;
}
}
- if (ndone < MAX_DONE) {
+ if (ndone < MAX_DONE)
done[ndone++] = pstrdup(DatumGetName(d)->data);
- }
}
rTuple = heap_modifytuple(lTuple, lRel, value, nulls, repl);
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index 928a6b5f6d..415ad4a8df 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.30 1998/09/01 03:21:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.31 1998/09/01 04:27:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,7 +47,7 @@
#include <optimizer/internal.h>
#ifndef NO_SECURITY
#include <utils/acl.h>
-#endif /* !NO_SECURITY */
+#endif /* !NO_SECURITY */
static Relation copy_heap(Oid OIDOldHeap);
static void copy_index(Oid OIDOldIndex, Oid OIDNewHeap);
@@ -128,7 +128,8 @@ cluster(char *oldrelname, char *oldindexname)
elog(ERROR, "cluster: unknown relation: \"%s\"",
oldrelname);
}
- OIDOldHeap = RelationGetRelid(OldHeap);/* Get OID for the index scan */
+ OIDOldHeap = RelationGetRelid(OldHeap); /* Get OID for the index
+ * scan */
OldIndex = index_openr(oldindexname); /* Open old index relation */
if (!RelationIsValid(OldIndex))
@@ -136,7 +137,7 @@ cluster(char *oldrelname, char *oldindexname)
elog(ERROR, "cluster: unknown index: \"%s\"",
oldindexname);
}
- OIDOldIndex = RelationGetRelid(OldIndex); /* OID for the index scan */
+ OIDOldIndex = RelationGetRelid(OldIndex); /* OID for the index scan */
heap_close(OldHeap);
index_close(OldIndex);
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c
index 5fdc9fd0c7..47f6e8ae3c 100644
--- a/src/backend/commands/command.c
+++ b/src/backend/commands/command.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.31 1998/09/01 03:21:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.32 1998/09/01 04:27:46 momjian Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -422,16 +422,16 @@ PerformAddAttribute(char *relationName,
int attnelems;
tup = SearchSysCacheTuple(ATTNAME,
- ObjectIdGetDatum(reltup->t_oid),
- PointerGetDatum(colDef->colname),
- 0, 0);
+ ObjectIdGetDatum(reltup->t_oid),
+ PointerGetDatum(colDef->colname),
+ 0, 0);
if (HeapTupleIsValid(tup))
{
heap_close(attrdesc);
heap_close(rel);
elog(ERROR, "PerformAddAttribute: attribute \"%s\" already exists in class \"%s\"",
- colDef->colname, relationName);
+ colDef->colname, relationName);
}
/*
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index f13a0ece82..2f0b6d2833 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.58 1998/09/01 03:21:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.59 1998/09/01 04:27:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -52,8 +52,7 @@ static Oid GetOutputFunction(Oid type);
static Oid GetTypeElement(Oid type);
static Oid GetInputFunction(Oid type);
static Oid IsTypeByVal(Oid type);
-static void
-GetIndexRelations(Oid main_relation_oid,
+static void GetIndexRelations(Oid main_relation_oid,
int *n_indices,
Relation **index_rels);
@@ -108,17 +107,17 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
the class.
----------------------------------------------------------------------------*/
- static FILE *fp; /* static for cleanup */
- static bool file_opened = false; /* static for cleanup */
+ static FILE *fp; /* static for cleanup */
+ static bool file_opened = false; /* static for cleanup */
Relation rel;
extern char *UserName; /* defined in global.c */
const AclMode required_access = from ? ACL_WR : ACL_RD;
int result;
/*
- * Close previous file opened for COPY but failed with elog().
- * There should be a better way, but would not be modular.
- * Prevents file descriptor leak. bjm 1998/08/29
+ * Close previous file opened for COPY but failed with elog(). There
+ * should be a better way, but would not be modular. Prevents file
+ * descriptor leak. bjm 1998/08/29
*/
if (file_opened)
FreeFile(fp);
@@ -449,7 +448,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
itupdescArr[i] = RelationGetDescr(index_rels[i]);
pgIndexTup =
SearchSysCacheTuple(INDEXRELID,
- ObjectIdGetDatum(RelationGetRelid(index_rels[i])),
+ ObjectIdGetDatum(RelationGetRelid(index_rels[i])),
0, 0, 0);
Assert(pgIndexTup);
pgIndexP[i] = (Form_pg_index) GETSTRUCT(pgIndexTup);
@@ -500,7 +499,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
/* SetSlotShouldFree(slot, false); */
slot->ttc_buffer = (Buffer) NULL;
slot->ttc_shouldFree = false;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
}
else
@@ -766,7 +765,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
/* SetSlotContents(slot, tuple); */
if (ExecQual((List *) indexPred[i], econtext) == false)
continue;
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
}
FormIndexDatum(indexNatts[i],
(AttrNumber *) &(pgIndexP[i]->indkey[0]),
@@ -1022,11 +1021,13 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
char c;
int done = 0;
int i = 0;
+
#ifdef MULTIBYTE
- int mblen;
- int encoding;
- unsigned char s[2];
- int j;
+ int mblen;
+ int encoding;
+ unsigned char s[2];
+ int j;
+
#endif
#ifdef MULTIBYTE
@@ -1136,22 +1137,23 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
if (!done)
attribute[i++] = c;
#ifdef MULTIBYTE
- s[0] = c;
- mblen = pg_encoding_mblen(encoding, s);
- mblen--;
- for(j=0;j<mblen;j++) {
- c = getc(fp);
- if (feof(fp))
- return NULL;
- attribute[i++] = c;
- }
+ s[0] = c;
+ mblen = pg_encoding_mblen(encoding, s);
+ mblen--;
+ for (j = 0; j < mblen; j++)
+ {
+ c = getc(fp);
+ if (feof(fp))
+ return NULL;
+ attribute[i++] = c;
+ }
#endif
if (i == EXT_ATTLEN - 1)
elog(ERROR, "CopyReadAttribute - attribute length too long. line: %d", lineno);
}
attribute[i] = '\0';
#ifdef MULTIBYTE
- return(pg_client_to_server((unsigned char*)attribute, strlen(attribute)));
+ return (pg_client_to_server((unsigned char *) attribute, strlen(attribute)));
#else
return &attribute[0];
#endif
@@ -1160,13 +1162,14 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
static void
CopyAttributeOut(FILE *fp, char *server_string, char *delim, int is_array)
{
- char *string;
+ char *string;
char c;
#ifdef MULTIBYTE
- int mblen;
- int encoding;
- int i;
+ int mblen;
+ int encoding;
+ int i;
+
#endif
#ifdef MULTIBYTE
@@ -1178,7 +1181,7 @@ CopyAttributeOut(FILE *fp, char *server_string, char *delim, int is_array)
#ifdef MULTIBYTE
for (; (mblen = pg_encoding_mblen(encoding, string)) &&
- ((c = *string) != '\0'); string += mblen)
+ ((c = *string) != '\0'); string += mblen)
#else
for (; (c = *string) != '\0'; string++)
#endif
@@ -1204,9 +1207,8 @@ CopyAttributeOut(FILE *fp, char *server_string, char *delim, int is_array)
}
}
#ifdef MULTIBYTE
- for (i=0;i<mblen;i++) {
- fputc(*(string+i), fp);
- }
+ for (i = 0; i < mblen; i++)
+ fputc(*(string + i), fp);
#else
fputc(*string, fp);
#endif
diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c
index 0286ab4659..ae4495655d 100644
--- a/src/backend/commands/creatinh.c
+++ b/src/backend/commands/creatinh.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.33 1998/09/01 03:21:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.34 1998/09/01 04:27:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,8 +33,7 @@
* ----------------
*/
-static int
-checkAttrExists(char *attributeName,
+static int checkAttrExists(char *attributeName,
char *attributeType, List *schema);
static List *MergeAttributes(List *schema, List *supers, List **supconstr);
static void StoreCatalogInheritance(Oid relationId, List *supers);
@@ -404,7 +403,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
char nullarr[Natts_pg_inherits];
tuple = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(strVal(lfirst(entry))),
+ PointerGetDatum(strVal(lfirst(entry))),
0, 0, 0);
AssertArg(HeapTupleIsValid(tuple));
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 3954eb78de..5ae406b905 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.23 1998/09/01 03:21:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.24 1998/09/01 04:27:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,8 +36,7 @@
/* non-export function prototypes */
-static void
-check_permissions(char *command, char *dbpath, char *dbname,
+static void check_permissions(char *command, char *dbpath, char *dbname,
Oid *dbIdP, int4 *userIdP);
static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel);
static void stop_vacuum(char *dbpath, char *dbname);
@@ -46,7 +45,7 @@ void
createdb(char *dbname, char *dbpath, int encoding)
{
Oid db_id;
- int4 user_id;
+ int4 user_id;
char buf[512];
char *lp,
loc[512];
@@ -100,7 +99,7 @@ createdb(char *dbname, char *dbpath, int encoding)
void
destroydb(char *dbname)
{
- int4 user_id;
+ int4 user_id;
Oid db_id;
char *path;
char dbpath[MAXPGPATH + 1];
@@ -203,8 +202,8 @@ check_permissions(char *command,
userName = GetPgUserName();
utup = SearchSysCacheTuple(USENAME,
- PointerGetDatum(userName),
- 0, 0, 0);
+ PointerGetDatum(userName),
+ 0, 0, 0);
*userIdP = ((Form_pg_shadow) GETSTRUCT(utup))->usesysid;
use_super = ((Form_pg_shadow) GETSTRUCT(utup))->usesuper;
use_createdb = ((Form_pg_shadow) GETSTRUCT(utup))->usecreatedb;
@@ -249,9 +248,9 @@ check_permissions(char *command,
if (dbfound)
{
dbowner = (int4) heap_getattr(dbtup,
- Anum_pg_database_datdba,
- RelationGetDescr(dbrel),
- (char *) NULL);
+ Anum_pg_database_datdba,
+ RelationGetDescr(dbrel),
+ (char *) NULL);
*dbIdP = dbtup->t_oid;
dbtext = (text *) heap_getattr(dbtup,
Anum_pg_database_datpath,
diff --git a/src/backend/commands/defind.c b/src/backend/commands/defind.c
index 342a99b127..ab6e26f1e1 100644
--- a/src/backend/commands/defind.c
+++ b/src/backend/commands/defind.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.25 1998/09/01 03:21:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.26 1998/09/01 04:27:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,16 +41,13 @@
/* non-export function prototypes */
static void CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid);
-static void
-CheckPredExpr(Node *predicate, List *rangeTable,
+static void CheckPredExpr(Node *predicate, List *rangeTable,
Oid baseRelOid);
static void
CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid);
-static void
-FuncIndexArgs(IndexElem *funcIndex, AttrNumber *attNumP,
+static void FuncIndexArgs(IndexElem *funcIndex, AttrNumber *attNumP,
Oid *argTypes, Oid *opOidP, Oid relId);
-static void
-NormIndexAttrs(List *attList, AttrNumber *attNumP,
+static void NormIndexAttrs(List *attList, AttrNumber *attNumP,
Oid *opOidP, Oid relId);
static char *GetDefaultOpClass(Oid atttypid);
@@ -197,7 +194,7 @@ DefineIndex(char *heapRelationName,
else
{
attributeNumberA = (AttrNumber *) palloc(numberOfAttributes *
- sizeof attributeNumberA[0]);
+ sizeof attributeNumberA[0]);
classObjectId =
(Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]);
@@ -468,7 +465,8 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
Oid relId)
{
List *rest;
- HeapTuple atttuple, tuple;
+ HeapTuple atttuple,
+ tuple;
/*
* process attributeList
@@ -485,9 +483,9 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
elog(ERROR, "missing attribute for define index");
atttuple = SearchSysCacheTupleCopy(ATTNAME,
- ObjectIdGetDatum(relId),
- PointerGetDatum(attribute->name),
- 0, 0);
+ ObjectIdGetDatum(relId),
+ PointerGetDatum(attribute->name),
+ 0, 0);
if (!HeapTupleIsValid(atttuple))
{
elog(ERROR,
@@ -502,8 +500,8 @@ NormIndexAttrs(List *attList, /* list of IndexElem's */
if (attribute->typename == NULL)
{
tuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(attform->atttypid),
- 0, 0, 0);
+ ObjectIdGetDatum(attform->atttypid),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "create index: type for attribute '%s' undefined",
attribute->name);
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 3178dd2d8a..63534050f1 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.23 1998/08/04 16:43:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.24 1998/09/01 04:27:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,7 +83,7 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
if (es->printNodes)
s = nodeToString(plan);
-
+
if (es->printCost)
{
s2 = Explain_PlanToString(plan, es);
@@ -107,7 +107,7 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
len -= ELOG_MAXLEN - 64;
}
if (es->printNodes)
- pprint(plan); /* display in postmaster log file */
+ pprint(plan); /* display in postmaster log file */
pfree(es);
}
@@ -123,7 +123,7 @@ ExplainQuery(Query *query, bool verbose, CommandDest dest)
static void
explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
{
- List *l;
+ List *l;
Relation relation;
char *pname;
char buf[1000];
@@ -280,11 +280,11 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
List *saved_rtable = es->rtable;
List *lst;
int whichplan = 0;
- Append *appendplan = (Append *)plan;
+ Append *appendplan = (Append *) plan;
foreach(lst, appendplan->appendplans)
{
- Plan *subnode = (Plan *)lfirst(lst);
+ Plan *subnode = (Plan *) lfirst(lst);
if (appendplan->inheritrelid > 0)
{
diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c
index f3c4d4b6e1..86f24d9678 100644
--- a/src/backend/commands/proclang.c
+++ b/src/backend/commands/proclang.c
@@ -162,8 +162,8 @@ DropProceduralLanguage(DropPLangStmt *stmt)
case_translate_language_name(stmt->plname, languageName);
langTup = SearchSysCacheTupleCopy(LANNAME,
- PointerGetDatum(languageName),
- 0, 0, 0);
+ PointerGetDatum(languageName),
+ 0, 0, 0);
if (!HeapTupleIsValid(langTup))
elog(ERROR, "Language %s doesn't exist", languageName);
diff --git a/src/backend/commands/recipe.c b/src/backend/commands/recipe.c
index 4d06c57feb..f8b7ce15df 100644
--- a/src/backend/commands/recipe.c
+++ b/src/backend/commands/recipe.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.23 1998/09/01 03:22:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.24 1998/09/01 04:27:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,39 +64,31 @@ typedef struct _teeInfo
QueryTreeList *appendQlist(QueryTreeList *q1, QueryTreeList *q2);
void OffsetVarAttno(Node *node, int varno, int offset);
-static void
-appendTeeQuery(TeeInfo * teeInfo,
+static void appendTeeQuery(TeeInfo * teeInfo,
QueryTreeList *q,
char *teeNodeName);
-static Plan *
-replaceTeeScans(Plan *plan,
+static Plan *replaceTeeScans(Plan *plan,
Query *parsetree,
TeeInfo * teeInfo);
-static void
-replaceSeqScan(Plan *plan,
+static void replaceSeqScan(Plan *plan,
Plan *parent,
int rt_ind,
Plan *tplan);
-static void
-tg_rewriteQuery(TgRecipe * r, TgNode * n,
+static void tg_rewriteQuery(TgRecipe * r, TgNode * n,
QueryTreeList *q,
QueryTreeList *inputQlist);
-static Node *
-tg_replaceNumberedParam(Node *expression,
+static Node *tg_replaceNumberedParam(Node *expression,
int pnum,
int rt_ind,
char *teeRelName);
-static Node *
-tg_rewriteParamsInExpr(Node *expression,
+static Node *tg_rewriteParamsInExpr(Node *expression,
QueryTreeList *inputQlist);
-static QueryTreeList *
-tg_parseSubQuery(TgRecipe * r,
+static QueryTreeList *tg_parseSubQuery(TgRecipe * r,
TgNode * n,
TeeInfo * teeInfo);
-static QueryTreeList *
-tg_parseTeeNode(TgRecipe * r,
+static QueryTreeList *tg_parseTeeNode(TgRecipe * r,
TgNode * n,
int i,
QueryTreeList *qList,
@@ -193,7 +185,7 @@ beginRecipe(RecipeStmt *stmt)
#ifdef DEBUG_RECIPE
elog(NOTICE, "beginRecipe: eyes[%d] = %s\n", i, e->nodeName);
-#endif /* DEBUG_RECIPE */
+#endif /* DEBUG_RECIPE */
qList = tg_parseSubQuery(r, e->inNodes->val[0], teeInfo);
@@ -851,7 +843,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
#ifdef DEBUG_RECIPE
elog(NOTICE, "calling parser with %s", elem->src);
-#endif /* DEBUG_RECIPE */
+#endif /* DEBUG_RECIPE */
parameterCount = getParamTypes(elem, typev);
@@ -894,7 +886,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
#ifdef DEBUG_RECIPE
elog(NOTICE, "calling parser with %s", newquery);
-#endif /* DEBUG_RECIPE */
+#endif /* DEBUG_RECIPE */
qList = parser(newquery, typev, parameterCount);
if (qList->len > 1)
@@ -1032,8 +1024,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
tupdesc = rel->rd_att;
relid = heap_create_with_catalog(
- child->nodeElem->outTypes->val[0],
- tupdesc, RELKIND_RELATION);
+ child->nodeElem->outTypes->val[0],
+ tupdesc, RELKIND_RELATION);
}
else
{
@@ -1056,8 +1048,8 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
else
{
relid = heap_create_with_catalog(
- child->nodeElem->outTypes->val[0],
- tupdesc, RELKIND_RELATION);
+ child->nodeElem->outTypes->val[0],
+ tupdesc, RELKIND_RELATION);
}
}
}
@@ -1338,4 +1330,4 @@ replaceTeeScans(Plan *plan, Query *parsetree, TeeInfo * teeInfo)
-#endif /* TIOGA */
+#endif /* TIOGA */
diff --git a/src/backend/commands/remove.c b/src/backend/commands/remove.c
index aa828ec4d8..cc68739f53 100644
--- a/src/backend/commands/remove.c
+++ b/src/backend/commands/remove.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.28 1998/09/01 03:22:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.29 1998/09/01 04:27:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,7 +57,7 @@ RemoveOperator(char *operatorName, /* operator name */
bool defined;
char *userName;
char oprtype;
-
+
if (typeName1)
{
typeId1 = TypeGet(typeName1, &defined);
@@ -86,11 +86,11 @@ RemoveOperator(char *operatorName, /* operator name */
oprtype = 'r';
tup = SearchSysCacheTupleCopy(OPRNAME,
- PointerGetDatum(operatorName),
- ObjectIdGetDatum(typeId1),
- ObjectIdGetDatum(typeId2),
- CharGetDatum(oprtype));
-
+ PointerGetDatum(operatorName),
+ ObjectIdGetDatum(typeId1),
+ ObjectIdGetDatum(typeId2),
+ CharGetDatum(oprtype));
+
relation = heap_openr(OperatorRelationName);
if (HeapTupleIsValid(tup))
{
@@ -150,7 +150,7 @@ SingleOpOperatorRemove(Oid typeOid)
int i;
ScanKeyEntryInitialize(&key[0],
- 0, 0, F_OIDEQ, (Datum) typeOid);
+ 0, 0, F_OIDEQ, (Datum) typeOid);
rel = heap_openr(OperatorRelationName);
for (i = 0; i < 3; ++i)
{
@@ -192,7 +192,7 @@ AttributeAndRelationRemove(Oid typeOid)
*/
ScanKeyEntryInitialize(&key[0],
- 0, 3, F_OIDEQ, (Datum) typeOid);
+ 0, 3, F_OIDEQ, (Datum) typeOid);
oidptr = (struct oidlist *) palloc(sizeof(*oidptr));
oidptr->next = NULL;
@@ -232,7 +232,7 @@ AttributeAndRelationRemove(Oid typeOid)
heap_close(rel);
}
-#endif /* NOTYET */
+#endif /* NOTYET */
/*
* TypeRemove
@@ -257,15 +257,15 @@ RemoveType(char *typeName) /* type name to be removed */
relation = heap_openr(TypeRelationName);
tup = SearchSysCacheTuple(TYPNAME,
- PointerGetDatum(typeName),
- 0, 0, 0);
+ PointerGetDatum(typeName),
+ 0, 0, 0);
if (!HeapTupleIsValid(tup))
{
heap_close(relation);
elog(ERROR, "RemoveType: type '%s' does not exist", typeName);
}
-
+
relation = heap_openr(TypeRelationName);
typeOid = tup->t_oid;
heap_delete(relation, &tup->t_ctid);
@@ -273,8 +273,8 @@ RemoveType(char *typeName) /* type name to be removed */
/* Now, Delete the "array of" that type */
shadow_type = makeArrayTypeName(typeName);
tup = SearchSysCacheTuple(TYPNAME,
- PointerGetDatum(shadow_type),
- 0, 0, 0);
+ PointerGetDatum(shadow_type),
+ 0, 0, 0);
if (!HeapTupleIsValid(tup))
{
heap_close(relation);
@@ -308,7 +308,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
char *typename;
int i;
-
+
MemSet(argList, 0, 8 * sizeof(Oid));
for (i = 0; i < nargs; i++)
{
@@ -340,10 +340,10 @@ RemoveFunction(char *functionName, /* function name to be removed */
relation = heap_openr(ProcedureRelationName);
tup = SearchSysCacheTuple(PRONAME,
- PointerGetDatum(functionName),
- Int32GetDatum(nargs),
- PointerGetDatum(argList),
- 0);
+ PointerGetDatum(functionName),
+ Int32GetDatum(nargs),
+ PointerGetDatum(argList),
+ 0);
if (!HeapTupleIsValid(tup))
{
@@ -353,8 +353,8 @@ RemoveFunction(char *functionName, /* function name to be removed */
if ((((Form_pg_proc) GETSTRUCT(tup))->prolang) == INTERNALlanguageId)
{
- heap_close(relation);
- elog(ERROR, "RemoveFunction: function \"%s\" is built-in",functionName);
+ heap_close(relation);
+ elog(ERROR, "RemoveFunction: function \"%s\" is built-in", functionName);
}
heap_delete(relation, &tup->t_ctid);
@@ -410,9 +410,9 @@ RemoveAggregate(char *aggName, char *aggType)
relation = heap_openr(AggregateRelationName);
tup = SearchSysCacheTuple(AGGNAME,
- PointerGetDatum(aggName),
- ObjectIdGetDatum(basetypeID),
- 0, 0);
+ PointerGetDatum(aggName),
+ ObjectIdGetDatum(basetypeID),
+ 0, 0);
if (!HeapTupleIsValid(tup))
{
diff --git a/src/backend/commands/rename.c b/src/backend/commands/rename.c
index 25243224af..31f193d053 100644
--- a/src/backend/commands/rename.c
+++ b/src/backend/commands/rename.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.16 1998/09/01 03:22:04 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/rename.c,v 1.17 1998/09/01 04:27:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@
#include <optimizer/prep.h> /* for find_all_inheritors */
#ifndef NO_SECURITY
#include <utils/acl.h>
-#endif /* !NO_SECURITY */
+#endif /* !NO_SECURITY */
#ifndef HAVE_MEMMOVE
#include <regex/utils.h>
#else
@@ -73,7 +73,7 @@ renameatt(char *relname,
newatttup;
Relation irelations[Num_pg_attr_indices];
Oid relid;
-
+
/*
* permissions checking. this would normally be done in utility.c,
* but this particular routine is recursive.
@@ -111,12 +111,10 @@ renameatt(char *relname,
0, 0, 0);
if (!HeapTupleIsValid(reltup))
- {
elog(ERROR, "renameatt: unknown relation: \"%s\"", relname);
- }
myrelid = reltup->t_oid;
-
+
/* this routine is actually in the planner */
children = find_all_inheritors(lconsi(myrelid, NIL), NIL);
@@ -127,7 +125,7 @@ renameatt(char *relname,
*/
foreach(child, children)
{
- char childname[NAMEDATALEN];
+ char childname[NAMEDATALEN];
childrelid = lfirsti(child);
if (childrelid == myrelid)
@@ -142,10 +140,10 @@ renameatt(char *relname,
}
/* make copy of cache value, could disappear in call */
StrNCpy(childname,
- ((Form_pg_class) GETSTRUCT(reltup))->relname.data,
- NAMEDATALEN);
+ ((Form_pg_class) GETSTRUCT(reltup))->relname.data,
+ NAMEDATALEN);
/* no more recursion! */
- renameatt(childname, oldattname, newattname, userName, 0);
+ renameatt(childname, oldattname, newattname, userName, 0);
}
}
@@ -158,9 +156,9 @@ renameatt(char *relname,
relid = reltup->t_oid;
oldatttup = SearchSysCacheTupleCopy(ATTNAME,
- ObjectIdGetDatum(relid),
- PointerGetDatum(oldattname),
- 0, 0);
+ ObjectIdGetDatum(relid),
+ PointerGetDatum(oldattname),
+ 0, 0);
if (!HeapTupleIsValid(oldatttup))
elog(ERROR, "renameatt: attribute \"%s\" nonexistent", oldattname);
@@ -168,9 +166,9 @@ renameatt(char *relname,
elog(ERROR, "renameatt: system attribute \"%s\" not renamed", oldattname);
newatttup = SearchSysCacheTuple(ATTNAME,
- ObjectIdGetDatum(relid),
- PointerGetDatum(newattname),
- 0, 0);
+ ObjectIdGetDatum(relid),
+ PointerGetDatum(newattname),
+ 0, 0);
/* should not already exist */
if (HeapTupleIsValid(newatttup))
{
@@ -179,7 +177,7 @@ renameatt(char *relname,
}
StrNCpy((((Form_pg_attribute) (GETSTRUCT(oldatttup)))->attname.data),
- newattname, NAMEDATALEN);
+ newattname, NAMEDATALEN);
attrelation = heap_openr(AttributeRelationName);
heap_replace(attrelation, &oldatttup->t_ctid, oldatttup);
@@ -212,13 +210,13 @@ renameatt(char *relname,
void
renamerel(char *oldrelname, char *newrelname)
{
- Relation relrelation; /* for RELATION relation */
+ Relation relrelation; /* for RELATION relation */
HeapTuple oldreltup,
newreltup;
char oldpath[MAXPGPATH],
newpath[MAXPGPATH];
Relation irelations[Num_pg_class_indices];
-
+
if (IsSystemRelationName(oldrelname))
elog(ERROR, "renamerel: system relation \"%s\" not renamed",
oldrelname);
@@ -228,14 +226,14 @@ renamerel(char *oldrelname, char *newrelname)
newrelname);
oldreltup = SearchSysCacheTupleCopy(RELNAME,
- PointerGetDatum(oldrelname),
- 0, 0, 0);
+ PointerGetDatum(oldrelname),
+ 0, 0, 0);
if (!HeapTupleIsValid(oldreltup))
elog(ERROR, "renamerel: relation \"%s\" does not exist", oldrelname);
newreltup = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(newrelname),
- 0, 0, 0);
+ PointerGetDatum(newrelname),
+ 0, 0, 0);
if (HeapTupleIsValid(newreltup))
elog(ERROR, "renamerel: relation \"%s\" exists", newrelname);
@@ -246,7 +244,7 @@ renamerel(char *oldrelname, char *newrelname)
elog(ERROR, "renamerel: unable to rename file: %s", oldpath);
StrNCpy((((Form_pg_class) GETSTRUCT(oldreltup))->relname.data),
- newrelname, NAMEDATALEN);
+ newrelname, NAMEDATALEN);
/* insert fixed rel tuple */
relrelation = heap_openr(RelationRelationName);
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index e73981e813..7d9bd1d660 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -316,9 +316,9 @@ currval(struct varlena * seqin)
int4
setval(struct varlena * seqin, int4 next)
{
- char *seqname = textout(seqin);
+ char *seqname = textout(seqin);
SeqTable elm;
- Buffer buf;
+ Buffer buf;
Form_pg_sequence seq;
ItemPointerData iptr;
@@ -329,17 +329,20 @@ setval(struct varlena * seqin, int4 next)
#endif
/* open and WIntentLock sequence */
- elm = init_sequence ("setval", seqname);
- seq = read_info ("setval", elm, &buf); /* lock page and read tuple */
+ elm = init_sequence("setval", seqname);
+ seq = read_info("setval", elm, &buf); /* lock page and read
+ * tuple */
- if ( seq->cache_value != 1 ) {
- elog (ERROR, "%s.setval: can't set value of sequence %s, cache != 1",
- seqname, seqname);
+ if (seq->cache_value != 1)
+ {
+ elog(ERROR, "%s.setval: can't set value of sequence %s, cache != 1",
+ seqname, seqname);
}
- if ((next < seq->min_value) || (next > seq->max_value)) {
- elog (ERROR, "%s.setval: value %d is of of bounds (%d,%d)",
- seqname, next, seq->min_value, seq->max_value);
+ if ((next < seq->min_value) || (next > seq->max_value))
+ {
+ elog(ERROR, "%s.setval: value %d is of of bounds (%d,%d)",
+ seqname, next, seq->min_value, seq->max_value);
}
/* save info in local cache */
@@ -350,11 +353,11 @@ setval(struct varlena * seqin, int4 next)
seq->last_value = next; /* last fetched number */
seq->is_called = 't';
- if ( WriteBuffer (buf) == STATUS_ERROR )
- elog (ERROR, "%s.settval: WriteBuffer failed", seqname);
+ if (WriteBuffer(buf) == STATUS_ERROR)
+ elog(ERROR, "%s.settval: WriteBuffer failed", seqname);
ItemPointerSet(&iptr, 0, FirstOffsetNumber);
- RelationUnsetSingleWLockPage (elm->rel, &iptr);
+ RelationUnsetSingleWLockPage(elm->rel, &iptr);
return next;
}
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index f26860cfb7..9636466bff 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -40,8 +40,7 @@ void RelationBuildTriggers(Relation relation);
void FreeTriggerDesc(Relation relation);
static void DescribeTrigger(TriggerDesc *trigdesc, Trigger *trigger);
-static HeapTuple
-GetTupleForTrigger(Relation relation, ItemPointer tid,
+static HeapTuple GetTupleForTrigger(Relation relation, ItemPointer tid,
bool before);
extern GlobalMemory CacheCxt;
@@ -220,8 +219,8 @@ CreateTrigger(CreateTrigStmt *stmt)
/* update pg_class */
tuple = SearchSysCacheTupleCopy(RELNAME,
- PointerGetDatum(stmt->relname),
- 0, 0, 0);
+ PointerGetDatum(stmt->relname),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "CreateTrigger: relation %s not found in pg_class", stmt->relname);
@@ -258,7 +257,7 @@ DropTrigger(DropTrigStmt *stmt)
MemoryContext oldcxt;
int found = 0;
int tgfound = 0;
-
+
#ifndef NO_SECURITY
if (!pg_ownercheck(GetPgUserName(), stmt->relname, RELNAME))
elog(ERROR, "%s: %s", stmt->relname, aclcheck_error_strings[ACLCHECK_NOT_OWNER]);
@@ -298,8 +297,8 @@ DropTrigger(DropTrigStmt *stmt)
heap_close(tgrel);
tuple = SearchSysCacheTupleCopy(RELNAME,
- PointerGetDatum(stmt->relname),
- 0, 0, 0);
+ PointerGetDatum(stmt->relname),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "DropTrigger: relation %s not found in pg_class", stmt->relname);
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index a61bfd5f2e..e1aaa4cb22 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -263,7 +263,7 @@ AlterUser(AlterUserStmt *stmt)
{
RelationUnsetLockForWrite(pg_shadow_rel);
heap_close(pg_shadow_rel);
- UserAbortTransactionBlock(); /* needed? */
+ UserAbortTransactionBlock(); /* needed? */
elog(ERROR, "alterUser: user \"%s\" does not exist", stmt->user);
return;
}
@@ -430,8 +430,8 @@ RemoveUser(char *user)
* tables, views, etc owned by the user.
*
* The second option would be to create a means of deleting tables, view,
- * etc. owned by the user from other databases. pg_shadow is global and
- * so this must be done at some point.
+ * etc. owned by the user from other databases. pg_shadow is global
+ * and so this must be done at some point.
*
* Let us not forget that the user should be removed from the pg_groups
* also.
@@ -466,8 +466,8 @@ CheckPgUserAclNotNull()
HeapTuple htup;
htup = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(ShadowRelationName),
- 0, 0, 0);
+ PointerGetDatum(ShadowRelationName),
+ 0, 0, 0);
if (!HeapTupleIsValid(htup))
{
elog(ERROR, "IsPgUserAclNull: class \"%s\" not found",
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 1d522795b2..9898f58188 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.79 1998/09/01 03:22:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.80 1998/09/01 04:28:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -288,7 +288,7 @@ vc_getrels(NameData *VacRelP)
else
{
ScanKeyEntryInitialize(&key, 0x0, Anum_pg_class_relkind,
- F_CHAREQ, CharGetDatum('r'));
+ F_CHAREQ, CharGetDatum('r'));
}
portalmem = PortalGetVariableMemory(vc_portal);
@@ -377,16 +377,16 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
HeapTuple tuple,
typetuple;
Relation onerel;
- VPageListData vacuum_pages; /* List of pages to vacuum and/or clean
+ VPageListData vacuum_pages; /* List of pages to vacuum and/or clean
* indices */
- VPageListData fraged_pages; /* List of pages with space enough for
+ VPageListData fraged_pages; /* List of pages with space enough for
* re-using */
VPageDescr *vpp;
Relation *Irel;
int32 nindices,
i;
VRelStats *vacrelstats;
-
+
StartTransactionCommand();
rel = heap_openr(RelationRelationName);
@@ -397,8 +397,8 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
* last time we saw it, we don't need to vacuum it.
*/
tuple = SearchSysCacheTuple(RELOID,
- ObjectIdGetDatum(relid),
- 0, 0, 0);
+ ObjectIdGetDatum(relid),
+ 0, 0, 0);
if (!HeapTupleIsValid(tuple))
{
heap_close(rel);
@@ -499,8 +499,8 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
stats->f_cmpgt.fn_addr = NULL;
typetuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(stats->attr->atttypid),
- 0, 0, 0);
+ ObjectIdGetDatum(stats->attr->atttypid),
+ 0, 0, 0);
if (HeapTupleIsValid(typetuple))
stats->outfunc = ((Form_pg_type) GETSTRUCT(typetuple))->typoutput;
else
@@ -549,13 +549,14 @@ vc_vacone(Oid relid, bool analyze, List *va_cols)
}
}
- if (fraged_pages.vpl_num_pages > 0) /* Try to shrink heap */
+ if (fraged_pages.vpl_num_pages > 0) /* Try to shrink heap */
vc_rpfheap(vacrelstats, onerel, &vacuum_pages, &fraged_pages, nindices, Irel);
else
{
if (Irel != (Relation *) NULL)
vc_clsindices(nindices, Irel);
- if (vacuum_pages.vpl_num_pages > 0)/* Clean pages from vacuum_pages list */
+ if (vacuum_pages.vpl_num_pages > 0) /* Clean pages from
+ * vacuum_pages list */
vc_vacheap(vacrelstats, onerel, &vacuum_pages);
}
@@ -644,7 +645,7 @@ vc_scanheap(VRelStats *vacrelstats, Relation onerel,
vpc->vpd_offsets_used = 0;
elog(MESSAGE_LEVEL, "--Relation %s--", relname);
-
+
for (blkno = 0; blkno < nblocks; blkno++)
{
buf = ReadBuffer(onerel, blkno);
@@ -875,8 +876,8 @@ vc_scanheap(VRelStats *vacrelstats, Relation onerel,
fraged_pages->vpl_empty_end_pages = empty_end_pages;
/*
- * Try to make fraged_pages keeping in mind that we can't use free space of
- * "empty" end-pages and last page if it reapped.
+ * Try to make fraged_pages keeping in mind that we can't use free
+ * space of "empty" end-pages and last page if it reapped.
*/
if (do_shrinking && vacuum_pages->vpl_num_pages - empty_end_pages > 0)
{
@@ -1010,9 +1011,9 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
isempty = PageIsEmpty(page);
dowrite = false;
- if (blkno == last_vacuum_block) /* it's reapped page */
+ if (blkno == last_vacuum_block) /* it's reapped page */
{
- if (last_vacuum_page->vpd_offsets_free > 0) /* there are dead tuples */
+ if (last_vacuum_page->vpd_offsets_free > 0) /* there are dead tuples */
{ /* on this page - clean */
Assert(!isempty);
vc_vacpage(page, last_vacuum_page);
@@ -1025,7 +1026,8 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
/* get prev reapped page from vacuum_pages */
last_vacuum_page = vacuum_pages->vpl_pagedesc[vacuumed_pages - 1];
last_vacuum_block = last_vacuum_page->vpd_blkno;
- if (blkno == last_fraged_block) /* this page in fraged_pages too */
+ if (blkno == last_fraged_block) /* this page in
+ * fraged_pages too */
{
--num_fraged_pages;
Assert(num_fraged_pages > 0);
@@ -1080,7 +1082,7 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
Assert(num_fraged_pages > cur_item + 1);
memmove(fraged_pages->vpl_pagedesc + cur_item,
fraged_pages->vpl_pagedesc + cur_item + 1,
- sizeof(VPageDescr *) * (num_fraged_pages - cur_item - 1));
+ sizeof(VPageDescr *) * (num_fraged_pages - cur_item - 1));
num_fraged_pages--;
Assert(last_fraged_page == fraged_pages->vpl_pagedesc[num_fraged_pages - 1]);
}
@@ -1121,7 +1123,7 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
elog(ERROR, "\
failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
tuple_len, cur_page->vpd_blkno, cur_page->vpd_free,
- cur_page->vpd_offsets_used, cur_page->vpd_offsets_free);
+ cur_page->vpd_offsets_used, cur_page->vpd_offsets_free);
}
newitemid = PageGetItemId(ToPage, newoff);
pfree(newtup);
@@ -1145,7 +1147,7 @@ failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
for (i = 0, idcur = Idesc; i < nindices; i++, idcur++)
{
FormIndexDatum(idcur->natts,
- (AttrNumber *) &(idcur->tform->indkey[0]),
+ (AttrNumber *) &(idcur->tform->indkey[0]),
newtup,
tupdesc,
idatum,
@@ -1201,8 +1203,8 @@ failed to add item with len = %u to page %u (free space %u, nusd %u, noff %u)",
}
/*
- * Clean uncleaned reapped pages from vacuum_pages list and set xmin committed
- * for inserted tuples
+ * Clean uncleaned reapped pages from vacuum_pages list and set xmin
+ * committed for inserted tuples
*/
checked_moved = 0;
for (i = 0, vpp = vacuum_pages->vpl_pagedesc; i < vacuumed_pages; i++, vpp++)
@@ -1320,7 +1322,7 @@ Elapsed %u/%u sec.",
elog(FATAL, "VACUUM (vc_rpfheap): BlowawayRelationBuffers returned %d", i);
blkno = smgrtruncate(DEFAULT_SMGR, onerel, blkno);
Assert(blkno >= 0);
- vacrelstats->num_pages = blkno; /* set new number of blocks */
+ vacrelstats->num_pages = blkno; /* set new number of blocks */
}
if (Irel != (Relation *) NULL) /* pfree index' allocations */
@@ -1351,7 +1353,8 @@ vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList vacuum_pages)
int i;
nblocks = vacuum_pages->vpl_num_pages;
- nblocks -= vacuum_pages->vpl_empty_end_pages;/* nothing to do with them */
+ nblocks -= vacuum_pages->vpl_empty_end_pages; /* nothing to do with
+ * them */
for (i = 0, vpp = vacuum_pages->vpl_pagedesc; i < nblocks; i++, vpp++)
{
@@ -1385,7 +1388,8 @@ vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList vacuum_pages)
nblocks = smgrtruncate(DEFAULT_SMGR, onerel, nblocks);
Assert(nblocks >= 0);
- vacrelstats->num_pages = nblocks; /* set new number of blocks */
+ vacrelstats->num_pages = nblocks; /* set new number of
+ * blocks */
}
} /* vc_vacheap */
@@ -1555,7 +1559,7 @@ vc_tidreapped(ItemPointer itemptr, VPageList vpl)
vp = &vpd;
vpp = (VPageDescr *) vc_find_eq((char *) (vpl->vpl_pagedesc),
- vpl->vpl_num_pages, sizeof(VPageDescr), (char *) &vp,
+ vpl->vpl_num_pages, sizeof(VPageDescr), (char *) &vp,
vc_cmp_blk);
if (vpp == (VPageDescr *) NULL)
@@ -1570,7 +1574,7 @@ vc_tidreapped(ItemPointer itemptr, VPageList vpl)
}
voff = (OffsetNumber *) vc_find_eq((char *) (vp->vpd_offsets),
- vp->vpd_offsets_free, sizeof(OffsetNumber), (char *) &ioffno,
+ vp->vpd_offsets_free, sizeof(OffsetNumber), (char *) &ioffno,
vc_cmp_offno);
if (voff == (OffsetNumber *) NULL)
@@ -1746,16 +1750,16 @@ vc_updstats(Oid relid, int num_pages, int num_tuples, bool hasindex, VRelStats *
ScanKeyData askey;
Form_pg_attribute attp;
Buffer buffer;
-
+
/*
* update number of tuples and number of pages in pg_class
*/
rtup = SearchSysCacheTuple(RELOID,
- ObjectIdGetDatum(relid),
- 0, 0, 0);
+ ObjectIdGetDatum(relid),
+ 0, 0, 0);
if (!HeapTupleIsValid(rtup))
elog(ERROR, "pg_class entry for relid %d vanished during vacuuming",
- relid);
+ relid);
rd = heap_openr(RelationRelationName);
@@ -2207,16 +2211,20 @@ vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
AttrNumber *attnumP;
int natts;
int i;
-
+
*Idesc = (IndDesc *) palloc(nindices * sizeof(IndDesc));
for (i = 0, idcur = *Idesc; i < nindices; i++, idcur++)
{
cachetuple = SearchSysCacheTupleCopy(INDEXRELID,
- ObjectIdGetDatum(RelationGetRelid(Irel[i])),
- 0, 0, 0);
+ ObjectIdGetDatum(RelationGetRelid(Irel[i])),
+ 0, 0, 0);
Assert(cachetuple);
- /* we never free the copy we make, because Idesc needs it for later */
+
+ /*
+ * we never free the copy we make, because Idesc needs it for
+ * later
+ */
idcur->tform = (Form_pg_index) GETSTRUCT(cachetuple);
for (attnumP = &(idcur->tform->indkey[0]), natts = 0;
*attnumP != InvalidAttrNumber && natts != INDEX_MAX_KEYS;
@@ -2247,7 +2255,8 @@ vc_enough_space(VPageDescr vpd, Size len)
if (len > vpd->vpd_free)
return false;
- if (vpd->vpd_offsets_used < vpd->vpd_offsets_free) /* there are free itemid(s) */
+ if (vpd->vpd_offsets_used < vpd->vpd_offsets_free) /* there are free
+ * itemid(s) */
return true; /* and len <= free_space */
/* ok. noff_usd >= noff_free and so we'll have to allocate new itemid */
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c
index e01967f43b..2c813dcd59 100644
--- a/src/backend/commands/variable.c
+++ b/src/backend/commands/variable.c
@@ -2,7 +2,7 @@
* Routines for handling of 'SET var TO',
* 'SHOW var' and 'RESET var' statements.
*
- * $Id: variable.c,v 1.11 1998/09/01 03:22:10 momjian Exp $
+ * $Id: variable.c,v 1.12 1998/09/01 04:28:07 momjian Exp $
*
*/
@@ -554,7 +554,7 @@ struct VariableParsers
{
"client_encoding", parse_client_encoding, show_client_encoding, reset_client_encoding
},
- {
+ {
"server_encoding", parse_server_encoding, show_server_encoding, reset_server_encoding
},
#endif
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c
index 0da160d5e8..cf81e8be66 100644
--- a/src/backend/commands/view.c
+++ b/src/backend/commands/view.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.24 1998/08/06 05:12:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.25 1998/09/01 04:28:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -223,7 +223,7 @@ UpdateRangeTableOfViewParse(char *viewName, Query *viewParse)
OffsetVarNodes(viewParse->qual, 2);
OffsetVarNodes(viewParse->havingQual, 2);
-
+
/*
* find the old range table...
diff --git a/src/backend/executor/execAmi.c b/src/backend/executor/execAmi.c
index 210d2d5072..e8c9bec312 100644
--- a/src/backend/executor/execAmi.c
+++ b/src/backend/executor/execAmi.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.24 1998/07/27 19:37:54 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.25 1998/09/01 04:28:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,8 +54,7 @@
#include "access/heapam.h"
#include "catalog/heap.h"
-static Pointer
-ExecBeginScan(Relation relation, int nkeys, ScanKey skeys,
+static Pointer ExecBeginScan(Relation relation, int nkeys, ScanKey skeys,
bool isindex, ScanDirection dir, Snapshot snapshot);
static Relation ExecOpenR(Oid relationOid, bool isindex);
diff --git a/src/backend/executor/execFlatten.c b/src/backend/executor/execFlatten.c
index 24b524fbf5..729232d9d4 100644
--- a/src/backend/executor/execFlatten.c
+++ b/src/backend/executor/execFlatten.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.6 1998/09/01 03:22:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/execFlatten.c,v 1.7 1998/09/01 04:28:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,8 +33,7 @@
#include "executor/execFlatten.h"
#ifdef SETS_FIXED
-static bool
-FjoinBumpOuterNodes(TargetEntry *tlist, ExprContext *econtext,
+static bool FjoinBumpOuterNodes(TargetEntry *tlist, ExprContext *econtext,
DatumPtr results, char *nulls);
#endif
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 3d782f34b0..f470abb6b6 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.54 1998/09/01 03:22:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.55 1998/09/01 04:28:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,31 +54,25 @@
#include "catalog/heap.h"
#include "commands/trigger.h"
-void
-ExecCheckPerms(CmdType operation, int resultRelation, List *rangeTable,
+void ExecCheckPerms(CmdType operation, int resultRelation, List *rangeTable,
Query *parseTree);
/* decls for local routines only used within this module */
-static TupleDesc
-InitPlan(CmdType operation, Query *parseTree,
+static TupleDesc InitPlan(CmdType operation, Query *parseTree,
Plan *plan, EState *estate);
static void EndPlan(Plan *plan, EState *estate);
-static TupleTableSlot *
-ExecutePlan(EState *estate, Plan *plan,
+static TupleTableSlot *ExecutePlan(EState *estate, Plan *plan,
Query *parseTree, CmdType operation,
int numberTuples, ScanDirection direction,
void (*printfunc) ());
static void ExecRetrieve(TupleTableSlot *slot, void (*printfunc) (),
EState *estate);
-static void
-ExecAppend(TupleTableSlot *slot, ItemPointer tupleid,
+static void ExecAppend(TupleTableSlot *slot, ItemPointer tupleid,
EState *estate);
-static void
-ExecDelete(TupleTableSlot *slot, ItemPointer tupleid,
+static void ExecDelete(TupleTableSlot *slot, ItemPointer tupleid,
EState *estate);
-static void
-ExecReplace(TupleTableSlot *slot, ItemPointer tupleid,
+static void ExecReplace(TupleTableSlot *slot, ItemPointer tupleid,
EState *estate, Query *parseTree);
/* end of local decls */
@@ -124,7 +118,7 @@ ExecutorStart(QueryDesc *queryDesc, EState *estate)
palloc(queryDesc->plantree->nParamExec * sizeof(ParamExecData));
memset(estate->es_param_exec_vals, 0, queryDesc->plantree->nParamExec * sizeof(ParamExecData));
}
-
+
estate->es_snapshot = SnapshotNow;
result = InitPlan(queryDesc->operation,
@@ -315,8 +309,8 @@ ExecCheckPerms(CmdType operation,
relid = rte->relid;
htup = SearchSysCacheTuple(RELOID,
- ObjectIdGetDatum(relid),
- 0, 0, 0);
+ ObjectIdGetDatum(relid),
+ 0, 0, 0);
if (!HeapTupleIsValid(htup))
elog(ERROR, "ExecCheckPerms: bogus RT relid: %d",
relid);
@@ -521,19 +515,19 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
* NOTE: in the future we might want to initialize the junk
* filter for all queries.
* ----------------
- * SELECT added by [email protected] 5/20/98 to allow
- * ORDER/GROUP BY have an identifier missing from the target.
+ * SELECT added by [email protected] 5/20/98 to allow
+ * ORDER/GROUP BY have an identifier missing from the target.
*/
{
- bool junk_filter_needed = false;
- List *tlist;
-
+ bool junk_filter_needed = false;
+ List *tlist;
+
if (operation == CMD_SELECT)
{
foreach(tlist, targetList)
{
- TargetEntry *tle = lfirst(tlist);
-
+ TargetEntry *tle = lfirst(tlist);
+
if (tle->resdom->resjunk)
{
junk_filter_needed = true;
@@ -547,6 +541,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
(operation == CMD_SELECT && junk_filter_needed))
{
JunkFilter *j = (JunkFilter *) ExecInitJunkFilter(targetList);
+
estate->es_junkFilter = j;
if (operation == CMD_SELECT)
@@ -555,7 +550,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
else
estate->es_junkFilter = NULL;
}
-
+
/* ----------------
* initialize the "into" relation
* ----------------
@@ -588,7 +583,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
tupdesc = CreateTupleDescCopy(tupType);
intoRelationId = heap_create_with_catalog(intoName,
- tupdesc, RELKIND_RELATION);
+ tupdesc, RELKIND_RELATION);
FreeTupleDesc(tupdesc);
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index 72de0b8faf..f3d12b1319 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.35 1998/09/01 03:22:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.36 1998/09/01 04:28:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,24 +68,19 @@ int execConstLen;
/* static functions decls */
static Datum ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull);
-static Datum
-ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext *econtext,
+static Datum ExecEvalArrayRef(ArrayRef *arrayRef, ExprContext *econtext,
bool *isNull, bool *isDone);
static Datum ExecEvalAnd(Expr *andExpr, ExprContext *econtext, bool *isNull);
-static Datum
-ExecEvalFunc(Expr *funcClause, ExprContext *econtext,
+static Datum ExecEvalFunc(Expr *funcClause, ExprContext *econtext,
bool *isNull, bool *isDone);
-static void
-ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext *econtext,
+static void ExecEvalFuncArgs(FunctionCachePtr fcache, ExprContext *econtext,
List *argList, Datum argV[], bool *argIsDone);
static Datum ExecEvalNot(Expr *notclause, ExprContext *econtext, bool *isNull);
-static Datum
-ExecEvalOper(Expr *opClause, ExprContext *econtext,
+static Datum ExecEvalOper(Expr *opClause, ExprContext *econtext,
bool *isNull);
static Datum ExecEvalOr(Expr *orExpr, ExprContext *econtext, bool *isNull);
static Datum ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull);
-static Datum
-ExecMakeFunctionResult(Node *node, List *arguments,
+static Datum ExecMakeFunctionResult(Node *node, List *arguments,
ExprContext *econtext, bool *isNull, bool *isDone);
static bool ExecQualClause(Node *clause, ExprContext *econtext);
@@ -200,7 +195,7 @@ ExecEvalArrayRef(ArrayRef *arrayRef,
static Datum
ExecEvalAggreg(Aggreg *agg, ExprContext *econtext, bool *isNull)
{
- *isNull = econtext->ecxt_nulls[agg->aggno];
+ *isNull = econtext->ecxt_nulls[agg->aggno];
return econtext->ecxt_values[agg->aggno];
}
diff --git a/src/backend/executor/execScan.c b/src/backend/executor/execScan.c
index e04876c331..30b1166e80 100644
--- a/src/backend/executor/execScan.c
+++ b/src/backend/executor/execScan.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.7 1998/02/26 12:13:09 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.8 1998/09/01 04:28:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,9 +106,9 @@ ExecScan(Scan *node,
* NULL, then it means there is nothing more to scan
* so we just return the empty slot...
*
- * ... with invalid TupleDesc (not the same as in
- * projInfo->pi_slot) and break upper MergeJoin node.
- * New code below do what ExecProject() does. - vadim 02/26/98
+ * ... with invalid TupleDesc (not the same as in
+ * projInfo->pi_slot) and break upper MergeJoin node.
+ * New code below do what ExecProject() does. - vadim 02/26/98
* ----------------
*/
if (TupIsNull(slot))
@@ -116,10 +116,10 @@ ExecScan(Scan *node,
scanstate->cstate.cs_TupFromTlist = false;
resultSlot = scanstate->cstate.cs_ProjInfo->pi_slot;
return (TupleTableSlot *)
- ExecStoreTuple (NULL,
- resultSlot,
- InvalidBuffer,
- true);
+ ExecStoreTuple(NULL,
+ resultSlot,
+ InvalidBuffer,
+ true);
}
/* ----------------
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index 7cc53dce48..fb83fd6e55 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.37 1998/09/01 03:22:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.38 1998/09/01 04:28:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,8 +57,7 @@
#include "utils/lsyscache.h"
#include "utils/mcxt.h"
-static void
-ExecGetIndexKeyInfo(Form_pg_index indexTuple, int *numAttsOutP,
+static void ExecGetIndexKeyInfo(Form_pg_index indexTuple, int *numAttsOutP,
AttrNumber **attsOutP, FuncIndexInfoPtr fInfoP);
/* ----------------------------------------------------------------
@@ -750,7 +749,7 @@ ExecOpenIndices(Oid resultRelationOid,
*/
indexSd = heap_beginscan(indexRd, /* scan desc */
false, /* scan backward flag */
- SnapshotNow, /* NOW snapshot */
+ SnapshotNow, /* NOW snapshot */
1, /* number scan keys */
&key); /* scan keys */
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index 4d23d27178..fd095e7864 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.19 1998/09/01 03:22:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.20 1998/09/01 04:28:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,16 +57,13 @@ typedef struct local_es
/* non-export function prototypes */
static TupleDesc postquel_start(execution_state *es);
-static execution_state *
-init_execution_state(FunctionCachePtr fcache,
+static execution_state *init_execution_state(FunctionCachePtr fcache,
char *args[]);
static TupleTableSlot *postquel_getnext(execution_state *es);
static void postquel_end(execution_state *es);
-static void
-postquel_sub_params(execution_state *es, int nargs,
+static void postquel_sub_params(execution_state *es, int nargs,
char *args[], bool *nullV);
-static Datum
-postquel_execute(execution_state *es, FunctionCachePtr fcache,
+static Datum postquel_execute(execution_state *es, FunctionCachePtr fcache,
List *fTlist, char **args, bool *isNull);
diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c
index 28f50bdd4f..c7e69d1a72 100644
--- a/src/backend/executor/nodeAgg.c
+++ b/src/backend/executor/nodeAgg.c
@@ -109,388 +109,397 @@ ExecAgg(Agg *node)
bool isNull = FALSE,
isNull1 = FALSE,
isNull2 = FALSE;
- bool qual_result;
-
+ bool qual_result;
+
/* ---------------------
* get state info from node
* ---------------------
*/
- /* We loop retrieving groups until we find one matching node->plan.qual */
- do {
+ /*
+ * We loop retrieving groups until we find one matching
+ * node->plan.qual
+ */
+ do
+ {
- aggstate = node->aggstate;
- if (aggstate->agg_done)
- return NULL;
+ aggstate = node->aggstate;
+ if (aggstate->agg_done)
+ return NULL;
- estate = node->plan.state;
- econtext = aggstate->csstate.cstate.cs_ExprContext;
+ estate = node->plan.state;
+ econtext = aggstate->csstate.cstate.cs_ExprContext;
- nagg = length(node->aggs);
+ nagg = length(node->aggs);
- aggregates = (Aggreg **) palloc(sizeof(Aggreg *) * nagg);
+ aggregates = (Aggreg **) palloc(sizeof(Aggreg *) * nagg);
- /* take List* and make it an array that can be quickly indexed */
- alist = node->aggs;
- for (i = 0; i < nagg; i++)
- {
- aggregates[i] = lfirst(alist);
- aggregates[i]->aggno = i;
- alist = lnext(alist);
- }
-
- value1 = node->aggstate->csstate.cstate.cs_ExprContext->ecxt_values;
- nulls = node->aggstate->csstate.cstate.cs_ExprContext->ecxt_nulls;
+ /* take List* and make it an array that can be quickly indexed */
+ alist = node->aggs;
+ for (i = 0; i < nagg; i++)
+ {
+ aggregates[i] = lfirst(alist);
+ aggregates[i]->aggno = i;
+ alist = lnext(alist);
+ }
- value2 = (Datum *) palloc(sizeof(Datum) * nagg);
- MemSet(value2, 0, sizeof(Datum) * nagg);
+ value1 = node->aggstate->csstate.cstate.cs_ExprContext->ecxt_values;
+ nulls = node->aggstate->csstate.cstate.cs_ExprContext->ecxt_nulls;
- aggFuncInfo = (AggFuncInfo *) palloc(sizeof(AggFuncInfo) * nagg);
- MemSet(aggFuncInfo, 0, sizeof(AggFuncInfo) * nagg);
+ value2 = (Datum *) palloc(sizeof(Datum) * nagg);
+ MemSet(value2, 0, sizeof(Datum) * nagg);
- noInitValue = (int *) palloc(sizeof(int) * nagg);
- MemSet(noInitValue, 0, sizeof(noInitValue) * nagg);
+ aggFuncInfo = (AggFuncInfo *) palloc(sizeof(AggFuncInfo) * nagg);
+ MemSet(aggFuncInfo, 0, sizeof(AggFuncInfo) * nagg);
- outerPlan = outerPlan(node);
- oneTuple = NULL;
+ noInitValue = (int *) palloc(sizeof(int) * nagg);
+ MemSet(noInitValue, 0, sizeof(noInitValue) * nagg);
- projInfo = aggstate->csstate.cstate.cs_ProjInfo;
+ outerPlan = outerPlan(node);
+ oneTuple = NULL;
- for (i = 0; i < nagg; i++)
- {
- Aggreg *agg;
- char *aggname;
- HeapTuple aggTuple;
- Form_pg_aggregate aggp;
- Oid xfn1_oid,
- xfn2_oid,
- finalfn_oid;
-
- agg = aggregates[i];
-
- /* ---------------------
- * find transfer functions of all the aggregates and initialize
- * their initial values
- * ---------------------
- */
- aggname = agg->aggname;
- aggTuple = SearchSysCacheTuple(AGGNAME,
- PointerGetDatum(aggname),
- ObjectIdGetDatum(agg->basetype),
- 0, 0);
- if (!HeapTupleIsValid(aggTuple))
- elog(ERROR, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)",
- aggname,
- typeidTypeName(agg->basetype));
- aggp = (Form_pg_aggregate) GETSTRUCT(aggTuple);
-
- xfn1_oid = aggp->aggtransfn1;
- xfn2_oid = aggp->aggtransfn2;
- finalfn_oid = aggp->aggfinalfn;
-
- if (OidIsValid(finalfn_oid))
- {
- fmgr_info(finalfn_oid, &aggFuncInfo[i].finalfn);
- aggFuncInfo[i].finalfn_oid = finalfn_oid;
- }
+ projInfo = aggstate->csstate.cstate.cs_ProjInfo;
- if (OidIsValid(xfn2_oid))
+ for (i = 0; i < nagg; i++)
{
- fmgr_info(xfn2_oid, &aggFuncInfo[i].xfn2);
- aggFuncInfo[i].xfn2_oid = xfn2_oid;
- value2[i] = (Datum) AggNameGetInitVal((char *) aggname,
- aggp->aggbasetype,
- 2,
- &isNull2);
- /* ------------------------------------------
- * If there is a second transition function, its initial
- * value must exist -- as it does not depend on data values,
- * we have no other way of determining an initial value.
- * ------------------------------------------
+ Aggreg *agg;
+ char *aggname;
+ HeapTuple aggTuple;
+ Form_pg_aggregate aggp;
+ Oid xfn1_oid,
+ xfn2_oid,
+ finalfn_oid;
+
+ agg = aggregates[i];
+
+ /* ---------------------
+ * find transfer functions of all the aggregates and initialize
+ * their initial values
+ * ---------------------
*/
- if (isNull2)
- elog(ERROR, "ExecAgg: agginitval2 is null");
- }
+ aggname = agg->aggname;
+ aggTuple = SearchSysCacheTuple(AGGNAME,
+ PointerGetDatum(aggname),
+ ObjectIdGetDatum(agg->basetype),
+ 0, 0);
+ if (!HeapTupleIsValid(aggTuple))
+ elog(ERROR, "ExecAgg: cache lookup failed for aggregate \"%s\"(%s)",
+ aggname,
+ typeidTypeName(agg->basetype));
+ aggp = (Form_pg_aggregate) GETSTRUCT(aggTuple);
+
+ xfn1_oid = aggp->aggtransfn1;
+ xfn2_oid = aggp->aggtransfn2;
+ finalfn_oid = aggp->aggfinalfn;
+
+ if (OidIsValid(finalfn_oid))
+ {
+ fmgr_info(finalfn_oid, &aggFuncInfo[i].finalfn);
+ aggFuncInfo[i].finalfn_oid = finalfn_oid;
+ }
- if (OidIsValid(xfn1_oid))
- {
- fmgr_info(xfn1_oid, &aggFuncInfo[i].xfn1);
- aggFuncInfo[i].xfn1_oid = xfn1_oid;
- value1[i] = (Datum) AggNameGetInitVal((char *) aggname,
- aggp->aggbasetype,
- 1,
- &isNull1);
-
- /* ------------------------------------------
- * If the initial value for the first transition function
- * doesn't exist in the pg_aggregate table then we let
- * the first value returned from the outer procNode become
- * the initial value. (This is useful for aggregates like
- * max{} and min{}.)
- * ------------------------------------------
- */
- if (isNull1)
+ if (OidIsValid(xfn2_oid))
{
- noInitValue[i] = 1;
- nulls[i] = 1;
+ fmgr_info(xfn2_oid, &aggFuncInfo[i].xfn2);
+ aggFuncInfo[i].xfn2_oid = xfn2_oid;
+ value2[i] = (Datum) AggNameGetInitVal((char *) aggname,
+ aggp->aggbasetype,
+ 2,
+ &isNull2);
+ /* ------------------------------------------
+ * If there is a second transition function, its initial
+ * value must exist -- as it does not depend on data values,
+ * we have no other way of determining an initial value.
+ * ------------------------------------------
+ */
+ if (isNull2)
+ elog(ERROR, "ExecAgg: agginitval2 is null");
}
- }
- }
-
- /* ----------------
- * for each tuple from the the outer plan, apply all the aggregates
- * ----------------
- */
- for (;;)
- {
- HeapTuple outerTuple = NULL;
- TupleTableSlot *outerslot;
-
- isNull = isNull1 = isNull2 = 0;
- outerslot = ExecProcNode(outerPlan, (Plan *) node);
- if (outerslot)
- outerTuple = outerslot->val;
- if (!HeapTupleIsValid(outerTuple))
- {
- /*
- * when the outerplan doesn't return a single tuple, create a
- * dummy heaptuple anyway because we still need to return a
- * valid aggregate value. The value returned will be the
- * initial values of the transition functions
- */
- if (nTuplesAgged == 0)
+ if (OidIsValid(xfn1_oid))
{
- TupleDesc tupType;
- Datum *tupValue;
- char *null_array;
-
- tupType = aggstate->csstate.css_ScanTupleSlot->ttc_tupleDescriptor;
- tupValue = projInfo->pi_tupValue;
-
- /* initially, set all the values to NULL */
- null_array = palloc(tupType->natts);
- for (i = 0; i < tupType->natts; i++)
- null_array[i] = 'n';
- oneTuple = heap_formtuple(tupType, tupValue, null_array);
- pfree(null_array);
+ fmgr_info(xfn1_oid, &aggFuncInfo[i].xfn1);
+ aggFuncInfo[i].xfn1_oid = xfn1_oid;
+ value1[i] = (Datum) AggNameGetInitVal((char *) aggname,
+ aggp->aggbasetype,
+ 1,
+ &isNull1);
+
+ /* ------------------------------------------
+ * If the initial value for the first transition function
+ * doesn't exist in the pg_aggregate table then we let
+ * the first value returned from the outer procNode become
+ * the initial value. (This is useful for aggregates like
+ * max{} and min{}.)
+ * ------------------------------------------
+ */
+ if (isNull1)
+ {
+ noInitValue[i] = 1;
+ nulls[i] = 1;
+ }
}
- break;
}
- for (i = 0; i < nagg; i++)
+ /* ----------------
+ * for each tuple from the the outer plan, apply all the aggregates
+ * ----------------
+ */
+ for (;;)
{
- AttrNumber attnum;
- int2 attlen = 0;
- Datum newVal = (Datum) NULL;
- AggFuncInfo *aggfns = &aggFuncInfo[i];
- Datum args[2];
- Node *tagnode = NULL;
-
- switch (nodeTag(aggregates[i]->target))
+ HeapTuple outerTuple = NULL;
+ TupleTableSlot *outerslot;
+
+ isNull = isNull1 = isNull2 = 0;
+ outerslot = ExecProcNode(outerPlan, (Plan *) node);
+ if (outerslot)
+ outerTuple = outerslot->val;
+ if (!HeapTupleIsValid(outerTuple))
{
- case T_Var:
- tagnode = NULL;
- newVal = aggGetAttr(outerslot,
- aggregates[i],
- &isNull);
- break;
- case T_Expr:
- tagnode = ((Expr *) aggregates[i]->target)->oper;
- econtext->ecxt_scantuple = outerslot;
- newVal = ExecEvalExpr(aggregates[i]->target, econtext,
- &isNull, &isDone);
- break;
- case T_Const:
- tagnode = NULL;
- econtext->ecxt_scantuple = outerslot;
- newVal = ExecEvalExpr(aggregates[i]->target, econtext,
- &isNull, &isDone);
- break;
- default:
- elog(ERROR, "ExecAgg: Bad Agg->Target for Agg %d", i);
- }
- if (isNull && !aggregates[i]->usenulls)
- continue; /* ignore this tuple for this agg */
+ /*
+ * when the outerplan doesn't return a single tuple,
+ * create a dummy heaptuple anyway because we still need
+ * to return a valid aggregate value. The value returned
+ * will be the initial values of the transition functions
+ */
+ if (nTuplesAgged == 0)
+ {
+ TupleDesc tupType;
+ Datum *tupValue;
+ char *null_array;
+
+ tupType = aggstate->csstate.css_ScanTupleSlot->ttc_tupleDescriptor;
+ tupValue = projInfo->pi_tupValue;
+
+ /* initially, set all the values to NULL */
+ null_array = palloc(tupType->natts);
+ for (i = 0; i < tupType->natts; i++)
+ null_array[i] = 'n';
+ oneTuple = heap_formtuple(tupType, tupValue, null_array);
+ pfree(null_array);
+ }
+ break;
+ }
- if (aggfns->xfn1.fn_addr != NULL)
+ for (i = 0; i < nagg; i++)
{
- if (noInitValue[i])
+ AttrNumber attnum;
+ int2 attlen = 0;
+ Datum newVal = (Datum) NULL;
+ AggFuncInfo *aggfns = &aggFuncInfo[i];
+ Datum args[2];
+ Node *tagnode = NULL;
+
+ switch (nodeTag(aggregates[i]->target))
+ {
+ case T_Var:
+ tagnode = NULL;
+ newVal = aggGetAttr(outerslot,
+ aggregates[i],
+ &isNull);
+ break;
+ case T_Expr:
+ tagnode = ((Expr *) aggregates[i]->target)->oper;
+ econtext->ecxt_scantuple = outerslot;
+ newVal = ExecEvalExpr(aggregates[i]->target, econtext,
+ &isNull, &isDone);
+ break;
+ case T_Const:
+ tagnode = NULL;
+ econtext->ecxt_scantuple = outerslot;
+ newVal = ExecEvalExpr(aggregates[i]->target, econtext,
+ &isNull, &isDone);
+ break;
+ default:
+ elog(ERROR, "ExecAgg: Bad Agg->Target for Agg %d", i);
+ }
+
+ if (isNull && !aggregates[i]->usenulls)
+ continue; /* ignore this tuple for this agg */
+
+ if (aggfns->xfn1.fn_addr != NULL)
{
- int byVal = 0;
-
- /*
- * value1 and value2 has not been initialized. This is
- * the first non-NULL value. We use it as the initial
- * value.
- */
-
- /*
- * but we can't just use it straight, we have to make
- * a copy of it since the tuple from which it came
- * will be freed on the next iteration of the scan
- */
- switch (nodeTag(aggregates[i]->target))
+ if (noInitValue[i])
{
- case T_Var:
- attnum = ((Var *) aggregates[i]->target)->varattno;
- attlen = outerslot->ttc_tupleDescriptor->attrs[attnum - 1]->attlen;
- byVal = outerslot->ttc_tupleDescriptor->attrs[attnum - 1]->attbyval;
-
- break;
- case T_Expr:
- {
- FunctionCachePtr fcache_ptr;
-
- if (nodeTag(tagnode) == T_Func)
- fcache_ptr = ((Func *) tagnode)->func_fcache;
- else
- fcache_ptr = ((Oper *) tagnode)->op_fcache;
- attlen = fcache_ptr->typlen;
- byVal = fcache_ptr->typbyval;
+ int byVal = 0;
+
+ /*
+ * value1 and value2 has not been initialized.
+ * This is the first non-NULL value. We use it as
+ * the initial value.
+ */
+
+ /*
+ * but we can't just use it straight, we have to
+ * make a copy of it since the tuple from which it
+ * came will be freed on the next iteration of the
+ * scan
+ */
+ switch (nodeTag(aggregates[i]->target))
+ {
+ case T_Var:
+ attnum = ((Var *) aggregates[i]->target)->varattno;
+ attlen = outerslot->ttc_tupleDescriptor->attrs[attnum - 1]->attlen;
+ byVal = outerslot->ttc_tupleDescriptor->attrs[attnum - 1]->attbyval;
+
+ break;
+ case T_Expr:
+ {
+ FunctionCachePtr fcache_ptr;
+
+ if (nodeTag(tagnode) == T_Func)
+ fcache_ptr = ((Func *) tagnode)->func_fcache;
+ else
+ fcache_ptr = ((Oper *) tagnode)->op_fcache;
+ attlen = fcache_ptr->typlen;
+ byVal = fcache_ptr->typbyval;
+
+ break;
+ }
+ case T_Const:
+ attlen = ((Const *) aggregates[i]->target)->constlen;
+ byVal = ((Const *) aggregates[i]->target)->constbyval;
break;
- }
- case T_Const:
- attlen = ((Const *) aggregates[i]->target)->constlen;
- byVal = ((Const *) aggregates[i]->target)->constbyval;
-
- break;
- default:
- elog(ERROR, "ExecAgg: Bad Agg->Target for Agg %d", i);
+ default:
+ elog(ERROR, "ExecAgg: Bad Agg->Target for Agg %d", i);
+ }
+ if (attlen == -1)
+ {
+ /* variable length */
+ attlen = VARSIZE((struct varlena *) newVal);
+ }
+ value1[i] = (Datum) palloc(attlen);
+ if (byVal)
+ value1[i] = newVal;
+ else
+ memmove((char *) (value1[i]), (char *) newVal, attlen);
+ noInitValue[i] = 0;
+ nulls[i] = 0;
}
- if (attlen == -1)
+ else
{
- /* variable length */
- attlen = VARSIZE((struct varlena *) newVal);
+
+ /*
+ * apply the transition functions.
+ */
+ args[0] = value1[i];
+ args[1] = newVal;
+ value1[i] =
+ (Datum) fmgr_c(&aggfns->xfn1,
+ (FmgrValues *) args,
+ &isNull1);
+ Assert(!isNull1);
}
- value1[i] = (Datum) palloc(attlen);
- if (byVal)
- value1[i] = newVal;
- else
- memmove((char *) (value1[i]), (char *) newVal, attlen);
- noInitValue[i] = 0;
- nulls[i] = 0;
}
- else
+
+ if (aggfns->xfn2.fn_addr != NULL)
{
+ Datum xfn2_val = value2[i];
- /*
- * apply the transition functions.
- */
- args[0] = value1[i];
- args[1] = newVal;
- value1[i] =
- (Datum) fmgr_c(&aggfns->xfn1,
- (FmgrValues *) args,
- &isNull1);
- Assert(!isNull1);
+ value2[i] =
+ (Datum) fmgr_c(&aggfns->xfn2,
+ (FmgrValues *) &xfn2_val, &isNull2);
+ Assert(!isNull2);
}
}
- if (aggfns->xfn2.fn_addr != NULL)
- {
- Datum xfn2_val = value2[i];
+ /*
+ * keep this for the projection (we only need one of these -
+ * all the tuples we aggregate over share the same group
+ * column)
+ */
+ if (!oneTuple)
+ oneTuple = heap_copytuple(outerslot->val);
- value2[i] =
- (Datum) fmgr_c(&aggfns->xfn2,
- (FmgrValues *) &xfn2_val, &isNull2);
- Assert(!isNull2);
- }
+ nTuplesAgged++;
}
- /*
- * keep this for the projection (we only need one of these - all
- * the tuples we aggregate over share the same group column)
+ /* --------------
+ * finalize the aggregate (if necessary), and get the resultant value
+ * --------------
*/
- if (!oneTuple)
- oneTuple = heap_copytuple(outerslot->val);
-
- nTuplesAgged++;
- }
-
- /* --------------
- * finalize the aggregate (if necessary), and get the resultant value
- * --------------
- */
- for (i = 0; i < nagg; i++)
- {
- char *args[2];
- AggFuncInfo *aggfns = &aggFuncInfo[i];
-
- if (noInitValue[i])
+ for (i = 0; i < nagg; i++)
{
+ char *args[2];
+ AggFuncInfo *aggfns = &aggFuncInfo[i];
- /*
- * No values found for this agg; return current state. This
- * seems to fix behavior for avg() aggregate. -tgl 12/96
- */
- }
- else if (aggfns->finalfn.fn_addr != NULL && nTuplesAgged > 0)
- {
- if (aggfns->finalfn.fn_nargs > 1)
+ if (noInitValue[i])
{
- args[0] = (char *) value1[i];
- args[1] = (char *) value2[i];
+
+ /*
+ * No values found for this agg; return current state.
+ * This seems to fix behavior for avg() aggregate. -tgl
+ * 12/96
+ */
+ }
+ else if (aggfns->finalfn.fn_addr != NULL && nTuplesAgged > 0)
+ {
+ if (aggfns->finalfn.fn_nargs > 1)
+ {
+ args[0] = (char *) value1[i];
+ args[1] = (char *) value2[i];
+ }
+ else if (aggfns->xfn1.fn_addr != NULL)
+ args[0] = (char *) value1[i];
+ else if (aggfns->xfn2.fn_addr != NULL)
+ args[0] = (char *) value2[i];
+ else
+ elog(NOTICE, "ExecAgg: no valid transition functions??");
+ value1[i] = (Datum) fmgr_c(&aggfns->finalfn,
+ (FmgrValues *) args, &(nulls[i]));
}
else if (aggfns->xfn1.fn_addr != NULL)
- args[0] = (char *) value1[i];
+ {
+
+ /*
+ * value in the right place, ignore. (If you remove this
+ * case, fix the else part. -ay 2/95)
+ */
+ }
else if (aggfns->xfn2.fn_addr != NULL)
- args[0] = (char *) value2[i];
+ value1[i] = value2[i];
else
- elog(NOTICE, "ExecAgg: no valid transition functions??");
- value1[i] = (Datum) fmgr_c(&aggfns->finalfn,
- (FmgrValues *) args, &(nulls[i]));
+ elog(ERROR, "ExecAgg: no valid transition functions??");
}
- else if (aggfns->xfn1.fn_addr != NULL)
- {
- /*
- * value in the right place, ignore. (If you remove this case,
- * fix the else part. -ay 2/95)
- */
+ /*
+ * whether the aggregation is done depends on whether we are doing
+ * aggregation over groups or the entire table
+ */
+ if (nodeTag(outerPlan) == T_Group)
+ {
+ /* aggregation over groups */
+ aggstate->agg_done = ((Group *) outerPlan)->grpstate->grp_done;
}
- else if (aggfns->xfn2.fn_addr != NULL)
- value1[i] = value2[i];
else
- elog(ERROR, "ExecAgg: no valid transition functions??");
- }
+ aggstate->agg_done = TRUE;
- /*
- * whether the aggregation is done depends on whether we are doing
- * aggregation over groups or the entire table
- */
- if (nodeTag(outerPlan) == T_Group)
- {
- /* aggregation over groups */
- aggstate->agg_done = ((Group *) outerPlan)->grpstate->grp_done;
- }
- else
- aggstate->agg_done = TRUE;
+ /* ----------------
+ * form a projection tuple, store it in the result tuple
+ * slot and return it.
+ * ----------------
+ */
- /* ----------------
- * form a projection tuple, store it in the result tuple
- * slot and return it.
- * ----------------
- */
-
- ExecStoreTuple(oneTuple,
- aggstate->csstate.css_ScanTupleSlot,
- InvalidBuffer,
- false);
- econtext->ecxt_scantuple = aggstate->csstate.css_ScanTupleSlot;
-
- resultSlot = ExecProject(projInfo, &isDone);
-
- /* As long as the retrieved group does not match the qualifications it is ignored and
- * the next group is fetched */
- qual_result=ExecQual(fix_opids(node->plan.qual),econtext);
- if (oneTuple)
- pfree(oneTuple);
- }
- while((node->plan.qual!=NULL) && (qual_result!=true));
+ ExecStoreTuple(oneTuple,
+ aggstate->csstate.css_ScanTupleSlot,
+ InvalidBuffer,
+ false);
+ econtext->ecxt_scantuple = aggstate->csstate.css_ScanTupleSlot;
+
+ resultSlot = ExecProject(projInfo, &isDone);
+
+ /*
+ * As long as the retrieved group does not match the
+ * qualifications it is ignored and the next group is fetched
+ */
+ qual_result = ExecQual(fix_opids(node->plan.qual), econtext);
+ if (oneTuple)
+ pfree(oneTuple);
+ }
+ while ((node->plan.qual != NULL) && (qual_result != true));
return resultSlot;
}
diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c
index aea1873934..1c2217cdc4 100644
--- a/src/backend/executor/nodeAppend.c
+++ b/src/backend/executor/nodeAppend.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.14 1998/07/15 22:16:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.15 1998/09/01 04:28:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -158,7 +158,7 @@ exec_append_initialize_next(Append *node)
{
estate->es_result_relation_info =
(RelationInfo *) nth(whichplan,
- appendstate->as_result_relation_info_list);
+ appendstate->as_result_relation_info_list);
}
result_slot->ttc_whichplan = whichplan;
@@ -505,8 +505,8 @@ void
ExecReScanAppend(Append *node, ExprContext *exprCtxt, Plan *parent)
{
AppendState *appendstate = node->appendstate;
- int nplans = length(node->appendplans);
- int i;
+ int nplans = length(node->appendplans);
+ int i;
for (i = 0; i < nplans; i++)
{
@@ -517,7 +517,7 @@ ExecReScanAppend(Append *node, ExprContext *exprCtxt, Plan *parent)
if (rescanNode->chgParam == NULL)
{
exec_append_initialize_next(node);
- ExecReScan((Plan *)rescanNode, exprCtxt, (Plan *) node);
+ ExecReScan((Plan *) rescanNode, exprCtxt, (Plan *) node);
}
}
appendstate->as_whichplan = 0;
diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c
index cecae67b78..1fdf6bedc3 100644
--- a/src/backend/executor/nodeGroup.c
+++ b/src/backend/executor/nodeGroup.c
@@ -13,7 +13,7 @@
* columns. (ie. tuples from the same group are consecutive)
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.21 1998/07/16 02:58:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.22 1998/09/01 04:28:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,8 +30,7 @@
static TupleTableSlot *ExecGroupEveryTuple(Group *node);
static TupleTableSlot *ExecGroupOneTuple(Group *node);
-static bool
-sameGroup(HeapTuple oldslot, HeapTuple newslot,
+static bool sameGroup(HeapTuple oldslot, HeapTuple newslot,
int numCols, AttrNumber *grpColIdx, TupleDesc tupdesc);
/* ---------------------------------------
diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c
index 9fa3f01190..634411a7c6 100644
--- a/src/backend/executor/nodeHash.c
+++ b/src/backend/executor/nodeHash.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.22 1998/09/01 03:22:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.23 1998/09/01 04:28:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,8 +45,7 @@ static void mk_hj_temp(char *tempname);
static int hashFunc(char *key, int len);
static int ExecHashPartition(Hash *node);
static RelativeAddr hashTableAlloc(int size, HashJoinTable hashtable);
-static void
-ExecHashOverflowInsert(HashJoinTable hashtable,
+static void ExecHashOverflowInsert(HashJoinTable hashtable,
HashBucket bucket,
HeapTuple heapTuple);
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index c4a52fe910..deef889522 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.12 1998/09/01 03:22:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.13 1998/09/01 04:28:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,12 +28,10 @@
static TupleTableSlot *
ExecHashJoinOuterGetTuple(Plan *node, Plan *parent, HashJoinState *hjstate);
-static TupleTableSlot *
-ExecHashJoinGetSavedTuple(HashJoinState *hjstate, char *buffer,
+static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate, char *buffer,
File file, TupleTableSlot *tupleSlot, int *block, char **position);
-static int
-ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable,
+static int ExecHashJoinGetBatch(int bucketno, HashJoinTable hashtable,
int nbatch);
static int ExecHashJoinNewBatch(HashJoinState *hjstate);
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c
index 03b43f09b5..2df3b98a44 100644
--- a/src/backend/executor/nodeIndexscan.c
+++ b/src/backend/executor/nodeIndexscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.26 1998/09/01 03:22:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.27 1998/09/01 04:28:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -85,8 +85,8 @@ IndexNext(IndexScan *node)
EState *estate;
CommonScanState *scanstate;
IndexScanState *indexstate;
- ScanDirection direction;
- Snapshot snapshot;
+ ScanDirection direction;
+ Snapshot snapshot;
IndexScanDescPtr scanDescs;
IndexScanDesc scandesc;
Relation heapRelation;
@@ -95,7 +95,7 @@ IndexNext(IndexScan *node)
TupleTableSlot *slot;
Buffer buffer = InvalidBuffer;
int numIndices;
-
+
/* ----------------
* extract necessary information from index scan node
* ----------------
@@ -122,39 +122,40 @@ IndexNext(IndexScan *node)
while ((result = index_getnext(scandesc, direction)) != NULL)
{
tuple = heap_fetch(heapRelation, snapshot,
- &result->heap_iptr, &buffer);
+ &result->heap_iptr, &buffer);
pfree(result);
if (tuple != NULL)
{
bool prev_matches = false;
int prev_index;
-
+
/* ----------------
- * store the scanned tuple in the scan tuple slot of
- * the scan state. Eventually we will only do this and not
- * return a tuple. Note: we pass 'false' because tuples
- * returned by amgetnext are pointers onto disk pages and
- * were not created with palloc() and so should not be pfree()'d.
- * ----------------
- */
- ExecStoreTuple(tuple, /* tuple to store */
- slot, /* slot to store in */
- buffer, /* buffer associated with tuple */
- false); /* don't pfree */
+ * store the scanned tuple in the scan tuple slot of
+ * the scan state. Eventually we will only do this and not
+ * return a tuple. Note: we pass 'false' because tuples
+ * returned by amgetnext are pointers onto disk pages and
+ * were not created with palloc() and so should not be pfree()'d.
+ * ----------------
+ */
+ ExecStoreTuple(tuple, /* tuple to store */
+ slot, /* slot to store in */
+ buffer, /* buffer associated with tuple */
+ false); /* don't pfree */
/*
- * We must check to see if the current tuple would have been
- * matched by an earlier index, so we don't double report it.
- * We do this by passing the tuple through ExecQual and look
- * for failure with all previous qualifications.
+ * We must check to see if the current tuple would have
+ * been matched by an earlier index, so we don't double
+ * report it. We do this by passing the tuple through
+ * ExecQual and look for failure with all previous
+ * qualifications.
*/
for (prev_index = 0; prev_index < indexstate->iss_IndexPtr;
- prev_index++)
+ prev_index++)
{
scanstate->cstate.cs_ExprContext->ecxt_scantuple = slot;
if (ExecQual(nth(prev_index, node->indxqual),
- scanstate->cstate.cs_ExprContext))
+ scanstate->cstate.cs_ExprContext))
{
prev_matches = true;
break;
@@ -259,17 +260,16 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
indxqual = node->indxqual;
numScanKeys = indexstate->iss_NumScanKeys;
indexstate->iss_IndexPtr = 0;
-
+
/* it's possible in subselects */
if (exprCtxt == NULL)
exprCtxt = node->scan.scanstate->cstate.cs_ExprContext;
node->scan.scanstate->cstate.cs_ExprContext->ecxt_outertuple =
exprCtxt->ecxt_outertuple;
-
+
/*
- * get the index qualifications and recalculate the appropriate
- * values
+ * get the index qualifications and recalculate the appropriate values
*/
for (i = 0; i < numIndices; i++)
{
@@ -282,17 +282,19 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
run_keys = (int *) runtimeKeyInfo[i];
for (j = 0; j < n_keys; j++)
{
+
/*
* If we have a run-time key, then extract the run-time
* expression and evaluate it with respect to the current
- * outer tuple. We then stick the result into the scan key.
+ * outer tuple. We then stick the result into the scan
+ * key.
*/
if (run_keys[j] != NO_OP)
{
clause = nth(j, qual);
scanexpr = (run_keys[j] == RIGHT_OP) ?
(Node *) get_rightop(clause) : (Node *) get_leftop(clause);
-
+
/*
* pass in isDone but ignore it. We don't iterate in
* quals
@@ -333,7 +335,7 @@ ExecEndIndexScan(IndexScan *node)
IndexScanState *indexstate;
Pointer *runtimeKeyInfo;
ScanKey *scanKeys;
- List *indxqual;
+ List *indxqual;
int *numScanKeys;
int numIndices;
int i;
@@ -342,7 +344,7 @@ ExecEndIndexScan(IndexScan *node)
indexstate = node->indxstate;
indxqual = node->indxqual;
runtimeKeyInfo = (Pointer *) indexstate->iss_RuntimeKeyInfo;
-
+
/* ----------------
* extract information from the node
* ----------------
@@ -381,7 +383,7 @@ ExecEndIndexScan(IndexScan *node)
pfree(numScanKeys);
if (runtimeKeyInfo)
- {
+ {
for (i = 0; i < numIndices; i++)
{
List *qual;
@@ -394,7 +396,7 @@ ExecEndIndexScan(IndexScan *node)
}
pfree(runtimeKeyInfo);
}
-
+
/* ----------------
* clear out tuple table slots
* ----------------
@@ -428,7 +430,7 @@ ExecIndexMarkPos(IndexScan *node)
#if 0
IndexScanMarkPosition(scanDesc);
#endif
- index_markpos (scanDesc);
+ index_markpos(scanDesc);
}
/* ----------------------------------------------------------------
@@ -457,7 +459,7 @@ ExecIndexRestrPos(IndexScan *node)
#if 0
IndexScanRestorePosition(scanDesc);
#endif
- index_restrpos (scanDesc);
+ index_restrpos(scanDesc);
}
/* ----------------------------------------------------------------
@@ -504,7 +506,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
HeapScanDesc currentScanDesc;
ScanDirection direction;
int baseid;
-
+
List *execParam = NULL;
/* ----------------
@@ -727,22 +729,22 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* it identifies the value to place in our scan key.
* ----------------
*/
-
+
/* Life was so easy before ... subselects */
- if ( ((Param *) leftop)->paramkind == PARAM_EXEC )
+ if (((Param *) leftop)->paramkind == PARAM_EXEC)
{
have_runtime_keys = true;
run_keys[j] = LEFT_OP;
- execParam = lappendi (execParam, ((Param*) leftop)->paramid);
+ execParam = lappendi(execParam, ((Param *) leftop)->paramid);
}
else
{
scanvalue = ExecEvalParam((Param *) leftop,
- scanstate->cstate.cs_ExprContext,
+ scanstate->cstate.cs_ExprContext,
&isnull);
if (isnull)
flags |= SK_ISNULL;
-
+
run_keys[j] = NO_OP;
}
}
@@ -820,22 +822,22 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
* it identifies the value to place in our scan key.
* ----------------
*/
-
+
/* Life was so easy before ... subselects */
- if ( ((Param *) rightop)->paramkind == PARAM_EXEC )
+ if (((Param *) rightop)->paramkind == PARAM_EXEC)
{
have_runtime_keys = true;
run_keys[j] = RIGHT_OP;
- execParam = lappendi (execParam, ((Param*) rightop)->paramid);
+ execParam = lappendi(execParam, ((Param *) rightop)->paramid);
}
else
{
scanvalue = ExecEvalParam((Param *) rightop,
- scanstate->cstate.cs_ExprContext,
+ scanstate->cstate.cs_ExprContext,
&isnull);
if (isnull)
flags |= SK_ISNULL;
-
+
run_keys[j] = NO_OP;
}
}
@@ -992,13 +994,13 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
indexstate->iss_ScanDescs = scanDescs;
indexstate->cstate.cs_TupFromTlist = false;
-
- /*
- * if there are some PARAM_EXEC in skankeys then
- * force index rescan on first scan.
+
+ /*
+ * if there are some PARAM_EXEC in skankeys then force index rescan on
+ * first scan.
*/
- ((Plan*) node)->chgParam = execParam;
-
+ ((Plan *) node)->chgParam = execParam;
+
/* ----------------
* all done.
* ----------------
@@ -1010,5 +1012,5 @@ int
ExecCountSlotsIndexScan(IndexScan *node)
{
return ExecCountSlotsNode(outerPlan((Plan *) node)) +
- ExecCountSlotsNode(innerPlan((Plan *) node)) + INDEXSCAN_NSLOTS;
+ ExecCountSlotsNode(innerPlan((Plan *) node)) + INDEXSCAN_NSLOTS;
}
diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c
index 1c957d7661..95c8a6f56f 100644
--- a/src/backend/executor/nodeMaterial.c
+++ b/src/backend/executor/nodeMaterial.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.16 1998/09/01 03:22:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.17 1998/09/01 04:28:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -173,7 +173,7 @@ ExecMaterial(Material *node)
return ExecStoreTuple(heapTuple, /* tuple to store */
slot, /* slot to store in */
- currentScanDesc->rs_cbuf, /* buffer for this tuple */
+ currentScanDesc->rs_cbuf, /* buffer for this tuple */
false); /* don't pfree this pointer */
}
diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c
index 805b6ed334..30c11e8b2f 100644
--- a/src/backend/executor/nodeMergejoin.c
+++ b/src/backend/executor/nodeMergejoin.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.18 1998/07/19 10:05:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.19 1998/09/01 04:28:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -480,8 +480,8 @@ ExecMergeJoin(MergeJoin *node)
* means that this is the first time ExecMergeJoin() has
* been called and so we have to initialize the inner,
* outer and marked tuples as well as various stuff in the
- * expression context.
- * ********************************
+ * expression context. ********************************
+ *
*/
case EXEC_MJ_INITIALIZE:
MJ_printf("ExecMergeJoin: EXEC_MJ_INITIALIZE\n");
@@ -514,7 +514,7 @@ ExecMergeJoin(MergeJoin *node)
mergestate->mj_MarkedTupleSlot->ttc_tupleDescriptor =
innerTupleSlot->ttc_tupleDescriptor;
-
+
/* ----------------
* initialize merge join state to skip inner tuples.
* ----------------
@@ -526,8 +526,8 @@ ExecMergeJoin(MergeJoin *node)
* ******************************** EXEC_MJ_JOINMARK means
* we have just found a new outer tuple and a possible
* matching inner tuple. This is the case after the
- * INITIALIZE, SKIPOUTER or SKIPINNER states.
- * ********************************
+ * INITIALIZE, SKIPOUTER or SKIPINNER states. ********************************
+ *
*/
case EXEC_MJ_JOINMARK:
MJ_printf("ExecMergeJoin: EXEC_MJ_JOINMARK\n");
@@ -655,8 +655,8 @@ ExecMergeJoin(MergeJoin *node)
break;
/*
- * ******************************** EXEC_MJ_TESTOUTER
- * If the new outer tuple and the marked tuple satisify the
+ * ******************************** EXEC_MJ_TESTOUTER If
+ * the new outer tuple and the marked tuple satisify the
* merge clause then we know we have duplicates in the
* outer scan so we have to restore the inner scan to the
* marked tuple and proceed to join the new outer tuples
@@ -680,7 +680,9 @@ ExecMergeJoin(MergeJoin *node)
*
* new outer tuple > marked tuple
*
- * ****************************
+ ***************************
+ *
+ *
*/
case EXEC_MJ_TESTOUTER:
MJ_printf("ExecMergeJoin: EXEC_MJ_TESTOUTER\n");
@@ -698,13 +700,14 @@ ExecMergeJoin(MergeJoin *node)
if (qualResult)
{
- /*
- * the merge clause matched so now we juggle the slots
- * back the way they were and proceed to JOINTEST.
+
+ /*
+ * the merge clause matched so now we juggle the slots
+ * back the way they were and proceed to JOINTEST.
*
- * I can't understand why we have to go to JOINTEST
- * and compare outer tuple with the same inner one
- * again -> go to JOINTUPLES... - vadim 02/27/98
+ * I can't understand why we have to go to JOINTEST and
+ * compare outer tuple with the same inner one again
+ * -> go to JOINTUPLES... - vadim 02/27/98
*/
ExecRestrPos(innerPlan);
@@ -738,7 +741,7 @@ ExecMergeJoin(MergeJoin *node)
return NULL;
}
- /* continue on to skip outer tuples */
+ /* continue on to skip outer tuples */
mergestate->mj_JoinState = EXEC_MJ_SKIPOUTER;
}
break;
@@ -756,7 +759,9 @@ ExecMergeJoin(MergeJoin *node)
* we have to advance the outer scan until we find the outer
* 8.
*
- ****************************
+ **************************
+ *
+ *
*
*
*
@@ -856,7 +861,9 @@ ExecMergeJoin(MergeJoin *node)
* we have to advance the inner scan until we find the inner
* 12.
*
- ****************************
+ **************************
+ *
+ *
*
*
*
@@ -988,10 +995,10 @@ bool
ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent)
{
MergeJoinState *mergestate;
- List *joinclauses;
- RegProcedure rightsortop;
- RegProcedure leftsortop;
- RegProcedure sortop;
+ List *joinclauses;
+ RegProcedure rightsortop;
+ RegProcedure leftsortop;
+ RegProcedure sortop;
TupleTableSlot *mjSlot;
List *OSortopI;
@@ -1042,7 +1049,7 @@ ExecInitMergeJoin(MergeJoin *node, EState *estate, Plan *parent)
mjSlot->ttc_whichplan = -1;
mjSlot->ttc_descIsNew = true;
mergestate->mj_MarkedTupleSlot = mjSlot;
-
+
/* ----------------
* get merge sort operators.
*
@@ -1166,9 +1173,9 @@ ExecEndMergeJoin(MergeJoin *node)
*/
ExecClearTuple(mergestate->jstate.cs_ResultTupleSlot);
ExecClearTuple(mergestate->mj_MarkedTupleSlot);
- pfree (mergestate->mj_MarkedTupleSlot);
+ pfree(mergestate->mj_MarkedTupleSlot);
mergestate->mj_MarkedTupleSlot = NULL;
-
+
MJ1_printf("ExecEndMergeJoin: %s\n",
"node processing ended");
}
@@ -1185,12 +1192,12 @@ ExecReScanMergeJoin(MergeJoin *node, ExprContext *exprCtxt, Plan *parent)
mjSlot->ttc_tupleDescriptor = NULL;
mjSlot->ttc_whichplan = -1;
mjSlot->ttc_descIsNew = true;
-
+
mergestate->mj_JoinState = EXEC_MJ_INITIALIZE;
/*
- * if chgParam of subnodes is not null then plans will be re-scanned by
- * first ExecProcNode.
+ * if chgParam of subnodes is not null then plans will be re-scanned
+ * by first ExecProcNode.
*/
if (((Plan *) node)->lefttree->chgParam == NULL)
ExecReScan(((Plan *) node)->lefttree, exprCtxt, (Plan *) node);
diff --git a/src/backend/executor/nodeSeqscan.c b/src/backend/executor/nodeSeqscan.c
index 6b2972d410..c5bceea06b 100644
--- a/src/backend/executor/nodeSeqscan.c
+++ b/src/backend/executor/nodeSeqscan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.13 1998/09/01 03:22:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.14 1998/09/01 04:28:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,8 +30,7 @@
#include "access/heapam.h"
#include "parser/parsetree.h"
-static Oid
-InitScanRelation(SeqScan *node, EState *estate,
+static Oid InitScanRelation(SeqScan *node, EState *estate,
CommonScanState *scanstate, Plan *outerPlan);
static TupleTableSlot *SeqNext(SeqScan *node);
@@ -83,7 +82,8 @@ SeqNext(SeqScan *node)
slot = ExecStoreTuple(tuple,/* tuple to store */
slot, /* slot to store in */
- scandesc->rs_cbuf,/* buffer associated with this tuple */
+ scandesc->rs_cbuf, /* buffer associated with
+ * this tuple */
false); /* don't pfree this pointer */
/* ----------------
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 95fa2f0afe..94abb9aae6 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -112,8 +112,8 @@ ExecInitSubPlan(SubPlan *node, EState *estate, Plan *parent)
{
EState *sp_estate = CreateExecutorState();
- ExecCheckPerms (CMD_SELECT, 0, node->rtable, (Query*) NULL);
-
+ ExecCheckPerms(CMD_SELECT, 0, node->rtable, (Query *) NULL);
+
sp_estate->es_range_table = node->rtable;
sp_estate->es_param_list_info = estate->es_param_list_info;
sp_estate->es_param_exec_vals = estate->es_param_exec_vals;
diff --git a/src/backend/executor/nodeTee.c b/src/backend/executor/nodeTee.c
index b96cac45ad..9a39e649a9 100644
--- a/src/backend/executor/nodeTee.c
+++ b/src/backend/executor/nodeTee.c
@@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.22 1998/09/01 03:22:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.23 1998/09/01 04:28:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -168,8 +168,8 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
bufferRel = heap_openr(teeState->tee_bufferRelname);
else
bufferRel = heap_open(
- heap_create_with_catalog(teeState->tee_bufferRelname,
- tupType, RELKIND_RELATION));
+ heap_create_with_catalog(teeState->tee_bufferRelname,
+ tupType, RELKIND_RELATION));
}
else
{
@@ -178,8 +178,8 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
newoid());
/* bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID); */
bufferRel = heap_open(
- heap_create_with_catalog(teeState->tee_bufferRelname,
- tupType, RELKIND_RELATION));
+ heap_create_with_catalog(teeState->tee_bufferRelname,
+ tupType, RELKIND_RELATION));
}
teeState->tee_bufferRel = bufferRel;
@@ -228,11 +228,11 @@ ExecCountSlotsTee(Tee *node)
static void
initTeeScanDescs(Tee *node)
{
- TeeState *teeState;
- Relation bufferRel;
- ScanDirection dir;
- Snapshot snapshot;
- MemoryContext orig;
+ TeeState *teeState;
+ Relation bufferRel;
+ ScanDirection dir;
+ Snapshot snapshot;
+ MemoryContext orig;
teeState = node->teestate;
if (teeState->tee_leftScanDesc && teeState->tee_rightScanDesc)
@@ -250,18 +250,18 @@ initTeeScanDescs(Tee *node)
{
teeState->tee_leftScanDesc = heap_beginscan(bufferRel,
ScanDirectionIsBackward(dir),
- snapshot,
- 0, /* num scan keys */
- NULL /* scan keys */
+ snapshot,
+ 0, /* num scan keys */
+ NULL /* scan keys */
);
}
if (teeState->tee_rightScanDesc == NULL)
{
teeState->tee_rightScanDesc = heap_beginscan(bufferRel,
ScanDirectionIsBackward(dir),
- snapshot,
- 0, /* num scan keys */
- NULL /* scan keys */
+ snapshot,
+ 0, /* num scan keys */
+ NULL /* scan keys */
);
}
@@ -365,7 +365,7 @@ ExecTee(Tee *node, Plan *parent)
HeapTuple throwAway;
/* Buffer buffer; */
- throwAway = heap_getnext(scanDesc,ScanDirectionIsBackward(dir));
+ throwAway = heap_getnext(scanDesc, ScanDirectionIsBackward(dir));
}
/*
@@ -406,7 +406,7 @@ ExecTee(Tee *node, Plan *parent)
result = ExecStoreTuple(heapTuple, /* tuple to store */
slot, /* slot to store in */
- scanDesc->rs_cbuf, /* this tuple's buffer */
+ scanDesc->rs_cbuf, /* this tuple's buffer */
false); /* don't free stuff from
* heap_getnext */
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 17f81537ee..f034dd064d 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -47,8 +47,7 @@ static int _SPI_pquery(QueryDesc *queryDesc, EState *state, int tcount);
static void _SPI_fetch(FetchStmt *stmt);
#endif
-static int
-_SPI_execute_plan(_SPI_plan *plan,
+static int _SPI_execute_plan(_SPI_plan *plan,
Datum *Values, char *Nulls, int tcount);
#define _SPI_CPLAN_CURCXT 0
@@ -466,7 +465,7 @@ SPI_gettype(TupleDesc tupdesc, int fnumber)
}
typeTuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(tupdesc->attrs[fnumber - 1]->atttypid),
+ ObjectIdGetDatum(tupdesc->attrs[fnumber - 1]->atttypid),
0, 0, 0);
if (!HeapTupleIsValid(typeTuple))
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 027f945a3d..4b161ed0a1 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.30 1998/09/01 03:22:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.31 1998/09/01 04:28:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -140,7 +140,7 @@ pg_krb4_recvauth(Port *port)
return STATUS_ERROR;
}
-#endif /* KRB4 */
+#endif /* KRB4 */
#ifdef KRB5
@@ -320,7 +320,7 @@ pg_krb5_recvauth(Port *port)
return STATUS_ERROR;
}
-#endif /* KRB5 */
+#endif /* KRB5 */
/*
@@ -422,7 +422,7 @@ be_recvauth(Port *port)
*/
if (hba_getauthmethod(&port->raddr, port->user, port->database,
- port->auth_arg, &port->auth_method) != STATUS_OK)
+ port->auth_arg, &port->auth_method) != STATUS_OK)
PacketSendError(&port->pktInfo, "Missing or mis-configured pg_hba.conf file");
else if (PG_PROTOCOL_MAJOR(port->proto) == 0)
diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c
index 7be91f13e8..b35eba81ca 100644
--- a/src/backend/libpq/be-fsstubs.c
+++ b/src/backend/libpq/be-fsstubs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.25 1998/09/01 03:22:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.26 1998/09/01 04:28:46 momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
@@ -370,22 +370,23 @@ lo_export(Oid lobjId, text *filename)
/*
* lo_commit -
- * prepares large objects for transaction commit [PA, 7/17/98]
+ * prepares large objects for transaction commit [PA, 7/17/98]
*/
-void
+void
_lo_commit(void)
{
- int i;
+ int i;
MemoryContext currentContext;
if (fscxt == NULL)
return;
-
+
currentContext = MemoryContextSwitchTo((MemoryContext) fscxt);
for (i = 0; i < MAX_LOBJ_FDS; i++)
{
- if (cookies[i] != NULL) inv_cleanindex(cookies[i]);
+ if (cookies[i] != NULL)
+ inv_cleanindex(cookies[i]);
}
MemoryContextSwitchTo(currentContext);
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 83acfe4c00..381278e2b0 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.34 1998/09/01 03:22:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.35 1998/09/01 04:28:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -161,7 +161,7 @@ process_hba_record(FILE *file, SockAddr *raddr, const char *user,
/*---------------------------------------------------------------------------
Process the non-comment record in the config file that is next on the file.
See if it applies to a connection to a host with IP address "*raddr"
- to a database named "*database". If so, return *matches_p true
+ to a database named "*database". If so, return *matches_p true
and *userauth_p and *auth_arg as the values from the entry.
If not, leave *matches_p as it was. If the record has a syntax error,
return *error_p true, after issuing a message to stderr. If no error,
@@ -211,7 +211,7 @@ process_hba_record(FILE *file, SockAddr *raddr, const char *user,
*/
if ((strcmp(db, database) != 0 && strcmp(db, "all") != 0 &&
- (strcmp(db, "sameuser") != 0 || strcmp(database, user) != 0)) ||
+ (strcmp(db, "sameuser") != 0 || strcmp(database, user) != 0)) ||
raddr->sa.sa_family != AF_UNIX)
return;
}
@@ -271,7 +271,7 @@ process_hba_record(FILE *file, SockAddr *raddr, const char *user,
*/
if ((strcmp(db, database) != 0 && strcmp(db, "all") != 0 &&
- (strcmp(db, "sameuser") != 0 || strcmp(database, user) != 0)) ||
+ (strcmp(db, "sameuser") != 0 || strcmp(database, user) != 0)) ||
raddr->sa.sa_family != AF_INET ||
((file_ip_addr.s_addr ^ raddr->in.sin_addr.s_addr) & mask.s_addr) != 0x0000)
return;
@@ -679,7 +679,7 @@ parse_map_record(FILE *file,
return;
}
}
- sprintf(PQerrormsg,"Incomplete line in pg_ident: %s",file_map);
+ sprintf(PQerrormsg, "Incomplete line in pg_ident: %s", file_map);
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);
}
diff --git a/src/backend/libpq/portal.c b/src/backend/libpq/portal.c
index 679d9bdc9b..3fb02b03ec 100644
--- a/src/backend/libpq/portal.c
+++ b/src/backend/libpq/portal.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.16 1998/09/01 03:22:48 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.17 1998/09/01 04:28:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -481,7 +481,7 @@ PQftype(PortalBuffer *portal, int tuple_index, int field_number)
return -1;
if ((gbp = PQgroup(portal, tuple_index)) &&
- in_range("PQftype: field number", field_number, 0, gbp->no_fields))
+ in_range("PQftype: field number", field_number, 0, gbp->no_fields))
return gbp->types[field_number].typid;
return -1;
}
diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c
index f44176400c..349765f171 100644
--- a/src/backend/libpq/pqcomm.c
+++ b/src/backend/libpq/pqcomm.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.52 1998/09/01 03:22:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.53 1998/09/01 04:28:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -60,8 +60,8 @@
#if defined(linux)
#ifndef SOMAXCONN
#define SOMAXCONN 5 /* from Linux listen(2) man page */
-#endif /* SOMAXCONN */
-#endif /* linux */
+#endif /* SOMAXCONN */
+#endif /* linux */
#include "miscadmin.h"
#include "libpq/pqsignal.h"
@@ -184,8 +184,9 @@ pq_getstr(char *s, int maxlen)
int c = '\0';
#ifdef MULTIBYTE
- unsigned char *p, *ps;
- int len;
+ unsigned char *p,
+ *ps;
+ int len;
ps = s;
len = maxlen;
@@ -203,11 +204,12 @@ pq_getstr(char *s, int maxlen)
#ifdef MULTIBYTE
p = pg_client_to_server(ps, len);
- if (ps != p) { /* actual conversion has been done? */
- strcpy(ps, p);
+ if (ps != p)
+ { /* actual conversion has been done? */
+ strcpy(ps, p);
}
#endif
-
+
/* -----------------
* If EOF reached let caller know.
* (This will only happen if we hit EOF before the string
@@ -344,12 +346,12 @@ void
pq_putstr(char *s)
{
#ifdef MULTIBYTE
- unsigned char *p;
+ unsigned char *p;
- p = pg_server_to_client(s, strlen(s));
+ p = pg_server_to_client(s, strlen(s));
if (pqPutString(p, Pfout))
#else
- if (pqPutString(s, Pfout))
+ if (pqPutString(s, Pfout))
#endif
{
sprintf(PQerrormsg,
@@ -555,16 +557,18 @@ StreamServerPort(char *hostName, short portName, int *fdP)
strcpy(sock_path, saddr.un.sun_path);
/*
- * If the socket exists but nobody has an advisory lock on it
- * we can safely delete the file.
+ * If the socket exists but nobody has an advisory lock on it we
+ * can safely delete the file.
*/
- if ((lock_fd = open(sock_path, O_RDONLY|O_NONBLOCK, 0666)) >= 0) {
- if (flock(lock_fd, LOCK_EX|LOCK_NB) == 0) {
+ if ((lock_fd = open(sock_path, O_RDONLY | O_NONBLOCK, 0666)) >= 0)
+ {
+ if (flock(lock_fd, LOCK_EX | LOCK_NB) == 0)
+ {
TPRINTF(TRACE_VERBOSE, "flock on %s, deleting", sock_path);
unlink(sock_path);
- } else {
- TPRINTF(TRACE_VERBOSE, "flock failed for %s", sock_path);
}
+ else
+ TPRINTF(TRACE_VERBOSE, "flock failed for %s", sock_path);
close(lock_fd);
}
}
@@ -584,8 +588,8 @@ StreamServerPort(char *hostName, short portName, int *fdP)
strcat(PQerrormsg,
"\tIs another postmaster already running on that port?\n");
if (family == AF_UNIX)
- sprintf(PQerrormsg+strlen(PQerrormsg),
- "\tIf not, remove socket node (%s) and retry.\n",
+ sprintf(PQerrormsg + strlen(PQerrormsg),
+ "\tIf not, remove socket node (%s) and retry.\n",
sock_path);
else
strcat(PQerrormsg, "\tIf not, wait a few seconds and retry.\n");
@@ -593,17 +597,18 @@ StreamServerPort(char *hostName, short portName, int *fdP)
return STATUS_ERROR;
}
- if (family == AF_UNIX) {
+ if (family == AF_UNIX)
+ {
on_proc_exit(StreamDoUnlink, NULL);
/*
- * Open the socket file and get an advisory lock on it.
- * The lock_fd is left open to keep the lock.
+ * Open the socket file and get an advisory lock on it. The
+ * lock_fd is left open to keep the lock.
*/
- if ((lock_fd = open(sock_path, O_RDONLY|O_NONBLOCK, 0666)) >= 0) {
- if (flock(lock_fd, LOCK_EX|LOCK_NB) != 0) {
+ if ((lock_fd = open(sock_path, O_RDONLY | O_NONBLOCK, 0666)) >= 0)
+ {
+ if (flock(lock_fd, LOCK_EX | LOCK_NB) != 0)
TPRINTF(TRACE_VERBOSE, "flock error for %s", sock_path);
- }
}
}
@@ -775,12 +780,13 @@ StreamOpen(char *hostName, short portName, Port *port)
void
pq_putncharlen(char *s, int n)
{
- unsigned char *p;
- int len;
+ unsigned char *p;
+ int len;
- p = pg_server_to_client(s, n);
- len = strlen(p);
- pq_putint(len, sizeof(int));
- pq_putnchar(p, len);
+ p = pg_server_to_client(s, n);
+ len = strlen(p);
+ pq_putint(len, sizeof(int));
+ pq_putnchar(p, len);
}
+
#endif
diff --git a/src/backend/libpq/pqpacket.c b/src/backend/libpq/pqpacket.c
index 5307adb7bc..952f652b76 100644
--- a/src/backend/libpq/pqpacket.c
+++ b/src/backend/libpq/pqpacket.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.17 1998/08/25 21:22:27 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/pqpacket.c,v 1.18 1998/09/01 04:28:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -118,7 +118,8 @@ PacketReceiveFragment(Packet *pkt, int sock)
* Set up a packet write for the postmaster event loop.
*/
-void PacketSendSetup(Packet *pkt, int nbytes, PacketDoneProc iodone, void *arg)
+void
+PacketSendSetup(Packet *pkt, int nbytes, PacketDoneProc iodone, void *arg)
{
pkt->len = (PacketLen) nbytes;
pkt->nrtodo = nbytes;
diff --git a/src/backend/libpq/pqsignal.c b/src/backend/libpq/pqsignal.c
index ab5afd12eb..d06909f828 100644
--- a/src/backend/libpq/pqsignal.c
+++ b/src/backend/libpq/pqsignal.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.9 1998/09/01 03:22:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.10 1998/09/01 04:28:55 momjian Exp $
*
* NOTES
* This shouldn't be in libpq, but the monitor and some other
@@ -60,5 +60,5 @@ pqsignal(int signo, pqsigfunc func)
if (sigaction(signo, &act, &oact) < 0)
return SIG_ERR;
return oact.sa_handler;
-#endif /* !USE_POSIX_SIGNALS */
+#endif /* !USE_POSIX_SIGNALS */
}
diff --git a/src/backend/main/main.c b/src/backend/main/main.c
index 30e7ed3bc5..7f123d9dfd 100644
--- a/src/backend/main/main.c
+++ b/src/backend/main/main.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.21 1998/06/15 19:28:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.22 1998/09/01 04:28:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,11 +45,11 @@ main(int argc, char *argv[])
#ifdef NOFIXADE
int buffer[] = {SSIN_UACPROC, UAC_SIGBUS};
-#endif /* NOFIXADE */
+#endif /* NOFIXADE */
#ifdef NOPRINTADE
int buffer[] = {SSIN_UACPROC, UAC_NOPRINT};
-#endif /* NOPRINTADE */
+#endif /* NOPRINTADE */
#endif
#ifdef USE_LOCALE
@@ -75,7 +75,7 @@ main(int argc, char *argv[])
elog(NOTICE, "setsysinfo failed: %d\n", errno);
#endif
-#endif /* NOFIXADE || NOPRINTADE */
+#endif /* NOFIXADE || NOPRINTADE */
/*
* use one executable for both postgres and postmaster, invoke one or
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index d7dc535812..5083b47dbf 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.47 1998/09/01 03:22:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.48 1998/09/01 04:29:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -999,9 +999,9 @@ _copyArrayRef(ArrayRef *from)
** -- JMH, 8/2/93
*/
static RelOptInfo *
-_copyRelOptInfo(RelOptInfo *from)
+_copyRelOptInfo(RelOptInfo * from)
{
- RelOptInfo *newnode = makeNode(RelOptInfo);
+ RelOptInfo *newnode = makeNode(RelOptInfo);
int i,
len;
@@ -1320,9 +1320,9 @@ _copyMergeOrder(MergeOrder *from)
* ----------------
*/
static ClauseInfo *
-_copyClauseInfo(ClauseInfo *from)
+_copyClauseInfo(ClauseInfo * from)
{
- ClauseInfo *newnode = makeNode(ClauseInfo);
+ ClauseInfo *newnode = makeNode(ClauseInfo);
/* ----------------
* copy remainder of node
@@ -1413,9 +1413,9 @@ _copyMInfo(MInfo *from)
* ----------------
*/
static JoinInfo *
-_copyJoinInfo(JoinInfo *from)
+_copyJoinInfo(JoinInfo * from)
{
- JoinInfo *newnode = makeNode(JoinInfo);
+ JoinInfo *newnode = makeNode(JoinInfo);
/* ----------------
* copy remainder of node
diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c
index 5e9be73256..7a82ad99fd 100644
--- a/src/backend/nodes/equalfuncs.c
+++ b/src/backend/nodes/equalfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.19 1998/09/01 03:22:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.20 1998/09/01 04:29:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -281,7 +281,7 @@ _equalFunc(Func *a, Func *b)
* ClauseInfo is a subclass of Node.
*/
static bool
-_equalClauseInfo(ClauseInfo *a, ClauseInfo *b)
+_equalClauseInfo(ClauseInfo * a, ClauseInfo * b)
{
Assert(IsA(a, ClauseInfo));
Assert(IsA(b, ClauseInfo));
@@ -306,7 +306,7 @@ _equalClauseInfo(ClauseInfo *a, ClauseInfo *b)
* RelOptInfo is a subclass of Node.
*/
static bool
-_equalRelOptInfo(RelOptInfo *a, RelOptInfo *b)
+_equalRelOptInfo(RelOptInfo * a, RelOptInfo * b)
{
Assert(IsA(a, RelOptInfo));
Assert(IsA(b, RelOptInfo));
@@ -530,7 +530,7 @@ _equalSubPlan(SubPlan *a, SubPlan *b)
}
static bool
-_equalJoinInfo(JoinInfo *a, JoinInfo *b)
+_equalJoinInfo(JoinInfo * a, JoinInfo * b)
{
Assert(IsA(a, JoinInfo));
Assert(IsA(b, JoinInfo));
diff --git a/src/backend/nodes/list.c b/src/backend/nodes/list.c
index c19a85ac50..19ebe881b1 100644
--- a/src/backend/nodes/list.c
+++ b/src/backend/nodes/list.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.14 1998/09/01 03:22:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.15 1998/09/01 04:29:05 momjian Exp $
*
* NOTES
* XXX a few of the following functions are duplicated to handle
@@ -105,7 +105,7 @@ nconc(List *l1, List *l2)
;
lnext(temp) = l2;
- return l1; /* list1 is now list1+list2 */
+ return l1; /* list1 is now list1+list2 */
}
@@ -305,10 +305,10 @@ LispUnion(List *l1, List *l2)
List *j = NIL;
if (l1 == NIL)
- return l2; /* XXX - should be copy of l2 */
+ return l2; /* XXX - should be copy of l2 */
if (l2 == NIL)
- return l1; /* XXX - should be copy of l1 */
+ return l1; /* XXX - should be copy of l1 */
foreach(i, l1)
{
@@ -335,10 +335,10 @@ LispUnioni(List *l1, List *l2)
List *j = NIL;
if (l1 == NIL)
- return l2; /* XXX - should be copy of l2 */
+ return l2; /* XXX - should be copy of l2 */
if (l2 == NIL)
- return l1; /* XXX - should be copy of l1 */
+ return l1; /* XXX - should be copy of l1 */
foreach(i, l1)
{
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index c515bde33b..f018fc5892 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.45 1998/09/01 03:22:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.46 1998/09/01 04:29:07 momjian Exp $
*
* NOTES
* Every (plan) node in POSTGRES has an associated "out" routine which
@@ -129,6 +129,7 @@ _outFuncCall(StringInfo str, FuncCall *node)
appendStringInfo(str, " :args ");
_outNode(str, node->args);
}
+
#endif
static void
@@ -660,7 +661,8 @@ _outResdom(StringInfo str, Resdom *node)
sprintf(buf, " :restypmod %d ", node->restypmod);
appendStringInfo(str, buf);
appendStringInfo(str, " :resname ");
- sprintf(buf,"\"%s\"", node->resname); /* fix for SELECT col AS "my name" */
+ sprintf(buf, "\"%s\"", node->resname); /* fix for SELECT col AS
+ * "my name" */
appendStringInfo(str, buf);
sprintf(buf, " :reskey %d ", node->reskey);
appendStringInfo(str, buf);
@@ -990,7 +992,7 @@ _outEState(StringInfo str, EState *node)
* Stuff from relation.h
*/
static void
-_outRelOptInfo(StringInfo str, RelOptInfo *node)
+_outRelOptInfo(StringInfo str, RelOptInfo * node)
{
char buf[500];
@@ -1356,7 +1358,7 @@ _outMergeOrder(StringInfo str, MergeOrder *node)
* ClauseInfo is a subclass of Node.
*/
static void
-_outClauseInfo(StringInfo str, ClauseInfo *node)
+_outClauseInfo(StringInfo str, ClauseInfo * node)
{
char buf[500];
@@ -1424,7 +1426,7 @@ _outHInfo(StringInfo str, HInfo *node)
* JoinInfo is a subclass of Node.
*/
static void
-_outJoinInfo(StringInfo str, JoinInfo *node)
+_outJoinInfo(StringInfo str, JoinInfo * node)
{
appendStringInfo(str, " JINFO ");
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c
index 585144007f..af3a3eb847 100644
--- a/src/backend/nodes/print.c
+++ b/src/backend/nodes/print.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.17 1998/08/16 05:35:35 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.18 1998/09/01 04:29:10 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -201,7 +201,7 @@ print_expr(Node *expr, List *rtable)
print_expr((Node *) get_leftop(e), rtable);
opname = get_opname(((Oper *) e->oper)->opno);
- printf(" %s ", ((opname != NULL)? opname: "(invalid operator)"));
+ printf(" %s ", ((opname != NULL) ? opname : "(invalid operator)"));
print_expr((Node *) get_rightop(e), rtable);
}
else
@@ -392,13 +392,16 @@ print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
{
List *lst;
int whichplan = 0;
- Append *appendplan = (Append *)p;
-
+ Append *appendplan = (Append *) p;
+
foreach(lst, appendplan->appendplans)
{
- Plan *subnode = (Plan *)lfirst(lst);
+ Plan *subnode = (Plan *) lfirst(lst);
- /* I don't think we need to fiddle with the range table here, bjm */
+ /*
+ * I don't think we need to fiddle with the range table here,
+ * bjm
+ */
print_plan_recursive(subnode, parsetree, indentLevel + 3, "a: ");
whichplan++;
diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c
index 804942800f..9ffbc29043 100644
--- a/src/backend/nodes/readfuncs.c
+++ b/src/backend/nodes/readfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.36 1998/09/01 03:23:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.37 1998/09/01 04:29:12 momjian Exp $
*
* NOTES
* Most of the read functions for plan nodes are tested. (In fact, they
@@ -326,14 +326,14 @@ _readAppend()
local_node->appendplans = nodeRead(true); /* now read it */
token = lsptok(NULL, &length); /* eat :unionrtables */
- local_node->unionrtables = nodeRead(true); /* now read it */
+ local_node->unionrtables = nodeRead(true); /* now read it */
token = lsptok(NULL, &length); /* eat :inheritrelid */
token = lsptok(NULL, &length); /* get inheritrelid */
local_node->inheritrelid = strtoul(token, NULL, 10);
token = lsptok(NULL, &length); /* eat :inheritrtable */
- local_node->inheritrtable = nodeRead(true); /* now read it */
+ local_node->inheritrtable = nodeRead(true); /* now read it */
return local_node;
}
@@ -716,7 +716,7 @@ _readResdom()
else
{
local_node->resname = (char *) palloc(length + 1);
- StrNCpy(local_node->resname, token+1, length + 1 - 2);/* strip quotes */
+ StrNCpy(local_node->resname, token + 1, length + 1 - 2); /* strip quotes */
}
token = lsptok(NULL, &length); /* eat :reskey */
@@ -1224,7 +1224,7 @@ _readEState()
static RelOptInfo *
_readRelOptInfo()
{
- RelOptInfo *local_node;
+ RelOptInfo *local_node;
char *token;
int length;
@@ -1769,7 +1769,7 @@ _readMergeOrder()
static ClauseInfo *
_readClauseInfo()
{
- ClauseInfo *local_node;
+ ClauseInfo *local_node;
char *token;
int length;
@@ -1867,7 +1867,7 @@ _readHInfo()
static JoinInfo *
_readJoinInfo()
{
- JoinInfo *local_node;
+ JoinInfo *local_node;
char *token;
int length;
diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c
index cf52ddfc45..4d2df3373c 100644
--- a/src/backend/optimizer/geqo/geqo_eval.c
+++ b/src/backend/optimizer/geqo/geqo_eval.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_eval.c,v 1.23 1998/09/01 03:23:07 momjian Exp $
+ * $Id: geqo_eval.c,v 1.24 1998/09/01 04:29:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,12 +50,12 @@
#include "optimizer/geqo_paths.h"
-static List *gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel);
-static RelOptInfo *gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel);
-static RelOptInfo *init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo);
+static List *gimme_clause_joins(Query *root, RelOptInfo * outer_rel, RelOptInfo * inner_rel);
+static RelOptInfo *gimme_clauseless_join(RelOptInfo * outer_rel, RelOptInfo * inner_rel);
+static RelOptInfo *init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininfo);
static List *new_join_tlist(List *tlist, List *other_relids, int first_resdomno);
static List *new_joininfo_list(List *joininfo_list, List *join_relids);
-static void geqo_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel);
+static void geqo_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel, RelOptInfo * inner_rel);
static RelOptInfo *geqo_nth(int stop, List *rels);
/*
@@ -66,7 +66,7 @@ static RelOptInfo *geqo_nth(int stop, List *rels);
Cost
geqo_eval(Query *root, Gene *tour, int num_gene)
{
- RelOptInfo *joinrel;
+ RelOptInfo *joinrel;
Cost fitness;
List *temp;
@@ -99,13 +99,13 @@ geqo_eval(Query *root, Gene *tour, int num_gene)
* Returns a new join relation incorporating all joins in a left-sided tree.
*/
RelOptInfo *
-gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *outer_rel)
+gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo * outer_rel)
{
- RelOptInfo *inner_rel; /* current relation */
+ RelOptInfo *inner_rel; /* current relation */
int base_rel_index;
List *new_rels = NIL;
- RelOptInfo *new_rel = NULL;
+ RelOptInfo *new_rel = NULL;
if (rel_count < num_gene)
{ /* tree not yet finished */
@@ -189,7 +189,7 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *out
*/
static List *
-gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
+gimme_clause_joins(Query *root, RelOptInfo * outer_rel, RelOptInfo * inner_rel)
{
List *join_list = NIL;
List *i = NIL;
@@ -197,8 +197,8 @@ gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
foreach(i, joininfo_list)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(i);
- RelOptInfo *rel = NULL;
+ JoinInfo *joininfo = (JoinInfo *) lfirst(i);
+ RelOptInfo *rel = NULL;
if (!joininfo->inactive)
{
@@ -240,7 +240,7 @@ gimme_clause_joins(Query *root, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
*/
static RelOptInfo *
-gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel)
+gimme_clauseless_join(RelOptInfo * outer_rel, RelOptInfo * inner_rel)
{
return init_join_rel(outer_rel, inner_rel, (JoinInfo *) NULL);
}
@@ -257,9 +257,9 @@ gimme_clauseless_join(RelOptInfo *outer_rel, RelOptInfo *inner_rel)
* Returns the new join relation node.
*/
static RelOptInfo *
-init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
+init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininfo)
{
- RelOptInfo *joinrel = makeNode(RelOptInfo);
+ RelOptInfo *joinrel = makeNode(RelOptInfo);
List *joinrel_joininfo_list = NIL;
List *new_outer_tlist;
List *new_inner_tlist;
@@ -389,13 +389,13 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
{
List *current_joininfo_list = NIL;
List *new_otherrels = NIL;
- JoinInfo *other_joininfo = (JoinInfo *) NULL;
+ JoinInfo *other_joininfo = (JoinInfo *) NULL;
List *xjoininfo = NIL;
foreach(xjoininfo, joininfo_list)
{
List *or;
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
new_otherrels = joininfo->otherrels;
foreach(or, new_otherrels)
@@ -457,16 +457,16 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
List *xrel = NIL;
List *xjoininfo = NIL;
- RelOptInfo *rel;
+ RelOptInfo *rel;
List *relids;
List *super_rels;
List *xsuper_rel = NIL;
- JoinInfo *new_joininfo;
+ JoinInfo *new_joininfo;
foreach(xjoinrel, joinrels)
{
- RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
+ RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
foreach(xrelid, joinrel->relids)
{
@@ -477,8 +477,8 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
*/
/*
- * ! BUG BUG ! Relid relid = (Relid)lfirst(xrelid); RelOptInfo *rel =
- * get_join_rel(root, relid);
+ * ! BUG BUG ! Relid relid = (Relid)lfirst(xrelid); RelOptInfo
+ * *rel = get_join_rel(root, relid);
*/
/*
@@ -502,11 +502,11 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
}
foreach(xjoinrel, joinrels)
{
- RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
+ RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
foreach(xjoininfo, joinrel->joininfo)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
List *other_rels = joininfo->otherrels;
List *clause_info = joininfo->jinfoclauseinfo;
bool mergejoinable = joininfo->mergejoinable;
@@ -516,8 +516,8 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
{
/*
- * ! BUG BUG ! Relid relid = (Relid)lfirst(xrelid); RelOptInfo
- * *rel = get_join_rel(root, relid);
+ * ! BUG BUG ! Relid relid = (Relid)lfirst(xrelid);
+ * RelOptInfo *rel = get_join_rel(root, relid);
*/
/*
@@ -549,12 +549,12 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
foreach(xsuper_rel, super_rels)
{
- RelOptInfo *super_rel = (RelOptInfo *) lfirst(xsuper_rel);
+ RelOptInfo *super_rel = (RelOptInfo *) lfirst(xsuper_rel);
if (nonoverlap_rels(super_rel, joinrel))
{
List *new_relids = super_rel->relids;
- JoinInfo *other_joininfo =
+ JoinInfo *other_joininfo =
joininfo_member(new_relids,
joinrel->joininfo);
@@ -566,7 +566,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels)
}
else
{
- JoinInfo *new_joininfo = makeNode(JoinInfo);
+ JoinInfo *new_joininfo = makeNode(JoinInfo);
new_joininfo->otherrels = new_relids;
new_joininfo->jinfoclauseinfo = clause_info;
@@ -611,13 +611,13 @@ geqo_final_join_rels(List *join_rel_list)
*/
foreach(xrel, join_rel_list)
{
- RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
+ RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
List *xjoininfo = NIL;
bool final = true;
foreach(xjoininfo, rel->joininfo)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
if (joininfo->otherrels != NIL)
{
@@ -645,7 +645,7 @@ geqo_final_join_rels(List *join_rel_list)
* Modifies the superrels field of rel
*/
static void
-add_superrels(RelOptInfo *rel, RelOptInfo *super_rel)
+add_superrels(RelOptInfo * rel, RelOptInfo * super_rel)
{
rel->superrels = lappend(rel->superrels, super_rel);
}
@@ -660,7 +660,7 @@ add_superrels(RelOptInfo *rel, RelOptInfo *super_rel)
* Returns non-nil if rel1 and rel2 do not overlap.
*/
static bool
-nonoverlap_rels(RelOptInfo *rel1, RelOptInfo *rel2)
+nonoverlap_rels(RelOptInfo * rel1, RelOptInfo * rel2)
{
return nonoverlap_sets(rel1->relids, rel2->relids);
}
@@ -680,7 +680,7 @@ nonoverlap_sets(List *s1, List *s2)
return true;
}
-#endif /* NOTUSED */
+#endif /* NOTUSED */
/*
* geqo_joinrel_size--
@@ -688,7 +688,7 @@ nonoverlap_sets(List *s1, List *s2)
* long join queries; so get logarithm of size when MAXINT overflow;
*/
static void
-geqo_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel)
+geqo_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel, RelOptInfo * inner_rel)
{
Cost temp;
int ntuples;
diff --git a/src/backend/optimizer/geqo/geqo_main.c b/src/backend/optimizer/geqo/geqo_main.c
index fd75985c40..68b8f6245e 100644
--- a/src/backend/optimizer/geqo/geqo_main.c
+++ b/src/backend/optimizer/geqo/geqo_main.c
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_main.c,v 1.10 1998/09/01 03:23:09 momjian Exp $
+ * $Id: geqo_main.c,v 1.11 1998/09/01 04:29:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -98,7 +98,7 @@ geqo(Query *root)
status_interval;
Gene *best_tour;
- RelOptInfo *best_rel;
+ RelOptInfo *best_rel;
/* Plan *best_plan; */
diff --git a/src/backend/optimizer/geqo/geqo_misc.c b/src/backend/optimizer/geqo/geqo_misc.c
index c1dab6a99c..e79b2138ea 100644
--- a/src/backend/optimizer/geqo/geqo_misc.c
+++ b/src/backend/optimizer/geqo/geqo_misc.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_misc.c,v 1.10 1998/09/01 03:23:10 momjian Exp $
+ * $Id: geqo_misc.c,v 1.11 1998/09/01 04:29:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -146,7 +146,7 @@ geqo_print_joinclauses(Query *root, List *clauses)
foreach(l, clauses)
{
- ClauseInfo *c = lfirst(l);
+ ClauseInfo *c = lfirst(l);
print_expr((Node *) c->clause, root->rtable);
if (lnext(l))
@@ -262,7 +262,7 @@ geqo_print_path(Query *root, Path *path, int indent)
}
void
-geqo_print_rel(Query *root, RelOptInfo *rel)
+geqo_print_rel(Query *root, RelOptInfo * rel)
{
List *l;
diff --git a/src/backend/optimizer/geqo/geqo_paths.c b/src/backend/optimizer/geqo/geqo_paths.c
index a23c9010de..25928d167f 100644
--- a/src/backend/optimizer/geqo/geqo_paths.c
+++ b/src/backend/optimizer/geqo/geqo_paths.c
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_paths.c,v 1.11 1998/09/01 03:23:12 momjian Exp $
+ * $Id: geqo_paths.c,v 1.12 1998/09/01 04:29:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,8 +28,8 @@
#include "optimizer/geqo_paths.h"
-static List *geqo_prune_rel(RelOptInfo *rel, List *other_rels);
-static Path *set_paths(RelOptInfo *rel, Path *unorderedpath);
+static List *geqo_prune_rel(RelOptInfo * rel, List *other_rels);
+static Path *set_paths(RelOptInfo * rel, Path *unorderedpath);
/*
* geqo-prune-rels--
@@ -47,8 +47,8 @@ geqo_prune_rels(List *rel_list)
if (rel_list != NIL)
{
temp_list = lcons(lfirst(rel_list),
- geqo_prune_rels(geqo_prune_rel((RelOptInfo *) lfirst(rel_list),
- lnext(rel_list))));
+ geqo_prune_rels(geqo_prune_rel((RelOptInfo *) lfirst(rel_list),
+ lnext(rel_list))));
}
return temp_list;
}
@@ -65,12 +65,12 @@ geqo_prune_rels(List *rel_list)
*
*/
static List *
-geqo_prune_rel(RelOptInfo *rel, List *other_rels)
+geqo_prune_rel(RelOptInfo * rel, List *other_rels)
{
List *i = NIL;
List *t_list = NIL;
List *temp_node = NIL;
- RelOptInfo *other_rel = (RelOptInfo *) NULL;
+ RelOptInfo *other_rel = (RelOptInfo *) NULL;
foreach(i, other_rels)
{
@@ -102,7 +102,7 @@ geqo_prune_rel(RelOptInfo *rel, List *other_rels)
*
*/
void
-geqo_rel_paths(RelOptInfo *rel)
+geqo_rel_paths(RelOptInfo * rel)
{
List *y = NIL;
Path *path = (Path *) NULL;
@@ -134,7 +134,7 @@ geqo_rel_paths(RelOptInfo *rel)
*
*/
static Path *
-set_paths(RelOptInfo *rel, Path *unorderedpath)
+set_paths(RelOptInfo * rel, Path *unorderedpath)
{
Path *cheapest = set_cheapest(rel, rel->pathlist);
diff --git a/src/backend/optimizer/geqo/minspantree.c b/src/backend/optimizer/geqo/minspantree.c
index c4e1b53ad0..41171fc510 100644
--- a/src/backend/optimizer/geqo/minspantree.c
+++ b/src/backend/optimizer/geqo/minspantree.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
-* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.7 1998/08/10 02:26:19 momjian Exp $
+* $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.8 1998/09/01 04:29:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,7 +41,7 @@
*/
void
-minspantree(Query *root, List *join_rels, RelOptInfo *garel)
+minspantree(Query *root, List *join_rels, RelOptInfo * garel)
{
int number_of_rels = length(root->base_rel_list);
int number_of_joins = length(join_rels);
@@ -70,8 +70,8 @@ minspantree(Query *root, List *join_rels, RelOptInfo *garel)
id1,
id2;
List *r = NIL;
- RelOptInfo *joinrel = NULL;
- RelOptInfo **tmprel_array;
+ RelOptInfo *joinrel = NULL;
+ RelOptInfo **tmprel_array;
/* allocate memory for matrix tmprel_array[x][y] */
@@ -111,9 +111,9 @@ minspantree(Query *root, List *join_rels, RelOptInfo *garel)
else if (number_of_joins == 3)
{
- RelOptInfo *rel12 = (RelOptInfo *) &tmprel_array[1][2];
- RelOptInfo *rel13 = (RelOptInfo *) &tmprel_array[1][3];
- RelOptInfo *rel23 = (RelOptInfo *) &tmprel_array[2][3];
+ RelOptInfo *rel12 = (RelOptInfo *) & tmprel_array[1][2];
+ RelOptInfo *rel13 = (RelOptInfo *) & tmprel_array[1][3];
+ RelOptInfo *rel23 = (RelOptInfo *) & tmprel_array[2][3];
if (rel12->cheapestpath->path_cost > rel13->cheapestpath->path_cost)
{
@@ -159,9 +159,9 @@ minspantree(Query *root, List *join_rels, RelOptInfo *garel)
if (connectto[tempn] != 0)
{
if (n > tempn)
- joinrel = (RelOptInfo *) &tmprel_array[tempn][n];
+ joinrel = (RelOptInfo *) & tmprel_array[tempn][n];
else
- joinrel = (RelOptInfo *) &tmprel_array[n][tempn];
+ joinrel = (RelOptInfo *) & tmprel_array[n][tempn];
dist = joinrel->cheapestpath->path_cost;
if (dist < disttoconnect[tempn])
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 00b22c0abc..8de364a04a 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.22 1998/09/01 03:23:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.23 1998/09/01 04:29:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,8 +45,10 @@ int32 _use_geqo_rels_ = GEQO_RELS;
static void find_rel_paths(Query *root, List *rels);
static List *find_join_paths(Query *root, List *outer_rels, int levels_needed);
+
#ifdef OPTIMIZER_DEBUG
-static void debug_print_rel(Query *root, RelOptInfo *rel);
+static void debug_print_rel(Query *root, RelOptInfo * rel);
+
#endif
/*
@@ -76,6 +78,7 @@ find_paths(Query *root, List *rels)
if (levels_needed <= 1)
{
+
/*
* Unsorted single relation, no more processing is required.
*/
@@ -83,6 +86,7 @@ find_paths(Query *root, List *rels)
}
else
{
+
/*
* this means that joins or sorts are required. set selectivities
* of clauses that have not been set by an index.
@@ -118,10 +122,10 @@ find_rel_paths(Query *root, List *rels)
sequential_scan_list = lcons(create_seqscan_path(rel), NIL);
rel_index_scan_list = find_index_paths(root,
- rel,
- find_relation_indices(root, rel),
- rel->clauseinfo,
- rel->joininfo);
+ rel,
+ find_relation_indices(root, rel),
+ rel->clauseinfo,
+ rel->joininfo);
or_index_scan_list = create_or_index_paths(root, rel, rel->clauseinfo);
@@ -180,7 +184,8 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed)
*******************************************/
if ((_use_geqo_) && length(root->base_rel_list) >= _use_geqo_rels_)
- return lcons(geqo(root), NIL); /* returns *one* RelOptInfo, so lcons it */
+ return lcons(geqo(root), NIL); /* returns *one* RelOptInfo, so
+ * lcons it */
/*******************************************
* rest will be deprecated in case of GEQO *
@@ -280,7 +285,7 @@ print_joinclauses(Query *root, List *clauses)
foreach(l, clauses)
{
- ClauseInfo *c = lfirst(l);
+ ClauseInfo *c = lfirst(l);
print_expr((Node *) c->clause, root->rtable);
if (lnext(l))
@@ -396,7 +401,7 @@ print_path(Query *root, Path *path, int indent)
}
static void
-debug_print_rel(Query *root, RelOptInfo *rel)
+debug_print_rel(Query *root, RelOptInfo * rel)
{
List *l;
@@ -412,4 +417,4 @@ debug_print_rel(Query *root, RelOptInfo *rel)
print_path(root, rel->cheapestpath, 1);
}
-#endif /* OPTIMIZER_DEBUG */
+#endif /* OPTIMIZER_DEBUG */
diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c
index 94cc5c71fc..8a0536c7bb 100644
--- a/src/backend/optimizer/path/clausesel.c
+++ b/src/backend/optimizer/path/clausesel.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.12 1998/09/01 03:23:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.13 1998/09/01 04:29:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,7 +46,7 @@ void
set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity)
{
List *temp;
- ClauseInfo *clausenode;
+ ClauseInfo *clausenode;
Cost cost_clause;
foreach(temp, clauseinfo_list)
@@ -95,7 +95,7 @@ product_selec(List *clauseinfo_list)
void
set_rest_relselec(Query *root, List *rel_list)
{
- RelOptInfo *rel;
+ RelOptInfo *rel;
List *x;
foreach(x, rel_list)
@@ -117,7 +117,7 @@ void
set_rest_selec(Query *root, List *clauseinfo_list)
{
List *temp = NIL;
- ClauseInfo *clausenode = (ClauseInfo *) NULL;
+ ClauseInfo *clausenode = (ClauseInfo *) NULL;
Cost cost_clause;
foreach(temp, clauseinfo_list)
@@ -159,8 +159,8 @@ set_rest_selec(Query *root, List *clauseinfo_list)
Cost
compute_clause_selec(Query *root, Node *clause, List *or_selectivities)
{
- if (is_opclause(clause))
- return compute_selec(root, lcons(clause,NIL), or_selectivities);
+ if (is_opclause(clause))
+ return compute_selec(root, lcons(clause, NIL), or_selectivities);
else if (not_clause(clause))
{
@@ -182,9 +182,7 @@ compute_clause_selec(Query *root, Node *clause, List *or_selectivities)
return compute_selec(root, ((Expr *) clause)->args, or_selectivities);
}
else
- {
return compute_selec(root, lcons(clause, NIL), or_selectivities);
- }
}
/*
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 7d00a7f1f5..5fbf3e5059 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.24 1998/09/01 03:23:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.25 1998/09/01 04:29:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -360,7 +360,7 @@ cost_hashjoin(Cost outercost,
* Returns the size.
*/
int
-compute_rel_size(RelOptInfo *rel)
+compute_rel_size(RelOptInfo * rel)
{
Cost temp;
int temp1;
@@ -383,7 +383,7 @@ compute_rel_size(RelOptInfo *rel)
* Returns the width of the tuple as a fixnum.
*/
int
-compute_rel_width(RelOptInfo *rel)
+compute_rel_width(RelOptInfo * rel)
{
return compute_targetlist_width(get_actual_tlist(rel->targetlist));
}
diff --git a/src/backend/optimizer/path/hashutils.c b/src/backend/optimizer/path/hashutils.c
index 29ce0f67fc..59bf4897c0 100644
--- a/src/backend/optimizer/path/hashutils.c
+++ b/src/backend/optimizer/path/hashutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.6 1998/09/01 03:23:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.7 1998/09/01 04:29:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,7 +39,7 @@ group_clauses_by_hashop(List *clauseinfo_list,
int inner_relid)
{
List *hashinfo_list = NIL;
- ClauseInfo *clauseinfo = (ClauseInfo *) NULL;
+ ClauseInfo *clauseinfo = (ClauseInfo *) NULL;
List *i = NIL;
Oid hashjoinop = 0;
@@ -121,7 +121,7 @@ match_hashop_hashinfo(Oid hashop, List *hashinfo_list)
key = xhashinfo->hashop;
if (hashop == key)
{ /* found */
- return xhashinfo; /* should be a hashinfo node ! */
+ return xhashinfo; /* should be a hashinfo node ! */
}
}
return (HInfo *) NIL;
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 9d991d97aa..24f46ec933 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.33 1998/09/01 03:23:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.34 1998/09/01 04:29:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,46 +41,36 @@
#include "parser/parsetree.h" /* for getrelid() */
#include "parser/parse_expr.h" /* for exprType() */
#include "parser/parse_oper.h" /* for oprid() and oper() */
-#include "parser/parse_coerce.h" /* for IS_BINARY_COMPATIBLE() */
+#include "parser/parse_coerce.h"/* for IS_BINARY_COMPATIBLE() */
#include "utils/lsyscache.h"
-static void
-match_index_orclauses(RelOptInfo *rel, RelOptInfo *index, int indexkey,
+static void match_index_orclauses(RelOptInfo * rel, RelOptInfo * index, int indexkey,
int xclass, List *clauseinfo_list);
-static bool
-match_index_to_operand(int indexkey, Expr *operand,
- RelOptInfo *rel, RelOptInfo *index);
-static List *
-match_index_orclause(RelOptInfo *rel, RelOptInfo *index, int indexkey,
+static bool match_index_to_operand(int indexkey, Expr *operand,
+ RelOptInfo * rel, RelOptInfo * index);
+static List *match_index_orclause(RelOptInfo * rel, RelOptInfo * index, int indexkey,
int xclass, List *or_clauses, List *other_matching_indices);
-static List *
-group_clauses_by_indexkey(RelOptInfo *rel, RelOptInfo *index,
+static List *group_clauses_by_indexkey(RelOptInfo * rel, RelOptInfo * index,
int *indexkeys, Oid *classes, List *clauseinfo_list);
-static List *
-group_clauses_by_ikey_for_joins(RelOptInfo *rel, RelOptInfo *index,
+static List *group_clauses_by_ikey_for_joins(RelOptInfo * rel, RelOptInfo * index,
int *indexkeys, Oid *classes, List *join_cinfo_list, List *restr_cinfo_list);
-static ClauseInfo *
-match_clause_to_indexkey(RelOptInfo *rel, RelOptInfo *index, int indexkey,
- int xclass, ClauseInfo *clauseInfo, bool join);
-static bool
-pred_test(List *predicate_list, List *clauseinfo_list,
+static ClauseInfo *match_clause_to_indexkey(RelOptInfo * rel, RelOptInfo * index, int indexkey,
+ int xclass, ClauseInfo * clauseInfo, bool join);
+static bool pred_test(List *predicate_list, List *clauseinfo_list,
List *joininfo_list);
static bool one_pred_test(Expr *predicate, List *clauseinfo_list);
static bool one_pred_clause_expr_test(Expr *predicate, Node *clause);
static bool one_pred_clause_test(Expr *predicate, Node *clause);
static bool clause_pred_clause_test(Expr *predicate, Node *clause);
-static List *
-indexable_joinclauses(RelOptInfo *rel, RelOptInfo *index,
+static List *indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index,
List *joininfo_list, List *clauseinfo_list);
-static List *
-index_innerjoin(Query *root, RelOptInfo *rel,
- List *clausegroup_list, RelOptInfo *index);
-static List *
-create_index_paths(Query *root, RelOptInfo *rel, RelOptInfo *index,
+static List *index_innerjoin(Query *root, RelOptInfo * rel,
+ List *clausegroup_list, RelOptInfo * index);
+static List *create_index_paths(Query *root, RelOptInfo * rel, RelOptInfo * index,
List *clausegroup_list, bool join);
static List *add_index_paths(List *indexpaths, List *new_indexpaths);
-static bool function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo *index);
+static bool function_index_operand(Expr *funcOpnd, RelOptInfo * rel, RelOptInfo * index);
/* find_index_paths()
@@ -110,14 +100,14 @@ static bool function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo *
*/
List *
find_index_paths(Query *root,
- RelOptInfo *rel,
+ RelOptInfo * rel,
List *indices,
List *clauseinfo_list,
List *joininfo_list)
{
List *scanclausegroups = NIL;
List *scanpaths = NIL;
- RelOptInfo *index = (RelOptInfo *) NULL;
+ RelOptInfo *index = (RelOptInfo *) NULL;
List *joinclausegroups = NIL;
List *joinpaths = NIL;
List *retval = NIL;
@@ -127,7 +117,10 @@ find_index_paths(Query *root,
{
index = (RelOptInfo *) lfirst(ilist);
- /* If this is a partial index, return if it fails the predicate test */
+ /*
+ * If this is a partial index, return if it fails the predicate
+ * test
+ */
if (index->indpred != NIL)
if (!pred_test(index->indpred, clauseinfo_list, joininfo_list))
continue;
@@ -136,20 +129,20 @@ find_index_paths(Query *root,
* 1. Try matching the index against subclauses of an 'or' clause.
* The fields of the clauseinfo nodes are marked with lists of the
* matching indices. No path are actually created. We currently
- * only look to match the first key. We don't find multi-key index
- * cases where an AND matches the first key, and the OR matches the
- * second key.
+ * only look to match the first key. We don't find multi-key
+ * index cases where an AND matches the first key, and the OR
+ * matches the second key.
*/
match_index_orclauses(rel,
- index,
- index->indexkeys[0],
- index->classlist[0],
- clauseinfo_list);
+ index,
+ index->indexkeys[0],
+ index->classlist[0],
+ clauseinfo_list);
/*
- * 2. If the keys of this index match any of the available restriction
- * clauses, then create pathnodes corresponding to each group of
- * usable clauses.
+ * 2. If the keys of this index match any of the available
+ * restriction clauses, then create pathnodes corresponding to
+ * each group of usable clauses.
*/
scanclausegroups = group_clauses_by_indexkey(rel,
index,
@@ -167,10 +160,10 @@ find_index_paths(Query *root,
/*
* 3. If this index can be used with any join clause, then create
- * pathnodes for each group of usable clauses. An index can be used
- * with a join clause if its ordering is useful for a mergejoin, or if
- * the index can possibly be used for scanning the inner relation of a
- * nestloop join.
+ * pathnodes for each group of usable clauses. An index can be
+ * used with a join clause if its ordering is useful for a
+ * mergejoin, or if the index can possibly be used for scanning
+ * the inner relation of a nestloop join.
*/
joinclausegroups = indexable_joinclauses(rel, index, joininfo_list, clauseinfo_list);
joinpaths = NIL;
@@ -179,7 +172,7 @@ find_index_paths(Query *root,
{
List *new_join_paths = create_index_paths(root, rel,
index,
- joinclausegroups,
+ joinclausegroups,
true);
List *innerjoin_paths = index_innerjoin(root, rel, joinclausegroups, index);
@@ -225,13 +218,13 @@ find_index_paths(Query *root,
*
*/
static void
-match_index_orclauses(RelOptInfo *rel,
- RelOptInfo *index,
+match_index_orclauses(RelOptInfo * rel,
+ RelOptInfo * index,
int indexkey,
int xclass,
List *clauseinfo_list)
{
- ClauseInfo *clauseinfo = (ClauseInfo *) NULL;
+ ClauseInfo *clauseinfo = (ClauseInfo *) NULL;
List *i = NIL;
foreach(i, clauseinfo_list)
@@ -262,10 +255,10 @@ match_index_orclauses(RelOptInfo *rel,
static bool
match_index_to_operand(int indexkey,
Expr *operand,
- RelOptInfo *rel,
- RelOptInfo *index)
+ RelOptInfo * rel,
+ RelOptInfo * index)
{
- bool result;
+ bool result;
/*
* Normal index.
@@ -305,8 +298,8 @@ match_index_to_operand(int indexkey,
* match the third, g,h match the fourth, etc.
*/
static List *
-match_index_orclause(RelOptInfo *rel,
- RelOptInfo *index,
+match_index_orclause(RelOptInfo * rel,
+ RelOptInfo * index,
int indexkey,
int xclass,
List *or_clauses,
@@ -323,30 +316,29 @@ match_index_orclause(RelOptInfo *rel,
foreach(clist, or_clauses)
matching_indices = lcons(NIL, matching_indices);
}
- else matching_indices = other_matching_indices;
+ else
+ matching_indices = other_matching_indices;
index_list = matching_indices;
foreach(clist, or_clauses)
{
clause = lfirst(clist);
-
+
if (is_opclause(clause) &&
op_class(((Oper *) ((Expr *) clause)->oper)->opno,
xclass, index->relam) &&
((match_index_to_operand(indexkey,
- (Expr *) get_leftop((Expr *) clause),
- rel,
- index) &&
+ (Expr *) get_leftop((Expr *) clause),
+ rel,
+ index) &&
IsA(get_rightop((Expr *) clause), Const)) ||
(match_index_to_operand(indexkey,
(Expr *) get_rightop((Expr *) clause),
- rel,
- index) &&
- IsA(get_leftop((Expr *) clause), Const))))
- {
+ rel,
+ index) &&
+ IsA(get_leftop((Expr *) clause), Const))))
lfirst(matching_indices) = lcons(index, lfirst(matching_indices));
- }
matching_indices = lnext(matching_indices);
}
@@ -396,14 +388,14 @@ match_index_orclause(RelOptInfo *rel,
*
*/
static List *
-group_clauses_by_indexkey(RelOptInfo *rel,
- RelOptInfo *index,
+group_clauses_by_indexkey(RelOptInfo * rel,
+ RelOptInfo * index,
int *indexkeys,
Oid *classes,
List *clauseinfo_list)
{
List *curCinfo = NIL;
- ClauseInfo *matched_clause = (ClauseInfo *) NULL;
+ ClauseInfo *matched_clause = (ClauseInfo *) NULL;
List *clausegroup = NIL;
int curIndxKey;
Oid curClass;
@@ -420,7 +412,7 @@ group_clauses_by_indexkey(RelOptInfo *rel,
foreach(curCinfo, clauseinfo_list)
{
- ClauseInfo *temp = (ClauseInfo *) lfirst(curCinfo);
+ ClauseInfo *temp = (ClauseInfo *) lfirst(curCinfo);
matched_clause = match_clause_to_indexkey(rel,
index,
@@ -458,15 +450,15 @@ group_clauses_by_indexkey(RelOptInfo *rel,
*
*/
static List *
-group_clauses_by_ikey_for_joins(RelOptInfo *rel,
- RelOptInfo *index,
+group_clauses_by_ikey_for_joins(RelOptInfo * rel,
+ RelOptInfo * index,
int *indexkeys,
Oid *classes,
List *join_cinfo_list,
List *restr_cinfo_list)
{
List *curCinfo = NIL;
- ClauseInfo *matched_clause = (ClauseInfo *) NULL;
+ ClauseInfo *matched_clause = (ClauseInfo *) NULL;
List *clausegroup = NIL;
int curIndxKey;
Oid curClass;
@@ -484,7 +476,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
foreach(curCinfo, join_cinfo_list)
{
- ClauseInfo *temp = (ClauseInfo *) lfirst(curCinfo);
+ ClauseInfo *temp = (ClauseInfo *) lfirst(curCinfo);
matched_clause = match_clause_to_indexkey(rel,
index,
@@ -500,7 +492,7 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
}
foreach(curCinfo, restr_cinfo_list)
{
- ClauseInfo *temp = (ClauseInfo *) lfirst(curCinfo);
+ ClauseInfo *temp = (ClauseInfo *) lfirst(curCinfo);
matched_clause = match_clause_to_indexkey(rel,
index,
@@ -580,11 +572,11 @@ group_clauses_by_ikey_for_joins(RelOptInfo *rel,
*
*/
static ClauseInfo *
-match_clause_to_indexkey(RelOptInfo *rel,
- RelOptInfo *index,
+match_clause_to_indexkey(RelOptInfo * rel,
+ RelOptInfo * index,
int indexkey,
int xclass,
- ClauseInfo *clauseInfo,
+ ClauseInfo * clauseInfo,
bool join)
{
Expr *clause = clauseInfo->clause;
@@ -607,6 +599,7 @@ match_clause_to_indexkey(RelOptInfo *rel,
*/
if (!join)
{
+
/*
* Check for standard s-argable clause
*/
@@ -622,24 +615,28 @@ match_clause_to_indexkey(RelOptInfo *rel,
index));
#ifndef IGNORE_BINARY_COMPATIBLE_INDICES
- /* Didn't find an index?
- * Then maybe we can find another binary-compatible index instead...
- * thomas 1998-08-14
+
+ /*
+ * Didn't find an index? Then maybe we can find another
+ * binary-compatible index instead... thomas 1998-08-14
*/
- if (! isIndexable)
+ if (!isIndexable)
{
- Oid ltype;
- Oid rtype;
+ Oid ltype;
+ Oid rtype;
- ltype = exprType((Node *)leftop);
- rtype = exprType((Node *)rightop);
+ ltype = exprType((Node *) leftop);
+ rtype = exprType((Node *) rightop);
- /* make sure we have two different binary-compatible types... */
+ /*
+ * make sure we have two different binary-compatible
+ * types...
+ */
if ((ltype != rtype)
- && IS_BINARY_COMPATIBLE(ltype, rtype))
+ && IS_BINARY_COMPATIBLE(ltype, rtype))
{
- char *opname;
- Operator newop;
+ char *opname;
+ Operator newop;
opname = get_opname(restrict_op);
if (opname != NULL)
@@ -660,9 +657,7 @@ match_clause_to_indexkey(RelOptInfo *rel,
index));
if (isIndexable)
- {
((Oper *) ((Expr *) clause)->oper)->opno = restrict_op;
- }
}
}
}
@@ -679,24 +674,24 @@ match_clause_to_indexkey(RelOptInfo *rel,
get_commutator(((Oper *) ((Expr *) clause)->oper)->opno);
isIndexable = ((restrict_op != InvalidOid) &&
- op_class(restrict_op, xclass, index->relam) &&
- IndexScanableOperand(rightop,
- indexkey, rel, index));
+ op_class(restrict_op, xclass, index->relam) &&
+ IndexScanableOperand(rightop,
+ indexkey, rel, index));
#ifndef IGNORE_BINARY_COMPATIBLE_INDICES
- if (! isIndexable)
+ if (!isIndexable)
{
- Oid ltype;
- Oid rtype;
+ Oid ltype;
+ Oid rtype;
- ltype = exprType((Node *)leftop);
- rtype = exprType((Node *)rightop);
+ ltype = exprType((Node *) leftop);
+ rtype = exprType((Node *) rightop);
if ((ltype != rtype)
- && IS_BINARY_COMPATIBLE(ltype, rtype))
+ && IS_BINARY_COMPATIBLE(ltype, rtype))
{
- char *opname;
- Operator newop;
+ char *opname;
+ Operator newop;
restrict_op = ((Oper *) ((Expr *) clause)->oper)->opno;
@@ -712,16 +707,14 @@ match_clause_to_indexkey(RelOptInfo *rel,
get_commutator(oprid(newop));
isIndexable = ((restrict_op != InvalidOid) &&
- op_class(restrict_op, xclass, index->relam) &&
- IndexScanableOperand(rightop,
- indexkey,
- rel,
- index));
+ op_class(restrict_op, xclass, index->relam) &&
+ IndexScanableOperand(rightop,
+ indexkey,
+ rel,
+ index));
if (isIndexable)
- {
((Oper *) ((Expr *) clause)->oper)->opno = oprid(newop);
- }
}
}
}
@@ -729,6 +722,7 @@ match_clause_to_indexkey(RelOptInfo *rel,
if (isIndexable)
{
+
/*
* In place list modification. (op const var/func) -> (op
* var/func const)
@@ -848,7 +842,7 @@ pred_test(List *predicate_list, List *clauseinfo_list, List *joininfo_list)
static bool
one_pred_test(Expr *predicate, List *clauseinfo_list)
{
- ClauseInfo *clauseinfo;
+ ClauseInfo *clauseinfo;
List *item;
Assert(predicate != NULL);
@@ -1152,7 +1146,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
*/
test_oper = makeOper(test_op, /* opno */
InvalidOid, /* opid */
- BOOLOID, /* opresulttype */
+ BOOLOID, /* opresulttype */
0, /* opsize */
NULL); /* op_fcache */
replace_opid(test_oper);
@@ -1163,7 +1157,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
#ifndef OMIT_PARTIAL_INDEX
test_result = ExecEvalExpr((Node *) test_expr, NULL, &isNull, NULL);
-#endif /* OMIT_PARTIAL_INDEX */
+#endif /* OMIT_PARTIAL_INDEX */
if (isNull)
{
elog(DEBUG, "clause_pred_clause_test: null test result");
@@ -1193,10 +1187,10 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
*
*/
static List *
-indexable_joinclauses(RelOptInfo *rel, RelOptInfo *index,
+indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index,
List *joininfo_list, List *clauseinfo_list)
{
- JoinInfo *joininfo = (JoinInfo *) NULL;
+ JoinInfo *joininfo = (JoinInfo *) NULL;
List *cg_list = NIL;
List *i = NIL;
List *clausegroups = NIL;
@@ -1245,7 +1239,7 @@ extract_restrict_clauses(List *clausegroup)
foreach(l, clausegroup)
{
- ClauseInfo *cinfo = lfirst(l);
+ ClauseInfo *cinfo = lfirst(l);
if (!is_joinable((Node *) cinfo->clause))
restrict_cls = lappend(restrict_cls, cinfo);
@@ -1267,8 +1261,8 @@ extract_restrict_clauses(List *clausegroup)
*
*/
static List *
-index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list,
- RelOptInfo *index)
+index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list,
+ RelOptInfo * index)
{
List *clausegroup = NIL;
List *cg_list = NIL;
@@ -1354,8 +1348,8 @@ index_innerjoin(Query *root, RelOptInfo *rel, List *clausegroup_list,
*/
static List *
create_index_paths(Query *root,
- RelOptInfo *rel,
- RelOptInfo *index,
+ RelOptInfo * rel,
+ RelOptInfo * index,
List *clausegroup_list,
bool join)
{
@@ -1367,7 +1361,7 @@ create_index_paths(Query *root,
foreach(i, clausegroup_list)
{
- ClauseInfo *clauseinfo;
+ ClauseInfo *clauseinfo;
List *temp_node = NIL;
bool temp = true;
@@ -1399,7 +1393,7 @@ add_index_paths(List *indexpaths, List *new_indexpaths)
}
static bool
-function_index_operand(Expr *funcOpnd, RelOptInfo *rel, RelOptInfo *index)
+function_index_operand(Expr *funcOpnd, RelOptInfo * rel, RelOptInfo * index)
{
Oid heapRelid = (Oid) lfirsti(rel->relids);
Func *function;
diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c
index 7b05f9fddf..f8291f7e96 100644
--- a/src/backend/optimizer/path/joinpath.c
+++ b/src/backend/optimizer/path/joinpath.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.9 1998/09/01 03:23:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.10 1998/09/01 04:29:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -30,19 +30,15 @@
* _enable_mergejoin} */
static Path *best_innerjoin(List *join_paths, List *outer_relid);
-static List *
-sort_inner_and_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
+static List *sort_inner_and_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
List *mergeinfo_list);
-static List *
-match_unsorted_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
+static List *match_unsorted_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
List *outerpath_list, Path *cheapest_inner, Path *best_innerjoin,
List *mergeinfo_list);
-static List *
-match_unsorted_inner(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
+static List *match_unsorted_inner(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
List *innerpath_list, List *mergeinfo_list);
-static bool EnoughMemoryForHashjoin(RelOptInfo *hashrel);
-static List *
-hash_inner_and_outer(RelOptInfo *joinrel, RelOptInfo *outerrel, RelOptInfo *innerrel,
+static bool EnoughMemoryForHashjoin(RelOptInfo * hashrel);
+static List *hash_inner_and_outer(RelOptInfo * joinrel, RelOptInfo * outerrel, RelOptInfo * innerrel,
List *hashinfo_list);
/*
@@ -76,11 +72,11 @@ find_all_join_paths(Query *root, List *joinrels)
while (joinrels != NIL)
{
- RelOptInfo *joinrel = (RelOptInfo *) lfirst(joinrels);
+ RelOptInfo *joinrel = (RelOptInfo *) lfirst(joinrels);
List *innerrelids;
List *outerrelids;
- RelOptInfo *innerrel;
- RelOptInfo *outerrel;
+ RelOptInfo *innerrel;
+ RelOptInfo *outerrel;
Path *bestinnerjoin;
List *pathlist = NIL;
@@ -238,9 +234,9 @@ best_innerjoin(List *join_paths, List *outer_relids)
* Returns a list of mergejoin paths.
*/
static List *
-sort_inner_and_outer(RelOptInfo *joinrel,
- RelOptInfo *outerrel,
- RelOptInfo *innerrel,
+sort_inner_and_outer(RelOptInfo * joinrel,
+ RelOptInfo * outerrel,
+ RelOptInfo * innerrel,
List *mergeinfo_list)
{
List *ms_list = NIL;
@@ -316,9 +312,9 @@ sort_inner_and_outer(RelOptInfo *joinrel,
* Returns a list of possible join path nodes.
*/
static List *
-match_unsorted_outer(RelOptInfo *joinrel,
- RelOptInfo *outerrel,
- RelOptInfo *innerrel,
+match_unsorted_outer(RelOptInfo * joinrel,
+ RelOptInfo * outerrel,
+ RelOptInfo * innerrel,
List *outerpath_list,
Path *cheapest_inner,
Path *best_innerjoin,
@@ -469,9 +465,9 @@ match_unsorted_outer(RelOptInfo *joinrel,
* Returns a list of possible merge paths.
*/
static List *
-match_unsorted_inner(RelOptInfo *joinrel,
- RelOptInfo *outerrel,
- RelOptInfo *innerrel,
+match_unsorted_inner(RelOptInfo * joinrel,
+ RelOptInfo * outerrel,
+ RelOptInfo * innerrel,
List *innerpath_list,
List *mergeinfo_list)
{
@@ -565,7 +561,7 @@ match_unsorted_inner(RelOptInfo *joinrel,
}
static bool
-EnoughMemoryForHashjoin(RelOptInfo *hashrel)
+EnoughMemoryForHashjoin(RelOptInfo * hashrel)
{
int ntuples;
int tupsize;
@@ -599,9 +595,9 @@ EnoughMemoryForHashjoin(RelOptInfo *hashrel)
* Returns a list of hashjoin paths.
*/
static List *
-hash_inner_and_outer(RelOptInfo *joinrel,
- RelOptInfo *outerrel,
- RelOptInfo *innerrel,
+hash_inner_and_outer(RelOptInfo * joinrel,
+ RelOptInfo * outerrel,
+ RelOptInfo * innerrel,
List *hashinfo_list)
{
HInfo *xhashinfo = (HInfo *) NULL;
diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c
index 2a0755010d..636207c941 100644
--- a/src/backend/optimizer/path/joinrels.c
+++ b/src/backend/optimizer/path/joinrels.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.14 1998/09/01 03:23:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.15 1998/09/01 04:29:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,19 +31,17 @@ bool _use_right_sided_plans_ = false;
#endif
-static List *find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list);
-static List *find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels);
-static RelOptInfo *init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo);
-static List *
-new_join_tlist(List *tlist, List *other_relids,
+static List *find_clause_joins(Query *root, RelOptInfo * outer_rel, List *joininfo_list);
+static List *find_clauseless_joins(RelOptInfo * outer_rel, List *inner_rels);
+static RelOptInfo *init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininfo);
+static List *new_join_tlist(List *tlist, List *other_relids,
int first_resdomno);
static List *new_joininfo_list(List *joininfo_list, List *join_relids);
-static void add_superrels(RelOptInfo *rel, RelOptInfo *super_rel);
-static bool nonoverlap_rels(RelOptInfo *rel1, RelOptInfo *rel2);
+static void add_superrels(RelOptInfo * rel, RelOptInfo * super_rel);
+static bool nonoverlap_rels(RelOptInfo * rel1, RelOptInfo * rel2);
static bool nonoverlap_sets(List *s1, List *s2);
-static void
-set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel,
- JoinInfo *jinfo);
+static void set_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel, RelOptInfo * inner_rel,
+ JoinInfo * jinfo);
/*
* find-join-rels--
@@ -67,7 +65,7 @@ find_join_rels(Query *root, List *outer_rels)
foreach(r, outer_rels)
{
- RelOptInfo *outer_rel = (RelOptInfo *) lfirst(r);
+ RelOptInfo *outer_rel = (RelOptInfo *) lfirst(r);
if (!(joins = find_clause_joins(root, outer_rel, outer_rel->joininfo)))
{
@@ -99,15 +97,15 @@ find_join_rels(Query *root, List *outer_rels)
* Returns a list of new join relations.
*/
static List *
-find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list)
+find_clause_joins(Query *root, RelOptInfo * outer_rel, List *joininfo_list)
{
List *join_list = NIL;
List *i = NIL;
foreach(i, joininfo_list)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(i);
- RelOptInfo *rel;
+ JoinInfo *joininfo = (JoinInfo *) lfirst(i);
+ RelOptInfo *rel;
if (!joininfo->inactive)
{
@@ -158,9 +156,9 @@ find_clause_joins(Query *root, RelOptInfo *outer_rel, List *joininfo_list)
* Returns a list of new join relations.
*/
static List *
-find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels)
+find_clauseless_joins(RelOptInfo * outer_rel, List *inner_rels)
{
- RelOptInfo *inner_rel;
+ RelOptInfo *inner_rel;
List *t_list = NIL;
List *temp_node = NIL;
List *i = NIL;
@@ -193,9 +191,9 @@ find_clauseless_joins(RelOptInfo *outer_rel, List *inner_rels)
* Returns the new join relation node.
*/
static RelOptInfo *
-init_join_rel(RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *joininfo)
+init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininfo)
{
- RelOptInfo *joinrel = makeNode(RelOptInfo);
+ RelOptInfo *joinrel = makeNode(RelOptInfo);
List *joinrel_joininfo_list = NIL;
List *new_outer_tlist;
List *new_inner_tlist;
@@ -327,13 +325,13 @@ new_joininfo_list(List *joininfo_list, List *join_relids)
{
List *current_joininfo_list = NIL;
List *new_otherrels = NIL;
- JoinInfo *other_joininfo = (JoinInfo *) NULL;
+ JoinInfo *other_joininfo = (JoinInfo *) NULL;
List *xjoininfo = NIL;
foreach(xjoininfo, joininfo_list)
{
List *or;
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
new_otherrels = joininfo->otherrels;
foreach(or, new_otherrels)
@@ -396,23 +394,23 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
foreach(xjoinrel, joinrels)
{
- RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
+ RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
foreach(xrelid, joinrel->relids)
{
Relid relid = (Relid) lfirst(xrelid);
- RelOptInfo *rel = get_join_rel(root, relid);
+ RelOptInfo *rel = get_join_rel(root, relid);
add_superrels(rel, joinrel);
}
}
foreach(xjoinrel, joinrels)
{
- RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
+ RelOptInfo *joinrel = (RelOptInfo *) lfirst(xjoinrel);
foreach(xjoininfo, joinrel->joininfo)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
List *other_rels = joininfo->otherrels;
List *clause_info = joininfo->jinfoclauseinfo;
bool mergejoinable = joininfo->mergejoinable;
@@ -421,10 +419,10 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
foreach(xrelid, other_rels)
{
Relid relid = (Relid) lfirst(xrelid);
- RelOptInfo *rel = get_join_rel(root, relid);
+ RelOptInfo *rel = get_join_rel(root, relid);
List *super_rels = rel->superrels;
List *xsuper_rel = NIL;
- JoinInfo *new_joininfo = makeNode(JoinInfo);
+ JoinInfo *new_joininfo = makeNode(JoinInfo);
new_joininfo->otherrels = joinrel->relids;
new_joininfo->jinfoclauseinfo = clause_info;
@@ -436,12 +434,12 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
foreach(xsuper_rel, super_rels)
{
- RelOptInfo *super_rel = (RelOptInfo *) lfirst(xsuper_rel);
+ RelOptInfo *super_rel = (RelOptInfo *) lfirst(xsuper_rel);
if (nonoverlap_rels(super_rel, joinrel))
{
List *new_relids = super_rel->relids;
- JoinInfo *other_joininfo =
+ JoinInfo *other_joininfo =
joininfo_member(new_relids,
joinrel->joininfo);
@@ -453,7 +451,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
}
else
{
- JoinInfo *new_joininfo = makeNode(JoinInfo);
+ JoinInfo *new_joininfo = makeNode(JoinInfo);
new_joininfo->otherrels = new_relids;
new_joininfo->jinfoclauseinfo = clause_info;
@@ -471,7 +469,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels)
}
foreach(xrel, outerrels)
{
- RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
+ RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
rel->superrels = NIL;
}
@@ -499,13 +497,13 @@ final_join_rels(List *join_rel_list)
*/
foreach(xrel, join_rel_list)
{
- RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
+ RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
List *xjoininfo = NIL;
bool final = true;
foreach(xjoininfo, rel->joininfo)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
if (joininfo->otherrels != NIL)
{
@@ -533,7 +531,7 @@ final_join_rels(List *join_rel_list)
* Modifies the superrels field of rel
*/
static void
-add_superrels(RelOptInfo *rel, RelOptInfo *super_rel)
+add_superrels(RelOptInfo * rel, RelOptInfo * super_rel)
{
rel->superrels = lappend(rel->superrels, super_rel);
}
@@ -548,7 +546,7 @@ add_superrels(RelOptInfo *rel, RelOptInfo *super_rel)
* Returns non-nil if rel1 and rel2 do not overlap.
*/
static bool
-nonoverlap_rels(RelOptInfo *rel1, RelOptInfo *rel2)
+nonoverlap_rels(RelOptInfo * rel1, RelOptInfo * rel2)
{
return nonoverlap_sets(rel1->relids, rel2->relids);
}
@@ -569,7 +567,7 @@ nonoverlap_sets(List *s1, List *s2)
}
static void
-set_joinrel_size(RelOptInfo *joinrel, RelOptInfo *outer_rel, RelOptInfo *inner_rel, JoinInfo *jinfo)
+set_joinrel_size(RelOptInfo * joinrel, RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * jinfo)
{
int ntuples;
float selec;
diff --git a/src/backend/optimizer/path/joinutils.c b/src/backend/optimizer/path/joinutils.c
index f39a783547..3b0bce8394 100644
--- a/src/backend/optimizer/path/joinutils.c
+++ b/src/backend/optimizer/path/joinutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.7 1998/09/01 03:23:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.8 1998/09/01 04:29:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,18 +26,14 @@
#include "optimizer/ordering.h"
-static int
-match_pathkey_joinkeys(List *pathkey, List *joinkeys,
+static int match_pathkey_joinkeys(List *pathkey, List *joinkeys,
int which_subkey);
-static bool
-every_func(List *joinkeys, List *pathkey,
+static bool every_func(List *joinkeys, List *pathkey,
int which_subkey);
-static List *
-new_join_pathkey(List *subkeys,
+static List *new_join_pathkey(List *subkeys,
List *considered_subkeys, List *join_rel_tlist,
List *joinclauses);
-static List *
-new_matching_subkeys(Var *subkey, List *considered_subkeys,
+static List *new_matching_subkeys(Var *subkey, List *considered_subkeys,
List *join_rel_tlist, List *joinclauses);
/****************************************************************************
@@ -146,7 +142,7 @@ match_pathkey_joinkeys(List *pathkey,
pos++;
}
}
- return -1; /* no index found */
+ return -1; /* no index found */
}
/*
diff --git a/src/backend/optimizer/path/mergeutils.c b/src/backend/optimizer/path/mergeutils.c
index 8bf4bb73c2..2d1d021511 100644
--- a/src/backend/optimizer/path/mergeutils.c
+++ b/src/backend/optimizer/path/mergeutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.8 1998/09/01 03:23:28 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.9 1998/09/01 04:29:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,7 +42,7 @@ group_clauses_by_order(List *clauseinfo_list,
foreach(xclauseinfo, clauseinfo_list)
{
- ClauseInfo *clauseinfo = (ClauseInfo *) lfirst(xclauseinfo);
+ ClauseInfo *clauseinfo = (ClauseInfo *) lfirst(xclauseinfo);
MergeOrder *merge_ordering = clauseinfo->mergejoinorder;
if (merge_ordering)
diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c
index c56d6200f8..3f8d6b15da 100644
--- a/src/backend/optimizer/path/orindxpath.c
+++ b/src/backend/optimizer/path/orindxpath.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.10 1998/09/01 03:23:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.11 1998/09/01 04:29:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,11 +32,10 @@
static void
-best_or_subclause_indices(Query *root, RelOptInfo *rel, List *subclauses,
+best_or_subclause_indices(Query *root, RelOptInfo * rel, List *subclauses,
List *indices, List *examined_indexids, Cost subcost, List *selectivities,
List **indexids, Cost *cost, List **selecs);
-static void
-best_or_subclause_index(Query *root, RelOptInfo *rel, Expr *subclause,
+static void best_or_subclause_index(Query *root, RelOptInfo * rel, Expr *subclause,
List *indices, int *indexid, Cost *cost, Cost *selec);
@@ -52,14 +51,14 @@ best_or_subclause_index(Query *root, RelOptInfo *rel, Expr *subclause,
*/
List *
create_or_index_paths(Query *root,
- RelOptInfo *rel, List *clauses)
+ RelOptInfo * rel, List *clauses)
{
List *t_list = NIL;
List *clist;
foreach(clist, clauses)
{
- ClauseInfo *clausenode = (ClauseInfo *) (lfirst(clist));
+ ClauseInfo *clausenode = (ClauseInfo *) (lfirst(clist));
/*
* Check to see if this clause is an 'or' clause, and, if so,
@@ -114,8 +113,8 @@ create_or_index_paths(Query *root,
* processing -- JMH, 7/7/92
*/
pathnode->path.locclauseinfo =
- set_difference(copyObject((Node *)rel->clauseinfo),
- lcons(clausenode,NIL));
+ set_difference(copyObject((Node *) rel->clauseinfo),
+ lcons(clausenode, NIL));
#if 0 /* fix xfunc */
/* add in cost for expensive functions! -- JMH, 7/7/92 */
@@ -156,7 +155,7 @@ create_or_index_paths(Query *root,
*/
static void
best_or_subclause_indices(Query *root,
- RelOptInfo *rel,
+ RelOptInfo * rel,
List *subclauses,
List *indices,
List *examined_indexids,
@@ -166,9 +165,9 @@ best_or_subclause_indices(Query *root,
Cost *cost, /* return value */
List **selecs) /* return value */
{
- List *slist;
-
- foreach (slist, subclauses)
+ List *slist;
+
+ foreach(slist, subclauses)
{
int best_indexid;
Cost best_cost;
@@ -176,7 +175,7 @@ best_or_subclause_indices(Query *root,
best_or_subclause_index(root, rel, lfirst(slist), lfirst(indices),
&best_indexid, &best_cost, &best_selec);
-
+
examined_indexids = lappendi(examined_indexids, best_indexid);
subcost += best_cost;
selectivities = lappend(selectivities, makeFloat(best_selec));
@@ -207,25 +206,25 @@ best_or_subclause_indices(Query *root,
*/
static void
best_or_subclause_index(Query *root,
- RelOptInfo *rel,
+ RelOptInfo * rel,
Expr *subclause,
List *indices,
int *retIndexid, /* return value */
Cost *retCost, /* return value */
Cost *retSelec) /* return value */
{
- List *ilist;
- bool first_run = true;
+ List *ilist;
+ bool first_run = true;
/* if we don't match anything, return zeros */
*retIndexid = 0;
*retCost = 0.0;
*retSelec = 0.0;
-
- foreach (ilist, indices)
+
+ foreach(ilist, indices)
{
- RelOptInfo *index = (RelOptInfo *) lfirst(ilist);
-
+ RelOptInfo *index = (RelOptInfo *) lfirst(ilist);
+
Datum value;
int flag = 0;
Cost subcost;
diff --git a/src/backend/optimizer/path/predmig.c b/src/backend/optimizer/path/predmig.c
index 07615c031d..b1ff33cee6 100644
--- a/src/backend/optimizer/path/predmig.c
+++ b/src/backend/optimizer/path/predmig.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.12 1998/09/01 03:23:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.13 1998/09/01 04:29:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,21 +53,18 @@
* (not a join) iff it has
* a non-NULL cinfo field */
-static void
-xfunc_predmig(JoinPath pathnode, Stream streamroot,
+static void xfunc_predmig(JoinPath pathnode, Stream streamroot,
Stream laststream, bool *progressp);
static bool xfunc_series_llel(Stream stream);
static bool xfunc_llel_chains(Stream root, Stream bottom);
static Stream xfunc_complete_stream(Stream stream);
-static bool
-xfunc_prdmig_pullup(Stream origstream, Stream pullme,
+static bool xfunc_prdmig_pullup(Stream origstream, Stream pullme,
JoinPath joinpath);
static void xfunc_form_groups(Stream root, Stream bottom);
static void xfunc_free_stream(Stream root);
static Stream xfunc_add_clauses(Stream current);
static void xfunc_setup_group(Stream node, Stream bottom);
-static Stream
-xfunc_streaminsert(ClauseInfo clauseinfo, Stream current,
+static Stream xfunc_streaminsert(ClauseInfo clauseinfo, Stream current,
int clausetype);
static int xfunc_num_relids(Stream node);
static StreamPtr xfunc_get_downjoin(Stream node);
@@ -77,7 +74,7 @@ static int xfunc_stream_compare(void *arg1, void *arg2);
static bool xfunc_check_stream(Stream node);
static bool xfunc_in_stream(Stream node, Stream stream);
-/* ----------------- MAIN FUNCTIONS ------------------------ */
+/* ----------------- MAIN FUNCTIONS ------------------------ */
/*
** xfunc_do_predmig
** wrapper for Predicate Migration. It calls xfunc_predmig until no
@@ -318,7 +315,7 @@ xfunc_complete_stream(Stream stream)
static bool
xfunc_prdmig_pullup(Stream origstream, Stream pullme, JoinPath joinpath)
{
- ClauseInfo clauseinfo = get_cinfo(pullme);
+ ClauseInfo clauseinfo = get_cinfo(pullme);
bool progress = false;
Stream upjoin,
orignode,
@@ -492,7 +489,7 @@ xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom)
}
-/* ------------------- UTILITY FUNCTIONS ------------------------- */
+/* ------------------- UTILITY FUNCTIONS ------------------------- */
/*
** xfunc_free_stream --
diff --git a/src/backend/optimizer/path/prune.c b/src/backend/optimizer/path/prune.c
index 18228cbd89..908687e6d8 100644
--- a/src/backend/optimizer/path/prune.c
+++ b/src/backend/optimizer/path/prune.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.16 1998/09/01 03:23:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.17 1998/09/01 04:29:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,7 +24,7 @@
#include "utils/elog.h"
-static List *prune_joinrel(RelOptInfo *rel, List *other_rels);
+static List *prune_joinrel(RelOptInfo * rel, List *other_rels);
/*
* prune-joinrels--
@@ -59,15 +59,15 @@ prune_joinrels(List *rel_list)
*
*/
static List *
-prune_joinrel(RelOptInfo *rel, List *other_rels)
+prune_joinrel(RelOptInfo * rel, List *other_rels)
{
List *i = NIL;
List *result = NIL;
foreach(i, other_rels)
{
- RelOptInfo *other_rel = (RelOptInfo *) lfirst(i);
-
+ RelOptInfo *other_rel = (RelOptInfo *) lfirst(i);
+
if (same(rel->relids, other_rel->relids))
{
rel->pathlist = add_pathlist(rel,
@@ -96,7 +96,7 @@ prune_rel_paths(List *rel_list)
List *x = NIL;
List *y = NIL;
Path *path = NULL;
- RelOptInfo *rel = (RelOptInfo *) NULL;
+ RelOptInfo *rel = (RelOptInfo *) NULL;
JoinPath *cheapest = (JoinPath *) NULL;
foreach(x, rel_list)
@@ -130,7 +130,7 @@ prune_rel_paths(List *rel_list)
*
*/
Path *
-prune_rel_path(RelOptInfo *rel, Path *unorderedpath)
+prune_rel_path(RelOptInfo * rel, Path *unorderedpath)
{
Path *cheapest = set_cheapest(rel, rel->pathlist);
@@ -165,7 +165,7 @@ merge_joinrels(List *rel_list1, List *rel_list2)
foreach(xrel, rel_list1)
{
- RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
+ RelOptInfo *rel = (RelOptInfo *) lfirst(xrel);
rel_list2 = prune_joinrel(rel, rel_list2);
}
@@ -187,7 +187,7 @@ merge_joinrels(List *rel_list1, List *rel_list2)
List *
prune_oldrels(List *old_rels)
{
- RelOptInfo *rel;
+ RelOptInfo *rel;
List *joininfo_list,
*xjoininfo,
*i,
@@ -204,7 +204,7 @@ prune_oldrels(List *old_rels)
{
foreach(xjoininfo, joininfo_list)
{
- JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
+ JoinInfo *joininfo = (JoinInfo *) lfirst(xjoininfo);
if (!joininfo->inactive)
{
diff --git a/src/backend/optimizer/path/xfunc.c b/src/backend/optimizer/path/xfunc.c
index b5eb9f2bdd..f32b77cdc2 100644
--- a/src/backend/optimizer/path/xfunc.c
+++ b/src/backend/optimizer/path/xfunc.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.21 1998/09/01 03:23:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.22 1998/09/01 04:29:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,8 +43,7 @@
#define ever ; 1 ;
/* local funcs */
-static int
-xfunc_card_unreferenced(Query *queryInfo,
+static int xfunc_card_unreferenced(Query *queryInfo,
Expr *clause, Relid referenced);
*/
@@ -60,8 +59,8 @@ void
xfunc_trypullup(RelOptInfo rel)
{
LispValue y; /* list ptr */
- ClauseInfo maxcinfo; /* The ClauseInfo to pull up, as calculated by
- * xfunc_shouldpull() */
+ ClauseInfo maxcinfo; /* The ClauseInfo to pull up, as
+ * calculated by xfunc_shouldpull() */
JoinPath curpath; /* current path in list */
int progress; /* has progress been made this time
* through? */
@@ -147,12 +146,12 @@ xfunc_shouldpull(Query *queryInfo,
Path childpath,
JoinPath parentpath,
int whichchild,
- ClauseInfo *maxcinfopt) /* Out: pointer to clause to
- * pullup */
+ ClauseInfo * maxcinfopt) /* Out: pointer to clause
+ * to pullup */
{
LispValue clauselist,
tmplist; /* lists of clauses */
- ClauseInfo maxcinfo; /* clause to pullup */
+ ClauseInfo maxcinfo; /* clause to pullup */
LispValue primjoinclause /* primary join clause */
= xfunc_primary_join(parentpath);
Cost tmprank,
@@ -194,7 +193,7 @@ xfunc_shouldpull(Query *queryInfo,
{
if (tmplist != LispNil &&
- (tmprank = xfunc_rank(get_clause((ClauseInfo) lfirst(tmplist))))
+ (tmprank = xfunc_rank(get_clause((ClauseInfo) lfirst(tmplist))))
> maxrank)
{
maxcinfo = (ClauseInfo) lfirst(tmplist);
@@ -267,15 +266,15 @@ ClauseInfo
xfunc_pullup(Query *queryInfo,
Path childpath,
JoinPath parentpath,
- ClauseInfo cinfo, /* clause to pull up */
+ ClauseInfo cinfo, /* clause to pull up */
int whichchild, /* whether child is INNER or OUTER of join */
int clausetype) /* whether clause to pull is join or local */
{
Path newkid;
- RelOptInfo newrel;
+ RelOptInfo newrel;
Cost pulled_selec;
Cost cost;
- ClauseInfo newinfo;
+ ClauseInfo newinfo;
/* remove clause from childpath */
newkid = (Path) copyObject((Node) childpath);
@@ -294,8 +293,8 @@ xfunc_pullup(Query *queryInfo,
}
/*
- * * give the new child path its own RelOptInfo node that reflects the * lack
- * of the pulled-up predicate
+ * * give the new child path its own RelOptInfo node that reflects the *
+ * lack of the pulled-up predicate
*/
pulled_selec = compute_clause_selec(queryInfo,
get_clause(cinfo), LispNil);
@@ -497,8 +496,8 @@ xfunc_func_expense(LispValue node, LispValue args)
/* look up tuple in cache */
tupl = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(funcid),
- 0, 0, 0);
+ ObjectIdGetDatum(funcid),
+ 0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ERROR, "Cache lookup failed for procedure %d", funcid);
proc = (Form_pg_proc) GETSTRUCT(tupl);
@@ -528,7 +527,7 @@ xfunc_func_expense(LispValue node, LispValue args)
if (nargs > 0)
argOidVect = proc->proargtypes;
planlist = (List) pg_parse_and_plan(pq_src, argOidVect, nargs,
- &parseTree_list, None, FALSE);
+ &parseTree_list, None, FALSE);
if (IsA(node, Func))
set_func_planlist((Func) node, planlist);
@@ -612,7 +611,7 @@ xfunc_width(LispValue clause)
{
/* base case: width is width of this attribute */
tupl = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(get_vartype((Var) clause)),
+ ObjectIdGetDatum(get_vartype((Var) clause)),
0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ERROR, "Cache lookup failed for type %d",
@@ -682,8 +681,8 @@ xfunc_width(LispValue clause)
elog(ERROR, "Cache lookup failed for procedure %d",
get_opno((Oper) get_op(clause)));
return (xfunc_func_width
- ((RegProcedure) (((Form_pg_operator) (GETSTRUCT(tupl)))->oprcode),
- (LispValue) get_opargs(clause)));
+ ((RegProcedure) (((Form_pg_operator) (GETSTRUCT(tupl)))->oprcode),
+ (LispValue) get_opargs(clause)));
}
else if (fast_is_funcclause(clause))
{
@@ -740,7 +739,7 @@ xfunc_card_unreferenced(Query *queryInfo,
{
Assert(lnext(get_relids((RelOptInfo) lfirst(temp))) == LispNil);
allrelids = lappend(allrelids,
- lfirst(get_relids((RelOptInfo) lfirst(temp))));
+ lfirst(get_relids((RelOptInfo) lfirst(temp))));
}
/* find all relids referenced in query but not in clause */
@@ -760,7 +759,7 @@ xfunc_card_product(Query *queryInfo, Relid relids)
{
LispValue cinfonode;
LispValue temp;
- RelOptInfo currel;
+ RelOptInfo currel;
Cost tuples;
Count retval = 0;
@@ -777,7 +776,7 @@ xfunc_card_product(Query *queryInfo, Relid relids)
if (!xfunc_expense(queryInfo, get_clause((ClauseInfo) lfirst(cinfonode))))
tuples *=
compute_clause_selec(queryInfo,
- get_clause((ClauseInfo) lfirst(cinfonode)),
+ get_clause((ClauseInfo) lfirst(cinfonode)),
LispNil);
}
@@ -863,7 +862,7 @@ LispValue
xfunc_primary_join(JoinPath pathnode)
{
LispValue joinclauselist = get_pathclauseinfo(pathnode);
- ClauseInfo mincinfo;
+ ClauseInfo mincinfo;
LispValue tmplist;
LispValue minclause = LispNil;
Cost minrank,
@@ -945,7 +944,7 @@ xfunc_get_path_cost(Query *queryInfo, Path pathnode)
cost += (Cost) (xfunc_local_expense(get_clause((ClauseInfo) lfirst(tmplist)))
* (Cost) get_tuples(get_parent(pathnode)) * selec);
selec *= compute_clause_selec(queryInfo,
- get_clause((ClauseInfo) lfirst(tmplist)),
+ get_clause((ClauseInfo) lfirst(tmplist)),
LispNil);
}
@@ -966,7 +965,7 @@ xfunc_get_path_cost(Query *queryInfo, Path pathnode)
cost += (Cost) (xfunc_local_expense(get_clause((ClauseInfo) lfirst(tmplist)))
* (Cost) get_tuples(get_parent(pathnode)) * selec);
selec *= compute_clause_selec(queryInfo,
- get_clause((ClauseInfo) lfirst(tmplist)),
+ get_clause((ClauseInfo) lfirst(tmplist)),
LispNil);
}
}
@@ -1097,8 +1096,8 @@ xfunc_total_path_cost(JoinPath pathnode)
Cost
xfunc_expense_per_tuple(JoinPath joinnode, int whichchild)
{
- RelOptInfo outerrel = get_parent((Path) get_outerjoinpath(joinnode));
- RelOptInfo innerrel = get_parent((Path) get_innerjoinpath(joinnode));
+ RelOptInfo outerrel = get_parent((Path) get_outerjoinpath(joinnode));
+ RelOptInfo innerrel = get_parent((Path) get_innerjoinpath(joinnode));
Count outerwidth = get_width(outerrel);
Count outers_per_page = ceil(BLCKSZ / (outerwidth + sizeof(HeapTupleData)));
@@ -1139,7 +1138,7 @@ xfunc_expense_per_tuple(JoinPath joinnode, int whichchild)
*/
void
xfunc_fixvars(LispValue clause, /* clause being pulled up */
- RelOptInfo rel, /* rel it's being pulled from */
+ RelOptInfo rel, /* rel it's being pulled from */
int varno) /* whether rel is INNER or OUTER of join */
{
LispValue tmpclause; /* temporary variable */
@@ -1195,8 +1194,8 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
int
xfunc_cinfo_compare(void *arg1, void *arg2)
{
- ClauseInfo info1 = *(ClauseInfo *) arg1;
- ClauseInfo info2 = *(ClauseInfo *) arg2;
+ ClauseInfo info1 = *(ClauseInfo *) arg1;
+ ClauseInfo info2 = *(ClauseInfo *) arg2;
LispValue clause1 = (LispValue) get_clause(info1),
clause2 = (LispValue) get_clause(info2);
@@ -1310,8 +1309,8 @@ xfunc_func_width(RegProcedure funcid, LispValue args)
/* lookup function and find its return type */
Assert(RegProcedureIsValid(funcid));
tupl = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(funcid),
- 0, 0, 0);
+ ObjectIdGetDatum(funcid),
+ 0, 0, 0);
if (!HeapTupleIsValid(tupl))
elog(ERROR, "Cache lookup failed for procedure %d", funcid);
proc = (Form_pg_proc) GETSTRUCT(tupl);
@@ -1430,9 +1429,9 @@ do { \
** Just like _copyRel, but doesn't copy the paths
*/
bool
-xfunc_copyrel(RelOptInfo from, RelOptInfo *to)
+xfunc_copyrel(RelOptInfo from, RelOptInfo * to)
{
- RelOptInfo newnode;
+ RelOptInfo newnode;
Pointer (*alloc) () = palloc;
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
index 5011d0b248..8eba20fd68 100644
--- a/src/backend/optimizer/plan/createplan.c
+++ b/src/backend/optimizer/plan/createplan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.31 1998/09/01 03:23:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.32 1998/09/01 04:29:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,44 +46,33 @@
static List *switch_outer(List *clauses);
static Scan *create_scan_node(Path *best_path, List *tlist);
static Join *create_join_node(JoinPath *best_path, List *tlist);
-static SeqScan *
-create_seqscan_node(Path *best_path, List *tlist,
+static SeqScan *create_seqscan_node(Path *best_path, List *tlist,
List *scan_clauses);
-static IndexScan *
-create_indexscan_node(IndexPath *best_path, List *tlist,
+static IndexScan *create_indexscan_node(IndexPath *best_path, List *tlist,
List *scan_clauses);
-static NestLoop *
-create_nestloop_node(JoinPath *best_path, List *tlist,
+static NestLoop *create_nestloop_node(JoinPath *best_path, List *tlist,
List *clauses, Plan *outer_node, List *outer_tlist,
Plan *inner_node, List *inner_tlist);
-static MergeJoin *
-create_mergejoin_node(MergePath *best_path, List *tlist,
+static MergeJoin *create_mergejoin_node(MergePath *best_path, List *tlist,
List *clauses, Plan *outer_node, List *outer_tlist,
Plan *inner_node, List *inner_tlist);
-static HashJoin *
-create_hashjoin_node(HashPath *best_path, List *tlist,
+static HashJoin *create_hashjoin_node(HashPath *best_path, List *tlist,
List *clauses, Plan *outer_node, List *outer_tlist,
Plan *inner_node, List *inner_tlist);
static Node *fix_indxqual_references(Node *clause, Path *index_path);
-static Temp *
-make_temp(List *tlist, List *keys, Oid *operators,
+static Temp *make_temp(List *tlist, List *keys, Oid *operators,
Plan *plan_node, int temptype);
-static IndexScan *
-make_indexscan(List *qptlist, List *qpqual, Index scanrelid,
+static IndexScan *make_indexscan(List *qptlist, List *qpqual, Index scanrelid,
List *indxid, List *indxqual, Cost cost);
-static NestLoop *
-make_nestloop(List *qptlist, List *qpqual, Plan *lefttree,
+static NestLoop *make_nestloop(List *qptlist, List *qpqual, Plan *lefttree,
Plan *righttree);
-static HashJoin *
-make_hashjoin(List *tlist, List *qpqual,
+static HashJoin *make_hashjoin(List *tlist, List *qpqual,
List *hashclauses, Plan *lefttree, Plan *righttree);
static Hash *make_hash(List *tlist, Var *hashkey, Plan *lefttree);
-static MergeJoin *
-make_mergejoin(List *tlist, List *qpqual,
+static MergeJoin *make_mergejoin(List *tlist, List *qpqual,
List *mergeclauses, Oid opcode, Oid *rightorder,
Oid *leftorder, Plan *righttree, Plan *lefttree);
-static Material *
-make_material(List *tlist, Oid tempid, Plan *lefttree,
+static Material *make_material(List *tlist, Oid tempid, Plan *lefttree,
int keycount);
/*
@@ -106,7 +95,7 @@ create_plan(Path *best_path)
{
List *tlist;
Plan *plan_node = (Plan *) NULL;
- RelOptInfo *parent_rel;
+ RelOptInfo *parent_rel;
int size;
int width;
int pages;
diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c
index 22cfeaf755..85253b5c58 100644
--- a/src/backend/optimizer/plan/initsplan.c
+++ b/src/backend/optimizer/plan/initsplan.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.19 1998/09/01 03:23:36 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.20 1998/09/01 04:29:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,8 +40,8 @@
extern int Quiet;
static void add_clause_to_rels(Query *root, List *clause);
-static void add_join_info_to_rels(Query *root, ClauseInfo *clauseinfo,
- List *join_relids);
+static void add_join_info_to_rels(Query *root, ClauseInfo * clauseinfo,
+ List *join_relids);
static void add_vars_to_targetlist(Query *root, List *vars, List *join_relids);
static MergeOrder *mergejoinop(Expr *clause);
@@ -170,7 +170,7 @@ add_clause_to_rels(Query *root, List *clause)
{
List *relids;
List *vars;
- ClauseInfo *clauseinfo = makeNode(ClauseInfo);
+ ClauseInfo *clauseinfo = makeNode(ClauseInfo);
/*
* Retrieve all relids and vars contained within the clause.
@@ -199,6 +199,7 @@ add_clause_to_rels(Query *root, List *clause)
*/
if (is_funcclause((Node *) clause))
{
+
/*
* XXX If we have a func clause set selectivity to 1/3, really
* need a true selectivity function.
@@ -222,6 +223,7 @@ add_clause_to_rels(Query *root, List *clause)
if (is_funcclause((Node *) clause))
{
+
/*
* XXX If we have a func clause set selectivity to 1/3, really
* need a true selectivity function.
@@ -252,13 +254,13 @@ add_clause_to_rels(Query *root, List *clause)
*
*/
static void
-add_join_info_to_rels(Query *root, ClauseInfo *clauseinfo, List *join_relids)
+add_join_info_to_rels(Query *root, ClauseInfo * clauseinfo, List *join_relids)
{
List *join_relid;
foreach(join_relid, join_relids)
{
- JoinInfo *joininfo;
+ JoinInfo *joininfo;
List *other_rels = NIL;
List *rel;
@@ -269,7 +271,7 @@ add_join_info_to_rels(Query *root, ClauseInfo *clauseinfo, List *join_relids)
}
joininfo = find_joininfo_node(get_base_rel(root, lfirsti(join_relid)),
- other_rels);
+ other_rels);
joininfo->jinfoclauseinfo =
lcons(copyObject((void *) clauseinfo), joininfo->jinfoclauseinfo);
@@ -332,8 +334,8 @@ init_join_info(List *rel_list)
*y,
*z;
RelOptInfo *rel;
- JoinInfo *joininfo;
- ClauseInfo *clauseinfo;
+ JoinInfo *joininfo;
+ ClauseInfo *clauseinfo;
Expr *clause;
foreach(x, rel_list)
diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c
index a3e97063a7..0cef5472f2 100644
--- a/src/backend/optimizer/plan/planmain.c
+++ b/src/backend/optimizer/plan/planmain.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.27 1998/09/01 03:23:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.28 1998/09/01 04:29:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,8 +44,7 @@
static Plan *subplanner(Query *root, List *flat_tlist, List *qual);
static Result *make_result(List *tlist, Node *resconstantqual, Plan *subplan);
-extern Plan *
-make_groupPlan(List **tlist, bool tuplePerGroup,
+extern Plan *make_groupPlan(List **tlist, bool tuplePerGroup,
List *groupClause, Plan *subplan);
/*
@@ -90,7 +89,7 @@ query_planner(Query *root,
printf("After cnfify()\n");
pprint(qual);
#endif
-
+
/*
* A command without a target list or qualification is an error,
* except for "delete foo".
@@ -191,8 +190,8 @@ query_planner(Query *root,
if (constant_qual)
{
subplan = (Plan *) make_result((!root->hasAggs &&
- !root->groupClause &&
- !root->havingQual)
+ !root->groupClause &&
+ !root->havingQual)
? tlist : subplan->targetlist,
(Node *) constant_qual,
subplan);
@@ -255,13 +254,13 @@ subplanner(Query *root,
List *flat_tlist,
List *qual)
{
- RelOptInfo *final_rel;
- List *final_rel_list;
+ RelOptInfo *final_rel;
+ List *final_rel_list;
/*
* Initialize the targetlist and qualification, adding entries to
- * base_rel_list as relation references are found (e.g., in
- * the qualification, the targetlist, etc.)
+ * base_rel_list as relation references are found (e.g., in the
+ * qualification, the targetlist, etc.)
*/
root->base_rel_list = NIL;
root->join_rel_list = NIL;
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index 703e067e4c..7d4091c4aa 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.31 1998/09/01 03:23:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.32 1998/09/01 04:29:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,8 +49,7 @@
#include "executor/executor.h"
static Plan *make_sortplan(List *tlist, List *sortcls, Plan *plannode);
-extern Plan *
-make_groupPlan(List **tlist, bool tuplePerGroup,
+extern Plan *make_groupPlan(List **tlist, bool tuplePerGroup,
List *groupClause, Plan *subplan);
/*****************************************************************************
@@ -96,10 +95,12 @@ union_planner(Query *parse)
{
List *tlist = parse->targetList;
- /* copy the original tlist, we will need the original one
- * for the AGG node later on */
- List *new_tlist = new_unsorted_tlist(tlist);
-
+ /*
+ * copy the original tlist, we will need the original one for the AGG
+ * node later on
+ */
+ List *new_tlist = new_unsorted_tlist(tlist);
+
List *rangetable = parse->rtable;
Plan *result_plan = (Plan *) NULL;
@@ -109,12 +110,12 @@ union_planner(Query *parse)
if (parse->unionClause)
{
- result_plan = (Plan *) plan_union_queries(parse);
- /* XXX do we need to do this? bjm 12/19/97 */
- tlist = preprocess_targetlist(tlist,
- parse->commandType,
- parse->resultRelation,
- parse->rtable);
+ result_plan = (Plan *) plan_union_queries(parse);
+ /* XXX do we need to do this? bjm 12/19/97 */
+ tlist = preprocess_targetlist(tlist,
+ parse->commandType,
+ parse->resultRelation,
+ parse->rtable);
}
else if ((rt_index =
first_inherit_rt_entry(rangetable)) != -1)
@@ -122,64 +123,65 @@ union_planner(Query *parse)
result_plan = (Plan *) plan_inherit_queries(parse, rt_index);
/* XXX do we need to do this? bjm 12/19/97 */
tlist = preprocess_targetlist(tlist,
- parse->commandType,
- parse->resultRelation,
- parse->rtable);
+ parse->commandType,
+ parse->resultRelation,
+ parse->rtable);
}
else
{
- List **vpm = NULL;
-
- /* This is only necessary if aggregates are in use in queries like:
- * SELECT sid
- * FROM part
- * GROUP BY sid
- * HAVING MIN(pid) > 1; (pid is used but never selected for!!!)
- * because the function 'query_planner' creates the plan for the lefttree
- * of the 'GROUP' node and returns only those attributes contained in 'tlist'.
- * The original 'tlist' contains only 'sid' here and that's why we have to
- * to extend it to attributes which are not selected but are used in the
- * havingQual. */
-
- /* 'check_having_qual_for_vars' takes the havingQual and the actual 'tlist'
- * as arguments and recursively scans the havingQual for attributes
- * (VAR nodes) that are not contained in 'tlist' yet. If so, it creates
- * a new entry and attaches it to the list 'new_tlist' (consisting of the
- * VAR node and the RESDOM node as usual with tlists :-) ) */
- if (parse->hasAggs)
- {
- if (parse->havingQual != NULL)
+ List **vpm = NULL;
+
+ /*
+ * This is only necessary if aggregates are in use in queries
+ * like: SELECT sid FROM part GROUP BY sid HAVING MIN(pid) > 1;
+ * (pid is used but never selected for!!!) because the function
+ * 'query_planner' creates the plan for the lefttree of the
+ * 'GROUP' node and returns only those attributes contained in
+ * 'tlist'. The original 'tlist' contains only 'sid' here and
+ * that's why we have to to extend it to attributes which are not
+ * selected but are used in the havingQual.
+ */
+
+ /*
+ * 'check_having_qual_for_vars' takes the havingQual and the
+ * actual 'tlist' as arguments and recursively scans the
+ * havingQual for attributes (VAR nodes) that are not contained in
+ * 'tlist' yet. If so, it creates a new entry and attaches it to
+ * the list 'new_tlist' (consisting of the VAR node and the RESDOM
+ * node as usual with tlists :-) )
+ */
+ if (parse->hasAggs)
{
- new_tlist = check_having_qual_for_vars(parse->havingQual,new_tlist);
+ if (parse->havingQual != NULL)
+ new_tlist = check_having_qual_for_vars(parse->havingQual, new_tlist);
}
- }
-
- new_tlist = preprocess_targetlist(new_tlist,
- parse->commandType,
- parse->resultRelation,
- parse->rtable);
-
- /* Here starts the original (pre having) code */
- tlist = preprocess_targetlist(tlist,
- parse->commandType,
- parse->resultRelation,
- parse->rtable);
-
- if (parse->rtable != NULL)
- {
- vpm = (List **) palloc(length(parse->rtable) * sizeof(List *));
- memset(vpm, 0, length(parse->rtable) * sizeof(List *));
- }
- PlannerVarParam = lcons(vpm, PlannerVarParam);
- result_plan = query_planner(parse,
- parse->commandType,
- new_tlist,
- (List *) parse->qual);
- PlannerVarParam = lnext(PlannerVarParam);
- if (vpm != NULL)
- pfree(vpm);
+
+ new_tlist = preprocess_targetlist(new_tlist,
+ parse->commandType,
+ parse->resultRelation,
+ parse->rtable);
+
+ /* Here starts the original (pre having) code */
+ tlist = preprocess_targetlist(tlist,
+ parse->commandType,
+ parse->resultRelation,
+ parse->rtable);
+
+ if (parse->rtable != NULL)
+ {
+ vpm = (List **) palloc(length(parse->rtable) * sizeof(List *));
+ memset(vpm, 0, length(parse->rtable) * sizeof(List *));
+ }
+ PlannerVarParam = lcons(vpm, PlannerVarParam);
+ result_plan = query_planner(parse,
+ parse->commandType,
+ new_tlist,
+ (List *) parse->qual);
+ PlannerVarParam = lnext(PlannerVarParam);
+ if (vpm != NULL)
+ pfree(vpm);
}
-
+
/*
* If we have a GROUP BY clause, insert a group node (with the
* appropriate sort node.)
@@ -209,11 +211,14 @@ union_planner(Query *parse)
*/
if (parse->hasAggs)
{
- int old_length=0, new_length=0;
-
- /* Create the AGG node but use 'tlist' not 'new_tlist' as target list because we
- * don't want the additional attributes (only used for the havingQual, see above)
- * to show up in the result */
+ int old_length = 0,
+ new_length = 0;
+
+ /*
+ * Create the AGG node but use 'tlist' not 'new_tlist' as target
+ * list because we don't want the additional attributes (only used
+ * for the havingQual, see above) to show up in the result
+ */
result_plan = (Plan *) make_agg(tlist, result_plan);
/*
@@ -221,70 +226,84 @@ union_planner(Query *parse)
* the result tuple of the subplans.
*/
((Agg *) result_plan)->aggs =
- set_agg_tlist_references((Agg *) result_plan);
+ set_agg_tlist_references((Agg *) result_plan);
- if(parse->havingQual!=NULL)
- {
- List *clause;
- List **vpm = NULL;
-
-
- /* stuff copied from above to handle the use of attributes from outside
- * in subselects */
+ if (parse->havingQual != NULL)
+ {
+ List *clause;
+ List **vpm = NULL;
+
+
+ /*
+ * stuff copied from above to handle the use of attributes
+ * from outside in subselects
+ */
+
+ if (parse->rtable != NULL)
+ {
+ vpm = (List **) palloc(length(parse->rtable) * sizeof(List *));
+ memset(vpm, 0, length(parse->rtable) * sizeof(List *));
+ }
+ PlannerVarParam = lcons(vpm, PlannerVarParam);
+
+ /*
+ * There is a subselect in the havingQual, so we have to
+ * process it using the same function as for a subselect in
+ * 'where'
+ */
+ if (parse->hasSubLinks)
+ parse->havingQual = SS_process_sublinks((Node *) parse->havingQual);
+
+ /* convert the havingQual to conjunctive normal form (cnf) */
+ parse->havingQual = (Node *) cnfify((Expr *) (Node *) parse->havingQual, true);
+
+ /*
+ * Calculate the opfids from the opnos (=select the correct
+ * functions for the used VAR datatypes)
+ */
+ parse->havingQual = (Node *) fix_opids((List *) parse->havingQual);
+
+ ((Agg *) result_plan)->plan.qual = (List *) parse->havingQual;
+
+ /*
+ * Check every clause of the havingQual for aggregates used
+ * and append them to result_plan->aggs
+ */
+ foreach(clause, ((Agg *) result_plan)->plan.qual)
+ {
+
+ /*
+ * Make sure there are aggregates in the havingQual if so,
+ * the list must be longer after
+ * check_having_qual_for_aggs
+ */
+ old_length = length(((Agg *) result_plan)->aggs);
+
+ ((Agg *) result_plan)->aggs = nconc(((Agg *) result_plan)->aggs,
+ check_having_qual_for_aggs((Node *) lfirst(clause),
+ ((Agg *) result_plan)->plan.lefttree->targetlist,
+ ((List *) parse->groupClause)));
+
+ /*
+ * Have a look at the length of the returned list. If
+ * there is no difference, no aggregates have been found
+ * and that means, that the Qual belongs to the where
+ * clause
+ */
+ if (((new_length = length(((Agg *) result_plan)->aggs)) == old_length) ||
+ (new_length == 0))
+ {
+ elog(ERROR, "This could have been done in a where clause!!");
+ return (Plan *) NIL;
+ }
+ }
+ PlannerVarParam = lnext(PlannerVarParam);
+ if (vpm != NULL)
+ pfree(vpm);
+ }
+ }
- if (parse->rtable != NULL)
- {
- vpm = (List **) palloc(length(parse->rtable) * sizeof(List *));
- memset(vpm, 0, length(parse->rtable) * sizeof(List *));
- }
- PlannerVarParam = lcons(vpm, PlannerVarParam);
-
- /* There is a subselect in the havingQual, so we have to process it
- * using the same function as for a subselect in 'where' */
- if (parse->hasSubLinks)
- {
- parse->havingQual = SS_process_sublinks((Node *) parse->havingQual);
- }
-
- /* convert the havingQual to conjunctive normal form (cnf) */
- parse->havingQual = (Node * ) cnfify((Expr *)(Node *) parse->havingQual,true);
-
- /* Calculate the opfids from the opnos (=select the correct functions for
- * the used VAR datatypes) */
- parse->havingQual = (Node * ) fix_opids((List *) parse->havingQual);
-
- ((Agg *) result_plan)->plan.qual=(List *) parse->havingQual;
-
- /* Check every clause of the havingQual for aggregates used and append
- * them to result_plan->aggs */
- foreach(clause, ((Agg *) result_plan)->plan.qual)
- {
- /* Make sure there are aggregates in the havingQual
- * if so, the list must be longer after check_having_qual_for_aggs */
- old_length=length(((Agg *) result_plan)->aggs);
-
- ((Agg *) result_plan)->aggs = nconc(((Agg *) result_plan)->aggs,
- check_having_qual_for_aggs((Node *) lfirst(clause),
- ((Agg *) result_plan)->plan.lefttree->targetlist,
- ((List *) parse->groupClause)));
-
- /* Have a look at the length of the returned list. If there is no
- * difference, no aggregates have been found and that means, that
- * the Qual belongs to the where clause */
- if (((new_length=length(((Agg *) result_plan)->aggs)) == old_length) ||
- (new_length == 0))
- {
- elog(ERROR,"This could have been done in a where clause!!");
- return (Plan *)NIL;
- }
- }
- PlannerVarParam = lnext(PlannerVarParam);
- if (vpm != NULL)
- pfree(vpm);
- }
- }
-
/*
* For now, before we hand back the plan, check to see if there is a
* user-specified sort that needs to be done. Eventually, this will
@@ -530,6 +549,3 @@ pg_checkretval(Oid rettype, QueryTreeList *queryTreeList)
/* success */
return;
}
-
-
-
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c
index 32f0b8225f..6f134acddb 100644
--- a/src/backend/optimizer/plan/setrefs.c
+++ b/src/backend/optimizer/plan/setrefs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.25 1998/09/01 03:23:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.26 1998/09/01 04:29:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,11 +36,9 @@
static void set_join_tlist_references(Join *join);
static void set_tempscan_tlist_references(SeqScan *tempscan);
static void set_temp_tlist_references(Temp *temp);
-static List *
-replace_clause_joinvar_refs(Expr *clause,
+static List *replace_clause_joinvar_refs(Expr *clause,
List *outer_tlist, List *inner_tlist);
-static List *
-replace_subclause_joinvar_refs(List *clauses,
+static List *replace_subclause_joinvar_refs(List *clauses,
List *outer_tlist, List *inner_tlist);
static Var *replace_joinvar_refs(Var *var, List *outer_tlist, List *inner_tlist);
static List *tlist_temp_references(Oid tempid, List *tlist);
@@ -498,13 +496,13 @@ tlist_temp_references(Oid tempid,
oattno = 0;
temp = makeTargetEntry(xtl->resdom,
- (Node *) makeVar(tempid,
- xtl->resdom->resno,
- xtl->resdom->restype,
- xtl->resdom->restypmod,
- 0,
- tempid,
- oattno));
+ (Node *) makeVar(tempid,
+ xtl->resdom->resno,
+ xtl->resdom->restype,
+ xtl->resdom->restypmod,
+ 0,
+ tempid,
+ oattno));
t_list = lappend(t_list, temp);
}
@@ -901,190 +899,190 @@ del_agg_clause(Node *clause)
/* check_having_qual_for_vars takes the the havingQual and the actual targetlist as arguments
* and recursively scans the havingQual for attributes that are not included in the targetlist
* yet. Attributes contained in the havingQual but not in the targetlist show up with queries
- * like:
- * SELECT sid
+ * like:
+ * SELECT sid
* FROM part
* GROUP BY sid
- * HAVING MIN(pid) > 1; (pid is used but never selected for!!!).
+ * HAVING MIN(pid) > 1; (pid is used but never selected for!!!).
* To be able to handle queries like that correctly we have to extend the actual targetlist
- * (which will be the one used for the GROUP node later on) by these attributes. */
+ * (which will be the one used for the GROUP node later on) by these attributes. */
List *
check_having_qual_for_vars(Node *clause, List *targetlist_so_far)
{
- List *t;
+ List *t;
+
+
+ if (IsA(clause, Var))
+ {
+ RelOptInfo tmp_rel;
- if (IsA(clause, Var))
- {
- RelOptInfo tmp_rel;
-
+ tmp_rel.targetlist = targetlist_so_far;
- tmp_rel.targetlist = targetlist_so_far;
-
- /*
- * Ha! A Var node!
- */
+ /*
+ * Ha! A Var node!
+ */
+
+ /* Check if the VAR is already contained in the targetlist */
+ if (tlist_member((Var *) clause, (List *) targetlist_so_far) == NULL)
+ add_tl_element(&tmp_rel, (Var *) clause);
- /* Check if the VAR is already contained in the targetlist */
- if (tlist_member((Var *)clause, (List *)targetlist_so_far) == NULL)
+ return tmp_rel.targetlist;
+ }
+
+ else if (is_funcclause(clause) || not_clause(clause) ||
+ or_clause(clause) || and_clause(clause))
{
- add_tl_element(&tmp_rel, (Var *)clause);
- }
-
- return tmp_rel.targetlist;
- }
-
- else if (is_funcclause(clause) || not_clause(clause) ||
- or_clause(clause) || and_clause(clause))
- {
-
- /*
- * This is a function. Recursively call this routine for its
- * arguments...
- */
- foreach(t, ((Expr *) clause)->args)
+
+ /*
+ * This is a function. Recursively call this routine for its
+ * arguments...
+ */
+ foreach(t, ((Expr *) clause)->args)
+ targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ return targetlist_so_far;
+ }
+ else if (IsA(clause, Aggreg))
{
- targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ targetlist_so_far =
+ check_having_qual_for_vars(((Aggreg *) clause)->target, targetlist_so_far);
+ return targetlist_so_far;
}
- return targetlist_so_far;
- }
- else if (IsA(clause, Aggreg))
- {
- targetlist_so_far =
- check_having_qual_for_vars(((Aggreg *) clause)->target, targetlist_so_far);
- return targetlist_so_far;
- }
- else if (IsA(clause, ArrayRef))
- {
- ArrayRef *aref = (ArrayRef *) clause;
-
- /*
- * This is an arrayref. Recursively call this routine for its
- * expression and its index expression...
- */
- foreach(t, aref->refupperindexpr)
+ else if (IsA(clause, ArrayRef))
{
- targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ ArrayRef *aref = (ArrayRef *) clause;
+
+ /*
+ * This is an arrayref. Recursively call this routine for its
+ * expression and its index expression...
+ */
+ foreach(t, aref->refupperindexpr)
+ targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ foreach(t, aref->reflowerindexpr)
+ targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ targetlist_so_far = check_having_qual_for_vars(aref->refexpr, targetlist_so_far);
+ targetlist_so_far = check_having_qual_for_vars(aref->refassgnexpr, targetlist_so_far);
+
+ return targetlist_so_far;
+ }
+ else if (is_opclause(clause))
+ {
+
+ /*
+ * This is an operator. Recursively call this routine for both its
+ * left and right operands
+ */
+ Node *left = (Node *) get_leftop((Expr *) clause);
+ Node *right = (Node *) get_rightop((Expr *) clause);
+
+ if (left != (Node *) NULL)
+ targetlist_so_far = check_having_qual_for_vars(left, targetlist_so_far);
+ if (right != (Node *) NULL)
+ targetlist_so_far = check_having_qual_for_vars(right, targetlist_so_far);
+
+ return targetlist_so_far;
}
- foreach(t, aref->reflowerindexpr)
+ else if (IsA(clause, Param) ||IsA(clause, Const))
{
- targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ /* do nothing! */
+ return targetlist_so_far;
}
- targetlist_so_far = check_having_qual_for_vars(aref->refexpr, targetlist_so_far);
- targetlist_so_far = check_having_qual_for_vars(aref->refassgnexpr, targetlist_so_far);
-
- return targetlist_so_far;
- }
- else if (is_opclause(clause))
- {
-
- /*
- * This is an operator. Recursively call this routine for both its
- * left and right operands
- */
- Node *left = (Node *) get_leftop((Expr *) clause);
- Node *right = (Node *) get_rightop((Expr *) clause);
-
- if (left != (Node *) NULL)
- targetlist_so_far = check_having_qual_for_vars(left, targetlist_so_far);
- if (right != (Node *) NULL)
- targetlist_so_far = check_having_qual_for_vars(right, targetlist_so_far);
-
- return targetlist_so_far;
- }
- else if (IsA(clause, Param) || IsA(clause, Const))
- {
- /* do nothing! */
- return targetlist_so_far;
- }
- /* If we get to a sublink, then we only have to check the lefthand side of the expression
- * to see if there are any additional VARs */
- else if (IsA(clause, SubLink))
- {
- foreach(t,((List *)((SubLink *)clause)->lefthand))
+
+ /*
+ * If we get to a sublink, then we only have to check the lefthand
+ * side of the expression to see if there are any additional VARs
+ */
+ else if (IsA(clause, SubLink))
{
- targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ foreach(t, ((List *) ((SubLink *) clause)->lefthand))
+ targetlist_so_far = check_having_qual_for_vars(lfirst(t), targetlist_so_far);
+ return targetlist_so_far;
+ }
+ else
+ {
+
+ /*
+ * Ooops! we can not handle that!
+ */
+ elog(ERROR, "check_having_qual_for_vars: Can not handle this having_qual! %d\n",
+ nodeTag(clause));
+ return NIL;
}
- return targetlist_so_far;
- }
- else
- {
- /*
- * Ooops! we can not handle that!
- */
- elog(ERROR, "check_having_qual_for_vars: Can not handle this having_qual! %d\n",
- nodeTag(clause));
- return NIL;
- }
}
-/* check_having_qual_for_aggs takes the havingQual, the targetlist and the groupClause
+/* check_having_qual_for_aggs takes the havingQual, the targetlist and the groupClause
* as arguments and scans the havingQual recursively for aggregates. If an aggregate is
- * found it is attached to a list and returned by the function. (All the returned lists
+ * found it is attached to a list and returned by the function. (All the returned lists
* are concenated to result_plan->aggs in planner.c:union_planner() */
List *
check_having_qual_for_aggs(Node *clause, List *subplanTargetList, List *groupClause)
{
- List *t, *l1;
+ List *t,
+ *l1;
List *agg_list = NIL;
- int contained_in_group_clause = 0;
-
+ int contained_in_group_clause = 0;
+
if (IsA(clause, Var))
{
- TargetEntry *subplanVar;
-
- /*
- * Ha! A Var node!
- */
- subplanVar = match_varid((Var *) clause, subplanTargetList);
-
- /*
- * Change the varno & varattno fields of the var node to point to the resdom->resno
- * fields of the subplan (lefttree)
- */
- ((Var *) clause)->varattno = subplanVar->resdom->resno;
-
- return NIL;
+ TargetEntry *subplanVar;
+
+ /*
+ * Ha! A Var node!
+ */
+ subplanVar = match_varid((Var *) clause, subplanTargetList);
+
+ /*
+ * Change the varno & varattno fields of the var node to point to
+ * the resdom->resno fields of the subplan (lefttree)
+ */
+ ((Var *) clause)->varattno = subplanVar->resdom->resno;
+
+ return NIL;
}
- else if (is_funcclause(clause) || not_clause(clause) ||
- or_clause(clause) || and_clause(clause))
+ else if (is_funcclause(clause) || not_clause(clause) ||
+ or_clause(clause) || and_clause(clause))
{
- int new_length=0, old_length=0;
-
+ int new_length = 0,
+ old_length = 0;
+
/*
* This is a function. Recursively call this routine for its
* arguments... (i.e. for AND, OR, ... clauses!)
*/
foreach(t, ((Expr *) clause)->args)
{
- old_length=length((List *)agg_list);
-
- agg_list = nconc(agg_list,
- check_having_qual_for_aggs(lfirst(t), subplanTargetList,
- groupClause));
-
- /* The arguments of OR or AND clauses are comparisons or relations
- * and because we are in the havingQual there must be at least one operand
- * using an aggregate function. If so, we will find it and the lenght of the
- * agg_list will be increased after the above call to
- * check_having_qual_for_aggs. If there are no aggregates used, the query
- * could have been formulated using the 'where' clause */
- if(((new_length=length((List *)agg_list)) == old_length) || (new_length == 0))
- {
- elog(ERROR,"This could have been done in a where clause!!");
- return NIL;
- }
+ old_length = length((List *) agg_list);
+
+ agg_list = nconc(agg_list,
+ check_having_qual_for_aggs(lfirst(t), subplanTargetList,
+ groupClause));
+
+ /*
+ * The arguments of OR or AND clauses are comparisons or
+ * relations and because we are in the havingQual there must
+ * be at least one operand using an aggregate function. If so,
+ * we will find it and the lenght of the agg_list will be
+ * increased after the above call to
+ * check_having_qual_for_aggs. If there are no aggregates
+ * used, the query could have been formulated using the
+ * 'where' clause
+ */
+ if (((new_length = length((List *) agg_list)) == old_length) || (new_length == 0))
+ {
+ elog(ERROR, "This could have been done in a where clause!!");
+ return NIL;
+ }
}
return agg_list;
}
else if (IsA(clause, Aggreg))
{
return lcons(clause,
- check_having_qual_for_aggs(((Aggreg *) clause)->target, subplanTargetList,
- groupClause));
+ check_having_qual_for_aggs(((Aggreg *) clause)->target, subplanTargetList,
+ groupClause));
}
else if (IsA(clause, ArrayRef))
{
@@ -1097,21 +1095,21 @@ check_having_qual_for_aggs(Node *clause, List *subplanTargetList, List *groupCla
foreach(t, aref->refupperindexpr)
{
agg_list = nconc(agg_list,
- check_having_qual_for_aggs(lfirst(t), subplanTargetList,
- groupClause));
+ check_having_qual_for_aggs(lfirst(t), subplanTargetList,
+ groupClause));
}
foreach(t, aref->reflowerindexpr)
{
agg_list = nconc(agg_list,
- check_having_qual_for_aggs(lfirst(t), subplanTargetList,
- groupClause));
+ check_having_qual_for_aggs(lfirst(t), subplanTargetList,
+ groupClause));
}
agg_list = nconc(agg_list,
- check_having_qual_for_aggs(aref->refexpr, subplanTargetList,
- groupClause));
+ check_having_qual_for_aggs(aref->refexpr, subplanTargetList,
+ groupClause));
agg_list = nconc(agg_list,
- check_having_qual_for_aggs(aref->refassgnexpr, subplanTargetList,
- groupClause));
+ check_having_qual_for_aggs(aref->refassgnexpr, subplanTargetList,
+ groupClause));
return agg_list;
}
@@ -1127,80 +1125,86 @@ check_having_qual_for_aggs(Node *clause, List *subplanTargetList, List *groupCla
if (left != (Node *) NULL)
agg_list = nconc(agg_list,
- check_having_qual_for_aggs(left, subplanTargetList,
- groupClause));
+ check_having_qual_for_aggs(left, subplanTargetList,
+ groupClause));
if (right != (Node *) NULL)
agg_list = nconc(agg_list,
check_having_qual_for_aggs(right, subplanTargetList,
- groupClause));
+ groupClause));
return agg_list;
}
- else if (IsA(clause, Param) || IsA(clause, Const))
+ else if (IsA(clause, Param) ||IsA(clause, Const))
{
/* do nothing! */
return NIL;
}
- /* This is for Sublinks which show up as EXPR nodes. All the other EXPR nodes
- * (funcclauses, and_clauses, or_clauses) were caught above */
+
+ /*
+ * This is for Sublinks which show up as EXPR nodes. All the other
+ * EXPR nodes (funcclauses, and_clauses, or_clauses) were caught above
+ */
else if (IsA(clause, Expr))
- {
- /* Only the lefthand side of the sublink has to be checked for aggregates
- * to be attached to result_plan->aggs (see planner.c:union_planner() )
- */
- foreach(t,((List *)((SubLink *)((SubPlan *)
- ((Expr *)clause)->oper)->sublink)->lefthand))
- {
- agg_list =
- nconc(agg_list,
- check_having_qual_for_aggs(lfirst(t),
- subplanTargetList, groupClause));
- }
-
-
- /* All arguments to the Sublink node are attributes from outside used within
- * the sublink. Here we have to check that only attributes that is grouped for
- * are used! */
- foreach(t,((Expr *)clause)->args)
- {
- contained_in_group_clause = 0;
-
- foreach(l1,groupClause)
- {
- if (tlist_member(lfirst(t),lcons(((GroupClause *)lfirst(l1))->entry,NIL)) !=
- NULL)
- {
- contained_in_group_clause=1;
- }
- }
-
- /* If the use of the attribute is allowed (i.e. it is in the groupClause)
- * we have to adjust the varnos and varattnos */
- if (contained_in_group_clause)
- {
- agg_list =
- nconc(agg_list,
- check_having_qual_for_aggs(lfirst(t),
- subplanTargetList, groupClause));
- }
- else
- {
- elog(ERROR,"You must group by the attribute used from outside!");
- return NIL;
- }
- }
- return agg_list;
- }
- else
- {
- /*
- * Ooops! we can not handle that!
- */
- elog(ERROR, "check_having_qual_for_aggs: Can not handle this having_qual! %d\n",
- nodeTag(clause));
- return NIL;
- }
-}
+ {
+ /*
+ * Only the lefthand side of the sublink has to be checked for
+ * aggregates to be attached to result_plan->aggs (see
+ * planner.c:union_planner() )
+ */
+ foreach(t, ((List *) ((SubLink *) ((SubPlan *)
+ ((Expr *) clause)->oper)->sublink)->lefthand))
+ {
+ agg_list =
+ nconc(agg_list,
+ check_having_qual_for_aggs(lfirst(t),
+ subplanTargetList, groupClause));
+ }
+ /*
+ * All arguments to the Sublink node are attributes from outside
+ * used within the sublink. Here we have to check that only
+ * attributes that is grouped for are used!
+ */
+ foreach(t, ((Expr *) clause)->args)
+ {
+ contained_in_group_clause = 0;
+
+ foreach(l1, groupClause)
+ {
+ if (tlist_member(lfirst(t), lcons(((GroupClause *) lfirst(l1))->entry, NIL)) !=
+ NULL)
+ contained_in_group_clause = 1;
+ }
+
+ /*
+ * If the use of the attribute is allowed (i.e. it is in the
+ * groupClause) we have to adjust the varnos and varattnos
+ */
+ if (contained_in_group_clause)
+ {
+ agg_list =
+ nconc(agg_list,
+ check_having_qual_for_aggs(lfirst(t),
+ subplanTargetList, groupClause));
+ }
+ else
+ {
+ elog(ERROR, "You must group by the attribute used from outside!");
+ return NIL;
+ }
+ }
+ return agg_list;
+ }
+ else
+ {
+
+ /*
+ * Ooops! we can not handle that!
+ */
+ elog(ERROR, "check_having_qual_for_aggs: Can not handle this having_qual! %d\n",
+ nodeTag(clause));
+ return NIL;
+ }
+}
diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c
index 61d0df57af..a1b4cd22cc 100644
--- a/src/backend/optimizer/plan/subselect.c
+++ b/src/backend/optimizer/plan/subselect.c
@@ -405,20 +405,23 @@ SS_process_sublinks(Node *expr)
SS_process_sublinks((Node *) ((Expr *) expr)->args);
else if (IsA(expr, SubLink))/* got it! */
{
- /* Hack to make sure expr->oper->args points to the same VAR node
- * as expr->lefthand does. Needed for subselects in the havingQual
- * when used on views.
- * Otherwise aggregate functions will fail later on (at execution
- * time!) Reason: The rewite System makes several copies of the
- * VAR nodes and in this case it should not do so :-( */
- if(((SubLink *) expr)->lefthand != NULL)
+
+ /*
+ * Hack to make sure expr->oper->args points to the same VAR node
+ * as expr->lefthand does. Needed for subselects in the havingQual
+ * when used on views. Otherwise aggregate functions will fail
+ * later on (at execution time!) Reason: The rewite System makes
+ * several copies of the VAR nodes and in this case it should not
+ * do so :-(
+ */
+ if (((SubLink *) expr)->lefthand != NULL)
{
- lfirst(((Expr *) lfirst(((SubLink *)expr)->oper))->args) =
- lfirst(((SubLink *)expr)->lefthand);
+ lfirst(((Expr *) lfirst(((SubLink *) expr)->oper))->args) =
+ lfirst(((SubLink *) expr)->lefthand);
}
- expr = _make_subplan((SubLink *) expr);
+ expr = _make_subplan((SubLink *) expr);
}
-
+
return expr;
}
diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c
index 6fa90a13cf..73ed555ff5 100644
--- a/src/backend/optimizer/prep/preptlist.c
+++ b/src/backend/optimizer/prep/preptlist.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.15 1998/09/01 03:23:44 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.16 1998/09/01 04:29:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,14 +34,11 @@
#include "optimizer/clauses.h"
#include "optimizer/tlist.h"
-static List *
-expand_targetlist(List *tlist, Oid relid, int command_type,
+static List *expand_targetlist(List *tlist, Oid relid, int command_type,
Index result_relation);
-static List *
-replace_matching_resname(List *new_tlist,
+static List *replace_matching_resname(List *new_tlist,
List *old_tlist);
-static List *
-new_relation_targetlist(Oid relid, Index rt_index,
+static List *new_relation_targetlist(Oid relid, Index rt_index,
NodeTag node_type);
@@ -295,13 +292,13 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
false);
temp3 = makeTargetEntry(makeResdom(attno,
- atttype,
- -1,
- attname,
- 0,
- (Oid) 0,
- 0),
- (Node *) temp2);
+ atttype,
+ -1,
+ attname,
+ 0,
+ (Oid) 0,
+ 0),
+ (Node *) temp2);
t_list = lappend(t_list, temp3);
break;
}
@@ -316,13 +313,13 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type)
0, rt_index, attno);
temp_list = makeTargetEntry(makeResdom(attno,
- atttype,
- get_atttypmod(relid, attno),
- attname,
- 0,
- (Oid) 0,
- 0),
- (Node *) temp_var);
+ atttype,
+ get_atttypmod(relid, attno),
+ attname,
+ 0,
+ (Oid) 0,
+ 0),
+ (Node *) temp_var);
t_list = lappend(t_list, temp_list);
break;
}
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index f0242d7270..06f270e118 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.26 1998/09/01 03:23:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.27 1998/09/01 04:29:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,21 +34,16 @@
#include "optimizer/planner.h"
#include "optimizer/planmain.h"
-static List *
-plan_inherit_query(List *relids, Index rt_index,
+static List *plan_inherit_query(List *relids, Index rt_index,
RangeTblEntry *rt_entry, Query *parse,
List **union_rtentriesPtr);
-static RangeTblEntry *
-new_rangetable_entry(Oid new_relid,
+static RangeTblEntry *new_rangetable_entry(Oid new_relid,
RangeTblEntry *old_entry);
-static Query *
-subst_rangetable(Query *root, Index index,
+static Query *subst_rangetable(Query *root, Index index,
RangeTblEntry *new_entry);
-static void
-fix_parsetree_attnums(Index rt_index, Oid old_relid,
+static void fix_parsetree_attnums(Index rt_index, Oid old_relid,
Oid new_relid, Query *parsetree);
-static Append *
-make_append(List *appendplans, List *unionrtables, Index rt_index,
+static Append *make_append(List *appendplans, List *unionrtables, Index rt_index,
List *inheritrtable, List *tlist);
@@ -89,7 +84,7 @@ plan_union_queries(Query *parse)
*
* So the above query becomes:
*
- * Append Node
+ * Append Node
* {
* Sort and Unique
* {
@@ -281,7 +276,7 @@ plan_inherit_query(List *relids,
new_root->sortClause = NULL;
new_root->groupClause = NULL;
new_root->havingQual = NULL;
-
+
if (new_root->hasAggs)
{
new_root->hasAggs = false;
@@ -502,14 +497,14 @@ make_append(List *appendplans,
{
Append *node = makeNode(Append);
List *subnode;
-
+
node->appendplans = appendplans;
node->unionrtables = unionrtables;
node->inheritrelid = rt_index;
node->inheritrtable = inheritrtable;
node->plan.cost = 0.0;
foreach(subnode, appendplans)
- node->plan.cost += ((Plan *)lfirst(subnode))->cost;
+ node->plan.cost += ((Plan *) lfirst(subnode))->cost;
node->plan.state = (EState *) NULL;
node->plan.targetlist = tlist;
node->plan.qual = NIL;
diff --git a/src/backend/optimizer/util/clauseinfo.c b/src/backend/optimizer/util/clauseinfo.c
index 0385edaae9..207074bb1a 100644
--- a/src/backend/optimizer/util/clauseinfo.c
+++ b/src/backend/optimizer/util/clauseinfo.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.8 1998/09/01 03:23:47 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.9 1998/09/01 04:30:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,7 +27,7 @@
*
*/
bool
-valid_or_clause(ClauseInfo *clauseinfo)
+valid_or_clause(ClauseInfo * clauseinfo)
{
if (clauseinfo != NULL &&
!single_node((Node *) clauseinfo->clause) &&
@@ -49,7 +49,7 @@ get_actual_clauses(List *clauseinfo_list)
{
List *temp = NIL;
List *result = NIL;
- ClauseInfo *clause = (ClauseInfo *) NULL;
+ ClauseInfo *clause = (ClauseInfo *) NULL;
foreach(temp, clauseinfo_list)
{
@@ -93,7 +93,7 @@ get_relattvals(List *clauseinfo_list,
List *result1 = NIL;
List *result2 = NIL;
List *result3 = NIL;
- ClauseInfo *temp = (ClauseInfo *) NULL;
+ ClauseInfo *temp = (ClauseInfo *) NULL;
List *i = NIL;
foreach(i, clauseinfo_list)
@@ -144,7 +144,7 @@ get_joinvars(Oid relid,
foreach(temp, clauseinfo_list)
{
- ClauseInfo *clauseinfo = lfirst(temp);
+ ClauseInfo *clauseinfo = lfirst(temp);
Expr *clause = clauseinfo->clause;
if (IsA(get_leftop(clause), Var) &&
@@ -176,7 +176,7 @@ get_joinvars(Oid relid,
List *
get_opnos(List *clauseinfo_list)
{
- ClauseInfo *temp = (ClauseInfo *) NULL;
+ ClauseInfo *temp = (ClauseInfo *) NULL;
List *result = NIL;
List *i = NIL;
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 0ec0f74ca1..19bd3ce98e 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.23 1998/09/01 03:23:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.24 1998/09/01 04:30:02 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -199,8 +199,8 @@ bool
or_clause(Node *clause)
{
return clause != NULL &&
- nodeTag(clause) == T_Expr &&
- ((Expr *) clause)->opType == OR_EXPR;
+ nodeTag(clause) == T_Expr &&
+ ((Expr *) clause)->opType == OR_EXPR;
}
/*
@@ -460,7 +460,7 @@ is_joinable(Node *clause)
* One side of the clause (i.e. left or right operands) must either be
* a var node ...
*/
- if (IsA(leftop, Var) || IsA(rightop, Var))
+ if (IsA(leftop, Var) ||IsA(rightop, Var))
return true;
/*
diff --git a/src/backend/optimizer/util/indexnode.c b/src/backend/optimizer/util/indexnode.c
index a48c817e1f..d83b353cc5 100644
--- a/src/backend/optimizer/util/indexnode.c
+++ b/src/backend/optimizer/util/indexnode.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.9 1998/09/01 03:23:50 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.10 1998/09/01 04:30:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,7 +33,7 @@ static List *find_secondary_index(Query *root, Oid relid);
*
*/
List *
-find_relation_indices(Query *root, RelOptInfo *rel)
+find_relation_indices(Query *root, RelOptInfo * rel)
{
if (rel->indexed)
return find_secondary_index(root, lfirsti(rel->relids));
@@ -61,7 +61,7 @@ find_secondary_index(Query *root, Oid relid)
while (index_info(root, first, relid, &indexinfo))
{
- RelOptInfo *indexnode = makeNode(RelOptInfo);
+ RelOptInfo *indexnode = makeNode(RelOptInfo);
indexnode->relids = lconsi(indexinfo.relid, NIL);
indexnode->relam = indexinfo.relam;
diff --git a/src/backend/optimizer/util/joininfo.c b/src/backend/optimizer/util/joininfo.c
index 9e45905bc8..50e3065f82 100644
--- a/src/backend/optimizer/util/joininfo.c
+++ b/src/backend/optimizer/util/joininfo.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.11 1998/09/01 03:23:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.12 1998/09/01 04:30:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,7 +35,7 @@
* exists.
*
*/
-JoinInfo *
+JoinInfo *
joininfo_member(List *join_relids, List *joininfo_list)
{
List *i = NIL;
@@ -61,10 +61,10 @@ joininfo_member(List *join_relids, List *joininfo_list)
* Returns a joininfo node.
*
*/
-JoinInfo *
-find_joininfo_node(RelOptInfo *this_rel, List *join_relids)
+JoinInfo *
+find_joininfo_node(RelOptInfo * this_rel, List *join_relids)
{
- JoinInfo *joininfo = joininfo_member(join_relids,
+ JoinInfo *joininfo = joininfo_member(join_relids,
this_rel->joininfo);
if (joininfo == NULL)
diff --git a/src/backend/optimizer/util/keys.c b/src/backend/optimizer/util/keys.c
index 9ecf7377ab..3e2372339d 100644
--- a/src/backend/optimizer/util/keys.c
+++ b/src/backend/optimizer/util/keys.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.8 1998/09/01 03:23:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.9 1998/09/01 04:30:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,7 +54,7 @@ static bool equal_indexkey_var(int index_key, Var *var);
*
*/
bool
-match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel)
+match_indexkey_operand(int indexkey, Var *operand, RelOptInfo * rel)
{
if (IsA(operand, Var) &&
(lfirsti(rel->relids) == operand->varno) &&
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c
index bdd4e4509a..598400fa49 100644
--- a/src/backend/optimizer/util/pathnode.c
+++ b/src/backend/optimizer/util/pathnode.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.11 1998/09/01 03:23:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.12 1998/09/01 04:30:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -62,7 +62,7 @@ path_is_cheaper(Path *path1, Path *path2)
*
*/
Path *
-set_cheapest(RelOptInfo *parent_rel, List *pathlist)
+set_cheapest(RelOptInfo * parent_rel, List *pathlist)
{
List *p;
Path *cheapest_so_far;
@@ -99,7 +99,7 @@ set_cheapest(RelOptInfo *parent_rel, List *pathlist)
*
*/
List *
-add_pathlist(RelOptInfo *parent_rel, List *unique_paths, List *new_paths)
+add_pathlist(RelOptInfo * parent_rel, List *unique_paths, List *new_paths)
{
List *x;
Path *new_path;
@@ -200,7 +200,7 @@ better_path(Path *new_path, List *unique_paths, bool *noOther)
*
*/
Path *
-create_seqscan_path(RelOptInfo *rel)
+create_seqscan_path(RelOptInfo * rel)
{
int relid = 0;
@@ -251,8 +251,8 @@ create_seqscan_path(RelOptInfo *rel)
*/
IndexPath *
create_index_path(Query *root,
- RelOptInfo *rel,
- RelOptInfo *index,
+ RelOptInfo * rel,
+ RelOptInfo * index,
List *restriction_clauses,
bool is_join_scan)
{
@@ -406,8 +406,8 @@ create_index_path(Query *root,
*
*/
JoinPath *
-create_nestloop_path(RelOptInfo *joinrel,
- RelOptInfo *outer_rel,
+create_nestloop_path(RelOptInfo * joinrel,
+ RelOptInfo * outer_rel,
Path *outer_path,
Path *inner_path,
List *keys)
@@ -481,7 +481,7 @@ create_nestloop_path(RelOptInfo *joinrel,
*
*/
MergePath *
-create_mergejoin_path(RelOptInfo *joinrel,
+create_mergejoin_path(RelOptInfo * joinrel,
int outersize,
int innersize,
int outerwidth,
@@ -547,7 +547,7 @@ create_mergejoin_path(RelOptInfo *joinrel,
*
*/
HashPath *
-create_hashjoin_path(RelOptInfo *joinrel,
+create_hashjoin_path(RelOptInfo * joinrel,
int outersize,
int innersize,
int outerwidth,
diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c
index b04efb5a36..786947e809 100644
--- a/src/backend/optimizer/util/plancat.c
+++ b/src/backend/optimizer/util/plancat.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.20 1998/09/01 03:23:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.21 1998/09/01 04:30:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,10 +40,9 @@
#endif
-static void
-IndexSelectivity(Oid indexrelid, Oid indrelid, int32 nIndexKeys,
- Oid *AccessMethodOperatorClasses, Oid *operatorObjectIds,
- int32 *varAttributeNumbers, char **constValues, int32 *constFlags,
+static void IndexSelectivity(Oid indexrelid, Oid indrelid, int32 nIndexKeys,
+ Oid *AccessMethodOperatorClasses, Oid *operatorObjectIds,
+ int32 *varAttributeNumbers, char **constValues, int32 *constFlags,
float *idxPages, float *idxSelec);
@@ -65,7 +64,7 @@ relation_info(Query *root, Index relid,
relationObjectId = getrelid(relid, root->rtable);
relationTuple = SearchSysCacheTuple(RELOID,
- ObjectIdGetDatum(relationObjectId),
+ ObjectIdGetDatum(relationObjectId),
0, 0, 0);
if (HeapTupleIsValid(relationTuple))
{
@@ -195,7 +194,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
#ifdef notdef
/* XXX should iterate through strategies -- but how? use #1 for now */
amstrategy = indexRelation->rd_am->amstrategies;
-#endif /* notdef */
+#endif /* notdef */
amstrategy = 1;
relam = indexRelation->rd_rel->relam;
info->relam = relam;
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c
index 869b4ff6bd..52bcd059db 100644
--- a/src/backend/optimizer/util/relnode.c
+++ b/src/backend/optimizer/util/relnode.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.8 1998/09/01 03:23:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/relnode.c,v 1.9 1998/09/01 04:30:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,7 @@ RelOptInfo *
get_base_rel(Query *root, int relid)
{
List *relids;
- RelOptInfo *rel;
+ RelOptInfo *rel;
relids = lconsi(relid, NIL);
rel = rel_member(relids, root->base_rel_list);
@@ -65,6 +65,7 @@ get_base_rel(Query *root, int relid)
*/
if (relid < 0)
{
+
/*
* If the relation is a materialized relation, assume
* constants for sizes.
diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c
index 8aee7a1645..8400e96725 100644
--- a/src/backend/optimizer/util/tlist.c
+++ b/src/backend/optimizer/util/tlist.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.17 1998/09/01 03:23:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.18 1998/09/01 04:30:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -93,7 +93,7 @@ matching_tlvar(Var *var, List *targetlist)
* CREATES: new var-node iff no matching var-node exists in targetlist
*/
void
-add_tl_element(RelOptInfo *rel, Var *var)
+add_tl_element(RelOptInfo * rel, Var *var)
{
Expr *oldvar = (Expr *) NULL;
@@ -134,14 +134,14 @@ TargetEntry *
create_tl_element(Var *var, int resdomno)
{
- return makeTargetEntry(makeResdom(resdomno,
- var->vartype,
- var->vartypmod,
- NULL,
- (Index) 0,
- (Oid) 0,
- 0),
- (Node *) var);
+ return makeTargetEntry(makeResdom(resdomno,
+ var->vartype,
+ var->vartypmod,
+ NULL,
+ (Index) 0,
+ (Oid) 0,
+ 0),
+ (Node *) var);
}
/*
@@ -348,7 +348,7 @@ copy_vars(List *target, List *source)
dest != NIL; src = lnext(src), dest = lnext(dest))
{
TargetEntry *temp = makeTargetEntry(((TargetEntry *) lfirst(dest))->resdom,
- (Node *) get_expr(lfirst(src)));
+ (Node *) get_expr(lfirst(src)));
result = lappend(result, temp);
}
@@ -432,8 +432,8 @@ flatten_tlist_vars(List *full_tlist, List *flat_tlist)
result =
lappend(result,
makeTargetEntry(tle->resdom,
- flatten_tlistentry((Node *) get_expr(tle),
- flat_tlist)));
+ flatten_tlistentry((Node *) get_expr(tle),
+ flat_tlist)));
}
return result;
diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c
index f7486c546c..f77cdfc755 100644
--- a/src/backend/parser/analyze.c
+++ b/src/backend/parser/analyze.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.84 1998/09/01 03:24:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.85 1998/09/01 04:30:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -69,7 +69,7 @@ parse_analyze(List *pl, ParseState *parentParseState)
while (pl != NIL)
{
#ifdef PARSEDEBUG
- elog(DEBUG,"parse tree from yacc:\n---\n%s\n---\n", nodeToString(lfirst(pl)));
+ elog(DEBUG, "parse tree from yacc:\n---\n%s\n---\n", nodeToString(lfirst(pl)));
#endif
pstate = make_parsestate(parentParseState);
@@ -313,11 +313,11 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
* better to create proper target list here...
*/
te = makeTargetEntry(makeResdom(defval[ndef].adnum,
- att[defval[ndef].adnum - 1]->atttypid,
- att[defval[ndef].adnum - 1]->atttypmod,
- pstrdup(nameout(&(att[defval[ndef].adnum - 1]->attname))),
- 0, 0, 0),
- (Node *) stringToNode(defval[ndef].adbin));
+ att[defval[ndef].adnum - 1]->atttypid,
+ att[defval[ndef].adnum - 1]->atttypmod,
+ pstrdup(nameout(&(att[defval[ndef].adnum - 1]->attname))),
+ 0, 0, 0),
+ (Node *) stringToNode(defval[ndef].adbin));
qry->targetList = lappend(qry->targetList, te);
}
}
@@ -325,9 +325,12 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
/* fix where clause */
qry->qual = transformWhereClause(pstate, stmt->whereClause);
- /* The havingQual has a similar meaning as "qual" in the where statement.
- * So we can easily use the code from the "where clause" with some additional
- * traversals done in .../optimizer/plan/planner.c */
+ /*
+ * The havingQual has a similar meaning as "qual" in the where
+ * statement. So we can easily use the code from the "where clause"
+ * with some additional traversals done in
+ * .../optimizer/plan/planner.c
+ */
qry->havingQual = transformWhereClause(pstate, stmt->havingClause);
qry->hasSubLinks = pstate->p_hasSubLinks;
@@ -351,20 +354,24 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
if (pstate->p_hasAggs)
parseCheckAggregates(pstate, qry);
- /* The INSERT INTO ... SELECT ... could have a UNION
- * in child, so unionClause may be false
+ /*
+ * The INSERT INTO ... SELECT ... could have a UNION in child, so
+ * unionClause may be false
*/
qry->unionall = stmt->unionall;
qry->unionClause = transformUnionClause(stmt->unionClause, qry->targetList);
- /* If there is a havingQual but there are no aggregates, then there is something wrong
- * with the query because having must contain aggregates in its expressions!
- * Otherwise the query could have been formulated using the where clause. */
- if((qry->hasAggs == false) && (qry->havingQual != NULL))
- {
- elog(ERROR,"This is not a valid having query!");
- return (Query *)NIL;
- }
+ /*
+ * If there is a havingQual but there are no aggregates, then there is
+ * something wrong with the query because having must contain
+ * aggregates in its expressions! Otherwise the query could have been
+ * formulated using the where clause.
+ */
+ if ((qry->hasAggs == false) && (qry->havingQual != NULL))
+ {
+ elog(ERROR, "This is not a valid having query!");
+ return (Query *) NIL;
+ }
return (Query *) qry;
}
@@ -495,13 +502,13 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
if (column->is_sequence)
{
- char *cstring;
+ char *cstring;
CreateSeqStmt *sequence;
constraint = makeNode(Constraint);
constraint->contype = CONSTR_DEFAULT;
constraint->name = makeTableName(stmt->relname, column->colname, "seq", NULL);
- cstring = palloc(9+strlen(constraint->name)+2+1);
+ cstring = palloc(9 + strlen(constraint->name) + 2 + 1);
strcpy(cstring, "nextval('");
strcat(cstring, constraint->name);
strcat(cstring, "')");
@@ -509,20 +516,16 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
constraint->keys = NULL;
if (column->constraints != NIL)
- {
column->constraints = lappend(column->constraints, constraint);
- }
else
- {
column->constraints = lcons(constraint, NIL);
- }
sequence = makeNode(CreateSeqStmt);
sequence->seqname = pstrdup(constraint->name);
sequence->options = NIL;
elog(NOTICE, "CREATE TABLE will create implicit sequence %s for SERIAL column %s.%s",
- sequence->seqname, stmt->relname, column->colname);
+ sequence->seqname, stmt->relname, column->colname);
ilist = lcons(sequence, NIL);
@@ -789,14 +792,16 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt)
qry->commandType = CMD_UTILITY;
/*
- * 'instead nothing' rules with a qualification need a
- * query a rangetable so the rewrite handler can add the
- * negated rule qualification to the original query. We
- * create a query with the new command type CMD_NOTHING
- * here that is treated special by the rewrite system.
+ * 'instead nothing' rules with a qualification need a query a
+ * rangetable so the rewrite handler can add the negated rule
+ * qualification to the original query. We create a query with the new
+ * command type CMD_NOTHING here that is treated special by the
+ * rewrite system.
*/
- if (stmt->actions == NIL) {
- Query *nothing_qry = makeNode(Query);
+ if (stmt->actions == NIL)
+ {
+ Query *nothing_qry = makeNode(Query);
+
nothing_qry->commandType = CMD_NOTHING;
addRangeTableEntry(pstate, stmt->object->relname, "*CURRENT*",
@@ -830,7 +835,7 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt)
pstate->p_is_rule = true; /* for expand all */
pstate->p_hasAggs = false;
- action = (Query *)lfirst(actions);
+ action = (Query *) lfirst(actions);
if (action->commandType != CMD_NOTHING)
lfirst(actions) = transformStmt(pstate, lfirst(actions));
actions = lnext(actions);
@@ -869,9 +874,12 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt)
qry->qual = transformWhereClause(pstate, stmt->whereClause);
- /* The havingQual has a similar meaning as "qual" in the where statement.
- * So we can easily use the code from the "where clause" with some additional
- * traversals done in .../optimizer/plan/planner.c */
+ /*
+ * The havingQual has a similar meaning as "qual" in the where
+ * statement. So we can easily use the code from the "where clause"
+ * with some additional traversals done in
+ * .../optimizer/plan/planner.c
+ */
qry->havingQual = transformWhereClause(pstate, stmt->havingClause);
qry->hasSubLinks = pstate->p_hasSubLinks;
@@ -891,20 +899,24 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt)
if (pstate->p_hasAggs)
parseCheckAggregates(pstate, qry);
- /* The INSERT INTO ... SELECT ... could have a UNION
- * in child, so unionClause may be false
+ /*
+ * The INSERT INTO ... SELECT ... could have a UNION in child, so
+ * unionClause may be false
*/
qry->unionall = stmt->unionall;
qry->unionClause = transformUnionClause(stmt->unionClause, qry->targetList);
- /* If there is a havingQual but there are no aggregates, then there is something wrong
- * with the query because having must contain aggregates in its expressions!
- * Otherwise the query could have been formulated using the where clause. */
- if((qry->hasAggs == false) && (qry->havingQual != NULL))
- {
- elog(ERROR,"This is not a valid having query!");
- return (Query *)NIL;
- }
+ /*
+ * If there is a havingQual but there are no aggregates, then there is
+ * something wrong with the query because having must contain
+ * aggregates in its expressions! Otherwise the query could have been
+ * formulated using the where clause.
+ */
+ if ((qry->hasAggs == false) && (qry->havingQual != NULL))
+ {
+ elog(ERROR, "This is not a valid having query!");
+ return (Query *) NIL;
+ }
return (Query *) qry;
}
diff --git a/src/backend/parser/gram.c b/src/backend/parser/gram.c
index 0f93d9c800..6092cc57df 100644
--- a/src/backend/parser/gram.c
+++ b/src/backend/parser/gram.c
@@ -1,212 +1,212 @@
-/* A Bison parser, made from gram.y
+/* A Bison parser, made from gram.y
by GNU Bison version 1.25
*/
-#define YYBISON 1 /* Identify Bison output. */
-
-#define ACTION 258
-#define ADD 259
-#define ALL 260
-#define ALTER 261
-#define AND 262
-#define ANY 263
-#define AS 264
-#define ASC 265
-#define BEGIN_TRANS 266
-#define BETWEEN 267
-#define BOTH 268
-#define BY 269
-#define CASCADE 270
-#define CAST 271
-#define CHAR 272
-#define CHARACTER 273
-#define CHECK 274
-#define CLOSE 275
-#define COLLATE 276
-#define COLUMN 277
-#define COMMIT 278
-#define CONSTRAINT 279
-#define CREATE 280
-#define CROSS 281
-#define CURRENT 282
-#define CURRENT_DATE 283
-#define CURRENT_TIME 284
-#define CURRENT_TIMESTAMP 285
-#define CURRENT_USER 286
-#define CURSOR 287
-#define DAY_P 288
-#define DECIMAL 289
-#define DECLARE 290
-#define DEFAULT 291
-#define DELETE 292
-#define DESC 293
-#define DISTINCT 294
-#define DOUBLE 295
-#define DROP 296
-#define END_TRANS 297
-#define EXECUTE 298
-#define EXISTS 299
-#define EXTRACT 300
-#define FETCH 301
-#define FLOAT 302
-#define FOR 303
-#define FOREIGN 304
-#define FROM 305
-#define FULL 306
-#define GRANT 307
-#define GROUP 308
-#define HAVING 309
-#define HOUR_P 310
-#define IN 311
-#define INNER_P 312
-#define INSERT 313
-#define INTERVAL 314
-#define INTO 315
-#define IS 316
-#define JOIN 317
-#define KEY 318
-#define LANGUAGE 319
-#define LEADING 320
-#define LEFT 321
-#define LIKE 322
-#define LOCAL 323
-#define MATCH 324
-#define MINUTE_P 325
-#define MONTH_P 326
-#define NAMES 327
-#define NATIONAL 328
-#define NATURAL 329
-#define NCHAR 330
-#define NO 331
-#define NOT 332
-#define NOTIFY 333
-#define NULL_P 334
-#define NUMERIC 335
-#define ON 336
-#define OPTION 337
-#define OR 338
-#define ORDER 339
-#define OUTER_P 340
-#define PARTIAL 341
-#define POSITION 342
-#define PRECISION 343
-#define PRIMARY 344
-#define PRIVILEGES 345
-#define PROCEDURE 346
-#define PUBLIC 347
-#define REFERENCES 348
-#define REVOKE 349
-#define RIGHT 350
-#define ROLLBACK 351
-#define SECOND_P 352
-#define SELECT 353
-#define SET 354
-#define SUBSTRING 355
-#define TABLE 356
-#define TIME 357
-#define TIMESTAMP 358
-#define TIMEZONE_HOUR 359
-#define TIMEZONE_MINUTE 360
-#define TO 361
-#define TRAILING 362
-#define TRANSACTION 363
-#define TRIM 364
-#define UNION 365
-#define UNIQUE 366
-#define UPDATE 367
-#define USER 368
-#define USING 369
-#define VALUES 370
-#define VARCHAR 371
-#define VARYING 372
-#define VIEW 373
-#define WHERE 374
-#define WITH 375
-#define WORK 376
-#define YEAR_P 377
-#define ZONE 378
-#define FALSE_P 379
-#define TRIGGER 380
-#define TRUE_P 381
-#define TYPE_P 382
-#define ABORT_TRANS 383
-#define AFTER 384
-#define AGGREGATE 385
-#define ANALYZE 386
-#define BACKWARD 387
-#define BEFORE 388
-#define BINARY 389
-#define CACHE 390
-#define CLUSTER 391
-#define COPY 392
-#define CYCLE 393
-#define DATABASE 394
-#define DELIMITERS 395
-#define DO 396
-#define EACH 397
-#define EXPLAIN 398
-#define EXTEND 399
-#define FORWARD 400
-#define FUNCTION 401
-#define HANDLER 402
-#define INCREMENT 403
-#define INDEX 404
-#define INHERITS 405
-#define INSTEAD 406
-#define ISNULL 407
-#define LANCOMPILER 408
-#define LISTEN 409
-#define LOAD 410
-#define LOCK_P 411
-#define LOCATION 412
-#define MAXVALUE 413
-#define MINVALUE 414
-#define MOVE 415
-#define NEW 416
-#define NONE 417
-#define NOTHING 418
-#define NOTNULL 419
-#define OIDS 420
-#define OPERATOR 421
-#define PROCEDURAL 422
-#define RECIPE 423
-#define RENAME 424
-#define RESET 425
-#define RETURNS 426
-#define ROW 427
-#define RULE 428
-#define SEQUENCE 429
-#define SERIAL 430
-#define SETOF 431
-#define SHOW 432
-#define START 433
-#define STATEMENT 434
-#define STDIN 435
-#define STDOUT 436
-#define TRUSTED 437
-#define VACUUM 438
-#define VERBOSE 439
-#define VERSION 440
-#define ENCODING 441
-#define UNLISTEN 442
-#define ARCHIVE 443
-#define PASSWORD 444
-#define CREATEDB 445
-#define NOCREATEDB 446
-#define CREATEUSER 447
-#define NOCREATEUSER 448
-#define VALID 449
-#define UNTIL 450
-#define IDENT 451
-#define SCONST 452
-#define Op 453
-#define ICONST 454
-#define PARAM 455
-#define FCONST 456
-#define OP 457
-#define UMINUS 458
-#define TYPECAST 459
+#define YYBISON 1 /* Identify Bison output. */
+
+#define ACTION 258
+#define ADD 259
+#define ALL 260
+#define ALTER 261
+#define AND 262
+#define ANY 263
+#define AS 264
+#define ASC 265
+#define BEGIN_TRANS 266
+#define BETWEEN 267
+#define BOTH 268
+#define BY 269
+#define CASCADE 270
+#define CAST 271
+#define CHAR 272
+#define CHARACTER 273
+#define CHECK 274
+#define CLOSE 275
+#define COLLATE 276
+#define COLUMN 277
+#define COMMIT 278
+#define CONSTRAINT 279
+#define CREATE 280
+#define CROSS 281
+#define CURRENT 282
+#define CURRENT_DATE 283
+#define CURRENT_TIME 284
+#define CURRENT_TIMESTAMP 285
+#define CURRENT_USER 286
+#define CURSOR 287
+#define DAY_P 288
+#define DECIMAL 289
+#define DECLARE 290
+#define DEFAULT 291
+#define DELETE 292
+#define DESC 293
+#define DISTINCT 294
+#define DOUBLE 295
+#define DROP 296
+#define END_TRANS 297
+#define EXECUTE 298
+#define EXISTS 299
+#define EXTRACT 300
+#define FETCH 301
+#define FLOAT 302
+#define FOR 303
+#define FOREIGN 304
+#define FROM 305
+#define FULL 306
+#define GRANT 307
+#define GROUP 308
+#define HAVING 309
+#define HOUR_P 310
+#define IN 311
+#define INNER_P 312
+#define INSERT 313
+#define INTERVAL 314
+#define INTO 315
+#define IS 316
+#define JOIN 317
+#define KEY 318
+#define LANGUAGE 319
+#define LEADING 320
+#define LEFT 321
+#define LIKE 322
+#define LOCAL 323
+#define MATCH 324
+#define MINUTE_P 325
+#define MONTH_P 326
+#define NAMES 327
+#define NATIONAL 328
+#define NATURAL 329
+#define NCHAR 330
+#define NO 331
+#define NOT 332
+#define NOTIFY 333
+#define NULL_P 334
+#define NUMERIC 335
+#define ON 336
+#define OPTION 337
+#define OR 338
+#define ORDER 339
+#define OUTER_P 340
+#define PARTIAL 341
+#define POSITION 342
+#define PRECISION 343
+#define PRIMARY 344
+#define PRIVILEGES 345
+#define PROCEDURE 346
+#define PUBLIC 347
+#define REFERENCES 348
+#define REVOKE 349
+#define RIGHT 350
+#define ROLLBACK 351
+#define SECOND_P 352
+#define SELECT 353
+#define SET 354
+#define SUBSTRING 355
+#define TABLE 356
+#define TIME 357
+#define TIMESTAMP 358
+#define TIMEZONE_HOUR 359
+#define TIMEZONE_MINUTE 360
+#define TO 361
+#define TRAILING 362
+#define TRANSACTION 363
+#define TRIM 364
+#define UNION 365
+#define UNIQUE 366
+#define UPDATE 367
+#define USER 368
+#define USING 369
+#define VALUES 370
+#define VARCHAR 371
+#define VARYING 372
+#define VIEW 373
+#define WHERE 374
+#define WITH 375
+#define WORK 376
+#define YEAR_P 377
+#define ZONE 378
+#define FALSE_P 379
+#define TRIGGER 380
+#define TRUE_P 381
+#define TYPE_P 382
+#define ABORT_TRANS 383
+#define AFTER 384
+#define AGGREGATE 385
+#define ANALYZE 386
+#define BACKWARD 387
+#define BEFORE 388
+#define BINARY 389
+#define CACHE 390
+#define CLUSTER 391
+#define COPY 392
+#define CYCLE 393
+#define DATABASE 394
+#define DELIMITERS 395
+#define DO 396
+#define EACH 397
+#define EXPLAIN 398
+#define EXTEND 399
+#define FORWARD 400
+#define FUNCTION 401
+#define HANDLER 402
+#define INCREMENT 403
+#define INDEX 404
+#define INHERITS 405
+#define INSTEAD 406
+#define ISNULL 407
+#define LANCOMPILER 408
+#define LISTEN 409
+#define LOAD 410
+#define LOCK_P 411
+#define LOCATION 412
+#define MAXVALUE 413
+#define MINVALUE 414
+#define MOVE 415
+#define NEW 416
+#define NONE 417
+#define NOTHING 418
+#define NOTNULL 419
+#define OIDS 420
+#define OPERATOR 421
+#define PROCEDURAL 422
+#define RECIPE 423
+#define RENAME 424
+#define RESET 425
+#define RETURNS 426
+#define ROW 427
+#define RULE 428
+#define SEQUENCE 429
+#define SERIAL 430
+#define SETOF 431
+#define SHOW 432
+#define START 433
+#define STATEMENT 434
+#define STDIN 435
+#define STDOUT 436
+#define TRUSTED 437
+#define VACUUM 438
+#define VERBOSE 439
+#define VERSION 440
+#define ENCODING 441
+#define UNLISTEN 442
+#define ARCHIVE 443
+#define PASSWORD 444
+#define CREATEDB 445
+#define NOCREATEDB 446
+#define CREATEUSER 447
+#define NOCREATEUSER 448
+#define VALID 449
+#define UNTIL 450
+#define IDENT 451
+#define SCONST 452
+#define Op 453
+#define ICONST 454
+#define PARAM 455
+#define FCONST 456
+#define OP 457
+#define UMINUS 458
+#define TYPECAST 459
#line 1 "gram.y"
/* -*-text-*- */
@@ -221,7 +221,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.32 1998/09/01 03:24:04 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.33 1998/09/01 04:30:18 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -261,10 +261,11 @@
#include "mb/pg_wchar.h"
#endif
-static char saved_relname[NAMEDATALEN]; /* need this for complex attributes */
+static char saved_relname[NAMEDATALEN]; /* need this for complex
+ * attributes */
static bool QueryIsRule = FALSE;
static List *saved_In_Expr = NIL;
-static Oid *param_type_info;
+static Oid *param_type_info;
static int pfunc_num_args;
extern List *parsetree;
@@ -280,52 +281,53 @@ static char *xlateSqlFunc(char *);
static char *xlateSqlType(char *);
static Node *makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr);
static Node *makeRowExpr(char *opr, List *largs, List *rargs);
-void mapTargetColumns(List *source, List *target);
-static List *makeConstantList( A_Const *node);
+void mapTargetColumns(List *source, List *target);
+static List *makeConstantList(A_Const *node);
static char *FlattenStringList(List *list);
static char *fmtId(char *rawid);
static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr);
static void param_type_init(Oid *typev, int nargs);
-Oid param_type(int t); /* used in parse_expr.c */
+Oid param_type(int t); /* used in parse_expr.c */
/* old versions of flex define this as a macro */
#if defined(yywrap)
#undef yywrap
-#endif /* yywrap */
+#endif /* yywrap */
#line 88 "gram.y"
typedef union
{
- double dval;
- int ival;
- char chr;
- char *str;
- bool boolean;
- bool* pboolean; /* for pg_shadow privileges */
- List *list;
- Node *node;
- Value *value;
-
- Attr *attr;
-
- TypeName *typnam;
- DefElem *defelt;
- ParamString *param;
- SortGroupBy *sortgroupby;
- JoinUsing *joinusing;
- IndexElem *ielem;
- RangeVar *range;
- RelExpr *relexp;
- A_Indices *aind;
- ResTarget *target;
- ParamNo *paramno;
-
- VersionStmt *vstmt;
- DefineStmt *dstmt;
- RuleStmt *rstmt;
- InsertStmt *astmt;
+ double dval;
+ int ival;
+ char chr;
+ char *str;
+ bool boolean;
+ bool *pboolean; /* for pg_shadow privileges */
+ List *list;
+ Node *node;
+ Value *value;
+
+ Attr *attr;
+
+ TypeName *typnam;
+ DefElem *defelt;
+ ParamString *param;
+ SortGroupBy *sortgroupby;
+ JoinUsing *joinusing;
+ IndexElem *ielem;
+ RangeVar *range;
+ RelExpr *relexp;
+ A_Indices *aind;
+ ResTarget *target;
+ ParamNo *paramno;
+
+ VersionStmt *vstmt;
+ DefineStmt *dstmt;
+ RuleStmt *rstmt;
+ InsertStmt *astmt;
} YYSTYPE;
+
#include <stdio.h>
#ifndef __cplusplus
@@ -336,3710 +338,3713 @@ typedef union
-#define YYFINAL 1576
-#define YYFLAG -32768
-#define YYNTBASE 221
+#define YYFINAL 1576
+#define YYFLAG -32768
+#define YYNTBASE 221
#define YYTRANSLATE(x) ((unsigned)(x) <= 459 ? yytranslate[x] : 477)
-static const short 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, 2, 2, 2, 219,
- 220, 208, 206, 218, 207, 214, 209, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 211, 212, 204,
- 203, 205, 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,
- 215, 2, 216, 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, 210, 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, 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, 213, 217
+static const short 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, 2, 2, 2, 219,
+ 220, 208, 206, 218, 207, 214, 209, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 211, 212, 204,
+ 203, 205, 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,
+ 215, 2, 216, 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, 210, 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, 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, 213, 217
};
#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 4, 8, 11, 14, 16, 18, 20, 22,
- 24, 26, 28, 30, 32, 34, 36, 38, 40, 42,
- 44, 46, 48, 50, 52, 54, 56, 58, 60, 62,
- 64, 66, 68, 70, 72, 74, 76, 78, 80, 82,
- 84, 86, 88, 90, 92, 94, 96, 98, 100, 109,
- 118, 122, 126, 127, 129, 131, 132, 134, 136, 137,
- 141, 143, 147, 148, 152, 153, 158, 163, 168, 172,
- 174, 176, 178, 180, 182, 185, 189, 192, 196, 202,
- 206, 211, 215, 222, 228, 231, 234, 242, 244, 246,
- 248, 250, 252, 254, 255, 258, 259, 263, 264, 273,
- 277, 279, 280, 282, 284, 288, 291, 293, 294, 297,
- 299, 303, 305, 310, 313, 316, 318, 321, 327, 331,
- 333, 335, 337, 340, 344, 348, 352, 356, 360, 364,
- 368, 371, 374, 377, 381, 388, 392, 396, 401, 405,
- 408, 411, 413, 415, 420, 422, 427, 429, 431, 435,
- 437, 442, 447, 453, 464, 468, 470, 472, 474, 476,
- 479, 483, 487, 491, 495, 499, 503, 507, 510, 513,
- 516, 520, 527, 531, 535, 540, 544, 548, 553, 557,
- 561, 564, 567, 570, 573, 577, 580, 585, 589, 593,
- 598, 603, 609, 616, 622, 629, 633, 635, 637, 640,
- 643, 644, 647, 649, 650, 654, 658, 661, 663, 666,
- 669, 674, 675, 679, 680, 687, 691, 692, 696, 698,
- 700, 705, 708, 709, 712, 714, 717, 720, 723, 726,
- 728, 730, 732, 735, 737, 740, 750, 752, 753, 758,
- 773, 775, 777, 779, 783, 789, 791, 793, 795, 799,
- 801, 802, 804, 806, 808, 812, 813, 815, 817, 819,
- 821, 827, 831, 834, 836, 838, 840, 842, 844, 846,
- 848, 850, 854, 856, 860, 864, 866, 870, 872, 874,
- 876, 878, 881, 885, 889, 894, 899, 901, 903, 904,
- 906, 908, 909, 912, 913, 921, 924, 926, 928, 930,
- 934, 936, 938, 940, 942, 944, 946, 949, 951, 955,
- 956, 963, 975, 977, 978, 981, 982, 984, 986, 990,
- 992, 999, 1003, 1006, 1009, 1010, 1012, 1015, 1016, 1021,
- 1025, 1037, 1040, 1041, 1045, 1048, 1050, 1054, 1057, 1059,
- 1060, 1064, 1066, 1068, 1070, 1072, 1077, 1079, 1081, 1086,
- 1093, 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111,
- 1113, 1117, 1121, 1125, 1135, 1137, 1138, 1140, 1141, 1142,
- 1156, 1158, 1160, 1164, 1168, 1170, 1172, 1176, 1179, 1182,
- 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1199, 1202, 1205,
- 1208, 1211, 1214, 1217, 1220, 1223, 1225, 1227, 1228, 1234,
- 1237, 1244, 1248, 1252, 1253, 1257, 1258, 1260, 1262, 1263,
- 1265, 1267, 1268, 1272, 1277, 1281, 1287, 1289, 1290, 1292,
- 1293, 1297, 1298, 1300, 1304, 1308, 1310, 1312, 1314, 1316,
- 1318, 1320, 1326, 1331, 1340, 1344, 1345, 1349, 1351, 1354,
- 1359, 1363, 1370, 1385, 1396, 1405, 1409, 1410, 1415, 1417,
- 1425, 1429, 1430, 1432, 1433, 1435, 1436, 1438, 1442, 1444,
- 1445, 1449, 1450, 1452, 1456, 1459, 1462, 1465, 1468, 1470,
- 1472, 1473, 1475, 1476, 1478, 1480, 1484, 1488, 1489, 1492,
- 1493, 1502, 1505, 1506, 1510, 1515, 1517, 1521, 1524, 1526,
- 1529, 1532, 1535, 1538, 1540, 1542, 1544, 1545, 1547, 1548,
- 1553, 1558, 1559, 1561, 1565, 1567, 1571, 1573, 1576, 1577,
- 1579, 1582, 1586, 1591, 1592, 1596, 1601, 1602, 1605, 1607,
- 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1625, 1628, 1631,
- 1634, 1636, 1639, 1641, 1643, 1647, 1648, 1654, 1658, 1659,
- 1665, 1669, 1670, 1675, 1677, 1682, 1685, 1687, 1691, 1694,
- 1696, 1697, 1701, 1702, 1705, 1706, 1708, 1711, 1713, 1716,
- 1718, 1720, 1722, 1724, 1726, 1728, 1732, 1733, 1735, 1739,
- 1743, 1747, 1751, 1755, 1759, 1763, 1764, 1766, 1768, 1776,
- 1785, 1794, 1802, 1810, 1814, 1818, 1820, 1822, 1824, 1826,
- 1828, 1830, 1832, 1834, 1836, 1838, 1840, 1843, 1845, 1847,
- 1849, 1852, 1856, 1860, 1864, 1868, 1872, 1876, 1880, 1883,
- 1886, 1889, 1893, 1900, 1904, 1908, 1912, 1917, 1920, 1923,
- 1928, 1932, 1937, 1939, 1941, 1946, 1948, 1953, 1955, 1957,
- 1962, 1967, 1972, 1977, 1983, 1989, 1995, 2000, 2003, 2007,
- 2010, 2015, 2019, 2024, 2028, 2033, 2039, 2046, 2047, 2054,
- 2055, 2063, 2069, 2075, 2081, 2087, 2093, 2099, 2105, 2111,
- 2118, 2125, 2132, 2139, 2146, 2153, 2160, 2167, 2174, 2181,
- 2188, 2195, 2202, 2209, 2216, 2223, 2227, 2231, 2234, 2237,
- 2239, 2241, 2244, 2248, 2252, 2256, 2260, 2263, 2266, 2269,
- 2273, 2280, 2284, 2288, 2291, 2294, 2298, 2303, 2305, 2307,
- 2312, 2314, 2319, 2321, 2323, 2328, 2333, 2339, 2345, 2351,
- 2356, 2361, 2368, 2369, 2371, 2375, 2379, 2383, 2384, 2386,
- 2388, 2390, 2394, 2395, 2398, 2400, 2403, 2407, 2411, 2415,
- 2419, 2422, 2426, 2433, 2437, 2441, 2444, 2447, 2449, 2453,
- 2458, 2463, 2468, 2474, 2480, 2486, 2491, 2495, 2496, 2499,
- 2500, 2503, 2504, 2508, 2511, 2513, 2515, 2517, 2519, 2523,
- 2525, 2527, 2529, 2533, 2537, 2541, 2543, 2547, 2551, 2555,
- 2557, 2559, 2564, 2567, 2571, 2575, 2577, 2581, 2583, 2587,
- 2589, 2591, 2592, 2594, 2596, 2598, 2600, 2602, 2604, 2606,
- 2608, 2610, 2612, 2614, 2616, 2618, 2620, 2623, 2625, 2627,
- 2629, 2631, 2633, 2635, 2637, 2639, 2641, 2643, 2645, 2647,
- 2649, 2651, 2653, 2655, 2657, 2659, 2661, 2663, 2665, 2667,
- 2669, 2671, 2673, 2675, 2677, 2679, 2681, 2683, 2685, 2687,
- 2689, 2691, 2693, 2695, 2697, 2699, 2701, 2703, 2705, 2707,
- 2709, 2711, 2713, 2715, 2717, 2719, 2721, 2723, 2725, 2727,
- 2729, 2731, 2733, 2735, 2737, 2739, 2741, 2743, 2745, 2747
+static const short yyprhs[] = {0,
+ 0, 2, 4, 8, 11, 14, 16, 18, 20, 22,
+ 24, 26, 28, 30, 32, 34, 36, 38, 40, 42,
+ 44, 46, 48, 50, 52, 54, 56, 58, 60, 62,
+ 64, 66, 68, 70, 72, 74, 76, 78, 80, 82,
+ 84, 86, 88, 90, 92, 94, 96, 98, 100, 109,
+ 118, 122, 126, 127, 129, 131, 132, 134, 136, 137,
+ 141, 143, 147, 148, 152, 153, 158, 163, 168, 172,
+ 174, 176, 178, 180, 182, 185, 189, 192, 196, 202,
+ 206, 211, 215, 222, 228, 231, 234, 242, 244, 246,
+ 248, 250, 252, 254, 255, 258, 259, 263, 264, 273,
+ 277, 279, 280, 282, 284, 288, 291, 293, 294, 297,
+ 299, 303, 305, 310, 313, 316, 318, 321, 327, 331,
+ 333, 335, 337, 340, 344, 348, 352, 356, 360, 364,
+ 368, 371, 374, 377, 381, 388, 392, 396, 401, 405,
+ 408, 411, 413, 415, 420, 422, 427, 429, 431, 435,
+ 437, 442, 447, 453, 464, 468, 470, 472, 474, 476,
+ 479, 483, 487, 491, 495, 499, 503, 507, 510, 513,
+ 516, 520, 527, 531, 535, 540, 544, 548, 553, 557,
+ 561, 564, 567, 570, 573, 577, 580, 585, 589, 593,
+ 598, 603, 609, 616, 622, 629, 633, 635, 637, 640,
+ 643, 644, 647, 649, 650, 654, 658, 661, 663, 666,
+ 669, 674, 675, 679, 680, 687, 691, 692, 696, 698,
+ 700, 705, 708, 709, 712, 714, 717, 720, 723, 726,
+ 728, 730, 732, 735, 737, 740, 750, 752, 753, 758,
+ 773, 775, 777, 779, 783, 789, 791, 793, 795, 799,
+ 801, 802, 804, 806, 808, 812, 813, 815, 817, 819,
+ 821, 827, 831, 834, 836, 838, 840, 842, 844, 846,
+ 848, 850, 854, 856, 860, 864, 866, 870, 872, 874,
+ 876, 878, 881, 885, 889, 894, 899, 901, 903, 904,
+ 906, 908, 909, 912, 913, 921, 924, 926, 928, 930,
+ 934, 936, 938, 940, 942, 944, 946, 949, 951, 955,
+ 956, 963, 975, 977, 978, 981, 982, 984, 986, 990,
+ 992, 999, 1003, 1006, 1009, 1010, 1012, 1015, 1016, 1021,
+ 1025, 1037, 1040, 1041, 1045, 1048, 1050, 1054, 1057, 1059,
+ 1060, 1064, 1066, 1068, 1070, 1072, 1077, 1079, 1081, 1086,
+ 1093, 1095, 1097, 1099, 1101, 1103, 1105, 1107, 1109, 1111,
+ 1113, 1117, 1121, 1125, 1135, 1137, 1138, 1140, 1141, 1142,
+ 1156, 1158, 1160, 1164, 1168, 1170, 1172, 1176, 1179, 1182,
+ 1186, 1188, 1190, 1192, 1194, 1196, 1198, 1199, 1202, 1205,
+ 1208, 1211, 1214, 1217, 1220, 1223, 1225, 1227, 1228, 1234,
+ 1237, 1244, 1248, 1252, 1253, 1257, 1258, 1260, 1262, 1263,
+ 1265, 1267, 1268, 1272, 1277, 1281, 1287, 1289, 1290, 1292,
+ 1293, 1297, 1298, 1300, 1304, 1308, 1310, 1312, 1314, 1316,
+ 1318, 1320, 1326, 1331, 1340, 1344, 1345, 1349, 1351, 1354,
+ 1359, 1363, 1370, 1385, 1396, 1405, 1409, 1410, 1415, 1417,
+ 1425, 1429, 1430, 1432, 1433, 1435, 1436, 1438, 1442, 1444,
+ 1445, 1449, 1450, 1452, 1456, 1459, 1462, 1465, 1468, 1470,
+ 1472, 1473, 1475, 1476, 1478, 1480, 1484, 1488, 1489, 1492,
+ 1493, 1502, 1505, 1506, 1510, 1515, 1517, 1521, 1524, 1526,
+ 1529, 1532, 1535, 1538, 1540, 1542, 1544, 1545, 1547, 1548,
+ 1553, 1558, 1559, 1561, 1565, 1567, 1571, 1573, 1576, 1577,
+ 1579, 1582, 1586, 1591, 1592, 1596, 1601, 1602, 1605, 1607,
+ 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1625, 1628, 1631,
+ 1634, 1636, 1639, 1641, 1643, 1647, 1648, 1654, 1658, 1659,
+ 1665, 1669, 1670, 1675, 1677, 1682, 1685, 1687, 1691, 1694,
+ 1696, 1697, 1701, 1702, 1705, 1706, 1708, 1711, 1713, 1716,
+ 1718, 1720, 1722, 1724, 1726, 1728, 1732, 1733, 1735, 1739,
+ 1743, 1747, 1751, 1755, 1759, 1763, 1764, 1766, 1768, 1776,
+ 1785, 1794, 1802, 1810, 1814, 1818, 1820, 1822, 1824, 1826,
+ 1828, 1830, 1832, 1834, 1836, 1838, 1840, 1843, 1845, 1847,
+ 1849, 1852, 1856, 1860, 1864, 1868, 1872, 1876, 1880, 1883,
+ 1886, 1889, 1893, 1900, 1904, 1908, 1912, 1917, 1920, 1923,
+ 1928, 1932, 1937, 1939, 1941, 1946, 1948, 1953, 1955, 1957,
+ 1962, 1967, 1972, 1977, 1983, 1989, 1995, 2000, 2003, 2007,
+ 2010, 2015, 2019, 2024, 2028, 2033, 2039, 2046, 2047, 2054,
+ 2055, 2063, 2069, 2075, 2081, 2087, 2093, 2099, 2105, 2111,
+ 2118, 2125, 2132, 2139, 2146, 2153, 2160, 2167, 2174, 2181,
+ 2188, 2195, 2202, 2209, 2216, 2223, 2227, 2231, 2234, 2237,
+ 2239, 2241, 2244, 2248, 2252, 2256, 2260, 2263, 2266, 2269,
+ 2273, 2280, 2284, 2288, 2291, 2294, 2298, 2303, 2305, 2307,
+ 2312, 2314, 2319, 2321, 2323, 2328, 2333, 2339, 2345, 2351,
+ 2356, 2361, 2368, 2369, 2371, 2375, 2379, 2383, 2384, 2386,
+ 2388, 2390, 2394, 2395, 2398, 2400, 2403, 2407, 2411, 2415,
+ 2419, 2422, 2426, 2433, 2437, 2441, 2444, 2447, 2449, 2453,
+ 2458, 2463, 2468, 2474, 2480, 2486, 2491, 2495, 2496, 2499,
+ 2500, 2503, 2504, 2508, 2511, 2513, 2515, 2517, 2519, 2523,
+ 2525, 2527, 2529, 2533, 2537, 2541, 2543, 2547, 2551, 2555,
+ 2557, 2559, 2564, 2567, 2571, 2575, 2577, 2581, 2583, 2587,
+ 2589, 2591, 2592, 2594, 2596, 2598, 2600, 2602, 2604, 2606,
+ 2608, 2610, 2612, 2614, 2616, 2618, 2620, 2623, 2625, 2627,
+ 2629, 2631, 2633, 2635, 2637, 2639, 2641, 2643, 2645, 2647,
+ 2649, 2651, 2653, 2655, 2657, 2659, 2661, 2663, 2665, 2667,
+ 2669, 2671, 2673, 2675, 2677, 2679, 2681, 2683, 2685, 2687,
+ 2689, 2691, 2693, 2695, 2697, 2699, 2701, 2703, 2705, 2707,
+ 2709, 2711, 2713, 2715, 2717, 2719, 2721, 2723, 2725, 2727,
+ 2729, 2731, 2733, 2735, 2737, 2739, 2741, 2743, 2745, 2747
};
-static const short yyrhs[] = { 222,
- 0, 223, 0, 222, 223, 212, 0, 222, 223, 0,
- 223, 212, 0, 238, 0, 225, 0, 240, 0, 241,
- 0, 247, 0, 269, 0, 273, 0, 279, 0, 282,
- 0, 224, 0, 362, 0, 292, 0, 300, 0, 281,
- 0, 291, 0, 226, 0, 321, 0, 368, 0, 301,
- 0, 305, 0, 312, 0, 350, 0, 351, 0, 376,
- 0, 323, 0, 322, 0, 331, 0, 334, 0, 333,
- 0, 329, 0, 338, 0, 311, 0, 369, 0, 341,
- 0, 352, 0, 354, 0, 355, 0, 356, 0, 361,
- 0, 363, 0, 233, 0, 236, 0, 237, 0, 25,
- 113, 472, 227, 228, 229, 231, 232, 0, 6, 113,
- 472, 227, 228, 229, 231, 232, 0, 41, 113, 472,
- 0, 120, 189, 472, 0, 0, 190, 0, 191, 0,
- 0, 192, 0, 193, 0, 0, 230, 218, 472, 0,
- 472, 0, 56, 53, 230, 0, 0, 194, 195, 197,
- 0, 0, 99, 474, 106, 234, 0, 99, 474, 203,
- 234, 0, 99, 102, 123, 235, 0, 99, 72, 360,
- 0, 471, 0, 36, 0, 471, 0, 36, 0, 68,
- 0, 177, 474, 0, 177, 102, 123, 0, 170, 474,
- 0, 170, 102, 123, 0, 6, 101, 458, 392, 239,
- 0, 4, 340, 250, 0, 4, 219, 248, 220, 0,
- 41, 340, 474, 0, 6, 340, 474, 99, 36, 256,
- 0, 6, 340, 474, 41, 36, 0, 4, 258, 0,
- 20, 457, 0, 137, 244, 458, 245, 242, 243, 246,
- 0, 106, 0, 50, 0, 471, 0, 180, 0, 181,
- 0, 134, 0, 0, 120, 165, 0, 0, 114, 140,
- 471, 0, 0, 25, 101, 458, 219, 248, 220, 267,
- 268, 0, 248, 218, 249, 0, 249, 0, 0, 250,
- 0, 257, 0, 474, 409, 251, 0, 474, 175, 0,
- 252, 0, 0, 252, 253, 0, 253, 0, 24, 464,
- 254, 0, 254, 0, 19, 219, 260, 220, 0, 36,
- 256, 0, 77, 79, 0, 111, 0, 89, 63, 0,
- 93, 474, 372, 263, 264, 0, 255, 218, 256, 0,
- 256, 0, 468, 0, 79, 0, 207, 256, 0, 256,
- 206, 256, 0, 256, 207, 256, 0, 256, 209, 256,
- 0, 256, 208, 256, 0, 256, 203, 256, 0, 256,
- 204, 256, 0, 256, 205, 256, 0, 211, 256, 0,
- 212, 256, 0, 210, 256, 0, 256, 217, 409, 0,
- 16, 219, 256, 9, 409, 220, 0, 219, 256, 220,
- 0, 465, 219, 220, 0, 465, 219, 255, 220, 0,
- 256, 198, 256, 0, 198, 256, 0, 256, 198, 0,
- 28, 0, 29, 0, 29, 219, 470, 220, 0, 30,
- 0, 30, 219, 470, 220, 0, 31, 0, 113, 0,
- 24, 464, 258, 0, 258, 0, 19, 219, 260, 220,
- 0, 111, 219, 373, 220, 0, 89, 63, 219, 373,
- 220, 0, 49, 63, 219, 373, 220, 93, 474, 372,
- 263, 264, 0, 259, 218, 260, 0, 260, 0, 468,
- 0, 79, 0, 474, 0, 207, 260, 0, 260, 206,
- 260, 0, 260, 207, 260, 0, 260, 209, 260, 0,
- 260, 208, 260, 0, 260, 203, 260, 0, 260, 204,
- 260, 0, 260, 205, 260, 0, 211, 260, 0, 212,
- 260, 0, 210, 260, 0, 260, 217, 409, 0, 16,
- 219, 260, 9, 409, 220, 0, 219, 260, 220, 0,
- 465, 219, 220, 0, 465, 219, 259, 220, 0, 260,
- 198, 260, 0, 260, 67, 260, 0, 260, 77, 67,
- 260, 0, 260, 7, 260, 0, 260, 83, 260, 0,
- 77, 260, 0, 198, 260, 0, 260, 198, 0, 260,
- 152, 0, 260, 61, 79, 0, 260, 164, 0, 260,
- 61, 77, 79, 0, 260, 61, 126, 0, 260, 61,
- 124, 0, 260, 61, 77, 126, 0, 260, 61, 77,
- 124, 0, 260, 56, 219, 261, 220, 0, 260, 77,
- 56, 219, 261, 220, 0, 260, 12, 262, 7, 262,
- 0, 260, 77, 12, 262, 7, 262, 0, 261, 218,
- 262, 0, 262, 0, 468, 0, 69, 51, 0, 69,
- 86, 0, 0, 265, 265, 0, 265, 0, 0, 81,
- 37, 266, 0, 81, 112, 266, 0, 76, 3, 0,
- 15, 0, 99, 36, 0, 99, 79, 0, 150, 219,
- 393, 220, 0, 0, 188, 203, 162, 0, 0, 25,
- 101, 458, 270, 9, 380, 0, 219, 271, 220, 0,
- 0, 271, 218, 272, 0, 272, 0, 474, 0, 25,
- 174, 458, 274, 0, 274, 275, 0, 0, 135, 278,
- 0, 138, 0, 148, 278, 0, 158, 278, 0, 159,
- 278, 0, 178, 278, 0, 277, 0, 278, 0, 201,
- 0, 207, 201, 0, 470, 0, 207, 470, 0, 25,
- 280, 167, 64, 471, 147, 295, 153, 471, 0, 182,
- 0, 0, 41, 167, 64, 471, 0, 25, 125, 464,
- 283, 284, 81, 458, 286, 43, 91, 464, 219, 289,
- 220, 0, 133, 0, 129, 0, 285, 0, 285, 83,
- 285, 0, 285, 83, 285, 83, 285, 0, 58, 0,
- 37, 0, 112, 0, 48, 287, 288, 0, 142, 0,
- 0, 172, 0, 179, 0, 290, 0, 289, 218, 290,
- 0, 0, 199, 0, 201, 0, 471, 0, 196, 0,
- 41, 125, 464, 81, 458, 0, 25, 294, 293, 0,
- 295, 296, 0, 166, 0, 127, 0, 130, 0, 91,
- 0, 62, 0, 474, 0, 336, 0, 198, 0, 219,
- 297, 220, 0, 298, 0, 297, 218, 298, 0, 295,
- 203, 299, 0, 295, 0, 36, 203, 299, 0, 474,
- 0, 335, 0, 276, 0, 471, 0, 176, 474, 0,
- 41, 101, 393, 0, 41, 174, 393, 0, 46, 302,
- 303, 304, 0, 160, 302, 303, 304, 0, 145, 0,
- 132, 0, 0, 470, 0, 5, 0, 0, 56, 464,
- 0, 0, 52, 306, 81, 393, 106, 309, 310, 0,
- 5, 90, 0, 5, 0, 307, 0, 308, 0, 307,
- 218, 308, 0, 98, 0, 58, 0, 112, 0, 37,
- 0, 173, 0, 92, 0, 53, 474, 0, 474, 0,
- 120, 52, 82, 0, 0, 94, 306, 81, 393, 50,
- 309, 0, 25, 313, 149, 463, 81, 458, 314, 219,
- 315, 220, 324, 0, 111, 0, 0, 114, 460, 0,
- 0, 316, 0, 317, 0, 316, 218, 318, 0, 318,
- 0, 465, 219, 394, 220, 319, 320, 0, 461, 319,
- 320, 0, 211, 409, 0, 48, 409, 0, 0, 462,
- 0, 114, 462, 0, 0, 144, 149, 463, 405, 0,
- 43, 168, 467, 0, 25, 146, 465, 325, 171, 327,
- 324, 9, 471, 64, 471, 0, 120, 296, 0, 0,
- 219, 326, 220, 0, 219, 220, 0, 473, 0, 326,
- 218, 473, 0, 328, 473, 0, 176, 0, 0, 41,
- 330, 464, 0, 127, 0, 149, 0, 173, 0, 118,
- 0, 41, 130, 464, 332, 0, 464, 0, 208, 0,
- 41, 146, 465, 325, 0, 41, 166, 335, 219, 337,
- 220, 0, 198, 0, 336, 0, 206, 0, 207, 0,
- 208, 0, 209, 0, 204, 0, 205, 0, 203, 0,
- 464, 0, 464, 218, 464, 0, 162, 218, 464, 0,
- 464, 218, 162, 0, 6, 101, 458, 392, 169, 340,
- 339, 106, 464, 0, 464, 0, 0, 22, 0, 0,
- 0, 25, 173, 464, 9, 342, 81, 347, 106, 346,
- 405, 141, 348, 343, 0, 163, 0, 369, 0, 215,
- 344, 216, 0, 219, 344, 220, 0, 345, 0, 369,
- 0, 345, 369, 212, 0, 345, 369, 0, 369, 212,
- 0, 458, 214, 461, 0, 458, 0, 98, 0, 112,
- 0, 37, 0, 58, 0, 151, 0, 0, 78, 458,
- 0, 154, 458, 0, 187, 458, 0, 128, 353, 0,
- 11, 353, 0, 23, 353, 0, 42, 353, 0, 96,
- 353, 0, 121, 0, 108, 0, 0, 25, 118, 464,
- 9, 379, 0, 155, 466, 0, 25, 139, 459, 120,
- 357, 358, 0, 25, 139, 459, 0, 157, 203, 359,
- 0, 0, 186, 203, 360, 0, 0, 471, 0, 36,
- 0, 0, 471, 0, 36, 0, 0, 41, 139, 459,
- 0, 136, 463, 81, 458, 0, 183, 364, 365, 0,
- 183, 364, 365, 458, 366, 0, 184, 0, 0, 131,
- 0, 0, 219, 367, 220, 0, 0, 464, 0, 367,
- 218, 464, 0, 143, 364, 369, 0, 379, 0, 378,
- 0, 377, 0, 370, 0, 349, 0, 375, 0, 58,
- 60, 458, 372, 371, 0, 115, 219, 455, 220, 0,
- 98, 387, 455, 397, 405, 395, 396, 381, 0, 219,
- 373, 220, 0, 0, 373, 218, 374, 0, 374, 0,
- 474, 437, 0, 37, 50, 458, 405, 0, 156, 385,
- 458, 0, 112, 458, 99, 453, 397, 405, 0, 35,
- 464, 244, 32, 48, 98, 387, 455, 397, 405, 395,
- 396, 381, 388, 0, 98, 387, 455, 384, 397, 405,
- 395, 396, 381, 388, 0, 98, 387, 455, 397, 405,
- 395, 396, 381, 0, 110, 386, 382, 0, 0, 382,
- 110, 386, 383, 0, 383, 0, 98, 387, 455, 397,
- 405, 395, 396, 0, 60, 385, 458, 0, 0, 101,
- 0, 0, 5, 0, 0, 39, 0, 39, 81, 474,
- 0, 5, 0, 0, 84, 14, 389, 0, 0, 390,
- 0, 389, 218, 390, 0, 433, 391, 0, 114, 198,
- 0, 114, 204, 0, 114, 205, 0, 10, 0, 38,
- 0, 0, 208, 0, 0, 394, 0, 464, 0, 394,
- 218, 464, 0, 53, 14, 438, 0, 0, 54, 433,
- 0, 0, 50, 219, 406, 400, 62, 406, 402, 220,
- 0, 50, 398, 0, 0, 398, 218, 399, 0, 399,
- 26, 62, 399, 0, 399, 0, 406, 9, 475, 0,
- 406, 474, 0, 406, 0, 74, 400, 0, 51, 401,
- 0, 66, 401, 0, 95, 401, 0, 85, 0, 57,
- 0, 110, 0, 0, 85, 0, 0, 81, 219, 433,
- 220, 0, 114, 219, 403, 220, 0, 0, 404, 0,
- 403, 218, 404, 0, 474, 0, 474, 214, 474, 0,
- 470, 0, 119, 433, 0, 0, 458, 0, 458, 208,
- 0, 215, 216, 408, 0, 215, 470, 216, 408, 0,
- 0, 215, 216, 408, 0, 215, 470, 216, 408, 0,
- 0, 410, 407, 0, 418, 0, 176, 410, 0, 411,
- 0, 423, 0, 413, 0, 412, 0, 196, 0, 127,
- 0, 47, 415, 0, 40, 88, 0, 34, 417, 0,
- 80, 416, 0, 47, 0, 40, 88, 0, 34, 0,
- 80, 0, 219, 470, 220, 0, 0, 219, 470, 218,
- 470, 220, 0, 219, 470, 220, 0, 0, 219, 470,
- 218, 470, 220, 0, 219, 470, 220, 0, 0, 419,
- 219, 470, 220, 0, 419, 0, 18, 420, 421, 422,
- 0, 17, 420, 0, 116, 0, 73, 18, 420, 0,
- 75, 420, 0, 117, 0, 0, 18, 99, 474, 0,
- 0, 21, 474, 0, 0, 424, 0, 103, 425, 0,
- 102, 0, 59, 426, 0, 122, 0, 71, 0, 33,
- 0, 55, 0, 70, 0, 97, 0, 120, 102, 123,
- 0, 0, 424, 0, 122, 106, 71, 0, 33, 106,
- 55, 0, 33, 106, 70, 0, 33, 106, 97, 0,
- 55, 106, 70, 0, 55, 106, 97, 0, 70, 106,
- 97, 0, 0, 433, 0, 79, 0, 219, 429, 220,
- 56, 219, 380, 220, 0, 219, 429, 220, 77, 56,
- 219, 380, 220, 0, 219, 429, 220, 431, 432, 219,
- 380, 220, 0, 219, 429, 220, 431, 219, 380, 220,
- 0, 219, 429, 220, 431, 219, 429, 220, 0, 430,
- 218, 433, 0, 430, 218, 433, 0, 433, 0, 198,
- 0, 204, 0, 203, 0, 205, 0, 206, 0, 207,
- 0, 208, 0, 209, 0, 8, 0, 5, 0, 451,
- 437, 0, 428, 0, 468, 0, 474, 0, 207, 433,
- 0, 433, 206, 433, 0, 433, 207, 433, 0, 433,
- 209, 433, 0, 433, 208, 433, 0, 433, 204, 433,
- 0, 433, 205, 433, 0, 433, 203, 433, 0, 211,
- 433, 0, 212, 433, 0, 210, 433, 0, 433, 217,
- 409, 0, 16, 219, 433, 9, 409, 220, 0, 219,
- 427, 220, 0, 433, 198, 433, 0, 433, 67, 433,
- 0, 433, 77, 67, 433, 0, 198, 433, 0, 433,
- 198, 0, 465, 219, 208, 220, 0, 465, 219, 220,
- 0, 465, 219, 438, 220, 0, 28, 0, 29, 0,
- 29, 219, 470, 220, 0, 30, 0, 30, 219, 470,
- 220, 0, 31, 0, 113, 0, 44, 219, 380, 220,
- 0, 45, 219, 439, 220, 0, 87, 219, 441, 220,
- 0, 100, 219, 443, 220, 0, 109, 219, 13, 446,
- 220, 0, 109, 219, 65, 446, 220, 0, 109, 219,
- 107, 446, 220, 0, 109, 219, 446, 220, 0, 433,
- 152, 0, 433, 61, 79, 0, 433, 164, 0, 433,
- 61, 77, 79, 0, 433, 61, 126, 0, 433, 61,
- 77, 124, 0, 433, 61, 124, 0, 433, 61, 77,
- 126, 0, 433, 12, 436, 7, 436, 0, 433, 77,
- 12, 436, 7, 436, 0, 0, 433, 56, 434, 219,
- 447, 220, 0, 0, 433, 77, 56, 435, 219, 449,
- 220, 0, 433, 198, 219, 380, 220, 0, 433, 206,
- 219, 380, 220, 0, 433, 207, 219, 380, 220, 0,
- 433, 209, 219, 380, 220, 0, 433, 208, 219, 380,
- 220, 0, 433, 204, 219, 380, 220, 0, 433, 205,
- 219, 380, 220, 0, 433, 203, 219, 380, 220, 0,
- 433, 198, 8, 219, 380, 220, 0, 433, 206, 8,
- 219, 380, 220, 0, 433, 207, 8, 219, 380, 220,
- 0, 433, 209, 8, 219, 380, 220, 0, 433, 208,
- 8, 219, 380, 220, 0, 433, 204, 8, 219, 380,
- 220, 0, 433, 205, 8, 219, 380, 220, 0, 433,
- 203, 8, 219, 380, 220, 0, 433, 198, 5, 219,
- 380, 220, 0, 433, 206, 5, 219, 380, 220, 0,
- 433, 207, 5, 219, 380, 220, 0, 433, 209, 5,
- 219, 380, 220, 0, 433, 208, 5, 219, 380, 220,
- 0, 433, 204, 5, 219, 380, 220, 0, 433, 205,
- 5, 219, 380, 220, 0, 433, 203, 5, 219, 380,
- 220, 0, 433, 7, 433, 0, 433, 83, 433, 0,
- 77, 433, 0, 451, 437, 0, 468, 0, 474, 0,
- 207, 436, 0, 436, 206, 436, 0, 436, 207, 436,
- 0, 436, 209, 436, 0, 436, 208, 436, 0, 211,
- 436, 0, 212, 436, 0, 210, 436, 0, 436, 217,
- 409, 0, 16, 219, 436, 9, 409, 220, 0, 219,
- 433, 220, 0, 436, 198, 436, 0, 198, 436, 0,
- 436, 198, 0, 465, 219, 220, 0, 465, 219, 438,
- 220, 0, 28, 0, 29, 0, 29, 219, 470, 220,
- 0, 30, 0, 30, 219, 470, 220, 0, 31, 0,
- 113, 0, 87, 219, 441, 220, 0, 100, 219, 443,
- 220, 0, 109, 219, 13, 446, 220, 0, 109, 219,
- 65, 446, 220, 0, 109, 219, 107, 446, 220, 0,
- 109, 219, 446, 220, 0, 215, 433, 216, 437, 0,
- 215, 433, 211, 433, 216, 437, 0, 0, 427, 0,
- 438, 218, 427, 0, 438, 114, 433, 0, 440, 50,
- 433, 0, 0, 424, 0, 104, 0, 105, 0, 442,
- 56, 442, 0, 0, 451, 437, 0, 468, 0, 207,
- 442, 0, 442, 206, 442, 0, 442, 207, 442, 0,
- 442, 209, 442, 0, 442, 208, 442, 0, 210, 442,
- 0, 442, 217, 409, 0, 16, 219, 442, 9, 409,
- 220, 0, 219, 442, 220, 0, 442, 198, 442, 0,
- 198, 442, 0, 442, 198, 0, 474, 0, 465, 219,
- 220, 0, 465, 219, 438, 220, 0, 87, 219, 441,
- 220, 0, 100, 219, 443, 220, 0, 109, 219, 13,
- 446, 220, 0, 109, 219, 65, 446, 220, 0, 109,
- 219, 107, 446, 220, 0, 109, 219, 446, 220, 0,
- 438, 444, 445, 0, 0, 50, 438, 0, 0, 48,
- 438, 0, 0, 433, 50, 438, 0, 50, 438, 0,
- 438, 0, 380, 0, 448, 0, 468, 0, 448, 218,
- 468, 0, 380, 0, 450, 0, 468, 0, 450, 218,
- 468, 0, 458, 214, 452, 0, 469, 214, 452, 0,
- 461, 0, 452, 214, 461, 0, 452, 214, 208, 0,
- 453, 218, 454, 0, 454, 0, 208, 0, 474, 437,
- 203, 427, 0, 451, 437, 0, 458, 214, 208, 0,
- 455, 218, 456, 0, 456, 0, 427, 9, 475, 0,
- 427, 0, 458, 214, 208, 0, 208, 0, 474, 0,
- 0, 476, 0, 474, 0, 474, 0, 196, 0, 474,
- 0, 196, 0, 474, 0, 474, 0, 474, 0, 471,
- 0, 196, 0, 470, 0, 201, 0, 471, 0, 409,
- 471, 0, 469, 0, 126, 0, 124, 0, 200, 0,
- 199, 0, 197, 0, 196, 0, 474, 0, 414, 0,
- 419, 0, 196, 0, 424, 0, 3, 0, 135, 0,
- 138, 0, 139, 0, 140, 0, 40, 0, 142, 0,
- 186, 0, 146, 0, 148, 0, 149, 0, 63, 0,
- 64, 0, 157, 0, 69, 0, 158, 0, 159, 0,
- 166, 0, 82, 0, 189, 0, 90, 0, 168, 0,
- 172, 0, 175, 0, 178, 0, 179, 0, 102, 0,
- 104, 0, 105, 0, 125, 0, 127, 0, 194, 0,
- 185, 0, 123, 0, 474, 0, 188, 0, 136, 0,
- 24, 0, 26, 0, 49, 0, 53, 0, 155, 0,
- 84, 0, 87, 0, 88, 0, 101, 0, 108, 0,
- 126, 0, 124, 0, 27, 0, 161, 0
+static const short yyrhs[] = {222,
+ 0, 223, 0, 222, 223, 212, 0, 222, 223, 0,
+ 223, 212, 0, 238, 0, 225, 0, 240, 0, 241,
+ 0, 247, 0, 269, 0, 273, 0, 279, 0, 282,
+ 0, 224, 0, 362, 0, 292, 0, 300, 0, 281,
+ 0, 291, 0, 226, 0, 321, 0, 368, 0, 301,
+ 0, 305, 0, 312, 0, 350, 0, 351, 0, 376,
+ 0, 323, 0, 322, 0, 331, 0, 334, 0, 333,
+ 0, 329, 0, 338, 0, 311, 0, 369, 0, 341,
+ 0, 352, 0, 354, 0, 355, 0, 356, 0, 361,
+ 0, 363, 0, 233, 0, 236, 0, 237, 0, 25,
+ 113, 472, 227, 228, 229, 231, 232, 0, 6, 113,
+ 472, 227, 228, 229, 231, 232, 0, 41, 113, 472,
+ 0, 120, 189, 472, 0, 0, 190, 0, 191, 0,
+ 0, 192, 0, 193, 0, 0, 230, 218, 472, 0,
+ 472, 0, 56, 53, 230, 0, 0, 194, 195, 197,
+ 0, 0, 99, 474, 106, 234, 0, 99, 474, 203,
+ 234, 0, 99, 102, 123, 235, 0, 99, 72, 360,
+ 0, 471, 0, 36, 0, 471, 0, 36, 0, 68,
+ 0, 177, 474, 0, 177, 102, 123, 0, 170, 474,
+ 0, 170, 102, 123, 0, 6, 101, 458, 392, 239,
+ 0, 4, 340, 250, 0, 4, 219, 248, 220, 0,
+ 41, 340, 474, 0, 6, 340, 474, 99, 36, 256,
+ 0, 6, 340, 474, 41, 36, 0, 4, 258, 0,
+ 20, 457, 0, 137, 244, 458, 245, 242, 243, 246,
+ 0, 106, 0, 50, 0, 471, 0, 180, 0, 181,
+ 0, 134, 0, 0, 120, 165, 0, 0, 114, 140,
+ 471, 0, 0, 25, 101, 458, 219, 248, 220, 267,
+ 268, 0, 248, 218, 249, 0, 249, 0, 0, 250,
+ 0, 257, 0, 474, 409, 251, 0, 474, 175, 0,
+ 252, 0, 0, 252, 253, 0, 253, 0, 24, 464,
+ 254, 0, 254, 0, 19, 219, 260, 220, 0, 36,
+ 256, 0, 77, 79, 0, 111, 0, 89, 63, 0,
+ 93, 474, 372, 263, 264, 0, 255, 218, 256, 0,
+ 256, 0, 468, 0, 79, 0, 207, 256, 0, 256,
+ 206, 256, 0, 256, 207, 256, 0, 256, 209, 256,
+ 0, 256, 208, 256, 0, 256, 203, 256, 0, 256,
+ 204, 256, 0, 256, 205, 256, 0, 211, 256, 0,
+ 212, 256, 0, 210, 256, 0, 256, 217, 409, 0,
+ 16, 219, 256, 9, 409, 220, 0, 219, 256, 220,
+ 0, 465, 219, 220, 0, 465, 219, 255, 220, 0,
+ 256, 198, 256, 0, 198, 256, 0, 256, 198, 0,
+ 28, 0, 29, 0, 29, 219, 470, 220, 0, 30,
+ 0, 30, 219, 470, 220, 0, 31, 0, 113, 0,
+ 24, 464, 258, 0, 258, 0, 19, 219, 260, 220,
+ 0, 111, 219, 373, 220, 0, 89, 63, 219, 373,
+ 220, 0, 49, 63, 219, 373, 220, 93, 474, 372,
+ 263, 264, 0, 259, 218, 260, 0, 260, 0, 468,
+ 0, 79, 0, 474, 0, 207, 260, 0, 260, 206,
+ 260, 0, 260, 207, 260, 0, 260, 209, 260, 0,
+ 260, 208, 260, 0, 260, 203, 260, 0, 260, 204,
+ 260, 0, 260, 205, 260, 0, 211, 260, 0, 212,
+ 260, 0, 210, 260, 0, 260, 217, 409, 0, 16,
+ 219, 260, 9, 409, 220, 0, 219, 260, 220, 0,
+ 465, 219, 220, 0, 465, 219, 259, 220, 0, 260,
+ 198, 260, 0, 260, 67, 260, 0, 260, 77, 67,
+ 260, 0, 260, 7, 260, 0, 260, 83, 260, 0,
+ 77, 260, 0, 198, 260, 0, 260, 198, 0, 260,
+ 152, 0, 260, 61, 79, 0, 260, 164, 0, 260,
+ 61, 77, 79, 0, 260, 61, 126, 0, 260, 61,
+ 124, 0, 260, 61, 77, 126, 0, 260, 61, 77,
+ 124, 0, 260, 56, 219, 261, 220, 0, 260, 77,
+ 56, 219, 261, 220, 0, 260, 12, 262, 7, 262,
+ 0, 260, 77, 12, 262, 7, 262, 0, 261, 218,
+ 262, 0, 262, 0, 468, 0, 69, 51, 0, 69,
+ 86, 0, 0, 265, 265, 0, 265, 0, 0, 81,
+ 37, 266, 0, 81, 112, 266, 0, 76, 3, 0,
+ 15, 0, 99, 36, 0, 99, 79, 0, 150, 219,
+ 393, 220, 0, 0, 188, 203, 162, 0, 0, 25,
+ 101, 458, 270, 9, 380, 0, 219, 271, 220, 0,
+ 0, 271, 218, 272, 0, 272, 0, 474, 0, 25,
+ 174, 458, 274, 0, 274, 275, 0, 0, 135, 278,
+ 0, 138, 0, 148, 278, 0, 158, 278, 0, 159,
+ 278, 0, 178, 278, 0, 277, 0, 278, 0, 201,
+ 0, 207, 201, 0, 470, 0, 207, 470, 0, 25,
+ 280, 167, 64, 471, 147, 295, 153, 471, 0, 182,
+ 0, 0, 41, 167, 64, 471, 0, 25, 125, 464,
+ 283, 284, 81, 458, 286, 43, 91, 464, 219, 289,
+ 220, 0, 133, 0, 129, 0, 285, 0, 285, 83,
+ 285, 0, 285, 83, 285, 83, 285, 0, 58, 0,
+ 37, 0, 112, 0, 48, 287, 288, 0, 142, 0,
+ 0, 172, 0, 179, 0, 290, 0, 289, 218, 290,
+ 0, 0, 199, 0, 201, 0, 471, 0, 196, 0,
+ 41, 125, 464, 81, 458, 0, 25, 294, 293, 0,
+ 295, 296, 0, 166, 0, 127, 0, 130, 0, 91,
+ 0, 62, 0, 474, 0, 336, 0, 198, 0, 219,
+ 297, 220, 0, 298, 0, 297, 218, 298, 0, 295,
+ 203, 299, 0, 295, 0, 36, 203, 299, 0, 474,
+ 0, 335, 0, 276, 0, 471, 0, 176, 474, 0,
+ 41, 101, 393, 0, 41, 174, 393, 0, 46, 302,
+ 303, 304, 0, 160, 302, 303, 304, 0, 145, 0,
+ 132, 0, 0, 470, 0, 5, 0, 0, 56, 464,
+ 0, 0, 52, 306, 81, 393, 106, 309, 310, 0,
+ 5, 90, 0, 5, 0, 307, 0, 308, 0, 307,
+ 218, 308, 0, 98, 0, 58, 0, 112, 0, 37,
+ 0, 173, 0, 92, 0, 53, 474, 0, 474, 0,
+ 120, 52, 82, 0, 0, 94, 306, 81, 393, 50,
+ 309, 0, 25, 313, 149, 463, 81, 458, 314, 219,
+ 315, 220, 324, 0, 111, 0, 0, 114, 460, 0,
+ 0, 316, 0, 317, 0, 316, 218, 318, 0, 318,
+ 0, 465, 219, 394, 220, 319, 320, 0, 461, 319,
+ 320, 0, 211, 409, 0, 48, 409, 0, 0, 462,
+ 0, 114, 462, 0, 0, 144, 149, 463, 405, 0,
+ 43, 168, 467, 0, 25, 146, 465, 325, 171, 327,
+ 324, 9, 471, 64, 471, 0, 120, 296, 0, 0,
+ 219, 326, 220, 0, 219, 220, 0, 473, 0, 326,
+ 218, 473, 0, 328, 473, 0, 176, 0, 0, 41,
+ 330, 464, 0, 127, 0, 149, 0, 173, 0, 118,
+ 0, 41, 130, 464, 332, 0, 464, 0, 208, 0,
+ 41, 146, 465, 325, 0, 41, 166, 335, 219, 337,
+ 220, 0, 198, 0, 336, 0, 206, 0, 207, 0,
+ 208, 0, 209, 0, 204, 0, 205, 0, 203, 0,
+ 464, 0, 464, 218, 464, 0, 162, 218, 464, 0,
+ 464, 218, 162, 0, 6, 101, 458, 392, 169, 340,
+ 339, 106, 464, 0, 464, 0, 0, 22, 0, 0,
+ 0, 25, 173, 464, 9, 342, 81, 347, 106, 346,
+ 405, 141, 348, 343, 0, 163, 0, 369, 0, 215,
+ 344, 216, 0, 219, 344, 220, 0, 345, 0, 369,
+ 0, 345, 369, 212, 0, 345, 369, 0, 369, 212,
+ 0, 458, 214, 461, 0, 458, 0, 98, 0, 112,
+ 0, 37, 0, 58, 0, 151, 0, 0, 78, 458,
+ 0, 154, 458, 0, 187, 458, 0, 128, 353, 0,
+ 11, 353, 0, 23, 353, 0, 42, 353, 0, 96,
+ 353, 0, 121, 0, 108, 0, 0, 25, 118, 464,
+ 9, 379, 0, 155, 466, 0, 25, 139, 459, 120,
+ 357, 358, 0, 25, 139, 459, 0, 157, 203, 359,
+ 0, 0, 186, 203, 360, 0, 0, 471, 0, 36,
+ 0, 0, 471, 0, 36, 0, 0, 41, 139, 459,
+ 0, 136, 463, 81, 458, 0, 183, 364, 365, 0,
+ 183, 364, 365, 458, 366, 0, 184, 0, 0, 131,
+ 0, 0, 219, 367, 220, 0, 0, 464, 0, 367,
+ 218, 464, 0, 143, 364, 369, 0, 379, 0, 378,
+ 0, 377, 0, 370, 0, 349, 0, 375, 0, 58,
+ 60, 458, 372, 371, 0, 115, 219, 455, 220, 0,
+ 98, 387, 455, 397, 405, 395, 396, 381, 0, 219,
+ 373, 220, 0, 0, 373, 218, 374, 0, 374, 0,
+ 474, 437, 0, 37, 50, 458, 405, 0, 156, 385,
+ 458, 0, 112, 458, 99, 453, 397, 405, 0, 35,
+ 464, 244, 32, 48, 98, 387, 455, 397, 405, 395,
+ 396, 381, 388, 0, 98, 387, 455, 384, 397, 405,
+ 395, 396, 381, 388, 0, 98, 387, 455, 397, 405,
+ 395, 396, 381, 0, 110, 386, 382, 0, 0, 382,
+ 110, 386, 383, 0, 383, 0, 98, 387, 455, 397,
+ 405, 395, 396, 0, 60, 385, 458, 0, 0, 101,
+ 0, 0, 5, 0, 0, 39, 0, 39, 81, 474,
+ 0, 5, 0, 0, 84, 14, 389, 0, 0, 390,
+ 0, 389, 218, 390, 0, 433, 391, 0, 114, 198,
+ 0, 114, 204, 0, 114, 205, 0, 10, 0, 38,
+ 0, 0, 208, 0, 0, 394, 0, 464, 0, 394,
+ 218, 464, 0, 53, 14, 438, 0, 0, 54, 433,
+ 0, 0, 50, 219, 406, 400, 62, 406, 402, 220,
+ 0, 50, 398, 0, 0, 398, 218, 399, 0, 399,
+ 26, 62, 399, 0, 399, 0, 406, 9, 475, 0,
+ 406, 474, 0, 406, 0, 74, 400, 0, 51, 401,
+ 0, 66, 401, 0, 95, 401, 0, 85, 0, 57,
+ 0, 110, 0, 0, 85, 0, 0, 81, 219, 433,
+ 220, 0, 114, 219, 403, 220, 0, 0, 404, 0,
+ 403, 218, 404, 0, 474, 0, 474, 214, 474, 0,
+ 470, 0, 119, 433, 0, 0, 458, 0, 458, 208,
+ 0, 215, 216, 408, 0, 215, 470, 216, 408, 0,
+ 0, 215, 216, 408, 0, 215, 470, 216, 408, 0,
+ 0, 410, 407, 0, 418, 0, 176, 410, 0, 411,
+ 0, 423, 0, 413, 0, 412, 0, 196, 0, 127,
+ 0, 47, 415, 0, 40, 88, 0, 34, 417, 0,
+ 80, 416, 0, 47, 0, 40, 88, 0, 34, 0,
+ 80, 0, 219, 470, 220, 0, 0, 219, 470, 218,
+ 470, 220, 0, 219, 470, 220, 0, 0, 219, 470,
+ 218, 470, 220, 0, 219, 470, 220, 0, 0, 419,
+ 219, 470, 220, 0, 419, 0, 18, 420, 421, 422,
+ 0, 17, 420, 0, 116, 0, 73, 18, 420, 0,
+ 75, 420, 0, 117, 0, 0, 18, 99, 474, 0,
+ 0, 21, 474, 0, 0, 424, 0, 103, 425, 0,
+ 102, 0, 59, 426, 0, 122, 0, 71, 0, 33,
+ 0, 55, 0, 70, 0, 97, 0, 120, 102, 123,
+ 0, 0, 424, 0, 122, 106, 71, 0, 33, 106,
+ 55, 0, 33, 106, 70, 0, 33, 106, 97, 0,
+ 55, 106, 70, 0, 55, 106, 97, 0, 70, 106,
+ 97, 0, 0, 433, 0, 79, 0, 219, 429, 220,
+ 56, 219, 380, 220, 0, 219, 429, 220, 77, 56,
+ 219, 380, 220, 0, 219, 429, 220, 431, 432, 219,
+ 380, 220, 0, 219, 429, 220, 431, 219, 380, 220,
+ 0, 219, 429, 220, 431, 219, 429, 220, 0, 430,
+ 218, 433, 0, 430, 218, 433, 0, 433, 0, 198,
+ 0, 204, 0, 203, 0, 205, 0, 206, 0, 207,
+ 0, 208, 0, 209, 0, 8, 0, 5, 0, 451,
+ 437, 0, 428, 0, 468, 0, 474, 0, 207, 433,
+ 0, 433, 206, 433, 0, 433, 207, 433, 0, 433,
+ 209, 433, 0, 433, 208, 433, 0, 433, 204, 433,
+ 0, 433, 205, 433, 0, 433, 203, 433, 0, 211,
+ 433, 0, 212, 433, 0, 210, 433, 0, 433, 217,
+ 409, 0, 16, 219, 433, 9, 409, 220, 0, 219,
+ 427, 220, 0, 433, 198, 433, 0, 433, 67, 433,
+ 0, 433, 77, 67, 433, 0, 198, 433, 0, 433,
+ 198, 0, 465, 219, 208, 220, 0, 465, 219, 220,
+ 0, 465, 219, 438, 220, 0, 28, 0, 29, 0,
+ 29, 219, 470, 220, 0, 30, 0, 30, 219, 470,
+ 220, 0, 31, 0, 113, 0, 44, 219, 380, 220,
+ 0, 45, 219, 439, 220, 0, 87, 219, 441, 220,
+ 0, 100, 219, 443, 220, 0, 109, 219, 13, 446,
+ 220, 0, 109, 219, 65, 446, 220, 0, 109, 219,
+ 107, 446, 220, 0, 109, 219, 446, 220, 0, 433,
+ 152, 0, 433, 61, 79, 0, 433, 164, 0, 433,
+ 61, 77, 79, 0, 433, 61, 126, 0, 433, 61,
+ 77, 124, 0, 433, 61, 124, 0, 433, 61, 77,
+ 126, 0, 433, 12, 436, 7, 436, 0, 433, 77,
+ 12, 436, 7, 436, 0, 0, 433, 56, 434, 219,
+ 447, 220, 0, 0, 433, 77, 56, 435, 219, 449,
+ 220, 0, 433, 198, 219, 380, 220, 0, 433, 206,
+ 219, 380, 220, 0, 433, 207, 219, 380, 220, 0,
+ 433, 209, 219, 380, 220, 0, 433, 208, 219, 380,
+ 220, 0, 433, 204, 219, 380, 220, 0, 433, 205,
+ 219, 380, 220, 0, 433, 203, 219, 380, 220, 0,
+ 433, 198, 8, 219, 380, 220, 0, 433, 206, 8,
+ 219, 380, 220, 0, 433, 207, 8, 219, 380, 220,
+ 0, 433, 209, 8, 219, 380, 220, 0, 433, 208,
+ 8, 219, 380, 220, 0, 433, 204, 8, 219, 380,
+ 220, 0, 433, 205, 8, 219, 380, 220, 0, 433,
+ 203, 8, 219, 380, 220, 0, 433, 198, 5, 219,
+ 380, 220, 0, 433, 206, 5, 219, 380, 220, 0,
+ 433, 207, 5, 219, 380, 220, 0, 433, 209, 5,
+ 219, 380, 220, 0, 433, 208, 5, 219, 380, 220,
+ 0, 433, 204, 5, 219, 380, 220, 0, 433, 205,
+ 5, 219, 380, 220, 0, 433, 203, 5, 219, 380,
+ 220, 0, 433, 7, 433, 0, 433, 83, 433, 0,
+ 77, 433, 0, 451, 437, 0, 468, 0, 474, 0,
+ 207, 436, 0, 436, 206, 436, 0, 436, 207, 436,
+ 0, 436, 209, 436, 0, 436, 208, 436, 0, 211,
+ 436, 0, 212, 436, 0, 210, 436, 0, 436, 217,
+ 409, 0, 16, 219, 436, 9, 409, 220, 0, 219,
+ 433, 220, 0, 436, 198, 436, 0, 198, 436, 0,
+ 436, 198, 0, 465, 219, 220, 0, 465, 219, 438,
+ 220, 0, 28, 0, 29, 0, 29, 219, 470, 220,
+ 0, 30, 0, 30, 219, 470, 220, 0, 31, 0,
+ 113, 0, 87, 219, 441, 220, 0, 100, 219, 443,
+ 220, 0, 109, 219, 13, 446, 220, 0, 109, 219,
+ 65, 446, 220, 0, 109, 219, 107, 446, 220, 0,
+ 109, 219, 446, 220, 0, 215, 433, 216, 437, 0,
+ 215, 433, 211, 433, 216, 437, 0, 0, 427, 0,
+ 438, 218, 427, 0, 438, 114, 433, 0, 440, 50,
+ 433, 0, 0, 424, 0, 104, 0, 105, 0, 442,
+ 56, 442, 0, 0, 451, 437, 0, 468, 0, 207,
+ 442, 0, 442, 206, 442, 0, 442, 207, 442, 0,
+ 442, 209, 442, 0, 442, 208, 442, 0, 210, 442,
+ 0, 442, 217, 409, 0, 16, 219, 442, 9, 409,
+ 220, 0, 219, 442, 220, 0, 442, 198, 442, 0,
+ 198, 442, 0, 442, 198, 0, 474, 0, 465, 219,
+ 220, 0, 465, 219, 438, 220, 0, 87, 219, 441,
+ 220, 0, 100, 219, 443, 220, 0, 109, 219, 13,
+ 446, 220, 0, 109, 219, 65, 446, 220, 0, 109,
+ 219, 107, 446, 220, 0, 109, 219, 446, 220, 0,
+ 438, 444, 445, 0, 0, 50, 438, 0, 0, 48,
+ 438, 0, 0, 433, 50, 438, 0, 50, 438, 0,
+ 438, 0, 380, 0, 448, 0, 468, 0, 448, 218,
+ 468, 0, 380, 0, 450, 0, 468, 0, 450, 218,
+ 468, 0, 458, 214, 452, 0, 469, 214, 452, 0,
+ 461, 0, 452, 214, 461, 0, 452, 214, 208, 0,
+ 453, 218, 454, 0, 454, 0, 208, 0, 474, 437,
+ 203, 427, 0, 451, 437, 0, 458, 214, 208, 0,
+ 455, 218, 456, 0, 456, 0, 427, 9, 475, 0,
+ 427, 0, 458, 214, 208, 0, 208, 0, 474, 0,
+ 0, 476, 0, 474, 0, 474, 0, 196, 0, 474,
+ 0, 196, 0, 474, 0, 474, 0, 474, 0, 471,
+ 0, 196, 0, 470, 0, 201, 0, 471, 0, 409,
+ 471, 0, 469, 0, 126, 0, 124, 0, 200, 0,
+ 199, 0, 197, 0, 196, 0, 474, 0, 414, 0,
+ 419, 0, 196, 0, 424, 0, 3, 0, 135, 0,
+ 138, 0, 139, 0, 140, 0, 40, 0, 142, 0,
+ 186, 0, 146, 0, 148, 0, 149, 0, 63, 0,
+ 64, 0, 157, 0, 69, 0, 158, 0, 159, 0,
+ 166, 0, 82, 0, 189, 0, 90, 0, 168, 0,
+ 172, 0, 175, 0, 178, 0, 179, 0, 102, 0,
+ 104, 0, 105, 0, 125, 0, 127, 0, 194, 0,
+ 185, 0, 123, 0, 474, 0, 188, 0, 136, 0,
+ 24, 0, 26, 0, 49, 0, 53, 0, 155, 0,
+ 84, 0, 87, 0, 88, 0, 101, 0, 108, 0,
+ 126, 0, 124, 0, 27, 0, 161, 0
};
#endif
#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 345, 347, 351, 353, 355, 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, 411, 432,
- 453, 461, 462, 465, 471, 477, 480, 486, 492, 495,
- 499, 505, 506, 509, 510, 522, 529, 536, 543, 556,
- 557, 560, 561, 562, 565, 571, 579, 585, 601, 611,
- 615, 623, 625, 627, 629, 641, 658, 671, 673, 682,
- 683, 684, 687, 688, 691, 692, 698, 699, 710, 722,
- 729, 736, 739, 740, 743, 753, 768, 769, 772, 779,
- 788, 795, 799, 808, 817, 826, 835, 844, 851, 856,
- 862, 864, 866, 868, 870, 872, 874, 876, 878, 880,
- 882, 884, 886, 888, 893, 898, 900, 905, 911, 917,
- 919, 922, 924, 926, 932, 934, 940, 942, 950, 956,
- 960, 968, 977, 986, 993, 998, 1004, 1006, 1008, 1012,
- 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032,
- 1034, 1039, 1044, 1046, 1051, 1057, 1059, 1061, 1063, 1065,
- 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085,
- 1087, 1089, 1096, 1103, 1110, 1119, 1124, 1130, 1134, 1135,
- 1136, 1139, 1140, 1141, 1144, 1145, 1148, 1149, 1150, 1151,
- 1154, 1155, 1162, 1163, 1166, 1176, 1177, 1180, 1181, 1184,
- 1204, 1213, 1215, 1218, 1224, 1230, 1236, 1242, 1248, 1256,
- 1257, 1259, 1263, 1270, 1274, 1289, 1301, 1302, 1304, 1320,
- 1336, 1337, 1340, 1345, 1350, 1358, 1359, 1360, 1363, 1369,
- 1370, 1373, 1374, 1377, 1379, 1381, 1385, 1391, 1397, 1398,
- 1401, 1418, 1425, 1433, 1434, 1435, 1438, 1439, 1440, 1441,
- 1442, 1445, 1448, 1449, 1452, 1458, 1464, 1472, 1473, 1474,
- 1475, 1476, 1495, 1502, 1519, 1528, 1539, 1540, 1541, 1544,
- 1547, 1548, 1551, 1552, 1563, 1569, 1573, 1577, 1583, 1587,
- 1593, 1597, 1601, 1605, 1609, 1615, 1619, 1623, 1629, 1633,
- 1644, 1661, 1678, 1679, 1682, 1683, 1686, 1687, 1690, 1691,
- 1694, 1704, 1714, 1715, 1716, 1725, 1726, 1727, 1738, 1755,
- 1784, 1797, 1798, 1801, 1802, 1805, 1807, 1811, 1821, 1822,
- 1842, 1851, 1852, 1853, 1854, 1858, 1867, 1868, 1872, 1882,
- 1891, 1891, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1902,
- 1906, 1908, 1910, 1923, 1935, 1936, 1939, 1940, 1953, 1955,
- 1969, 1970, 1971, 1972, 1975, 1977, 1981, 1983, 1985, 1989,
- 1997, 2008, 2009, 2010, 2011, 2014, 2015, 2027, 2035, 2043,
- 2065, 2071, 2077, 2083, 2089, 2097, 2098, 2099, 2110, 2131,
- 2147, 2171, 2185, 2186, 2189, 2190, 2193, 2194, 2195, 2198,
- 2199, 2200, 2210, 2226, 2243, 2252, 2265, 2266, 2269, 2270,
- 2273, 2274, 2277, 2279, 2291, 2312, 2313, 2314, 2315, 2316,
- 2317, 2328, 2336, 2347, 2363, 2364, 2367, 2370, 2374, 2391,
- 2406, 2431, 2452, 2493, 2512, 2529, 2535, 2539, 2545, 2549,
- 2565, 2566, 2569, 2570, 2573, 2574, 2577, 2578, 2579, 2580,
- 2583, 2584, 2587, 2588, 2591, 2599, 2600, 2601, 2602, 2603,
- 2604, 2614, 2615, 2618, 2620, 2622, 2626, 2627, 2630, 2634,
- 2646, 2651, 2652, 2655, 2657, 2659, 2663, 2669, 2675, 2683,
- 2684, 2686, 2688, 2690, 2692, 2694, 2696, 2700, 2701, 2704,
- 2705, 2706, 2709, 2710, 2713, 2728, 2735, 2744, 2745, 2748,
- 2755, 2763, 2765, 2767, 2771, 2773, 2775, 2790, 2812, 2813,
- 2820, 2821, 2822, 2825, 2833, 2834, 2843, 2849, 2854, 2860,
- 2868, 2870, 2872, 2874, 2878, 2889, 2895, 2902, 2907, 2913,
- 2921, 2927, 2940, 2967, 2986, 3006, 3007, 3008, 3009, 3012,
- 3013, 3016, 3017, 3020, 3021, 3024, 3030, 3037, 3043, 3051,
- 3052, 3053, 3054, 3055, 3056, 3059, 3060, 3063, 3064, 3065,
- 3066, 3067, 3068, 3069, 3070, 3071, 3081, 3083, 3100, 3110,
- 3120, 3133, 3146, 3152, 3158, 3162, 3168, 3169, 3170, 3171,
- 3172, 3173, 3174, 3175, 3178, 3179, 3190, 3195, 3197, 3199,
- 3207, 3209, 3211, 3213, 3215, 3217, 3219, 3221, 3223, 3225,
- 3227, 3229, 3245, 3261, 3263, 3265, 3267, 3269, 3271, 3273,
- 3285, 3292, 3299, 3314, 3329, 3351, 3366, 3388, 3395, 3402,
- 3412, 3419, 3426, 3434, 3441, 3448, 3455, 3462, 3464, 3466,
- 3468, 3475, 3485, 3495, 3505, 3515, 3521, 3527, 3527, 3541,
- 3541, 3555, 3565, 3575, 3585, 3595, 3605, 3615, 3625, 3635,
- 3645, 3655, 3665, 3675, 3685, 3695, 3705, 3715, 3725, 3735,
- 3745, 3755, 3765, 3775, 3785, 3795, 3797, 3799, 3809, 3814,
- 3816, 3824, 3826, 3828, 3830, 3832, 3834, 3836, 3838, 3840,
- 3856, 3872, 3874, 3876, 3878, 3880, 3887, 3894, 3909, 3924,
- 3946, 3961, 3983, 3990, 3997, 4004, 4012, 4019, 4026, 4033,
- 4042, 4049, 4056, 4060, 4062, 4064, 4068, 4075, 4079, 4080,
- 4081, 4084, 4086, 4090, 4095, 4097, 4099, 4101, 4103, 4105,
- 4107, 4109, 4125, 4141, 4143, 4145, 4147, 4149, 4157, 4164,
- 4171, 4178, 4186, 4193, 4200, 4207, 4216, 4220, 4224, 4226,
- 4235, 4237, 4241, 4243, 4245, 4249, 4255, 4259, 4261, 4267,
- 4273, 4277, 4279, 4285, 4293, 4303, 4305, 4307, 4318, 4320,
- 4322, 4337, 4344, 4351, 4370, 4372, 4377, 4384, 4391, 4403,
- 4417, 4418, 4421, 4426, 4438, 4439, 4440, 4441, 4442, 4448,
- 4449, 4451, 4452, 4457, 4464, 4471, 4478, 4486, 4488, 4498,
- 4510, 4517, 4518, 4519, 4526, 4528, 4530, 4541, 4542, 4543,
- 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553,
- 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563,
- 4564, 4565, 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573,
- 4574, 4575, 4576, 4589, 4590, 4591, 4592, 4593, 4594, 4595,
- 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4606, 4613
+static const short yyrline[] = {0,
+ 345, 347, 351, 353, 355, 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, 411, 432,
+ 453, 461, 462, 465, 471, 477, 480, 486, 492, 495,
+ 499, 505, 506, 509, 510, 522, 529, 536, 543, 556,
+ 557, 560, 561, 562, 565, 571, 579, 585, 601, 611,
+ 615, 623, 625, 627, 629, 641, 658, 671, 673, 682,
+ 683, 684, 687, 688, 691, 692, 698, 699, 710, 722,
+ 729, 736, 739, 740, 743, 753, 768, 769, 772, 779,
+ 788, 795, 799, 808, 817, 826, 835, 844, 851, 856,
+ 862, 864, 866, 868, 870, 872, 874, 876, 878, 880,
+ 882, 884, 886, 888, 893, 898, 900, 905, 911, 917,
+ 919, 922, 924, 926, 932, 934, 940, 942, 950, 956,
+ 960, 968, 977, 986, 993, 998, 1004, 1006, 1008, 1012,
+ 1014, 1016, 1018, 1020, 1022, 1024, 1026, 1028, 1030, 1032,
+ 1034, 1039, 1044, 1046, 1051, 1057, 1059, 1061, 1063, 1065,
+ 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1081, 1083, 1085,
+ 1087, 1089, 1096, 1103, 1110, 1119, 1124, 1130, 1134, 1135,
+ 1136, 1139, 1140, 1141, 1144, 1145, 1148, 1149, 1150, 1151,
+ 1154, 1155, 1162, 1163, 1166, 1176, 1177, 1180, 1181, 1184,
+ 1204, 1213, 1215, 1218, 1224, 1230, 1236, 1242, 1248, 1256,
+ 1257, 1259, 1263, 1270, 1274, 1289, 1301, 1302, 1304, 1320,
+ 1336, 1337, 1340, 1345, 1350, 1358, 1359, 1360, 1363, 1369,
+ 1370, 1373, 1374, 1377, 1379, 1381, 1385, 1391, 1397, 1398,
+ 1401, 1418, 1425, 1433, 1434, 1435, 1438, 1439, 1440, 1441,
+ 1442, 1445, 1448, 1449, 1452, 1458, 1464, 1472, 1473, 1474,
+ 1475, 1476, 1495, 1502, 1519, 1528, 1539, 1540, 1541, 1544,
+ 1547, 1548, 1551, 1552, 1563, 1569, 1573, 1577, 1583, 1587,
+ 1593, 1597, 1601, 1605, 1609, 1615, 1619, 1623, 1629, 1633,
+ 1644, 1661, 1678, 1679, 1682, 1683, 1686, 1687, 1690, 1691,
+ 1694, 1704, 1714, 1715, 1716, 1725, 1726, 1727, 1738, 1755,
+ 1784, 1797, 1798, 1801, 1802, 1805, 1807, 1811, 1821, 1822,
+ 1842, 1851, 1852, 1853, 1854, 1858, 1867, 1868, 1872, 1882,
+ 1891, 1891, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 1902,
+ 1906, 1908, 1910, 1923, 1935, 1936, 1939, 1940, 1953, 1955,
+ 1969, 1970, 1971, 1972, 1975, 1977, 1981, 1983, 1985, 1989,
+ 1997, 2008, 2009, 2010, 2011, 2014, 2015, 2027, 2035, 2043,
+ 2065, 2071, 2077, 2083, 2089, 2097, 2098, 2099, 2110, 2131,
+ 2147, 2171, 2185, 2186, 2189, 2190, 2193, 2194, 2195, 2198,
+ 2199, 2200, 2210, 2226, 2243, 2252, 2265, 2266, 2269, 2270,
+ 2273, 2274, 2277, 2279, 2291, 2312, 2313, 2314, 2315, 2316,
+ 2317, 2328, 2336, 2347, 2363, 2364, 2367, 2370, 2374, 2391,
+ 2406, 2431, 2452, 2493, 2512, 2529, 2535, 2539, 2545, 2549,
+ 2565, 2566, 2569, 2570, 2573, 2574, 2577, 2578, 2579, 2580,
+ 2583, 2584, 2587, 2588, 2591, 2599, 2600, 2601, 2602, 2603,
+ 2604, 2614, 2615, 2618, 2620, 2622, 2626, 2627, 2630, 2634,
+ 2646, 2651, 2652, 2655, 2657, 2659, 2663, 2669, 2675, 2683,
+ 2684, 2686, 2688, 2690, 2692, 2694, 2696, 2700, 2701, 2704,
+ 2705, 2706, 2709, 2710, 2713, 2728, 2735, 2744, 2745, 2748,
+ 2755, 2763, 2765, 2767, 2771, 2773, 2775, 2790, 2812, 2813,
+ 2820, 2821, 2822, 2825, 2833, 2834, 2843, 2849, 2854, 2860,
+ 2868, 2870, 2872, 2874, 2878, 2889, 2895, 2902, 2907, 2913,
+ 2921, 2927, 2940, 2967, 2986, 3006, 3007, 3008, 3009, 3012,
+ 3013, 3016, 3017, 3020, 3021, 3024, 3030, 3037, 3043, 3051,
+ 3052, 3053, 3054, 3055, 3056, 3059, 3060, 3063, 3064, 3065,
+ 3066, 3067, 3068, 3069, 3070, 3071, 3081, 3083, 3100, 3110,
+ 3120, 3133, 3146, 3152, 3158, 3162, 3168, 3169, 3170, 3171,
+ 3172, 3173, 3174, 3175, 3178, 3179, 3190, 3195, 3197, 3199,
+ 3207, 3209, 3211, 3213, 3215, 3217, 3219, 3221, 3223, 3225,
+ 3227, 3229, 3245, 3261, 3263, 3265, 3267, 3269, 3271, 3273,
+ 3285, 3292, 3299, 3314, 3329, 3351, 3366, 3388, 3395, 3402,
+ 3412, 3419, 3426, 3434, 3441, 3448, 3455, 3462, 3464, 3466,
+ 3468, 3475, 3485, 3495, 3505, 3515, 3521, 3527, 3527, 3541,
+ 3541, 3555, 3565, 3575, 3585, 3595, 3605, 3615, 3625, 3635,
+ 3645, 3655, 3665, 3675, 3685, 3695, 3705, 3715, 3725, 3735,
+ 3745, 3755, 3765, 3775, 3785, 3795, 3797, 3799, 3809, 3814,
+ 3816, 3824, 3826, 3828, 3830, 3832, 3834, 3836, 3838, 3840,
+ 3856, 3872, 3874, 3876, 3878, 3880, 3887, 3894, 3909, 3924,
+ 3946, 3961, 3983, 3990, 3997, 4004, 4012, 4019, 4026, 4033,
+ 4042, 4049, 4056, 4060, 4062, 4064, 4068, 4075, 4079, 4080,
+ 4081, 4084, 4086, 4090, 4095, 4097, 4099, 4101, 4103, 4105,
+ 4107, 4109, 4125, 4141, 4143, 4145, 4147, 4149, 4157, 4164,
+ 4171, 4178, 4186, 4193, 4200, 4207, 4216, 4220, 4224, 4226,
+ 4235, 4237, 4241, 4243, 4245, 4249, 4255, 4259, 4261, 4267,
+ 4273, 4277, 4279, 4285, 4293, 4303, 4305, 4307, 4318, 4320,
+ 4322, 4337, 4344, 4351, 4370, 4372, 4377, 4384, 4391, 4403,
+ 4417, 4418, 4421, 4426, 4438, 4439, 4440, 4441, 4442, 4448,
+ 4449, 4451, 4452, 4457, 4464, 4471, 4478, 4486, 4488, 4498,
+ 4510, 4517, 4518, 4519, 4526, 4528, 4530, 4541, 4542, 4543,
+ 4544, 4545, 4546, 4547, 4548, 4549, 4550, 4551, 4552, 4553,
+ 4554, 4555, 4556, 4557, 4558, 4559, 4560, 4561, 4562, 4563,
+ 4564, 4565, 4566, 4567, 4568, 4569, 4570, 4571, 4572, 4573,
+ 4574, 4575, 4576, 4589, 4590, 4591, 4592, 4593, 4594, 4595,
+ 4596, 4597, 4598, 4599, 4600, 4601, 4602, 4603, 4606, 4613
};
+
#endif
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-static const char * const yytname[] = { "$","error","$undefined.","ACTION",
-"ADD","ALL","ALTER","AND","ANY","AS","ASC","BEGIN_TRANS","BETWEEN","BOTH","BY",
-"CASCADE","CAST","CHAR","CHARACTER","CHECK","CLOSE","COLLATE","COLUMN","COMMIT",
-"CONSTRAINT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP",
-"CURRENT_USER","CURSOR","DAY_P","DECIMAL","DECLARE","DEFAULT","DELETE","DESC",
-"DISTINCT","DOUBLE","DROP","END_TRANS","EXECUTE","EXISTS","EXTRACT","FETCH",
-"FLOAT","FOR","FOREIGN","FROM","FULL","GRANT","GROUP","HAVING","HOUR_P","IN",
-"INNER_P","INSERT","INTERVAL","INTO","IS","JOIN","KEY","LANGUAGE","LEADING",
-"LEFT","LIKE","LOCAL","MATCH","MINUTE_P","MONTH_P","NAMES","NATIONAL","NATURAL",
-"NCHAR","NO","NOT","NOTIFY","NULL_P","NUMERIC","ON","OPTION","OR","ORDER","OUTER_P",
-"PARTIAL","POSITION","PRECISION","PRIMARY","PRIVILEGES","PROCEDURE","PUBLIC",
-"REFERENCES","REVOKE","RIGHT","ROLLBACK","SECOND_P","SELECT","SET","SUBSTRING",
-"TABLE","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TRAILING",
-"TRANSACTION","TRIM","UNION","UNIQUE","UPDATE","USER","USING","VALUES","VARCHAR",
-"VARYING","VIEW","WHERE","WITH","WORK","YEAR_P","ZONE","FALSE_P","TRIGGER","TRUE_P",
-"TYPE_P","ABORT_TRANS","AFTER","AGGREGATE","ANALYZE","BACKWARD","BEFORE","BINARY",
-"CACHE","CLUSTER","COPY","CYCLE","DATABASE","DELIMITERS","DO","EACH","EXPLAIN",
-"EXTEND","FORWARD","FUNCTION","HANDLER","INCREMENT","INDEX","INHERITS","INSTEAD",
-"ISNULL","LANCOMPILER","LISTEN","LOAD","LOCK_P","LOCATION","MAXVALUE","MINVALUE",
-"MOVE","NEW","NONE","NOTHING","NOTNULL","OIDS","OPERATOR","PROCEDURAL","RECIPE",
-"RENAME","RESET","RETURNS","ROW","RULE","SEQUENCE","SERIAL","SETOF","SHOW","START",
-"STATEMENT","STDIN","STDOUT","TRUSTED","VACUUM","VERBOSE","VERSION","ENCODING",
-"UNLISTEN","ARCHIVE","PASSWORD","CREATEDB","NOCREATEDB","CREATEUSER","NOCREATEUSER",
-"VALID","UNTIL","IDENT","SCONST","Op","ICONST","PARAM","FCONST","OP","'='","'<'",
-"'>'","'+'","'-'","'*'","'/'","'|'","':'","';'","UMINUS","'.'","'['","']'","TYPECAST",
-"','","'('","')'","stmtblock","stmtmulti","stmt","CreateUserStmt","AlterUserStmt",
-"DropUserStmt","user_passwd_clause","user_createdb_clause","user_createuser_clause",
-"user_group_list","user_group_clause","user_valid_clause","VariableSetStmt",
-"var_value","zone_value","VariableShowStmt","VariableResetStmt","AddAttrStmt",
-"alter_clause","ClosePortalStmt","CopyStmt","copy_dirn","copy_file_name","opt_binary",
-"opt_with_copy","copy_delimiter","CreateStmt","OptTableElementList","OptTableElement",
-"columnDef","ColQualifier","ColQualList","ColConstraint","ColConstraintElem",
-"default_list","default_expr","TableConstraint","ConstraintElem","constraint_list",
-"constraint_expr","c_list","c_expr","key_match","key_actions","key_action","key_reference",
-"OptInherit","OptArchiveType","CreateAsStmt","OptCreateAs","CreateAsList","CreateAsElement",
-"CreateSeqStmt","OptSeqList","OptSeqElem","NumericOnly","FloatOnly","IntegerOnly",
-"CreatePLangStmt","PLangTrusted","DropPLangStmt","CreateTrigStmt","TriggerActionTime",
-"TriggerEvents","TriggerOneEvent","TriggerForSpec","TriggerForOpt","TriggerForType",
-"TriggerFuncArgs","TriggerFuncArg","DropTrigStmt","DefineStmt","def_rest","def_type",
-"def_name","definition","def_list","def_elem","def_arg","DestroyStmt","FetchStmt",
-"opt_direction","fetch_how_many","opt_portal_name","GrantStmt","privileges",
-"operation_commalist","operation","grantee","opt_with_grant","RevokeStmt","IndexStmt",
-"index_opt_unique","access_method_clause","index_params","index_list","func_index",
-"index_elem","opt_type","opt_class","ExtendStmt","RecipeStmt","ProcedureStmt",
-"opt_with","func_args","func_args_list","func_return","set_opt","RemoveStmt",
-"remove_type","RemoveAggrStmt","aggr_argtype","RemoveFuncStmt","RemoveOperStmt",
-"all_Op","MathOp","oper_argtypes","RenameStmt","opt_name","opt_column","RuleStmt",
-"@1","OptStmtList","OptStmtBlock","OptStmtMulti","event_object","event","opt_instead",
-"NotifyStmt","ListenStmt","UnlistenStmt","TransactionStmt","opt_trans","ViewStmt",
-"LoadStmt","CreatedbStmt","opt_database1","opt_database2","location","encoding",
-"DestroydbStmt","ClusterStmt","VacuumStmt","opt_verbose","opt_analyze","opt_va_list",
-"va_list","ExplainStmt","OptimizableStmt","InsertStmt","insert_rest","opt_column_list",
-"columnList","columnElem","DeleteStmt","LockStmt","UpdateStmt","CursorStmt",
-"SelectStmt","SubSelect","union_clause","select_list","SubUnion","result","opt_table",
-"opt_union","opt_unique","sort_clause","sortby_list","sortby","OptUseOp","opt_inh_star",
-"relation_name_list","name_list","group_clause","having_clause","from_clause",
-"from_list","from_val","join_expr","join_outer","join_spec","join_list","join_using",
-"where_clause","relation_expr","opt_array_bounds","nest_array_bounds","Typename",
-"Array","Generic","generic","Numeric","numeric","opt_float","opt_numeric","opt_decimal",
-"Character","character","opt_varying","opt_charset","opt_collate","Datetime",
-"datetime","opt_timezone","opt_interval","a_expr_or_null","row_expr","row_descriptor",
-"row_list","row_op","sub_type","a_expr","@2","@3","b_expr","opt_indirection",
-"expr_list","extract_list","extract_arg","position_list","position_expr","substr_list",
-"substr_from","substr_for","trim_list","in_expr","in_expr_nodes","not_in_expr",
-"not_in_expr_nodes","attr","attrs","res_target_list","res_target_el","res_target_list2",
-"res_target_el2","opt_id","relation_name","database_name","access_method","attr_name",
-"class","index_name","name","func_name","file_name","recipe_name","AexprConst",
-"ParamNo","Iconst","Sconst","UserId","TypeId","ColId","ColLabel","SpecialRuleRelation", NULL
+static const char *const yytname[] = {"$", "error", "$undefined.", "ACTION",
+ "ADD", "ALL", "ALTER", "AND", "ANY", "AS", "ASC", "BEGIN_TRANS", "BETWEEN", "BOTH", "BY",
+ "CASCADE", "CAST", "CHAR", "CHARACTER", "CHECK", "CLOSE", "COLLATE", "COLUMN", "COMMIT",
+ "CONSTRAINT", "CREATE", "CROSS", "CURRENT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP",
+ "CURRENT_USER", "CURSOR", "DAY_P", "DECIMAL", "DECLARE", "DEFAULT", "DELETE", "DESC",
+ "DISTINCT", "DOUBLE", "DROP", "END_TRANS", "EXECUTE", "EXISTS", "EXTRACT", "FETCH",
+ "FLOAT", "FOR", "FOREIGN", "FROM", "FULL", "GRANT", "GROUP", "HAVING", "HOUR_P", "IN",
+ "INNER_P", "INSERT", "INTERVAL", "INTO", "IS", "JOIN", "KEY", "LANGUAGE", "LEADING",
+ "LEFT", "LIKE", "LOCAL", "MATCH", "MINUTE_P", "MONTH_P", "NAMES", "NATIONAL", "NATURAL",
+ "NCHAR", "NO", "NOT", "NOTIFY", "NULL_P", "NUMERIC", "ON", "OPTION", "OR", "ORDER", "OUTER_P",
+ "PARTIAL", "POSITION", "PRECISION", "PRIMARY", "PRIVILEGES", "PROCEDURE", "PUBLIC",
+ "REFERENCES", "REVOKE", "RIGHT", "ROLLBACK", "SECOND_P", "SELECT", "SET", "SUBSTRING",
+ "TABLE", "TIME", "TIMESTAMP", "TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TO", "TRAILING",
+ "TRANSACTION", "TRIM", "UNION", "UNIQUE", "UPDATE", "USER", "USING", "VALUES", "VARCHAR",
+ "VARYING", "VIEW", "WHERE", "WITH", "WORK", "YEAR_P", "ZONE", "FALSE_P", "TRIGGER", "TRUE_P",
+ "TYPE_P", "ABORT_TRANS", "AFTER", "AGGREGATE", "ANALYZE", "BACKWARD", "BEFORE", "BINARY",
+ "CACHE", "CLUSTER", "COPY", "CYCLE", "DATABASE", "DELIMITERS", "DO", "EACH", "EXPLAIN",
+ "EXTEND", "FORWARD", "FUNCTION", "HANDLER", "INCREMENT", "INDEX", "INHERITS", "INSTEAD",
+ "ISNULL", "LANCOMPILER", "LISTEN", "LOAD", "LOCK_P", "LOCATION", "MAXVALUE", "MINVALUE",
+ "MOVE", "NEW", "NONE", "NOTHING", "NOTNULL", "OIDS", "OPERATOR", "PROCEDURAL", "RECIPE",
+ "RENAME", "RESET", "RETURNS", "ROW", "RULE", "SEQUENCE", "SERIAL", "SETOF", "SHOW", "START",
+ "STATEMENT", "STDIN", "STDOUT", "TRUSTED", "VACUUM", "VERBOSE", "VERSION", "ENCODING",
+ "UNLISTEN", "ARCHIVE", "PASSWORD", "CREATEDB", "NOCREATEDB", "CREATEUSER", "NOCREATEUSER",
+ "VALID", "UNTIL", "IDENT", "SCONST", "Op", "ICONST", "PARAM", "FCONST", "OP", "'='", "'<'",
+ "'>'", "'+'", "'-'", "'*'", "'/'", "'|'", "':'", "';'", "UMINUS", "'.'", "'['", "']'", "TYPECAST",
+ "','", "'('", "')'", "stmtblock", "stmtmulti", "stmt", "CreateUserStmt", "AlterUserStmt",
+ "DropUserStmt", "user_passwd_clause", "user_createdb_clause", "user_createuser_clause",
+ "user_group_list", "user_group_clause", "user_valid_clause", "VariableSetStmt",
+ "var_value", "zone_value", "VariableShowStmt", "VariableResetStmt", "AddAttrStmt",
+ "alter_clause", "ClosePortalStmt", "CopyStmt", "copy_dirn", "copy_file_name", "opt_binary",
+ "opt_with_copy", "copy_delimiter", "CreateStmt", "OptTableElementList", "OptTableElement",
+ "columnDef", "ColQualifier", "ColQualList", "ColConstraint", "ColConstraintElem",
+ "default_list", "default_expr", "TableConstraint", "ConstraintElem", "constraint_list",
+ "constraint_expr", "c_list", "c_expr", "key_match", "key_actions", "key_action", "key_reference",
+ "OptInherit", "OptArchiveType", "CreateAsStmt", "OptCreateAs", "CreateAsList", "CreateAsElement",
+ "CreateSeqStmt", "OptSeqList", "OptSeqElem", "NumericOnly", "FloatOnly", "IntegerOnly",
+ "CreatePLangStmt", "PLangTrusted", "DropPLangStmt", "CreateTrigStmt", "TriggerActionTime",
+ "TriggerEvents", "TriggerOneEvent", "TriggerForSpec", "TriggerForOpt", "TriggerForType",
+ "TriggerFuncArgs", "TriggerFuncArg", "DropTrigStmt", "DefineStmt", "def_rest", "def_type",
+ "def_name", "definition", "def_list", "def_elem", "def_arg", "DestroyStmt", "FetchStmt",
+ "opt_direction", "fetch_how_many", "opt_portal_name", "GrantStmt", "privileges",
+ "operation_commalist", "operation", "grantee", "opt_with_grant", "RevokeStmt", "IndexStmt",
+ "index_opt_unique", "access_method_clause", "index_params", "index_list", "func_index",
+ "index_elem", "opt_type", "opt_class", "ExtendStmt", "RecipeStmt", "ProcedureStmt",
+ "opt_with", "func_args", "func_args_list", "func_return", "set_opt", "RemoveStmt",
+ "remove_type", "RemoveAggrStmt", "aggr_argtype", "RemoveFuncStmt", "RemoveOperStmt",
+ "all_Op", "MathOp", "oper_argtypes", "RenameStmt", "opt_name", "opt_column", "RuleStmt",
+ "@1", "OptStmtList", "OptStmtBlock", "OptStmtMulti", "event_object", "event", "opt_instead",
+ "NotifyStmt", "ListenStmt", "UnlistenStmt", "TransactionStmt", "opt_trans", "ViewStmt",
+ "LoadStmt", "CreatedbStmt", "opt_database1", "opt_database2", "location", "encoding",
+ "DestroydbStmt", "ClusterStmt", "VacuumStmt", "opt_verbose", "opt_analyze", "opt_va_list",
+ "va_list", "ExplainStmt", "OptimizableStmt", "InsertStmt", "insert_rest", "opt_column_list",
+ "columnList", "columnElem", "DeleteStmt", "LockStmt", "UpdateStmt", "CursorStmt",
+ "SelectStmt", "SubSelect", "union_clause", "select_list", "SubUnion", "result", "opt_table",
+ "opt_union", "opt_unique", "sort_clause", "sortby_list", "sortby", "OptUseOp", "opt_inh_star",
+ "relation_name_list", "name_list", "group_clause", "having_clause", "from_clause",
+ "from_list", "from_val", "join_expr", "join_outer", "join_spec", "join_list", "join_using",
+ "where_clause", "relation_expr", "opt_array_bounds", "nest_array_bounds", "Typename",
+ "Array", "Generic", "generic", "Numeric", "numeric", "opt_float", "opt_numeric", "opt_decimal",
+ "Character", "character", "opt_varying", "opt_charset", "opt_collate", "Datetime",
+ "datetime", "opt_timezone", "opt_interval", "a_expr_or_null", "row_expr", "row_descriptor",
+ "row_list", "row_op", "sub_type", "a_expr", "@2", "@3", "b_expr", "opt_indirection",
+ "expr_list", "extract_list", "extract_arg", "position_list", "position_expr", "substr_list",
+ "substr_from", "substr_for", "trim_list", "in_expr", "in_expr_nodes", "not_in_expr",
+ "not_in_expr_nodes", "attr", "attrs", "res_target_list", "res_target_el", "res_target_list2",
+ "res_target_el2", "opt_id", "relation_name", "database_name", "access_method", "attr_name",
+ "class", "index_name", "name", "func_name", "file_name", "recipe_name", "AexprConst",
+ "ParamNo", "Iconst", "Sconst", "UserId", "TypeId", "ColId", "ColLabel", "SpecialRuleRelation", NULL
};
+
#endif
-static const short yyr1[] = { 0,
- 221, 221, 222, 222, 222, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
- 223, 223, 223, 223, 223, 223, 223, 223, 224, 225,
- 226, 227, 227, 228, 228, 228, 229, 229, 229, 230,
- 230, 231, 231, 232, 232, 233, 233, 233, 233, 234,
- 234, 235, 235, 235, 236, 236, 237, 237, 238, 239,
- 239, 239, 239, 239, 239, 240, 241, 242, 242, 243,
- 243, 243, 244, 244, 245, 245, 246, 246, 247, 248,
- 248, 248, 249, 249, 250, 250, 251, 251, 252, 252,
- 253, 253, 254, 254, 254, 254, 254, 254, 255, 255,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
- 256, 256, 256, 256, 256, 256, 256, 256, 257, 257,
- 258, 258, 258, 258, 259, 259, 260, 260, 260, 260,
- 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
- 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
- 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
- 260, 260, 260, 260, 260, 261, 261, 262, 263, 263,
- 263, 264, 264, 264, 265, 265, 266, 266, 266, 266,
- 267, 267, 268, 268, 269, 270, 270, 271, 271, 272,
- 273, 274, 274, 275, 275, 275, 275, 275, 275, 276,
- 276, 277, 277, 278, 278, 279, 280, 280, 281, 282,
- 283, 283, 284, 284, 284, 285, 285, 285, 286, 287,
- 287, 288, 288, 289, 289, 289, 290, 290, 290, 290,
- 291, 292, 293, 294, 294, 294, 295, 295, 295, 295,
- 295, 296, 297, 297, 298, 298, 298, 299, 299, 299,
- 299, 299, 300, 300, 301, 301, 302, 302, 302, 303,
- 303, 303, 304, 304, 305, 306, 306, 306, 307, 307,
- 308, 308, 308, 308, 308, 309, 309, 309, 310, 310,
- 311, 312, 313, 313, 314, 314, 315, 315, 316, 316,
- 317, 318, 319, 319, 319, 320, 320, 320, 321, 322,
- 323, 324, 324, 325, 325, 326, 326, 327, 328, 328,
- 329, 330, 330, 330, 330, 331, 332, 332, 333, 334,
- 335, 335, 336, 336, 336, 336, 336, 336, 336, 337,
- 337, 337, 337, 338, 339, 339, 340, 340, 342, 341,
- 343, 343, 343, 343, 344, 344, 345, 345, 345, 346,
- 346, 347, 347, 347, 347, 348, 348, 349, 350, 351,
- 352, 352, 352, 352, 352, 353, 353, 353, 354, 355,
- 356, 356, 357, 357, 358, 358, 359, 359, 359, 360,
- 360, 360, 361, 362, 363, 363, 364, 364, 365, 365,
- 366, 366, 367, 367, 368, 369, 369, 369, 369, 369,
- 369, 370, 371, 371, 372, 372, 373, 373, 374, 375,
- 376, 377, 378, 379, 380, 381, 381, 382, 382, 383,
- 384, 384, 385, 385, 386, 386, 387, 387, 387, 387,
- 388, 388, 389, 389, 390, 391, 391, 391, 391, 391,
- 391, 392, 392, 393, 394, 394, 395, 395, 396, 396,
- 397, 397, 397, 398, 398, 398, 399, 399, 399, 400,
- 400, 400, 400, 400, 400, 400, 400, 401, 401, 402,
- 402, 402, 403, 403, 404, 404, 404, 405, 405, 406,
- 406, 407, 407, 407, 408, 408, 408, 409, 409, 409,
- 410, 410, 410, 411, 412, 412, 413, 413, 413, 413,
- 414, 414, 414, 414, 415, 415, 416, 416, 416, 417,
- 417, 417, 418, 418, 419, 419, 419, 419, 419, 420,
- 420, 421, 421, 422, 422, 423, 423, 423, 423, 424,
- 424, 424, 424, 424, 424, 425, 425, 426, 426, 426,
- 426, 426, 426, 426, 426, 426, 427, 427, 428, 428,
- 428, 428, 428, 429, 430, 430, 431, 431, 431, 431,
- 431, 431, 431, 431, 432, 432, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 434, 433, 435,
- 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
- 433, 433, 433, 433, 433, 433, 433, 433, 436, 436,
- 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
- 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
- 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
- 437, 437, 437, 438, 438, 438, 439, 439, 440, 440,
- 440, 441, 441, 442, 442, 442, 442, 442, 442, 442,
- 442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
- 442, 442, 442, 442, 442, 442, 443, 443, 444, 444,
- 445, 445, 446, 446, 446, 447, 447, 448, 448, 449,
- 449, 450, 450, 451, 451, 452, 452, 452, 453, 453,
- 453, 454, 454, 454, 455, 455, 456, 456, 456, 456,
- 457, 457, 458, 458, 459, 460, 461, 462, 463, 464,
- 465, 466, 467, 468, 468, 468, 468, 468, 468, 468,
- 469, 470, 471, 472, 473, 473, 473, 474, 474, 474,
- 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
- 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
- 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
- 474, 474, 474, 475, 475, 475, 475, 475, 475, 475,
- 475, 475, 475, 475, 475, 475, 475, 475, 476, 476
+static const short yyr1[] = {0,
+ 221, 221, 222, 222, 222, 223, 223, 223, 223, 223,
+ 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
+ 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
+ 223, 223, 223, 223, 223, 223, 223, 223, 223, 223,
+ 223, 223, 223, 223, 223, 223, 223, 223, 224, 225,
+ 226, 227, 227, 228, 228, 228, 229, 229, 229, 230,
+ 230, 231, 231, 232, 232, 233, 233, 233, 233, 234,
+ 234, 235, 235, 235, 236, 236, 237, 237, 238, 239,
+ 239, 239, 239, 239, 239, 240, 241, 242, 242, 243,
+ 243, 243, 244, 244, 245, 245, 246, 246, 247, 248,
+ 248, 248, 249, 249, 250, 250, 251, 251, 252, 252,
+ 253, 253, 254, 254, 254, 254, 254, 254, 255, 255,
+ 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
+ 256, 256, 256, 256, 256, 256, 256, 256, 256, 256,
+ 256, 256, 256, 256, 256, 256, 256, 256, 257, 257,
+ 258, 258, 258, 258, 259, 259, 260, 260, 260, 260,
+ 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
+ 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
+ 260, 260, 260, 260, 260, 260, 260, 260, 260, 260,
+ 260, 260, 260, 260, 260, 261, 261, 262, 263, 263,
+ 263, 264, 264, 264, 265, 265, 266, 266, 266, 266,
+ 267, 267, 268, 268, 269, 270, 270, 271, 271, 272,
+ 273, 274, 274, 275, 275, 275, 275, 275, 275, 276,
+ 276, 277, 277, 278, 278, 279, 280, 280, 281, 282,
+ 283, 283, 284, 284, 284, 285, 285, 285, 286, 287,
+ 287, 288, 288, 289, 289, 289, 290, 290, 290, 290,
+ 291, 292, 293, 294, 294, 294, 295, 295, 295, 295,
+ 295, 296, 297, 297, 298, 298, 298, 299, 299, 299,
+ 299, 299, 300, 300, 301, 301, 302, 302, 302, 303,
+ 303, 303, 304, 304, 305, 306, 306, 306, 307, 307,
+ 308, 308, 308, 308, 308, 309, 309, 309, 310, 310,
+ 311, 312, 313, 313, 314, 314, 315, 315, 316, 316,
+ 317, 318, 319, 319, 319, 320, 320, 320, 321, 322,
+ 323, 324, 324, 325, 325, 326, 326, 327, 328, 328,
+ 329, 330, 330, 330, 330, 331, 332, 332, 333, 334,
+ 335, 335, 336, 336, 336, 336, 336, 336, 336, 337,
+ 337, 337, 337, 338, 339, 339, 340, 340, 342, 341,
+ 343, 343, 343, 343, 344, 344, 345, 345, 345, 346,
+ 346, 347, 347, 347, 347, 348, 348, 349, 350, 351,
+ 352, 352, 352, 352, 352, 353, 353, 353, 354, 355,
+ 356, 356, 357, 357, 358, 358, 359, 359, 359, 360,
+ 360, 360, 361, 362, 363, 363, 364, 364, 365, 365,
+ 366, 366, 367, 367, 368, 369, 369, 369, 369, 369,
+ 369, 370, 371, 371, 372, 372, 373, 373, 374, 375,
+ 376, 377, 378, 379, 380, 381, 381, 382, 382, 383,
+ 384, 384, 385, 385, 386, 386, 387, 387, 387, 387,
+ 388, 388, 389, 389, 390, 391, 391, 391, 391, 391,
+ 391, 392, 392, 393, 394, 394, 395, 395, 396, 396,
+ 397, 397, 397, 398, 398, 398, 399, 399, 399, 400,
+ 400, 400, 400, 400, 400, 400, 400, 401, 401, 402,
+ 402, 402, 403, 403, 404, 404, 404, 405, 405, 406,
+ 406, 407, 407, 407, 408, 408, 408, 409, 409, 409,
+ 410, 410, 410, 411, 412, 412, 413, 413, 413, 413,
+ 414, 414, 414, 414, 415, 415, 416, 416, 416, 417,
+ 417, 417, 418, 418, 419, 419, 419, 419, 419, 420,
+ 420, 421, 421, 422, 422, 423, 423, 423, 423, 424,
+ 424, 424, 424, 424, 424, 425, 425, 426, 426, 426,
+ 426, 426, 426, 426, 426, 426, 427, 427, 428, 428,
+ 428, 428, 428, 429, 430, 430, 431, 431, 431, 431,
+ 431, 431, 431, 431, 432, 432, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 434, 433, 435,
+ 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 433, 433, 433,
+ 433, 433, 433, 433, 433, 433, 433, 433, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 436, 436, 436, 436, 436, 436, 436, 436, 436, 436,
+ 437, 437, 437, 438, 438, 438, 439, 439, 440, 440,
+ 440, 441, 441, 442, 442, 442, 442, 442, 442, 442,
+ 442, 442, 442, 442, 442, 442, 442, 442, 442, 442,
+ 442, 442, 442, 442, 442, 442, 443, 443, 444, 444,
+ 445, 445, 446, 446, 446, 447, 447, 448, 448, 449,
+ 449, 450, 450, 451, 451, 452, 452, 452, 453, 453,
+ 453, 454, 454, 454, 455, 455, 456, 456, 456, 456,
+ 457, 457, 458, 458, 459, 460, 461, 462, 463, 464,
+ 465, 466, 467, 468, 468, 468, 468, 468, 468, 468,
+ 469, 470, 471, 472, 473, 473, 473, 474, 474, 474,
+ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
+ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
+ 474, 474, 474, 474, 474, 474, 474, 474, 474, 474,
+ 474, 474, 474, 475, 475, 475, 475, 475, 475, 475,
+ 475, 475, 475, 475, 475, 475, 475, 475, 476, 476
};
-static const short yyr2[] = { 0,
- 1, 1, 3, 2, 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, 8, 8,
- 3, 3, 0, 1, 1, 0, 1, 1, 0, 3,
- 1, 3, 0, 3, 0, 4, 4, 4, 3, 1,
- 1, 1, 1, 1, 2, 3, 2, 3, 5, 3,
- 4, 3, 6, 5, 2, 2, 7, 1, 1, 1,
- 1, 1, 1, 0, 2, 0, 3, 0, 8, 3,
- 1, 0, 1, 1, 3, 2, 1, 0, 2, 1,
- 3, 1, 4, 2, 2, 1, 2, 5, 3, 1,
- 1, 1, 2, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 3, 6, 3, 3, 4, 3, 2,
- 2, 1, 1, 4, 1, 4, 1, 1, 3, 1,
- 4, 4, 5, 10, 3, 1, 1, 1, 1, 2,
- 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
- 3, 6, 3, 3, 4, 3, 3, 4, 3, 3,
- 2, 2, 2, 2, 3, 2, 4, 3, 3, 4,
- 4, 5, 6, 5, 6, 3, 1, 1, 2, 2,
- 0, 2, 1, 0, 3, 3, 2, 1, 2, 2,
- 4, 0, 3, 0, 6, 3, 0, 3, 1, 1,
- 4, 2, 0, 2, 1, 2, 2, 2, 2, 1,
- 1, 1, 2, 1, 2, 9, 1, 0, 4, 14,
- 1, 1, 1, 3, 5, 1, 1, 1, 3, 1,
- 0, 1, 1, 1, 3, 0, 1, 1, 1, 1,
- 5, 3, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 3, 1, 3, 3, 1, 3, 1, 1, 1,
- 1, 2, 3, 3, 4, 4, 1, 1, 0, 1,
- 1, 0, 2, 0, 7, 2, 1, 1, 1, 3,
- 1, 1, 1, 1, 1, 1, 2, 1, 3, 0,
- 6, 11, 1, 0, 2, 0, 1, 1, 3, 1,
- 6, 3, 2, 2, 0, 1, 2, 0, 4, 3,
- 11, 2, 0, 3, 2, 1, 3, 2, 1, 0,
- 3, 1, 1, 1, 1, 4, 1, 1, 4, 6,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 3, 3, 3, 9, 1, 0, 1, 0, 0, 13,
- 1, 1, 3, 3, 1, 1, 3, 2, 2, 3,
- 1, 1, 1, 1, 1, 1, 0, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 1, 0, 5, 2,
- 6, 3, 3, 0, 3, 0, 1, 1, 0, 1,
- 1, 0, 3, 4, 3, 5, 1, 0, 1, 0,
- 3, 0, 1, 3, 3, 1, 1, 1, 1, 1,
- 1, 5, 4, 8, 3, 0, 3, 1, 2, 4,
- 3, 6, 14, 10, 8, 3, 0, 4, 1, 7,
- 3, 0, 1, 0, 1, 0, 1, 3, 1, 0,
- 3, 0, 1, 3, 2, 2, 2, 2, 1, 1,
- 0, 1, 0, 1, 1, 3, 3, 0, 2, 0,
- 8, 2, 0, 3, 4, 1, 3, 2, 1, 2,
- 2, 2, 2, 1, 1, 1, 0, 1, 0, 4,
- 4, 0, 1, 3, 1, 3, 1, 2, 0, 1,
- 2, 3, 4, 0, 3, 4, 0, 2, 1, 2,
- 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
- 1, 2, 1, 1, 3, 0, 5, 3, 0, 5,
- 3, 0, 4, 1, 4, 2, 1, 3, 2, 1,
- 0, 3, 0, 2, 0, 1, 2, 1, 2, 1,
- 1, 1, 1, 1, 1, 3, 0, 1, 3, 3,
- 3, 3, 3, 3, 3, 0, 1, 1, 7, 8,
- 8, 7, 7, 3, 3, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
- 2, 3, 3, 3, 3, 3, 3, 3, 2, 2,
- 2, 3, 6, 3, 3, 3, 4, 2, 2, 4,
- 3, 4, 1, 1, 4, 1, 4, 1, 1, 4,
- 4, 4, 4, 5, 5, 5, 4, 2, 3, 2,
- 4, 3, 4, 3, 4, 5, 6, 0, 6, 0,
- 7, 5, 5, 5, 5, 5, 5, 5, 5, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 3, 3, 2, 2, 1,
- 1, 2, 3, 3, 3, 3, 2, 2, 2, 3,
- 6, 3, 3, 2, 2, 3, 4, 1, 1, 4,
- 1, 4, 1, 1, 4, 4, 5, 5, 5, 4,
- 4, 6, 0, 1, 3, 3, 3, 0, 1, 1,
- 1, 3, 0, 2, 1, 2, 3, 3, 3, 3,
- 2, 3, 6, 3, 3, 2, 2, 1, 3, 4,
- 4, 4, 5, 5, 5, 4, 3, 0, 2, 0,
- 2, 0, 3, 2, 1, 1, 1, 1, 3, 1,
- 1, 1, 3, 3, 3, 1, 3, 3, 3, 1,
- 1, 4, 2, 3, 3, 1, 3, 1, 3, 1,
- 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 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
+static const short yyr2[] = {0,
+ 1, 1, 3, 2, 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, 8, 8,
+ 3, 3, 0, 1, 1, 0, 1, 1, 0, 3,
+ 1, 3, 0, 3, 0, 4, 4, 4, 3, 1,
+ 1, 1, 1, 1, 2, 3, 2, 3, 5, 3,
+ 4, 3, 6, 5, 2, 2, 7, 1, 1, 1,
+ 1, 1, 1, 0, 2, 0, 3, 0, 8, 3,
+ 1, 0, 1, 1, 3, 2, 1, 0, 2, 1,
+ 3, 1, 4, 2, 2, 1, 2, 5, 3, 1,
+ 1, 1, 2, 3, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 3, 6, 3, 3, 4, 3, 2,
+ 2, 1, 1, 4, 1, 4, 1, 1, 3, 1,
+ 4, 4, 5, 10, 3, 1, 1, 1, 1, 2,
+ 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
+ 3, 6, 3, 3, 4, 3, 3, 4, 3, 3,
+ 2, 2, 2, 2, 3, 2, 4, 3, 3, 4,
+ 4, 5, 6, 5, 6, 3, 1, 1, 2, 2,
+ 0, 2, 1, 0, 3, 3, 2, 1, 2, 2,
+ 4, 0, 3, 0, 6, 3, 0, 3, 1, 1,
+ 4, 2, 0, 2, 1, 2, 2, 2, 2, 1,
+ 1, 1, 2, 1, 2, 9, 1, 0, 4, 14,
+ 1, 1, 1, 3, 5, 1, 1, 1, 3, 1,
+ 0, 1, 1, 1, 3, 0, 1, 1, 1, 1,
+ 5, 3, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 1, 3, 3, 1, 3, 1, 1, 1,
+ 1, 2, 3, 3, 4, 4, 1, 1, 0, 1,
+ 1, 0, 2, 0, 7, 2, 1, 1, 1, 3,
+ 1, 1, 1, 1, 1, 1, 2, 1, 3, 0,
+ 6, 11, 1, 0, 2, 0, 1, 1, 3, 1,
+ 6, 3, 2, 2, 0, 1, 2, 0, 4, 3,
+ 11, 2, 0, 3, 2, 1, 3, 2, 1, 0,
+ 3, 1, 1, 1, 1, 4, 1, 1, 4, 6,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 3, 3, 9, 1, 0, 1, 0, 0, 13,
+ 1, 1, 3, 3, 1, 1, 3, 2, 2, 3,
+ 1, 1, 1, 1, 1, 1, 0, 2, 2, 2,
+ 2, 2, 2, 2, 2, 1, 1, 0, 5, 2,
+ 6, 3, 3, 0, 3, 0, 1, 1, 0, 1,
+ 1, 0, 3, 4, 3, 5, 1, 0, 1, 0,
+ 3, 0, 1, 3, 3, 1, 1, 1, 1, 1,
+ 1, 5, 4, 8, 3, 0, 3, 1, 2, 4,
+ 3, 6, 14, 10, 8, 3, 0, 4, 1, 7,
+ 3, 0, 1, 0, 1, 0, 1, 3, 1, 0,
+ 3, 0, 1, 3, 2, 2, 2, 2, 1, 1,
+ 0, 1, 0, 1, 1, 3, 3, 0, 2, 0,
+ 8, 2, 0, 3, 4, 1, 3, 2, 1, 2,
+ 2, 2, 2, 1, 1, 1, 0, 1, 0, 4,
+ 4, 0, 1, 3, 1, 3, 1, 2, 0, 1,
+ 2, 3, 4, 0, 3, 4, 0, 2, 1, 2,
+ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2,
+ 1, 2, 1, 1, 3, 0, 5, 3, 0, 5,
+ 3, 0, 4, 1, 4, 2, 1, 3, 2, 1,
+ 0, 3, 0, 2, 0, 1, 2, 1, 2, 1,
+ 1, 1, 1, 1, 1, 3, 0, 1, 3, 3,
+ 3, 3, 3, 3, 3, 0, 1, 1, 7, 8,
+ 8, 7, 7, 3, 3, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
+ 2, 3, 3, 3, 3, 3, 3, 3, 2, 2,
+ 2, 3, 6, 3, 3, 3, 4, 2, 2, 4,
+ 3, 4, 1, 1, 4, 1, 4, 1, 1, 4,
+ 4, 4, 4, 5, 5, 5, 4, 2, 3, 2,
+ 4, 3, 4, 3, 4, 5, 6, 0, 6, 0,
+ 7, 5, 5, 5, 5, 5, 5, 5, 5, 6,
+ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
+ 6, 6, 6, 6, 6, 3, 3, 2, 2, 1,
+ 1, 2, 3, 3, 3, 3, 2, 2, 2, 3,
+ 6, 3, 3, 2, 2, 3, 4, 1, 1, 4,
+ 1, 4, 1, 1, 4, 4, 5, 5, 5, 4,
+ 4, 6, 0, 1, 3, 3, 3, 0, 1, 1,
+ 1, 3, 0, 2, 1, 2, 3, 3, 3, 3,
+ 2, 3, 6, 3, 3, 2, 2, 1, 3, 4,
+ 4, 4, 5, 5, 5, 4, 3, 0, 2, 0,
+ 2, 0, 3, 2, 1, 1, 1, 1, 3, 1,
+ 1, 1, 3, 3, 3, 1, 3, 3, 3, 1,
+ 1, 4, 2, 3, 3, 1, 3, 1, 3, 1,
+ 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 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
};
-static const short yydefact[] = { 0,
- 0, 398, 782, 398, 238, 0, 0, 0, 398, 0,
- 289, 0, 0, 0, 0, 398, 460, 0, 0, 398,
- 0, 94, 418, 0, 0, 0, 454, 289, 0, 0,
- 418, 0, 1, 2, 15, 7, 21, 46, 47, 48,
- 6, 8, 9, 10, 11, 12, 13, 19, 14, 20,
- 17, 18, 24, 25, 37, 26, 22, 31, 30, 35,
- 32, 34, 33, 36, 39, 430, 27, 28, 40, 41,
- 42, 43, 44, 16, 45, 23, 38, 429, 431, 29,
- 428, 427, 426, 0, 0, 397, 396, 392, 810, 562,
- 815, 563, 821, 822, 824, 564, 561, 828, 830, 565,
- 836, 837, 838, 560, 843, 839, 840, 811, 812, 813,
- 814, 816, 818, 819, 820, 823, 825, 826, 827, 831,
- 832, 833, 834, 835, 842, 817, 829, 841, 808, 809,
- 86, 781, 393, 0, 313, 0, 0, 0, 265, 266,
- 0, 0, 264, 0, 0, 237, 0, 0, 0, 94,
- 790, 0, 0, 0, 345, 0, 342, 0, 0, 0,
- 343, 0, 0, 344, 0, 0, 394, 0, 288, 287,
- 292, 297, 304, 302, 301, 303, 305, 0, 298, 299,
- 0, 859, 860, 388, 784, 783, 0, 395, 459, 457,
- 0, 412, 836, 0, 0, 391, 0, 789, 93, 0,
- 417, 0, 0, 389, 803, 400, 792, 453, 0, 292,
- 836, 77, 836, 75, 420, 390, 4, 5, 473, 804,
- 53, 217, 53, 0, 0, 402, 785, 0, 791, 0,
- 223, 0, 268, 267, 271, 359, 357, 358, 353, 354,
- 355, 356, 262, 0, 270, 269, 0, 0, 509, 283,
- 474, 475, 51, 0, 0, 413, 0, 351, 0, 352,
- 0, 284, 341, 793, 330, 291, 802, 294, 290, 296,
- 0, 0, 436, 0, 0, 0, 551, 551, 623, 624,
- 626, 628, 542, 815, 0, 0, 536, 576, 0, 551,
- 0, 578, 539, 0, 0, 836, 567, 0, 629, 547,
- 800, 799, 840, 0, 808, 0, 801, 795, 0, 780,
- 0, 0, 0, 0, 0, 514, 521, 524, 523, 519,
- 544, 522, 809, 778, 598, 577, 713, 452, 776, 0,
- 0, 599, 798, 794, 796, 600, 411, 69, 410, 0,
- 0, 0, 0, 0, 96, 425, 509, 441, 294, 78,
- 76, 419, 415, 3, 472, 0, 0, 56, 102, 0,
- 56, 0, 242, 241, 0, 404, 0, 0, 369, 221,
- 0, 0, 263, 0, 0, 0, 440, 0, 0, 348,
- 346, 347, 349, 0, 239, 0, 285, 0, 300, 0,
- 0, 0, 458, 0, 550, 546, 553, 0, 0, 0,
- 529, 528, 0, 718, 0, 527, 562, 563, 564, 560,
- 568, 559, 551, 549, 678, 0, 0, 530, 723, 748,
- 0, 557, 0, 0, 558, 526, 525, 520, 556, 618,
- 601, 611, 609, 610, 0, 0, 0, 577, 797, 0,
- 518, 0, 0, 0, 0, 648, 0, 0, 0, 0,
- 638, 640, 619, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 597, 454, 0, 483, 0, 0, 0, 73,
- 74, 68, 72, 71, 66, 70, 67, 771, 713, 483,
- 770, 0, 0, 713, 414, 0, 0, 329, 286, 422,
- 368, 368, 368, 368, 79, 0, 54, 55, 59, 0,
- 0, 0, 0, 0, 0, 101, 103, 104, 150, 0,
- 219, 220, 0, 59, 399, 247, 246, 248, 0, 243,
- 0, 406, 533, 815, 531, 534, 335, 0, 806, 807,
- 336, 805, 340, 0, 0, 225, 0, 0, 0, 0,
- 222, 0, 0, 276, 0, 273, 0, 0, 508, 476,
- 261, 0, 0, 360, 293, 0, 0, 438, 713, 460,
- 0, 432, 0, 0, 0, 555, 0, 0, 0, 460,
- 0, 720, 721, 719, 0, 0, 0, 0, 0, 0,
- 0, 548, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 713, 0, 725, 738, 714, 750,
- 0, 0, 0, 0, 0, 0, 577, 755, 0, 614,
- 0, 0, 517, 0, 0, 847, 848, 849, 850, 852,
- 853, 854, 855, 856, 858, 857, 846, 851, 845, 844,
- 777, 676, 0, 698, 699, 701, 703, 0, 0, 0,
- 704, 0, 0, 0, 0, 0, 0, 0, 713, 0,
- 680, 681, 0, 0, 639, 644, 642, 616, 0, 650,
- 0, 677, 0, 0, 0, 615, 0, 0, 0, 608,
- 0, 0, 0, 606, 0, 0, 0, 607, 0, 0,
- 0, 602, 0, 0, 0, 603, 0, 0, 0, 605,
- 0, 0, 0, 604, 612, 0, 0, 775, 0, 509,
- 779, 764, 766, 787, 0, 621, 0, 765, 773, 0,
- 509, 0, 0, 95, 89, 88, 0, 0, 416, 367,
- 102, 85, 0, 0, 0, 366, 52, 57, 58, 63,
- 0, 0, 0, 0, 0, 0, 212, 0, 216, 106,
- 108, 215, 63, 0, 0, 409, 0, 401, 532, 0,
- 334, 339, 333, 0, 0, 0, 224, 234, 226, 227,
- 228, 229, 0, 0, 0, 0, 272, 316, 460, 0,
- 350, 0, 0, 306, 310, 308, 0, 435, 439, 0,
- 0, 311, 0, 0, 0, 545, 625, 627, 0, 541,
- 0, 630, 631, 0, 535, 570, 571, 572, 573, 574,
- 575, 569, 0, 538, 0, 723, 748, 0, 736, 726,
- 731, 0, 632, 0, 737, 0, 0, 0, 0, 0,
- 724, 0, 0, 0, 0, 752, 633, 566, 0, 754,
- 0, 0, 0, 637, 0, 0, 587, 589, 588, 590,
- 591, 592, 593, 594, 0, 584, 0, 512, 517, 543,
- 0, 0, 0, 723, 748, 0, 694, 682, 689, 687,
- 688, 0, 0, 695, 0, 0, 0, 0, 0, 679,
- 0, 0, 641, 643, 645, 0, 0, 617, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 713, 451, 0, 482, 486, 489, 510,
- 478, 0, 620, 622, 769, 442, 774, 0, 91, 92,
- 98, 90, 0, 423, 0, 0, 80, 0, 82, 0,
- 365, 0, 65, 0, 0, 158, 0, 0, 0, 0,
- 0, 0, 0, 0, 157, 798, 159, 149, 0, 0,
- 0, 100, 0, 214, 218, 220, 0, 0, 0, 0,
- 0, 0, 116, 105, 107, 110, 112, 65, 0, 244,
- 408, 403, 407, 412, 337, 0, 0, 338, 384, 385,
- 382, 383, 0, 235, 0, 0, 232, 354, 280, 230,
- 231, 277, 279, 281, 278, 275, 274, 0, 0, 0,
- 362, 363, 361, 307, 0, 295, 437, 483, 0, 0,
- 552, 554, 0, 483, 717, 0, 0, 0, 0, 0,
- 0, 0, 0, 734, 722, 735, 727, 728, 730, 729,
- 732, 739, 0, 749, 716, 715, 0, 747, 634, 635,
- 636, 753, 0, 0, 596, 595, 0, 0, 517, 0,
- 513, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 692, 646, 693, 683, 684, 686, 685, 690, 696, 0,
- 756, 0, 757, 758, 0, 0, 0, 0, 652, 0,
- 0, 659, 0, 0, 657, 0, 0, 658, 0, 0,
- 653, 0, 0, 654, 0, 0, 656, 0, 0, 655,
- 0, 711, 497, 0, 0, 0, 488, 511, 0, 480,
- 768, 767, 772, 0, 87, 0, 421, 81, 0, 0,
- 0, 0, 0, 50, 0, 181, 182, 160, 170, 168,
- 169, 0, 0, 0, 0, 0, 0, 0, 0, 184,
- 186, 183, 0, 0, 0, 0, 0, 0, 0, 0,
- 151, 0, 0, 0, 152, 0, 0, 99, 0, 0,
- 0, 142, 143, 145, 147, 122, 148, 0, 0, 0,
- 0, 0, 0, 114, 0, 121, 115, 117, 436, 109,
- 49, 251, 0, 0, 405, 332, 0, 0, 0, 282,
- 233, 786, 315, 0, 483, 0, 509, 433, 613, 540,
- 509, 537, 0, 741, 742, 0, 0, 0, 746, 740,
- 751, 0, 0, 0, 0, 586, 0, 515, 517, 0,
- 700, 702, 705, 706, 0, 0, 0, 710, 697, 649,
- 0, 647, 760, 0, 761, 762, 668, 660, 675, 667,
- 673, 665, 674, 666, 669, 661, 670, 662, 672, 664,
- 671, 663, 713, 499, 495, 499, 497, 494, 499, 496,
- 0, 484, 0, 487, 0, 0, 447, 0, 424, 84,
- 0, 364, 62, 61, 0, 0, 173, 179, 0, 198,
- 0, 0, 185, 189, 188, 177, 0, 0, 0, 180,
- 176, 165, 166, 167, 161, 162, 164, 163, 171, 174,
- 0, 156, 0, 153, 0, 0, 0, 111, 0, 0,
- 0, 140, 123, 133, 131, 132, 0, 141, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 201, 250, 0,
- 0, 245, 0, 509, 381, 236, 0, 317, 318, 320,
- 325, 0, 787, 509, 309, 478, 478, 0, 743, 744,
- 745, 579, 0, 582, 583, 0, 516, 0, 707, 708,
- 709, 759, 651, 0, 712, 498, 491, 492, 490, 493,
- 0, 485, 477, 479, 456, 462, 97, 83, 0, 64,
- 0, 0, 0, 197, 187, 191, 190, 0, 0, 178,
- 0, 175, 0, 211, 213, 113, 0, 0, 0, 136,
- 139, 128, 129, 130, 124, 125, 127, 126, 134, 137,
- 0, 120, 0, 204, 252, 253, 249, 0, 0, 0,
- 0, 333, 0, 0, 0, 328, 0, 478, 480, 480,
- 733, 580, 581, 691, 763, 502, 455, 0, 0, 444,
- 60, 0, 194, 0, 192, 0, 0, 155, 436, 0,
- 144, 146, 0, 138, 199, 200, 0, 118, 203, 0,
- 331, 387, 380, 312, 319, 324, 323, 0, 788, 322,
- 326, 0, 480, 447, 447, 0, 0, 0, 460, 446,
- 449, 0, 172, 196, 195, 193, 201, 0, 119, 0,
- 0, 202, 256, 386, 0, 327, 325, 447, 434, 445,
- 0, 0, 481, 0, 456, 461, 463, 471, 204, 135,
- 208, 0, 0, 205, 206, 260, 257, 258, 0, 254,
- 259, 371, 0, 0, 370, 372, 328, 462, 0, 0,
- 503, 507, 505, 483, 0, 0, 469, 470, 0, 465,
- 154, 207, 209, 210, 0, 240, 0, 375, 376, 0,
- 321, 443, 500, 0, 501, 0, 509, 448, 464, 466,
- 467, 468, 255, 373, 378, 379, 374, 504, 506, 478,
- 377, 480, 450, 0, 0, 0
+static const short yydefact[] = {0,
+ 0, 398, 782, 398, 238, 0, 0, 0, 398, 0,
+ 289, 0, 0, 0, 0, 398, 460, 0, 0, 398,
+ 0, 94, 418, 0, 0, 0, 454, 289, 0, 0,
+ 418, 0, 1, 2, 15, 7, 21, 46, 47, 48,
+ 6, 8, 9, 10, 11, 12, 13, 19, 14, 20,
+ 17, 18, 24, 25, 37, 26, 22, 31, 30, 35,
+ 32, 34, 33, 36, 39, 430, 27, 28, 40, 41,
+ 42, 43, 44, 16, 45, 23, 38, 429, 431, 29,
+ 428, 427, 426, 0, 0, 397, 396, 392, 810, 562,
+ 815, 563, 821, 822, 824, 564, 561, 828, 830, 565,
+ 836, 837, 838, 560, 843, 839, 840, 811, 812, 813,
+ 814, 816, 818, 819, 820, 823, 825, 826, 827, 831,
+ 832, 833, 834, 835, 842, 817, 829, 841, 808, 809,
+ 86, 781, 393, 0, 313, 0, 0, 0, 265, 266,
+ 0, 0, 264, 0, 0, 237, 0, 0, 0, 94,
+ 790, 0, 0, 0, 345, 0, 342, 0, 0, 0,
+ 343, 0, 0, 344, 0, 0, 394, 0, 288, 287,
+ 292, 297, 304, 302, 301, 303, 305, 0, 298, 299,
+ 0, 859, 860, 388, 784, 783, 0, 395, 459, 457,
+ 0, 412, 836, 0, 0, 391, 0, 789, 93, 0,
+ 417, 0, 0, 389, 803, 400, 792, 453, 0, 292,
+ 836, 77, 836, 75, 420, 390, 4, 5, 473, 804,
+ 53, 217, 53, 0, 0, 402, 785, 0, 791, 0,
+ 223, 0, 268, 267, 271, 359, 357, 358, 353, 354,
+ 355, 356, 262, 0, 270, 269, 0, 0, 509, 283,
+ 474, 475, 51, 0, 0, 413, 0, 351, 0, 352,
+ 0, 284, 341, 793, 330, 291, 802, 294, 290, 296,
+ 0, 0, 436, 0, 0, 0, 551, 551, 623, 624,
+ 626, 628, 542, 815, 0, 0, 536, 576, 0, 551,
+ 0, 578, 539, 0, 0, 836, 567, 0, 629, 547,
+ 800, 799, 840, 0, 808, 0, 801, 795, 0, 780,
+ 0, 0, 0, 0, 0, 514, 521, 524, 523, 519,
+ 544, 522, 809, 778, 598, 577, 713, 452, 776, 0,
+ 0, 599, 798, 794, 796, 600, 411, 69, 410, 0,
+ 0, 0, 0, 0, 96, 425, 509, 441, 294, 78,
+ 76, 419, 415, 3, 472, 0, 0, 56, 102, 0,
+ 56, 0, 242, 241, 0, 404, 0, 0, 369, 221,
+ 0, 0, 263, 0, 0, 0, 440, 0, 0, 348,
+ 346, 347, 349, 0, 239, 0, 285, 0, 300, 0,
+ 0, 0, 458, 0, 550, 546, 553, 0, 0, 0,
+ 529, 528, 0, 718, 0, 527, 562, 563, 564, 560,
+ 568, 559, 551, 549, 678, 0, 0, 530, 723, 748,
+ 0, 557, 0, 0, 558, 526, 525, 520, 556, 618,
+ 601, 611, 609, 610, 0, 0, 0, 577, 797, 0,
+ 518, 0, 0, 0, 0, 648, 0, 0, 0, 0,
+ 638, 640, 619, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 597, 454, 0, 483, 0, 0, 0, 73,
+ 74, 68, 72, 71, 66, 70, 67, 771, 713, 483,
+ 770, 0, 0, 713, 414, 0, 0, 329, 286, 422,
+ 368, 368, 368, 368, 79, 0, 54, 55, 59, 0,
+ 0, 0, 0, 0, 0, 101, 103, 104, 150, 0,
+ 219, 220, 0, 59, 399, 247, 246, 248, 0, 243,
+ 0, 406, 533, 815, 531, 534, 335, 0, 806, 807,
+ 336, 805, 340, 0, 0, 225, 0, 0, 0, 0,
+ 222, 0, 0, 276, 0, 273, 0, 0, 508, 476,
+ 261, 0, 0, 360, 293, 0, 0, 438, 713, 460,
+ 0, 432, 0, 0, 0, 555, 0, 0, 0, 460,
+ 0, 720, 721, 719, 0, 0, 0, 0, 0, 0,
+ 0, 548, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 713, 0, 725, 738, 714, 750,
+ 0, 0, 0, 0, 0, 0, 577, 755, 0, 614,
+ 0, 0, 517, 0, 0, 847, 848, 849, 850, 852,
+ 853, 854, 855, 856, 858, 857, 846, 851, 845, 844,
+ 777, 676, 0, 698, 699, 701, 703, 0, 0, 0,
+ 704, 0, 0, 0, 0, 0, 0, 0, 713, 0,
+ 680, 681, 0, 0, 639, 644, 642, 616, 0, 650,
+ 0, 677, 0, 0, 0, 615, 0, 0, 0, 608,
+ 0, 0, 0, 606, 0, 0, 0, 607, 0, 0,
+ 0, 602, 0, 0, 0, 603, 0, 0, 0, 605,
+ 0, 0, 0, 604, 612, 0, 0, 775, 0, 509,
+ 779, 764, 766, 787, 0, 621, 0, 765, 773, 0,
+ 509, 0, 0, 95, 89, 88, 0, 0, 416, 367,
+ 102, 85, 0, 0, 0, 366, 52, 57, 58, 63,
+ 0, 0, 0, 0, 0, 0, 212, 0, 216, 106,
+ 108, 215, 63, 0, 0, 409, 0, 401, 532, 0,
+ 334, 339, 333, 0, 0, 0, 224, 234, 226, 227,
+ 228, 229, 0, 0, 0, 0, 272, 316, 460, 0,
+ 350, 0, 0, 306, 310, 308, 0, 435, 439, 0,
+ 0, 311, 0, 0, 0, 545, 625, 627, 0, 541,
+ 0, 630, 631, 0, 535, 570, 571, 572, 573, 574,
+ 575, 569, 0, 538, 0, 723, 748, 0, 736, 726,
+ 731, 0, 632, 0, 737, 0, 0, 0, 0, 0,
+ 724, 0, 0, 0, 0, 752, 633, 566, 0, 754,
+ 0, 0, 0, 637, 0, 0, 587, 589, 588, 590,
+ 591, 592, 593, 594, 0, 584, 0, 512, 517, 543,
+ 0, 0, 0, 723, 748, 0, 694, 682, 689, 687,
+ 688, 0, 0, 695, 0, 0, 0, 0, 0, 679,
+ 0, 0, 641, 643, 645, 0, 0, 617, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 713, 451, 0, 482, 486, 489, 510,
+ 478, 0, 620, 622, 769, 442, 774, 0, 91, 92,
+ 98, 90, 0, 423, 0, 0, 80, 0, 82, 0,
+ 365, 0, 65, 0, 0, 158, 0, 0, 0, 0,
+ 0, 0, 0, 0, 157, 798, 159, 149, 0, 0,
+ 0, 100, 0, 214, 218, 220, 0, 0, 0, 0,
+ 0, 0, 116, 105, 107, 110, 112, 65, 0, 244,
+ 408, 403, 407, 412, 337, 0, 0, 338, 384, 385,
+ 382, 383, 0, 235, 0, 0, 232, 354, 280, 230,
+ 231, 277, 279, 281, 278, 275, 274, 0, 0, 0,
+ 362, 363, 361, 307, 0, 295, 437, 483, 0, 0,
+ 552, 554, 0, 483, 717, 0, 0, 0, 0, 0,
+ 0, 0, 0, 734, 722, 735, 727, 728, 730, 729,
+ 732, 739, 0, 749, 716, 715, 0, 747, 634, 635,
+ 636, 753, 0, 0, 596, 595, 0, 0, 517, 0,
+ 513, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 692, 646, 693, 683, 684, 686, 685, 690, 696, 0,
+ 756, 0, 757, 758, 0, 0, 0, 0, 652, 0,
+ 0, 659, 0, 0, 657, 0, 0, 658, 0, 0,
+ 653, 0, 0, 654, 0, 0, 656, 0, 0, 655,
+ 0, 711, 497, 0, 0, 0, 488, 511, 0, 480,
+ 768, 767, 772, 0, 87, 0, 421, 81, 0, 0,
+ 0, 0, 0, 50, 0, 181, 182, 160, 170, 168,
+ 169, 0, 0, 0, 0, 0, 0, 0, 0, 184,
+ 186, 183, 0, 0, 0, 0, 0, 0, 0, 0,
+ 151, 0, 0, 0, 152, 0, 0, 99, 0, 0,
+ 0, 142, 143, 145, 147, 122, 148, 0, 0, 0,
+ 0, 0, 0, 114, 0, 121, 115, 117, 436, 109,
+ 49, 251, 0, 0, 405, 332, 0, 0, 0, 282,
+ 233, 786, 315, 0, 483, 0, 509, 433, 613, 540,
+ 509, 537, 0, 741, 742, 0, 0, 0, 746, 740,
+ 751, 0, 0, 0, 0, 586, 0, 515, 517, 0,
+ 700, 702, 705, 706, 0, 0, 0, 710, 697, 649,
+ 0, 647, 760, 0, 761, 762, 668, 660, 675, 667,
+ 673, 665, 674, 666, 669, 661, 670, 662, 672, 664,
+ 671, 663, 713, 499, 495, 499, 497, 494, 499, 496,
+ 0, 484, 0, 487, 0, 0, 447, 0, 424, 84,
+ 0, 364, 62, 61, 0, 0, 173, 179, 0, 198,
+ 0, 0, 185, 189, 188, 177, 0, 0, 0, 180,
+ 176, 165, 166, 167, 161, 162, 164, 163, 171, 174,
+ 0, 156, 0, 153, 0, 0, 0, 111, 0, 0,
+ 0, 140, 123, 133, 131, 132, 0, 141, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 201, 250, 0,
+ 0, 245, 0, 509, 381, 236, 0, 317, 318, 320,
+ 325, 0, 787, 509, 309, 478, 478, 0, 743, 744,
+ 745, 579, 0, 582, 583, 0, 516, 0, 707, 708,
+ 709, 759, 651, 0, 712, 498, 491, 492, 490, 493,
+ 0, 485, 477, 479, 456, 462, 97, 83, 0, 64,
+ 0, 0, 0, 197, 187, 191, 190, 0, 0, 178,
+ 0, 175, 0, 211, 213, 113, 0, 0, 0, 136,
+ 139, 128, 129, 130, 124, 125, 127, 126, 134, 137,
+ 0, 120, 0, 204, 252, 253, 249, 0, 0, 0,
+ 0, 333, 0, 0, 0, 328, 0, 478, 480, 480,
+ 733, 580, 581, 691, 763, 502, 455, 0, 0, 444,
+ 60, 0, 194, 0, 192, 0, 0, 155, 436, 0,
+ 144, 146, 0, 138, 199, 200, 0, 118, 203, 0,
+ 331, 387, 380, 312, 319, 324, 323, 0, 788, 322,
+ 326, 0, 480, 447, 447, 0, 0, 0, 460, 446,
+ 449, 0, 172, 196, 195, 193, 201, 0, 119, 0,
+ 0, 202, 256, 386, 0, 327, 325, 447, 434, 445,
+ 0, 0, 481, 0, 456, 461, 463, 471, 204, 135,
+ 208, 0, 0, 205, 206, 260, 257, 258, 0, 254,
+ 259, 371, 0, 0, 370, 372, 328, 462, 0, 0,
+ 503, 507, 505, 483, 0, 0, 469, 470, 0, 465,
+ 154, 207, 209, 210, 0, 240, 0, 375, 376, 0,
+ 321, 443, 500, 0, 501, 0, 509, 448, 464, 466,
+ 467, 468, 255, 373, 378, 379, 374, 504, 506, 478,
+ 377, 480, 450, 0, 0, 0
};
-static const short yydefgoto[] = { 1574,
- 33, 34, 35, 36, 37, 358, 499, 730, 1273, 933,
- 1124, 38, 475, 472, 39, 40, 41, 495, 42, 43,
- 717, 921, 200, 487, 1115, 44, 505, 506, 507, 964,
- 965, 966, 967, 1411, 1174, 508, 509, 1301, 943, 1383,
- 1384, 1414, 1458, 1459, 1514, 954, 1158, 45, 360, 510,
- 511, 46, 370, 541, 989, 990, 991, 47, 147, 48,
- 49, 365, 519, 520, 1183, 1330, 1417, 1519, 1520, 50,
- 51, 243, 148, 544, 373, 545, 546, 992, 52, 53,
- 171, 268, 387, 54, 178, 179, 180, 775, 1006, 55,
- 56, 149, 999, 1337, 1338, 1339, 1340, 1426, 1470, 57,
- 58, 59, 977, 368, 528, 753, 754, 60, 166, 61,
- 381, 62, 63, 993, 245, 553, 64, 930, 723, 65,
- 534, 1525, 1547, 1548, 1334, 983, 1495, 66, 67, 68,
- 69, 88, 70, 71, 72, 522, 748, 972, 338, 73,
- 74, 75, 202, 353, 719, 923, 76, 77, 78, 562,
- 391, 557, 558, 79, 80, 81, 82, 83, 571, 1376,
- 1480, 1481, 466, 209, 1438, 191, 1440, 1506, 1507, 1540,
- 356, 250, 251, 1110, 1267, 700, 907, 908, 1261, 1367,
- 1478, 1530, 1531, 377, 909, 441, 848, 315, 316, 317,
- 318, 319, 529, 406, 418, 401, 320, 321, 396, 566,
- 786, 322, 323, 422, 412, 599, 325, 436, 437, 845,
- 1048, 326, 653, 877, 648, 463, 608, 575, 576, 593,
- 594, 601, 826, 1038, 609, 1072, 1073, 1234, 1235, 327,
- 702, 480, 481, 328, 329, 131, 416, 226, 1193, 703,
- 1471, 197, 252, 331, 206, 265, 332, 333, 334, 335,
- 221, 531, 336, 631, 186
+static const short yydefgoto[] = {1574,
+ 33, 34, 35, 36, 37, 358, 499, 730, 1273, 933,
+ 1124, 38, 475, 472, 39, 40, 41, 495, 42, 43,
+ 717, 921, 200, 487, 1115, 44, 505, 506, 507, 964,
+ 965, 966, 967, 1411, 1174, 508, 509, 1301, 943, 1383,
+ 1384, 1414, 1458, 1459, 1514, 954, 1158, 45, 360, 510,
+ 511, 46, 370, 541, 989, 990, 991, 47, 147, 48,
+ 49, 365, 519, 520, 1183, 1330, 1417, 1519, 1520, 50,
+ 51, 243, 148, 544, 373, 545, 546, 992, 52, 53,
+ 171, 268, 387, 54, 178, 179, 180, 775, 1006, 55,
+ 56, 149, 999, 1337, 1338, 1339, 1340, 1426, 1470, 57,
+ 58, 59, 977, 368, 528, 753, 754, 60, 166, 61,
+ 381, 62, 63, 993, 245, 553, 64, 930, 723, 65,
+ 534, 1525, 1547, 1548, 1334, 983, 1495, 66, 67, 68,
+ 69, 88, 70, 71, 72, 522, 748, 972, 338, 73,
+ 74, 75, 202, 353, 719, 923, 76, 77, 78, 562,
+ 391, 557, 558, 79, 80, 81, 82, 83, 571, 1376,
+ 1480, 1481, 466, 209, 1438, 191, 1440, 1506, 1507, 1540,
+ 356, 250, 251, 1110, 1267, 700, 907, 908, 1261, 1367,
+ 1478, 1530, 1531, 377, 909, 441, 848, 315, 316, 317,
+ 318, 319, 529, 406, 418, 401, 320, 321, 396, 566,
+ 786, 322, 323, 422, 412, 599, 325, 436, 437, 845,
+ 1048, 326, 653, 877, 648, 463, 608, 575, 576, 593,
+ 594, 601, 826, 1038, 609, 1072, 1073, 1234, 1235, 327,
+ 702, 480, 481, 328, 329, 131, 416, 226, 1193, 703,
+ 1471, 197, 252, 331, 206, 265, 332, 333, 334, 335,
+ 221, 531, 336, 631, 186
};
-static const short yypact[] = { 12378,
- 86, 198, 11856, 198, 1346, 11856, 123, 1942, 198, -43,
- -27, 499, 129, 11056, 499, 198, 225, 11314, 11056, 198,
- 11856, 195, 50, 112, 11056, 229, 91, -27, 11985, 12114,
- 50, 11056, 12378, 166,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768, 11056, 242,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768, 11056,-32768, 242, 11856, 11856,-32768,-32768,
- 11856, 11856,-32768, 11856, 11056,-32768, 278, 9518, 320, 195,
--32768, 11056, 11856, 242,-32768, 11856,-32768, 11856, 11856, 11856,
--32768, 1066, 415,-32768, 11856, 11856,-32768, 272,-32768,-32768,
- 39, 398,-32768,-32768,-32768,-32768,-32768, 419, 287,-32768,
- 11056,-32768,-32768,-32768,-32768,-32768, 425,-32768,-32768, 437,
- 5070, 17, 389, -33, 422,-32768, 441,-32768,-32768, 11056,
--32768, 274, 11856,-32768,-32768,-32768,-32768,-32768, 11056, 39,
- 402,-32768, 411,-32768, 407,-32768, 330,-32768, 344,-32768,
- 435, 339, 435, 552, -23, 451,-32768, 359,-32768, 572,
--32768, 518,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768, 366,-32768,-32768, 11856, 563, 480,-32768,
- 395,-32768,-32768, 549, 9805,-32768, 359,-32768, 418,-32768,
- 229,-32768,-32768,-32768,-32768,-32768,-32768, 582,-32768,-32768,
- 11856, 46, 444, 11856, 11856, 445, 540, 540,-32768, 448,
- 452,-32768, 456, 599, 469, 479, 482, 595, 652, 540,
- 7501,-32768, 489, 491, 492, -29, 579, 494,-32768,-32768,
--32768,-32768, 73, 9306, 145, 7501,-32768,-32768, 7501,-32768,
- 7501, 7501, 7501, 6940, 229, 510,-32768,-32768,-32768,-32768,
- 500,-32768, 212, 722,-32768, 3258, 519, -5,-32768, 525,
- 524,-32768, 532,-32768,-32768, 214,-32768,-32768,-32768, 14,
- 18, 18, 9665, 11056, 628,-32768, 480,-32768, 582,-32768,
--32768,-32768, 11056,-32768,-32768, 60, 564, 100, 10927, 747,
- 100, 656,-32768,-32768, 71, 600, 3041, 587,-32768, 607,
- 229, 9361,-32768, 683, 720, 7501,-32768, 11856, 11056,-32768,
--32768,-32768,-32768, 11443,-32768, 11856,-32768, 666,-32768, 11856,
- 150, 723,-32768, 7501,-32768,-32768, 758, 581, 581, 581,
--32768,-32768, 686, 931, 581,-32768, 682, 698, 700, 711,
--32768,-32768, 540,-32768, 1149, 575, 581,-32768, 8436, 6940,
- 690,-32768, 4483, 599,-32768,-32768,-32768,-32768,-32768, 879,
- 602, 602, 602, 602, 603, 604, 615, 2127,-32768, 51,
--32768, 581, 10618, 7501, 7688,-32768, 207, 7501, 128, 7501,
--32768,-32768, 7127, 5257, 5444, 5631, 5818, 6005, 6192, 6379,
- 12534, 7501,-32768, 91, 5070, 770, 9934, 3498, 11856,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, 519, 8,
--32768, 608, 532, 152,-32768, 673, 37,-32768,-32768, 620,
- 43, 827, 827, 827,-32768, 242,-32768,-32768, 226, 631,
- 11856, 789, 790, 637, 211,-32768,-32768,-32768,-32768, 221,
--32768, 12469, 686, 226,-32768,-32768,-32768,-32768, 776, 783,
- 664, 684,-32768, 771,-32768,-32768,-32768, 228,-32768,-32768,
--32768,-32768, 692, 791, -104,-32768, -104, -104, -104, -104,
--32768, 730, 675, 676, 258,-32768, 11056, 784, 3258,-32768,
--32768, 663, 668, 679,-32768, 11185, 273,-32768, 519, 225,
- 672,-32768, 11185, 2756, 795, 887, 680, 687, 319, 225,
- 691,-32768,-32768,-32768, 693, 862, 694, 230, 30, 818,
- 852,-32768, 11856, 323, 705, 706, 708, 725, 8436, 8436,
- 8436, 8436, 710, 592, 519, 726,-32768, 214,-32768, 6,
- 721, 808, 6566, 6940, 6566, 6566, 2818, -42, 737,-32768,
- 886, 7501, 743, 744, 741,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, 1149, 748,-32768, 749, 750,-32768, 753, 754, 755,
--32768, 7688, 7688, 7688, 7688, 7688, 7501, 184, 519, 756,
--32768, 214, 757, 181,-32768,-32768,-32768, 813, 7688,-32768,
- 7501, 140, 763, 765, 6753, 879, 779, 780, 6753, 623,
- 781, 786, 6753, 1465, 788, 793, 6753, 1465, 797, 798,
- 6753, 206, 805, 807, 6753, 206, 810, 814, 6753, 602,
- 815, 819, 6753, 602,-32768, 2579, 11056,-32768, 1563, 480,
--32768, 752,-32768,-32768, 812,-32768, -51, 752,-32768, 10321,
- 480, 10063, 800,-32768,-32768,-32768, 113, 11856,-32768,-32768,
- 10927,-32768, 11856, 11856, 11856, 11856,-32768,-32768,-32768, 934,
- 8810, 70, 820, 822, 11856, 10927, 841, 11856,-32768,-32768,
- 490,-32768, 934, 11056, 71, 25, 803,-32768,-32768, 10777,
--32768,-32768, 889, 10777, 127, 581,-32768,-32768,-32768,-32768,
--32768,-32768, 9518, 9184, 9184, 9361,-32768, 896, 225, 11856,
--32768, 11583, 11856,-32768, 917,-32768, 11856,-32768,-32768, 5070,
- 5070,-32768, 12534, 11856, 11856,-32768,-32768,-32768, 581,-32768,
- 5070,-32768,-32768, 7501,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768, 581,-32768, 8436, 8436, 6940, 4683, 497, 825,
- 825, 772,-32768, 8436, 8623, 8436, 8436, 8436, 8436, 12534,
--32768, 3697, 6940, 7501, 6940, 996,-32768,-32768, 826, -42,
- 828, 829, 6940,-32768, 831, 998,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 40, 2221, 119,-32768, 743,-32768,
- 7688, 581, 581, 8436, 6940, 4883, 588, 835, 835, 835,
- 835, 1581, 7688, 7875, 7688, 7688, 7688, 7688, 12534,-32768,
- 3896, 12250,-32768,-32768,-32768, 191, 837, 813, 686, 686,
- 838, 686, 686, 840, 686, 686, 843, 686, 686, 851,
- 686, 686, 853, 686, 686, 854, 686, 686, 855, 686,
- 686, 856, 7501, 519,-32768, 11056, 839, 1019, 11727, 871,
- 1008, 10192,-32768,-32768,-32768,-32768,-32768, 6940,-32768,-32768,
- 967,-32768, 352,-32768, 372, 12469,-32768, 34,-32768, 976,
--32768, 1030, 904, 881, 8810,-32768, 8810, 8810, 8810, 8810,
- 8810, 8810, 1746, 885,-32768,-32768, 890,-32768, 11856, 11856,
- 373,-32768, 892, 924,-32768,-32768, 900, 11856, 8062, 1041,
- 1060, 11856,-32768,-32768, 490,-32768,-32768, 904, 1076, 1044,
--32768,-32768,-32768, 17,-32768, 366, 1120,-32768,-32768,-32768,
--32768,-32768, 1026,-32768, 980, 11856,-32768, 203,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 939, 918, 5070,
--32768,-32768,-32768,-32768, 1095,-32768,-32768, 10, 378, 928,
--32768,-32768, 930, 10, 3258, 932, 356, 935, 937, 6566,
- 6566, 6566, 938,-32768, 712, 497, 253, 253, 825, 825,
--32768,-32768, -38, -42, 3258,-32768, 6940,-32768,-32768,-32768,
--32768, -42, 686, 940,-32768,-32768, 7314, 941, 743, 946,
--32768, 438, 943, 951, 952, 953, 6566, 6566, 6566, 954,
--32768, 787, 588, 293, 293, 835, 835,-32768,-32768, -30,
--32768, 955, 933,-32768, 7688, 12250, 956, 957,-32768, 958,
- 959,-32768, 962, 963,-32768, 964, 968,-32768, 969, 970,
--32768, 972, 979,-32768, 981, 983,-32768, 984, 991,-32768,
- 2803,-32768, 617, 11056, 1092, 10618,-32768,-32768, 1195, 1158,
--32768,-32768,-32768, 1073,-32768, 11856,-32768,-32768, 1178, 1182,
- 11856, 242, 1024,-32768, 8810, 3180, 1196, 1003, 1003, 1003,
- 1003, 1832, 8810, 12284, 1004, 326, 8810, 231, 8810,-32768,
--32768, 8997, 8810, 8810, 8810, 8810, 8810, 8810, 8810, 12534,
--32768, 4283, 382, 400,-32768, 11856, 1021,-32768, 8810, 158,
- 1006,-32768, 1009, 1010,-32768,-32768,-32768, 8062, 8062, 8062,
- 8062, 8062, 8062, 745, 1013,-32768,-32768,-32768, 444,-32768,
--32768, 1080, 1184, 71,-32768,-32768, 229, 11056, 229,-32768,
--32768,-32768,-32768, 11856, 10, 1153, 480,-32768,-32768,-32768,
- 480,-32768, 12534,-32768,-32768, 1016, 1022, 1023,-32768,-32768,
- -42, 1027, 686, 1031, 1033, 3258, 686,-32768, 743, 12534,
--32768,-32768,-32768,-32768, 1038, 1039, 1043,-32768,-32768,-32768,
- 12284, 787,-32768, 1045, 1028,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768, 519, 1165,-32768, 1165, 617,-32768, 1165,-32768,
- 1205,-32768, 11056,-32768, 6940, 7501, 1166, 229,-32768,-32768,
- 8062,-32768, 1061,-32768, 1081, 3088,-32768, 3180, 1273,-32768,
- 12284, 210,-32768,-32768,-32768, 1227, 12284, 1063, 8810, 9028,
- 1196, 861, 2420, 2420, 360, 360, 1003, 1003,-32768,-32768,
- 401, 3273, 1192,-32768, 1067, 1127, 1916,-32768, 8062, 581,
- 581, 899, 1074, 1074, 1074, 1074, 638, 8249, 8062, 8062,
- 8062, 8062, 8062, 8062, 8062, 12534, 4095, 1223,-32768, -63,
- 1202,-32768, 1231, 480, 1084,-32768, 1082, 1085,-32768,-32768,
- -1, 1088, 890, 480,-32768, 1008, 1008, 1094,-32768,-32768,
--32768,-32768, 1103,-32768,-32768, 1107,-32768, 1108,-32768,-32768,
--32768,-32768,-32768, 12284,-32768,-32768,-32768,-32768,-32768,-32768,
- 11056,-32768, -42, 3258, 1295, 1220,-32768, 745, 242,-32768,
- 12534, 12284, 404,-32768,-32768,-32768,-32768, 1305, 12284, 1227,
- 8810,-32768, 11856,-32768,-32768,-32768, 342, 1109, 1110,-32768,
- 899, 745, 989, 989, 367, 367, 1074, 1074,-32768,-32768,
- 431, 745, 42, 1250,-32768,-32768,-32768, 11856, 229, 1191,
- 11856, 889, 11856, 12534, 12534, -36, 11856, 1008, 1158, 1158,
--32768,-32768,-32768,-32768,-32768, 90,-32768, 1235, 1320,-32768,
--32768, 1115,-32768, 12284,-32768, 12284, 434, 3273, 444, 12534,
--32768,-32768, 8062,-32768,-32768,-32768, 54,-32768, 1250, 1117,
--32768, 1186,-32768,-32768,-32768,-32768,-32768, 1143,-32768,-32768,
--32768, 440, 1158, 1166, 1166, 1121, 1122, 1125, 225, 1232,
--32768, 7501,-32768,-32768,-32768,-32768, 1223, 1126, 745, 75,
- 75,-32768, 162,-32768, 205,-32768, -1, 1166,-32768,-32768,
- 7501, 10461,-32768, 5070, 1295, 1131,-32768, 2491, 1250,-32768,
--32768, 1341, 58,-32768,-32768,-32768,-32768,-32768, 458,-32768,
--32768,-32768, 274, 274,-32768,-32768, -36, 1220, 2017, 462,
--32768,-32768, 1145, 10, 1235, 7501,-32768,-32768, 190,-32768,
--32768,-32768,-32768,-32768, 162,-32768, 1156, 274, 1157, 1154,
--32768,-32768,-32768, 10461,-32768, 11856, 480,-32768,-32768,-32768,
--32768,-32768,-32768,-32768, 1161,-32768,-32768,-32768,-32768, 1008,
--32768, 1158,-32768, 1375, 1376,-32768
+static const short yypact[] = {12378,
+ 86, 198, 11856, 198, 1346, 11856, 123, 1942, 198, -43,
+ -27, 499, 129, 11056, 499, 198, 225, 11314, 11056, 198,
+ 11856, 195, 50, 112, 11056, 229, 91, -27, 11985, 12114,
+ 50, 11056, 12378, 166, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, 11056, 242, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, 11056, -32768, 242, 11856, 11856, -32768, -32768,
+ 11856, 11856, -32768, 11856, 11056, -32768, 278, 9518, 320, 195,
+ -32768, 11056, 11856, 242, -32768, 11856, -32768, 11856, 11856, 11856,
+ -32768, 1066, 415, -32768, 11856, 11856, -32768, 272, -32768, -32768,
+ 39, 398, -32768, -32768, -32768, -32768, -32768, 419, 287, -32768,
+ 11056, -32768, -32768, -32768, -32768, -32768, 425, -32768, -32768, 437,
+ 5070, 17, 389, -33, 422, -32768, 441, -32768, -32768, 11056,
+ -32768, 274, 11856, -32768, -32768, -32768, -32768, -32768, 11056, 39,
+ 402, -32768, 411, -32768, 407, -32768, 330, -32768, 344, -32768,
+ 435, 339, 435, 552, -23, 451, -32768, 359, -32768, 572,
+ -32768, 518, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, 366, -32768, -32768, 11856, 563, 480, -32768,
+ 395, -32768, -32768, 549, 9805, -32768, 359, -32768, 418, -32768,
+ 229, -32768, -32768, -32768, -32768, -32768, -32768, 582, -32768, -32768,
+ 11856, 46, 444, 11856, 11856, 445, 540, 540, -32768, 448,
+ 452, -32768, 456, 599, 469, 479, 482, 595, 652, 540,
+ 7501, -32768, 489, 491, 492, -29, 579, 494, -32768, -32768,
+ -32768, -32768, 73, 9306, 145, 7501, -32768, -32768, 7501, -32768,
+ 7501, 7501, 7501, 6940, 229, 510, -32768, -32768, -32768, -32768,
+ 500, -32768, 212, 722, -32768, 3258, 519, -5, -32768, 525,
+ 524, -32768, 532, -32768, -32768, 214, -32768, -32768, -32768, 14,
+ 18, 18, 9665, 11056, 628, -32768, 480, -32768, 582, -32768,
+ -32768, -32768, 11056, -32768, -32768, 60, 564, 100, 10927, 747,
+ 100, 656, -32768, -32768, 71, 600, 3041, 587, -32768, 607,
+ 229, 9361, -32768, 683, 720, 7501, -32768, 11856, 11056, -32768,
+ -32768, -32768, -32768, 11443, -32768, 11856, -32768, 666, -32768, 11856,
+ 150, 723, -32768, 7501, -32768, -32768, 758, 581, 581, 581,
+ -32768, -32768, 686, 931, 581, -32768, 682, 698, 700, 711,
+ -32768, -32768, 540, -32768, 1149, 575, 581, -32768, 8436, 6940,
+ 690, -32768, 4483, 599, -32768, -32768, -32768, -32768, -32768, 879,
+ 602, 602, 602, 602, 603, 604, 615, 2127, -32768, 51,
+ -32768, 581, 10618, 7501, 7688, -32768, 207, 7501, 128, 7501,
+ -32768, -32768, 7127, 5257, 5444, 5631, 5818, 6005, 6192, 6379,
+ 12534, 7501, -32768, 91, 5070, 770, 9934, 3498, 11856, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, 519, 8,
+ -32768, 608, 532, 152, -32768, 673, 37, -32768, -32768, 620,
+ 43, 827, 827, 827, -32768, 242, -32768, -32768, 226, 631,
+ 11856, 789, 790, 637, 211, -32768, -32768, -32768, -32768, 221,
+ -32768, 12469, 686, 226, -32768, -32768, -32768, -32768, 776, 783,
+ 664, 684, -32768, 771, -32768, -32768, -32768, 228, -32768, -32768,
+ -32768, -32768, 692, 791, -104, -32768, -104, -104, -104, -104,
+ -32768, 730, 675, 676, 258, -32768, 11056, 784, 3258, -32768,
+ -32768, 663, 668, 679, -32768, 11185, 273, -32768, 519, 225,
+ 672, -32768, 11185, 2756, 795, 887, 680, 687, 319, 225,
+ 691, -32768, -32768, -32768, 693, 862, 694, 230, 30, 818,
+ 852, -32768, 11856, 323, 705, 706, 708, 725, 8436, 8436,
+ 8436, 8436, 710, 592, 519, 726, -32768, 214, -32768, 6,
+ 721, 808, 6566, 6940, 6566, 6566, 2818, -42, 737, -32768,
+ 886, 7501, 743, 744, 741, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, 1149, 748, -32768, 749, 750, -32768, 753, 754, 755,
+ -32768, 7688, 7688, 7688, 7688, 7688, 7501, 184, 519, 756,
+ -32768, 214, 757, 181, -32768, -32768, -32768, 813, 7688, -32768,
+ 7501, 140, 763, 765, 6753, 879, 779, 780, 6753, 623,
+ 781, 786, 6753, 1465, 788, 793, 6753, 1465, 797, 798,
+ 6753, 206, 805, 807, 6753, 206, 810, 814, 6753, 602,
+ 815, 819, 6753, 602, -32768, 2579, 11056, -32768, 1563, 480,
+ -32768, 752, -32768, -32768, 812, -32768, -51, 752, -32768, 10321,
+ 480, 10063, 800, -32768, -32768, -32768, 113, 11856, -32768, -32768,
+ 10927, -32768, 11856, 11856, 11856, 11856, -32768, -32768, -32768, 934,
+ 8810, 70, 820, 822, 11856, 10927, 841, 11856, -32768, -32768,
+ 490, -32768, 934, 11056, 71, 25, 803, -32768, -32768, 10777,
+ -32768, -32768, 889, 10777, 127, 581, -32768, -32768, -32768, -32768,
+ -32768, -32768, 9518, 9184, 9184, 9361, -32768, 896, 225, 11856,
+ -32768, 11583, 11856, -32768, 917, -32768, 11856, -32768, -32768, 5070,
+ 5070, -32768, 12534, 11856, 11856, -32768, -32768, -32768, 581, -32768,
+ 5070, -32768, -32768, 7501, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, 581, -32768, 8436, 8436, 6940, 4683, 497, 825,
+ 825, 772, -32768, 8436, 8623, 8436, 8436, 8436, 8436, 12534,
+ -32768, 3697, 6940, 7501, 6940, 996, -32768, -32768, 826, -42,
+ 828, 829, 6940, -32768, 831, 998, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, 40, 2221, 119, -32768, 743, -32768,
+ 7688, 581, 581, 8436, 6940, 4883, 588, 835, 835, 835,
+ 835, 1581, 7688, 7875, 7688, 7688, 7688, 7688, 12534, -32768,
+ 3896, 12250, -32768, -32768, -32768, 191, 837, 813, 686, 686,
+ 838, 686, 686, 840, 686, 686, 843, 686, 686, 851,
+ 686, 686, 853, 686, 686, 854, 686, 686, 855, 686,
+ 686, 856, 7501, 519, -32768, 11056, 839, 1019, 11727, 871,
+ 1008, 10192, -32768, -32768, -32768, -32768, -32768, 6940, -32768, -32768,
+ 967, -32768, 352, -32768, 372, 12469, -32768, 34, -32768, 976,
+ -32768, 1030, 904, 881, 8810, -32768, 8810, 8810, 8810, 8810,
+ 8810, 8810, 1746, 885, -32768, -32768, 890, -32768, 11856, 11856,
+ 373, -32768, 892, 924, -32768, -32768, 900, 11856, 8062, 1041,
+ 1060, 11856, -32768, -32768, 490, -32768, -32768, 904, 1076, 1044,
+ -32768, -32768, -32768, 17, -32768, 366, 1120, -32768, -32768, -32768,
+ -32768, -32768, 1026, -32768, 980, 11856, -32768, 203, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, 939, 918, 5070,
+ -32768, -32768, -32768, -32768, 1095, -32768, -32768, 10, 378, 928,
+ -32768, -32768, 930, 10, 3258, 932, 356, 935, 937, 6566,
+ 6566, 6566, 938, -32768, 712, 497, 253, 253, 825, 825,
+ -32768, -32768, -38, -42, 3258, -32768, 6940, -32768, -32768, -32768,
+ -32768, -42, 686, 940, -32768, -32768, 7314, 941, 743, 946,
+ -32768, 438, 943, 951, 952, 953, 6566, 6566, 6566, 954,
+ -32768, 787, 588, 293, 293, 835, 835, -32768, -32768, -30,
+ -32768, 955, 933, -32768, 7688, 12250, 956, 957, -32768, 958,
+ 959, -32768, 962, 963, -32768, 964, 968, -32768, 969, 970,
+ -32768, 972, 979, -32768, 981, 983, -32768, 984, 991, -32768,
+ 2803, -32768, 617, 11056, 1092, 10618, -32768, -32768, 1195, 1158,
+ -32768, -32768, -32768, 1073, -32768, 11856, -32768, -32768, 1178, 1182,
+ 11856, 242, 1024, -32768, 8810, 3180, 1196, 1003, 1003, 1003,
+ 1003, 1832, 8810, 12284, 1004, 326, 8810, 231, 8810, -32768,
+ -32768, 8997, 8810, 8810, 8810, 8810, 8810, 8810, 8810, 12534,
+ -32768, 4283, 382, 400, -32768, 11856, 1021, -32768, 8810, 158,
+ 1006, -32768, 1009, 1010, -32768, -32768, -32768, 8062, 8062, 8062,
+ 8062, 8062, 8062, 745, 1013, -32768, -32768, -32768, 444, -32768,
+ -32768, 1080, 1184, 71, -32768, -32768, 229, 11056, 229, -32768,
+ -32768, -32768, -32768, 11856, 10, 1153, 480, -32768, -32768, -32768,
+ 480, -32768, 12534, -32768, -32768, 1016, 1022, 1023, -32768, -32768,
+ -42, 1027, 686, 1031, 1033, 3258, 686, -32768, 743, 12534,
+ -32768, -32768, -32768, -32768, 1038, 1039, 1043, -32768, -32768, -32768,
+ 12284, 787, -32768, 1045, 1028, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, 519, 1165, -32768, 1165, 617, -32768, 1165, -32768,
+ 1205, -32768, 11056, -32768, 6940, 7501, 1166, 229, -32768, -32768,
+ 8062, -32768, 1061, -32768, 1081, 3088, -32768, 3180, 1273, -32768,
+ 12284, 210, -32768, -32768, -32768, 1227, 12284, 1063, 8810, 9028,
+ 1196, 861, 2420, 2420, 360, 360, 1003, 1003, -32768, -32768,
+ 401, 3273, 1192, -32768, 1067, 1127, 1916, -32768, 8062, 581,
+ 581, 899, 1074, 1074, 1074, 1074, 638, 8249, 8062, 8062,
+ 8062, 8062, 8062, 8062, 8062, 12534, 4095, 1223, -32768, -63,
+ 1202, -32768, 1231, 480, 1084, -32768, 1082, 1085, -32768, -32768,
+ -1, 1088, 890, 480, -32768, 1008, 1008, 1094, -32768, -32768,
+ -32768, -32768, 1103, -32768, -32768, 1107, -32768, 1108, -32768, -32768,
+ -32768, -32768, -32768, 12284, -32768, -32768, -32768, -32768, -32768, -32768,
+ 11056, -32768, -42, 3258, 1295, 1220, -32768, 745, 242, -32768,
+ 12534, 12284, 404, -32768, -32768, -32768, -32768, 1305, 12284, 1227,
+ 8810, -32768, 11856, -32768, -32768, -32768, 342, 1109, 1110, -32768,
+ 899, 745, 989, 989, 367, 367, 1074, 1074, -32768, -32768,
+ 431, 745, 42, 1250, -32768, -32768, -32768, 11856, 229, 1191,
+ 11856, 889, 11856, 12534, 12534, -36, 11856, 1008, 1158, 1158,
+ -32768, -32768, -32768, -32768, -32768, 90, -32768, 1235, 1320, -32768,
+ -32768, 1115, -32768, 12284, -32768, 12284, 434, 3273, 444, 12534,
+ -32768, -32768, 8062, -32768, -32768, -32768, 54, -32768, 1250, 1117,
+ -32768, 1186, -32768, -32768, -32768, -32768, -32768, 1143, -32768, -32768,
+ -32768, 440, 1158, 1166, 1166, 1121, 1122, 1125, 225, 1232,
+ -32768, 7501, -32768, -32768, -32768, -32768, 1223, 1126, 745, 75,
+ 75, -32768, 162, -32768, 205, -32768, -1, 1166, -32768, -32768,
+ 7501, 10461, -32768, 5070, 1295, 1131, -32768, 2491, 1250, -32768,
+ -32768, 1341, 58, -32768, -32768, -32768, -32768, -32768, 458, -32768,
+ -32768, -32768, 274, 274, -32768, -32768, -36, 1220, 2017, 462,
+ -32768, -32768, 1145, 10, 1235, 7501, -32768, -32768, 190, -32768,
+ -32768, -32768, -32768, -32768, 162, -32768, 1156, 274, 1157, 1154,
+ -32768, -32768, -32768, 10461, -32768, 11856, 480, -32768, -32768, -32768,
+ -32768, -32768, -32768, -32768, 1161, -32768, -32768, -32768, -32768, 1008,
+ -32768, 1158, -32768, 1375, 1376, -32768
};
static const short yypgoto[] = {-32768,
--32768, 1344,-32768,-32768,-32768, 1159, 1020, 866,-32768, 640,
- 417,-32768, 1047,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768, 1236,-32768,-32768,-32768, 671, 651, 670,-32768,
--32768, 430, 236,-32768, -715,-32768, -451,-32768, -662, 12,
- -1067, -90, -102, -53, -83,-32768,-32768,-32768,-32768,-32768,
- 674,-32768,-32768,-32768,-32768,-32768, 94,-32768,-32768,-32768,
--32768,-32768,-32768, -717,-32768,-32768,-32768,-32768, -136,-32768,
--32768,-32768,-32768, -140, 443,-32768, 644, 646,-32768,-32768,
- 1386, 1206, 1068,-32768, 1406,-32768, 1150, 860,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768, 3, -70, -99,-32768,
--32768,-32768, 9, 1173,-32768,-32768,-32768,-32768,-32768,-32768,
--32768,-32768,-32768, 1275, -148,-32768,-32768,-32768, -20,-32768,
--32768,-32768, -86,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, 504,-32768,-32768,-32768,-32768,-32768,-32768, 467,-32768,
--32768,-32768, 1411,-32768,-32768,-32768,-32768, -198,-32768,-32768,
- -1141, -704, 669,-32768,-32768,-32768,-32768, 1083, 4, -1352,
--32768, -92,-32768, 988, -57, -553, -75,-32768, -82,-32768,
--32768, -159, 29, -1304, -1360, -479,-32768, -1030, 201, -943,
--32768,-32768, -94, -326, -882,-32768, -812, -410, 1162,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, -337, -164,-32768,
--32768,-32768, 1096,-32768,-32768, -166,-32768, 414,-32768,-32768,
--32768, 1703,-32768,-32768, -610, -474, -411,-32768,-32768, -718,
- -493, -690,-32768,-32768, -526,-32768,-32768,-32768,-32768, 719,
- 993,-32768, 759, -768, 1000,-32768, 27, 1308,-32768, -893,
- 2, -117, 65, 1124,-32768,-32768, 2130, 1533, -103, 13,
- -134, -329, -3, 375,-32768
+ -32768, 1344, -32768, -32768, -32768, 1159, 1020, 866, -32768, 640,
+ 417, -32768, 1047, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, 1236, -32768, -32768, -32768, 671, 651, 670, -32768,
+ -32768, 430, 236, -32768, -715, -32768, -451, -32768, -662, 12,
+ -1067, -90, -102, -53, -83, -32768, -32768, -32768, -32768, -32768,
+ 674, -32768, -32768, -32768, -32768, -32768, 94, -32768, -32768, -32768,
+ -32768, -32768, -32768, -717, -32768, -32768, -32768, -32768, -136, -32768,
+ -32768, -32768, -32768, -140, 443, -32768, 644, 646, -32768, -32768,
+ 1386, 1206, 1068, -32768, 1406, -32768, 1150, 860, -32768, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, 3, -70, -99, -32768,
+ -32768, -32768, 9, 1173, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, -32768, -32768, 1275, -148, -32768, -32768, -32768, -20, -32768,
+ -32768, -32768, -86, -32768, -32768, -32768, -32768, -32768, -32768, -32768,
+ -32768, 504, -32768, -32768, -32768, -32768, -32768, -32768, 467, -32768,
+ -32768, -32768, 1411, -32768, -32768, -32768, -32768, -198, -32768, -32768,
+ -1141, -704, 669, -32768, -32768, -32768, -32768, 1083, 4, -1352,
+ -32768, -92, -32768, 988, -57, -553, -75, -32768, -82, -32768,
+ -32768, -159, 29, -1304, -1360, -479, -32768, -1030, 201, -943,
+ -32768, -32768, -94, -326, -882, -32768, -812, -410, 1162, -32768,
+ -32768, -32768, -32768, -32768, -32768, -32768, -32768, -337, -164, -32768,
+ -32768, -32768, 1096, -32768, -32768, -166, -32768, 414, -32768, -32768,
+ -32768, 1703, -32768, -32768, -610, -474, -411, -32768, -32768, -718,
+ -493, -690, -32768, -32768, -526, -32768, -32768, -32768, -32768, 719,
+ 993, -32768, 759, -768, 1000, -32768, 27, 1308, -32768, -893,
+ 2, -117, 65, 1124, -32768, -32768, 2130, 1533, -103, 13,
+ -134, -329, -3, 375, -32768
};
-#define YYLAST 12730
-
-
-static const short yytable[] = { 132,
- 711, 223, 151, 346, 709, 262, 780, 244, 600, 713,
- 185, 1008, 1009, 260, 194, 185, 791, 198, 1112, 253,
- 488, 185, 1014, 1103, 324, 212, 214, 970, 185, 530,
- 951, 857, 858, 859, 860, 861, 1051, 1328, 207, 722,
- 184, 1429, 1430, 266, 1045, 195, 1424, 1046, 876, 470,
- 695, 204, 337, 474, 464, 823, 707, 699, 216, 699,
- 971, 500, 824, 491, 720, 492, 1279, 269, 1474, 1475,
- 150, 824, 341, 1262, 1119, 824, 829, 1468, 831, 832,
- 185, 471, 173, 824, 779, 347, 715, 1018, 500, 1511,
- 1490, 502, 1455, 1543, 267, 809, 810, 811, 812, 799,
- 493, 741, 756, 174, 169, 363, 269, 516, 1415, 364,
- 219, 388, 1498, 397, 392, 1416, 1019, 170, 502, 824,
- 821, 1499, 1500, 1473, 168, 414, 800, 1456, 517, 374,
- 185, 503, 1120, 151, 151, 1055, 1544, 227, 229, 659,
- 151, 185, 716, 175, 246, 1528, 444, 435, 185, 151,
- 1512, 445, 151, 504, 151, 227, 229, 176, 503, 1469,
- 222, 151, 151, 979, 1056, 1491, 825, -558, 914, 342,
- 1476, 231, 152, 1513, 870, 825, 957, 185, 249, 825,
- 504, 1210, 518, 660, 980, -558, 84, 825, 181, 1229,
- 863, 208, 830, 959, 661, 446, 185, 1075, 85, 198,
- 447, 224, 225, 1477, 339, 185, 448, 273, 230, 1425,
- 205, 1573, 465, 205, 205, 1000, 449, 330, 177, 1388,
- 254, 205, 255, 825, 981, 710, 345, 465, 494, 189,
- 263, 1195, 1372, 201, 960, 348, 1218, 267, 982, 6,
- 1052, 7, 1287, 198, 1153, 1154, 961, 560, 582, 267,
- 962, 151, 1062, 1063, 1064, 1065, 1066, 1067, 1047, 873,
- 203, 721, 13, 190, 561, 1572, 613, 151, 963, -526,
- 151, 393, 1126, 385, 1127, 1128, 1129, 1130, 1131, 1132,
- 948, 1023, 14, 654, 796, 655, 1288, -526, 1385, 497,
- 498, 451, 919, 920, 567, 568, 569, 1289, 324, 797,
- 1341, 577, 17, 452, 874, 86, 875, 1487, 6, 205,
- 7, 1017, 1368, 584, 1443, 1370, 19, 267, 87, 382,
- 1025, 1026, 1027, 1028, 1029, 1030, 798, 439, 199, 1060,
- 656, 13, 657, 1386, 1049, 1387, 614, 453, 615, 484,
- 185, -525, 454, 455, 456, 457, 458, 459, 460, 185,
- 1450, 14, 473, 476, 476, 512, 461, 1516, 205, -525,
- 1517, 727, 1518, 532, 1203, -784, 462, 1522, 246, 482,
- 485, 17, 1010, 911, 151, 185, 1484, 218, 1485, 490,
- 151, 864, 151, 542, 916, 19, 559, 1560, 864, 865,
- 866, 867, 868, 1561, 1562, 600, 865, 866, 867, 868,
- 869, 267, 1282, 1191, 1283, 551, 1357, 869, -556, 1031,
- 1033, 1034, 530, 459, 460, 598, 530, 728, 729, 1523,
- 975, 1042, 461, 1524, 978, 205, -556, -784, 736, 1102,
- 737, 758, -791, 758, 758, 758, 758, 220, 738, 630,
- 739, 652, 550, 600, 232, 750, 1220, 751, 554, 1284,
- 555, 1285, 1312, 1313, 1314, 1315, 1316, 1317, 1068, 1070,
- 818, 819, 1276, 704, 1232, 704, 1332, 264, 247, 820,
- 1278, 724, 725, 726, 1286, 766, 1290, 767, 261, 1291,
- 1292, 1293, 1294, 1295, 1296, 1297, 1298, 270, 1436, 1302,
- 777, 330, 778, 1206, 1207, 1208, 1307, 151, 435, 271,
- 867, 868, 435, 172, 272, 274, 435, 133, 957, 869,
- 435, 340, 167, 958, 435, 741, 742, 275, 435, 188,
- 343, 344, 435, 196, 350, 959, 435, 1463, 1197, 1341,
- 1225, 1226, 1227, 351, 1201, 173, 789, 352, 790, 1318,
- 803, 354, 804, 185, 1319, 1320, 1321, 1322, 1323, 1324,
- 1325, 355, 776, 815, 357, 1378, 174, 359, 1326, 776,
- 362, 816, 817, 818, 819, 732, 960, 1148, 1149, 1116,
- 366, 1117, 820, 768, 1324, 1325, 1150, 367, 961, 704,
- 369, 371, 962, 1326, 372, 598, 598, 598, 598, 736,
- 777, 1118, 1155, 1397, 375, 465, 175, 1198, 376, 777,
- 963, 1303, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408,
- 176, 1412, 378, 324, 324, 260, 260, 777, 1391, 1304,
- 1392, 1444, 985, 1445, 324, 1211, 1390, 407, 757, 379,
- 759, 760, 761, 762, 445, 864, 384, 386, 652, 652,
- 652, 652, 652, 865, 866, 867, 868, 814, 1453, 408,
- 1454, 1444, 984, 1486, 869, 652, 395, 378, 1036, 1497,
- 758, 758, 390, 394, 409, 97, 398, 1254, 881, 413,
- 399, 177, 884, 1255, 400, 1545, 887, 1546, 446, 1554,
- 890, 1555, 1256, 447, 893, 1013, 402, 403, 896, 448,
- 1257, 100, 899, 185,-32768, 185, 902, 404, 421, 1016,
- 405, 1258, 816, 817, 818, 819, 484, 417, 704, 419,
- 420, 1259, 423, 820, 151, 1344, 410, 926, 442, 926,
- 928, 929, 151, 905, 440, 910, 1260, 947, 1448, 922,
- 443, 559, 926, 462, 956, 1534, 482, 1489, 467, 1299,
- 185, 535, 468, 1050, 536, 469, 532, 486, 1053, 1054,
- 532, 1113, 496, 17, 537, 513, 521, 533, 973, 246,
- 995, 995, 246, 547, 538, 539, 151, 548, 151, 1004,
- 969, 556, 563, 559, 451, 565, 994, 994, 1365, 267,
- 1011, 1012, 924, 570, 540,-32768, 452, 578, 583, 815,
- 931, 602, 1348, 865, 866, 867, 868, 816, 817, 818,
- 819, 598, 598, 579, 869, 580, 330, 330, 820, 1358,
- 598, 598, 598, 598, 598, 598, 581, 330, 461, 699,
- 453, 712, 610, 611, 445, 454, 455, 456, 457, 458,
- 459, 460, 612, 324, 1001, 1318, 1003, 714, 718, 461,
- 1319, 1320, 1321, 1322, 1323, 1324, 1325, 652, 720, 731,
- 598, 733, 734, 1373, 1326, 735, 744, 1400, 749, 652,
- 652, 652, 652, 652, 652, 745, 746, 752, 446, 747,
- 1346, 755, 1134, 447, 1347, 1071, 763, 764, 765,-32768,
- 770, 769, 1077, 1078, 984, 1080, 1081, 771, 1083, 1084,
- 781, 1086, 1087, 784, 1089, 1090, 772, 1092, 1093, 787,
- 1095, 1096, 185, 1098, 1099, 1107, 788, 785, 704, 815,
- 792, 794, 793, 795, 801, 1409, 1135, 816, 817, 818,
- 819, 1136, 802, 805, 806, 1504, 807, 1137, 820, 813,
- 828, 947, 910, 947, 947, 947, 947, 947, 947, 447,
- 827, 835, 1318, 808, 822, 559, 559, 1319, 1320, 1321,
- 1322, 1323, 1324, 1325, 151, 229, 834, 847, 1179, 849,
- 850, 1326, 836, 90, 451, 912, 851, 852, 853, 815,
- 1442, 854, 855, 856, 871, 872, 452, 816, 817, 818,
- 819, 879, 1190, 880, 864, 92, 339, 1274, 820, 932,
- 953, 1024, 865, 866, 867, 868, 1305, 882, 883, 885,
- 96, 97, 918, 869, 886, 974, 888, 1420, 976, 998,
- 453, 889, 1140, 1466, 1467, 891, 892, 1428, 457, 458,
- 459, 460, 1160, 894, 1141, 895, 330, 100, 897, 461,
- 451, 913, 898, 900, 572, 573, 1005, 901, 949, 1488,
- 950, 820, 452, 1037, 1105, 1039, 1212, 1040, 1041, 1043,
- 1214, 869, 104, 1044, 1557, 1076, 1104, 1079, 1142, 1082,
- 1109, 479, 1085, 1143, 1144, 1145, 1146, 1147, 1148, 1149,
- 1088, 652, 1091, 1094, 1097, 1100,-32768, 1150, 1108, 1233,
- 1114, 1121, 1122, 837, 457, 458, 459, 460, 838, 839,
- 840, 841, 842, 843, 844, 461,-32768, 1123, 130, 1125,
- 185, 130, 630, 1152, 1322, 1323, 1324, 1325, -791, 130,
- 1156, 1157, 151, 130, 130, 1326, 130, 151, 1159, 1177,
- 130, 947, 1178, 1182, 130, 130, 1184, 130, 1187, 947,
- 910, 1188, 1189, 947, 1192, 947, 1194, 595, 947, 947,
- 947, 947, 947, 947, 947, 947, 1196, 1199, 947, 1200,
- 1231, 1202, 151, 1263, 1204, 947, 1205, 1209, 1213, 1217,
- 445, 1219, 1221, 649, 229, 229, 229, 229, 229, 229,
- 1222, 1223, 1224, 1228, 1230, 1237, 1238, 1239, 1240, 130,
- 1269, 1241, 1242, 1243, 185, 1272, 1318, 1244, 1245, 1246,
- 1343, 1247,-32768,-32768, 1322, 1323, 1324, 1325, 1248, 1333,
- 1249, 1336, 1250, 1251, 446, 1326, 1398, 1399, 1265, 447,
- 1252, 1266, 1268, 1270, 1335, 448, 1353, 1271, 1275, 1150,
- 1356, 1329, 1281, 1306, 1309, 449, 1331, 1310, 1311, 130,
- 1570, 1327, 130, 130, 1345, 1349, 130, 130, 1134, 130,
- 130, 1350, 1351, 130, 1441, 1364, 1352, 130, 130, 1366,
- 1354, 130, 1355, 130, 130, 130, 1136, 1359, 1360, 185,
- 130, 130, 1361, 258, 1363, 228, 1371, 229, 236, 237,
- 238, 239, 240, 241, 242, 1375, 130, 1380, 1379, 1382,
- 1377, 1389, 1135, 257, 1393, 947, 1394, 1136, 1395, 910,
- 1326, 1413, 1418,-32768, 1419, 130, 1526, 1421, 130, 1437,
- 451, 1422, 1423, 1439, 130, 229, 1427, 595, 595, 595,
- 595, 1446, 452, 1431, 229, 229, 229, 229, 229, 229,
- 229, 229, 1432, 229, 1549, 1549, 1433, 1434, 1451, 1452,
- 1457, 1462, 1479, 1482, 1483, 1493, 1494, 324, 1469, 1501,
- 1502, 1505, 130, 1542, 1503, 1510, 453, 1140, 1536, 1565,
- 130, 454, 455, 456, 457, 458, 459, 460, 1556, 1141,
- 649, 649, 649, 649, 649, 461, 130, 185, 1566, 130,
- 130, 1564, 1571, 1567, 1575, 1576, 217, 649, 1140, 743,
- 514, 361, 968, 411, 1181, 248, 952, 947, 477, 1449,
- 1141, 925, 927,-32768, 1180, 1308, 1509, 910, 1532, 429,
- 1447, 1146, 1147, 1148, 1149, 1492, 1541, 1515, 1563, 997,
- 996, 955, 1150, 210, 151, 349, 489, 704, 1186, 704,
- 187, 389, 782, 151, 1142, 1465, 1527, 1551, 479, 383,
- 1464, 1461, 1146, 1147, 1148, 1149, 259, 1550, 130, 130,
- 1185, 215, 1558, 1150, 515, 1007, 134, 1535, 130, 229,
- 1532, 697, 1552, 1559, 130, 1472, 135, 1369, 136, 1568,
- 1215, 708, 130, 137, 698, 428, 256, 130, 915, 1496,
- 138, 0, 139, 130, 130, 140, 445, 0, 0, 130,
- 1264, 130, 1460, 0, 141, 130, 0, 0, 0, 0,
- 0, 142, 0, 0, -314, 0, 0, 0, 1533, 574,
- 0, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
- 0, 143, 0, 0, 0, 0, 0, 0, 144, 145,
- 446, 0, 0, 595, 595, 447, 0, 146, 0, 0,
- 330, 448, 595, 595, 595, 595, 595, 595, 130, 0,
- 0, 0, 596, 0, 0, 0, 0, 0, 0, 0,
- 1533, 0, 1569, 0, 0, 0, 429, 1521, 0, 0,
- 0, 0, 130, 0, 130, 89, 0, 0, 650, 649,
- 0, 0, 595, 0, 0, 0, 0, 0, 0, 0,
- 0, 649, 649, 649, 649, 649, 649, 444, 0, 182,
- 0, 0, 445, 0, 0, 90, 130, 0, 0, 0,
- 0, 0, 91, 0, 0, 0, 0, 429, 0, 0,
- 0, 0, 0, 0, 0, 0, 451, 92, 0, 0,
- 0, 0, 0, 0, 0, 93, 94, 0, 452, 0,
- 0, 95, 96, 97, 0, 0, 446, 0, 0, 0,
- 0, 447, 130, 0, 98, 0, 0, 448, 0, 0,
- 0, 130, 99, 0, 0, 0, 0, 449, 130, 100,
- 0, 0, 453, 450, 101, 0, 102, 103,-32768,-32768,
- 457, 458, 459, 460, 0, 0, 0, 0, 130, 0,
- 0, 461, 0, 0, 104, 105, 0, 106, 0, 107,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 596, 596, 596, 596, 0, 0, 0, 116,
- 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
- 120, 0, 451, 0, 121, 0, 0, 122, 0, 0,
- 123, 124, 0, 0, 452, 0, 0, 125, 126, 0,
- 0, 127, 1133, 0, 0, 0, 128, 1134, 129, 0,
- 0, 0, 0, 0, 0, 650, 650, 650, 650, 650,
- 0, 0, 0, 0, 0, 0, 0, 0, 453, 0,
- 0, 906, 650, 454, 455, 456, 457, 458, 459, 460,
- 0, 0, 130, 649, 130, 0, 0, 461, 0, 0,
- 1061, 1135, 0, 0, 0, 130, 1136, 130, 0, 0,
- 0, 0, 1137, 130, 0, 0, 130, 0, 130, 130,
- 130, 130, 1138, 0, 0, 0, 0, 0, 1139, 0,
- 130, 130, 0, 130, 0, 0, 0, 0, 1133, 130,
- 0, 0, 0, 1134, 0, 130, 0, 0, 0, 130,
- 0, 0, 0, 0, 944, 0, 0, 0, 130, 130,
- 130, 130, 0, 0, 0, 130, 0, 130, 130, 0,
- 0, 0, 130, 0, 0, 483, 0, 0, 429, 130,
- 130, 0, 0, 0, 0, 0, 0, 1135, 0, 0,
- 0, 0, 1136, 0, 0, 0, 0, 1140, 1137, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1138, 1141,
- 0, 0, 0, 0, 1139, 429, 0, 0, 0, 0,
- 0, 0, 1133, 0, 0, 0, 0, 1134, 596, 596,
- 0, 0, 0, 0, 0, 0, 0, 596, 596, 596,
- 596, 596, 596, 1142, 0, 0, 0, 0, 1143, 1144,
- 1145, 1146, 1147, 1148, 1149, 0, 0, 0, 0, 0,
- 0, 0, 1150, 0, 429, 1151, 0, 429, 0, 0,
- 0, 1135, 0, 0, 650, 0, 1136, 596, 0, 0,
- 0, 0, 1137, 1140, 0, 0, 650, 650, 650, 650,
- 650, 650, 1138, 415, 0, 1141, 0, 0, 1139, 0,
- 0, 130, 0, 0, 130, 0, 0, 130, 430, 0,
- 0, 431, 0, 432, 433, 434, 438, 0, 0, 0,
- 0, 429, 0, 444, 0, 0, 0, 0, 445, 1142,
- 0, 0, 0, 0, 1143, 1144, 1145, 1146, 1147, 1148,
- 1149, 0, 153, 0, 130, 130, 0, 0, 1150, 0,
- 0, 1277, 0, 130, 154, 0, 0, 130, 944, 155,
- 944, 944, 944, 944, 944, 944, 156, 1140, 157, 0,
- 0, 158, 446, 0, 0, 0, 0, 447, 549, 1141,
- 159, 130, 1175, 448, 0, 0, 0, 160, 0, 0,
- 161, 0, 0, 449, 0, 0, 564, 0, 0, 450,
- 0, 0, 0, 0, 0, 0, 0, 162, 163, 0,
- 0, 0, 0, 1142, 164, 165, 0, 0, 1143, 1144,
- 1145, 1146, 1147, 1148, 1149, 607, 0, 0, 0, 0,
- 0, 0, 1150, 444, 0, 1396, 0, 0, 445, 0,
- 0, 0, 0, 0, 0, 0, 632, 0, 0, 0,
- 658, 0, 662, 0, 0, 666, 670, 674, 678, 682,
- 686, 690, 694, 0, 696, 0, 0, 0, 451, 0,
- 0, 429, 0, 0, 0, 0, 0, 0, 0, 0,
- 452, 0, 446, 0, 0, 0, 0, 447, 0, 0,
- 0, 0, 0, 448, 0, 0, 0, 0, 650, 130,
- 0, 130, 0, 449, 0, 0, 0, 0, 0, 450,
- 0, 130, 0, 0, 453, 0, 130, 0, 0, 454,
- 455, 456, 457, 458, 459, 460, 0, 444, 0, 429,
- 0, 0, 445, 461, 0, 0, 1553, 0, 0, 0,
- 0, 0, 483, 0, 0, 429, 0, 0, 944, 0,
- 0, 130, 0, 0, 0, 0, 944, 0, 0, 0,
- 944, 0, 944, 946, 0, 944, 944, 944, 944, 944,
- 944, 944, 944, 0, 0, 944, 446, 0, 451, 0,
- 0, 447, 944, 130, 0, 0, 0, 448, 0, 130,
- 452, 1175, 1175, 1175, 1175, 1175, 1175, 449, 429, 0,
- 0, 0, 0, 450, 0, 607, 0, 607, 607, 0,
- 0, 0, 0, 0, 846, 429, 0, 1342, 0, 0,
- 0, 0, 0, 0, 453, 0, 429, 0, 0, 454,
- 455, 456, 457, 458, 459, 460, 0, 0, 0, 0,
- 0, 0, 0, 461, -586, 0, 0, 0, 0, 862,
- 0, 0, 0, 0, 0, 0, 0, 0, 130, 0,
- 0, 0, 0, 878, 0, 0, 0, 438, 0, 0,
- 0, 438, 451, 0, 0, 438, 429, 0, 0, 438,
- 0, 0, 429, 438, 452, 0, 0, 438, 0, 0,
- 0, 438, 0, 0, 1175, 438, 0, 0, 0, 0,
- 0, 0, 0, 0, 946, 0, 0, 0, 0, 0,
- 0, 0, 944, 0, 0, 0, 0, 0, 453, 0,
- 0, 429, 0, 454, 455, 456, 457, 458, 459, 460,
- 0, 1134, 1175, 0, 0, 0, 0, 461, -585, 0,
- 0, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 0,
- 1175, 0, 0, 0, 0, 0, 0, 0, 0, 429,
- 0, 0, 0, 0, 0, 0, 130, 946, 0, 946,
- 946, 946, 946, 946, 946, 1135, 429, 429, 0, 0,
- 1136, 0, 0, 0, 429, 0, 1137, 0, 130, 0,
- 0, 946, 0, 0, 0, 0, 1015, 444, 0, 0,
- 1537, 0, 445, 0, 0, 0, 0, 0, 0, 0,
- 607, 0, 0, 130, 944, 0, 130, 0, 130, 429,
- 429, 0, 130, 0, 0, 0, 1035, 0, 1538, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 429,
- 0, 429, 0, 0, 0, 429, 446, 0, 597, 0,
- 0, 447, 0, 0, 0, 0, 0, 448, 607, 0,
- 0, 0, 0, 0, 0, 0, 0, 449, 0, 0,
- 0, 1140, 0, 450, 651, 0, 1175, 0, 0, 0,
- 0, 0, 0, 1141, 0, 444, 0, 0, 0, 0,
- 445, 0, 0, 0, 0, 0, 0, 130, 0, 0,
- 0, 0, 0, 0, 1539, 1101, 0, 0, 946, 0,
- 0, 0, 0, 0, 0, 0, 0, 1142, 0, 0,
- 0, 0, 0,-32768,-32768, 1146, 1147, 1148, 1149, 0,
- 0, 0, 0, 0, 446, 0, 1150, 0, 0, 447,
- 0, 0, 451, 0, 0, 448, 0, 0, 0, 130,
- 0, 130, 0, 0, 452, 449, 0, 946, 0, 0,
- 0, 450, 0, 0, 0, 946, 946, 0, 0, 946,
- 0, 946, 0, 0, 946, 946, 946, 946, 946, 946,
- 946, 946, 0, 0, 946, 0, 0, 0, 453, 0,
- 0, 946, 0, 454, 455, 456, 457, 458, 459, 460,
- 946, 946, 946, 946, 946, 946, 0, 461, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 597, 597,
- 597, 597, 607, 607, 607, 0, 0, 0, 0, 0,
- 451, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 452, 0, 0, 0, 0, 0, 0, 1216,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 607,
- 607, 607, 444, 946, 783, 0, 0, 445, 0, 0,
- 0, 651, 651, 651, 651, 651, 453, 0, 0, 0,
- 0, 454, 455, 456, 457, 458, 459, 460, 651, 903,
- 0, 0, 0, 0, 904, 461, 0, 0, 0, 0,
- 0, 0, 0, 946, 0, 0, 0, 0, 0, 444,
- 0, 446, 0, 946, 445, 0, 447, 0, 0, 946,
- 0, 946, 448, 0, 444, 0, 0, 0, 0, 445,
- 0, 0, 449, 0, 0, 0, 0, 0, 450, 0,
- 0, 946, 0, 0, 0, 0, 0, 0, 0, 0,
- 946, 946, 946, 946, 946, 946, 946, 946, 446, 946,
- 945, 0, 0, 447, 0, 0, 0, 833, 0, 448,
- 0, 0, 0, 446, 0, 0, 0, 0, 447, 449,
- 0, 0, 0, 0, 448, 450, 0, 0, 0, 0,
- 0, 0, 0, 0, 449, 0, 946, 0, 0, 0,
- 450, 0, 0, 0, 0, 0, 0, 451, 0, 0,
- 0, 0, 0, 0, 946, 0, 0, 0, 0, 452,
- 0, 946, 0, 946, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 597, 597, 0, 0, 0, 0,
- 0, 0, 0, 597, 597, 597, 597, 597, 597, 0,
- 0, 0, 0, 453, 451, 0, 0, 0, 454, 455,
- 456, 457, 458, 459, 460, 0, 452, 0, 1374, 451,
- 0, 0, 461, 0, 0, 0, 946, 0, 946, 0,
- 651, 452, 0, 597, 0, 946, 0, 0, 0, 0,
- 0, 0, 651, 651, 651, 651, 651, 651, 0, 0,
- 453, 1074, 0, 0, 0, 454, 455, 456, 457, 458,
- 459, 460, 0, 0, 0, 453, 0, 0, 1253, 461,
- 454, 455, 456, 457, 458, 459, 460, 0, 0, 0,
- 0, 0, 0, 0, 461, 0, 0, 0, 0, 0,
- 0, 0, 0, 89, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 277, 278, 0,
- 0, 0, 0, 0, 945, 0, 945, 945, 945, 945,
- 945, 945, 0, 90, 523, 0, 0, 0, 0, 0,
- 524, 0, 0, 0, 0, 0, 0, 525, 1176, 0,
- 0, 0, 0, 0, 1133, 92, 1381, 0, 0, 1134,
- 0, 0, 0, 93, 94, 0, 0, 0, 0, 95,
- 96, 97, 0, 289, 0, 290, 0, 0, 0, 0,
- 526, 0, 98, 0, 0, 0, 0, 0, 0, 0,
- 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
- 0, 0, 101, 1135, 102, 103, 0, 0, 1136, 0,
- 0, 0, 0, 0, 1137, 0, 300, 0, 0, 0,
- 0, 0, 104, 105, 1138, 106, 0, 107, 0, 0,
- 1139, 0, 0, 0, 0, 108, 0, 0, 109, 110,
- 111, 0, 112, 0, 1508, 0, 113, 0, 114, 115,
- 0, 1134, 0, 0, 0, 0, 0, 116, 117, 118,
- 0, 0, 0, 1529, 651, 1236, 119, 0, 120, 0,
- 0, 0, 121, 0, 0, 122, 0, 0, 123, 124,
- 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
- 0, 0, 0, 0, 128, 1135, 129, 0, 1508, 1140,
- 1136, 0, 0, 0, 0, 0, 1137, 0, 0, 0,
- 0, 1141, 0, 0, 945, 0, 1138, 0, 0, 0,
- 527, 0, 945, 1280, 444, 0, 945, 0, 945, 445,
- 0, 945, 945, 945, 945, 945, 945, 945, 945, 1133,
- 0, 945, 0, 0, 1134, 1142, 0, 0, 945, 0,
- 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1176, 1176, 1176,
- 1176, 1176, 1176, 0, 1150, 0, 0, 0, 0, 0,
- 0, 0, 0, 446, 0, 0, 0, 0, 447, 0,
- 0, 0, 0, 0, 448, 0, 0, 0, 1135, 0,
- 0, 1140, 0, 1136, 449, 0, 0, 0, 0, 1137,
- 450, 0, 0, 1141, 0, 0, 0, 0, 0, 1138,
- 0, 0, 0, 0, 0, 1139, 0, 0, 0, 0,
- 1362, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 1142, 0, 0,
- 0, 0, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 0,
- 0, 0, 0, 0, 0, 0, 1150, 0, 0, 0,
- 1176, 0, 0, 0, 0, 0, 0, 0, 0, 451,
- 1280, 0, 0, 0, 0, 0, 1280, 0, 945, 0,
- 0, 452, 0, 0, 1140, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 1141, 0, 1176, 0,
- 0, 0, 0, 0, 0, 0, 0, 1176, 1176, 1176,
- 1176, 1176, 1176, 1176, 1176, 453, 1176, 0, 0, 0,
- 454, 455, 456, 457, 458, 459, 460, 0, 0, 0,
- 1142, 0, 0, 0, 461, 1143, 1144, 1145, 1146, 1147,
- 1148, 1149, 0, 0, 0, 0, 0, 0, 0, 1150,
- 0, 0, 0, 1435, 0, 0, 0, 0, 0, 0,
- 89, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1280, 0, 276, 277, 278, 0, 0, 1280, 0,
- 945, 0, 0, 0, 182, 279, 280, 281, 282, 0,
- 90, 283, 0, 0, 0, 0, 0, 284, 0, 0,
- 0, 285, 286, 0, 287, 0, 0, 0, 0, 0,
- 0, 0, 92, 0, 0, 0, 288, 0, 0, 0,
- 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
- 289, 0, 290, 1280, 291, 1280, 292, 293, 0, 98,
- 0, 0, 1176, 0, 294, 0, 0, 99, 0, 0,
- 0, 0, 0, 0, 100, 0, 0, 295, 0, 296,
- 297, 102, 103, 0, 0, 0, 298, 0, 0, 0,
- 299, 0, 0, 300, 0, 0, 0, 0, 0, 104,
- 105, 301, 106, 302, 303, 0, 0, 0, 0, 0,
- 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
- 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
- 0, 0, 0, 0, 116, 117, 118, 0, 183, 0,
- 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
- 0, 0, 122, 304, 0, 123, 124, 0, 0, 0,
- 0, 0, 125, 126, 0, 0, 127, 0, 0, 0,
- 0, 128, 0, 305, 205, 306, 267, 307, 308, 89,
- 0, 0, 0, 0, 309, 705, 0, 311, 312, 313,
- 0, 0, 276, 277, 278, 0, 314, 706, 0, 0,
- 0, 0, 0, 182, 279, 280, 281, 282, 0, 90,
- 283, 0, 0, 0, 0, 0, 284, 0, 0, 0,
- 285, 286, 0, 287, 0, 0, 0, 0, 0, 0,
- 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
- 0, 290, 0, 291, 0, 292, 293, 0, 98, 0,
- 0, 0, 0, 294, 0, 0, 99, 0, 0, 0,
- 0, 0, 0, 100, 0, 0, 295, 0, 296, 297,
- 102, 103, 0, 0, 0, 298, 0, 0, 0, 299,
- 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
- 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
- 0, 0, 0, 116, 117, 118, 0, 183, 0, 0,
- 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
- 0, 122, 304, 0, 123, 124, 0, 0, 0, 0,
- 0, 125, 126, 0, 0, 127, 0, 0, 0, 0,
- 128, 0, 305, 205, 306, 267, 307, 308, 89, 0,
- 0, 0, 0, 309, 0, 0, 311, 312, 313, 0,
- 0, 276, 277, 278, 0, 314, 1032, 0, 0, 0,
- 0, 0, 182, 279, 280, 281, 282, 0, 90, 283,
- 0, 0, 0, 0, 0, 284, 0, 0, 0, 285,
- 286, 0, 287, 0, 0, 0, 0, 0, 0, 0,
- 92, 0, 0, 0, 288, 0, 0, 0, 93, 94,
- 0, 0, 0, 0, 95, 96, 97, 0, 289, 0,
- 290, 0, 291, 0, 292, 293, 0, 98, 0, 0,
- 0, 0, 294, 0, 0, 99, 0, 0, 0, 0,
- 0, 0, 100, 0, 0, 295, 0, 296, 297, 102,
- 103, 0, 0, 0, 298, 0, 0, 0, 299, 0,
- 0, 300, 0, 0, 0, 0, 0, 104, 105, 301,
- 106, 302, 303, 0, 0, 0, 0, 0, 0, 0,
- 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
- 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
- 0, 0, 116, 117, 118, 0, 183, 0, 0, 0,
- 0, 119, 0, 120, 0, 0, 0, 121, 0, 0,
- 122, 304, 0, 123, 124, 0, 0, 0, 0, 0,
- 125, 126, 0, 0, 127, 0, 0, 0, 0, 128,
- 0, 305, 205, 306, 267, 307, 308, 89, 0, 0,
- 0, 0, 309, 0, 0, 311, 312, 313, 0, 0,
- 1161, 277, 278, 0, 314, 1069, 0, 0, 0, 0,
- 0, 0, 1162, 1163, 1164, 1165, 0, 90, 283, 0,
- 0, 0, 0, 0, 284, 0, 0, 0, 0, 0,
- 0, 287, 0, 0, 0, 0, 0, 0, 0, 92,
- 0, 0, 0, 288, 0, 0, 0, 93, 94, 0,
- 0, 0, 0, 95, 96, 97, 0, 289, 0, 290,
- 0, 0, 0, 1166, 293, 0, 98, 0, 0, 0,
- 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
- 0, 100, 0, 0, 0, 0, 296, 297, 102, 103,
- 0, 0, 0, 0, 0, 0, 0, 1167, 0, 0,
- 300, 0, 0, 0, 0, 0, 104, 105, 301, 106,
- 302, 303, 0, 0, 0, 0, 0, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 0, 0, 0, 0, 0,
- 119, 0, 120, 0, 0, 0, 121, 0, 0, 122,
- 304, 0, 123, 124, 0, 0, 0, 0, 0, 125,
- 126, 0, 0, 127, 0, 89, 0, 0, 128, 0,
- 305, 205, 1168, 267, 307, 308, 0, 0, 934, 277,
- 278, 1169, 0, 0, 1170, 1171, 1172, 0, 0, 0,
- 0, 0, 0, 1173, 1410, 90, 283, 0, 0, 0,
- 0, 0, 284, 0, 0, 0, 0, 0, 0, 287,
- 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
- 0, 288, 0, 0, 0, 93, 94, 0, 0, 0,
- 0, 95, 96, 97, 0, 289, 0, 290, 0, 935,
- 0, 936, 293, 0, 98, 0, 0, 0, 0, 0,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 0, 0, 296, 297, 102, 103, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 300, 0,
- 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 0, 0, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
- 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 0, 0, 0, 0, 128, 0, 305, 205,
- 937, 267, 307, 308, 0, 89, 0, 0, 0, 938,
- 0, 0, 939, 940, 941, 603, 0, 0, 276, 277,
- 278, 942, 1300, 0, 0, 0, 0, 0, 0, 182,
- 279, 280, 281, 282, 0, 90, 283, 0, 0, 0,
- 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
- 0, 0, 604, 0, 0, 0, 0, 92, 0, 0,
- 0, 288, 0, 0, 0, 93, 94, 605, 0, 0,
- 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
- 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 295, 0, 296, 297, 102, 103, 0, 606,
- 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
- 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
- 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 0, 0, 0, 0, 128, 0, 305, 205,
- 306, 267, 307, 308, 0, 89, 0, 0, 0, 309,
- 0, 0, 311, 312, 313, 1020, 0, 0, 276, 277,
- 278, 314, 0, 0, 0, 0, 0, 0, 0, 182,
- 279, 280, 281, 282, 0, 90, 283, 0, 0, 0,
- 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
- 0, 0, 604, 0, 0, 0, 0, 92, 0, 0,
- 0, 288, 0, 0, 0, 93, 94, 1021, 0, 0,
- 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
- 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 295, 0, 296, 297, 102, 103, 0, 1022,
- 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
- 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
- 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 0, 0, 0, 0, 128, 0, 305, 205,
- 306, 267, 307, 308, 0, 89, 0, 0, 0, 309,
- 0, 0, 311, 312, 313, 1057, 0, 0, 276, 277,
- 278, 314, 0, 0, 0, 0, 0, 0, 0, 182,
- 279, 280, 281, 282, 0, 90, 283, 0, 0, 0,
- 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
- 0, 0, 604, 0, 0, 0, 0, 92, 0, 0,
- 0, 288, 0, 0, 0, 93, 94, 1058, 0, 0,
- 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
- 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 295, 0, 296, 297, 102, 103, 0, 1059,
- 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
- 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
- 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 89, 0, 0, 0, 128, 0, 305, 205,
- 306, 267, 307, 308, 0, 276, 277, 278, 0, 309,
- 0, 0, 311, 312, 313, 0, 182, 279, 280, 281,
- 282, 314, 90, 283, 0, 0, 0, 0, 0, 284,
- 0, 0, 0, 285, 286, 0, 287, 0, 0, 0,
- 0, 0, 0, 0, 92, 0, 0, 0, 288, 0,
- 0, 0, 93, 94, 0, 0, 0, 0, 95, 96,
- 97, 0, 289, 0, 290, 0, 291, 0, 292, 293,
- 0, 98, 0, 0, 0, 0, 294, 0, 0, 99,
- 0, 0, 0, 0, 0, 0, 100, 0, 0, 295,
- 0, 296, 297, 102, 103, 0, 0, 0, 298, 0,
- 0, 0, 299, 0, 0, 300, 0, 0, 0, 0,
- 0, 104, 105, 301, 106, 302, 303, 0, 0, 0,
- 0, 0, 0, 0, 108, 0, 0, 109, 110, 111,
- 0, 112, 0, 0, 0, 113, 0, 114, 115, 0,
- 0, 0, 0, 0, 0, 0, 116, 117, 118, 0,
- 183, 0, 0, 0, 0, 119, 0, 120, 0, 0,
- 0, 121, 0, 0, 122, 304, 0, 123, 124, 0,
- 0, 0, 0, 0, 125, 126, 0, 0, 127, 89,
- 0, 667, 0, 128, 668, 305, 205, 306, 267, 307,
- 308, 0, 276, 277, 278, 0, 309, 310, 0, 311,
- 312, 313, 0, 182, 279, 280, 281, 282, 314, 90,
- 283, 0, 0, 0, 0, 0, 284, 0, 0, 0,
- 285, 286, 0, 287, 0, 0, 0, 0, 0, 0,
- 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
- 0, 290, 0, 291, 0, 0, 293, 0, 98, 0,
- 0, 0, 0, 294, 0, 0, 99, 0, 0, 0,
- 0, 0, 0, 100, 0, 0, 295, 0, 296, 297,
- 102, 103, 0, 0, 0, 298, 0, 0, 0, 299,
- 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
- 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
- 0, 0, 0, 116, 117, 118, 0, 183, 0, 0,
- 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
- 0, 122, 304, 0, 123, 124, 0, 0, 0, 0,
- 0, 125, 126, 0, 0, 127, 89, 0, 671, 0,
- 128, 672, 305, 205, 306, 267, 307, 308, 0, 276,
- 277, 278, 0, 309, 0, 0, 311, 312, 313, 0,
- 182, 279, 280, 281, 282, 669, 90, 283, 0, 0,
- 0, 0, 0, 284, 0, 0, 0, 285, 286, 0,
- 287, 0, 0, 0, 0, 0, 0, 0, 92, 0,
- 0, 0, 288, 0, 0, 0, 93, 94, 0, 0,
- 0, 0, 95, 96, 97, 0, 289, 0, 290, 0,
- 291, 0, 0, 293, 0, 98, 0, 0, 0, 0,
- 294, 0, 0, 99, 0, 0, 0, 0, 0, 0,
- 100, 0, 0, 295, 0, 296, 297, 102, 103, 0,
- 0, 0, 298, 0, 0, 0, 299, 0, 0, 300,
- 0, 0, 0, 0, 0, 104, 105, 301, 106, 302,
- 303, 0, 0, 0, 0, 0, 0, 0, 108, 0,
- 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
- 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
- 116, 117, 118, 0, 183, 0, 0, 0, 0, 119,
- 0, 120, 0, 0, 0, 121, 0, 0, 122, 304,
- 0, 123, 124, 0, 0, 0, 0, 0, 125, 126,
- 0, 0, 127, 89, 0, 675, 0, 128, 676, 305,
- 205, 306, 267, 307, 308, 0, 276, 277, 278, 0,
- 309, 0, 0, 311, 312, 313, 0, 182, 279, 280,
- 281, 282, 673, 90, 283, 0, 0, 0, 0, 0,
- 284, 0, 0, 0, 285, 286, 0, 287, 0, 0,
- 0, 0, 0, 0, 0, 92, 0, 0, 0, 288,
- 0, 0, 0, 93, 94, 0, 0, 0, 0, 95,
- 96, 97, 0, 289, 0, 290, 0, 291, 0, 0,
- 293, 0, 98, 0, 0, 0, 0, 294, 0, 0,
- 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
- 295, 0, 296, 297, 102, 103, 0, 0, 0, 298,
- 0, 0, 0, 299, 0, 0, 300, 0, 0, 0,
- 0, 0, 104, 105, 301, 106, 302, 303, 0, 0,
- 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
- 111, 0, 112, 0, 0, 0, 113, 0, 114, 115,
- 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
- 0, 183, 0, 0, 0, 0, 119, 0, 120, 0,
- 0, 0, 121, 0, 0, 122, 304, 0, 123, 124,
- 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
- 89, 0, 679, 0, 128, 680, 305, 205, 306, 267,
- 307, 308, 0, 276, 277, 278, 0, 309, 0, 0,
- 311, 312, 313, 0, 182, 279, 280, 281, 282, 677,
- 90, 283, 0, 0, 0, 0, 0, 284, 0, 0,
- 0, 285, 286, 0, 287, 0, 0, 0, 0, 0,
- 0, 0, 92, 0, 0, 0, 288, 0, 0, 0,
- 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
- 289, 0, 290, 0, 291, 0, 0, 293, 0, 98,
- 0, 0, 0, 0, 294, 0, 0, 99, 0, 0,
- 0, 0, 0, 0, 100, 0, 0, 295, 0, 296,
- 297, 102, 103, 0, 0, 0, 298, 0, 0, 0,
- 299, 0, 0, 300, 0, 0, 0, 0, 0, 104,
- 105, 301, 106, 302, 303, 0, 0, 0, 0, 0,
- 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
- 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
- 0, 0, 0, 0, 116, 117, 118, 0, 183, 0,
- 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
- 0, 0, 122, 304, 0, 123, 124, 0, 0, 0,
- 0, 0, 125, 126, 0, 0, 127, 89, 0, 683,
- 0, 128, 684, 305, 205, 306, 267, 307, 308, 0,
- 276, 277, 278, 0, 309, 0, 0, 311, 312, 313,
- 0, 182, 279, 280, 281, 282, 681, 90, 283, 0,
- 0, 0, 0, 0, 284, 0, 0, 0, 285, 286,
- 0, 287, 0, 0, 0, 0, 0, 0, 0, 92,
- 0, 0, 0, 288, 0, 0, 0, 93, 94, 0,
- 0, 0, 0, 95, 96, 97, 0, 289, 0, 290,
- 0, 291, 0, 0, 293, 0, 98, 0, 0, 0,
- 0, 294, 0, 0, 99, 0, 0, 0, 0, 0,
- 0, 100, 0, 0, 295, 0, 296, 297, 102, 103,
- 0, 0, 0, 298, 0, 0, 0, 299, 0, 0,
- 300, 0, 0, 0, 0, 0, 104, 105, 301, 106,
- 302, 303, 0, 0, 0, 0, 0, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 183, 0, 0, 0, 0,
- 119, 0, 120, 0, 0, 0, 121, 0, 0, 122,
- 304, 0, 123, 124, 0, 0, 0, 0, 0, 125,
- 126, 0, 0, 127, 89, 0, 687, 0, 128, 688,
- 305, 205, 306, 267, 307, 308, 0, 276, 277, 278,
- 0, 309, 0, 0, 311, 312, 313, 0, 182, 279,
- 280, 281, 282, 685, 90, 283, 0, 0, 0, 0,
- 0, 284, 0, 0, 0, 285, 286, 0, 287, 0,
- 0, 0, 0, 0, 0, 0, 92, 0, 0, 0,
- 288, 0, 0, 0, 93, 94, 0, 0, 0, 0,
- 95, 96, 97, 0, 289, 0, 290, 0, 291, 0,
- 0, 293, 0, 98, 0, 0, 0, 0, 294, 0,
- 0, 99, 0, 0, 0, 0, 0, 0, 100, 0,
- 0, 295, 0, 296, 297, 102, 103, 0, 0, 0,
- 298, 0, 0, 0, 299, 0, 0, 300, 0, 0,
- 0, 0, 0, 104, 105, 301, 106, 302, 303, 0,
- 0, 0, 0, 0, 0, 0, 108, 0, 0, 109,
- 110, 111, 0, 112, 0, 0, 0, 113, 0, 114,
- 115, 0, 0, 0, 0, 0, 0, 0, 116, 117,
- 118, 0, 183, 0, 0, 0, 0, 119, 0, 120,
- 0, 0, 0, 121, 0, 0, 122, 304, 0, 123,
- 124, 0, 0, 0, 0, 0, 125, 126, 0, 0,
- 127, 89, 0, 691, 0, 128, 692, 305, 205, 306,
- 267, 307, 308, 0, 276, 277, 278, 0, 309, 0,
- 0, 311, 312, 313, 0, 182, 279, 280, 281, 282,
- 689, 90, 283, 0, 0, 0, 0, 0, 284, 0,
- 0, 0, 285, 286, 0, 287, 0, 0, 0, 0,
- 0, 0, 0, 92, 0, 0, 0, 288, 0, 0,
- 0, 93, 94, 0, 0, 0, 0, 95, 96, 97,
- 0, 289, 0, 290, 0, 291, 0, 0, 293, 0,
- 98, 0, 0, 0, 0, 294, 0, 0, 99, 0,
- 0, 0, 0, 0, 0, 100, 0, 0, 295, 0,
- 296, 297, 102, 103, 0, 0, 0, 298, 0, 0,
- 0, 299, 0, 0, 300, 0, 0, 0, 0, 0,
- 104, 105, 301, 106, 302, 303, 0, 0, 0, 0,
- 0, 0, 0, 108, 0, 0, 109, 110, 111, 0,
- 112, 0, 0, 0, 113, 0, 114, 115, 0, 0,
- 0, 0, 0, 0, 0, 116, 117, 118, 0, 183,
- 0, 0, 0, 0, 119, 0, 120, 0, 0, 0,
- 121, 0, 0, 122, 304, 0, 123, 124, 0, 0,
- 0, 0, 0, 125, 126, 0, 0, 127, 89, 0,
- 0, 0, 128, 0, 305, 205, 306, 267, 307, 308,
- 0, 276, 277, 278, 0, 309, 0, 0, 311, 312,
- 313, 0, 182, 279, 280, 281, 282, 693, 90, 283,
- 0, 0, 0, 0, 0, 284, 0, 0, 0, 285,
- 286, 0, 287, 0, 0, 604, 0, 0, 0, 0,
- 92, 0, 0, 0, 288, 0, 0, 0, 93, 94,
- 0, 0, 0, 0, 95, 96, 97, 0, 289, 0,
- 290, 0, 291, 0, 292, 293, 0, 98, 0, 0,
- 0, 0, 294, 0, 0, 99, 0, 0, 0, 0,
- 0, 0, 100, 0, 0, 295, 0, 296, 297, 102,
- 103, 0, 0, 0, 298, 0, 0, 0, 299, 0,
- 0, 300, 0, 0, 0, 0, 0, 104, 105, 301,
- 106, 302, 303, 0, 0, 0, 0, 0, 0, 0,
- 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
- 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
- 0, 0, 116, 117, 118, 0, 183, 0, 0, 0,
- 0, 119, 0, 120, 0, 0, 0, 121, 0, 0,
- 122, 304, 0, 123, 124, 0, 0, 0, 0, 0,
- 125, 126, 0, 0, 127, 89, 0, 0, 0, 128,
- 0, 305, 205, 306, 267, 307, 308, 0, 276, 277,
- 278, 0, 309, 0, 0, 311, 312, 313, 0, 182,
- 279, 280, 281, 282, 314, 90, 283, 0, 0, 0,
- 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
- 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
- 0, 288, 0, 0, 0, 93, 94, 0, 0, 0,
- 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
- 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 570, 0, 295, 0, 296, 297, 102, 103, 0, 0,
- 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
- 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
- 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 89, 0, 0, 0, 128, 0, 305, 205,
- 306, 267, 307, 308, 0, 276, 277, 278, 0, 309,
- 0, 0, 311, 312, 313, 0, 182, 279, 280, 281,
- 282, 314, 90, 283, 0, 0, 0, 0, 0, 284,
- 0, 0, 0, 285, 286, 0, 287, 0, 0, 0,
- 0, 0, 0, 0, 92, 0, 0, 0, 288, 0,
- 0, 0, 93, 94, 0, 0, 0, 0, 95, 96,
- 97, 0, 289, 0, 290, 0, 291, 0, 292, 293,
- 0, 98, 0, 0, 0, 0, 294, 0, 0, 99,
- 0, 0, 0, 0, 0, 0, 100, 0, 0, 295,
- 0, 296, 297, 102, 103, 0, 0, 0, 298, 0,
- 0, 0, 299, 0, 0, 300, 0, 0, 0, 0,
- 0, 104, 105, 301, 106, 302, 303, 0, 0, 0,
- 0, 0, 0, 0, 108, 0, 0, 109, 110, 111,
- 0, 112, 0, 0, 0, 113, 0, 114, 115, 0,
- 0, 0, 0, 0, 0, 0, 116, 117, 118, 0,
- 183, 0, 0, 0, 0, 119, 0, 120, 0, 0,
- 0, 121, 0, 0, 122, 304, 0, 123, 124, 0,
- 0, 0, 0, 0, 125, 126, 0, 0, 127, 89,
- 0, 663, 0, 128, 664, 305, 205, 306, 267, 307,
- 308, 0, 276, 277, 278, 0, 309, 0, 0, 311,
- 312, 313, 0, 182, 279, 280, 281, 282, 314, 90,
- 283, 0, 0, 0, 0, 0, 284, 0, 0, 0,
- 285, 286, 0, 287, 0, 0, 0, 0, 0, 0,
- 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
- 0, 290, 0, 0, 0, 0, 293, 0, 98, 0,
- 0, 0, 0, 294, 0, 0, 99, 0, 0, 0,
- 0, 0, 0, 100, 0, 0, 295, 0, 296, 297,
- 102, 103, 0, 0, 0, 298, 0, 0, 0, 299,
- 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
- 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
- 0, 0, 0, 116, 117, 118, 0, 183, 0, 0,
- 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
- 0, 122, 304, 0, 123, 124, 0, 0, 0, 0,
- 0, 125, 126, 0, 0, 127, 89, 0, 0, 0,
- 128, 0, 305, 205,-32768, 267, 307, 308, 0, 276,
- 277, 278, 0, 309, 0, 0, 311, 312, 313, 0,
- 182, 279, 280, 281, 282, 665, 90, 283, 0, 0,
- 0, 0, 0, 284, 0, 0, 0, 285, 286, 0,
- 287, 0, 0, 0, 0, 0, 0, 0, 92, 0,
- 0, 0, 288, 0, 0, 0, 93, 94, 0, 0,
- 0, 0, 95, 96, 97, 0, 289, 0, 290, 0,
- 291, 0, 0, 293, 0, 98, 0, 0, 0, 0,
- 294, 0, 0, 99, 0, 0, 0, 0, 0, 0,
- 100, 570, 0, 295, 0, 296, 297, 102, 103, 0,
- 0, 0, 298, 0, 0, 0, 299, 0, 0, 300,
- 0, 0, 0, 0, 0, 104, 105, 301, 106, 302,
- 303, 0, 0, 0, 0, 0, 0, 0, 108, 0,
- 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
- 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
- 116, 117, 118, 0, 183, 0, 0, 0, 0, 119,
- 0, 120, 0, 0, 0, 121, 0, 0, 122, 304,
- 0, 123, 124, 0, 0, 0, 0, 0, 125, 126,
- 0, 0, 127, 89, 0, 0, 0, 128, 0, 305,
- 205, 306, 267, 307, 308, 0, 276, 277, 278, 0,
- 309, 0, 0, 311, 312, 313, 0, 182, 279, 280,
- 281, 282, 314, 90, 283, 0, 0, 0, 0, 0,
- 284, 0, 0, 0, 285, 286, 0, 287, 0, 0,
- 0, 0, 0, 0, 0, 92, 0, 0, 0, 288,
- 0, 0, 0, 93, 94, 0, 0, 0, 0, 95,
- 96, 97, 0, 289, 0, 290, 0, 291, 0, 0,
- 293, 0, 98, 0, 0, 0, 0, 294, 0, 0,
- 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
- 295, 0, 296, 297, 102, 103, 0, 0, 0, 298,
- 0, 0, 0, 299, 0, 0, 300, 0, 0, 0,
- 0, 0, 104, 105, 301, 106, 302, 303, 0, 0,
- 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
- 111, 0, 112, 0, 0, 0, 113, 0, 114, 115,
- 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
- 0, 183, 0, 0, 0, 0, 119, 0, 120, 0,
- 0, 0, 121, 0, 0, 122, 304, 0, 123, 124,
- 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
- 89, 0, 0, 0, 128, 0, 305, 205, 306, 267,
- 307, 308, 0, 633, 277, 278, 0, 309, 0, 0,
- 311, 312, 313, 0, 182, 634, 635, 636, 637, 314,
- 90, 283, 0, 0, 0, 0, 0, 284, 0, 0,
- 0, 0, 0, 0, 287, 0, 0, 0, 0, 0,
- 0, 0, 92, 0, 0, 0, 288, 0, 0, 0,
- 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
- 289, 0, 290, 0, 0, 0, 0, 293, 0, 98,
- 0, 0, 0, 0, 638, 0, 0, 99, 0, 0,
- 0, 0, 0, 0, 100, 0, 0, 639, 0, 296,
- 297, 102, 103, 0, 0, 0, 640, 0, 0, 0,
- 641, 0, 0, 300, 0, 0, 0, 0, 0, 104,
- 105, 301, 106, 302, 303, 0, 0, 0, 0, 0,
- 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
- 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
- 0, 0, 0, 0, 116, 117, 118, 0, 183, 0,
- 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
- 0, 0, 122, 304, 0, 123, 124, 0, 0, 0,
- 0, 0, 125, 126, 0, 0, 127, 89, 0, 0,
- 0, 128, 0, 305, 205, 642, 267, 307, 308, 0,
- 633, 277, 278, 0, 643, 0, 0, 644, 645, 646,
- 0, 182, 634, 635, 636, 637, 647, 90, 283, 0,
- 0, 0, 0, 0, 284, 0, 0, 0, 0, 0,
- 0, 287, 0, 0, 0, 0, 0, 0, 0, 92,
- 0, 0, 0, 288, 0, 0, 0, 93, 94, 0,
- 0, 0, 0, 95, 96, 97, 0, 289, 0, 290,
- 0, 0, 0, 0, 293, 0, 98, 0, 0, 0,
- 0, 638, 0, 0, 99, 0, 0, 0, 0, 0,
- 0, 100, 0, 0, 639, 0, 296, 297, 102, 103,
- 0, 0, 0, 640, 0, 0, 0, 641, 0, 0,
- 300, 0, 0, 0, 0, 0, 104, 105, 301, 106,
- 302, 303, 0, 0, 0, 0, 0, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 183, 0, 0, 0, 0,
- 119, 0, 120, 0, 0, 0, 121, 0, 0, 122,
- 304, 0, 123, 124, 0, 0, 0, 0, 0, 125,
- 126, 0, 0, 127, 89, 0, 0, 0, 128, 0,
- 305, 205,-32768, 267, 307, 308, 0, 1161, 277, 278,
- 0, 643, 0, 0, 644, 645, 646, 0, 0, 1162,
- 1163, 1164, 1165, 647, 90, 283, 0, 0, 0, 0,
- 0, 284, 0, 0, 0, 0, 0, 0, 287, 0,
- 0, 0, 0, 0, 0, 0, 92, 0, 0, 0,
- 288, 0, 0, 0, 93, 94, 0, 0, 0, 0,
- 95, 96, 97, 0, 289, 0, 290, 0, 0, 0,
- 1166, 293, 0, 98, 0, 0, 0, 0, 0, 0,
- 0, 99, 0, 0, 0, 0, 0, 0, 100, 0,
- 0, 0, 0, 296, 297, 102, 103, 0, 0, 0,
- 0, 0, 0, 0, 1167, 0, 0, 300, 0, 0,
- 0, 0, 0, 104, 105, 301, 106, 302, 303, 0,
- 0, 0, 0, 0, 0, 0, 108, 0, 0, 109,
- 110, 111, 0, 112, 0, 0, 0, 113, 0, 114,
- 115, 0, 0, 0, 0, 0, 0, 0, 116, 117,
- 118, 0, 0, 0, 0, 0, 0, 119, 0, 120,
- 0, 0, 0, 121, 0, 0, 122, 304, 0, 123,
- 124, 0, 0, 0, 0, 0, 125, 126, 0, 0,
- 127, 89, 0, 0, 0, 128, 0, 305, 205, 1168,
- 267, 307, 308, 0, 1161, 277, 278, 0, 1169, 0,
- 0, 1170, 1171, 1172, 0, 0, 1162, 1163, 1164, 1165,
- 1173, 90, 283, 0, 0, 0, 0, 0, 284, 0,
- 0, 0, 0, 0, 0, 287, 0, 0, 0, 0,
- 0, 0, 0, 92, 0, 0, 0, 288, 0, 0,
- 0, 93, 94, 0, 0, 0, 0, 95, 96, 97,
- 0, 289, 0, 290, 0, 0, 0, 1166, 293, 0,
- 98, 0, 0, 0, 0, 0, 0, 0, 99, 0,
- 0, 0, 0, 0, 0, 100, 0, 0, 0, 0,
- 296, 297, 102, 103, 0, 0, 0, 0, 0, 0,
- 0, 1167, 0, 0, 300, 0, 0, 0, 0, 0,
- 104, 105, 301, 106, 302, 303, 0, 0, 0, 0,
- 0, 0, 0, 108, 0, 0, 109, 110, 111, 0,
- 112, 0, 0, 0, 113, 0, 114, 115, 0, 0,
- 0, 0, 0, 0, 0, 116, 117, 118, 0, 0,
- 0, 0, 0, 0, 119, 0, 120, 0, 0, 0,
- 121, 0, 0, 122, 304, 0, 123, 124, 0, 0,
- 0, 0, 0, 125, 126, 0, 0, 127, 89, 0,
- 0, 0, 128, 0, 305, 205,-32768, 267, 307, 308,
- 0, 585, 277, 278, 0, 1169, 0, 0, 1170, 1171,
- 1172, 0, 182, 0, 0, 0, 0, 1173, 90, 283,
- 0, 0, 0, 0, 0, 284, 0, 0, 0, 0,
- 0, 0, 287, 0, 0, 0, 0, 0, 0, 0,
- 92, 0, 0, 0, 288, 0, 0, 0, 93, 94,
- 0, 0, 0, 0, 95, 96, 97, 0, 289, 0,
- 290, 0, 0, 0, 0, 293, 0, 98, 0, 0,
- 0, 0, 586, 0, 0, 99, 0, 0, 0, 0,
- 0, 0, 100, 0, 0, 587, 0, 296, 297, 102,
- 103, 0, 0, 0, 588, 0, 0, 0, 0, 0,
- 0, 300, 0, 0, 0, 0, 0, 104, 105, 301,
- 106, 302, 303, 0, 0, 0, 0, 0, 0, 0,
- 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
- 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
- 0, 0, 116, 117, 118, 0, 183, 0, 0, 0,
- 0, 119, 0, 120, 0, 0, 0, 121, 0, 0,
- 122, 304, 0, 123, 124, 0, 0, 0, 0, 0,
- 125, 126, 0, 0, 127, 89, 0, 0, 0, 128,
- 0, 305, 205, 589, 267, 307, 308, 0, 585, 277,
- 278, 0, 590, 0, 0, 591, 0, 0, 0, 182,
- 0, 0, 0, 0, 592, 90, 283, 0, 0, 0,
- 0, 0, 284, 0, 0, 0, 0, 0, 0, 287,
- 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
- 0, 288, 0, 0, 0, 93, 94, 0, 0, 0,
- 0, 95, 96, 97, 0, 289, 0, 290, 0, 0,
- 0, 0, 293, 0, 98, 0, 0, 0, 0, 586,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 587, 0, 296, 297, 102, 103, 0, 0,
- 0, 588, 0, 0, 0, 0, 0, 0, 300, 0,
- 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
- 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 89, 0, 0, 0, 128, 0, 305, 205,
--32768, 267, 307, 308, 0, 934, 277, 278, 0, 590,
- 0, 0, 591, 0, 0, 0, 0, 0, 0, 0,
- 0, 592, 90, 283, 0, 0, 0, 0, 0, 284,
- 0, 0, 0, 0, 0, 0, 287, 0, 0, 0,
- 0, 0, 0, 0, 92, 0, 0, 0, 288, 0,
- 0, 0, 93, 94, 0, 0, 0, 0, 95, 96,
- 97, 0, 289, 0, 290, 0, 935, 0, 936, 293,
- 0, 98, 0, 0, 0, 0, 0, 0, 0, 99,
- 0, 0, 0, 0, 0, 0, 100, 0, 0, 0,
- 0, 296, 297, 102, 103, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 300, 0, 0, 0, 0,
- 0, 104, 105, 301, 106, 302, 303, 0, 0, 0,
- 0, 0, 0, 0, 108, 0, 0, 109, 110, 111,
- 0, 112, 0, 0, 0, 113, 0, 114, 115, 0,
- 0, 0, 0, 0, 0, 0, 116, 117, 118, 0,
- 0, 0, 0, 0, 0, 119, 0, 120, 0, 0,
- 0, 121, 0, 0, 122, 304, 0, 123, 124, 0,
- 0, 0, 0, 0, 125, 126, 0, 0, 127, 89,
- 0, 0, 0, 128, 0, 305, 205, 937, 267, 307,
- 308, 0, 934, 277, 278, 0, 938, 0, 0, 939,
- 940, 941, 0, 0, 0, 0, 0, 0, 942, 90,
- 283, 0, 0, 0, 1133, 0, 284, 0, 0, 1134,
- 0, 0, 0, 287, 0, 0, 0, 0, 0, 0,
- 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
- 0, 290, 0, 0, 0, 936, 293, 0, 98, 0,
- 0, 0, 0, 1135, 0, 0, 99, 0, 1136, 0,
- 0, 0, 0, 100, 1137, 0, 0, 0, 296, 297,
- 102, 103, 0, 0, 1138, 0, 0, 0, 0, 0,
- 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
- 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
- 0, 0, 0, 116, 117, 118, 0, 0, 0, 0,
- 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
- 0, 122, 304, 0, 123, 124, 0, 0, 0, 1140,
- 0, 125, 126, 0, 0, 127, 89, 0, 0, 0,
- 128, 1141, 305, 205,-32768, 267, 307, 308, 0, 0,
- 0, 0, 0, 938, 0, 0, 939, 940, 941, 0,
- 0, 0, 0, 0, 0, 942, 90, 0, 0, 0,
- 0, 0, 0, 91, 0, 1142, 0, 0, 0, 0,
- 1143, 1144, 1145, 1146, 1147, 1148, 1149, 0, 92, 0,
- 0, 0, 0, 0, 1150, 0, 93, 94, 0, 0,
- 0, 0, 95, 96, 97, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 98, 0, 0, 0, 0,
- 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
- 100, 0, 0, 0, 0, 101, 0, 102, 103, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
- 107, 0, 0, 0, 0, 0, 0, 0, 108, 0,
- 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
- 0, 114, 115, 0, 0, 0, 0, 0, 90, 283,
- 116, 117, 118, 0, 0, 424, 0, 0, 0, 119,
- 0, 120, 287, 0, 0, 121, 0, 0, 122, 986,
- 92, 123, 124, 89, 288, 0, 0, 0, 125, 126,
- 0, 0, 127, 0, 0, 96, 97, 128, 0, 129,
- 205, 258, 267, 0, 987, 293, 236, 237, 238, 239,
- 988, 241, 242, 90, 0, 0, 543, 0, 0, 0,
- 91, 0, 100, 0, 0, 0, 0, 425, 297, 0,
- 0, 0, 0, 0, 0, 92, 0, 0, 0, 0,
- 0, 0, 233, 93, 94, 0, 0, 104, 0, 95,
- 96, 97, 426, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,
- 99, 234, 0, 0, 0, 0, 0, 100, 0, 0,
- 0, 0, 101, 0, 102, 103, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 104, 105, 0, 106, 0, 107, 0, 0,
- 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
- 111, 427, 112, 0, 0, 0, 113, 0, 114, 115,
- 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
- 89, 0, 0, 0, 0, 0, 119, 0, 120, 0,
- 0, 0, 121, 0, 0, 122, 0, 0, 123, 124,
- 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
- 90, 0, 0, 0, 128, 0, 129, 91, 235, 0,
- 0, 0, 0, 236, 237, 238, 239, 240, 241, 242,
- 0, 0, 92, 0, 0, 0, 0, 0, 0, 233,
- 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
- 0, 0, 0, 0, 0, 0, 0, 99, 234, 0,
- 0, 0, 0, 0, 100, 0, 0, 0, 0, 101,
- 0, 102, 103, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
- 105, 0, 106, 0, 107, 0, 0, 0, 0, 0,
- 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
- 0, 0, 0, 113, 0, 114, 115, 89, 0, 0,
- 0, 0, 0, 0, 116, 117, 118, 0, 0, 0,
- 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
- 0, 182, 122, 0, 0, 123, 124, 90, 0, 0,
- 0, 0, 125, 126, 91, 0, 127, 0, 0, 0,
- 0, 128, 0, 129, 0, 235, 0, 0, 0, 92,
- 236, 237, 238, 239, 240, 241, 242, 93, 94, 0,
- 0, 0, 0, 95, 96, 97, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
- 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
- 0, 100, 0, 0, 0, 0, 101, 0, 102, 103,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
- 0, 107, 0, 0, 0, 0, 0, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 89, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 183, 0, 0, 0, 0,
- 119, 0, 120, 0, 0, 0, 121, 90, 0, 122,
- 0, 0, 123, 124, 91, 0, 0, 0, 0, 125,
- 126, 0, 0, 127, 0, 0, 0, 0, 128, 92,
- 129, 0, 0, 0, 307, 0, 0, 93, 94, 0,
- 0, 0, 478, 95, 96, 97, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
- 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
- 0, 100, 0, 0, 0, 0, 101, 0, 102, 103,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
- 0, 107, 0, 0, 0, 0, 89, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 0, 90, 0, 0, 0,
- 119, 0, 120, 91, 0, 0, 121, 0, 0, 122,
- 0, 0, 123, 124, 0, 0, 0, 0, 92, 125,
- 126, 0, 0, 127, 0, 0, 93, 94, 128, 0,
- 129, 0, 95, 96, 97, 0, 0, 0, 0, 0,
- 0, 0, 380, 0, 0, 98, 0, 0, 0, 0,
- 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
- 100, 0, 0, 0, 0, 101, 0, 102, 103, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
- 107, 0, 0, 0, 0, 89, 0, 0, 108, 0,
- 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
- 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
- 116, 117, 118, 0, 0, 90, 0, 0, 0, 119,
- 0, 120, 91, 0, 0, 121, 0, 0, 122, 0,
- 0, 123, 124, 0, 0, 0, 0, 92, 125, 126,
- 0, 0, 127, 0, 0, 93, 94, 128, 0, 129,
- 0, 95, 96, 97, 0, 0, 0, 0, 0, 0,
- 0, 701, 0, 0, 98, 0, 0, 0, 0, 0,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 0, 0, 101, 0, 102, 103, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 104, 105, 0, 106, 0, 107,
- 0, 0, 0, 0, 89, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 0, 90, 0, 0, 0, 119, 0,
- 120, 91, 0, 0, 121, 0, 0, 122, 0, 0,
- 123, 124, 0, 0, 0, 0, 92, 125, 126, 0,
- 0, 127, 0, 0, 93, 94, 128, 0, 129, 0,
- 95, 96, 97, 0, 0, 0, 0, 0, 0, 0,
- 917, 0, 0, 98, 0, 0, 0, 0, 0, 0,
- 0, 99, 0, 0, 0, 0, 0, 0, 100, 0,
- 0, 0, 0, 101, 0, 102, 103, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 104, 105, 0, 106, 0, 107, 0,
- 0, 0, 0, 89, 0, 0, 108, 0, 0, 109,
- 110, 111, 0, 112, 0, 0, 0, 113, 0, 114,
- 115, 0, 0, 0, 0, 0, 0, 182, 116, 117,
- 118, 0, 0, 90, 0, 0, 0, 119, 0, 120,
- 91, 0, 0, 121, 0, 0, 122, 0, 0, 123,
- 124, 0, 0, 0, 0, 92, 125, 126, 0, 0,
- 127, 0, 0, 93, 94, 128, 0, 129, 0, 95,
- 96, 97, 0, 0, 0, 0, 0, 0, 0, 1111,
- 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,
- 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
- 0, 0, 101, 0, 102, 103, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 104, 105, 0, 106, 0, 107, 0, 0,
- 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
- 111, 0, 112, 89, 0, 0, 113, 0, 114, 115,
- 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
- 0, 183, 0, 0, 0, 0, 119, 0, 120, 0,
- 0, 0, 121, 90, 0, 122, 0, 0, 123, 124,
- 91, 0, 0, 0, 0, 125, 126, 0, 0, 127,
- 0, 0, 0, 0, 128, 92, 129, 0, 0, 0,
- 307, 0, 0, 93, 94, 0, 0, 0, 0, 95,
- 96, 97, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,
- 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
- 0, 0, 101, 0, 102, 103, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 104, 105, 0, 106, 0, 107, 0, 0,
- 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
- 111, 0, 112, 0, 0, 0, 113, 0, 114, 115,
- 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
- 89, 0, 0, 0, 0, 0, 119, 0, 120, 0,
- 0, 0, 121, 0, 0, 122, 0, 0, 123, 124,
- 0, 616, 0, 617, 0, 125, 126, 0, 0, 127,
- 90, 0, 0, 0, 128, 0, 129, 91, 0, 267,
- 0, 0, 0, 0, 0, 0, 618, 0, 0, 0,
- 619, 0, 92, 0, 0, 0, 0, 0, 0, 0,
- 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
- 0, 620, 0, 0, 621, 622, 0, 99, 0, 0,
- 0, 0, 0, 0, 100, 0, 0, 0, 623, 101,
- 0, 102, 103, 0, 0, 624, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
- 105, 625, 106, 626, 107, 0, 0, 0, 0, 0,
- 0, 0, 108, 627, 0, 109, 110, 111, 0, 112,
- 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
- 0, 0, 628, 0, 116, 117, 118, 0, 0, 89,
- 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
- 0, 0, 122, 277, 278, 123, 124, 0, 0, 0,
- 0, 0, 125, 126, 0, 629, 127, 0, 0, 90,
- 523, 128, 0, 129, 0, 0, 524, 0, 0, 0,
- 0, 0, 0, 525, 0, 0, 0, 0, 0, 0,
- 0, 92, 0, 0, 0, 0, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
- 0, 290, 0, 0, 0, 0, 526, 0, 98, 0,
- 0, 0, 0, 0, 0, 0, 99, 0, 0, 0,
- 0, 0, 0, 100, 0, 0, 0, 0, 101, 0,
- 102, 103, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
- 0, 106, 0, 107, 0, 0, 0, 0, 0, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 89,
- 0, 0, 0, 116, 117, 118, 0, 0, 0, 0,
- 0, 0, 119, 0, 120, 500, 0, 0, 121, 0,
- 501, 122, 0, 0, 123, 124, 0, 0, 0, 90,
- 0, 125, 126, 0, 0, 127, 91, 0, 0, 0,
- 128, 0, 129, 0, 0, 502, 0, 0, 0, 0,
- 0, 92, 0, 0, 0, 0, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 98, 0,
- 0, 0, 0, 0, 0, 503, 99, 0, 0, 0,
- 0, 0, 0, 100, 0, 0, 0, 0, 101, 0,
- 102, 103, 0, 0, 0, 0, 0, 504, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 104, 105,
- 0, 106, 0, 107, 0, 0, 0, 0, 89, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
- 0, 0, 182, 116, 117, 118, 0, 0, 90, 0,
- 0, 0, 119, 0, 120, 91, 0, 0, 121, 0,
- 0, 122, 0, 0, 123, 124, 0, 0, 0, 0,
- 92, 125, 126, 0, 0, 127, 0, 0, 93, 94,
- 128, 0, 129, 0, 95, 96, 97, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 98, 0, 0,
- 0, 0, 0, 0, 0, 99, 0, 0, 0, 0,
- 0, 0, 100, 0, 0, 0, 0, 101, 0, 102,
- 103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 104, 105, 0,
- 106, 0, 107, 0, 0, 0, 0, 89, 0, 0,
- 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
- 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
- 0, 0, 116, 117, 118, 0, 183, 90, 0, 0,
- 0, 119, 0, 120, 91, 0, 0, 121, 0, 0,
- 122, 0, 0, 123, 124, 0, 0, 773, 0, 92,
- 125, 126, 0, 0, 127, 0, 0, 93, 94, 128,
- 0, 129, 0, 95, 96, 97, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
- 0, 0, 0, 0, 99, 0, 774, 0, 0, 0,
- 0, 100, 0, 0, 0, 0, 101, 0, 102, 103,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
- 0, 107, 0, 0, 0, 0, 89, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 0, 90, 0, 0, 0,
- 119, 0, 120, 91, 0, 0, 121, 0, 0, 122,
- 0, 0, 123, 124, 0, 0, 0, 0, 92, 125,
- 126, 0, 0, 127, 0, 0, 93, 94, 128, 0,
- 129, 0, 95, 96, 97, 192, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 98, 0, 0, 0, 0,
- 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
- 100, 0, 0, 0, 0, 193, 0, 102, 103, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
- 107, 0, 0, 0, 0, 89, 0, 0, 108, 0,
- 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
- 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
- 116, 117, 118, 0, 0, 90, 0, 0, 0, 119,
- 0, 120, 91, 0, 0, 121, 0, 0, 122, 0,
- 0, 123, 124, 0, 0, 0, 0, 92, 125, 126,
- 0, 0, 127, 0, 0, 93, 94, 128, 0, 129,
- 0, 95, 96, 97, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 98, 0, 0, 0, 0, 0,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 0, 0, 101, 0, 102, 103, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 104, 105, 0, 106, 0, 107,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 89, 0, 0, 113, 0,
- 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
- 117, 118, 0, 0, 552, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 90, 0, 122, 0, 0,
- 123, 124, 91, 0, 0, 0, 0, 125, 126, 0,
- 0, 127, 0, 0, 0, 0, 128, 92, 129, 0,
- 0, 0, 0, 0, 0, 93, 94, 0, 0, 0,
- 0, 95, 96, 97, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 98, 0, 0, 0, 0, 0,
- 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
- 0, 0, 0, 0, 101, 0, 102, 103, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 104, 105, 0, 106, 0, 107,
- 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
- 109, 110, 111, 0, 112, 0, 0, 0, 113, 89,
- 114, 115, 0, 0, 0, 1106, 0, 0, 0, 116,
- 117, 118, 0, 0, 1002, 0, 0, 0, 119, 0,
- 120, 0, 0, 0, 121, 0, 0, 122, 0, 90,
- 123, 124, 0, 0, 0, 0, 91, 125, 126, 0,
- 0, 127, 0, 0, 0, 0, 128, 0, 129, 0,
- 0, 92, 0, 0, 0, 0, 0, 0, 0, 93,
- 94, 0, 0, 0, 0, 95, 96, 97, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 98, 0,
- 0, 0, 0, 0, 0, 0, 99, 0, 0, 0,
- 0, 0, 0, 100, 0, 0, 0, 0, 101, 0,
- 102, 103, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 104, 105,
- 0, 106, 0, 107, 0, 0, 0, 0, 89, 0,
- 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
- 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
- 0, 0, 0, 116, 117, 118, 0, 0, 90, 0,
- 0, 0, 119, 0, 120, 91, 0, 0, 121, 0,
- 0, 122, 0, 0, 123, 124, 0, 0, 0, 0,
- 92, 125, 126, 0, 0, 127, 0, 0, 93, 94,
- 128, 0, 129, 0, 95, 96, 97, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 98, 0, 0,
- 0, 0, 0, 0, 0, 99, 0, 0, 0, 0,
- 0, 0, 100, 0, 0, 0, 0, 101, 0, 102,
- 103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 104, 105, 0,
- 106, 0, 107, 0, 0, 0, 0, 89, 0, 0,
- 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
- 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
- 0, 0, 116, 117, 118, 0, 0, 90, 0, 0,
- 0, 119, 0, 120, 91, 0, 0, 121, 0, 0,
- 122, 0, 0, 123, 124, 0, 0, 0, 0, 92,
- 125, 126, 0, 0, 127, 0, 0, 93, 94, 128,
- 0, 129, 0, 95, 96, 97, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
- 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
- 0, 100, 0, 0, 0, 0, 211, 0, 102, 103,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
- 0, 107, 0, 0, 0, 0, 89, 0, 0, 108,
- 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
- 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
- 0, 116, 117, 118, 0, 0, 90, 0, 0, 0,
- 119, 0, 120, 91, 0, 0, 121, 0, 0, 122,
- 0, 0, 123, 124, 0, 0, 0, 0, 92, 125,
- 126, 0, 0, 127, 0, 0, 93, 94, 128, 0,
- 129, 0, 95, 96, 97, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 98, 0, 0, 0, 0,
- 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
- 100, 0, 0, 0, 0, 213, 0, 102, 103, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
- 107, 0, 0, 0, 0, 0, 0, 0, 108, 0,
- 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
- 0, 114, 115, 0, 0, 0, 277, 278, 0, 0,
- 116, 117, 118, 0, 0, 0, 0, 0, 0, 119,
- 0, 120, 90, 283, 0, 121, 0, 0, 122, 424,
- 0, 123, 124, 0, 0, 0, 287, 0, 125, 126,
- 277, 278, 127, 0, 92, 0, 0, 128, 288, 129,
- 0, 0, 0, 0, 0, 0, 90, 283, 0, 96,
- 97, 0, 289, 424, 290, 0, 0, 0, 0, 293,
- 287, 0, 0, 0, 0, 0, 0, 0, 92, 0,
- 0, 0, 288, 0, 0, 0, 100, 570, 0, 0,
- 0, 425, 297, 96, 97, 0, 289, 0, 290, 0,
- 0, 0, 0, 293, 0, 300, 0, 0, 0, 0,
- 0, 104, 0, 301, 0, 302, 426, 0, 0, 0,
- 100, 0, 0, 1, 0, 425, 297, 0, 2, 0,
- 0, 0, 0, 0, 0, 0, 0, 3, 0, 300,
- 4, 0, 5, 0, 0, 104, 0, 301, 0, 302,
- 426, 0, 6, 0, 7, 0, 0, 0, 8, 9,
- 10, 0, 0, 11, 0, 304, 0, 0, 0, 12,
- 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 427, 205, 0, 267, 307,
- 308, 0, 0, 0, 0, 14, 0, 0, 0, 304,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 15, 0, 16, 0, 17, 18, 0, 0, 427,
- 205, 0, 267, 307, 308, 277, 278, 0, 0, 19,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 90, 283, 0, 0, 20, 0, 0, 424, 0,
- 0, 0, 0, 21, 22, 287, 0, 0, 0, 0,
- 23, 24, 0, 92, 0, 0, 0, 288, 0, 0,
- 0, 25, 26, 27, 0, 0, 0, 28, 96, 97,
- 0, 289, 0, 290, 0, 0, 0, 29, 293, 0,
- 277, 278, 0, 0, 30, 0, 0, 0, 0, 0,
- 31, 0, 0, 0, 32, 100, 90, 283, 0, 0,
- 425, 297, 0, 424, 0, 0, 0, 0, 0, 0,
- 287, 0, 0, 0, 300, 0, 0, 0, 92, 0,
- 104, 0, 288, 0, 0, 426, 0, 0, 0, 0,
- 0, 0, 0, 96, 97, 0, 289, 0, 290, 0,
- 0, 0, 0, 293, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 100, 0, 0, 0, 0, 425, 297, 0, 0, 0,
- 0, 0, 0, 740, 304, 0, 0, 0, 0, 300,
- 0, 0, 0, 0, 0, 104, 0, 0, 0, 0,
- 426, 0, 0, 0, 427, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 304,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 427
+#define YYLAST 12730
+
+
+static const short yytable[] = {132,
+ 711, 223, 151, 346, 709, 262, 780, 244, 600, 713,
+ 185, 1008, 1009, 260, 194, 185, 791, 198, 1112, 253,
+ 488, 185, 1014, 1103, 324, 212, 214, 970, 185, 530,
+ 951, 857, 858, 859, 860, 861, 1051, 1328, 207, 722,
+ 184, 1429, 1430, 266, 1045, 195, 1424, 1046, 876, 470,
+ 695, 204, 337, 474, 464, 823, 707, 699, 216, 699,
+ 971, 500, 824, 491, 720, 492, 1279, 269, 1474, 1475,
+ 150, 824, 341, 1262, 1119, 824, 829, 1468, 831, 832,
+ 185, 471, 173, 824, 779, 347, 715, 1018, 500, 1511,
+ 1490, 502, 1455, 1543, 267, 809, 810, 811, 812, 799,
+ 493, 741, 756, 174, 169, 363, 269, 516, 1415, 364,
+ 219, 388, 1498, 397, 392, 1416, 1019, 170, 502, 824,
+ 821, 1499, 1500, 1473, 168, 414, 800, 1456, 517, 374,
+ 185, 503, 1120, 151, 151, 1055, 1544, 227, 229, 659,
+ 151, 185, 716, 175, 246, 1528, 444, 435, 185, 151,
+ 1512, 445, 151, 504, 151, 227, 229, 176, 503, 1469,
+ 222, 151, 151, 979, 1056, 1491, 825, -558, 914, 342,
+ 1476, 231, 152, 1513, 870, 825, 957, 185, 249, 825,
+ 504, 1210, 518, 660, 980, -558, 84, 825, 181, 1229,
+ 863, 208, 830, 959, 661, 446, 185, 1075, 85, 198,
+ 447, 224, 225, 1477, 339, 185, 448, 273, 230, 1425,
+ 205, 1573, 465, 205, 205, 1000, 449, 330, 177, 1388,
+ 254, 205, 255, 825, 981, 710, 345, 465, 494, 189,
+ 263, 1195, 1372, 201, 960, 348, 1218, 267, 982, 6,
+ 1052, 7, 1287, 198, 1153, 1154, 961, 560, 582, 267,
+ 962, 151, 1062, 1063, 1064, 1065, 1066, 1067, 1047, 873,
+ 203, 721, 13, 190, 561, 1572, 613, 151, 963, -526,
+ 151, 393, 1126, 385, 1127, 1128, 1129, 1130, 1131, 1132,
+ 948, 1023, 14, 654, 796, 655, 1288, -526, 1385, 497,
+ 498, 451, 919, 920, 567, 568, 569, 1289, 324, 797,
+ 1341, 577, 17, 452, 874, 86, 875, 1487, 6, 205,
+ 7, 1017, 1368, 584, 1443, 1370, 19, 267, 87, 382,
+ 1025, 1026, 1027, 1028, 1029, 1030, 798, 439, 199, 1060,
+ 656, 13, 657, 1386, 1049, 1387, 614, 453, 615, 484,
+ 185, -525, 454, 455, 456, 457, 458, 459, 460, 185,
+ 1450, 14, 473, 476, 476, 512, 461, 1516, 205, -525,
+ 1517, 727, 1518, 532, 1203, -784, 462, 1522, 246, 482,
+ 485, 17, 1010, 911, 151, 185, 1484, 218, 1485, 490,
+ 151, 864, 151, 542, 916, 19, 559, 1560, 864, 865,
+ 866, 867, 868, 1561, 1562, 600, 865, 866, 867, 868,
+ 869, 267, 1282, 1191, 1283, 551, 1357, 869, -556, 1031,
+ 1033, 1034, 530, 459, 460, 598, 530, 728, 729, 1523,
+ 975, 1042, 461, 1524, 978, 205, -556, -784, 736, 1102,
+ 737, 758, -791, 758, 758, 758, 758, 220, 738, 630,
+ 739, 652, 550, 600, 232, 750, 1220, 751, 554, 1284,
+ 555, 1285, 1312, 1313, 1314, 1315, 1316, 1317, 1068, 1070,
+ 818, 819, 1276, 704, 1232, 704, 1332, 264, 247, 820,
+ 1278, 724, 725, 726, 1286, 766, 1290, 767, 261, 1291,
+ 1292, 1293, 1294, 1295, 1296, 1297, 1298, 270, 1436, 1302,
+ 777, 330, 778, 1206, 1207, 1208, 1307, 151, 435, 271,
+ 867, 868, 435, 172, 272, 274, 435, 133, 957, 869,
+ 435, 340, 167, 958, 435, 741, 742, 275, 435, 188,
+ 343, 344, 435, 196, 350, 959, 435, 1463, 1197, 1341,
+ 1225, 1226, 1227, 351, 1201, 173, 789, 352, 790, 1318,
+ 803, 354, 804, 185, 1319, 1320, 1321, 1322, 1323, 1324,
+ 1325, 355, 776, 815, 357, 1378, 174, 359, 1326, 776,
+ 362, 816, 817, 818, 819, 732, 960, 1148, 1149, 1116,
+ 366, 1117, 820, 768, 1324, 1325, 1150, 367, 961, 704,
+ 369, 371, 962, 1326, 372, 598, 598, 598, 598, 736,
+ 777, 1118, 1155, 1397, 375, 465, 175, 1198, 376, 777,
+ 963, 1303, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408,
+ 176, 1412, 378, 324, 324, 260, 260, 777, 1391, 1304,
+ 1392, 1444, 985, 1445, 324, 1211, 1390, 407, 757, 379,
+ 759, 760, 761, 762, 445, 864, 384, 386, 652, 652,
+ 652, 652, 652, 865, 866, 867, 868, 814, 1453, 408,
+ 1454, 1444, 984, 1486, 869, 652, 395, 378, 1036, 1497,
+ 758, 758, 390, 394, 409, 97, 398, 1254, 881, 413,
+ 399, 177, 884, 1255, 400, 1545, 887, 1546, 446, 1554,
+ 890, 1555, 1256, 447, 893, 1013, 402, 403, 896, 448,
+ 1257, 100, 899, 185, -32768, 185, 902, 404, 421, 1016,
+ 405, 1258, 816, 817, 818, 819, 484, 417, 704, 419,
+ 420, 1259, 423, 820, 151, 1344, 410, 926, 442, 926,
+ 928, 929, 151, 905, 440, 910, 1260, 947, 1448, 922,
+ 443, 559, 926, 462, 956, 1534, 482, 1489, 467, 1299,
+ 185, 535, 468, 1050, 536, 469, 532, 486, 1053, 1054,
+ 532, 1113, 496, 17, 537, 513, 521, 533, 973, 246,
+ 995, 995, 246, 547, 538, 539, 151, 548, 151, 1004,
+ 969, 556, 563, 559, 451, 565, 994, 994, 1365, 267,
+ 1011, 1012, 924, 570, 540, -32768, 452, 578, 583, 815,
+ 931, 602, 1348, 865, 866, 867, 868, 816, 817, 818,
+ 819, 598, 598, 579, 869, 580, 330, 330, 820, 1358,
+ 598, 598, 598, 598, 598, 598, 581, 330, 461, 699,
+ 453, 712, 610, 611, 445, 454, 455, 456, 457, 458,
+ 459, 460, 612, 324, 1001, 1318, 1003, 714, 718, 461,
+ 1319, 1320, 1321, 1322, 1323, 1324, 1325, 652, 720, 731,
+ 598, 733, 734, 1373, 1326, 735, 744, 1400, 749, 652,
+ 652, 652, 652, 652, 652, 745, 746, 752, 446, 747,
+ 1346, 755, 1134, 447, 1347, 1071, 763, 764, 765, -32768,
+ 770, 769, 1077, 1078, 984, 1080, 1081, 771, 1083, 1084,
+ 781, 1086, 1087, 784, 1089, 1090, 772, 1092, 1093, 787,
+ 1095, 1096, 185, 1098, 1099, 1107, 788, 785, 704, 815,
+ 792, 794, 793, 795, 801, 1409, 1135, 816, 817, 818,
+ 819, 1136, 802, 805, 806, 1504, 807, 1137, 820, 813,
+ 828, 947, 910, 947, 947, 947, 947, 947, 947, 447,
+ 827, 835, 1318, 808, 822, 559, 559, 1319, 1320, 1321,
+ 1322, 1323, 1324, 1325, 151, 229, 834, 847, 1179, 849,
+ 850, 1326, 836, 90, 451, 912, 851, 852, 853, 815,
+ 1442, 854, 855, 856, 871, 872, 452, 816, 817, 818,
+ 819, 879, 1190, 880, 864, 92, 339, 1274, 820, 932,
+ 953, 1024, 865, 866, 867, 868, 1305, 882, 883, 885,
+ 96, 97, 918, 869, 886, 974, 888, 1420, 976, 998,
+ 453, 889, 1140, 1466, 1467, 891, 892, 1428, 457, 458,
+ 459, 460, 1160, 894, 1141, 895, 330, 100, 897, 461,
+ 451, 913, 898, 900, 572, 573, 1005, 901, 949, 1488,
+ 950, 820, 452, 1037, 1105, 1039, 1212, 1040, 1041, 1043,
+ 1214, 869, 104, 1044, 1557, 1076, 1104, 1079, 1142, 1082,
+ 1109, 479, 1085, 1143, 1144, 1145, 1146, 1147, 1148, 1149,
+ 1088, 652, 1091, 1094, 1097, 1100, -32768, 1150, 1108, 1233,
+ 1114, 1121, 1122, 837, 457, 458, 459, 460, 838, 839,
+ 840, 841, 842, 843, 844, 461, -32768, 1123, 130, 1125,
+ 185, 130, 630, 1152, 1322, 1323, 1324, 1325, -791, 130,
+ 1156, 1157, 151, 130, 130, 1326, 130, 151, 1159, 1177,
+ 130, 947, 1178, 1182, 130, 130, 1184, 130, 1187, 947,
+ 910, 1188, 1189, 947, 1192, 947, 1194, 595, 947, 947,
+ 947, 947, 947, 947, 947, 947, 1196, 1199, 947, 1200,
+ 1231, 1202, 151, 1263, 1204, 947, 1205, 1209, 1213, 1217,
+ 445, 1219, 1221, 649, 229, 229, 229, 229, 229, 229,
+ 1222, 1223, 1224, 1228, 1230, 1237, 1238, 1239, 1240, 130,
+ 1269, 1241, 1242, 1243, 185, 1272, 1318, 1244, 1245, 1246,
+ 1343, 1247, -32768, -32768, 1322, 1323, 1324, 1325, 1248, 1333,
+ 1249, 1336, 1250, 1251, 446, 1326, 1398, 1399, 1265, 447,
+ 1252, 1266, 1268, 1270, 1335, 448, 1353, 1271, 1275, 1150,
+ 1356, 1329, 1281, 1306, 1309, 449, 1331, 1310, 1311, 130,
+ 1570, 1327, 130, 130, 1345, 1349, 130, 130, 1134, 130,
+ 130, 1350, 1351, 130, 1441, 1364, 1352, 130, 130, 1366,
+ 1354, 130, 1355, 130, 130, 130, 1136, 1359, 1360, 185,
+ 130, 130, 1361, 258, 1363, 228, 1371, 229, 236, 237,
+ 238, 239, 240, 241, 242, 1375, 130, 1380, 1379, 1382,
+ 1377, 1389, 1135, 257, 1393, 947, 1394, 1136, 1395, 910,
+ 1326, 1413, 1418, -32768, 1419, 130, 1526, 1421, 130, 1437,
+ 451, 1422, 1423, 1439, 130, 229, 1427, 595, 595, 595,
+ 595, 1446, 452, 1431, 229, 229, 229, 229, 229, 229,
+ 229, 229, 1432, 229, 1549, 1549, 1433, 1434, 1451, 1452,
+ 1457, 1462, 1479, 1482, 1483, 1493, 1494, 324, 1469, 1501,
+ 1502, 1505, 130, 1542, 1503, 1510, 453, 1140, 1536, 1565,
+ 130, 454, 455, 456, 457, 458, 459, 460, 1556, 1141,
+ 649, 649, 649, 649, 649, 461, 130, 185, 1566, 130,
+ 130, 1564, 1571, 1567, 1575, 1576, 217, 649, 1140, 743,
+ 514, 361, 968, 411, 1181, 248, 952, 947, 477, 1449,
+ 1141, 925, 927, -32768, 1180, 1308, 1509, 910, 1532, 429,
+ 1447, 1146, 1147, 1148, 1149, 1492, 1541, 1515, 1563, 997,
+ 996, 955, 1150, 210, 151, 349, 489, 704, 1186, 704,
+ 187, 389, 782, 151, 1142, 1465, 1527, 1551, 479, 383,
+ 1464, 1461, 1146, 1147, 1148, 1149, 259, 1550, 130, 130,
+ 1185, 215, 1558, 1150, 515, 1007, 134, 1535, 130, 229,
+ 1532, 697, 1552, 1559, 130, 1472, 135, 1369, 136, 1568,
+ 1215, 708, 130, 137, 698, 428, 256, 130, 915, 1496,
+ 138, 0, 139, 130, 130, 140, 445, 0, 0, 130,
+ 1264, 130, 1460, 0, 141, 130, 0, 0, 0, 0,
+ 0, 142, 0, 0, -314, 0, 0, 0, 1533, 574,
+ 0, 0, 0, 0, 0, 1521, 0, 0, 0, 0,
+ 0, 143, 0, 0, 0, 0, 0, 0, 144, 145,
+ 446, 0, 0, 595, 595, 447, 0, 146, 0, 0,
+ 330, 448, 595, 595, 595, 595, 595, 595, 130, 0,
+ 0, 0, 596, 0, 0, 0, 0, 0, 0, 0,
+ 1533, 0, 1569, 0, 0, 0, 429, 1521, 0, 0,
+ 0, 0, 130, 0, 130, 89, 0, 0, 650, 649,
+ 0, 0, 595, 0, 0, 0, 0, 0, 0, 0,
+ 0, 649, 649, 649, 649, 649, 649, 444, 0, 182,
+ 0, 0, 445, 0, 0, 90, 130, 0, 0, 0,
+ 0, 0, 91, 0, 0, 0, 0, 429, 0, 0,
+ 0, 0, 0, 0, 0, 0, 451, 92, 0, 0,
+ 0, 0, 0, 0, 0, 93, 94, 0, 452, 0,
+ 0, 95, 96, 97, 0, 0, 446, 0, 0, 0,
+ 0, 447, 130, 0, 98, 0, 0, 448, 0, 0,
+ 0, 130, 99, 0, 0, 0, 0, 449, 130, 100,
+ 0, 0, 453, 450, 101, 0, 102, 103, -32768, -32768,
+ 457, 458, 459, 460, 0, 0, 0, 0, 130, 0,
+ 0, 461, 0, 0, 104, 105, 0, 106, 0, 107,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 596, 596, 596, 596, 0, 0, 0, 116,
+ 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
+ 120, 0, 451, 0, 121, 0, 0, 122, 0, 0,
+ 123, 124, 0, 0, 452, 0, 0, 125, 126, 0,
+ 0, 127, 1133, 0, 0, 0, 128, 1134, 129, 0,
+ 0, 0, 0, 0, 0, 650, 650, 650, 650, 650,
+ 0, 0, 0, 0, 0, 0, 0, 0, 453, 0,
+ 0, 906, 650, 454, 455, 456, 457, 458, 459, 460,
+ 0, 0, 130, 649, 130, 0, 0, 461, 0, 0,
+ 1061, 1135, 0, 0, 0, 130, 1136, 130, 0, 0,
+ 0, 0, 1137, 130, 0, 0, 130, 0, 130, 130,
+ 130, 130, 1138, 0, 0, 0, 0, 0, 1139, 0,
+ 130, 130, 0, 130, 0, 0, 0, 0, 1133, 130,
+ 0, 0, 0, 1134, 0, 130, 0, 0, 0, 130,
+ 0, 0, 0, 0, 944, 0, 0, 0, 130, 130,
+ 130, 130, 0, 0, 0, 130, 0, 130, 130, 0,
+ 0, 0, 130, 0, 0, 483, 0, 0, 429, 130,
+ 130, 0, 0, 0, 0, 0, 0, 1135, 0, 0,
+ 0, 0, 1136, 0, 0, 0, 0, 1140, 1137, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 1138, 1141,
+ 0, 0, 0, 0, 1139, 429, 0, 0, 0, 0,
+ 0, 0, 1133, 0, 0, 0, 0, 1134, 596, 596,
+ 0, 0, 0, 0, 0, 0, 0, 596, 596, 596,
+ 596, 596, 596, 1142, 0, 0, 0, 0, 1143, 1144,
+ 1145, 1146, 1147, 1148, 1149, 0, 0, 0, 0, 0,
+ 0, 0, 1150, 0, 429, 1151, 0, 429, 0, 0,
+ 0, 1135, 0, 0, 650, 0, 1136, 596, 0, 0,
+ 0, 0, 1137, 1140, 0, 0, 650, 650, 650, 650,
+ 650, 650, 1138, 415, 0, 1141, 0, 0, 1139, 0,
+ 0, 130, 0, 0, 130, 0, 0, 130, 430, 0,
+ 0, 431, 0, 432, 433, 434, 438, 0, 0, 0,
+ 0, 429, 0, 444, 0, 0, 0, 0, 445, 1142,
+ 0, 0, 0, 0, 1143, 1144, 1145, 1146, 1147, 1148,
+ 1149, 0, 153, 0, 130, 130, 0, 0, 1150, 0,
+ 0, 1277, 0, 130, 154, 0, 0, 130, 944, 155,
+ 944, 944, 944, 944, 944, 944, 156, 1140, 157, 0,
+ 0, 158, 446, 0, 0, 0, 0, 447, 549, 1141,
+ 159, 130, 1175, 448, 0, 0, 0, 160, 0, 0,
+ 161, 0, 0, 449, 0, 0, 564, 0, 0, 450,
+ 0, 0, 0, 0, 0, 0, 0, 162, 163, 0,
+ 0, 0, 0, 1142, 164, 165, 0, 0, 1143, 1144,
+ 1145, 1146, 1147, 1148, 1149, 607, 0, 0, 0, 0,
+ 0, 0, 1150, 444, 0, 1396, 0, 0, 445, 0,
+ 0, 0, 0, 0, 0, 0, 632, 0, 0, 0,
+ 658, 0, 662, 0, 0, 666, 670, 674, 678, 682,
+ 686, 690, 694, 0, 696, 0, 0, 0, 451, 0,
+ 0, 429, 0, 0, 0, 0, 0, 0, 0, 0,
+ 452, 0, 446, 0, 0, 0, 0, 447, 0, 0,
+ 0, 0, 0, 448, 0, 0, 0, 0, 650, 130,
+ 0, 130, 0, 449, 0, 0, 0, 0, 0, 450,
+ 0, 130, 0, 0, 453, 0, 130, 0, 0, 454,
+ 455, 456, 457, 458, 459, 460, 0, 444, 0, 429,
+ 0, 0, 445, 461, 0, 0, 1553, 0, 0, 0,
+ 0, 0, 483, 0, 0, 429, 0, 0, 944, 0,
+ 0, 130, 0, 0, 0, 0, 944, 0, 0, 0,
+ 944, 0, 944, 946, 0, 944, 944, 944, 944, 944,
+ 944, 944, 944, 0, 0, 944, 446, 0, 451, 0,
+ 0, 447, 944, 130, 0, 0, 0, 448, 0, 130,
+ 452, 1175, 1175, 1175, 1175, 1175, 1175, 449, 429, 0,
+ 0, 0, 0, 450, 0, 607, 0, 607, 607, 0,
+ 0, 0, 0, 0, 846, 429, 0, 1342, 0, 0,
+ 0, 0, 0, 0, 453, 0, 429, 0, 0, 454,
+ 455, 456, 457, 458, 459, 460, 0, 0, 0, 0,
+ 0, 0, 0, 461, -586, 0, 0, 0, 0, 862,
+ 0, 0, 0, 0, 0, 0, 0, 0, 130, 0,
+ 0, 0, 0, 878, 0, 0, 0, 438, 0, 0,
+ 0, 438, 451, 0, 0, 438, 429, 0, 0, 438,
+ 0, 0, 429, 438, 452, 0, 0, 438, 0, 0,
+ 0, 438, 0, 0, 1175, 438, 0, 0, 0, 0,
+ 0, 0, 0, 0, 946, 0, 0, 0, 0, 0,
+ 0, 0, 944, 0, 0, 0, 0, 0, 453, 0,
+ 0, 429, 0, 454, 455, 456, 457, 458, 459, 460,
+ 0, 1134, 1175, 0, 0, 0, 0, 461, -585, 0,
+ 0, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 1175, 0,
+ 1175, 0, 0, 0, 0, 0, 0, 0, 0, 429,
+ 0, 0, 0, 0, 0, 0, 130, 946, 0, 946,
+ 946, 946, 946, 946, 946, 1135, 429, 429, 0, 0,
+ 1136, 0, 0, 0, 429, 0, 1137, 0, 130, 0,
+ 0, 946, 0, 0, 0, 0, 1015, 444, 0, 0,
+ 1537, 0, 445, 0, 0, 0, 0, 0, 0, 0,
+ 607, 0, 0, 130, 944, 0, 130, 0, 130, 429,
+ 429, 0, 130, 0, 0, 0, 1035, 0, 1538, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 429,
+ 0, 429, 0, 0, 0, 429, 446, 0, 597, 0,
+ 0, 447, 0, 0, 0, 0, 0, 448, 607, 0,
+ 0, 0, 0, 0, 0, 0, 0, 449, 0, 0,
+ 0, 1140, 0, 450, 651, 0, 1175, 0, 0, 0,
+ 0, 0, 0, 1141, 0, 444, 0, 0, 0, 0,
+ 445, 0, 0, 0, 0, 0, 0, 130, 0, 0,
+ 0, 0, 0, 0, 1539, 1101, 0, 0, 946, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1142, 0, 0,
+ 0, 0, 0, -32768, -32768, 1146, 1147, 1148, 1149, 0,
+ 0, 0, 0, 0, 446, 0, 1150, 0, 0, 447,
+ 0, 0, 451, 0, 0, 448, 0, 0, 0, 130,
+ 0, 130, 0, 0, 452, 449, 0, 946, 0, 0,
+ 0, 450, 0, 0, 0, 946, 946, 0, 0, 946,
+ 0, 946, 0, 0, 946, 946, 946, 946, 946, 946,
+ 946, 946, 0, 0, 946, 0, 0, 0, 453, 0,
+ 0, 946, 0, 454, 455, 456, 457, 458, 459, 460,
+ 946, 946, 946, 946, 946, 946, 0, 461, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 597, 597,
+ 597, 597, 607, 607, 607, 0, 0, 0, 0, 0,
+ 451, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 452, 0, 0, 0, 0, 0, 0, 1216,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 607,
+ 607, 607, 444, 946, 783, 0, 0, 445, 0, 0,
+ 0, 651, 651, 651, 651, 651, 453, 0, 0, 0,
+ 0, 454, 455, 456, 457, 458, 459, 460, 651, 903,
+ 0, 0, 0, 0, 904, 461, 0, 0, 0, 0,
+ 0, 0, 0, 946, 0, 0, 0, 0, 0, 444,
+ 0, 446, 0, 946, 445, 0, 447, 0, 0, 946,
+ 0, 946, 448, 0, 444, 0, 0, 0, 0, 445,
+ 0, 0, 449, 0, 0, 0, 0, 0, 450, 0,
+ 0, 946, 0, 0, 0, 0, 0, 0, 0, 0,
+ 946, 946, 946, 946, 946, 946, 946, 946, 446, 946,
+ 945, 0, 0, 447, 0, 0, 0, 833, 0, 448,
+ 0, 0, 0, 446, 0, 0, 0, 0, 447, 449,
+ 0, 0, 0, 0, 448, 450, 0, 0, 0, 0,
+ 0, 0, 0, 0, 449, 0, 946, 0, 0, 0,
+ 450, 0, 0, 0, 0, 0, 0, 451, 0, 0,
+ 0, 0, 0, 0, 946, 0, 0, 0, 0, 452,
+ 0, 946, 0, 946, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 597, 597, 0, 0, 0, 0,
+ 0, 0, 0, 597, 597, 597, 597, 597, 597, 0,
+ 0, 0, 0, 453, 451, 0, 0, 0, 454, 455,
+ 456, 457, 458, 459, 460, 0, 452, 0, 1374, 451,
+ 0, 0, 461, 0, 0, 0, 946, 0, 946, 0,
+ 651, 452, 0, 597, 0, 946, 0, 0, 0, 0,
+ 0, 0, 651, 651, 651, 651, 651, 651, 0, 0,
+ 453, 1074, 0, 0, 0, 454, 455, 456, 457, 458,
+ 459, 460, 0, 0, 0, 453, 0, 0, 1253, 461,
+ 454, 455, 456, 457, 458, 459, 460, 0, 0, 0,
+ 0, 0, 0, 0, 461, 0, 0, 0, 0, 0,
+ 0, 0, 0, 89, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 277, 278, 0,
+ 0, 0, 0, 0, 945, 0, 945, 945, 945, 945,
+ 945, 945, 0, 90, 523, 0, 0, 0, 0, 0,
+ 524, 0, 0, 0, 0, 0, 0, 525, 1176, 0,
+ 0, 0, 0, 0, 1133, 92, 1381, 0, 0, 1134,
+ 0, 0, 0, 93, 94, 0, 0, 0, 0, 95,
+ 96, 97, 0, 289, 0, 290, 0, 0, 0, 0,
+ 526, 0, 98, 0, 0, 0, 0, 0, 0, 0,
+ 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
+ 0, 0, 101, 1135, 102, 103, 0, 0, 1136, 0,
+ 0, 0, 0, 0, 1137, 0, 300, 0, 0, 0,
+ 0, 0, 104, 105, 1138, 106, 0, 107, 0, 0,
+ 1139, 0, 0, 0, 0, 108, 0, 0, 109, 110,
+ 111, 0, 112, 0, 1508, 0, 113, 0, 114, 115,
+ 0, 1134, 0, 0, 0, 0, 0, 116, 117, 118,
+ 0, 0, 0, 1529, 651, 1236, 119, 0, 120, 0,
+ 0, 0, 121, 0, 0, 122, 0, 0, 123, 124,
+ 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
+ 0, 0, 0, 0, 128, 1135, 129, 0, 1508, 1140,
+ 1136, 0, 0, 0, 0, 0, 1137, 0, 0, 0,
+ 0, 1141, 0, 0, 945, 0, 1138, 0, 0, 0,
+ 527, 0, 945, 1280, 444, 0, 945, 0, 945, 445,
+ 0, 945, 945, 945, 945, 945, 945, 945, 945, 1133,
+ 0, 945, 0, 0, 1134, 1142, 0, 0, 945, 0,
+ 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1176, 1176, 1176,
+ 1176, 1176, 1176, 0, 1150, 0, 0, 0, 0, 0,
+ 0, 0, 0, 446, 0, 0, 0, 0, 447, 0,
+ 0, 0, 0, 0, 448, 0, 0, 0, 1135, 0,
+ 0, 1140, 0, 1136, 449, 0, 0, 0, 0, 1137,
+ 450, 0, 0, 1141, 0, 0, 0, 0, 0, 1138,
+ 0, 0, 0, 0, 0, 1139, 0, 0, 0, 0,
+ 1362, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1142, 0, 0,
+ 0, 0, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 0,
+ 0, 0, 0, 0, 0, 0, 1150, 0, 0, 0,
+ 1176, 0, 0, 0, 0, 0, 0, 0, 0, 451,
+ 1280, 0, 0, 0, 0, 0, 1280, 0, 945, 0,
+ 0, 452, 0, 0, 1140, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 1141, 0, 1176, 0,
+ 0, 0, 0, 0, 0, 0, 0, 1176, 1176, 1176,
+ 1176, 1176, 1176, 1176, 1176, 453, 1176, 0, 0, 0,
+ 454, 455, 456, 457, 458, 459, 460, 0, 0, 0,
+ 1142, 0, 0, 0, 461, 1143, 1144, 1145, 1146, 1147,
+ 1148, 1149, 0, 0, 0, 0, 0, 0, 0, 1150,
+ 0, 0, 0, 1435, 0, 0, 0, 0, 0, 0,
+ 89, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 1280, 0, 276, 277, 278, 0, 0, 1280, 0,
+ 945, 0, 0, 0, 182, 279, 280, 281, 282, 0,
+ 90, 283, 0, 0, 0, 0, 0, 284, 0, 0,
+ 0, 285, 286, 0, 287, 0, 0, 0, 0, 0,
+ 0, 0, 92, 0, 0, 0, 288, 0, 0, 0,
+ 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
+ 289, 0, 290, 1280, 291, 1280, 292, 293, 0, 98,
+ 0, 0, 1176, 0, 294, 0, 0, 99, 0, 0,
+ 0, 0, 0, 0, 100, 0, 0, 295, 0, 296,
+ 297, 102, 103, 0, 0, 0, 298, 0, 0, 0,
+ 299, 0, 0, 300, 0, 0, 0, 0, 0, 104,
+ 105, 301, 106, 302, 303, 0, 0, 0, 0, 0,
+ 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
+ 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
+ 0, 0, 0, 0, 116, 117, 118, 0, 183, 0,
+ 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
+ 0, 0, 122, 304, 0, 123, 124, 0, 0, 0,
+ 0, 0, 125, 126, 0, 0, 127, 0, 0, 0,
+ 0, 128, 0, 305, 205, 306, 267, 307, 308, 89,
+ 0, 0, 0, 0, 309, 705, 0, 311, 312, 313,
+ 0, 0, 276, 277, 278, 0, 314, 706, 0, 0,
+ 0, 0, 0, 182, 279, 280, 281, 282, 0, 90,
+ 283, 0, 0, 0, 0, 0, 284, 0, 0, 0,
+ 285, 286, 0, 287, 0, 0, 0, 0, 0, 0,
+ 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
+ 0, 290, 0, 291, 0, 292, 293, 0, 98, 0,
+ 0, 0, 0, 294, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 100, 0, 0, 295, 0, 296, 297,
+ 102, 103, 0, 0, 0, 298, 0, 0, 0, 299,
+ 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
+ 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
+ 0, 0, 0, 116, 117, 118, 0, 183, 0, 0,
+ 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
+ 0, 122, 304, 0, 123, 124, 0, 0, 0, 0,
+ 0, 125, 126, 0, 0, 127, 0, 0, 0, 0,
+ 128, 0, 305, 205, 306, 267, 307, 308, 89, 0,
+ 0, 0, 0, 309, 0, 0, 311, 312, 313, 0,
+ 0, 276, 277, 278, 0, 314, 1032, 0, 0, 0,
+ 0, 0, 182, 279, 280, 281, 282, 0, 90, 283,
+ 0, 0, 0, 0, 0, 284, 0, 0, 0, 285,
+ 286, 0, 287, 0, 0, 0, 0, 0, 0, 0,
+ 92, 0, 0, 0, 288, 0, 0, 0, 93, 94,
+ 0, 0, 0, 0, 95, 96, 97, 0, 289, 0,
+ 290, 0, 291, 0, 292, 293, 0, 98, 0, 0,
+ 0, 0, 294, 0, 0, 99, 0, 0, 0, 0,
+ 0, 0, 100, 0, 0, 295, 0, 296, 297, 102,
+ 103, 0, 0, 0, 298, 0, 0, 0, 299, 0,
+ 0, 300, 0, 0, 0, 0, 0, 104, 105, 301,
+ 106, 302, 303, 0, 0, 0, 0, 0, 0, 0,
+ 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
+ 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
+ 0, 0, 116, 117, 118, 0, 183, 0, 0, 0,
+ 0, 119, 0, 120, 0, 0, 0, 121, 0, 0,
+ 122, 304, 0, 123, 124, 0, 0, 0, 0, 0,
+ 125, 126, 0, 0, 127, 0, 0, 0, 0, 128,
+ 0, 305, 205, 306, 267, 307, 308, 89, 0, 0,
+ 0, 0, 309, 0, 0, 311, 312, 313, 0, 0,
+ 1161, 277, 278, 0, 314, 1069, 0, 0, 0, 0,
+ 0, 0, 1162, 1163, 1164, 1165, 0, 90, 283, 0,
+ 0, 0, 0, 0, 284, 0, 0, 0, 0, 0,
+ 0, 287, 0, 0, 0, 0, 0, 0, 0, 92,
+ 0, 0, 0, 288, 0, 0, 0, 93, 94, 0,
+ 0, 0, 0, 95, 96, 97, 0, 289, 0, 290,
+ 0, 0, 0, 1166, 293, 0, 98, 0, 0, 0,
+ 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
+ 0, 100, 0, 0, 0, 0, 296, 297, 102, 103,
+ 0, 0, 0, 0, 0, 0, 0, 1167, 0, 0,
+ 300, 0, 0, 0, 0, 0, 104, 105, 301, 106,
+ 302, 303, 0, 0, 0, 0, 0, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 0, 0, 0, 0, 0,
+ 119, 0, 120, 0, 0, 0, 121, 0, 0, 122,
+ 304, 0, 123, 124, 0, 0, 0, 0, 0, 125,
+ 126, 0, 0, 127, 0, 89, 0, 0, 128, 0,
+ 305, 205, 1168, 267, 307, 308, 0, 0, 934, 277,
+ 278, 1169, 0, 0, 1170, 1171, 1172, 0, 0, 0,
+ 0, 0, 0, 1173, 1410, 90, 283, 0, 0, 0,
+ 0, 0, 284, 0, 0, 0, 0, 0, 0, 287,
+ 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
+ 0, 288, 0, 0, 0, 93, 94, 0, 0, 0,
+ 0, 95, 96, 97, 0, 289, 0, 290, 0, 935,
+ 0, 936, 293, 0, 98, 0, 0, 0, 0, 0,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 0, 0, 296, 297, 102, 103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 300, 0,
+ 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 0, 0, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
+ 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 0, 0, 0, 0, 128, 0, 305, 205,
+ 937, 267, 307, 308, 0, 89, 0, 0, 0, 938,
+ 0, 0, 939, 940, 941, 603, 0, 0, 276, 277,
+ 278, 942, 1300, 0, 0, 0, 0, 0, 0, 182,
+ 279, 280, 281, 282, 0, 90, 283, 0, 0, 0,
+ 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
+ 0, 0, 604, 0, 0, 0, 0, 92, 0, 0,
+ 0, 288, 0, 0, 0, 93, 94, 605, 0, 0,
+ 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
+ 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 295, 0, 296, 297, 102, 103, 0, 606,
+ 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
+ 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
+ 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 0, 0, 0, 0, 128, 0, 305, 205,
+ 306, 267, 307, 308, 0, 89, 0, 0, 0, 309,
+ 0, 0, 311, 312, 313, 1020, 0, 0, 276, 277,
+ 278, 314, 0, 0, 0, 0, 0, 0, 0, 182,
+ 279, 280, 281, 282, 0, 90, 283, 0, 0, 0,
+ 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
+ 0, 0, 604, 0, 0, 0, 0, 92, 0, 0,
+ 0, 288, 0, 0, 0, 93, 94, 1021, 0, 0,
+ 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
+ 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 295, 0, 296, 297, 102, 103, 0, 1022,
+ 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
+ 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
+ 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 0, 0, 0, 0, 128, 0, 305, 205,
+ 306, 267, 307, 308, 0, 89, 0, 0, 0, 309,
+ 0, 0, 311, 312, 313, 1057, 0, 0, 276, 277,
+ 278, 314, 0, 0, 0, 0, 0, 0, 0, 182,
+ 279, 280, 281, 282, 0, 90, 283, 0, 0, 0,
+ 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
+ 0, 0, 604, 0, 0, 0, 0, 92, 0, 0,
+ 0, 288, 0, 0, 0, 93, 94, 1058, 0, 0,
+ 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
+ 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 295, 0, 296, 297, 102, 103, 0, 1059,
+ 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
+ 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
+ 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 89, 0, 0, 0, 128, 0, 305, 205,
+ 306, 267, 307, 308, 0, 276, 277, 278, 0, 309,
+ 0, 0, 311, 312, 313, 0, 182, 279, 280, 281,
+ 282, 314, 90, 283, 0, 0, 0, 0, 0, 284,
+ 0, 0, 0, 285, 286, 0, 287, 0, 0, 0,
+ 0, 0, 0, 0, 92, 0, 0, 0, 288, 0,
+ 0, 0, 93, 94, 0, 0, 0, 0, 95, 96,
+ 97, 0, 289, 0, 290, 0, 291, 0, 292, 293,
+ 0, 98, 0, 0, 0, 0, 294, 0, 0, 99,
+ 0, 0, 0, 0, 0, 0, 100, 0, 0, 295,
+ 0, 296, 297, 102, 103, 0, 0, 0, 298, 0,
+ 0, 0, 299, 0, 0, 300, 0, 0, 0, 0,
+ 0, 104, 105, 301, 106, 302, 303, 0, 0, 0,
+ 0, 0, 0, 0, 108, 0, 0, 109, 110, 111,
+ 0, 112, 0, 0, 0, 113, 0, 114, 115, 0,
+ 0, 0, 0, 0, 0, 0, 116, 117, 118, 0,
+ 183, 0, 0, 0, 0, 119, 0, 120, 0, 0,
+ 0, 121, 0, 0, 122, 304, 0, 123, 124, 0,
+ 0, 0, 0, 0, 125, 126, 0, 0, 127, 89,
+ 0, 667, 0, 128, 668, 305, 205, 306, 267, 307,
+ 308, 0, 276, 277, 278, 0, 309, 310, 0, 311,
+ 312, 313, 0, 182, 279, 280, 281, 282, 314, 90,
+ 283, 0, 0, 0, 0, 0, 284, 0, 0, 0,
+ 285, 286, 0, 287, 0, 0, 0, 0, 0, 0,
+ 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
+ 0, 290, 0, 291, 0, 0, 293, 0, 98, 0,
+ 0, 0, 0, 294, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 100, 0, 0, 295, 0, 296, 297,
+ 102, 103, 0, 0, 0, 298, 0, 0, 0, 299,
+ 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
+ 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
+ 0, 0, 0, 116, 117, 118, 0, 183, 0, 0,
+ 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
+ 0, 122, 304, 0, 123, 124, 0, 0, 0, 0,
+ 0, 125, 126, 0, 0, 127, 89, 0, 671, 0,
+ 128, 672, 305, 205, 306, 267, 307, 308, 0, 276,
+ 277, 278, 0, 309, 0, 0, 311, 312, 313, 0,
+ 182, 279, 280, 281, 282, 669, 90, 283, 0, 0,
+ 0, 0, 0, 284, 0, 0, 0, 285, 286, 0,
+ 287, 0, 0, 0, 0, 0, 0, 0, 92, 0,
+ 0, 0, 288, 0, 0, 0, 93, 94, 0, 0,
+ 0, 0, 95, 96, 97, 0, 289, 0, 290, 0,
+ 291, 0, 0, 293, 0, 98, 0, 0, 0, 0,
+ 294, 0, 0, 99, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 295, 0, 296, 297, 102, 103, 0,
+ 0, 0, 298, 0, 0, 0, 299, 0, 0, 300,
+ 0, 0, 0, 0, 0, 104, 105, 301, 106, 302,
+ 303, 0, 0, 0, 0, 0, 0, 0, 108, 0,
+ 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
+ 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
+ 116, 117, 118, 0, 183, 0, 0, 0, 0, 119,
+ 0, 120, 0, 0, 0, 121, 0, 0, 122, 304,
+ 0, 123, 124, 0, 0, 0, 0, 0, 125, 126,
+ 0, 0, 127, 89, 0, 675, 0, 128, 676, 305,
+ 205, 306, 267, 307, 308, 0, 276, 277, 278, 0,
+ 309, 0, 0, 311, 312, 313, 0, 182, 279, 280,
+ 281, 282, 673, 90, 283, 0, 0, 0, 0, 0,
+ 284, 0, 0, 0, 285, 286, 0, 287, 0, 0,
+ 0, 0, 0, 0, 0, 92, 0, 0, 0, 288,
+ 0, 0, 0, 93, 94, 0, 0, 0, 0, 95,
+ 96, 97, 0, 289, 0, 290, 0, 291, 0, 0,
+ 293, 0, 98, 0, 0, 0, 0, 294, 0, 0,
+ 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
+ 295, 0, 296, 297, 102, 103, 0, 0, 0, 298,
+ 0, 0, 0, 299, 0, 0, 300, 0, 0, 0,
+ 0, 0, 104, 105, 301, 106, 302, 303, 0, 0,
+ 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
+ 111, 0, 112, 0, 0, 0, 113, 0, 114, 115,
+ 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
+ 0, 183, 0, 0, 0, 0, 119, 0, 120, 0,
+ 0, 0, 121, 0, 0, 122, 304, 0, 123, 124,
+ 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
+ 89, 0, 679, 0, 128, 680, 305, 205, 306, 267,
+ 307, 308, 0, 276, 277, 278, 0, 309, 0, 0,
+ 311, 312, 313, 0, 182, 279, 280, 281, 282, 677,
+ 90, 283, 0, 0, 0, 0, 0, 284, 0, 0,
+ 0, 285, 286, 0, 287, 0, 0, 0, 0, 0,
+ 0, 0, 92, 0, 0, 0, 288, 0, 0, 0,
+ 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
+ 289, 0, 290, 0, 291, 0, 0, 293, 0, 98,
+ 0, 0, 0, 0, 294, 0, 0, 99, 0, 0,
+ 0, 0, 0, 0, 100, 0, 0, 295, 0, 296,
+ 297, 102, 103, 0, 0, 0, 298, 0, 0, 0,
+ 299, 0, 0, 300, 0, 0, 0, 0, 0, 104,
+ 105, 301, 106, 302, 303, 0, 0, 0, 0, 0,
+ 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
+ 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
+ 0, 0, 0, 0, 116, 117, 118, 0, 183, 0,
+ 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
+ 0, 0, 122, 304, 0, 123, 124, 0, 0, 0,
+ 0, 0, 125, 126, 0, 0, 127, 89, 0, 683,
+ 0, 128, 684, 305, 205, 306, 267, 307, 308, 0,
+ 276, 277, 278, 0, 309, 0, 0, 311, 312, 313,
+ 0, 182, 279, 280, 281, 282, 681, 90, 283, 0,
+ 0, 0, 0, 0, 284, 0, 0, 0, 285, 286,
+ 0, 287, 0, 0, 0, 0, 0, 0, 0, 92,
+ 0, 0, 0, 288, 0, 0, 0, 93, 94, 0,
+ 0, 0, 0, 95, 96, 97, 0, 289, 0, 290,
+ 0, 291, 0, 0, 293, 0, 98, 0, 0, 0,
+ 0, 294, 0, 0, 99, 0, 0, 0, 0, 0,
+ 0, 100, 0, 0, 295, 0, 296, 297, 102, 103,
+ 0, 0, 0, 298, 0, 0, 0, 299, 0, 0,
+ 300, 0, 0, 0, 0, 0, 104, 105, 301, 106,
+ 302, 303, 0, 0, 0, 0, 0, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 183, 0, 0, 0, 0,
+ 119, 0, 120, 0, 0, 0, 121, 0, 0, 122,
+ 304, 0, 123, 124, 0, 0, 0, 0, 0, 125,
+ 126, 0, 0, 127, 89, 0, 687, 0, 128, 688,
+ 305, 205, 306, 267, 307, 308, 0, 276, 277, 278,
+ 0, 309, 0, 0, 311, 312, 313, 0, 182, 279,
+ 280, 281, 282, 685, 90, 283, 0, 0, 0, 0,
+ 0, 284, 0, 0, 0, 285, 286, 0, 287, 0,
+ 0, 0, 0, 0, 0, 0, 92, 0, 0, 0,
+ 288, 0, 0, 0, 93, 94, 0, 0, 0, 0,
+ 95, 96, 97, 0, 289, 0, 290, 0, 291, 0,
+ 0, 293, 0, 98, 0, 0, 0, 0, 294, 0,
+ 0, 99, 0, 0, 0, 0, 0, 0, 100, 0,
+ 0, 295, 0, 296, 297, 102, 103, 0, 0, 0,
+ 298, 0, 0, 0, 299, 0, 0, 300, 0, 0,
+ 0, 0, 0, 104, 105, 301, 106, 302, 303, 0,
+ 0, 0, 0, 0, 0, 0, 108, 0, 0, 109,
+ 110, 111, 0, 112, 0, 0, 0, 113, 0, 114,
+ 115, 0, 0, 0, 0, 0, 0, 0, 116, 117,
+ 118, 0, 183, 0, 0, 0, 0, 119, 0, 120,
+ 0, 0, 0, 121, 0, 0, 122, 304, 0, 123,
+ 124, 0, 0, 0, 0, 0, 125, 126, 0, 0,
+ 127, 89, 0, 691, 0, 128, 692, 305, 205, 306,
+ 267, 307, 308, 0, 276, 277, 278, 0, 309, 0,
+ 0, 311, 312, 313, 0, 182, 279, 280, 281, 282,
+ 689, 90, 283, 0, 0, 0, 0, 0, 284, 0,
+ 0, 0, 285, 286, 0, 287, 0, 0, 0, 0,
+ 0, 0, 0, 92, 0, 0, 0, 288, 0, 0,
+ 0, 93, 94, 0, 0, 0, 0, 95, 96, 97,
+ 0, 289, 0, 290, 0, 291, 0, 0, 293, 0,
+ 98, 0, 0, 0, 0, 294, 0, 0, 99, 0,
+ 0, 0, 0, 0, 0, 100, 0, 0, 295, 0,
+ 296, 297, 102, 103, 0, 0, 0, 298, 0, 0,
+ 0, 299, 0, 0, 300, 0, 0, 0, 0, 0,
+ 104, 105, 301, 106, 302, 303, 0, 0, 0, 0,
+ 0, 0, 0, 108, 0, 0, 109, 110, 111, 0,
+ 112, 0, 0, 0, 113, 0, 114, 115, 0, 0,
+ 0, 0, 0, 0, 0, 116, 117, 118, 0, 183,
+ 0, 0, 0, 0, 119, 0, 120, 0, 0, 0,
+ 121, 0, 0, 122, 304, 0, 123, 124, 0, 0,
+ 0, 0, 0, 125, 126, 0, 0, 127, 89, 0,
+ 0, 0, 128, 0, 305, 205, 306, 267, 307, 308,
+ 0, 276, 277, 278, 0, 309, 0, 0, 311, 312,
+ 313, 0, 182, 279, 280, 281, 282, 693, 90, 283,
+ 0, 0, 0, 0, 0, 284, 0, 0, 0, 285,
+ 286, 0, 287, 0, 0, 604, 0, 0, 0, 0,
+ 92, 0, 0, 0, 288, 0, 0, 0, 93, 94,
+ 0, 0, 0, 0, 95, 96, 97, 0, 289, 0,
+ 290, 0, 291, 0, 292, 293, 0, 98, 0, 0,
+ 0, 0, 294, 0, 0, 99, 0, 0, 0, 0,
+ 0, 0, 100, 0, 0, 295, 0, 296, 297, 102,
+ 103, 0, 0, 0, 298, 0, 0, 0, 299, 0,
+ 0, 300, 0, 0, 0, 0, 0, 104, 105, 301,
+ 106, 302, 303, 0, 0, 0, 0, 0, 0, 0,
+ 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
+ 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
+ 0, 0, 116, 117, 118, 0, 183, 0, 0, 0,
+ 0, 119, 0, 120, 0, 0, 0, 121, 0, 0,
+ 122, 304, 0, 123, 124, 0, 0, 0, 0, 0,
+ 125, 126, 0, 0, 127, 89, 0, 0, 0, 128,
+ 0, 305, 205, 306, 267, 307, 308, 0, 276, 277,
+ 278, 0, 309, 0, 0, 311, 312, 313, 0, 182,
+ 279, 280, 281, 282, 314, 90, 283, 0, 0, 0,
+ 0, 0, 284, 0, 0, 0, 285, 286, 0, 287,
+ 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
+ 0, 288, 0, 0, 0, 93, 94, 0, 0, 0,
+ 0, 95, 96, 97, 0, 289, 0, 290, 0, 291,
+ 0, 292, 293, 0, 98, 0, 0, 0, 0, 294,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 570, 0, 295, 0, 296, 297, 102, 103, 0, 0,
+ 0, 298, 0, 0, 0, 299, 0, 0, 300, 0,
+ 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
+ 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 89, 0, 0, 0, 128, 0, 305, 205,
+ 306, 267, 307, 308, 0, 276, 277, 278, 0, 309,
+ 0, 0, 311, 312, 313, 0, 182, 279, 280, 281,
+ 282, 314, 90, 283, 0, 0, 0, 0, 0, 284,
+ 0, 0, 0, 285, 286, 0, 287, 0, 0, 0,
+ 0, 0, 0, 0, 92, 0, 0, 0, 288, 0,
+ 0, 0, 93, 94, 0, 0, 0, 0, 95, 96,
+ 97, 0, 289, 0, 290, 0, 291, 0, 292, 293,
+ 0, 98, 0, 0, 0, 0, 294, 0, 0, 99,
+ 0, 0, 0, 0, 0, 0, 100, 0, 0, 295,
+ 0, 296, 297, 102, 103, 0, 0, 0, 298, 0,
+ 0, 0, 299, 0, 0, 300, 0, 0, 0, 0,
+ 0, 104, 105, 301, 106, 302, 303, 0, 0, 0,
+ 0, 0, 0, 0, 108, 0, 0, 109, 110, 111,
+ 0, 112, 0, 0, 0, 113, 0, 114, 115, 0,
+ 0, 0, 0, 0, 0, 0, 116, 117, 118, 0,
+ 183, 0, 0, 0, 0, 119, 0, 120, 0, 0,
+ 0, 121, 0, 0, 122, 304, 0, 123, 124, 0,
+ 0, 0, 0, 0, 125, 126, 0, 0, 127, 89,
+ 0, 663, 0, 128, 664, 305, 205, 306, 267, 307,
+ 308, 0, 276, 277, 278, 0, 309, 0, 0, 311,
+ 312, 313, 0, 182, 279, 280, 281, 282, 314, 90,
+ 283, 0, 0, 0, 0, 0, 284, 0, 0, 0,
+ 285, 286, 0, 287, 0, 0, 0, 0, 0, 0,
+ 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
+ 0, 290, 0, 0, 0, 0, 293, 0, 98, 0,
+ 0, 0, 0, 294, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 100, 0, 0, 295, 0, 296, 297,
+ 102, 103, 0, 0, 0, 298, 0, 0, 0, 299,
+ 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
+ 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
+ 0, 0, 0, 116, 117, 118, 0, 183, 0, 0,
+ 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
+ 0, 122, 304, 0, 123, 124, 0, 0, 0, 0,
+ 0, 125, 126, 0, 0, 127, 89, 0, 0, 0,
+ 128, 0, 305, 205, -32768, 267, 307, 308, 0, 276,
+ 277, 278, 0, 309, 0, 0, 311, 312, 313, 0,
+ 182, 279, 280, 281, 282, 665, 90, 283, 0, 0,
+ 0, 0, 0, 284, 0, 0, 0, 285, 286, 0,
+ 287, 0, 0, 0, 0, 0, 0, 0, 92, 0,
+ 0, 0, 288, 0, 0, 0, 93, 94, 0, 0,
+ 0, 0, 95, 96, 97, 0, 289, 0, 290, 0,
+ 291, 0, 0, 293, 0, 98, 0, 0, 0, 0,
+ 294, 0, 0, 99, 0, 0, 0, 0, 0, 0,
+ 100, 570, 0, 295, 0, 296, 297, 102, 103, 0,
+ 0, 0, 298, 0, 0, 0, 299, 0, 0, 300,
+ 0, 0, 0, 0, 0, 104, 105, 301, 106, 302,
+ 303, 0, 0, 0, 0, 0, 0, 0, 108, 0,
+ 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
+ 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
+ 116, 117, 118, 0, 183, 0, 0, 0, 0, 119,
+ 0, 120, 0, 0, 0, 121, 0, 0, 122, 304,
+ 0, 123, 124, 0, 0, 0, 0, 0, 125, 126,
+ 0, 0, 127, 89, 0, 0, 0, 128, 0, 305,
+ 205, 306, 267, 307, 308, 0, 276, 277, 278, 0,
+ 309, 0, 0, 311, 312, 313, 0, 182, 279, 280,
+ 281, 282, 314, 90, 283, 0, 0, 0, 0, 0,
+ 284, 0, 0, 0, 285, 286, 0, 287, 0, 0,
+ 0, 0, 0, 0, 0, 92, 0, 0, 0, 288,
+ 0, 0, 0, 93, 94, 0, 0, 0, 0, 95,
+ 96, 97, 0, 289, 0, 290, 0, 291, 0, 0,
+ 293, 0, 98, 0, 0, 0, 0, 294, 0, 0,
+ 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
+ 295, 0, 296, 297, 102, 103, 0, 0, 0, 298,
+ 0, 0, 0, 299, 0, 0, 300, 0, 0, 0,
+ 0, 0, 104, 105, 301, 106, 302, 303, 0, 0,
+ 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
+ 111, 0, 112, 0, 0, 0, 113, 0, 114, 115,
+ 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
+ 0, 183, 0, 0, 0, 0, 119, 0, 120, 0,
+ 0, 0, 121, 0, 0, 122, 304, 0, 123, 124,
+ 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
+ 89, 0, 0, 0, 128, 0, 305, 205, 306, 267,
+ 307, 308, 0, 633, 277, 278, 0, 309, 0, 0,
+ 311, 312, 313, 0, 182, 634, 635, 636, 637, 314,
+ 90, 283, 0, 0, 0, 0, 0, 284, 0, 0,
+ 0, 0, 0, 0, 287, 0, 0, 0, 0, 0,
+ 0, 0, 92, 0, 0, 0, 288, 0, 0, 0,
+ 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
+ 289, 0, 290, 0, 0, 0, 0, 293, 0, 98,
+ 0, 0, 0, 0, 638, 0, 0, 99, 0, 0,
+ 0, 0, 0, 0, 100, 0, 0, 639, 0, 296,
+ 297, 102, 103, 0, 0, 0, 640, 0, 0, 0,
+ 641, 0, 0, 300, 0, 0, 0, 0, 0, 104,
+ 105, 301, 106, 302, 303, 0, 0, 0, 0, 0,
+ 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
+ 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
+ 0, 0, 0, 0, 116, 117, 118, 0, 183, 0,
+ 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
+ 0, 0, 122, 304, 0, 123, 124, 0, 0, 0,
+ 0, 0, 125, 126, 0, 0, 127, 89, 0, 0,
+ 0, 128, 0, 305, 205, 642, 267, 307, 308, 0,
+ 633, 277, 278, 0, 643, 0, 0, 644, 645, 646,
+ 0, 182, 634, 635, 636, 637, 647, 90, 283, 0,
+ 0, 0, 0, 0, 284, 0, 0, 0, 0, 0,
+ 0, 287, 0, 0, 0, 0, 0, 0, 0, 92,
+ 0, 0, 0, 288, 0, 0, 0, 93, 94, 0,
+ 0, 0, 0, 95, 96, 97, 0, 289, 0, 290,
+ 0, 0, 0, 0, 293, 0, 98, 0, 0, 0,
+ 0, 638, 0, 0, 99, 0, 0, 0, 0, 0,
+ 0, 100, 0, 0, 639, 0, 296, 297, 102, 103,
+ 0, 0, 0, 640, 0, 0, 0, 641, 0, 0,
+ 300, 0, 0, 0, 0, 0, 104, 105, 301, 106,
+ 302, 303, 0, 0, 0, 0, 0, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 183, 0, 0, 0, 0,
+ 119, 0, 120, 0, 0, 0, 121, 0, 0, 122,
+ 304, 0, 123, 124, 0, 0, 0, 0, 0, 125,
+ 126, 0, 0, 127, 89, 0, 0, 0, 128, 0,
+ 305, 205, -32768, 267, 307, 308, 0, 1161, 277, 278,
+ 0, 643, 0, 0, 644, 645, 646, 0, 0, 1162,
+ 1163, 1164, 1165, 647, 90, 283, 0, 0, 0, 0,
+ 0, 284, 0, 0, 0, 0, 0, 0, 287, 0,
+ 0, 0, 0, 0, 0, 0, 92, 0, 0, 0,
+ 288, 0, 0, 0, 93, 94, 0, 0, 0, 0,
+ 95, 96, 97, 0, 289, 0, 290, 0, 0, 0,
+ 1166, 293, 0, 98, 0, 0, 0, 0, 0, 0,
+ 0, 99, 0, 0, 0, 0, 0, 0, 100, 0,
+ 0, 0, 0, 296, 297, 102, 103, 0, 0, 0,
+ 0, 0, 0, 0, 1167, 0, 0, 300, 0, 0,
+ 0, 0, 0, 104, 105, 301, 106, 302, 303, 0,
+ 0, 0, 0, 0, 0, 0, 108, 0, 0, 109,
+ 110, 111, 0, 112, 0, 0, 0, 113, 0, 114,
+ 115, 0, 0, 0, 0, 0, 0, 0, 116, 117,
+ 118, 0, 0, 0, 0, 0, 0, 119, 0, 120,
+ 0, 0, 0, 121, 0, 0, 122, 304, 0, 123,
+ 124, 0, 0, 0, 0, 0, 125, 126, 0, 0,
+ 127, 89, 0, 0, 0, 128, 0, 305, 205, 1168,
+ 267, 307, 308, 0, 1161, 277, 278, 0, 1169, 0,
+ 0, 1170, 1171, 1172, 0, 0, 1162, 1163, 1164, 1165,
+ 1173, 90, 283, 0, 0, 0, 0, 0, 284, 0,
+ 0, 0, 0, 0, 0, 287, 0, 0, 0, 0,
+ 0, 0, 0, 92, 0, 0, 0, 288, 0, 0,
+ 0, 93, 94, 0, 0, 0, 0, 95, 96, 97,
+ 0, 289, 0, 290, 0, 0, 0, 1166, 293, 0,
+ 98, 0, 0, 0, 0, 0, 0, 0, 99, 0,
+ 0, 0, 0, 0, 0, 100, 0, 0, 0, 0,
+ 296, 297, 102, 103, 0, 0, 0, 0, 0, 0,
+ 0, 1167, 0, 0, 300, 0, 0, 0, 0, 0,
+ 104, 105, 301, 106, 302, 303, 0, 0, 0, 0,
+ 0, 0, 0, 108, 0, 0, 109, 110, 111, 0,
+ 112, 0, 0, 0, 113, 0, 114, 115, 0, 0,
+ 0, 0, 0, 0, 0, 116, 117, 118, 0, 0,
+ 0, 0, 0, 0, 119, 0, 120, 0, 0, 0,
+ 121, 0, 0, 122, 304, 0, 123, 124, 0, 0,
+ 0, 0, 0, 125, 126, 0, 0, 127, 89, 0,
+ 0, 0, 128, 0, 305, 205, -32768, 267, 307, 308,
+ 0, 585, 277, 278, 0, 1169, 0, 0, 1170, 1171,
+ 1172, 0, 182, 0, 0, 0, 0, 1173, 90, 283,
+ 0, 0, 0, 0, 0, 284, 0, 0, 0, 0,
+ 0, 0, 287, 0, 0, 0, 0, 0, 0, 0,
+ 92, 0, 0, 0, 288, 0, 0, 0, 93, 94,
+ 0, 0, 0, 0, 95, 96, 97, 0, 289, 0,
+ 290, 0, 0, 0, 0, 293, 0, 98, 0, 0,
+ 0, 0, 586, 0, 0, 99, 0, 0, 0, 0,
+ 0, 0, 100, 0, 0, 587, 0, 296, 297, 102,
+ 103, 0, 0, 0, 588, 0, 0, 0, 0, 0,
+ 0, 300, 0, 0, 0, 0, 0, 104, 105, 301,
+ 106, 302, 303, 0, 0, 0, 0, 0, 0, 0,
+ 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
+ 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
+ 0, 0, 116, 117, 118, 0, 183, 0, 0, 0,
+ 0, 119, 0, 120, 0, 0, 0, 121, 0, 0,
+ 122, 304, 0, 123, 124, 0, 0, 0, 0, 0,
+ 125, 126, 0, 0, 127, 89, 0, 0, 0, 128,
+ 0, 305, 205, 589, 267, 307, 308, 0, 585, 277,
+ 278, 0, 590, 0, 0, 591, 0, 0, 0, 182,
+ 0, 0, 0, 0, 592, 90, 283, 0, 0, 0,
+ 0, 0, 284, 0, 0, 0, 0, 0, 0, 287,
+ 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
+ 0, 288, 0, 0, 0, 93, 94, 0, 0, 0,
+ 0, 95, 96, 97, 0, 289, 0, 290, 0, 0,
+ 0, 0, 293, 0, 98, 0, 0, 0, 0, 586,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 587, 0, 296, 297, 102, 103, 0, 0,
+ 0, 588, 0, 0, 0, 0, 0, 0, 300, 0,
+ 0, 0, 0, 0, 104, 105, 301, 106, 302, 303,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 183, 0, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 304, 0,
+ 123, 124, 0, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 89, 0, 0, 0, 128, 0, 305, 205,
+ -32768, 267, 307, 308, 0, 934, 277, 278, 0, 590,
+ 0, 0, 591, 0, 0, 0, 0, 0, 0, 0,
+ 0, 592, 90, 283, 0, 0, 0, 0, 0, 284,
+ 0, 0, 0, 0, 0, 0, 287, 0, 0, 0,
+ 0, 0, 0, 0, 92, 0, 0, 0, 288, 0,
+ 0, 0, 93, 94, 0, 0, 0, 0, 95, 96,
+ 97, 0, 289, 0, 290, 0, 935, 0, 936, 293,
+ 0, 98, 0, 0, 0, 0, 0, 0, 0, 99,
+ 0, 0, 0, 0, 0, 0, 100, 0, 0, 0,
+ 0, 296, 297, 102, 103, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 300, 0, 0, 0, 0,
+ 0, 104, 105, 301, 106, 302, 303, 0, 0, 0,
+ 0, 0, 0, 0, 108, 0, 0, 109, 110, 111,
+ 0, 112, 0, 0, 0, 113, 0, 114, 115, 0,
+ 0, 0, 0, 0, 0, 0, 116, 117, 118, 0,
+ 0, 0, 0, 0, 0, 119, 0, 120, 0, 0,
+ 0, 121, 0, 0, 122, 304, 0, 123, 124, 0,
+ 0, 0, 0, 0, 125, 126, 0, 0, 127, 89,
+ 0, 0, 0, 128, 0, 305, 205, 937, 267, 307,
+ 308, 0, 934, 277, 278, 0, 938, 0, 0, 939,
+ 940, 941, 0, 0, 0, 0, 0, 0, 942, 90,
+ 283, 0, 0, 0, 1133, 0, 284, 0, 0, 1134,
+ 0, 0, 0, 287, 0, 0, 0, 0, 0, 0,
+ 0, 92, 0, 0, 0, 288, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
+ 0, 290, 0, 0, 0, 936, 293, 0, 98, 0,
+ 0, 0, 0, 1135, 0, 0, 99, 0, 1136, 0,
+ 0, 0, 0, 100, 1137, 0, 0, 0, 296, 297,
+ 102, 103, 0, 0, 1138, 0, 0, 0, 0, 0,
+ 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
+ 301, 106, 302, 303, 0, 0, 0, 0, 0, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
+ 0, 0, 0, 116, 117, 118, 0, 0, 0, 0,
+ 0, 0, 119, 0, 120, 0, 0, 0, 121, 0,
+ 0, 122, 304, 0, 123, 124, 0, 0, 0, 1140,
+ 0, 125, 126, 0, 0, 127, 89, 0, 0, 0,
+ 128, 1141, 305, 205, -32768, 267, 307, 308, 0, 0,
+ 0, 0, 0, 938, 0, 0, 939, 940, 941, 0,
+ 0, 0, 0, 0, 0, 942, 90, 0, 0, 0,
+ 0, 0, 0, 91, 0, 1142, 0, 0, 0, 0,
+ 1143, 1144, 1145, 1146, 1147, 1148, 1149, 0, 92, 0,
+ 0, 0, 0, 0, 1150, 0, 93, 94, 0, 0,
+ 0, 0, 95, 96, 97, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 98, 0, 0, 0, 0,
+ 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 0, 0, 101, 0, 102, 103, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
+ 107, 0, 0, 0, 0, 0, 0, 0, 108, 0,
+ 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
+ 0, 114, 115, 0, 0, 0, 0, 0, 90, 283,
+ 116, 117, 118, 0, 0, 424, 0, 0, 0, 119,
+ 0, 120, 287, 0, 0, 121, 0, 0, 122, 986,
+ 92, 123, 124, 89, 288, 0, 0, 0, 125, 126,
+ 0, 0, 127, 0, 0, 96, 97, 128, 0, 129,
+ 205, 258, 267, 0, 987, 293, 236, 237, 238, 239,
+ 988, 241, 242, 90, 0, 0, 543, 0, 0, 0,
+ 91, 0, 100, 0, 0, 0, 0, 425, 297, 0,
+ 0, 0, 0, 0, 0, 92, 0, 0, 0, 0,
+ 0, 0, 233, 93, 94, 0, 0, 104, 0, 95,
+ 96, 97, 426, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,
+ 99, 234, 0, 0, 0, 0, 0, 100, 0, 0,
+ 0, 0, 101, 0, 102, 103, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 104, 105, 0, 106, 0, 107, 0, 0,
+ 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
+ 111, 427, 112, 0, 0, 0, 113, 0, 114, 115,
+ 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
+ 89, 0, 0, 0, 0, 0, 119, 0, 120, 0,
+ 0, 0, 121, 0, 0, 122, 0, 0, 123, 124,
+ 0, 0, 0, 0, 0, 125, 126, 0, 0, 127,
+ 90, 0, 0, 0, 128, 0, 129, 91, 235, 0,
+ 0, 0, 0, 236, 237, 238, 239, 240, 241, 242,
+ 0, 0, 92, 0, 0, 0, 0, 0, 0, 233,
+ 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
+ 0, 0, 0, 0, 0, 0, 0, 99, 234, 0,
+ 0, 0, 0, 0, 100, 0, 0, 0, 0, 101,
+ 0, 102, 103, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
+ 105, 0, 106, 0, 107, 0, 0, 0, 0, 0,
+ 0, 0, 108, 0, 0, 109, 110, 111, 0, 112,
+ 0, 0, 0, 113, 0, 114, 115, 89, 0, 0,
+ 0, 0, 0, 0, 116, 117, 118, 0, 0, 0,
+ 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
+ 0, 182, 122, 0, 0, 123, 124, 90, 0, 0,
+ 0, 0, 125, 126, 91, 0, 127, 0, 0, 0,
+ 0, 128, 0, 129, 0, 235, 0, 0, 0, 92,
+ 236, 237, 238, 239, 240, 241, 242, 93, 94, 0,
+ 0, 0, 0, 95, 96, 97, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
+ 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
+ 0, 100, 0, 0, 0, 0, 101, 0, 102, 103,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
+ 0, 107, 0, 0, 0, 0, 0, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 89, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 183, 0, 0, 0, 0,
+ 119, 0, 120, 0, 0, 0, 121, 90, 0, 122,
+ 0, 0, 123, 124, 91, 0, 0, 0, 0, 125,
+ 126, 0, 0, 127, 0, 0, 0, 0, 128, 92,
+ 129, 0, 0, 0, 307, 0, 0, 93, 94, 0,
+ 0, 0, 478, 95, 96, 97, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
+ 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
+ 0, 100, 0, 0, 0, 0, 101, 0, 102, 103,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
+ 0, 107, 0, 0, 0, 0, 89, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 0, 90, 0, 0, 0,
+ 119, 0, 120, 91, 0, 0, 121, 0, 0, 122,
+ 0, 0, 123, 124, 0, 0, 0, 0, 92, 125,
+ 126, 0, 0, 127, 0, 0, 93, 94, 128, 0,
+ 129, 0, 95, 96, 97, 0, 0, 0, 0, 0,
+ 0, 0, 380, 0, 0, 98, 0, 0, 0, 0,
+ 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 0, 0, 101, 0, 102, 103, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
+ 107, 0, 0, 0, 0, 89, 0, 0, 108, 0,
+ 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
+ 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
+ 116, 117, 118, 0, 0, 90, 0, 0, 0, 119,
+ 0, 120, 91, 0, 0, 121, 0, 0, 122, 0,
+ 0, 123, 124, 0, 0, 0, 0, 92, 125, 126,
+ 0, 0, 127, 0, 0, 93, 94, 128, 0, 129,
+ 0, 95, 96, 97, 0, 0, 0, 0, 0, 0,
+ 0, 701, 0, 0, 98, 0, 0, 0, 0, 0,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 0, 0, 101, 0, 102, 103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 104, 105, 0, 106, 0, 107,
+ 0, 0, 0, 0, 89, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 0, 90, 0, 0, 0, 119, 0,
+ 120, 91, 0, 0, 121, 0, 0, 122, 0, 0,
+ 123, 124, 0, 0, 0, 0, 92, 125, 126, 0,
+ 0, 127, 0, 0, 93, 94, 128, 0, 129, 0,
+ 95, 96, 97, 0, 0, 0, 0, 0, 0, 0,
+ 917, 0, 0, 98, 0, 0, 0, 0, 0, 0,
+ 0, 99, 0, 0, 0, 0, 0, 0, 100, 0,
+ 0, 0, 0, 101, 0, 102, 103, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 104, 105, 0, 106, 0, 107, 0,
+ 0, 0, 0, 89, 0, 0, 108, 0, 0, 109,
+ 110, 111, 0, 112, 0, 0, 0, 113, 0, 114,
+ 115, 0, 0, 0, 0, 0, 0, 182, 116, 117,
+ 118, 0, 0, 90, 0, 0, 0, 119, 0, 120,
+ 91, 0, 0, 121, 0, 0, 122, 0, 0, 123,
+ 124, 0, 0, 0, 0, 92, 125, 126, 0, 0,
+ 127, 0, 0, 93, 94, 128, 0, 129, 0, 95,
+ 96, 97, 0, 0, 0, 0, 0, 0, 0, 1111,
+ 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,
+ 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
+ 0, 0, 101, 0, 102, 103, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 104, 105, 0, 106, 0, 107, 0, 0,
+ 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
+ 111, 0, 112, 89, 0, 0, 113, 0, 114, 115,
+ 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
+ 0, 183, 0, 0, 0, 0, 119, 0, 120, 0,
+ 0, 0, 121, 90, 0, 122, 0, 0, 123, 124,
+ 91, 0, 0, 0, 0, 125, 126, 0, 0, 127,
+ 0, 0, 0, 0, 128, 92, 129, 0, 0, 0,
+ 307, 0, 0, 93, 94, 0, 0, 0, 0, 95,
+ 96, 97, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 98, 0, 0, 0, 0, 0, 0, 0,
+ 99, 0, 0, 0, 0, 0, 0, 100, 0, 0,
+ 0, 0, 101, 0, 102, 103, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 104, 105, 0, 106, 0, 107, 0, 0,
+ 0, 0, 0, 0, 0, 108, 0, 0, 109, 110,
+ 111, 0, 112, 0, 0, 0, 113, 0, 114, 115,
+ 0, 0, 0, 0, 0, 0, 0, 116, 117, 118,
+ 89, 0, 0, 0, 0, 0, 119, 0, 120, 0,
+ 0, 0, 121, 0, 0, 122, 0, 0, 123, 124,
+ 0, 616, 0, 617, 0, 125, 126, 0, 0, 127,
+ 90, 0, 0, 0, 128, 0, 129, 91, 0, 267,
+ 0, 0, 0, 0, 0, 0, 618, 0, 0, 0,
+ 619, 0, 92, 0, 0, 0, 0, 0, 0, 0,
+ 93, 94, 0, 0, 0, 0, 95, 96, 97, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 98,
+ 0, 620, 0, 0, 621, 622, 0, 99, 0, 0,
+ 0, 0, 0, 0, 100, 0, 0, 0, 623, 101,
+ 0, 102, 103, 0, 0, 624, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 104,
+ 105, 625, 106, 626, 107, 0, 0, 0, 0, 0,
+ 0, 0, 108, 627, 0, 109, 110, 111, 0, 112,
+ 0, 0, 0, 113, 0, 114, 115, 0, 0, 0,
+ 0, 0, 628, 0, 116, 117, 118, 0, 0, 89,
+ 0, 0, 0, 119, 0, 120, 0, 0, 0, 121,
+ 0, 0, 122, 277, 278, 123, 124, 0, 0, 0,
+ 0, 0, 125, 126, 0, 629, 127, 0, 0, 90,
+ 523, 128, 0, 129, 0, 0, 524, 0, 0, 0,
+ 0, 0, 0, 525, 0, 0, 0, 0, 0, 0,
+ 0, 92, 0, 0, 0, 0, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 289,
+ 0, 290, 0, 0, 0, 0, 526, 0, 98, 0,
+ 0, 0, 0, 0, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 100, 0, 0, 0, 0, 101, 0,
+ 102, 103, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 300, 0, 0, 0, 0, 0, 104, 105,
+ 0, 106, 0, 107, 0, 0, 0, 0, 0, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 89,
+ 0, 0, 0, 116, 117, 118, 0, 0, 0, 0,
+ 0, 0, 119, 0, 120, 500, 0, 0, 121, 0,
+ 501, 122, 0, 0, 123, 124, 0, 0, 0, 90,
+ 0, 125, 126, 0, 0, 127, 91, 0, 0, 0,
+ 128, 0, 129, 0, 0, 502, 0, 0, 0, 0,
+ 0, 92, 0, 0, 0, 0, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 98, 0,
+ 0, 0, 0, 0, 0, 503, 99, 0, 0, 0,
+ 0, 0, 0, 100, 0, 0, 0, 0, 101, 0,
+ 102, 103, 0, 0, 0, 0, 0, 504, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 104, 105,
+ 0, 106, 0, 107, 0, 0, 0, 0, 89, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
+ 0, 0, 182, 116, 117, 118, 0, 0, 90, 0,
+ 0, 0, 119, 0, 120, 91, 0, 0, 121, 0,
+ 0, 122, 0, 0, 123, 124, 0, 0, 0, 0,
+ 92, 125, 126, 0, 0, 127, 0, 0, 93, 94,
+ 128, 0, 129, 0, 95, 96, 97, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 98, 0, 0,
+ 0, 0, 0, 0, 0, 99, 0, 0, 0, 0,
+ 0, 0, 100, 0, 0, 0, 0, 101, 0, 102,
+ 103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 104, 105, 0,
+ 106, 0, 107, 0, 0, 0, 0, 89, 0, 0,
+ 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
+ 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
+ 0, 0, 116, 117, 118, 0, 183, 90, 0, 0,
+ 0, 119, 0, 120, 91, 0, 0, 121, 0, 0,
+ 122, 0, 0, 123, 124, 0, 0, 773, 0, 92,
+ 125, 126, 0, 0, 127, 0, 0, 93, 94, 128,
+ 0, 129, 0, 95, 96, 97, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
+ 0, 0, 0, 0, 99, 0, 774, 0, 0, 0,
+ 0, 100, 0, 0, 0, 0, 101, 0, 102, 103,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
+ 0, 107, 0, 0, 0, 0, 89, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 0, 90, 0, 0, 0,
+ 119, 0, 120, 91, 0, 0, 121, 0, 0, 122,
+ 0, 0, 123, 124, 0, 0, 0, 0, 92, 125,
+ 126, 0, 0, 127, 0, 0, 93, 94, 128, 0,
+ 129, 0, 95, 96, 97, 192, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 98, 0, 0, 0, 0,
+ 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 0, 0, 193, 0, 102, 103, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
+ 107, 0, 0, 0, 0, 89, 0, 0, 108, 0,
+ 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
+ 0, 114, 115, 0, 0, 0, 0, 0, 0, 0,
+ 116, 117, 118, 0, 0, 90, 0, 0, 0, 119,
+ 0, 120, 91, 0, 0, 121, 0, 0, 122, 0,
+ 0, 123, 124, 0, 0, 0, 0, 92, 125, 126,
+ 0, 0, 127, 0, 0, 93, 94, 128, 0, 129,
+ 0, 95, 96, 97, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 98, 0, 0, 0, 0, 0,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 0, 0, 101, 0, 102, 103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 104, 105, 0, 106, 0, 107,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 89, 0, 0, 113, 0,
+ 114, 115, 0, 0, 0, 0, 0, 0, 0, 116,
+ 117, 118, 0, 0, 552, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 90, 0, 122, 0, 0,
+ 123, 124, 91, 0, 0, 0, 0, 125, 126, 0,
+ 0, 127, 0, 0, 0, 0, 128, 92, 129, 0,
+ 0, 0, 0, 0, 0, 93, 94, 0, 0, 0,
+ 0, 95, 96, 97, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 98, 0, 0, 0, 0, 0,
+ 0, 0, 99, 0, 0, 0, 0, 0, 0, 100,
+ 0, 0, 0, 0, 101, 0, 102, 103, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 104, 105, 0, 106, 0, 107,
+ 0, 0, 0, 0, 0, 0, 0, 108, 0, 0,
+ 109, 110, 111, 0, 112, 0, 0, 0, 113, 89,
+ 114, 115, 0, 0, 0, 1106, 0, 0, 0, 116,
+ 117, 118, 0, 0, 1002, 0, 0, 0, 119, 0,
+ 120, 0, 0, 0, 121, 0, 0, 122, 0, 90,
+ 123, 124, 0, 0, 0, 0, 91, 125, 126, 0,
+ 0, 127, 0, 0, 0, 0, 128, 0, 129, 0,
+ 0, 92, 0, 0, 0, 0, 0, 0, 0, 93,
+ 94, 0, 0, 0, 0, 95, 96, 97, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 98, 0,
+ 0, 0, 0, 0, 0, 0, 99, 0, 0, 0,
+ 0, 0, 0, 100, 0, 0, 0, 0, 101, 0,
+ 102, 103, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 104, 105,
+ 0, 106, 0, 107, 0, 0, 0, 0, 89, 0,
+ 0, 108, 0, 0, 109, 110, 111, 0, 112, 0,
+ 0, 0, 113, 0, 114, 115, 0, 0, 0, 0,
+ 0, 0, 0, 116, 117, 118, 0, 0, 90, 0,
+ 0, 0, 119, 0, 120, 91, 0, 0, 121, 0,
+ 0, 122, 0, 0, 123, 124, 0, 0, 0, 0,
+ 92, 125, 126, 0, 0, 127, 0, 0, 93, 94,
+ 128, 0, 129, 0, 95, 96, 97, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 98, 0, 0,
+ 0, 0, 0, 0, 0, 99, 0, 0, 0, 0,
+ 0, 0, 100, 0, 0, 0, 0, 101, 0, 102,
+ 103, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 104, 105, 0,
+ 106, 0, 107, 0, 0, 0, 0, 89, 0, 0,
+ 108, 0, 0, 109, 110, 111, 0, 112, 0, 0,
+ 0, 113, 0, 114, 115, 0, 0, 0, 0, 0,
+ 0, 0, 116, 117, 118, 0, 0, 90, 0, 0,
+ 0, 119, 0, 120, 91, 0, 0, 121, 0, 0,
+ 122, 0, 0, 123, 124, 0, 0, 0, 0, 92,
+ 125, 126, 0, 0, 127, 0, 0, 93, 94, 128,
+ 0, 129, 0, 95, 96, 97, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 98, 0, 0, 0,
+ 0, 0, 0, 0, 99, 0, 0, 0, 0, 0,
+ 0, 100, 0, 0, 0, 0, 211, 0, 102, 103,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 104, 105, 0, 106,
+ 0, 107, 0, 0, 0, 0, 89, 0, 0, 108,
+ 0, 0, 109, 110, 111, 0, 112, 0, 0, 0,
+ 113, 0, 114, 115, 0, 0, 0, 0, 0, 0,
+ 0, 116, 117, 118, 0, 0, 90, 0, 0, 0,
+ 119, 0, 120, 91, 0, 0, 121, 0, 0, 122,
+ 0, 0, 123, 124, 0, 0, 0, 0, 92, 125,
+ 126, 0, 0, 127, 0, 0, 93, 94, 128, 0,
+ 129, 0, 95, 96, 97, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 98, 0, 0, 0, 0,
+ 0, 0, 0, 99, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 0, 0, 213, 0, 102, 103, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 104, 105, 0, 106, 0,
+ 107, 0, 0, 0, 0, 0, 0, 0, 108, 0,
+ 0, 109, 110, 111, 0, 112, 0, 0, 0, 113,
+ 0, 114, 115, 0, 0, 0, 277, 278, 0, 0,
+ 116, 117, 118, 0, 0, 0, 0, 0, 0, 119,
+ 0, 120, 90, 283, 0, 121, 0, 0, 122, 424,
+ 0, 123, 124, 0, 0, 0, 287, 0, 125, 126,
+ 277, 278, 127, 0, 92, 0, 0, 128, 288, 129,
+ 0, 0, 0, 0, 0, 0, 90, 283, 0, 96,
+ 97, 0, 289, 424, 290, 0, 0, 0, 0, 293,
+ 287, 0, 0, 0, 0, 0, 0, 0, 92, 0,
+ 0, 0, 288, 0, 0, 0, 100, 570, 0, 0,
+ 0, 425, 297, 96, 97, 0, 289, 0, 290, 0,
+ 0, 0, 0, 293, 0, 300, 0, 0, 0, 0,
+ 0, 104, 0, 301, 0, 302, 426, 0, 0, 0,
+ 100, 0, 0, 1, 0, 425, 297, 0, 2, 0,
+ 0, 0, 0, 0, 0, 0, 0, 3, 0, 300,
+ 4, 0, 5, 0, 0, 104, 0, 301, 0, 302,
+ 426, 0, 6, 0, 7, 0, 0, 0, 8, 9,
+ 10, 0, 0, 11, 0, 304, 0, 0, 0, 12,
+ 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 427, 205, 0, 267, 307,
+ 308, 0, 0, 0, 0, 14, 0, 0, 0, 304,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 15, 0, 16, 0, 17, 18, 0, 0, 427,
+ 205, 0, 267, 307, 308, 277, 278, 0, 0, 19,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 90, 283, 0, 0, 20, 0, 0, 424, 0,
+ 0, 0, 0, 21, 22, 287, 0, 0, 0, 0,
+ 23, 24, 0, 92, 0, 0, 0, 288, 0, 0,
+ 0, 25, 26, 27, 0, 0, 0, 28, 96, 97,
+ 0, 289, 0, 290, 0, 0, 0, 29, 293, 0,
+ 277, 278, 0, 0, 30, 0, 0, 0, 0, 0,
+ 31, 0, 0, 0, 32, 100, 90, 283, 0, 0,
+ 425, 297, 0, 424, 0, 0, 0, 0, 0, 0,
+ 287, 0, 0, 0, 300, 0, 0, 0, 92, 0,
+ 104, 0, 288, 0, 0, 426, 0, 0, 0, 0,
+ 0, 0, 0, 96, 97, 0, 289, 0, 290, 0,
+ 0, 0, 0, 293, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 100, 0, 0, 0, 0, 425, 297, 0, 0, 0,
+ 0, 0, 0, 740, 304, 0, 0, 0, 0, 300,
+ 0, 0, 0, 0, 0, 104, 0, 0, 0, 0,
+ 426, 0, 0, 0, 427, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 304,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 427
};
-static const short yycheck[] = { 3,
- 480, 136, 6, 202, 479, 165, 560, 148, 420, 484,
- 14, 780, 781, 162, 18, 19, 570, 21, 912, 154,
- 347, 25, 791, 906, 191, 29, 30, 745, 32, 367,
- 735, 642, 643, 644, 645, 646, 849, 1179, 26, 491,
- 14, 1346, 1347, 5, 5, 19, 48, 8, 659, 36,
- 461, 25, 36, 36, 60, 50, 468, 50, 32, 50,
- 36, 19, 114, 4, 22, 6, 1134, 171, 1429, 1430,
- 6, 114, 106, 1104, 41, 114, 603, 114, 605, 606,
- 84, 68, 37, 114, 559, 203, 50, 806, 19, 15,
- 37, 49, 51, 36, 199, 589, 590, 591, 592, 70,
- 41, 512, 207, 58, 132, 129, 210, 37, 172, 133,
- 84, 271, 1473, 278, 274, 179, 807, 145, 49, 114,
- 595, 1474, 1475, 1428, 168, 290, 97, 86, 58, 247,
- 134, 89, 99, 137, 138, 854, 79, 141, 142, 12,
- 144, 145, 106, 98, 148, 1498, 7, 314, 152, 153,
- 76, 12, 156, 111, 158, 159, 160, 112, 89, 196,
- 134, 165, 166, 37, 855, 112, 218, 197, 220, 203,
- 81, 145, 50, 99, 649, 218, 19, 181, 152, 218,
- 111, 220, 112, 56, 58, 215, 101, 218, 60, 220,
- 7, 101, 604, 36, 67, 56, 200, 7, 113, 203,
- 61, 137, 138, 114, 192, 209, 67, 181, 144, 211,
- 197, 1572, 218, 197, 197, 769, 77, 191, 173, 1287,
- 156, 197, 158, 218, 98, 218, 200, 218, 169, 5,
- 166, 1000, 1263, 184, 77, 209, 1049, 199, 112, 35,
- 851, 37, 12, 247, 949, 950, 89, 98, 413, 199,
- 93, 255, 863, 864, 865, 866, 867, 868, 219, 79,
- 149, 219, 58, 39, 115, 1570, 216, 271, 111, 197,
- 274, 275, 935, 261, 937, 938, 939, 940, 941, 942,
- 732, 808, 78, 77, 55, 79, 56, 215, 79, 190,
- 191, 152, 180, 181, 398, 399, 400, 67, 465, 70,
- 1194, 405, 98, 164, 124, 108, 126, 1449, 35, 197,
- 37, 805, 1256, 417, 1382, 1259, 112, 199, 121, 255,
- 814, 815, 816, 817, 818, 819, 97, 315, 134, 856,
- 124, 58, 126, 124, 216, 126, 440, 198, 442, 343,
- 344, 197, 203, 204, 205, 206, 207, 208, 209, 353,
- 9, 78, 340, 341, 342, 359, 217, 196, 197, 215,
- 199, 496, 201, 367, 9, 214, 215, 163, 372, 343,
- 344, 98, 783, 700, 378, 379, 1444, 212, 1446, 353,
- 384, 198, 386, 371, 711, 112, 390, 198, 198, 206,
- 207, 208, 209, 204, 205, 807, 206, 207, 208, 209,
- 217, 199, 77, 201, 79, 379, 1219, 217, 197, 820,
- 822, 823, 750, 208, 209, 419, 754, 192, 193, 215,
- 750, 833, 217, 219, 754, 197, 215, 214, 218, 904,
- 220, 535, 219, 537, 538, 539, 540, 196, 218, 443,
- 220, 445, 378, 855, 167, 218, 9, 220, 384, 124,
- 386, 126, 1168, 1169, 1170, 1171, 1172, 1173, 869, 871,
- 208, 209, 1125, 467, 1075, 469, 1184, 196, 149, 217,
- 1133, 492, 493, 494, 1137, 218, 1139, 220, 64, 1142,
- 1143, 1144, 1145, 1146, 1147, 1148, 1149, 90, 1371, 1152,
- 218, 465, 220, 1020, 1021, 1022, 1159, 501, 665, 81,
- 208, 209, 669, 5, 218, 81, 673, 4, 19, 217,
- 677, 123, 9, 24, 681, 926, 513, 81, 685, 16,
- 99, 81, 689, 20, 123, 36, 693, 1421, 1008, 1423,
- 1057, 1058, 1059, 123, 1014, 37, 218, 131, 220, 198,
- 218, 212, 220, 547, 203, 204, 205, 206, 207, 208,
- 209, 208, 556, 198, 120, 1271, 58, 219, 217, 563,
- 9, 206, 207, 208, 209, 501, 77, 208, 209, 218,
- 120, 220, 217, 547, 208, 209, 217, 219, 89, 583,
- 9, 64, 93, 217, 219, 589, 590, 591, 592, 218,
- 218, 220, 220, 1309, 32, 218, 98, 220, 119, 218,
- 111, 220, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325,
- 112, 1327, 218, 780, 781, 764, 765, 218, 218, 220,
- 220, 218, 763, 220, 791, 1037, 1289, 33, 535, 81,
- 537, 538, 539, 540, 12, 198, 219, 56, 642, 643,
- 644, 645, 646, 206, 207, 208, 209, 56, 218, 55,
- 220, 218, 756, 220, 217, 659, 117, 218, 825, 220,
- 764, 765, 219, 219, 70, 71, 219, 51, 665, 18,
- 219, 173, 669, 57, 219, 218, 673, 220, 56, 218,
- 677, 220, 66, 61, 681, 789, 88, 219, 685, 67,
- 74, 97, 689, 697, 198, 699, 693, 219, 120, 803,
- 219, 85, 206, 207, 208, 209, 710, 219, 712, 219,
- 219, 95, 219, 217, 718, 1195, 122, 721, 219, 723,
- 724, 725, 726, 697, 215, 699, 110, 731, 1391, 717,
- 9, 735, 736, 215, 738, 1504, 710, 1453, 214, 1150,
- 744, 135, 219, 847, 138, 214, 750, 120, 852, 853,
- 754, 918, 189, 98, 148, 9, 157, 171, 746, 763,
- 764, 765, 766, 81, 158, 159, 770, 48, 772, 773,
- 744, 106, 50, 777, 152, 18, 764, 765, 1253, 199,
- 784, 785, 718, 98, 178, 198, 164, 106, 214, 198,
- 726, 102, 1203, 206, 207, 208, 209, 206, 207, 208,
- 209, 805, 806, 106, 217, 106, 780, 781, 217, 1220,
- 814, 815, 816, 817, 818, 819, 106, 791, 217, 50,
- 198, 214, 220, 220, 12, 203, 204, 205, 206, 207,
- 208, 209, 218, 1000, 770, 198, 772, 165, 219, 217,
- 203, 204, 205, 206, 207, 208, 209, 851, 22, 219,
- 854, 63, 63, 1265, 217, 219, 81, 220, 88, 863,
- 864, 865, 866, 867, 868, 83, 203, 176, 56, 186,
- 1197, 81, 12, 61, 1201, 872, 147, 203, 203, 67,
- 218, 98, 879, 880, 988, 882, 883, 220, 885, 886,
- 219, 888, 889, 99, 891, 892, 218, 894, 895, 220,
- 897, 898, 906, 900, 901, 909, 220, 21, 912, 198,
- 220, 50, 220, 220, 97, 1326, 56, 206, 207, 208,
- 209, 61, 71, 219, 219, 1479, 219, 67, 217, 220,
- 123, 935, 906, 937, 938, 939, 940, 941, 942, 61,
- 220, 56, 198, 219, 219, 949, 950, 203, 204, 205,
- 206, 207, 208, 209, 958, 959, 220, 215, 962, 216,
- 220, 217, 77, 33, 152, 214, 219, 219, 219, 198,
- 1381, 219, 219, 219, 219, 219, 164, 206, 207, 208,
- 209, 219, 986, 219, 198, 55, 974, 1122, 217, 56,
- 150, 220, 206, 207, 208, 209, 1156, 219, 219, 219,
- 70, 71, 203, 217, 219, 203, 219, 1334, 120, 114,
- 198, 219, 152, 1424, 1425, 219, 219, 1344, 206, 207,
- 208, 209, 958, 219, 164, 219, 1000, 97, 219, 217,
- 152, 220, 219, 219, 104, 105, 120, 219, 219, 1450,
- 219, 217, 164, 48, 26, 220, 1043, 220, 220, 219,
- 1047, 217, 122, 56, 1534, 219, 218, 220, 198, 220,
- 53, 343, 220, 203, 204, 205, 206, 207, 208, 209,
- 220, 1075, 220, 220, 220, 220, 198, 217, 208, 1076,
- 114, 106, 53, 198, 206, 207, 208, 209, 203, 204,
- 205, 206, 207, 208, 209, 217, 198, 194, 3, 219,
- 1104, 6, 1106, 219, 206, 207, 208, 209, 219, 14,
- 219, 188, 1116, 18, 19, 217, 21, 1121, 219, 79,
- 25, 1125, 63, 48, 29, 30, 83, 32, 9, 1133,
- 1104, 106, 153, 1137, 196, 1139, 219, 419, 1142, 1143,
- 1144, 1145, 1146, 1147, 1148, 1149, 52, 220, 1152, 220,
- 218, 220, 1156, 62, 220, 1159, 220, 220, 219, 219,
- 12, 216, 220, 445, 1168, 1169, 1170, 1171, 1172, 1173,
- 220, 220, 220, 220, 220, 220, 220, 220, 220, 84,
- 1116, 220, 220, 220, 1188, 1121, 198, 220, 220, 220,
- 1194, 220, 204, 205, 206, 207, 208, 209, 220, 1187,
- 220, 1189, 220, 220, 56, 217, 1310, 1311, 14, 61,
- 220, 54, 140, 36, 1188, 67, 1213, 36, 195, 217,
- 1217, 142, 219, 203, 219, 77, 43, 219, 219, 134,
- 1557, 219, 137, 138, 82, 220, 141, 142, 12, 144,
- 145, 220, 220, 148, 1379, 218, 220, 152, 153, 85,
- 220, 156, 220, 158, 159, 160, 61, 220, 220, 1263,
- 165, 166, 220, 198, 220, 142, 62, 1271, 203, 204,
- 205, 206, 207, 208, 209, 110, 181, 197, 218, 7,
- 1268, 219, 56, 160, 93, 1289, 220, 61, 162, 1263,
- 217, 69, 91, 67, 64, 200, 1495, 214, 203, 5,
- 152, 220, 218, 84, 209, 1309, 219, 589, 590, 591,
- 592, 7, 164, 220, 1318, 1319, 1320, 1321, 1322, 1323,
- 1324, 1325, 220, 1327, 1523, 1524, 220, 220, 220, 220,
- 81, 141, 98, 14, 220, 219, 151, 1504, 196, 219,
- 219, 110, 247, 3, 220, 220, 198, 152, 218, 1548,
- 255, 203, 204, 205, 206, 207, 208, 209, 214, 164,
- 642, 643, 644, 645, 646, 217, 271, 1371, 212, 274,
- 275, 216, 212, 220, 0, 0, 33, 659, 152, 514,
- 361, 223, 743, 288, 968, 150, 736, 1391, 342, 1393,
- 164, 721, 723, 198, 965, 1160, 1487, 1371, 1502, 304,
- 1389, 206, 207, 208, 209, 1459, 1509, 1491, 1545, 766,
- 765, 738, 217, 28, 1418, 210, 349, 1421, 976, 1423,
- 15, 272, 563, 1427, 198, 1423, 1497, 1527, 710, 257,
- 1422, 1419, 206, 207, 208, 209, 162, 1524, 343, 344,
- 974, 31, 1535, 217, 362, 777, 101, 1505, 353, 1453,
- 1554, 464, 1528, 1536, 359, 1427, 111, 1257, 113, 1554,
- 1047, 469, 367, 118, 465, 304, 159, 372, 710, 1468,
- 125, -1, 127, 378, 379, 130, 12, -1, -1, 384,
- 1106, 386, 1418, -1, 139, 390, -1, -1, -1, -1,
- -1, 146, -1, -1, 149, -1, -1, -1, 1502, 404,
- -1, -1, -1, -1, -1, 1493, -1, -1, -1, -1,
- -1, 166, -1, -1, -1, -1, -1, -1, 173, 174,
- 56, -1, -1, 805, 806, 61, -1, 182, -1, -1,
- 1504, 67, 814, 815, 816, 817, 818, 819, 443, -1,
- -1, -1, 419, -1, -1, -1, -1, -1, -1, -1,
- 1554, -1, 1556, -1, -1, -1, 461, 1545, -1, -1,
- -1, -1, 467, -1, 469, 3, -1, -1, 445, 851,
- -1, -1, 854, -1, -1, -1, -1, -1, -1, -1,
- -1, 863, 864, 865, 866, 867, 868, 7, -1, 27,
- -1, -1, 12, -1, -1, 33, 501, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, -1, 512, -1, -1,
- -1, -1, -1, -1, -1, -1, 152, 55, -1, -1,
- -1, -1, -1, -1, -1, 63, 64, -1, 164, -1,
- -1, 69, 70, 71, -1, -1, 56, -1, -1, -1,
- -1, 61, 547, -1, 82, -1, -1, 67, -1, -1,
- -1, 556, 90, -1, -1, -1, -1, 77, 563, 97,
- -1, -1, 198, 83, 102, -1, 104, 105, 204, 205,
- 206, 207, 208, 209, -1, -1, -1, -1, 583, -1,
- -1, 217, -1, -1, 122, 123, -1, 125, -1, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, 589, 590, 591, 592, -1, -1, -1, 157,
- 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
- 168, -1, 152, -1, 172, -1, -1, 175, -1, -1,
- 178, 179, -1, -1, 164, -1, -1, 185, 186, -1,
- -1, 189, 7, -1, -1, -1, 194, 12, 196, -1,
- -1, -1, -1, -1, -1, 642, 643, 644, 645, 646,
- -1, -1, -1, -1, -1, -1, -1, -1, 198, -1,
- -1, 219, 659, 203, 204, 205, 206, 207, 208, 209,
- -1, -1, 697, 1075, 699, -1, -1, 217, -1, -1,
- 220, 56, -1, -1, -1, 710, 61, 712, -1, -1,
- -1, -1, 67, 718, -1, -1, 721, -1, 723, 724,
- 725, 726, 77, -1, -1, -1, -1, -1, 83, -1,
- 735, 736, -1, 738, -1, -1, -1, -1, 7, 744,
- -1, -1, -1, 12, -1, 750, -1, -1, -1, 754,
- -1, -1, -1, -1, 731, -1, -1, -1, 763, 764,
- 765, 766, -1, -1, -1, 770, -1, 772, 773, -1,
- -1, -1, 777, -1, -1, 343, -1, -1, 783, 784,
- 785, -1, -1, -1, -1, -1, -1, 56, -1, -1,
- -1, -1, 61, -1, -1, -1, -1, 152, 67, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 77, 164,
- -1, -1, -1, -1, 83, 820, -1, -1, -1, -1,
- -1, -1, 7, -1, -1, -1, -1, 12, 805, 806,
- -1, -1, -1, -1, -1, -1, -1, 814, 815, 816,
- 817, 818, 819, 198, -1, -1, -1, -1, 203, 204,
- 205, 206, 207, 208, 209, -1, -1, -1, -1, -1,
- -1, -1, 217, -1, 869, 220, -1, 872, -1, -1,
- -1, 56, -1, -1, 851, -1, 61, 854, -1, -1,
- -1, -1, 67, 152, -1, -1, 863, 864, 865, 866,
- 867, 868, 77, 291, -1, 164, -1, -1, 83, -1,
- -1, 906, -1, -1, 909, -1, -1, 912, 306, -1,
- -1, 309, -1, 311, 312, 313, 314, -1, -1, -1,
- -1, 926, -1, 7, -1, -1, -1, -1, 12, 198,
- -1, -1, -1, -1, 203, 204, 205, 206, 207, 208,
- 209, -1, 101, -1, 949, 950, -1, -1, 217, -1,
- -1, 220, -1, 958, 113, -1, -1, 962, 935, 118,
- 937, 938, 939, 940, 941, 942, 125, 152, 127, -1,
- -1, 130, 56, -1, -1, -1, -1, 61, 376, 164,
- 139, 986, 959, 67, -1, -1, -1, 146, -1, -1,
- 149, -1, -1, 77, -1, -1, 394, -1, -1, 83,
- -1, -1, -1, -1, -1, -1, -1, 166, 167, -1,
- -1, -1, -1, 198, 173, 174, -1, -1, 203, 204,
- 205, 206, 207, 208, 209, 423, -1, -1, -1, -1,
- -1, -1, 217, 7, -1, 220, -1, -1, 12, -1,
- -1, -1, -1, -1, -1, -1, 444, -1, -1, -1,
- 448, -1, 450, -1, -1, 453, 454, 455, 456, 457,
- 458, 459, 460, -1, 462, -1, -1, -1, 152, -1,
- -1, 1076, -1, -1, -1, -1, -1, -1, -1, -1,
- 164, -1, 56, -1, -1, -1, -1, 61, -1, -1,
- -1, -1, -1, 67, -1, -1, -1, -1, 1075, 1104,
- -1, 1106, -1, 77, -1, -1, -1, -1, -1, 83,
- -1, 1116, -1, -1, 198, -1, 1121, -1, -1, 203,
- 204, 205, 206, 207, 208, 209, -1, 7, -1, 1134,
- -1, -1, 12, 217, -1, -1, 220, -1, -1, -1,
- -1, -1, 710, -1, -1, 1150, -1, -1, 1125, -1,
- -1, 1156, -1, -1, -1, -1, 1133, -1, -1, -1,
- 1137, -1, 1139, 731, -1, 1142, 1143, 1144, 1145, 1146,
- 1147, 1148, 1149, -1, -1, 1152, 56, -1, 152, -1,
- -1, 61, 1159, 1188, -1, -1, -1, 67, -1, 1194,
- 164, 1168, 1169, 1170, 1171, 1172, 1173, 77, 1203, -1,
- -1, -1, -1, 83, -1, 603, -1, 605, 606, -1,
- -1, -1, -1, -1, 612, 1220, -1, 1194, -1, -1,
- -1, -1, -1, -1, 198, -1, 1231, -1, -1, 203,
- 204, 205, 206, 207, 208, 209, -1, -1, -1, -1,
- -1, -1, -1, 217, 218, -1, -1, -1, -1, 647,
- -1, -1, -1, -1, -1, -1, -1, -1, 1263, -1,
- -1, -1, -1, 661, -1, -1, -1, 665, -1, -1,
- -1, 669, 152, -1, -1, 673, 1281, -1, -1, 677,
- -1, -1, 1287, 681, 164, -1, -1, 685, -1, -1,
- -1, 689, -1, -1, 1271, 693, -1, -1, -1, -1,
- -1, -1, -1, -1, 872, -1, -1, -1, -1, -1,
- -1, -1, 1289, -1, -1, -1, -1, -1, 198, -1,
- -1, 1326, -1, 203, 204, 205, 206, 207, 208, 209,
- -1, 12, 1309, -1, -1, -1, -1, 217, 218, -1,
- -1, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, -1,
- 1327, -1, -1, -1, -1, -1, -1, -1, -1, 1364,
- -1, -1, -1, -1, -1, -1, 1371, 935, -1, 937,
- 938, 939, 940, 941, 942, 56, 1381, 1382, -1, -1,
- 61, -1, -1, -1, 1389, -1, 67, -1, 1393, -1,
- -1, 959, -1, -1, -1, -1, 794, 7, -1, -1,
- 10, -1, 12, -1, -1, -1, -1, -1, -1, -1,
- 808, -1, -1, 1418, 1391, -1, 1421, -1, 1423, 1424,
- 1425, -1, 1427, -1, -1, -1, 824, -1, 38, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 1444,
- -1, 1446, -1, -1, -1, 1450, 56, -1, 419, -1,
- -1, 61, -1, -1, -1, -1, -1, 67, 856, -1,
- -1, -1, -1, -1, -1, -1, -1, 77, -1, -1,
- -1, 152, -1, 83, 445, -1, 1453, -1, -1, -1,
- -1, -1, -1, 164, -1, 7, -1, -1, -1, -1,
- 12, -1, -1, -1, -1, -1, -1, 1502, -1, -1,
- -1, -1, -1, -1, 114, 903, -1, -1, 1076, -1,
- -1, -1, -1, -1, -1, -1, -1, 198, -1, -1,
- -1, -1, -1, 204, 205, 206, 207, 208, 209, -1,
- -1, -1, -1, -1, 56, -1, 217, -1, -1, 61,
- -1, -1, 152, -1, -1, 67, -1, -1, -1, 1554,
- -1, 1556, -1, -1, 164, 77, -1, 1125, -1, -1,
- -1, 83, -1, -1, -1, 1133, 1134, -1, -1, 1137,
- -1, 1139, -1, -1, 1142, 1143, 1144, 1145, 1146, 1147,
- 1148, 1149, -1, -1, 1152, -1, -1, -1, 198, -1,
- -1, 1159, -1, 203, 204, 205, 206, 207, 208, 209,
- 1168, 1169, 1170, 1171, 1172, 1173, -1, 217, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 589, 590,
- 591, 592, 1020, 1021, 1022, -1, -1, -1, -1, -1,
- 152, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 164, -1, -1, -1, -1, -1, -1, 1047,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 1057,
- 1058, 1059, 7, 1231, 9, -1, -1, 12, -1, -1,
- -1, 642, 643, 644, 645, 646, 198, -1, -1, -1,
- -1, 203, 204, 205, 206, 207, 208, 209, 659, 211,
- -1, -1, -1, -1, 216, 217, -1, -1, -1, -1,
- -1, -1, -1, 1271, -1, -1, -1, -1, -1, 7,
- -1, 56, -1, 1281, 12, -1, 61, -1, -1, 1287,
- -1, 1289, 67, -1, 7, -1, -1, -1, -1, 12,
- -1, -1, 77, -1, -1, -1, -1, -1, 83, -1,
- -1, 1309, -1, -1, -1, -1, -1, -1, -1, -1,
- 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 56, 1327,
- 731, -1, -1, 61, -1, -1, -1, 50, -1, 67,
- -1, -1, -1, 56, -1, -1, -1, -1, 61, 77,
- -1, -1, -1, -1, 67, 83, -1, -1, -1, -1,
- -1, -1, -1, -1, 77, -1, 1364, -1, -1, -1,
- 83, -1, -1, -1, -1, -1, -1, 152, -1, -1,
- -1, -1, -1, -1, 1382, -1, -1, -1, -1, 164,
- -1, 1389, -1, 1391, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 805, 806, -1, -1, -1, -1,
- -1, -1, -1, 814, 815, 816, 817, 818, 819, -1,
- -1, -1, -1, 198, 152, -1, -1, -1, 203, 204,
- 205, 206, 207, 208, 209, -1, 164, -1, 1266, 152,
- -1, -1, 217, -1, -1, -1, 1444, -1, 1446, -1,
- 851, 164, -1, 854, -1, 1453, -1, -1, -1, -1,
- -1, -1, 863, 864, 865, 866, 867, 868, -1, -1,
- 198, 872, -1, -1, -1, 203, 204, 205, 206, 207,
- 208, 209, -1, -1, -1, 198, -1, -1, 216, 217,
- 203, 204, 205, 206, 207, 208, 209, -1, -1, -1,
- -1, -1, -1, -1, 217, -1, -1, -1, -1, -1,
- -1, -1, -1, 3, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 17, 18, -1,
- -1, -1, -1, -1, 935, -1, 937, 938, 939, 940,
- 941, 942, -1, 33, 34, -1, -1, -1, -1, -1,
- 40, -1, -1, -1, -1, -1, -1, 47, 959, -1,
- -1, -1, -1, -1, 7, 55, 9, -1, -1, 12,
- -1, -1, -1, 63, 64, -1, -1, -1, -1, 69,
- 70, 71, -1, 73, -1, 75, -1, -1, -1, -1,
- 80, -1, 82, -1, -1, -1, -1, -1, -1, -1,
- 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
- -1, -1, 102, 56, 104, 105, -1, -1, 61, -1,
- -1, -1, -1, -1, 67, -1, 116, -1, -1, -1,
- -1, -1, 122, 123, 77, 125, -1, 127, -1, -1,
- 83, -1, -1, -1, -1, 135, -1, -1, 138, 139,
- 140, -1, 142, -1, 1482, -1, 146, -1, 148, 149,
- -1, 12, -1, -1, -1, -1, -1, 157, 158, 159,
- -1, -1, -1, 1501, 1075, 1076, 166, -1, 168, -1,
- -1, -1, 172, -1, -1, 175, -1, -1, 178, 179,
- -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
- -1, -1, -1, -1, 194, 56, 196, -1, 1536, 152,
- 61, -1, -1, -1, -1, -1, 67, -1, -1, -1,
- -1, 164, -1, -1, 1125, -1, 77, -1, -1, -1,
- 220, -1, 1133, 1134, 7, -1, 1137, -1, 1139, 12,
- -1, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 7,
- -1, 1152, -1, -1, 12, 198, -1, -1, 1159, -1,
- 203, 204, 205, 206, 207, 208, 209, 1168, 1169, 1170,
- 1171, 1172, 1173, -1, 217, -1, -1, -1, -1, -1,
- -1, -1, -1, 56, -1, -1, -1, -1, 61, -1,
- -1, -1, -1, -1, 67, -1, -1, -1, 56, -1,
- -1, 152, -1, 61, 77, -1, -1, -1, -1, 67,
- 83, -1, -1, 164, -1, -1, -1, -1, -1, 77,
- -1, -1, -1, -1, -1, 83, -1, -1, -1, -1,
- 1231, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 198, -1, -1,
- -1, -1, 203, 204, 205, 206, 207, 208, 209, -1,
- -1, -1, -1, -1, -1, -1, 217, -1, -1, -1,
- 1271, -1, -1, -1, -1, -1, -1, -1, -1, 152,
- 1281, -1, -1, -1, -1, -1, 1287, -1, 1289, -1,
- -1, 164, -1, -1, 152, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 164, -1, 1309, -1,
- -1, -1, -1, -1, -1, -1, -1, 1318, 1319, 1320,
- 1321, 1322, 1323, 1324, 1325, 198, 1327, -1, -1, -1,
- 203, 204, 205, 206, 207, 208, 209, -1, -1, -1,
- 198, -1, -1, -1, 217, 203, 204, 205, 206, 207,
- 208, 209, -1, -1, -1, -1, -1, -1, -1, 217,
- -1, -1, -1, 1364, -1, -1, -1, -1, -1, -1,
- 3, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 1382, -1, 16, 17, 18, -1, -1, 1389, -1,
- 1391, -1, -1, -1, 27, 28, 29, 30, 31, -1,
- 33, 34, -1, -1, -1, -1, -1, 40, -1, -1,
- -1, 44, 45, -1, 47, -1, -1, -1, -1, -1,
- -1, -1, 55, -1, -1, -1, 59, -1, -1, -1,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
- 73, -1, 75, 1444, 77, 1446, 79, 80, -1, 82,
- -1, -1, 1453, -1, 87, -1, -1, 90, -1, -1,
- -1, -1, -1, -1, 97, -1, -1, 100, -1, 102,
- 103, 104, 105, -1, -1, -1, 109, -1, -1, -1,
- 113, -1, -1, 116, -1, -1, -1, -1, -1, 122,
- 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
- -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
- -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
- -1, -1, -1, -1, 157, 158, 159, -1, 161, -1,
- -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
- -1, -1, 175, 176, -1, 178, 179, -1, -1, -1,
- -1, -1, 185, 186, -1, -1, 189, -1, -1, -1,
- -1, 194, -1, 196, 197, 198, 199, 200, 201, 3,
- -1, -1, -1, -1, 207, 208, -1, 210, 211, 212,
- -1, -1, 16, 17, 18, -1, 219, 220, -1, -1,
- -1, -1, -1, 27, 28, 29, 30, 31, -1, 33,
- 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
- 44, 45, -1, 47, -1, -1, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
- -1, 75, -1, 77, -1, 79, 80, -1, 82, -1,
- -1, -1, -1, 87, -1, -1, 90, -1, -1, -1,
- -1, -1, -1, 97, -1, -1, 100, -1, 102, 103,
- 104, 105, -1, -1, -1, 109, -1, -1, -1, 113,
- -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
- 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
- -1, -1, -1, 157, 158, 159, -1, 161, -1, -1,
- -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
- -1, 175, 176, -1, 178, 179, -1, -1, -1, -1,
- -1, 185, 186, -1, -1, 189, -1, -1, -1, -1,
- 194, -1, 196, 197, 198, 199, 200, 201, 3, -1,
- -1, -1, -1, 207, -1, -1, 210, 211, 212, -1,
- -1, 16, 17, 18, -1, 219, 220, -1, -1, -1,
- -1, -1, 27, 28, 29, 30, 31, -1, 33, 34,
- -1, -1, -1, -1, -1, 40, -1, -1, -1, 44,
- 45, -1, 47, -1, -1, -1, -1, -1, -1, -1,
- 55, -1, -1, -1, 59, -1, -1, -1, 63, 64,
- -1, -1, -1, -1, 69, 70, 71, -1, 73, -1,
- 75, -1, 77, -1, 79, 80, -1, 82, -1, -1,
- -1, -1, 87, -1, -1, 90, -1, -1, -1, -1,
- -1, -1, 97, -1, -1, 100, -1, 102, 103, 104,
- 105, -1, -1, -1, 109, -1, -1, -1, 113, -1,
- -1, 116, -1, -1, -1, -1, -1, 122, 123, 124,
- 125, 126, 127, -1, -1, -1, -1, -1, -1, -1,
- 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
- -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
- -1, -1, 157, 158, 159, -1, 161, -1, -1, -1,
- -1, 166, -1, 168, -1, -1, -1, 172, -1, -1,
- 175, 176, -1, 178, 179, -1, -1, -1, -1, -1,
- 185, 186, -1, -1, 189, -1, -1, -1, -1, 194,
- -1, 196, 197, 198, 199, 200, 201, 3, -1, -1,
- -1, -1, 207, -1, -1, 210, 211, 212, -1, -1,
- 16, 17, 18, -1, 219, 220, -1, -1, -1, -1,
- -1, -1, 28, 29, 30, 31, -1, 33, 34, -1,
- -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
- -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
- -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
- -1, -1, -1, 69, 70, 71, -1, 73, -1, 75,
- -1, -1, -1, 79, 80, -1, 82, -1, -1, -1,
- -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
- -1, 97, -1, -1, -1, -1, 102, 103, 104, 105,
- -1, -1, -1, -1, -1, -1, -1, 113, -1, -1,
- 116, -1, -1, -1, -1, -1, 122, 123, 124, 125,
- 126, 127, -1, -1, -1, -1, -1, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, -1, -1, -1, -1, -1,
- 166, -1, 168, -1, -1, -1, 172, -1, -1, 175,
- 176, -1, 178, 179, -1, -1, -1, -1, -1, 185,
- 186, -1, -1, 189, -1, 3, -1, -1, 194, -1,
- 196, 197, 198, 199, 200, 201, -1, -1, 16, 17,
- 18, 207, -1, -1, 210, 211, 212, -1, -1, -1,
- -1, -1, -1, 219, 220, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, -1, -1, -1, 47,
- -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
- -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
- -1, 79, 80, -1, 82, -1, -1, -1, -1, -1,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, -1, -1, 102, 103, 104, 105, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, -1, -1, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
- 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, -1, -1, -1, -1, 194, -1, 196, 197,
- 198, 199, 200, 201, -1, 3, -1, -1, -1, 207,
- -1, -1, 210, 211, 212, 13, -1, -1, 16, 17,
- 18, 219, 220, -1, -1, -1, -1, -1, -1, 27,
- 28, 29, 30, 31, -1, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
- -1, -1, 50, -1, -1, -1, -1, 55, -1, -1,
- -1, 59, -1, -1, -1, 63, 64, 65, -1, -1,
- -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
- -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, 100, -1, 102, 103, 104, 105, -1, 107,
- -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
- 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, -1, -1, -1, -1, 194, -1, 196, 197,
- 198, 199, 200, 201, -1, 3, -1, -1, -1, 207,
- -1, -1, 210, 211, 212, 13, -1, -1, 16, 17,
- 18, 219, -1, -1, -1, -1, -1, -1, -1, 27,
- 28, 29, 30, 31, -1, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
- -1, -1, 50, -1, -1, -1, -1, 55, -1, -1,
- -1, 59, -1, -1, -1, 63, 64, 65, -1, -1,
- -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
- -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, 100, -1, 102, 103, 104, 105, -1, 107,
- -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
- 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, -1, -1, -1, -1, 194, -1, 196, 197,
- 198, 199, 200, 201, -1, 3, -1, -1, -1, 207,
- -1, -1, 210, 211, 212, 13, -1, -1, 16, 17,
- 18, 219, -1, -1, -1, -1, -1, -1, -1, 27,
- 28, 29, 30, 31, -1, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
- -1, -1, 50, -1, -1, -1, -1, 55, -1, -1,
- -1, 59, -1, -1, -1, 63, 64, 65, -1, -1,
- -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
- -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, 100, -1, 102, 103, 104, 105, -1, 107,
- -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
- 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, 3, -1, -1, -1, 194, -1, 196, 197,
- 198, 199, 200, 201, -1, 16, 17, 18, -1, 207,
- -1, -1, 210, 211, 212, -1, 27, 28, 29, 30,
- 31, 219, 33, 34, -1, -1, -1, -1, -1, 40,
- -1, -1, -1, 44, 45, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, 55, -1, -1, -1, 59, -1,
- -1, -1, 63, 64, -1, -1, -1, -1, 69, 70,
- 71, -1, 73, -1, 75, -1, 77, -1, 79, 80,
- -1, 82, -1, -1, -1, -1, 87, -1, -1, 90,
- -1, -1, -1, -1, -1, -1, 97, -1, -1, 100,
- -1, 102, 103, 104, 105, -1, -1, -1, 109, -1,
- -1, -1, 113, -1, -1, 116, -1, -1, -1, -1,
- -1, 122, 123, 124, 125, 126, 127, -1, -1, -1,
- -1, -1, -1, -1, 135, -1, -1, 138, 139, 140,
- -1, 142, -1, -1, -1, 146, -1, 148, 149, -1,
- -1, -1, -1, -1, -1, -1, 157, 158, 159, -1,
- 161, -1, -1, -1, -1, 166, -1, 168, -1, -1,
- -1, 172, -1, -1, 175, 176, -1, 178, 179, -1,
- -1, -1, -1, -1, 185, 186, -1, -1, 189, 3,
- -1, 5, -1, 194, 8, 196, 197, 198, 199, 200,
- 201, -1, 16, 17, 18, -1, 207, 208, -1, 210,
- 211, 212, -1, 27, 28, 29, 30, 31, 219, 33,
- 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
- 44, 45, -1, 47, -1, -1, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
- -1, 75, -1, 77, -1, -1, 80, -1, 82, -1,
- -1, -1, -1, 87, -1, -1, 90, -1, -1, -1,
- -1, -1, -1, 97, -1, -1, 100, -1, 102, 103,
- 104, 105, -1, -1, -1, 109, -1, -1, -1, 113,
- -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
- 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
- -1, -1, -1, 157, 158, 159, -1, 161, -1, -1,
- -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
- -1, 175, 176, -1, 178, 179, -1, -1, -1, -1,
- -1, 185, 186, -1, -1, 189, 3, -1, 5, -1,
- 194, 8, 196, 197, 198, 199, 200, 201, -1, 16,
- 17, 18, -1, 207, -1, -1, 210, 211, 212, -1,
- 27, 28, 29, 30, 31, 219, 33, 34, -1, -1,
- -1, -1, -1, 40, -1, -1, -1, 44, 45, -1,
- 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
- -1, -1, 59, -1, -1, -1, 63, 64, -1, -1,
- -1, -1, 69, 70, 71, -1, 73, -1, 75, -1,
- 77, -1, -1, 80, -1, 82, -1, -1, -1, -1,
- 87, -1, -1, 90, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, 100, -1, 102, 103, 104, 105, -1,
- -1, -1, 109, -1, -1, -1, 113, -1, -1, 116,
- -1, -1, -1, -1, -1, 122, 123, 124, 125, 126,
- 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
- -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
- -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
- 157, 158, 159, -1, 161, -1, -1, -1, -1, 166,
- -1, 168, -1, -1, -1, 172, -1, -1, 175, 176,
- -1, 178, 179, -1, -1, -1, -1, -1, 185, 186,
- -1, -1, 189, 3, -1, 5, -1, 194, 8, 196,
- 197, 198, 199, 200, 201, -1, 16, 17, 18, -1,
- 207, -1, -1, 210, 211, 212, -1, 27, 28, 29,
- 30, 31, 219, 33, 34, -1, -1, -1, -1, -1,
- 40, -1, -1, -1, 44, 45, -1, 47, -1, -1,
- -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
- -1, -1, -1, 63, 64, -1, -1, -1, -1, 69,
- 70, 71, -1, 73, -1, 75, -1, 77, -1, -1,
- 80, -1, 82, -1, -1, -1, -1, 87, -1, -1,
- 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
- 100, -1, 102, 103, 104, 105, -1, -1, -1, 109,
- -1, -1, -1, 113, -1, -1, 116, -1, -1, -1,
- -1, -1, 122, 123, 124, 125, 126, 127, -1, -1,
- -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
- 140, -1, 142, -1, -1, -1, 146, -1, 148, 149,
- -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
- -1, 161, -1, -1, -1, -1, 166, -1, 168, -1,
- -1, -1, 172, -1, -1, 175, 176, -1, 178, 179,
- -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
- 3, -1, 5, -1, 194, 8, 196, 197, 198, 199,
- 200, 201, -1, 16, 17, 18, -1, 207, -1, -1,
- 210, 211, 212, -1, 27, 28, 29, 30, 31, 219,
- 33, 34, -1, -1, -1, -1, -1, 40, -1, -1,
- -1, 44, 45, -1, 47, -1, -1, -1, -1, -1,
- -1, -1, 55, -1, -1, -1, 59, -1, -1, -1,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
- 73, -1, 75, -1, 77, -1, -1, 80, -1, 82,
- -1, -1, -1, -1, 87, -1, -1, 90, -1, -1,
- -1, -1, -1, -1, 97, -1, -1, 100, -1, 102,
- 103, 104, 105, -1, -1, -1, 109, -1, -1, -1,
- 113, -1, -1, 116, -1, -1, -1, -1, -1, 122,
- 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
- -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
- -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
- -1, -1, -1, -1, 157, 158, 159, -1, 161, -1,
- -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
- -1, -1, 175, 176, -1, 178, 179, -1, -1, -1,
- -1, -1, 185, 186, -1, -1, 189, 3, -1, 5,
- -1, 194, 8, 196, 197, 198, 199, 200, 201, -1,
- 16, 17, 18, -1, 207, -1, -1, 210, 211, 212,
- -1, 27, 28, 29, 30, 31, 219, 33, 34, -1,
- -1, -1, -1, -1, 40, -1, -1, -1, 44, 45,
- -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
- -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
- -1, -1, -1, 69, 70, 71, -1, 73, -1, 75,
- -1, 77, -1, -1, 80, -1, 82, -1, -1, -1,
- -1, 87, -1, -1, 90, -1, -1, -1, -1, -1,
- -1, 97, -1, -1, 100, -1, 102, 103, 104, 105,
- -1, -1, -1, 109, -1, -1, -1, 113, -1, -1,
- 116, -1, -1, -1, -1, -1, 122, 123, 124, 125,
- 126, 127, -1, -1, -1, -1, -1, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, 161, -1, -1, -1, -1,
- 166, -1, 168, -1, -1, -1, 172, -1, -1, 175,
- 176, -1, 178, 179, -1, -1, -1, -1, -1, 185,
- 186, -1, -1, 189, 3, -1, 5, -1, 194, 8,
- 196, 197, 198, 199, 200, 201, -1, 16, 17, 18,
- -1, 207, -1, -1, 210, 211, 212, -1, 27, 28,
- 29, 30, 31, 219, 33, 34, -1, -1, -1, -1,
- -1, 40, -1, -1, -1, 44, 45, -1, 47, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
- 59, -1, -1, -1, 63, 64, -1, -1, -1, -1,
- 69, 70, 71, -1, 73, -1, 75, -1, 77, -1,
- -1, 80, -1, 82, -1, -1, -1, -1, 87, -1,
- -1, 90, -1, -1, -1, -1, -1, -1, 97, -1,
- -1, 100, -1, 102, 103, 104, 105, -1, -1, -1,
- 109, -1, -1, -1, 113, -1, -1, 116, -1, -1,
- -1, -1, -1, 122, 123, 124, 125, 126, 127, -1,
- -1, -1, -1, -1, -1, -1, 135, -1, -1, 138,
- 139, 140, -1, 142, -1, -1, -1, 146, -1, 148,
- 149, -1, -1, -1, -1, -1, -1, -1, 157, 158,
- 159, -1, 161, -1, -1, -1, -1, 166, -1, 168,
- -1, -1, -1, 172, -1, -1, 175, 176, -1, 178,
- 179, -1, -1, -1, -1, -1, 185, 186, -1, -1,
- 189, 3, -1, 5, -1, 194, 8, 196, 197, 198,
- 199, 200, 201, -1, 16, 17, 18, -1, 207, -1,
- -1, 210, 211, 212, -1, 27, 28, 29, 30, 31,
- 219, 33, 34, -1, -1, -1, -1, -1, 40, -1,
- -1, -1, 44, 45, -1, 47, -1, -1, -1, -1,
- -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
- -1, 63, 64, -1, -1, -1, -1, 69, 70, 71,
- -1, 73, -1, 75, -1, 77, -1, -1, 80, -1,
- 82, -1, -1, -1, -1, 87, -1, -1, 90, -1,
- -1, -1, -1, -1, -1, 97, -1, -1, 100, -1,
- 102, 103, 104, 105, -1, -1, -1, 109, -1, -1,
- -1, 113, -1, -1, 116, -1, -1, -1, -1, -1,
- 122, 123, 124, 125, 126, 127, -1, -1, -1, -1,
- -1, -1, -1, 135, -1, -1, 138, 139, 140, -1,
- 142, -1, -1, -1, 146, -1, 148, 149, -1, -1,
- -1, -1, -1, -1, -1, 157, 158, 159, -1, 161,
- -1, -1, -1, -1, 166, -1, 168, -1, -1, -1,
- 172, -1, -1, 175, 176, -1, 178, 179, -1, -1,
- -1, -1, -1, 185, 186, -1, -1, 189, 3, -1,
- -1, -1, 194, -1, 196, 197, 198, 199, 200, 201,
- -1, 16, 17, 18, -1, 207, -1, -1, 210, 211,
- 212, -1, 27, 28, 29, 30, 31, 219, 33, 34,
- -1, -1, -1, -1, -1, 40, -1, -1, -1, 44,
- 45, -1, 47, -1, -1, 50, -1, -1, -1, -1,
- 55, -1, -1, -1, 59, -1, -1, -1, 63, 64,
- -1, -1, -1, -1, 69, 70, 71, -1, 73, -1,
- 75, -1, 77, -1, 79, 80, -1, 82, -1, -1,
- -1, -1, 87, -1, -1, 90, -1, -1, -1, -1,
- -1, -1, 97, -1, -1, 100, -1, 102, 103, 104,
- 105, -1, -1, -1, 109, -1, -1, -1, 113, -1,
- -1, 116, -1, -1, -1, -1, -1, 122, 123, 124,
- 125, 126, 127, -1, -1, -1, -1, -1, -1, -1,
- 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
- -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
- -1, -1, 157, 158, 159, -1, 161, -1, -1, -1,
- -1, 166, -1, 168, -1, -1, -1, 172, -1, -1,
- 175, 176, -1, 178, 179, -1, -1, -1, -1, -1,
- 185, 186, -1, -1, 189, 3, -1, -1, -1, 194,
- -1, 196, 197, 198, 199, 200, 201, -1, 16, 17,
- 18, -1, 207, -1, -1, 210, 211, 212, -1, 27,
- 28, 29, 30, 31, 219, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
- -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
- -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
- -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- 98, -1, 100, -1, 102, 103, 104, 105, -1, -1,
- -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
- 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, 3, -1, -1, -1, 194, -1, 196, 197,
- 198, 199, 200, 201, -1, 16, 17, 18, -1, 207,
- -1, -1, 210, 211, 212, -1, 27, 28, 29, 30,
- 31, 219, 33, 34, -1, -1, -1, -1, -1, 40,
- -1, -1, -1, 44, 45, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, 55, -1, -1, -1, 59, -1,
- -1, -1, 63, 64, -1, -1, -1, -1, 69, 70,
- 71, -1, 73, -1, 75, -1, 77, -1, 79, 80,
- -1, 82, -1, -1, -1, -1, 87, -1, -1, 90,
- -1, -1, -1, -1, -1, -1, 97, -1, -1, 100,
- -1, 102, 103, 104, 105, -1, -1, -1, 109, -1,
- -1, -1, 113, -1, -1, 116, -1, -1, -1, -1,
- -1, 122, 123, 124, 125, 126, 127, -1, -1, -1,
- -1, -1, -1, -1, 135, -1, -1, 138, 139, 140,
- -1, 142, -1, -1, -1, 146, -1, 148, 149, -1,
- -1, -1, -1, -1, -1, -1, 157, 158, 159, -1,
- 161, -1, -1, -1, -1, 166, -1, 168, -1, -1,
- -1, 172, -1, -1, 175, 176, -1, 178, 179, -1,
- -1, -1, -1, -1, 185, 186, -1, -1, 189, 3,
- -1, 5, -1, 194, 8, 196, 197, 198, 199, 200,
- 201, -1, 16, 17, 18, -1, 207, -1, -1, 210,
- 211, 212, -1, 27, 28, 29, 30, 31, 219, 33,
- 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
- 44, 45, -1, 47, -1, -1, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
- -1, 75, -1, -1, -1, -1, 80, -1, 82, -1,
- -1, -1, -1, 87, -1, -1, 90, -1, -1, -1,
- -1, -1, -1, 97, -1, -1, 100, -1, 102, 103,
- 104, 105, -1, -1, -1, 109, -1, -1, -1, 113,
- -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
- 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
- -1, -1, -1, 157, 158, 159, -1, 161, -1, -1,
- -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
- -1, 175, 176, -1, 178, 179, -1, -1, -1, -1,
- -1, 185, 186, -1, -1, 189, 3, -1, -1, -1,
- 194, -1, 196, 197, 198, 199, 200, 201, -1, 16,
- 17, 18, -1, 207, -1, -1, 210, 211, 212, -1,
- 27, 28, 29, 30, 31, 219, 33, 34, -1, -1,
- -1, -1, -1, 40, -1, -1, -1, 44, 45, -1,
- 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
- -1, -1, 59, -1, -1, -1, 63, 64, -1, -1,
- -1, -1, 69, 70, 71, -1, 73, -1, 75, -1,
- 77, -1, -1, 80, -1, 82, -1, -1, -1, -1,
- 87, -1, -1, 90, -1, -1, -1, -1, -1, -1,
- 97, 98, -1, 100, -1, 102, 103, 104, 105, -1,
- -1, -1, 109, -1, -1, -1, 113, -1, -1, 116,
- -1, -1, -1, -1, -1, 122, 123, 124, 125, 126,
- 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
- -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
- -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
- 157, 158, 159, -1, 161, -1, -1, -1, -1, 166,
- -1, 168, -1, -1, -1, 172, -1, -1, 175, 176,
- -1, 178, 179, -1, -1, -1, -1, -1, 185, 186,
- -1, -1, 189, 3, -1, -1, -1, 194, -1, 196,
- 197, 198, 199, 200, 201, -1, 16, 17, 18, -1,
- 207, -1, -1, 210, 211, 212, -1, 27, 28, 29,
- 30, 31, 219, 33, 34, -1, -1, -1, -1, -1,
- 40, -1, -1, -1, 44, 45, -1, 47, -1, -1,
- -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
- -1, -1, -1, 63, 64, -1, -1, -1, -1, 69,
- 70, 71, -1, 73, -1, 75, -1, 77, -1, -1,
- 80, -1, 82, -1, -1, -1, -1, 87, -1, -1,
- 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
- 100, -1, 102, 103, 104, 105, -1, -1, -1, 109,
- -1, -1, -1, 113, -1, -1, 116, -1, -1, -1,
- -1, -1, 122, 123, 124, 125, 126, 127, -1, -1,
- -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
- 140, -1, 142, -1, -1, -1, 146, -1, 148, 149,
- -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
- -1, 161, -1, -1, -1, -1, 166, -1, 168, -1,
- -1, -1, 172, -1, -1, 175, 176, -1, 178, 179,
- -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
- 3, -1, -1, -1, 194, -1, 196, 197, 198, 199,
- 200, 201, -1, 16, 17, 18, -1, 207, -1, -1,
- 210, 211, 212, -1, 27, 28, 29, 30, 31, 219,
- 33, 34, -1, -1, -1, -1, -1, 40, -1, -1,
- -1, -1, -1, -1, 47, -1, -1, -1, -1, -1,
- -1, -1, 55, -1, -1, -1, 59, -1, -1, -1,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
- 73, -1, 75, -1, -1, -1, -1, 80, -1, 82,
- -1, -1, -1, -1, 87, -1, -1, 90, -1, -1,
- -1, -1, -1, -1, 97, -1, -1, 100, -1, 102,
- 103, 104, 105, -1, -1, -1, 109, -1, -1, -1,
- 113, -1, -1, 116, -1, -1, -1, -1, -1, 122,
- 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
- -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
- -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
- -1, -1, -1, -1, 157, 158, 159, -1, 161, -1,
- -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
- -1, -1, 175, 176, -1, 178, 179, -1, -1, -1,
- -1, -1, 185, 186, -1, -1, 189, 3, -1, -1,
- -1, 194, -1, 196, 197, 198, 199, 200, 201, -1,
- 16, 17, 18, -1, 207, -1, -1, 210, 211, 212,
- -1, 27, 28, 29, 30, 31, 219, 33, 34, -1,
- -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
- -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
- -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
- -1, -1, -1, 69, 70, 71, -1, 73, -1, 75,
- -1, -1, -1, -1, 80, -1, 82, -1, -1, -1,
- -1, 87, -1, -1, 90, -1, -1, -1, -1, -1,
- -1, 97, -1, -1, 100, -1, 102, 103, 104, 105,
- -1, -1, -1, 109, -1, -1, -1, 113, -1, -1,
- 116, -1, -1, -1, -1, -1, 122, 123, 124, 125,
- 126, 127, -1, -1, -1, -1, -1, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, 161, -1, -1, -1, -1,
- 166, -1, 168, -1, -1, -1, 172, -1, -1, 175,
- 176, -1, 178, 179, -1, -1, -1, -1, -1, 185,
- 186, -1, -1, 189, 3, -1, -1, -1, 194, -1,
- 196, 197, 198, 199, 200, 201, -1, 16, 17, 18,
- -1, 207, -1, -1, 210, 211, 212, -1, -1, 28,
- 29, 30, 31, 219, 33, 34, -1, -1, -1, -1,
- -1, 40, -1, -1, -1, -1, -1, -1, 47, -1,
- -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
- 59, -1, -1, -1, 63, 64, -1, -1, -1, -1,
- 69, 70, 71, -1, 73, -1, 75, -1, -1, -1,
- 79, 80, -1, 82, -1, -1, -1, -1, -1, -1,
- -1, 90, -1, -1, -1, -1, -1, -1, 97, -1,
- -1, -1, -1, 102, 103, 104, 105, -1, -1, -1,
- -1, -1, -1, -1, 113, -1, -1, 116, -1, -1,
- -1, -1, -1, 122, 123, 124, 125, 126, 127, -1,
- -1, -1, -1, -1, -1, -1, 135, -1, -1, 138,
- 139, 140, -1, 142, -1, -1, -1, 146, -1, 148,
- 149, -1, -1, -1, -1, -1, -1, -1, 157, 158,
- 159, -1, -1, -1, -1, -1, -1, 166, -1, 168,
- -1, -1, -1, 172, -1, -1, 175, 176, -1, 178,
- 179, -1, -1, -1, -1, -1, 185, 186, -1, -1,
- 189, 3, -1, -1, -1, 194, -1, 196, 197, 198,
- 199, 200, 201, -1, 16, 17, 18, -1, 207, -1,
- -1, 210, 211, 212, -1, -1, 28, 29, 30, 31,
- 219, 33, 34, -1, -1, -1, -1, -1, 40, -1,
- -1, -1, -1, -1, -1, 47, -1, -1, -1, -1,
- -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
- -1, 63, 64, -1, -1, -1, -1, 69, 70, 71,
- -1, 73, -1, 75, -1, -1, -1, 79, 80, -1,
- 82, -1, -1, -1, -1, -1, -1, -1, 90, -1,
- -1, -1, -1, -1, -1, 97, -1, -1, -1, -1,
- 102, 103, 104, 105, -1, -1, -1, -1, -1, -1,
- -1, 113, -1, -1, 116, -1, -1, -1, -1, -1,
- 122, 123, 124, 125, 126, 127, -1, -1, -1, -1,
- -1, -1, -1, 135, -1, -1, 138, 139, 140, -1,
- 142, -1, -1, -1, 146, -1, 148, 149, -1, -1,
- -1, -1, -1, -1, -1, 157, 158, 159, -1, -1,
- -1, -1, -1, -1, 166, -1, 168, -1, -1, -1,
- 172, -1, -1, 175, 176, -1, 178, 179, -1, -1,
- -1, -1, -1, 185, 186, -1, -1, 189, 3, -1,
- -1, -1, 194, -1, 196, 197, 198, 199, 200, 201,
- -1, 16, 17, 18, -1, 207, -1, -1, 210, 211,
- 212, -1, 27, -1, -1, -1, -1, 219, 33, 34,
- -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
- -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
- 55, -1, -1, -1, 59, -1, -1, -1, 63, 64,
- -1, -1, -1, -1, 69, 70, 71, -1, 73, -1,
- 75, -1, -1, -1, -1, 80, -1, 82, -1, -1,
- -1, -1, 87, -1, -1, 90, -1, -1, -1, -1,
- -1, -1, 97, -1, -1, 100, -1, 102, 103, 104,
- 105, -1, -1, -1, 109, -1, -1, -1, -1, -1,
- -1, 116, -1, -1, -1, -1, -1, 122, 123, 124,
- 125, 126, 127, -1, -1, -1, -1, -1, -1, -1,
- 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
- -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
- -1, -1, 157, 158, 159, -1, 161, -1, -1, -1,
- -1, 166, -1, 168, -1, -1, -1, 172, -1, -1,
- 175, 176, -1, 178, 179, -1, -1, -1, -1, -1,
- 185, 186, -1, -1, 189, 3, -1, -1, -1, 194,
- -1, 196, 197, 198, 199, 200, 201, -1, 16, 17,
- 18, -1, 207, -1, -1, 210, -1, -1, -1, 27,
- -1, -1, -1, -1, 219, 33, 34, -1, -1, -1,
- -1, -1, 40, -1, -1, -1, -1, -1, -1, 47,
- -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
- -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, -1, 73, -1, 75, -1, -1,
- -1, -1, 80, -1, 82, -1, -1, -1, -1, 87,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, 100, -1, 102, 103, 104, 105, -1, -1,
- -1, 109, -1, -1, -1, -1, -1, -1, 116, -1,
- -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
- 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, 3, -1, -1, -1, 194, -1, 196, 197,
- 198, 199, 200, 201, -1, 16, 17, 18, -1, 207,
- -1, -1, 210, -1, -1, -1, -1, -1, -1, -1,
- -1, 219, 33, 34, -1, -1, -1, -1, -1, 40,
- -1, -1, -1, -1, -1, -1, 47, -1, -1, -1,
- -1, -1, -1, -1, 55, -1, -1, -1, 59, -1,
- -1, -1, 63, 64, -1, -1, -1, -1, 69, 70,
- 71, -1, 73, -1, 75, -1, 77, -1, 79, 80,
- -1, 82, -1, -1, -1, -1, -1, -1, -1, 90,
- -1, -1, -1, -1, -1, -1, 97, -1, -1, -1,
- -1, 102, 103, 104, 105, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 116, -1, -1, -1, -1,
- -1, 122, 123, 124, 125, 126, 127, -1, -1, -1,
- -1, -1, -1, -1, 135, -1, -1, 138, 139, 140,
- -1, 142, -1, -1, -1, 146, -1, 148, 149, -1,
- -1, -1, -1, -1, -1, -1, 157, 158, 159, -1,
- -1, -1, -1, -1, -1, 166, -1, 168, -1, -1,
- -1, 172, -1, -1, 175, 176, -1, 178, 179, -1,
- -1, -1, -1, -1, 185, 186, -1, -1, 189, 3,
- -1, -1, -1, 194, -1, 196, 197, 198, 199, 200,
- 201, -1, 16, 17, 18, -1, 207, -1, -1, 210,
- 211, 212, -1, -1, -1, -1, -1, -1, 219, 33,
- 34, -1, -1, -1, 7, -1, 40, -1, -1, 12,
- -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
- -1, 75, -1, -1, -1, 79, 80, -1, 82, -1,
- -1, -1, -1, 56, -1, -1, 90, -1, 61, -1,
- -1, -1, -1, 97, 67, -1, -1, -1, 102, 103,
- 104, 105, -1, -1, 77, -1, -1, -1, -1, -1,
- -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
- 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
- -1, -1, -1, 157, 158, 159, -1, -1, -1, -1,
- -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
- -1, 175, 176, -1, 178, 179, -1, -1, -1, 152,
- -1, 185, 186, -1, -1, 189, 3, -1, -1, -1,
- 194, 164, 196, 197, 198, 199, 200, 201, -1, -1,
- -1, -1, -1, 207, -1, -1, 210, 211, 212, -1,
- -1, -1, -1, -1, -1, 219, 33, -1, -1, -1,
- -1, -1, -1, 40, -1, 198, -1, -1, -1, -1,
- 203, 204, 205, 206, 207, 208, 209, -1, 55, -1,
- -1, -1, -1, -1, 217, -1, 63, 64, -1, -1,
- -1, -1, 69, 70, 71, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
- -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
- 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
- -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
- -1, 148, 149, -1, -1, -1, -1, -1, 33, 34,
- 157, 158, 159, -1, -1, 40, -1, -1, -1, 166,
- -1, 168, 47, -1, -1, 172, -1, -1, 175, 176,
- 55, 178, 179, 3, 59, -1, -1, -1, 185, 186,
- -1, -1, 189, -1, -1, 70, 71, 194, -1, 196,
- 197, 198, 199, -1, 201, 80, 203, 204, 205, 206,
- 207, 208, 209, 33, -1, -1, 36, -1, -1, -1,
- 40, -1, 97, -1, -1, -1, -1, 102, 103, -1,
- -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
- -1, -1, 62, 63, 64, -1, -1, 122, -1, 69,
- 70, 71, 127, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 82, -1, -1, -1, -1, -1, -1, -1,
- 90, 91, -1, -1, -1, -1, -1, 97, -1, -1,
- -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 122, 123, -1, 125, -1, 127, -1, -1,
- -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
- 140, 196, 142, -1, -1, -1, 146, -1, 148, 149,
- -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
- 3, -1, -1, -1, -1, -1, 166, -1, 168, -1,
- -1, -1, 172, -1, -1, 175, -1, -1, 178, 179,
- -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
- 33, -1, -1, -1, 194, -1, 196, 40, 198, -1,
- -1, -1, -1, 203, 204, 205, 206, 207, 208, 209,
- -1, -1, 55, -1, -1, -1, -1, -1, -1, 62,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
- -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
- -1, -1, -1, -1, 97, -1, -1, -1, -1, 102,
- -1, 104, 105, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
- 123, -1, 125, -1, 127, -1, -1, -1, -1, -1,
- -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
- -1, -1, -1, 146, -1, 148, 149, 3, -1, -1,
- -1, -1, -1, -1, 157, 158, 159, -1, -1, -1,
- -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
- -1, 27, 175, -1, -1, 178, 179, 33, -1, -1,
- -1, -1, 185, 186, 40, -1, 189, -1, -1, -1,
- -1, 194, -1, 196, -1, 198, -1, -1, -1, 55,
- 203, 204, 205, 206, 207, 208, 209, 63, 64, -1,
- -1, -1, -1, 69, 70, 71, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
- -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
- -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
- -1, 127, -1, -1, -1, -1, -1, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, 3, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, 161, -1, -1, -1, -1,
- 166, -1, 168, -1, -1, -1, 172, 33, -1, 175,
- -1, -1, 178, 179, 40, -1, -1, -1, -1, 185,
- 186, -1, -1, 189, -1, -1, -1, -1, 194, 55,
- 196, -1, -1, -1, 200, -1, -1, 63, 64, -1,
- -1, -1, 208, 69, 70, 71, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
- -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
- -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
- -1, 127, -1, -1, -1, -1, 3, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, -1, 33, -1, -1, -1,
- 166, -1, 168, 40, -1, -1, 172, -1, -1, 175,
- -1, -1, 178, 179, -1, -1, -1, -1, 55, 185,
- 186, -1, -1, 189, -1, -1, 63, 64, 194, -1,
- 196, -1, 69, 70, 71, -1, -1, -1, -1, -1,
- -1, -1, 208, -1, -1, 82, -1, -1, -1, -1,
- -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
- 127, -1, -1, -1, -1, 3, -1, -1, 135, -1,
- -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
- -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
- 157, 158, 159, -1, -1, 33, -1, -1, -1, 166,
- -1, 168, 40, -1, -1, 172, -1, -1, 175, -1,
- -1, 178, 179, -1, -1, -1, -1, 55, 185, 186,
- -1, -1, 189, -1, -1, 63, 64, 194, -1, 196,
- -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
- -1, 208, -1, -1, 82, -1, -1, -1, -1, -1,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, -1, -1, 102, -1, 104, 105, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, -1, 125, -1, 127,
- -1, -1, -1, -1, 3, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, -1, 33, -1, -1, -1, 166, -1,
- 168, 40, -1, -1, 172, -1, -1, 175, -1, -1,
- 178, 179, -1, -1, -1, -1, 55, 185, 186, -1,
- -1, 189, -1, -1, 63, 64, 194, -1, 196, -1,
- 69, 70, 71, -1, -1, -1, -1, -1, -1, -1,
- 208, -1, -1, 82, -1, -1, -1, -1, -1, -1,
- -1, 90, -1, -1, -1, -1, -1, -1, 97, -1,
- -1, -1, -1, 102, -1, 104, 105, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 122, 123, -1, 125, -1, 127, -1,
- -1, -1, -1, 3, -1, -1, 135, -1, -1, 138,
- 139, 140, -1, 142, -1, -1, -1, 146, -1, 148,
- 149, -1, -1, -1, -1, -1, -1, 27, 157, 158,
- 159, -1, -1, 33, -1, -1, -1, 166, -1, 168,
- 40, -1, -1, 172, -1, -1, 175, -1, -1, 178,
- 179, -1, -1, -1, -1, 55, 185, 186, -1, -1,
- 189, -1, -1, 63, 64, 194, -1, 196, -1, 69,
- 70, 71, -1, -1, -1, -1, -1, -1, -1, 208,
- -1, -1, 82, -1, -1, -1, -1, -1, -1, -1,
- 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
- -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 122, 123, -1, 125, -1, 127, -1, -1,
- -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
- 140, -1, 142, 3, -1, -1, 146, -1, 148, 149,
- -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
- -1, 161, -1, -1, -1, -1, 166, -1, 168, -1,
- -1, -1, 172, 33, -1, 175, -1, -1, 178, 179,
- 40, -1, -1, -1, -1, 185, 186, -1, -1, 189,
- -1, -1, -1, -1, 194, 55, 196, -1, -1, -1,
- 200, -1, -1, 63, 64, -1, -1, -1, -1, 69,
- 70, 71, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 82, -1, -1, -1, -1, -1, -1, -1,
- 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
- -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 122, 123, -1, 125, -1, 127, -1, -1,
- -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
- 140, -1, 142, -1, -1, -1, 146, -1, 148, 149,
- -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
- 3, -1, -1, -1, -1, -1, 166, -1, 168, -1,
- -1, -1, 172, -1, -1, 175, -1, -1, 178, 179,
- -1, 24, -1, 26, -1, 185, 186, -1, -1, 189,
- 33, -1, -1, -1, 194, -1, 196, 40, -1, 199,
- -1, -1, -1, -1, -1, -1, 49, -1, -1, -1,
- 53, -1, 55, -1, -1, -1, -1, -1, -1, -1,
- 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
- -1, 84, -1, -1, 87, 88, -1, 90, -1, -1,
- -1, -1, -1, -1, 97, -1, -1, -1, 101, 102,
- -1, 104, 105, -1, -1, 108, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
- 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
- -1, -1, 135, 136, -1, 138, 139, 140, -1, 142,
- -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
- -1, -1, 155, -1, 157, 158, 159, -1, -1, 3,
- -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
- -1, -1, 175, 17, 18, 178, 179, -1, -1, -1,
- -1, -1, 185, 186, -1, 188, 189, -1, -1, 33,
- 34, 194, -1, 196, -1, -1, 40, -1, -1, -1,
- -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, -1, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
- -1, 75, -1, -1, -1, -1, 80, -1, 82, -1,
- -1, -1, -1, -1, -1, -1, 90, -1, -1, -1,
- -1, -1, -1, 97, -1, -1, -1, -1, 102, -1,
- 104, 105, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
- -1, 125, -1, 127, -1, -1, -1, -1, -1, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, 3,
- -1, -1, -1, 157, 158, 159, -1, -1, -1, -1,
- -1, -1, 166, -1, 168, 19, -1, -1, 172, -1,
- 24, 175, -1, -1, 178, 179, -1, -1, -1, 33,
- -1, 185, 186, -1, -1, 189, 40, -1, -1, -1,
- 194, -1, 196, -1, -1, 49, -1, -1, -1, -1,
- -1, 55, -1, -1, -1, -1, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 82, -1,
- -1, -1, -1, -1, -1, 89, 90, -1, -1, -1,
- -1, -1, -1, 97, -1, -1, -1, -1, 102, -1,
- 104, 105, -1, -1, -1, -1, -1, 111, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 122, 123,
- -1, 125, -1, 127, -1, -1, -1, -1, 3, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
- -1, -1, 27, 157, 158, 159, -1, -1, 33, -1,
- -1, -1, 166, -1, 168, 40, -1, -1, 172, -1,
- -1, 175, -1, -1, 178, 179, -1, -1, -1, -1,
- 55, 185, 186, -1, -1, 189, -1, -1, 63, 64,
- 194, -1, 196, -1, 69, 70, 71, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 82, -1, -1,
- -1, -1, -1, -1, -1, 90, -1, -1, -1, -1,
- -1, -1, 97, -1, -1, -1, -1, 102, -1, 104,
- 105, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 122, 123, -1,
- 125, -1, 127, -1, -1, -1, -1, 3, -1, -1,
- 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
- -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
- -1, -1, 157, 158, 159, -1, 161, 33, -1, -1,
- -1, 166, -1, 168, 40, -1, -1, 172, -1, -1,
- 175, -1, -1, 178, 179, -1, -1, 53, -1, 55,
- 185, 186, -1, -1, 189, -1, -1, 63, 64, 194,
- -1, 196, -1, 69, 70, 71, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
- -1, -1, -1, -1, 90, -1, 92, -1, -1, -1,
- -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
- -1, 127, -1, -1, -1, -1, 3, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, -1, 33, -1, -1, -1,
- 166, -1, 168, 40, -1, -1, 172, -1, -1, 175,
- -1, -1, 178, 179, -1, -1, -1, -1, 55, 185,
- 186, -1, -1, 189, -1, -1, 63, 64, 194, -1,
- 196, -1, 69, 70, 71, 72, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
- -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
- 127, -1, -1, -1, -1, 3, -1, -1, 135, -1,
- -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
- -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
- 157, 158, 159, -1, -1, 33, -1, -1, -1, 166,
- -1, 168, 40, -1, -1, 172, -1, -1, 175, -1,
- -1, 178, 179, -1, -1, -1, -1, 55, 185, 186,
- -1, -1, 189, -1, -1, 63, 64, 194, -1, 196,
- -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, -1, -1, 102, -1, 104, 105, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, -1, 125, -1, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, 3, -1, -1, 146, -1,
- 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
- 158, 159, -1, -1, 162, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, 33, -1, 175, -1, -1,
- 178, 179, 40, -1, -1, -1, -1, 185, 186, -1,
- -1, 189, -1, -1, -1, -1, 194, 55, 196, -1,
- -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
- -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
- -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
- -1, -1, -1, -1, 102, -1, 104, 105, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 122, 123, -1, 125, -1, 127,
- -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
- 138, 139, 140, -1, 142, -1, -1, -1, 146, 3,
- 148, 149, -1, -1, -1, 9, -1, -1, -1, 157,
- 158, 159, -1, -1, 162, -1, -1, -1, 166, -1,
- 168, -1, -1, -1, 172, -1, -1, 175, -1, 33,
- 178, 179, -1, -1, -1, -1, 40, 185, 186, -1,
- -1, 189, -1, -1, -1, -1, 194, -1, 196, -1,
- -1, 55, -1, -1, -1, -1, -1, -1, -1, 63,
- 64, -1, -1, -1, -1, 69, 70, 71, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 82, -1,
- -1, -1, -1, -1, -1, -1, 90, -1, -1, -1,
- -1, -1, -1, 97, -1, -1, -1, -1, 102, -1,
- 104, 105, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 122, 123,
- -1, 125, -1, 127, -1, -1, -1, -1, 3, -1,
- -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
- -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
- -1, -1, -1, 157, 158, 159, -1, -1, 33, -1,
- -1, -1, 166, -1, 168, 40, -1, -1, 172, -1,
- -1, 175, -1, -1, 178, 179, -1, -1, -1, -1,
- 55, 185, 186, -1, -1, 189, -1, -1, 63, 64,
- 194, -1, 196, -1, 69, 70, 71, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 82, -1, -1,
- -1, -1, -1, -1, -1, 90, -1, -1, -1, -1,
- -1, -1, 97, -1, -1, -1, -1, 102, -1, 104,
- 105, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 122, 123, -1,
- 125, -1, 127, -1, -1, -1, -1, 3, -1, -1,
- 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
- -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
- -1, -1, 157, 158, 159, -1, -1, 33, -1, -1,
- -1, 166, -1, 168, 40, -1, -1, 172, -1, -1,
- 175, -1, -1, 178, 179, -1, -1, -1, -1, 55,
- 185, 186, -1, -1, 189, -1, -1, 63, 64, 194,
- -1, 196, -1, 69, 70, 71, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
- -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
- -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
- -1, 127, -1, -1, -1, -1, 3, -1, -1, 135,
- -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
- 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
- -1, 157, 158, 159, -1, -1, 33, -1, -1, -1,
- 166, -1, 168, 40, -1, -1, 172, -1, -1, 175,
- -1, -1, 178, 179, -1, -1, -1, -1, 55, 185,
- 186, -1, -1, 189, -1, -1, 63, 64, 194, -1,
- 196, -1, 69, 70, 71, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
- -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
- 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
- -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
- -1, 148, 149, -1, -1, -1, 17, 18, -1, -1,
- 157, 158, 159, -1, -1, -1, -1, -1, -1, 166,
- -1, 168, 33, 34, -1, 172, -1, -1, 175, 40,
- -1, 178, 179, -1, -1, -1, 47, -1, 185, 186,
- 17, 18, 189, -1, 55, -1, -1, 194, 59, 196,
- -1, -1, -1, -1, -1, -1, 33, 34, -1, 70,
- 71, -1, 73, 40, 75, -1, -1, -1, -1, 80,
- 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
- -1, -1, 59, -1, -1, -1, 97, 98, -1, -1,
- -1, 102, 103, 70, 71, -1, 73, -1, 75, -1,
- -1, -1, -1, 80, -1, 116, -1, -1, -1, -1,
- -1, 122, -1, 124, -1, 126, 127, -1, -1, -1,
- 97, -1, -1, 6, -1, 102, 103, -1, 11, -1,
- -1, -1, -1, -1, -1, -1, -1, 20, -1, 116,
- 23, -1, 25, -1, -1, 122, -1, 124, -1, 126,
- 127, -1, 35, -1, 37, -1, -1, -1, 41, 42,
- 43, -1, -1, 46, -1, 176, -1, -1, -1, 52,
- -1, -1, -1, -1, -1, 58, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 196, 197, -1, 199, 200,
- 201, -1, -1, -1, -1, 78, -1, -1, -1, 176,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 94, -1, 96, -1, 98, 99, -1, -1, 196,
- 197, -1, 199, 200, 201, 17, 18, -1, -1, 112,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 33, 34, -1, -1, 128, -1, -1, 40, -1,
- -1, -1, -1, 136, 137, 47, -1, -1, -1, -1,
- 143, 144, -1, 55, -1, -1, -1, 59, -1, -1,
- -1, 154, 155, 156, -1, -1, -1, 160, 70, 71,
- -1, 73, -1, 75, -1, -1, -1, 170, 80, -1,
- 17, 18, -1, -1, 177, -1, -1, -1, -1, -1,
- 183, -1, -1, -1, 187, 97, 33, 34, -1, -1,
- 102, 103, -1, 40, -1, -1, -1, -1, -1, -1,
- 47, -1, -1, -1, 116, -1, -1, -1, 55, -1,
- 122, -1, 59, -1, -1, 127, -1, -1, -1, -1,
- -1, -1, -1, 70, 71, -1, 73, -1, 75, -1,
- -1, -1, -1, 80, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 97, -1, -1, -1, -1, 102, 103, -1, -1, -1,
- -1, -1, -1, 175, 176, -1, -1, -1, -1, 116,
- -1, -1, -1, -1, -1, 122, -1, -1, -1, -1,
- 127, -1, -1, -1, 196, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 176,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 196
+static const short yycheck[] = {3,
+ 480, 136, 6, 202, 479, 165, 560, 148, 420, 484,
+ 14, 780, 781, 162, 18, 19, 570, 21, 912, 154,
+ 347, 25, 791, 906, 191, 29, 30, 745, 32, 367,
+ 735, 642, 643, 644, 645, 646, 849, 1179, 26, 491,
+ 14, 1346, 1347, 5, 5, 19, 48, 8, 659, 36,
+ 461, 25, 36, 36, 60, 50, 468, 50, 32, 50,
+ 36, 19, 114, 4, 22, 6, 1134, 171, 1429, 1430,
+ 6, 114, 106, 1104, 41, 114, 603, 114, 605, 606,
+ 84, 68, 37, 114, 559, 203, 50, 806, 19, 15,
+ 37, 49, 51, 36, 199, 589, 590, 591, 592, 70,
+ 41, 512, 207, 58, 132, 129, 210, 37, 172, 133,
+ 84, 271, 1473, 278, 274, 179, 807, 145, 49, 114,
+ 595, 1474, 1475, 1428, 168, 290, 97, 86, 58, 247,
+ 134, 89, 99, 137, 138, 854, 79, 141, 142, 12,
+ 144, 145, 106, 98, 148, 1498, 7, 314, 152, 153,
+ 76, 12, 156, 111, 158, 159, 160, 112, 89, 196,
+ 134, 165, 166, 37, 855, 112, 218, 197, 220, 203,
+ 81, 145, 50, 99, 649, 218, 19, 181, 152, 218,
+ 111, 220, 112, 56, 58, 215, 101, 218, 60, 220,
+ 7, 101, 604, 36, 67, 56, 200, 7, 113, 203,
+ 61, 137, 138, 114, 192, 209, 67, 181, 144, 211,
+ 197, 1572, 218, 197, 197, 769, 77, 191, 173, 1287,
+ 156, 197, 158, 218, 98, 218, 200, 218, 169, 5,
+ 166, 1000, 1263, 184, 77, 209, 1049, 199, 112, 35,
+ 851, 37, 12, 247, 949, 950, 89, 98, 413, 199,
+ 93, 255, 863, 864, 865, 866, 867, 868, 219, 79,
+ 149, 219, 58, 39, 115, 1570, 216, 271, 111, 197,
+ 274, 275, 935, 261, 937, 938, 939, 940, 941, 942,
+ 732, 808, 78, 77, 55, 79, 56, 215, 79, 190,
+ 191, 152, 180, 181, 398, 399, 400, 67, 465, 70,
+ 1194, 405, 98, 164, 124, 108, 126, 1449, 35, 197,
+ 37, 805, 1256, 417, 1382, 1259, 112, 199, 121, 255,
+ 814, 815, 816, 817, 818, 819, 97, 315, 134, 856,
+ 124, 58, 126, 124, 216, 126, 440, 198, 442, 343,
+ 344, 197, 203, 204, 205, 206, 207, 208, 209, 353,
+ 9, 78, 340, 341, 342, 359, 217, 196, 197, 215,
+ 199, 496, 201, 367, 9, 214, 215, 163, 372, 343,
+ 344, 98, 783, 700, 378, 379, 1444, 212, 1446, 353,
+ 384, 198, 386, 371, 711, 112, 390, 198, 198, 206,
+ 207, 208, 209, 204, 205, 807, 206, 207, 208, 209,
+ 217, 199, 77, 201, 79, 379, 1219, 217, 197, 820,
+ 822, 823, 750, 208, 209, 419, 754, 192, 193, 215,
+ 750, 833, 217, 219, 754, 197, 215, 214, 218, 904,
+ 220, 535, 219, 537, 538, 539, 540, 196, 218, 443,
+ 220, 445, 378, 855, 167, 218, 9, 220, 384, 124,
+ 386, 126, 1168, 1169, 1170, 1171, 1172, 1173, 869, 871,
+ 208, 209, 1125, 467, 1075, 469, 1184, 196, 149, 217,
+ 1133, 492, 493, 494, 1137, 218, 1139, 220, 64, 1142,
+ 1143, 1144, 1145, 1146, 1147, 1148, 1149, 90, 1371, 1152,
+ 218, 465, 220, 1020, 1021, 1022, 1159, 501, 665, 81,
+ 208, 209, 669, 5, 218, 81, 673, 4, 19, 217,
+ 677, 123, 9, 24, 681, 926, 513, 81, 685, 16,
+ 99, 81, 689, 20, 123, 36, 693, 1421, 1008, 1423,
+ 1057, 1058, 1059, 123, 1014, 37, 218, 131, 220, 198,
+ 218, 212, 220, 547, 203, 204, 205, 206, 207, 208,
+ 209, 208, 556, 198, 120, 1271, 58, 219, 217, 563,
+ 9, 206, 207, 208, 209, 501, 77, 208, 209, 218,
+ 120, 220, 217, 547, 208, 209, 217, 219, 89, 583,
+ 9, 64, 93, 217, 219, 589, 590, 591, 592, 218,
+ 218, 220, 220, 1309, 32, 218, 98, 220, 119, 218,
+ 111, 220, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325,
+ 112, 1327, 218, 780, 781, 764, 765, 218, 218, 220,
+ 220, 218, 763, 220, 791, 1037, 1289, 33, 535, 81,
+ 537, 538, 539, 540, 12, 198, 219, 56, 642, 643,
+ 644, 645, 646, 206, 207, 208, 209, 56, 218, 55,
+ 220, 218, 756, 220, 217, 659, 117, 218, 825, 220,
+ 764, 765, 219, 219, 70, 71, 219, 51, 665, 18,
+ 219, 173, 669, 57, 219, 218, 673, 220, 56, 218,
+ 677, 220, 66, 61, 681, 789, 88, 219, 685, 67,
+ 74, 97, 689, 697, 198, 699, 693, 219, 120, 803,
+ 219, 85, 206, 207, 208, 209, 710, 219, 712, 219,
+ 219, 95, 219, 217, 718, 1195, 122, 721, 219, 723,
+ 724, 725, 726, 697, 215, 699, 110, 731, 1391, 717,
+ 9, 735, 736, 215, 738, 1504, 710, 1453, 214, 1150,
+ 744, 135, 219, 847, 138, 214, 750, 120, 852, 853,
+ 754, 918, 189, 98, 148, 9, 157, 171, 746, 763,
+ 764, 765, 766, 81, 158, 159, 770, 48, 772, 773,
+ 744, 106, 50, 777, 152, 18, 764, 765, 1253, 199,
+ 784, 785, 718, 98, 178, 198, 164, 106, 214, 198,
+ 726, 102, 1203, 206, 207, 208, 209, 206, 207, 208,
+ 209, 805, 806, 106, 217, 106, 780, 781, 217, 1220,
+ 814, 815, 816, 817, 818, 819, 106, 791, 217, 50,
+ 198, 214, 220, 220, 12, 203, 204, 205, 206, 207,
+ 208, 209, 218, 1000, 770, 198, 772, 165, 219, 217,
+ 203, 204, 205, 206, 207, 208, 209, 851, 22, 219,
+ 854, 63, 63, 1265, 217, 219, 81, 220, 88, 863,
+ 864, 865, 866, 867, 868, 83, 203, 176, 56, 186,
+ 1197, 81, 12, 61, 1201, 872, 147, 203, 203, 67,
+ 218, 98, 879, 880, 988, 882, 883, 220, 885, 886,
+ 219, 888, 889, 99, 891, 892, 218, 894, 895, 220,
+ 897, 898, 906, 900, 901, 909, 220, 21, 912, 198,
+ 220, 50, 220, 220, 97, 1326, 56, 206, 207, 208,
+ 209, 61, 71, 219, 219, 1479, 219, 67, 217, 220,
+ 123, 935, 906, 937, 938, 939, 940, 941, 942, 61,
+ 220, 56, 198, 219, 219, 949, 950, 203, 204, 205,
+ 206, 207, 208, 209, 958, 959, 220, 215, 962, 216,
+ 220, 217, 77, 33, 152, 214, 219, 219, 219, 198,
+ 1381, 219, 219, 219, 219, 219, 164, 206, 207, 208,
+ 209, 219, 986, 219, 198, 55, 974, 1122, 217, 56,
+ 150, 220, 206, 207, 208, 209, 1156, 219, 219, 219,
+ 70, 71, 203, 217, 219, 203, 219, 1334, 120, 114,
+ 198, 219, 152, 1424, 1425, 219, 219, 1344, 206, 207,
+ 208, 209, 958, 219, 164, 219, 1000, 97, 219, 217,
+ 152, 220, 219, 219, 104, 105, 120, 219, 219, 1450,
+ 219, 217, 164, 48, 26, 220, 1043, 220, 220, 219,
+ 1047, 217, 122, 56, 1534, 219, 218, 220, 198, 220,
+ 53, 343, 220, 203, 204, 205, 206, 207, 208, 209,
+ 220, 1075, 220, 220, 220, 220, 198, 217, 208, 1076,
+ 114, 106, 53, 198, 206, 207, 208, 209, 203, 204,
+ 205, 206, 207, 208, 209, 217, 198, 194, 3, 219,
+ 1104, 6, 1106, 219, 206, 207, 208, 209, 219, 14,
+ 219, 188, 1116, 18, 19, 217, 21, 1121, 219, 79,
+ 25, 1125, 63, 48, 29, 30, 83, 32, 9, 1133,
+ 1104, 106, 153, 1137, 196, 1139, 219, 419, 1142, 1143,
+ 1144, 1145, 1146, 1147, 1148, 1149, 52, 220, 1152, 220,
+ 218, 220, 1156, 62, 220, 1159, 220, 220, 219, 219,
+ 12, 216, 220, 445, 1168, 1169, 1170, 1171, 1172, 1173,
+ 220, 220, 220, 220, 220, 220, 220, 220, 220, 84,
+ 1116, 220, 220, 220, 1188, 1121, 198, 220, 220, 220,
+ 1194, 220, 204, 205, 206, 207, 208, 209, 220, 1187,
+ 220, 1189, 220, 220, 56, 217, 1310, 1311, 14, 61,
+ 220, 54, 140, 36, 1188, 67, 1213, 36, 195, 217,
+ 1217, 142, 219, 203, 219, 77, 43, 219, 219, 134,
+ 1557, 219, 137, 138, 82, 220, 141, 142, 12, 144,
+ 145, 220, 220, 148, 1379, 218, 220, 152, 153, 85,
+ 220, 156, 220, 158, 159, 160, 61, 220, 220, 1263,
+ 165, 166, 220, 198, 220, 142, 62, 1271, 203, 204,
+ 205, 206, 207, 208, 209, 110, 181, 197, 218, 7,
+ 1268, 219, 56, 160, 93, 1289, 220, 61, 162, 1263,
+ 217, 69, 91, 67, 64, 200, 1495, 214, 203, 5,
+ 152, 220, 218, 84, 209, 1309, 219, 589, 590, 591,
+ 592, 7, 164, 220, 1318, 1319, 1320, 1321, 1322, 1323,
+ 1324, 1325, 220, 1327, 1523, 1524, 220, 220, 220, 220,
+ 81, 141, 98, 14, 220, 219, 151, 1504, 196, 219,
+ 219, 110, 247, 3, 220, 220, 198, 152, 218, 1548,
+ 255, 203, 204, 205, 206, 207, 208, 209, 214, 164,
+ 642, 643, 644, 645, 646, 217, 271, 1371, 212, 274,
+ 275, 216, 212, 220, 0, 0, 33, 659, 152, 514,
+ 361, 223, 743, 288, 968, 150, 736, 1391, 342, 1393,
+ 164, 721, 723, 198, 965, 1160, 1487, 1371, 1502, 304,
+ 1389, 206, 207, 208, 209, 1459, 1509, 1491, 1545, 766,
+ 765, 738, 217, 28, 1418, 210, 349, 1421, 976, 1423,
+ 15, 272, 563, 1427, 198, 1423, 1497, 1527, 710, 257,
+ 1422, 1419, 206, 207, 208, 209, 162, 1524, 343, 344,
+ 974, 31, 1535, 217, 362, 777, 101, 1505, 353, 1453,
+ 1554, 464, 1528, 1536, 359, 1427, 111, 1257, 113, 1554,
+ 1047, 469, 367, 118, 465, 304, 159, 372, 710, 1468,
+ 125, -1, 127, 378, 379, 130, 12, -1, -1, 384,
+ 1106, 386, 1418, -1, 139, 390, -1, -1, -1, -1,
+ -1, 146, -1, -1, 149, -1, -1, -1, 1502, 404,
+ -1, -1, -1, -1, -1, 1493, -1, -1, -1, -1,
+ -1, 166, -1, -1, -1, -1, -1, -1, 173, 174,
+ 56, -1, -1, 805, 806, 61, -1, 182, -1, -1,
+ 1504, 67, 814, 815, 816, 817, 818, 819, 443, -1,
+ -1, -1, 419, -1, -1, -1, -1, -1, -1, -1,
+ 1554, -1, 1556, -1, -1, -1, 461, 1545, -1, -1,
+ -1, -1, 467, -1, 469, 3, -1, -1, 445, 851,
+ -1, -1, 854, -1, -1, -1, -1, -1, -1, -1,
+ -1, 863, 864, 865, 866, 867, 868, 7, -1, 27,
+ -1, -1, 12, -1, -1, 33, 501, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, 512, -1, -1,
+ -1, -1, -1, -1, -1, -1, 152, 55, -1, -1,
+ -1, -1, -1, -1, -1, 63, 64, -1, 164, -1,
+ -1, 69, 70, 71, -1, -1, 56, -1, -1, -1,
+ -1, 61, 547, -1, 82, -1, -1, 67, -1, -1,
+ -1, 556, 90, -1, -1, -1, -1, 77, 563, 97,
+ -1, -1, 198, 83, 102, -1, 104, 105, 204, 205,
+ 206, 207, 208, 209, -1, -1, -1, -1, 583, -1,
+ -1, 217, -1, -1, 122, 123, -1, 125, -1, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, 589, 590, 591, 592, -1, -1, -1, 157,
+ 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
+ 168, -1, 152, -1, 172, -1, -1, 175, -1, -1,
+ 178, 179, -1, -1, 164, -1, -1, 185, 186, -1,
+ -1, 189, 7, -1, -1, -1, 194, 12, 196, -1,
+ -1, -1, -1, -1, -1, 642, 643, 644, 645, 646,
+ -1, -1, -1, -1, -1, -1, -1, -1, 198, -1,
+ -1, 219, 659, 203, 204, 205, 206, 207, 208, 209,
+ -1, -1, 697, 1075, 699, -1, -1, 217, -1, -1,
+ 220, 56, -1, -1, -1, 710, 61, 712, -1, -1,
+ -1, -1, 67, 718, -1, -1, 721, -1, 723, 724,
+ 725, 726, 77, -1, -1, -1, -1, -1, 83, -1,
+ 735, 736, -1, 738, -1, -1, -1, -1, 7, 744,
+ -1, -1, -1, 12, -1, 750, -1, -1, -1, 754,
+ -1, -1, -1, -1, 731, -1, -1, -1, 763, 764,
+ 765, 766, -1, -1, -1, 770, -1, 772, 773, -1,
+ -1, -1, 777, -1, -1, 343, -1, -1, 783, 784,
+ 785, -1, -1, -1, -1, -1, -1, 56, -1, -1,
+ -1, -1, 61, -1, -1, -1, -1, 152, 67, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 77, 164,
+ -1, -1, -1, -1, 83, 820, -1, -1, -1, -1,
+ -1, -1, 7, -1, -1, -1, -1, 12, 805, 806,
+ -1, -1, -1, -1, -1, -1, -1, 814, 815, 816,
+ 817, 818, 819, 198, -1, -1, -1, -1, 203, 204,
+ 205, 206, 207, 208, 209, -1, -1, -1, -1, -1,
+ -1, -1, 217, -1, 869, 220, -1, 872, -1, -1,
+ -1, 56, -1, -1, 851, -1, 61, 854, -1, -1,
+ -1, -1, 67, 152, -1, -1, 863, 864, 865, 866,
+ 867, 868, 77, 291, -1, 164, -1, -1, 83, -1,
+ -1, 906, -1, -1, 909, -1, -1, 912, 306, -1,
+ -1, 309, -1, 311, 312, 313, 314, -1, -1, -1,
+ -1, 926, -1, 7, -1, -1, -1, -1, 12, 198,
+ -1, -1, -1, -1, 203, 204, 205, 206, 207, 208,
+ 209, -1, 101, -1, 949, 950, -1, -1, 217, -1,
+ -1, 220, -1, 958, 113, -1, -1, 962, 935, 118,
+ 937, 938, 939, 940, 941, 942, 125, 152, 127, -1,
+ -1, 130, 56, -1, -1, -1, -1, 61, 376, 164,
+ 139, 986, 959, 67, -1, -1, -1, 146, -1, -1,
+ 149, -1, -1, 77, -1, -1, 394, -1, -1, 83,
+ -1, -1, -1, -1, -1, -1, -1, 166, 167, -1,
+ -1, -1, -1, 198, 173, 174, -1, -1, 203, 204,
+ 205, 206, 207, 208, 209, 423, -1, -1, -1, -1,
+ -1, -1, 217, 7, -1, 220, -1, -1, 12, -1,
+ -1, -1, -1, -1, -1, -1, 444, -1, -1, -1,
+ 448, -1, 450, -1, -1, 453, 454, 455, 456, 457,
+ 458, 459, 460, -1, 462, -1, -1, -1, 152, -1,
+ -1, 1076, -1, -1, -1, -1, -1, -1, -1, -1,
+ 164, -1, 56, -1, -1, -1, -1, 61, -1, -1,
+ -1, -1, -1, 67, -1, -1, -1, -1, 1075, 1104,
+ -1, 1106, -1, 77, -1, -1, -1, -1, -1, 83,
+ -1, 1116, -1, -1, 198, -1, 1121, -1, -1, 203,
+ 204, 205, 206, 207, 208, 209, -1, 7, -1, 1134,
+ -1, -1, 12, 217, -1, -1, 220, -1, -1, -1,
+ -1, -1, 710, -1, -1, 1150, -1, -1, 1125, -1,
+ -1, 1156, -1, -1, -1, -1, 1133, -1, -1, -1,
+ 1137, -1, 1139, 731, -1, 1142, 1143, 1144, 1145, 1146,
+ 1147, 1148, 1149, -1, -1, 1152, 56, -1, 152, -1,
+ -1, 61, 1159, 1188, -1, -1, -1, 67, -1, 1194,
+ 164, 1168, 1169, 1170, 1171, 1172, 1173, 77, 1203, -1,
+ -1, -1, -1, 83, -1, 603, -1, 605, 606, -1,
+ -1, -1, -1, -1, 612, 1220, -1, 1194, -1, -1,
+ -1, -1, -1, -1, 198, -1, 1231, -1, -1, 203,
+ 204, 205, 206, 207, 208, 209, -1, -1, -1, -1,
+ -1, -1, -1, 217, 218, -1, -1, -1, -1, 647,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1263, -1,
+ -1, -1, -1, 661, -1, -1, -1, 665, -1, -1,
+ -1, 669, 152, -1, -1, 673, 1281, -1, -1, 677,
+ -1, -1, 1287, 681, 164, -1, -1, 685, -1, -1,
+ -1, 689, -1, -1, 1271, 693, -1, -1, -1, -1,
+ -1, -1, -1, -1, 872, -1, -1, -1, -1, -1,
+ -1, -1, 1289, -1, -1, -1, -1, -1, 198, -1,
+ -1, 1326, -1, 203, 204, 205, 206, 207, 208, 209,
+ -1, 12, 1309, -1, -1, -1, -1, 217, 218, -1,
+ -1, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, -1,
+ 1327, -1, -1, -1, -1, -1, -1, -1, -1, 1364,
+ -1, -1, -1, -1, -1, -1, 1371, 935, -1, 937,
+ 938, 939, 940, 941, 942, 56, 1381, 1382, -1, -1,
+ 61, -1, -1, -1, 1389, -1, 67, -1, 1393, -1,
+ -1, 959, -1, -1, -1, -1, 794, 7, -1, -1,
+ 10, -1, 12, -1, -1, -1, -1, -1, -1, -1,
+ 808, -1, -1, 1418, 1391, -1, 1421, -1, 1423, 1424,
+ 1425, -1, 1427, -1, -1, -1, 824, -1, 38, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1444,
+ -1, 1446, -1, -1, -1, 1450, 56, -1, 419, -1,
+ -1, 61, -1, -1, -1, -1, -1, 67, 856, -1,
+ -1, -1, -1, -1, -1, -1, -1, 77, -1, -1,
+ -1, 152, -1, 83, 445, -1, 1453, -1, -1, -1,
+ -1, -1, -1, 164, -1, 7, -1, -1, -1, -1,
+ 12, -1, -1, -1, -1, -1, -1, 1502, -1, -1,
+ -1, -1, -1, -1, 114, 903, -1, -1, 1076, -1,
+ -1, -1, -1, -1, -1, -1, -1, 198, -1, -1,
+ -1, -1, -1, 204, 205, 206, 207, 208, 209, -1,
+ -1, -1, -1, -1, 56, -1, 217, -1, -1, 61,
+ -1, -1, 152, -1, -1, 67, -1, -1, -1, 1554,
+ -1, 1556, -1, -1, 164, 77, -1, 1125, -1, -1,
+ -1, 83, -1, -1, -1, 1133, 1134, -1, -1, 1137,
+ -1, 1139, -1, -1, 1142, 1143, 1144, 1145, 1146, 1147,
+ 1148, 1149, -1, -1, 1152, -1, -1, -1, 198, -1,
+ -1, 1159, -1, 203, 204, 205, 206, 207, 208, 209,
+ 1168, 1169, 1170, 1171, 1172, 1173, -1, 217, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 589, 590,
+ 591, 592, 1020, 1021, 1022, -1, -1, -1, -1, -1,
+ 152, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 164, -1, -1, -1, -1, -1, -1, 1047,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1057,
+ 1058, 1059, 7, 1231, 9, -1, -1, 12, -1, -1,
+ -1, 642, 643, 644, 645, 646, 198, -1, -1, -1,
+ -1, 203, 204, 205, 206, 207, 208, 209, 659, 211,
+ -1, -1, -1, -1, 216, 217, -1, -1, -1, -1,
+ -1, -1, -1, 1271, -1, -1, -1, -1, -1, 7,
+ -1, 56, -1, 1281, 12, -1, 61, -1, -1, 1287,
+ -1, 1289, 67, -1, 7, -1, -1, -1, -1, 12,
+ -1, -1, 77, -1, -1, -1, -1, -1, 83, -1,
+ -1, 1309, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 56, 1327,
+ 731, -1, -1, 61, -1, -1, -1, 50, -1, 67,
+ -1, -1, -1, 56, -1, -1, -1, -1, 61, 77,
+ -1, -1, -1, -1, 67, 83, -1, -1, -1, -1,
+ -1, -1, -1, -1, 77, -1, 1364, -1, -1, -1,
+ 83, -1, -1, -1, -1, -1, -1, 152, -1, -1,
+ -1, -1, -1, -1, 1382, -1, -1, -1, -1, 164,
+ -1, 1389, -1, 1391, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 805, 806, -1, -1, -1, -1,
+ -1, -1, -1, 814, 815, 816, 817, 818, 819, -1,
+ -1, -1, -1, 198, 152, -1, -1, -1, 203, 204,
+ 205, 206, 207, 208, 209, -1, 164, -1, 1266, 152,
+ -1, -1, 217, -1, -1, -1, 1444, -1, 1446, -1,
+ 851, 164, -1, 854, -1, 1453, -1, -1, -1, -1,
+ -1, -1, 863, 864, 865, 866, 867, 868, -1, -1,
+ 198, 872, -1, -1, -1, 203, 204, 205, 206, 207,
+ 208, 209, -1, -1, -1, 198, -1, -1, 216, 217,
+ 203, 204, 205, 206, 207, 208, 209, -1, -1, -1,
+ -1, -1, -1, -1, 217, -1, -1, -1, -1, -1,
+ -1, -1, -1, 3, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 17, 18, -1,
+ -1, -1, -1, -1, 935, -1, 937, 938, 939, 940,
+ 941, 942, -1, 33, 34, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, -1, -1, -1, 47, 959, -1,
+ -1, -1, -1, -1, 7, 55, 9, -1, -1, 12,
+ -1, -1, -1, 63, 64, -1, -1, -1, -1, 69,
+ 70, 71, -1, 73, -1, 75, -1, -1, -1, -1,
+ 80, -1, 82, -1, -1, -1, -1, -1, -1, -1,
+ 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
+ -1, -1, 102, 56, 104, 105, -1, -1, 61, -1,
+ -1, -1, -1, -1, 67, -1, 116, -1, -1, -1,
+ -1, -1, 122, 123, 77, 125, -1, 127, -1, -1,
+ 83, -1, -1, -1, -1, 135, -1, -1, 138, 139,
+ 140, -1, 142, -1, 1482, -1, 146, -1, 148, 149,
+ -1, 12, -1, -1, -1, -1, -1, 157, 158, 159,
+ -1, -1, -1, 1501, 1075, 1076, 166, -1, 168, -1,
+ -1, -1, 172, -1, -1, 175, -1, -1, 178, 179,
+ -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
+ -1, -1, -1, -1, 194, 56, 196, -1, 1536, 152,
+ 61, -1, -1, -1, -1, -1, 67, -1, -1, -1,
+ -1, 164, -1, -1, 1125, -1, 77, -1, -1, -1,
+ 220, -1, 1133, 1134, 7, -1, 1137, -1, 1139, 12,
+ -1, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 7,
+ -1, 1152, -1, -1, 12, 198, -1, -1, 1159, -1,
+ 203, 204, 205, 206, 207, 208, 209, 1168, 1169, 1170,
+ 1171, 1172, 1173, -1, 217, -1, -1, -1, -1, -1,
+ -1, -1, -1, 56, -1, -1, -1, -1, 61, -1,
+ -1, -1, -1, -1, 67, -1, -1, -1, 56, -1,
+ -1, 152, -1, 61, 77, -1, -1, -1, -1, 67,
+ 83, -1, -1, 164, -1, -1, -1, -1, -1, 77,
+ -1, -1, -1, -1, -1, 83, -1, -1, -1, -1,
+ 1231, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 198, -1, -1,
+ -1, -1, 203, 204, 205, 206, 207, 208, 209, -1,
+ -1, -1, -1, -1, -1, -1, 217, -1, -1, -1,
+ 1271, -1, -1, -1, -1, -1, -1, -1, -1, 152,
+ 1281, -1, -1, -1, -1, -1, 1287, -1, 1289, -1,
+ -1, 164, -1, -1, 152, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 164, -1, 1309, -1,
+ -1, -1, -1, -1, -1, -1, -1, 1318, 1319, 1320,
+ 1321, 1322, 1323, 1324, 1325, 198, 1327, -1, -1, -1,
+ 203, 204, 205, 206, 207, 208, 209, -1, -1, -1,
+ 198, -1, -1, -1, 217, 203, 204, 205, 206, 207,
+ 208, 209, -1, -1, -1, -1, -1, -1, -1, 217,
+ -1, -1, -1, 1364, -1, -1, -1, -1, -1, -1,
+ 3, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 1382, -1, 16, 17, 18, -1, -1, 1389, -1,
+ 1391, -1, -1, -1, 27, 28, 29, 30, 31, -1,
+ 33, 34, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, 44, 45, -1, 47, -1, -1, -1, -1, -1,
+ -1, -1, 55, -1, -1, -1, 59, -1, -1, -1,
+ 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
+ 73, -1, 75, 1444, 77, 1446, 79, 80, -1, 82,
+ -1, -1, 1453, -1, 87, -1, -1, 90, -1, -1,
+ -1, -1, -1, -1, 97, -1, -1, 100, -1, 102,
+ 103, 104, 105, -1, -1, -1, 109, -1, -1, -1,
+ 113, -1, -1, 116, -1, -1, -1, -1, -1, 122,
+ 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
+ -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
+ -1, -1, -1, -1, 157, 158, 159, -1, 161, -1,
+ -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
+ -1, -1, 175, 176, -1, 178, 179, -1, -1, -1,
+ -1, -1, 185, 186, -1, -1, 189, -1, -1, -1,
+ -1, 194, -1, 196, 197, 198, 199, 200, 201, 3,
+ -1, -1, -1, -1, 207, 208, -1, 210, 211, 212,
+ -1, -1, 16, 17, 18, -1, 219, 220, -1, -1,
+ -1, -1, -1, 27, 28, 29, 30, 31, -1, 33,
+ 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ 44, 45, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
+ -1, 75, -1, 77, -1, 79, 80, -1, 82, -1,
+ -1, -1, -1, 87, -1, -1, 90, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, 100, -1, 102, 103,
+ 104, 105, -1, -1, -1, 109, -1, -1, -1, 113,
+ -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
+ 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
+ -1, -1, -1, 157, 158, 159, -1, 161, -1, -1,
+ -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
+ -1, 175, 176, -1, 178, 179, -1, -1, -1, -1,
+ -1, 185, 186, -1, -1, 189, -1, -1, -1, -1,
+ 194, -1, 196, 197, 198, 199, 200, 201, 3, -1,
+ -1, -1, -1, 207, -1, -1, 210, 211, 212, -1,
+ -1, 16, 17, 18, -1, 219, 220, -1, -1, -1,
+ -1, -1, 27, 28, 29, 30, 31, -1, 33, 34,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, 44,
+ 45, -1, 47, -1, -1, -1, -1, -1, -1, -1,
+ 55, -1, -1, -1, 59, -1, -1, -1, 63, 64,
+ -1, -1, -1, -1, 69, 70, 71, -1, 73, -1,
+ 75, -1, 77, -1, 79, 80, -1, 82, -1, -1,
+ -1, -1, 87, -1, -1, 90, -1, -1, -1, -1,
+ -1, -1, 97, -1, -1, 100, -1, 102, 103, 104,
+ 105, -1, -1, -1, 109, -1, -1, -1, 113, -1,
+ -1, 116, -1, -1, -1, -1, -1, 122, 123, 124,
+ 125, 126, 127, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
+ -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
+ -1, -1, 157, 158, 159, -1, 161, -1, -1, -1,
+ -1, 166, -1, 168, -1, -1, -1, 172, -1, -1,
+ 175, 176, -1, 178, 179, -1, -1, -1, -1, -1,
+ 185, 186, -1, -1, 189, -1, -1, -1, -1, 194,
+ -1, 196, 197, 198, 199, 200, 201, 3, -1, -1,
+ -1, -1, 207, -1, -1, 210, 211, 212, -1, -1,
+ 16, 17, 18, -1, 219, 220, -1, -1, -1, -1,
+ -1, -1, 28, 29, 30, 31, -1, 33, 34, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+ -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
+ -1, -1, -1, 69, 70, 71, -1, 73, -1, 75,
+ -1, -1, -1, 79, 80, -1, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, -1, -1, 102, 103, 104, 105,
+ -1, -1, -1, -1, -1, -1, -1, 113, -1, -1,
+ 116, -1, -1, -1, -1, -1, 122, 123, 124, 125,
+ 126, 127, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, -1, -1, -1, -1, -1,
+ 166, -1, 168, -1, -1, -1, 172, -1, -1, 175,
+ 176, -1, 178, 179, -1, -1, -1, -1, -1, 185,
+ 186, -1, -1, 189, -1, 3, -1, -1, 194, -1,
+ 196, 197, 198, 199, 200, 201, -1, -1, 16, 17,
+ 18, 207, -1, -1, 210, 211, 212, -1, -1, -1,
+ -1, -1, -1, 219, 220, 33, 34, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, -1, -1, 47,
+ -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
+ -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
+ -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
+ -1, 79, 80, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, -1, -1, 102, 103, 104, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, -1, -1, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
+ 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, -1, -1, -1, -1, 194, -1, 196, 197,
+ 198, 199, 200, 201, -1, 3, -1, -1, -1, 207,
+ -1, -1, 210, 211, 212, 13, -1, -1, 16, 17,
+ 18, 219, 220, -1, -1, -1, -1, -1, -1, 27,
+ 28, 29, 30, 31, -1, 33, 34, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
+ -1, -1, 50, -1, -1, -1, -1, 55, -1, -1,
+ -1, 59, -1, -1, -1, 63, 64, 65, -1, -1,
+ -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
+ -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, 100, -1, 102, 103, 104, 105, -1, 107,
+ -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
+ -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
+ 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, -1, -1, -1, -1, 194, -1, 196, 197,
+ 198, 199, 200, 201, -1, 3, -1, -1, -1, 207,
+ -1, -1, 210, 211, 212, 13, -1, -1, 16, 17,
+ 18, 219, -1, -1, -1, -1, -1, -1, -1, 27,
+ 28, 29, 30, 31, -1, 33, 34, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
+ -1, -1, 50, -1, -1, -1, -1, 55, -1, -1,
+ -1, 59, -1, -1, -1, 63, 64, 65, -1, -1,
+ -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
+ -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, 100, -1, 102, 103, 104, 105, -1, 107,
+ -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
+ -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
+ 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, -1, -1, -1, -1, 194, -1, 196, 197,
+ 198, 199, 200, 201, -1, 3, -1, -1, -1, 207,
+ -1, -1, 210, 211, 212, 13, -1, -1, 16, 17,
+ 18, 219, -1, -1, -1, -1, -1, -1, -1, 27,
+ 28, 29, 30, 31, -1, 33, 34, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
+ -1, -1, 50, -1, -1, -1, -1, 55, -1, -1,
+ -1, 59, -1, -1, -1, 63, 64, 65, -1, -1,
+ -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
+ -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, 100, -1, 102, 103, 104, 105, -1, 107,
+ -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
+ -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
+ 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, 3, -1, -1, -1, 194, -1, 196, 197,
+ 198, 199, 200, 201, -1, 16, 17, 18, -1, 207,
+ -1, -1, 210, 211, 212, -1, 27, 28, 29, 30,
+ 31, 219, 33, 34, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, 44, 45, -1, 47, -1, -1, -1,
+ -1, -1, -1, -1, 55, -1, -1, -1, 59, -1,
+ -1, -1, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, -1, 73, -1, 75, -1, 77, -1, 79, 80,
+ -1, 82, -1, -1, -1, -1, 87, -1, -1, 90,
+ -1, -1, -1, -1, -1, -1, 97, -1, -1, 100,
+ -1, 102, 103, 104, 105, -1, -1, -1, 109, -1,
+ -1, -1, 113, -1, -1, 116, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, 138, 139, 140,
+ -1, 142, -1, -1, -1, 146, -1, 148, 149, -1,
+ -1, -1, -1, -1, -1, -1, 157, 158, 159, -1,
+ 161, -1, -1, -1, -1, 166, -1, 168, -1, -1,
+ -1, 172, -1, -1, 175, 176, -1, 178, 179, -1,
+ -1, -1, -1, -1, 185, 186, -1, -1, 189, 3,
+ -1, 5, -1, 194, 8, 196, 197, 198, 199, 200,
+ 201, -1, 16, 17, 18, -1, 207, 208, -1, 210,
+ 211, 212, -1, 27, 28, 29, 30, 31, 219, 33,
+ 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ 44, 45, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
+ -1, 75, -1, 77, -1, -1, 80, -1, 82, -1,
+ -1, -1, -1, 87, -1, -1, 90, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, 100, -1, 102, 103,
+ 104, 105, -1, -1, -1, 109, -1, -1, -1, 113,
+ -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
+ 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
+ -1, -1, -1, 157, 158, 159, -1, 161, -1, -1,
+ -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
+ -1, 175, 176, -1, 178, 179, -1, -1, -1, -1,
+ -1, 185, 186, -1, -1, 189, 3, -1, 5, -1,
+ 194, 8, 196, 197, 198, 199, 200, 201, -1, 16,
+ 17, 18, -1, 207, -1, -1, 210, 211, 212, -1,
+ 27, 28, 29, 30, 31, 219, 33, 34, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, 44, 45, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ -1, -1, 59, -1, -1, -1, 63, 64, -1, -1,
+ -1, -1, 69, 70, 71, -1, 73, -1, 75, -1,
+ 77, -1, -1, 80, -1, 82, -1, -1, -1, -1,
+ 87, -1, -1, 90, -1, -1, -1, -1, -1, -1,
+ 97, -1, -1, 100, -1, 102, 103, 104, 105, -1,
+ -1, -1, 109, -1, -1, -1, 113, -1, -1, 116,
+ -1, -1, -1, -1, -1, 122, 123, 124, 125, 126,
+ 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
+ -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
+ 157, 158, 159, -1, 161, -1, -1, -1, -1, 166,
+ -1, 168, -1, -1, -1, 172, -1, -1, 175, 176,
+ -1, 178, 179, -1, -1, -1, -1, -1, 185, 186,
+ -1, -1, 189, 3, -1, 5, -1, 194, 8, 196,
+ 197, 198, 199, 200, 201, -1, 16, 17, 18, -1,
+ 207, -1, -1, 210, 211, 212, -1, 27, 28, 29,
+ 30, 31, 219, 33, 34, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, 44, 45, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
+ -1, -1, -1, 63, 64, -1, -1, -1, -1, 69,
+ 70, 71, -1, 73, -1, 75, -1, 77, -1, -1,
+ 80, -1, 82, -1, -1, -1, -1, 87, -1, -1,
+ 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
+ 100, -1, 102, 103, 104, 105, -1, -1, -1, 109,
+ -1, -1, -1, 113, -1, -1, 116, -1, -1, -1,
+ -1, -1, 122, 123, 124, 125, 126, 127, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
+ 140, -1, 142, -1, -1, -1, 146, -1, 148, 149,
+ -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
+ -1, 161, -1, -1, -1, -1, 166, -1, 168, -1,
+ -1, -1, 172, -1, -1, 175, 176, -1, 178, 179,
+ -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
+ 3, -1, 5, -1, 194, 8, 196, 197, 198, 199,
+ 200, 201, -1, 16, 17, 18, -1, 207, -1, -1,
+ 210, 211, 212, -1, 27, 28, 29, 30, 31, 219,
+ 33, 34, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, 44, 45, -1, 47, -1, -1, -1, -1, -1,
+ -1, -1, 55, -1, -1, -1, 59, -1, -1, -1,
+ 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
+ 73, -1, 75, -1, 77, -1, -1, 80, -1, 82,
+ -1, -1, -1, -1, 87, -1, -1, 90, -1, -1,
+ -1, -1, -1, -1, 97, -1, -1, 100, -1, 102,
+ 103, 104, 105, -1, -1, -1, 109, -1, -1, -1,
+ 113, -1, -1, 116, -1, -1, -1, -1, -1, 122,
+ 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
+ -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
+ -1, -1, -1, -1, 157, 158, 159, -1, 161, -1,
+ -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
+ -1, -1, 175, 176, -1, 178, 179, -1, -1, -1,
+ -1, -1, 185, 186, -1, -1, 189, 3, -1, 5,
+ -1, 194, 8, 196, 197, 198, 199, 200, 201, -1,
+ 16, 17, 18, -1, 207, -1, -1, 210, 211, 212,
+ -1, 27, 28, 29, 30, 31, 219, 33, 34, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, 44, 45,
+ -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+ -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
+ -1, -1, -1, 69, 70, 71, -1, 73, -1, 75,
+ -1, 77, -1, -1, 80, -1, 82, -1, -1, -1,
+ -1, 87, -1, -1, 90, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, 100, -1, 102, 103, 104, 105,
+ -1, -1, -1, 109, -1, -1, -1, 113, -1, -1,
+ 116, -1, -1, -1, -1, -1, 122, 123, 124, 125,
+ 126, 127, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, 161, -1, -1, -1, -1,
+ 166, -1, 168, -1, -1, -1, 172, -1, -1, 175,
+ 176, -1, 178, 179, -1, -1, -1, -1, -1, 185,
+ 186, -1, -1, 189, 3, -1, 5, -1, 194, 8,
+ 196, 197, 198, 199, 200, 201, -1, 16, 17, 18,
+ -1, 207, -1, -1, 210, 211, 212, -1, 27, 28,
+ 29, 30, 31, 219, 33, 34, -1, -1, -1, -1,
+ -1, 40, -1, -1, -1, 44, 45, -1, 47, -1,
+ -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
+ 59, -1, -1, -1, 63, 64, -1, -1, -1, -1,
+ 69, 70, 71, -1, 73, -1, 75, -1, 77, -1,
+ -1, 80, -1, 82, -1, -1, -1, -1, 87, -1,
+ -1, 90, -1, -1, -1, -1, -1, -1, 97, -1,
+ -1, 100, -1, 102, 103, 104, 105, -1, -1, -1,
+ 109, -1, -1, -1, 113, -1, -1, 116, -1, -1,
+ -1, -1, -1, 122, 123, 124, 125, 126, 127, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, 138,
+ 139, 140, -1, 142, -1, -1, -1, 146, -1, 148,
+ 149, -1, -1, -1, -1, -1, -1, -1, 157, 158,
+ 159, -1, 161, -1, -1, -1, -1, 166, -1, 168,
+ -1, -1, -1, 172, -1, -1, 175, 176, -1, 178,
+ 179, -1, -1, -1, -1, -1, 185, 186, -1, -1,
+ 189, 3, -1, 5, -1, 194, 8, 196, 197, 198,
+ 199, 200, 201, -1, 16, 17, 18, -1, 207, -1,
+ -1, 210, 211, 212, -1, 27, 28, 29, 30, 31,
+ 219, 33, 34, -1, -1, -1, -1, -1, 40, -1,
+ -1, -1, 44, 45, -1, 47, -1, -1, -1, -1,
+ -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
+ -1, 63, 64, -1, -1, -1, -1, 69, 70, 71,
+ -1, 73, -1, 75, -1, 77, -1, -1, 80, -1,
+ 82, -1, -1, -1, -1, 87, -1, -1, 90, -1,
+ -1, -1, -1, -1, -1, 97, -1, -1, 100, -1,
+ 102, 103, 104, 105, -1, -1, -1, 109, -1, -1,
+ -1, 113, -1, -1, 116, -1, -1, -1, -1, -1,
+ 122, 123, 124, 125, 126, 127, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, 138, 139, 140, -1,
+ 142, -1, -1, -1, 146, -1, 148, 149, -1, -1,
+ -1, -1, -1, -1, -1, 157, 158, 159, -1, 161,
+ -1, -1, -1, -1, 166, -1, 168, -1, -1, -1,
+ 172, -1, -1, 175, 176, -1, 178, 179, -1, -1,
+ -1, -1, -1, 185, 186, -1, -1, 189, 3, -1,
+ -1, -1, 194, -1, 196, 197, 198, 199, 200, 201,
+ -1, 16, 17, 18, -1, 207, -1, -1, 210, 211,
+ 212, -1, 27, 28, 29, 30, 31, 219, 33, 34,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, 44,
+ 45, -1, 47, -1, -1, 50, -1, -1, -1, -1,
+ 55, -1, -1, -1, 59, -1, -1, -1, 63, 64,
+ -1, -1, -1, -1, 69, 70, 71, -1, 73, -1,
+ 75, -1, 77, -1, 79, 80, -1, 82, -1, -1,
+ -1, -1, 87, -1, -1, 90, -1, -1, -1, -1,
+ -1, -1, 97, -1, -1, 100, -1, 102, 103, 104,
+ 105, -1, -1, -1, 109, -1, -1, -1, 113, -1,
+ -1, 116, -1, -1, -1, -1, -1, 122, 123, 124,
+ 125, 126, 127, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
+ -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
+ -1, -1, 157, 158, 159, -1, 161, -1, -1, -1,
+ -1, 166, -1, 168, -1, -1, -1, 172, -1, -1,
+ 175, 176, -1, 178, 179, -1, -1, -1, -1, -1,
+ 185, 186, -1, -1, 189, 3, -1, -1, -1, 194,
+ -1, 196, 197, 198, 199, 200, 201, -1, 16, 17,
+ 18, -1, 207, -1, -1, 210, 211, 212, -1, 27,
+ 28, 29, 30, 31, 219, 33, 34, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, 44, 45, -1, 47,
+ -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
+ -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
+ -1, 69, 70, 71, -1, 73, -1, 75, -1, 77,
+ -1, 79, 80, -1, 82, -1, -1, -1, -1, 87,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ 98, -1, 100, -1, 102, 103, 104, 105, -1, -1,
+ -1, 109, -1, -1, -1, 113, -1, -1, 116, -1,
+ -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
+ 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, 3, -1, -1, -1, 194, -1, 196, 197,
+ 198, 199, 200, 201, -1, 16, 17, 18, -1, 207,
+ -1, -1, 210, 211, 212, -1, 27, 28, 29, 30,
+ 31, 219, 33, 34, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, 44, 45, -1, 47, -1, -1, -1,
+ -1, -1, -1, -1, 55, -1, -1, -1, 59, -1,
+ -1, -1, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, -1, 73, -1, 75, -1, 77, -1, 79, 80,
+ -1, 82, -1, -1, -1, -1, 87, -1, -1, 90,
+ -1, -1, -1, -1, -1, -1, 97, -1, -1, 100,
+ -1, 102, 103, 104, 105, -1, -1, -1, 109, -1,
+ -1, -1, 113, -1, -1, 116, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, 138, 139, 140,
+ -1, 142, -1, -1, -1, 146, -1, 148, 149, -1,
+ -1, -1, -1, -1, -1, -1, 157, 158, 159, -1,
+ 161, -1, -1, -1, -1, 166, -1, 168, -1, -1,
+ -1, 172, -1, -1, 175, 176, -1, 178, 179, -1,
+ -1, -1, -1, -1, 185, 186, -1, -1, 189, 3,
+ -1, 5, -1, 194, 8, 196, 197, 198, 199, 200,
+ 201, -1, 16, 17, 18, -1, 207, -1, -1, 210,
+ 211, 212, -1, 27, 28, 29, 30, 31, 219, 33,
+ 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
+ 44, 45, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
+ -1, 75, -1, -1, -1, -1, 80, -1, 82, -1,
+ -1, -1, -1, 87, -1, -1, 90, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, 100, -1, 102, 103,
+ 104, 105, -1, -1, -1, 109, -1, -1, -1, 113,
+ -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
+ 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
+ -1, -1, -1, 157, 158, 159, -1, 161, -1, -1,
+ -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
+ -1, 175, 176, -1, 178, 179, -1, -1, -1, -1,
+ -1, 185, 186, -1, -1, 189, 3, -1, -1, -1,
+ 194, -1, 196, 197, 198, 199, 200, 201, -1, 16,
+ 17, 18, -1, 207, -1, -1, 210, 211, 212, -1,
+ 27, 28, 29, 30, 31, 219, 33, 34, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, 44, 45, -1,
+ 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ -1, -1, 59, -1, -1, -1, 63, 64, -1, -1,
+ -1, -1, 69, 70, 71, -1, 73, -1, 75, -1,
+ 77, -1, -1, 80, -1, 82, -1, -1, -1, -1,
+ 87, -1, -1, 90, -1, -1, -1, -1, -1, -1,
+ 97, 98, -1, 100, -1, 102, 103, 104, 105, -1,
+ -1, -1, 109, -1, -1, -1, 113, -1, -1, 116,
+ -1, -1, -1, -1, -1, 122, 123, 124, 125, 126,
+ 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
+ -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
+ 157, 158, 159, -1, 161, -1, -1, -1, -1, 166,
+ -1, 168, -1, -1, -1, 172, -1, -1, 175, 176,
+ -1, 178, 179, -1, -1, -1, -1, -1, 185, 186,
+ -1, -1, 189, 3, -1, -1, -1, 194, -1, 196,
+ 197, 198, 199, 200, 201, -1, 16, 17, 18, -1,
+ 207, -1, -1, 210, 211, 212, -1, 27, 28, 29,
+ 30, 31, 219, 33, 34, -1, -1, -1, -1, -1,
+ 40, -1, -1, -1, 44, 45, -1, 47, -1, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, 59,
+ -1, -1, -1, 63, 64, -1, -1, -1, -1, 69,
+ 70, 71, -1, 73, -1, 75, -1, 77, -1, -1,
+ 80, -1, 82, -1, -1, -1, -1, 87, -1, -1,
+ 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
+ 100, -1, 102, 103, 104, 105, -1, -1, -1, 109,
+ -1, -1, -1, 113, -1, -1, 116, -1, -1, -1,
+ -1, -1, 122, 123, 124, 125, 126, 127, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
+ 140, -1, 142, -1, -1, -1, 146, -1, 148, 149,
+ -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
+ -1, 161, -1, -1, -1, -1, 166, -1, 168, -1,
+ -1, -1, 172, -1, -1, 175, 176, -1, 178, 179,
+ -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
+ 3, -1, -1, -1, 194, -1, 196, 197, 198, 199,
+ 200, 201, -1, 16, 17, 18, -1, 207, -1, -1,
+ 210, 211, 212, -1, 27, 28, 29, 30, 31, 219,
+ 33, 34, -1, -1, -1, -1, -1, 40, -1, -1,
+ -1, -1, -1, -1, 47, -1, -1, -1, -1, -1,
+ -1, -1, 55, -1, -1, -1, 59, -1, -1, -1,
+ 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
+ 73, -1, 75, -1, -1, -1, -1, 80, -1, 82,
+ -1, -1, -1, -1, 87, -1, -1, 90, -1, -1,
+ -1, -1, -1, -1, 97, -1, -1, 100, -1, 102,
+ 103, 104, 105, -1, -1, -1, 109, -1, -1, -1,
+ 113, -1, -1, 116, -1, -1, -1, -1, -1, 122,
+ 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
+ -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
+ -1, -1, -1, -1, 157, 158, 159, -1, 161, -1,
+ -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
+ -1, -1, 175, 176, -1, 178, 179, -1, -1, -1,
+ -1, -1, 185, 186, -1, -1, 189, 3, -1, -1,
+ -1, 194, -1, 196, 197, 198, 199, 200, 201, -1,
+ 16, 17, 18, -1, 207, -1, -1, 210, 211, 212,
+ -1, 27, 28, 29, 30, 31, 219, 33, 34, -1,
+ -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
+ -1, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+ -1, -1, -1, 59, -1, -1, -1, 63, 64, -1,
+ -1, -1, -1, 69, 70, 71, -1, 73, -1, 75,
+ -1, -1, -1, -1, 80, -1, 82, -1, -1, -1,
+ -1, 87, -1, -1, 90, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, 100, -1, 102, 103, 104, 105,
+ -1, -1, -1, 109, -1, -1, -1, 113, -1, -1,
+ 116, -1, -1, -1, -1, -1, 122, 123, 124, 125,
+ 126, 127, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, 161, -1, -1, -1, -1,
+ 166, -1, 168, -1, -1, -1, 172, -1, -1, 175,
+ 176, -1, 178, 179, -1, -1, -1, -1, -1, 185,
+ 186, -1, -1, 189, 3, -1, -1, -1, 194, -1,
+ 196, 197, 198, 199, 200, 201, -1, 16, 17, 18,
+ -1, 207, -1, -1, 210, 211, 212, -1, -1, 28,
+ 29, 30, 31, 219, 33, 34, -1, -1, -1, -1,
+ -1, 40, -1, -1, -1, -1, -1, -1, 47, -1,
+ -1, -1, -1, -1, -1, -1, 55, -1, -1, -1,
+ 59, -1, -1, -1, 63, 64, -1, -1, -1, -1,
+ 69, 70, 71, -1, 73, -1, 75, -1, -1, -1,
+ 79, 80, -1, 82, -1, -1, -1, -1, -1, -1,
+ -1, 90, -1, -1, -1, -1, -1, -1, 97, -1,
+ -1, -1, -1, 102, 103, 104, 105, -1, -1, -1,
+ -1, -1, -1, -1, 113, -1, -1, 116, -1, -1,
+ -1, -1, -1, 122, 123, 124, 125, 126, 127, -1,
+ -1, -1, -1, -1, -1, -1, 135, -1, -1, 138,
+ 139, 140, -1, 142, -1, -1, -1, 146, -1, 148,
+ 149, -1, -1, -1, -1, -1, -1, -1, 157, 158,
+ 159, -1, -1, -1, -1, -1, -1, 166, -1, 168,
+ -1, -1, -1, 172, -1, -1, 175, 176, -1, 178,
+ 179, -1, -1, -1, -1, -1, 185, 186, -1, -1,
+ 189, 3, -1, -1, -1, 194, -1, 196, 197, 198,
+ 199, 200, 201, -1, 16, 17, 18, -1, 207, -1,
+ -1, 210, 211, 212, -1, -1, 28, 29, 30, 31,
+ 219, 33, 34, -1, -1, -1, -1, -1, 40, -1,
+ -1, -1, -1, -1, -1, 47, -1, -1, -1, -1,
+ -1, -1, -1, 55, -1, -1, -1, 59, -1, -1,
+ -1, 63, 64, -1, -1, -1, -1, 69, 70, 71,
+ -1, 73, -1, 75, -1, -1, -1, 79, 80, -1,
+ 82, -1, -1, -1, -1, -1, -1, -1, 90, -1,
+ -1, -1, -1, -1, -1, 97, -1, -1, -1, -1,
+ 102, 103, 104, 105, -1, -1, -1, -1, -1, -1,
+ -1, 113, -1, -1, 116, -1, -1, -1, -1, -1,
+ 122, 123, 124, 125, 126, 127, -1, -1, -1, -1,
+ -1, -1, -1, 135, -1, -1, 138, 139, 140, -1,
+ 142, -1, -1, -1, 146, -1, 148, 149, -1, -1,
+ -1, -1, -1, -1, -1, 157, 158, 159, -1, -1,
+ -1, -1, -1, -1, 166, -1, 168, -1, -1, -1,
+ 172, -1, -1, 175, 176, -1, 178, 179, -1, -1,
+ -1, -1, -1, 185, 186, -1, -1, 189, 3, -1,
+ -1, -1, 194, -1, 196, 197, 198, 199, 200, 201,
+ -1, 16, 17, 18, -1, 207, -1, -1, 210, 211,
+ 212, -1, 27, -1, -1, -1, -1, 219, 33, 34,
+ -1, -1, -1, -1, -1, 40, -1, -1, -1, -1,
+ -1, -1, 47, -1, -1, -1, -1, -1, -1, -1,
+ 55, -1, -1, -1, 59, -1, -1, -1, 63, 64,
+ -1, -1, -1, -1, 69, 70, 71, -1, 73, -1,
+ 75, -1, -1, -1, -1, 80, -1, 82, -1, -1,
+ -1, -1, 87, -1, -1, 90, -1, -1, -1, -1,
+ -1, -1, 97, -1, -1, 100, -1, 102, 103, 104,
+ 105, -1, -1, -1, 109, -1, -1, -1, -1, -1,
+ -1, 116, -1, -1, -1, -1, -1, 122, 123, 124,
+ 125, 126, 127, -1, -1, -1, -1, -1, -1, -1,
+ 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
+ -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
+ -1, -1, 157, 158, 159, -1, 161, -1, -1, -1,
+ -1, 166, -1, 168, -1, -1, -1, 172, -1, -1,
+ 175, 176, -1, 178, 179, -1, -1, -1, -1, -1,
+ 185, 186, -1, -1, 189, 3, -1, -1, -1, 194,
+ -1, 196, 197, 198, 199, 200, 201, -1, 16, 17,
+ 18, -1, 207, -1, -1, 210, -1, -1, -1, 27,
+ -1, -1, -1, -1, 219, 33, 34, -1, -1, -1,
+ -1, -1, 40, -1, -1, -1, -1, -1, -1, 47,
+ -1, -1, -1, -1, -1, -1, -1, 55, -1, -1,
+ -1, 59, -1, -1, -1, 63, 64, -1, -1, -1,
+ -1, 69, 70, 71, -1, 73, -1, 75, -1, -1,
+ -1, -1, 80, -1, 82, -1, -1, -1, -1, 87,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, 100, -1, 102, 103, 104, 105, -1, -1,
+ -1, 109, -1, -1, -1, -1, -1, -1, 116, -1,
+ -1, -1, -1, -1, 122, 123, 124, 125, 126, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, 161, -1, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, 176, -1,
+ 178, 179, -1, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, 3, -1, -1, -1, 194, -1, 196, 197,
+ 198, 199, 200, 201, -1, 16, 17, 18, -1, 207,
+ -1, -1, 210, -1, -1, -1, -1, -1, -1, -1,
+ -1, 219, 33, 34, -1, -1, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, -1, 47, -1, -1, -1,
+ -1, -1, -1, -1, 55, -1, -1, -1, 59, -1,
+ -1, -1, 63, 64, -1, -1, -1, -1, 69, 70,
+ 71, -1, 73, -1, 75, -1, 77, -1, 79, 80,
+ -1, 82, -1, -1, -1, -1, -1, -1, -1, 90,
+ -1, -1, -1, -1, -1, -1, 97, -1, -1, -1,
+ -1, 102, 103, 104, 105, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 116, -1, -1, -1, -1,
+ -1, 122, 123, 124, 125, 126, 127, -1, -1, -1,
+ -1, -1, -1, -1, 135, -1, -1, 138, 139, 140,
+ -1, 142, -1, -1, -1, 146, -1, 148, 149, -1,
+ -1, -1, -1, -1, -1, -1, 157, 158, 159, -1,
+ -1, -1, -1, -1, -1, 166, -1, 168, -1, -1,
+ -1, 172, -1, -1, 175, 176, -1, 178, 179, -1,
+ -1, -1, -1, -1, 185, 186, -1, -1, 189, 3,
+ -1, -1, -1, 194, -1, 196, 197, 198, 199, 200,
+ 201, -1, 16, 17, 18, -1, 207, -1, -1, 210,
+ 211, 212, -1, -1, -1, -1, -1, -1, 219, 33,
+ 34, -1, -1, -1, 7, -1, 40, -1, -1, 12,
+ -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, 59, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
+ -1, 75, -1, -1, -1, 79, 80, -1, 82, -1,
+ -1, -1, -1, 56, -1, -1, 90, -1, 61, -1,
+ -1, -1, -1, 97, 67, -1, -1, -1, 102, 103,
+ 104, 105, -1, -1, 77, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
+ 124, 125, 126, 127, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
+ -1, -1, -1, 157, 158, 159, -1, -1, -1, -1,
+ -1, -1, 166, -1, 168, -1, -1, -1, 172, -1,
+ -1, 175, 176, -1, 178, 179, -1, -1, -1, 152,
+ -1, 185, 186, -1, -1, 189, 3, -1, -1, -1,
+ 194, 164, 196, 197, 198, 199, 200, 201, -1, -1,
+ -1, -1, -1, 207, -1, -1, 210, 211, 212, -1,
+ -1, -1, -1, -1, -1, 219, 33, -1, -1, -1,
+ -1, -1, -1, 40, -1, 198, -1, -1, -1, -1,
+ 203, 204, 205, 206, 207, 208, 209, -1, 55, -1,
+ -1, -1, -1, -1, 217, -1, 63, 64, -1, -1,
+ -1, -1, 69, 70, 71, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
+ 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
+ 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
+ -1, 148, 149, -1, -1, -1, -1, -1, 33, 34,
+ 157, 158, 159, -1, -1, 40, -1, -1, -1, 166,
+ -1, 168, 47, -1, -1, 172, -1, -1, 175, 176,
+ 55, 178, 179, 3, 59, -1, -1, -1, 185, 186,
+ -1, -1, 189, -1, -1, 70, 71, 194, -1, 196,
+ 197, 198, 199, -1, 201, 80, 203, 204, 205, 206,
+ 207, 208, 209, 33, -1, -1, 36, -1, -1, -1,
+ 40, -1, 97, -1, -1, -1, -1, 102, 103, -1,
+ -1, -1, -1, -1, -1, 55, -1, -1, -1, -1,
+ -1, -1, 62, 63, 64, -1, -1, 122, -1, 69,
+ 70, 71, 127, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 82, -1, -1, -1, -1, -1, -1, -1,
+ 90, 91, -1, -1, -1, -1, -1, 97, -1, -1,
+ -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 122, 123, -1, 125, -1, 127, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
+ 140, 196, 142, -1, -1, -1, 146, -1, 148, 149,
+ -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
+ 3, -1, -1, -1, -1, -1, 166, -1, 168, -1,
+ -1, -1, 172, -1, -1, 175, -1, -1, 178, 179,
+ -1, -1, -1, -1, -1, 185, 186, -1, -1, 189,
+ 33, -1, -1, -1, 194, -1, 196, 40, 198, -1,
+ -1, -1, -1, 203, 204, 205, 206, 207, 208, 209,
+ -1, -1, 55, -1, -1, -1, -1, -1, -1, 62,
+ 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
+ -1, -1, -1, -1, -1, -1, -1, 90, 91, -1,
+ -1, -1, -1, -1, 97, -1, -1, -1, -1, 102,
+ -1, 104, 105, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
+ 123, -1, 125, -1, 127, -1, -1, -1, -1, -1,
+ -1, -1, 135, -1, -1, 138, 139, 140, -1, 142,
+ -1, -1, -1, 146, -1, 148, 149, 3, -1, -1,
+ -1, -1, -1, -1, 157, 158, 159, -1, -1, -1,
+ -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
+ -1, 27, 175, -1, -1, 178, 179, 33, -1, -1,
+ -1, -1, 185, 186, 40, -1, 189, -1, -1, -1,
+ -1, 194, -1, 196, -1, 198, -1, -1, -1, 55,
+ 203, 204, 205, 206, 207, 208, 209, 63, 64, -1,
+ -1, -1, -1, 69, 70, 71, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
+ -1, 127, -1, -1, -1, -1, -1, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, 3, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, 161, -1, -1, -1, -1,
+ 166, -1, 168, -1, -1, -1, 172, 33, -1, 175,
+ -1, -1, 178, 179, 40, -1, -1, -1, -1, 185,
+ 186, -1, -1, 189, -1, -1, -1, -1, 194, 55,
+ 196, -1, -1, -1, 200, -1, -1, 63, 64, -1,
+ -1, -1, 208, 69, 70, 71, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
+ -1, 127, -1, -1, -1, -1, 3, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, -1, 33, -1, -1, -1,
+ 166, -1, 168, 40, -1, -1, 172, -1, -1, 175,
+ -1, -1, 178, 179, -1, -1, -1, -1, 55, 185,
+ 186, -1, -1, 189, -1, -1, 63, 64, 194, -1,
+ 196, -1, 69, 70, 71, -1, -1, -1, -1, -1,
+ -1, -1, 208, -1, -1, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
+ 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
+ 127, -1, -1, -1, -1, 3, -1, -1, 135, -1,
+ -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
+ -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
+ 157, 158, 159, -1, -1, 33, -1, -1, -1, 166,
+ -1, 168, 40, -1, -1, 172, -1, -1, 175, -1,
+ -1, 178, 179, -1, -1, -1, -1, 55, 185, 186,
+ -1, -1, 189, -1, -1, 63, 64, 194, -1, 196,
+ -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
+ -1, 208, -1, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, -1, -1, 102, -1, 104, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 122, 123, -1, 125, -1, 127,
+ -1, -1, -1, -1, 3, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, -1, 33, -1, -1, -1, 166, -1,
+ 168, 40, -1, -1, 172, -1, -1, 175, -1, -1,
+ 178, 179, -1, -1, -1, -1, 55, 185, 186, -1,
+ -1, 189, -1, -1, 63, 64, 194, -1, 196, -1,
+ 69, 70, 71, -1, -1, -1, -1, -1, -1, -1,
+ 208, -1, -1, 82, -1, -1, -1, -1, -1, -1,
+ -1, 90, -1, -1, -1, -1, -1, -1, 97, -1,
+ -1, -1, -1, 102, -1, 104, 105, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 122, 123, -1, 125, -1, 127, -1,
+ -1, -1, -1, 3, -1, -1, 135, -1, -1, 138,
+ 139, 140, -1, 142, -1, -1, -1, 146, -1, 148,
+ 149, -1, -1, -1, -1, -1, -1, 27, 157, 158,
+ 159, -1, -1, 33, -1, -1, -1, 166, -1, 168,
+ 40, -1, -1, 172, -1, -1, 175, -1, -1, 178,
+ 179, -1, -1, -1, -1, 55, 185, 186, -1, -1,
+ 189, -1, -1, 63, 64, 194, -1, 196, -1, 69,
+ 70, 71, -1, -1, -1, -1, -1, -1, -1, 208,
+ -1, -1, 82, -1, -1, -1, -1, -1, -1, -1,
+ 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
+ -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 122, 123, -1, 125, -1, 127, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
+ 140, -1, 142, 3, -1, -1, 146, -1, 148, 149,
+ -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
+ -1, 161, -1, -1, -1, -1, 166, -1, 168, -1,
+ -1, -1, 172, 33, -1, 175, -1, -1, 178, 179,
+ 40, -1, -1, -1, -1, 185, 186, -1, -1, 189,
+ -1, -1, -1, -1, 194, 55, 196, -1, -1, -1,
+ 200, -1, -1, 63, 64, -1, -1, -1, -1, 69,
+ 70, 71, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 82, -1, -1, -1, -1, -1, -1, -1,
+ 90, -1, -1, -1, -1, -1, -1, 97, -1, -1,
+ -1, -1, 102, -1, 104, 105, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 122, 123, -1, 125, -1, 127, -1, -1,
+ -1, -1, -1, -1, -1, 135, -1, -1, 138, 139,
+ 140, -1, 142, -1, -1, -1, 146, -1, 148, 149,
+ -1, -1, -1, -1, -1, -1, -1, 157, 158, 159,
+ 3, -1, -1, -1, -1, -1, 166, -1, 168, -1,
+ -1, -1, 172, -1, -1, 175, -1, -1, 178, 179,
+ -1, 24, -1, 26, -1, 185, 186, -1, -1, 189,
+ 33, -1, -1, -1, 194, -1, 196, 40, -1, 199,
+ -1, -1, -1, -1, -1, -1, 49, -1, -1, -1,
+ 53, -1, 55, -1, -1, -1, -1, -1, -1, -1,
+ 63, 64, -1, -1, -1, -1, 69, 70, 71, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
+ -1, 84, -1, -1, 87, 88, -1, 90, -1, -1,
+ -1, -1, -1, -1, 97, -1, -1, -1, 101, 102,
+ -1, 104, 105, -1, -1, 108, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 122,
+ 123, 124, 125, 126, 127, -1, -1, -1, -1, -1,
+ -1, -1, 135, 136, -1, 138, 139, 140, -1, 142,
+ -1, -1, -1, 146, -1, 148, 149, -1, -1, -1,
+ -1, -1, 155, -1, 157, 158, 159, -1, -1, 3,
+ -1, -1, -1, 166, -1, 168, -1, -1, -1, 172,
+ -1, -1, 175, 17, 18, 178, 179, -1, -1, -1,
+ -1, -1, 185, 186, -1, 188, 189, -1, -1, 33,
+ 34, 194, -1, 196, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, 47, -1, -1, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, -1, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, 73,
+ -1, 75, -1, -1, -1, -1, 80, -1, 82, -1,
+ -1, -1, -1, -1, -1, -1, 90, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, -1, -1, 102, -1,
+ 104, 105, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 116, -1, -1, -1, -1, -1, 122, 123,
+ -1, 125, -1, 127, -1, -1, -1, -1, -1, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, 3,
+ -1, -1, -1, 157, 158, 159, -1, -1, -1, -1,
+ -1, -1, 166, -1, 168, 19, -1, -1, 172, -1,
+ 24, 175, -1, -1, 178, 179, -1, -1, -1, 33,
+ -1, 185, 186, -1, -1, 189, 40, -1, -1, -1,
+ 194, -1, 196, -1, -1, 49, -1, -1, -1, -1,
+ -1, 55, -1, -1, -1, -1, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 82, -1,
+ -1, -1, -1, -1, -1, 89, 90, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, -1, -1, 102, -1,
+ 104, 105, -1, -1, -1, -1, -1, 111, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 122, 123,
+ -1, 125, -1, 127, -1, -1, -1, -1, 3, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
+ -1, -1, 27, 157, 158, 159, -1, -1, 33, -1,
+ -1, -1, 166, -1, 168, 40, -1, -1, 172, -1,
+ -1, 175, -1, -1, 178, 179, -1, -1, -1, -1,
+ 55, 185, 186, -1, -1, 189, -1, -1, 63, 64,
+ 194, -1, 196, -1, 69, 70, 71, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, -1, -1, -1, -1,
+ -1, -1, 97, -1, -1, -1, -1, 102, -1, 104,
+ 105, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 122, 123, -1,
+ 125, -1, 127, -1, -1, -1, -1, 3, -1, -1,
+ 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
+ -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
+ -1, -1, 157, 158, 159, -1, 161, 33, -1, -1,
+ -1, 166, -1, 168, 40, -1, -1, 172, -1, -1,
+ 175, -1, -1, 178, 179, -1, -1, 53, -1, 55,
+ 185, 186, -1, -1, 189, -1, -1, 63, 64, 194,
+ -1, 196, -1, 69, 70, 71, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, -1, 92, -1, -1, -1,
+ -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
+ -1, 127, -1, -1, -1, -1, 3, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, -1, 33, -1, -1, -1,
+ 166, -1, 168, 40, -1, -1, 172, -1, -1, 175,
+ -1, -1, 178, 179, -1, -1, -1, -1, 55, 185,
+ 186, -1, -1, 189, -1, -1, 63, 64, 194, -1,
+ 196, -1, 69, 70, 71, 72, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
+ 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
+ 127, -1, -1, -1, -1, 3, -1, -1, 135, -1,
+ -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
+ -1, 148, 149, -1, -1, -1, -1, -1, -1, -1,
+ 157, 158, 159, -1, -1, 33, -1, -1, -1, 166,
+ -1, 168, 40, -1, -1, 172, -1, -1, 175, -1,
+ -1, 178, 179, -1, -1, -1, -1, 55, 185, 186,
+ -1, -1, 189, -1, -1, 63, 64, 194, -1, 196,
+ -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, -1, -1, 102, -1, 104, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 122, 123, -1, 125, -1, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, 3, -1, -1, 146, -1,
+ 148, 149, -1, -1, -1, -1, -1, -1, -1, 157,
+ 158, 159, -1, -1, 162, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, 33, -1, 175, -1, -1,
+ 178, 179, 40, -1, -1, -1, -1, 185, 186, -1,
+ -1, 189, -1, -1, -1, -1, 194, 55, 196, -1,
+ -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
+ -1, 69, 70, 71, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 82, -1, -1, -1, -1, -1,
+ -1, -1, 90, -1, -1, -1, -1, -1, -1, 97,
+ -1, -1, -1, -1, 102, -1, 104, 105, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 122, 123, -1, 125, -1, 127,
+ -1, -1, -1, -1, -1, -1, -1, 135, -1, -1,
+ 138, 139, 140, -1, 142, -1, -1, -1, 146, 3,
+ 148, 149, -1, -1, -1, 9, -1, -1, -1, 157,
+ 158, 159, -1, -1, 162, -1, -1, -1, 166, -1,
+ 168, -1, -1, -1, 172, -1, -1, 175, -1, 33,
+ 178, 179, -1, -1, -1, -1, 40, 185, 186, -1,
+ -1, 189, -1, -1, -1, -1, 194, -1, 196, -1,
+ -1, 55, -1, -1, -1, -1, -1, -1, -1, 63,
+ 64, -1, -1, -1, -1, 69, 70, 71, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 82, -1,
+ -1, -1, -1, -1, -1, -1, 90, -1, -1, -1,
+ -1, -1, -1, 97, -1, -1, -1, -1, 102, -1,
+ 104, 105, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 122, 123,
+ -1, 125, -1, 127, -1, -1, -1, -1, 3, -1,
+ -1, 135, -1, -1, 138, 139, 140, -1, 142, -1,
+ -1, -1, 146, -1, 148, 149, -1, -1, -1, -1,
+ -1, -1, -1, 157, 158, 159, -1, -1, 33, -1,
+ -1, -1, 166, -1, 168, 40, -1, -1, 172, -1,
+ -1, 175, -1, -1, 178, 179, -1, -1, -1, -1,
+ 55, 185, 186, -1, -1, 189, -1, -1, 63, 64,
+ 194, -1, 196, -1, 69, 70, 71, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 82, -1, -1,
+ -1, -1, -1, -1, -1, 90, -1, -1, -1, -1,
+ -1, -1, 97, -1, -1, -1, -1, 102, -1, 104,
+ 105, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 122, 123, -1,
+ 125, -1, 127, -1, -1, -1, -1, 3, -1, -1,
+ 135, -1, -1, 138, 139, 140, -1, 142, -1, -1,
+ -1, 146, -1, 148, 149, -1, -1, -1, -1, -1,
+ -1, -1, 157, 158, 159, -1, -1, 33, -1, -1,
+ -1, 166, -1, 168, 40, -1, -1, 172, -1, -1,
+ 175, -1, -1, 178, 179, -1, -1, -1, -1, 55,
+ 185, 186, -1, -1, 189, -1, -1, 63, 64, 194,
+ -1, 196, -1, 69, 70, 71, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
+ -1, -1, -1, -1, 90, -1, -1, -1, -1, -1,
+ -1, 97, -1, -1, -1, -1, 102, -1, 104, 105,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 122, 123, -1, 125,
+ -1, 127, -1, -1, -1, -1, 3, -1, -1, 135,
+ -1, -1, 138, 139, 140, -1, 142, -1, -1, -1,
+ 146, -1, 148, 149, -1, -1, -1, -1, -1, -1,
+ -1, 157, 158, 159, -1, -1, 33, -1, -1, -1,
+ 166, -1, 168, 40, -1, -1, 172, -1, -1, 175,
+ -1, -1, 178, 179, -1, -1, -1, -1, 55, 185,
+ 186, -1, -1, 189, -1, -1, 63, 64, 194, -1,
+ 196, -1, 69, 70, 71, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 82, -1, -1, -1, -1,
+ -1, -1, -1, 90, -1, -1, -1, -1, -1, -1,
+ 97, -1, -1, -1, -1, 102, -1, 104, 105, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 122, 123, -1, 125, -1,
+ 127, -1, -1, -1, -1, -1, -1, -1, 135, -1,
+ -1, 138, 139, 140, -1, 142, -1, -1, -1, 146,
+ -1, 148, 149, -1, -1, -1, 17, 18, -1, -1,
+ 157, 158, 159, -1, -1, -1, -1, -1, -1, 166,
+ -1, 168, 33, 34, -1, 172, -1, -1, 175, 40,
+ -1, 178, 179, -1, -1, -1, 47, -1, 185, 186,
+ 17, 18, 189, -1, 55, -1, -1, 194, 59, 196,
+ -1, -1, -1, -1, -1, -1, 33, 34, -1, 70,
+ 71, -1, 73, 40, 75, -1, -1, -1, -1, 80,
+ 47, -1, -1, -1, -1, -1, -1, -1, 55, -1,
+ -1, -1, 59, -1, -1, -1, 97, 98, -1, -1,
+ -1, 102, 103, 70, 71, -1, 73, -1, 75, -1,
+ -1, -1, -1, 80, -1, 116, -1, -1, -1, -1,
+ -1, 122, -1, 124, -1, 126, 127, -1, -1, -1,
+ 97, -1, -1, 6, -1, 102, 103, -1, 11, -1,
+ -1, -1, -1, -1, -1, -1, -1, 20, -1, 116,
+ 23, -1, 25, -1, -1, 122, -1, 124, -1, 126,
+ 127, -1, 35, -1, 37, -1, -1, -1, 41, 42,
+ 43, -1, -1, 46, -1, 176, -1, -1, -1, 52,
+ -1, -1, -1, -1, -1, 58, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 196, 197, -1, 199, 200,
+ 201, -1, -1, -1, -1, 78, -1, -1, -1, 176,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 94, -1, 96, -1, 98, 99, -1, -1, 196,
+ 197, -1, 199, 200, 201, 17, 18, -1, -1, 112,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 33, 34, -1, -1, 128, -1, -1, 40, -1,
+ -1, -1, -1, 136, 137, 47, -1, -1, -1, -1,
+ 143, 144, -1, 55, -1, -1, -1, 59, -1, -1,
+ -1, 154, 155, 156, -1, -1, -1, 160, 70, 71,
+ -1, 73, -1, 75, -1, -1, -1, 170, 80, -1,
+ 17, 18, -1, -1, 177, -1, -1, -1, -1, -1,
+ 183, -1, -1, -1, 187, 97, 33, 34, -1, -1,
+ 102, 103, -1, 40, -1, -1, -1, -1, -1, -1,
+ 47, -1, -1, -1, 116, -1, -1, -1, 55, -1,
+ 122, -1, 59, -1, -1, 127, -1, -1, -1, -1,
+ -1, -1, -1, 70, 71, -1, 73, -1, 75, -1,
+ -1, -1, -1, 80, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 97, -1, -1, -1, -1, 102, 103, -1, -1, -1,
+ -1, -1, -1, 175, 176, -1, -1, -1, -1, 116,
+ -1, -1, -1, -1, -1, 122, -1, -1, -1, -1,
+ 127, -1, -1, -1, 196, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 176,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 196
};
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
+
+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/local/bison/bison.simple"
/* Skeleton output parser for bison,
@@ -4067,36 +4072,39 @@ static const short yycheck[] = { 3,
#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
-#else /* not GNU C. */
+#else /* not GNU C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
-#else /* not sparc */
+#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
-#else /* not MSDOS, or __TURBOC__ */
+#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
- #pragma alloca
-#else /* not MSDOS, __TURBOC__, or _AIX */
+#pragma alloca
+#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
-extern "C" {
-void *alloca (unsigned int);
+extern "C"
+{
+ void *alloca(unsigned int);
};
-#else /* not __cplusplus */
-void *alloca ();
-#endif /* not __cplusplus */
-#endif /* __hpux */
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc. */
-#endif /* not GNU C. */
-#endif /* alloca not defined. */
+
+#else /* not __cplusplus */
+void *alloca();
+
+#endif /* not __cplusplus */
+#endif /* __hpux */
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc. */
+#endif /* not GNU C. */
+#endif /* alloca not defined. */
/* This is the parser code that is written into each bison parser
when the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
+ used when %semantic_parser is specified. */
/* Note: there must be only one dollar sign in this file.
It is replaced by the list of actions, each action
@@ -4107,24 +4115,24 @@ void *alloca ();
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT return(0)
-#define YYABORT return(1)
+#define YYABORT return(1)
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror.
This remains here temporarily to ease the
transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
+#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(token, value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
+ { yychar = (token), yylval = (value); \
+ yychar1 = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
+ { yyerror ("syntax error: cannot back up"); YYERROR; } \
while (0)
#define YYTERROR 1
@@ -4141,45 +4149,49 @@ while (0)
#else
#define YYLEX yylex(&yylval, &yylloc)
#endif
-#else /* not YYLSP_NEEDED */
+#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX yylex(&yylval)
#endif
-#endif /* not YYLSP_NEEDED */
+#endif /* not YYLSP_NEEDED */
#endif
/* If nonreentrant, generate the variables here */
#ifndef YYPURE
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
+int yychar; /* the lookahead symbol */
+YYSTYPE yylval; /* the semantic value of the */
+
+ /* lookahead symbol */
#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
+YYLTYPE yylloc; /* location data for the lookahead */
+
+ /* symbol */
#endif
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
+int yynerrs; /* number of parse errors so far */
+
+#endif /* not YYPURE */
#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
+int yydebug; /* nonzero means print parse trace */
+
/* Since this is uninitialized, it does not stop multiple parsers
from coexisting. */
#endif
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
+/* YYINITDEPTH indicates the initial size of the parser's stacks */
-#ifndef YYINITDEPTH
+#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
+/* YYMAXDEPTH is the maximum size the stacks can grow to
+ (effective only if the built-in stack extension method is used). */
#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
@@ -4189,5685 +4201,7268 @@ int yydebug; /* nonzero means print parse trace */
#define YYMAXDEPTH 10000
#endif
-/* Prevent warning if -Wstrict-prototypes. */
+/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
-int yyparse (void);
+int yyparse(void);
+
#endif
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
+
+
+#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
+#else /* not GNU C or C++ */
#ifndef __cplusplus
/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
+ in available built-in functions on various systems. */
static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- int count;
+__yy_memcpy(to, from, count)
+char *to;
+char *from;
+int count;
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
- while (i-- > 0)
- *t++ = *f++;
+ while (i-- > 0)
+ *t++ = *f++;
}
-#else /* __cplusplus */
+#else /* __cplusplus */
/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
+ in available built-in functions on various systems. */
static void
-__yy_memcpy (char *to, char *from, int count)
+__yy_memcpy(char *to, char *from, int count)
{
- register char *f = from;
- register char *t = to;
- register int i = count;
+ register char *f = from;
+ register char *t = to;
+ register int i = count;
- while (i-- > 0)
- *t++ = *f++;
+ while (i-- > 0)
+ *t++ = *f++;
}
#endif
#endif
-
+
+
#line 196 "/usr/local/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
- to the proper pointer type. */
+ to the proper pointer type. */
#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
+#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
+#endif /* not YYPARSE_PARAM */
int
yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
+YYPARSE_PARAM_DECL
{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
+ register int yystate;
+ register int yyn;
+ register short *yyssp;
+ register YYSTYPE *yyvsp;
+ int yyerrstatus; /* number of tokens to shift before error
+ * messages enabled */
+ int yychar1 = 0; /* lookahead token as an internal
+ * (translated) token number */
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
+ short yyssa[YYINITDEPTH]; /* the state stack */
+ YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
+ short *yyss = yyssa; /* refer to the stacks thru separate
+ * pointers */
+ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them
+ * elsewhere */
#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
+ YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
+ YYLTYPE *yyls = yylsa;
+ YYLTYPE *yylsp;
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
+#define YYPOPSTACK (yyvsp--, yyssp--)
#endif
- int yystacksize = YYINITDEPTH;
+ int yystacksize = YYINITDEPTH;
#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
+ int yychar;
+ YYSTYPE yylval;
+ int yynerrs;
+
#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
+ YYLTYPE yylloc;
+
#endif
#endif
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
+ YYSTYPE yyval; /* the variable used to return */
+
+ /* semantic values from the action */
+ /* routines */
- int yylen;
+ int yylen;
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
+ if (yydebug)
+ fprintf(stderr, "Starting parse\n");
#endif
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
+ /*
+ * Initialize stack pointers. Waste one element of value and location
+ * stack so that they stay on the same level as the state stack. The
+ * wasted elements are never initialized.
+ */
- yyssp = yyss - 1;
- yyvsp = yyvs;
+ yyssp = yyss - 1;
+ yyvsp = yyvs;
#ifdef YYLSP_NEEDED
- yylsp = yyls;
+ yylsp = yyls;
#endif
-/* Push a new state, which is found in yystate . */
+/* Push a new state, which is found in yystate . */
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks. */
yynewstate:
- *++yyssp = yystate;
+ *++yyssp = yystate;
+
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ /* 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;
+ short *yyss1 = yyss;
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* 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;
- short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
+ YYLTYPE *yyls1 = yyls;
+
#endif
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
+ /* Get the current used size of the three stacks, in elements. */
+ int size = yyssp - yyss + 1;
#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
+
+ /*
+ * Each stack pointer address is followed by the size of the data
+ * in use in that stack, in bytes.
+ */
#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
+
+ /*
+ * This used to be a conditional around just the two extra args,
+ * but that might be undefined if yyoverflow is a macro.
+ */
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof(*yyssp),
+ &yyvs1, size * sizeof(*yyvsp),
+ &yyls1, size * sizeof(*yylsp),
+ &yystacksize);
#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
+ yyoverflow("parser stack overflow",
+ &yyss1, size * sizeof(*yyssp),
+ &yyvs1, size * sizeof(*yyvsp),
+ &yystacksize);
#endif
- yyss = yyss1; yyvs = yyvs1;
+ yyss = yyss1;
+ yyvs = yyvs1;
#ifdef YYLSP_NEEDED
- yyls = yyls1;
+ yyls = yyls1;
#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
- yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
+#else /* no yyoverflow */
+ /* Extend the stack our own way. */
+ if (yystacksize >= YYMAXDEPTH)
+ {
+ yyerror("parser stack overflow");
+ return 2;
+ }
+ yystacksize *= 2;
+ if (yystacksize > YYMAXDEPTH)
+ yystacksize = YYMAXDEPTH;
+ yyss = (short *) alloca(yystacksize * sizeof(*yyssp));
+ __yy_memcpy((char *) yyss, (char *) yyss1, size * sizeof(*yyssp));
+ yyvs = (YYSTYPE *) alloca(yystacksize * sizeof(*yyvsp));
+ __yy_memcpy((char *) yyvs, (char *) yyvs1, size * sizeof(*yyvsp));
#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
+ yyls = (YYLTYPE *) alloca(yystacksize * sizeof(*yylsp));
+ __yy_memcpy((char *) yyls, (char *) yyls1, size * sizeof(*yylsp));
#endif
-#endif /* no yyoverflow */
+#endif /* no yyoverflow */
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
+ yyssp = yyss + size - 1;
+ yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
+ yylsp = yyls + size - 1;
#endif
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+ if (yydebug)
+ fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
+ if (yyssp >= yyss + yystacksize - 1)
+ YYABORT;
+ }
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
+ if (yydebug)
+ fprintf(stderr, "Entering state %d\n", yystate);
#endif
- goto yybackup;
- yybackup:
+ goto yybackup;
+yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /*
+ * First try to decide what to do without reference to lookahead
+ * token.
+ */
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
+ /*
+ * yychar is either YYEMPTY or YYEOF or a valid token in external
+ * form.
+ */
- if (yychar == YYEMPTY)
- {
+ if (yychar == YYEMPTY)
+ {
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
+ if (yydebug)
+ fprintf(stderr, "Reading a token: ");
#endif
- yychar = YYLEX;
- }
+ yychar = YYLEX;
+ }
- /* Convert token to internal form (in yychar1) for indexing tables with */
+ /*
+ * Convert token to internal form (in yychar1) for indexing tables
+ * with
+ */
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
+ if (yychar <= 0) /* This means end of input. */
+ {
+ yychar1 = 0;
+ yychar = YYEOF; /* Don't call YYLEX any more */
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
+ if (yydebug)
+ fprintf(stderr, "Now at end of input.\n");
#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
+ }
+ else
+ {
+ yychar1 = YYTRANSLATE(yychar);
#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
+ if (yydebug)
+ {
+ fprintf(stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+
+ /*
+ * Give the individual parser a way to print the precise
+ * meaning of a token, for further debugging info.
+ */
#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
+ YYPRINT(stderr, yychar, yylval);
#endif
- fprintf (stderr, ")\n");
- }
+ fprintf(stderr, ")\n");
+ }
#endif
- }
+ }
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
+ yyn += yychar1;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ goto yydefault;
- yyn = yytable[yyn];
+ yyn = yytable[yyn];
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
+ /*
+ * yyn is what to do for this token type in this state. Negative =>
+ * reduce, -yyn is rule number. Positive => shift, yyn is new state.
+ * New state is final state => don't bother to shift, just return
+ * success. 0, or most negative number => error.
+ */
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrlab;
- if (yyn == YYFINAL)
- YYACCEPT;
+ if (yyn == YYFINAL)
+ YYACCEPT;
- /* Shift the lookahead token. */
+ /* Shift the lookahead token. */
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+ if (yydebug)
+ fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
- *++yyvsp = yylval;
+ *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
+ *++yylsp = yylloc;
#endif
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
+ /*
+ * count tokens shifted since error; after three, turn off error
+ * status.
+ */
+ if (yyerrstatus)
+ yyerrstatus--;
- yystate = yyn;
- goto yynewstate;
+ yystate = yyn;
+ goto yynewstate;
/* Do the default action for the current state. */
yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
-/* Do a reduction. yyn is the number of a rule to reduce with. */
+/* Do a reduction. yyn is the number of a rule to reduce with. */
yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
+ yylen = yyr2[yyn];
+ if (yylen > 0)
+ yyval = yyvsp[1 - yylen]; /* implement default value of the
+ * action */
#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
+ if (yydebug)
+ {
+ int i;
+
+ fprintf(stderr, "Reducing via rule %d (line %d), ",
+ yyn, yyrline[yyn]);
+
+ /* Print the symbols being reduced, and their result. */
+ for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+ fprintf(stderr, "%s ", yytname[yyrhs[i]]);
+ fprintf(stderr, " -> %s\n", yytname[yyr1[yyn]]);
+ }
#endif
- switch (yyn) {
+ switch (yyn)
+ {
-case 1:
+ case 1:
#line 346 "gram.y"
-{ parsetree = yyvsp[0].list; ;
- break;}
-case 2:
+ {
+ parsetree = yyvsp[0].list;;
+ break;
+ }
+ case 2:
#line 348 "gram.y"
-{ parsetree = lcons(yyvsp[0].node,NIL); ;
- break;}
-case 3:
+ {
+ parsetree = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 3:
#line 352 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[-1].node); ;
- break;}
-case 4:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[-1].node);;
+ break;
+ }
+ case 4:
#line 354 "gram.y"
-{ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].node); ;
- break;}
-case 5:
+ {
+ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].node);;
+ break;
+ }
+ case 5:
#line 356 "gram.y"
-{ yyval.list = lcons(yyvsp[-1].node,NIL); ;
- break;}
-case 49:
+ {
+ yyval.list = lcons(yyvsp[-1].node, NIL);;
+ break;
+ }
+ case 49:
#line 413 "gram.y"
-{
- CreateUserStmt *n = makeNode(CreateUserStmt);
- n->user = yyvsp[-5].str;
- n->password = yyvsp[-4].str;
- n->createdb = yyvsp[-3].pboolean;
- n->createuser = yyvsp[-2].pboolean;
- n->groupElts = yyvsp[-1].list;
- n->validUntil = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 50:
+ {
+ CreateUserStmt *n = makeNode(CreateUserStmt);
+
+ n->user = yyvsp[-5].str;
+ n->password = yyvsp[-4].str;
+ n->createdb = yyvsp[-3].pboolean;
+ n->createuser = yyvsp[-2].pboolean;
+ n->groupElts = yyvsp[-1].list;
+ n->validUntil = yyvsp[0].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 50:
#line 434 "gram.y"
-{
- AlterUserStmt *n = makeNode(AlterUserStmt);
- n->user = yyvsp[-5].str;
- n->password = yyvsp[-4].str;
- n->createdb = yyvsp[-3].pboolean;
- n->createuser = yyvsp[-2].pboolean;
- n->groupElts = yyvsp[-1].list;
- n->validUntil = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 51:
+ {
+ AlterUserStmt *n = makeNode(AlterUserStmt);
+
+ n->user = yyvsp[-5].str;
+ n->password = yyvsp[-4].str;
+ n->createdb = yyvsp[-3].pboolean;
+ n->createuser = yyvsp[-2].pboolean;
+ n->groupElts = yyvsp[-1].list;
+ n->validUntil = yyvsp[0].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 51:
#line 454 "gram.y"
-{
- DropUserStmt *n = makeNode(DropUserStmt);
- n->user = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ DropUserStmt *n = makeNode(DropUserStmt);
+
+ n->user = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 52:
+ break;
+ }
+ case 52:
#line 461 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 53:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 53:
#line 462 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 54:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 54:
#line 466 "gram.y"
-{
- bool* b;
- yyval.pboolean = (b = (bool*)palloc(sizeof(bool)));
- *b = true;
+ {
+ bool *b;
+
+ yyval.pboolean = (b = (bool *) palloc(sizeof(bool)));
+ *b = true;
;
- break;}
-case 55:
+ break;
+ }
+ case 55:
#line 472 "gram.y"
-{
- bool* b;
- yyval.pboolean = (b = (bool*)palloc(sizeof(bool)));
- *b = false;
+ {
+ bool *b;
+
+ yyval.pboolean = (b = (bool *) palloc(sizeof(bool)));
+ *b = false;
;
- break;}
-case 56:
+ break;
+ }
+ case 56:
#line 477 "gram.y"
-{ yyval.pboolean = NULL; ;
- break;}
-case 57:
+ {
+ yyval.pboolean = NULL;;
+ break;
+ }
+ case 57:
#line 481 "gram.y"
-{
- bool* b;
- yyval.pboolean = (b = (bool*)palloc(sizeof(bool)));
- *b = true;
+ {
+ bool *b;
+
+ yyval.pboolean = (b = (bool *) palloc(sizeof(bool)));
+ *b = true;
;
- break;}
-case 58:
+ break;
+ }
+ case 58:
#line 487 "gram.y"
-{
- bool* b;
- yyval.pboolean = (b = (bool*)palloc(sizeof(bool)));
- *b = false;
+ {
+ bool *b;
+
+ yyval.pboolean = (b = (bool *) palloc(sizeof(bool)));
+ *b = false;
;
- break;}
-case 59:
+ break;
+ }
+ case 59:
#line 492 "gram.y"
-{ yyval.pboolean = NULL; ;
- break;}
-case 60:
+ {
+ yyval.pboolean = NULL;;
+ break;
+ }
+ case 60:
#line 496 "gram.y"
-{
- yyval.list = lcons((void*)makeString(yyvsp[0].str), yyvsp[-2].list);
+ {
+ yyval.list = lcons((void *) makeString(yyvsp[0].str), yyvsp[-2].list);
;
- break;}
-case 61:
+ break;
+ }
+ case 61:
#line 500 "gram.y"
-{
- yyval.list = lcons((void*)makeString(yyvsp[0].str), NIL);
+ {
+ yyval.list = lcons((void *) makeString(yyvsp[0].str), NIL);
;
- break;}
-case 62:
+ break;
+ }
+ case 62:
#line 505 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 63:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 63:
#line 506 "gram.y"
-{ yyval.list = NULL; ;
- break;}
-case 64:
+ {
+ yyval.list = NULL;;
+ break;
+ }
+ case 64:
#line 509 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 65:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 65:
#line 510 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 66:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 66:
#line 523 "gram.y"
-{
- VariableSetStmt *n = makeNode(VariableSetStmt);
- n->name = yyvsp[-2].str;
- n->value = yyvsp[0].str;
- yyval.node = (Node *) n;
+ {
+ VariableSetStmt *n = makeNode(VariableSetStmt);
+
+ n->name = yyvsp[-2].str;
+ n->value = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 67:
+ break;
+ }
+ case 67:
#line 530 "gram.y"
-{
- VariableSetStmt *n = makeNode(VariableSetStmt);
- n->name = yyvsp[-2].str;
- n->value = yyvsp[0].str;
- yyval.node = (Node *) n;
+ {
+ VariableSetStmt *n = makeNode(VariableSetStmt);
+
+ n->name = yyvsp[-2].str;
+ n->value = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 68:
+ break;
+ }
+ case 68:
#line 537 "gram.y"
-{
- VariableSetStmt *n = makeNode(VariableSetStmt);
- n->name = "timezone";
- n->value = yyvsp[0].str;
- yyval.node = (Node *) n;
+ {
+ VariableSetStmt *n = makeNode(VariableSetStmt);
+
+ n->name = "timezone";
+ n->value = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 69:
+ break;
+ }
+ case 69:
#line 544 "gram.y"
-{
+ {
#ifdef MB
- VariableSetStmt *n = makeNode(VariableSetStmt);
- n->name = "client_encoding";
- n->value = yyvsp[0].str;
- yyval.node = (Node *) n;
+ VariableSetStmt *n = makeNode(VariableSetStmt);
+
+ n->name = "client_encoding";
+ n->value = yyvsp[0].str;
+ yyval.node = (Node *) n;
#else
- elog(ERROR, "SET NAMES is not supported");
+ elog(ERROR, "SET NAMES is not supported");
#endif
;
- break;}
-case 70:
+ break;
+ }
+ case 70:
#line 556 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 71:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 71:
#line 557 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 72:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 72:
#line 560 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 73:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 73:
#line 561 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 74:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 74:
#line 562 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 75:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 75:
#line 566 "gram.y"
-{
- VariableShowStmt *n = makeNode(VariableShowStmt);
- n->name = yyvsp[0].str;
- yyval.node = (Node *) n;
+ {
+ VariableShowStmt *n = makeNode(VariableShowStmt);
+
+ n->name = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 76:
+ break;
+ }
+ case 76:
#line 572 "gram.y"
-{
- VariableShowStmt *n = makeNode(VariableShowStmt);
- n->name = "timezone";
- yyval.node = (Node *) n;
+ {
+ VariableShowStmt *n = makeNode(VariableShowStmt);
+
+ n->name = "timezone";
+ yyval.node = (Node *) n;
;
- break;}
-case 77:
+ break;
+ }
+ case 77:
#line 580 "gram.y"
-{
- VariableResetStmt *n = makeNode(VariableResetStmt);
- n->name = yyvsp[0].str;
- yyval.node = (Node *) n;
+ {
+ VariableResetStmt *n = makeNode(VariableResetStmt);
+
+ n->name = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 78:
+ break;
+ }
+ case 78:
#line 586 "gram.y"
-{
- VariableResetStmt *n = makeNode(VariableResetStmt);
- n->name = "timezone";
- yyval.node = (Node *) n;
+ {
+ VariableResetStmt *n = makeNode(VariableResetStmt);
+
+ n->name = "timezone";
+ yyval.node = (Node *) n;
;
- break;}
-case 79:
+ break;
+ }
+ case 79:
#line 602 "gram.y"
-{
- AddAttrStmt *n = makeNode(AddAttrStmt);
- n->relname = yyvsp[-2].str;
- n->inh = yyvsp[-1].boolean;
- n->colDef = yyvsp[0].node;
- yyval.node = (Node *)n;
- ;
- break;}
-case 80:
+ {
+ AddAttrStmt *n = makeNode(AddAttrStmt);
+
+ n->relname = yyvsp[-2].str;
+ n->inh = yyvsp[-1].boolean;
+ n->colDef = yyvsp[0].node;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 80:
#line 612 "gram.y"
-{
- yyval.node = yyvsp[0].node;
+ {
+ yyval.node = yyvsp[0].node;
;
- break;}
-case 81:
+ break;
+ }
+ case 81:
#line 616 "gram.y"
-{
- Node *lp = lfirst(yyvsp[-1].list);
+ {
+ Node *lp = lfirst(yyvsp[-1].list);
- if (length(yyvsp[-1].list) != 1)
- elog(ERROR,"ALTER TABLE/ADD() allows one column only");
- yyval.node = lp;
+ if (length(yyvsp[-1].list) != 1)
+ elog(ERROR, "ALTER TABLE/ADD() allows one column only");
+ yyval.node = lp;
;
- break;}
-case 82:
+ break;
+ }
+ case 82:
#line 624 "gram.y"
-{ elog(ERROR,"ALTER TABLE/DROP COLUMN not yet implemented"); ;
- break;}
-case 83:
+ {
+ elog(ERROR, "ALTER TABLE/DROP COLUMN not yet implemented");;
+ break;
+ }
+ case 83:
#line 626 "gram.y"
-{ elog(ERROR,"ALTER TABLE/ALTER COLUMN/SET DEFAULT not yet implemented"); ;
- break;}
-case 84:
+ {
+ elog(ERROR, "ALTER TABLE/ALTER COLUMN/SET DEFAULT not yet implemented");;
+ break;
+ }
+ case 84:
#line 628 "gram.y"
-{ elog(ERROR,"ALTER TABLE/ALTER COLUMN/DROP DEFAULT not yet implemented"); ;
- break;}
-case 85:
+ {
+ elog(ERROR, "ALTER TABLE/ALTER COLUMN/DROP DEFAULT not yet implemented");;
+ break;
+ }
+ case 85:
#line 630 "gram.y"
-{ elog(ERROR,"ALTER TABLE/ADD CONSTRAINT not yet implemented"); ;
- break;}
-case 86:
+ {
+ elog(ERROR, "ALTER TABLE/ADD CONSTRAINT not yet implemented");;
+ break;
+ }
+ case 86:
#line 642 "gram.y"
-{
- ClosePortalStmt *n = makeNode(ClosePortalStmt);
- n->portalname = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ ClosePortalStmt *n = makeNode(ClosePortalStmt);
+
+ n->portalname = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 87:
+ break;
+ }
+ case 87:
#line 659 "gram.y"
-{
- CopyStmt *n = makeNode(CopyStmt);
- n->binary = yyvsp[-5].boolean;
- n->relname = yyvsp[-4].str;
- n->oids = yyvsp[-3].boolean;
- n->direction = yyvsp[-2].ival;
- n->filename = yyvsp[-1].str;
- n->delimiter = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 88:
+ {
+ CopyStmt *n = makeNode(CopyStmt);
+
+ n->binary = yyvsp[-5].boolean;
+ n->relname = yyvsp[-4].str;
+ n->oids = yyvsp[-3].boolean;
+ n->direction = yyvsp[-2].ival;
+ n->filename = yyvsp[-1].str;
+ n->delimiter = yyvsp[0].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 88:
#line 672 "gram.y"
-{ yyval.ival = TO; ;
- break;}
-case 89:
+ {
+ yyval.ival = TO;;
+ break;
+ }
+ case 89:
#line 674 "gram.y"
-{ yyval.ival = FROM; ;
- break;}
-case 90:
+ {
+ yyval.ival = FROM;;
+ break;
+ }
+ case 90:
#line 682 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 91:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 91:
#line 683 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 92:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 92:
#line 684 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 93:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 93:
#line 687 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 94:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 94:
#line 688 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 95:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 95:
#line 691 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 96:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 96:
#line 692 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 97:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 97:
#line 698 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 98:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 98:
#line 699 "gram.y"
-{ yyval.str = "\t"; ;
- break;}
-case 99:
+ {
+ yyval.str = "\t";;
+ break;
+ }
+ case 99:
#line 712 "gram.y"
-{
- CreateStmt *n = makeNode(CreateStmt);
- n->relname = yyvsp[-5].str;
- n->tableElts = yyvsp[-3].list;
- n->inhRelnames = yyvsp[-1].list;
- n->constraints = NIL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 100:
+ {
+ CreateStmt *n = makeNode(CreateStmt);
+
+ n->relname = yyvsp[-5].str;
+ n->tableElts = yyvsp[-3].list;
+ n->inhRelnames = yyvsp[-1].list;
+ n->constraints = NIL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 100:
#line 723 "gram.y"
-{
- if (yyvsp[0].node != NULL)
- yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);
- else
- yyval.list = yyvsp[-2].list;
+ {
+ if (yyvsp[0].node != NULL)
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);
+ else
+ yyval.list = yyvsp[-2].list;
;
- break;}
-case 101:
+ break;
+ }
+ case 101:
#line 730 "gram.y"
-{
- if (yyvsp[0].node != NULL)
- yyval.list = lcons(yyvsp[0].node, NIL);
- else
- yyval.list = NULL;
+ {
+ if (yyvsp[0].node != NULL)
+ yyval.list = lcons(yyvsp[0].node, NIL);
+ else
+ yyval.list = NULL;
;
- break;}
-case 102:
+ break;
+ }
+ case 102:
#line 736 "gram.y"
-{ yyval.list = NULL; ;
- break;}
-case 103:
+ {
+ yyval.list = NULL;;
+ break;
+ }
+ case 103:
#line 739 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 104:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 104:
#line 740 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 105:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 105:
#line 744 "gram.y"
-{
- ColumnDef *n = makeNode(ColumnDef);
- n->colname = yyvsp[-2].str;
- n->typename = yyvsp[-1].typnam;
- n->defval = NULL;
- n->is_not_null = FALSE;
- n->constraints = yyvsp[0].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 106:
+ {
+ ColumnDef *n = makeNode(ColumnDef);
+
+ n->colname = yyvsp[-2].str;
+ n->typename = yyvsp[-1].typnam;
+ n->defval = NULL;
+ n->is_not_null = FALSE;
+ n->constraints = yyvsp[0].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 106:
#line 754 "gram.y"
-{
- ColumnDef *n = makeNode(ColumnDef);
- n->colname = yyvsp[-1].str;
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("integer");
- n->defval = NULL;
- n->is_not_null = TRUE;
- n->is_sequence = TRUE;
- n->constraints = NULL;
-
- yyval.node = (Node *)n;
- ;
- break;}
-case 107:
+ {
+ ColumnDef *n = makeNode(ColumnDef);
+
+ n->colname = yyvsp[-1].str;
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("integer");
+ n->defval = NULL;
+ n->is_not_null = TRUE;
+ n->is_sequence = TRUE;
+ n->constraints = NULL;
+
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 107:
#line 768 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 108:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 108:
#line 769 "gram.y"
-{ yyval.list = NULL; ;
- break;}
-case 109:
+ {
+ yyval.list = NULL;;
+ break;
+ }
+ case 109:
#line 773 "gram.y"
-{
- if (yyvsp[0].node != NULL)
- yyval.list = lappend(yyvsp[-1].list, yyvsp[0].node);
- else
- yyval.list = yyvsp[-1].list;
+ {
+ if (yyvsp[0].node != NULL)
+ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].node);
+ else
+ yyval.list = yyvsp[-1].list;
;
- break;}
-case 110:
+ break;
+ }
+ case 110:
#line 780 "gram.y"
-{
- if (yyvsp[0].node != NULL)
- yyval.list = lcons(yyvsp[0].node, NIL);
- else
- yyval.list = NULL;
+ {
+ if (yyvsp[0].node != NULL)
+ yyval.list = lcons(yyvsp[0].node, NIL);
+ else
+ yyval.list = NULL;
;
- break;}
-case 111:
+ break;
+ }
+ case 111:
#line 790 "gram.y"
-{
- Constraint *n = (Constraint *)yyvsp[0].node;
- if (n != NULL) n->name = fmtId(yyvsp[-1].str);
- yyval.node = yyvsp[0].node;
+ {
+ Constraint *n = (Constraint *) yyvsp[0].node;
+
+ if (n != NULL)
+ n->name = fmtId(yyvsp[-1].str);
+ yyval.node = yyvsp[0].node;
;
- break;}
-case 112:
+ break;
+ }
+ case 112:
#line 796 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 113:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 113:
#line 800 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_CHECK;
- n->name = NULL;
- n->def = FlattenStringList(yyvsp[-1].list);
- n->keys = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 114:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_CHECK;
+ n->name = NULL;
+ n->def = FlattenStringList(yyvsp[-1].list);
+ n->keys = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 114:
#line 809 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_DEFAULT;
- n->name = NULL;
- n->def = FlattenStringList(yyvsp[0].list);
- n->keys = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 115:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_DEFAULT;
+ n->name = NULL;
+ n->def = FlattenStringList(yyvsp[0].list);
+ n->keys = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 115:
#line 818 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_NOTNULL;
- n->name = NULL;
- n->def = NULL;
- n->keys = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 116:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_NOTNULL;
+ n->name = NULL;
+ n->def = NULL;
+ n->keys = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 116:
#line 827 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_UNIQUE;
- n->name = NULL;
- n->def = NULL;
- n->keys = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 117:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_UNIQUE;
+ n->name = NULL;
+ n->def = NULL;
+ n->keys = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 117:
#line 836 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_PRIMARY;
- n->name = NULL;
- n->def = NULL;
- n->keys = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 118:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_PRIMARY;
+ n->name = NULL;
+ n->def = NULL;
+ n->keys = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 118:
#line 845 "gram.y"
-{
- elog(NOTICE,"CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented");
- yyval.node = NULL;
+ {
+ elog(NOTICE, "CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented");
+ yyval.node = NULL;
;
- break;}
-case 119:
+ break;
+ }
+ case 119:
#line 852 "gram.y"
-{
- yyval.list = lappend(yyvsp[-2].list,makeString(","));
- yyval.list = nconc(yyval.list, yyvsp[0].list);
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString(","));
+ yyval.list = nconc(yyval.list, yyvsp[0].list);
;
- break;}
-case 120:
+ break;
+ }
+ case 120:
#line 857 "gram.y"
-{
- yyval.list = yyvsp[0].list;
+ {
+ yyval.list = yyvsp[0].list;
;
- break;}
-case 121:
+ break;
+ }
+ case 121:
#line 863 "gram.y"
-{ yyval.list = makeConstantList((A_Const *) yyvsp[0].node); ;
- break;}
-case 122:
+ {
+ yyval.list = makeConstantList((A_Const *) yyvsp[0].node);;
+ break;
+ }
+ case 122:
#line 865 "gram.y"
-{ yyval.list = lcons( makeString("NULL"), NIL); ;
- break;}
-case 123:
+ {
+ yyval.list = lcons(makeString("NULL"), NIL);;
+ break;
+ }
+ case 123:
#line 867 "gram.y"
-{ yyval.list = lcons( makeString( "-"), yyvsp[0].list); ;
- break;}
-case 124:
+ {
+ yyval.list = lcons(makeString("-"), yyvsp[0].list);;
+ break;
+ }
+ case 124:
#line 869 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "+"), yyvsp[0].list)); ;
- break;}
-case 125:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("+"), yyvsp[0].list));;
+ break;
+ }
+ case 125:
#line 871 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "-"), yyvsp[0].list)); ;
- break;}
-case 126:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("-"), yyvsp[0].list));;
+ break;
+ }
+ case 126:
#line 873 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "/"), yyvsp[0].list)); ;
- break;}
-case 127:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("/"), yyvsp[0].list));;
+ break;
+ }
+ case 127:
#line 875 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "*"), yyvsp[0].list)); ;
- break;}
-case 128:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("*"), yyvsp[0].list));;
+ break;
+ }
+ case 128:
#line 877 "gram.y"
-{ elog(ERROR,"boolean expressions not supported in DEFAULT"); ;
- break;}
-case 129:
+ {
+ elog(ERROR, "boolean expressions not supported in DEFAULT");;
+ break;
+ }
+ case 129:
#line 879 "gram.y"
-{ elog(ERROR,"boolean expressions not supported in DEFAULT"); ;
- break;}
-case 130:
+ {
+ elog(ERROR, "boolean expressions not supported in DEFAULT");;
+ break;
+ }
+ case 130:
#line 881 "gram.y"
-{ elog(ERROR,"boolean expressions not supported in DEFAULT"); ;
- break;}
-case 131:
+ {
+ elog(ERROR, "boolean expressions not supported in DEFAULT");;
+ break;
+ }
+ case 131:
#line 883 "gram.y"
-{ yyval.list = lcons( makeString( ":"), yyvsp[0].list); ;
- break;}
-case 132:
+ {
+ yyval.list = lcons(makeString(":"), yyvsp[0].list);;
+ break;
+ }
+ case 132:
#line 885 "gram.y"
-{ yyval.list = lcons( makeString( ";"), yyvsp[0].list); ;
- break;}
-case 133:
+ {
+ yyval.list = lcons(makeString(";"), yyvsp[0].list);;
+ break;
+ }
+ case 133:
#line 887 "gram.y"
-{ yyval.list = lcons( makeString( "|"), yyvsp[0].list); ;
- break;}
-case 134:
+ {
+ yyval.list = lcons(makeString("|"), yyvsp[0].list);;
+ break;
+ }
+ case 134:
#line 889 "gram.y"
-{
- yyvsp[0].typnam->name = fmtId(yyvsp[0].typnam->name);
- yyval.list = nconc( lcons( makeString( "CAST"), yyvsp[-2].list), makeList( makeString("AS"), yyvsp[0].typnam, -1));
+ {
+ yyvsp[0].typnam->name = fmtId(yyvsp[0].typnam->name);
+ yyval.list = nconc(lcons(makeString("CAST"), yyvsp[-2].list), makeList(makeString("AS"), yyvsp[0].typnam, -1));
;
- break;}
-case 135:
+ break;
+ }
+ case 135:
#line 894 "gram.y"
-{
- yyvsp[-1].typnam->name = fmtId(yyvsp[-1].typnam->name);
- yyval.list = nconc( lcons( makeString( "CAST"), yyvsp[-3].list), makeList( makeString("AS"), yyvsp[-1].typnam, -1));
+ {
+ yyvsp[-1].typnam->name = fmtId(yyvsp[-1].typnam->name);
+ yyval.list = nconc(lcons(makeString("CAST"), yyvsp[-3].list), makeList(makeString("AS"), yyvsp[-1].typnam, -1));
;
- break;}
-case 136:
+ break;
+ }
+ case 136:
#line 899 "gram.y"
-{ yyval.list = lappend( lcons( makeString( "("), yyvsp[-1].list), makeString( ")")); ;
- break;}
-case 137:
+ {
+ yyval.list = lappend(lcons(makeString("("), yyvsp[-1].list), makeString(")"));;
+ break;
+ }
+ case 137:
#line 901 "gram.y"
-{
- yyval.list = makeList( makeString(yyvsp[-2].str), makeString("("), -1);
- yyval.list = lappend( yyval.list, makeString(")"));
+ {
+ yyval.list = makeList(makeString(yyvsp[-2].str), makeString("("), -1);
+ yyval.list = lappend(yyval.list, makeString(")"));
;
- break;}
-case 138:
+ break;
+ }
+ case 138:
#line 906 "gram.y"
-{
- yyval.list = makeList( makeString(yyvsp[-3].str), makeString("("), -1);
- yyval.list = nconc( yyval.list, yyvsp[-1].list);
- yyval.list = lappend( yyval.list, makeString(")"));
+ {
+ yyval.list = makeList(makeString(yyvsp[-3].str), makeString("("), -1);
+ yyval.list = nconc(yyval.list, yyvsp[-1].list);
+ yyval.list = lappend(yyval.list, makeString(")"));
;
- break;}
-case 139:
+ break;
+ }
+ case 139:
#line 912 "gram.y"
-{
- if (!strcmp("<=", yyvsp[-1].str) || !strcmp(">=", yyvsp[-1].str))
- elog(ERROR,"boolean expressions not supported in DEFAULT");
- yyval.list = nconc( yyvsp[-2].list, lcons( makeString( yyvsp[-1].str), yyvsp[0].list));
+ {
+ if (!strcmp("<=", yyvsp[-1].str) || !strcmp(">=", yyvsp[-1].str))
+ elog(ERROR, "boolean expressions not supported in DEFAULT");
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString(yyvsp[-1].str), yyvsp[0].list));
;
- break;}
-case 140:
+ break;
+ }
+ case 140:
#line 918 "gram.y"
-{ yyval.list = lcons( makeString( yyvsp[-1].str), yyvsp[0].list); ;
- break;}
-case 141:
+ {
+ yyval.list = lcons(makeString(yyvsp[-1].str), yyvsp[0].list);;
+ break;
+ }
+ case 141:
#line 920 "gram.y"
-{ yyval.list = lappend( yyvsp[-1].list, makeString( yyvsp[0].str)); ;
- break;}
-case 142:
+ {
+ yyval.list = lappend(yyvsp[-1].list, makeString(yyvsp[0].str));;
+ break;
+ }
+ case 142:
#line 923 "gram.y"
-{ yyval.list = lcons( makeString( "date( 'current'::datetime + '0 sec')"), NIL); ;
- break;}
-case 143:
+ {
+ yyval.list = lcons(makeString("date( 'current'::datetime + '0 sec')"), NIL);;
+ break;
+ }
+ case 143:
#line 925 "gram.y"
-{ yyval.list = lcons( makeString( "'now'::time"), NIL); ;
- break;}
-case 144:
+ {
+ yyval.list = lcons(makeString("'now'::time"), NIL);;
+ break;
+ }
+ case 144:
#line 927 "gram.y"
-{
- if (yyvsp[-1].ival != 0)
- elog(NOTICE,"CURRENT_TIME(%d) precision not implemented; zero used instead",yyvsp[-1].ival);
- yyval.list = lcons( makeString( "'now'::time"), NIL);
+ {
+ if (yyvsp[-1].ival != 0)
+ elog(NOTICE, "CURRENT_TIME(%d) precision not implemented; zero used instead", yyvsp[-1].ival);
+ yyval.list = lcons(makeString("'now'::time"), NIL);
;
- break;}
-case 145:
+ break;
+ }
+ case 145:
#line 933 "gram.y"
-{ yyval.list = lcons( makeString( "now()"), NIL); ;
- break;}
-case 146:
+ {
+ yyval.list = lcons(makeString("now()"), NIL);;
+ break;
+ }
+ case 146:
#line 935 "gram.y"
-{
- if (yyvsp[-1].ival != 0)
- elog(NOTICE,"CURRENT_TIMESTAMP(%d) precision not implemented; zero used instead",yyvsp[-1].ival);
- yyval.list = lcons( makeString( "now()"), NIL);
+ {
+ if (yyvsp[-1].ival != 0)
+ elog(NOTICE, "CURRENT_TIMESTAMP(%d) precision not implemented; zero used instead", yyvsp[-1].ival);
+ yyval.list = lcons(makeString("now()"), NIL);
;
- break;}
-case 147:
+ break;
+ }
+ case 147:
#line 941 "gram.y"
-{ yyval.list = lcons( makeString( "CURRENT_USER"), NIL); ;
- break;}
-case 148:
+ {
+ yyval.list = lcons(makeString("CURRENT_USER"), NIL);;
+ break;
+ }
+ case 148:
#line 943 "gram.y"
-{ yyval.list = lcons( makeString( "USER"), NIL); ;
- break;}
-case 149:
+ {
+ yyval.list = lcons(makeString("USER"), NIL);;
+ break;
+ }
+ case 149:
#line 951 "gram.y"
-{
- Constraint *n = (Constraint *)yyvsp[0].node;
- if (n != NULL) n->name = fmtId(yyvsp[-1].str);
- yyval.node = yyvsp[0].node;
+ {
+ Constraint *n = (Constraint *) yyvsp[0].node;
+
+ if (n != NULL)
+ n->name = fmtId(yyvsp[-1].str);
+ yyval.node = yyvsp[0].node;
;
- break;}
-case 150:
+ break;
+ }
+ case 150:
#line 957 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 151:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 151:
#line 961 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_CHECK;
- n->name = NULL;
- n->def = FlattenStringList(yyvsp[-1].list);
- yyval.node = (Node *)n;
- ;
- break;}
-case 152:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_CHECK;
+ n->name = NULL;
+ n->def = FlattenStringList(yyvsp[-1].list);
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 152:
#line 969 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_UNIQUE;
- n->name = NULL;
- n->def = NULL;
- n->keys = yyvsp[-1].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 153:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_UNIQUE;
+ n->name = NULL;
+ n->def = NULL;
+ n->keys = yyvsp[-1].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 153:
#line 978 "gram.y"
-{
- Constraint *n = makeNode(Constraint);
- n->contype = CONSTR_PRIMARY;
- n->name = NULL;
- n->def = NULL;
- n->keys = yyvsp[-1].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 154:
+ {
+ Constraint *n = makeNode(Constraint);
+
+ n->contype = CONSTR_PRIMARY;
+ n->name = NULL;
+ n->def = NULL;
+ n->keys = yyvsp[-1].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 154:
#line 987 "gram.y"
-{
- elog(NOTICE,"CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented");
- yyval.node = NULL;
+ {
+ elog(NOTICE, "CREATE TABLE/FOREIGN KEY clause ignored; not yet implemented");
+ yyval.node = NULL;
;
- break;}
-case 155:
+ break;
+ }
+ case 155:
#line 994 "gram.y"
-{
- yyval.list = lappend(yyvsp[-2].list,makeString(","));
- yyval.list = nconc(yyval.list, yyvsp[0].list);
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString(","));
+ yyval.list = nconc(yyval.list, yyvsp[0].list);
;
- break;}
-case 156:
+ break;
+ }
+ case 156:
#line 999 "gram.y"
-{
- yyval.list = yyvsp[0].list;
+ {
+ yyval.list = yyvsp[0].list;
;
- break;}
-case 157:
+ break;
+ }
+ case 157:
#line 1005 "gram.y"
-{ yyval.list = makeConstantList((A_Const *) yyvsp[0].node); ;
- break;}
-case 158:
+ {
+ yyval.list = makeConstantList((A_Const *) yyvsp[0].node);;
+ break;
+ }
+ case 158:
#line 1007 "gram.y"
-{ yyval.list = lcons( makeString("NULL"), NIL); ;
- break;}
-case 159:
+ {
+ yyval.list = lcons(makeString("NULL"), NIL);;
+ break;
+ }
+ case 159:
#line 1009 "gram.y"
-{
- yyval.list = lcons( makeString(fmtId(yyvsp[0].str)), NIL);
+ {
+ yyval.list = lcons(makeString(fmtId(yyvsp[0].str)), NIL);
;
- break;}
-case 160:
+ break;
+ }
+ case 160:
#line 1013 "gram.y"
-{ yyval.list = lcons( makeString( "-"), yyvsp[0].list); ;
- break;}
-case 161:
+ {
+ yyval.list = lcons(makeString("-"), yyvsp[0].list);;
+ break;
+ }
+ case 161:
#line 1015 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "+"), yyvsp[0].list)); ;
- break;}
-case 162:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("+"), yyvsp[0].list));;
+ break;
+ }
+ case 162:
#line 1017 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "-"), yyvsp[0].list)); ;
- break;}
-case 163:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("-"), yyvsp[0].list));;
+ break;
+ }
+ case 163:
#line 1019 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "/"), yyvsp[0].list)); ;
- break;}
-case 164:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("/"), yyvsp[0].list));;
+ break;
+ }
+ case 164:
#line 1021 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "*"), yyvsp[0].list)); ;
- break;}
-case 165:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("*"), yyvsp[0].list));;
+ break;
+ }
+ case 165:
#line 1023 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "="), yyvsp[0].list)); ;
- break;}
-case 166:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("="), yyvsp[0].list));;
+ break;
+ }
+ case 166:
#line 1025 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "<"), yyvsp[0].list)); ;
- break;}
-case 167:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("<"), yyvsp[0].list));;
+ break;
+ }
+ case 167:
#line 1027 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( ">"), yyvsp[0].list)); ;
- break;}
-case 168:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString(">"), yyvsp[0].list));;
+ break;
+ }
+ case 168:
#line 1029 "gram.y"
-{ yyval.list = lcons( makeString( ":"), yyvsp[0].list); ;
- break;}
-case 169:
+ {
+ yyval.list = lcons(makeString(":"), yyvsp[0].list);;
+ break;
+ }
+ case 169:
#line 1031 "gram.y"
-{ yyval.list = lcons( makeString( ";"), yyvsp[0].list); ;
- break;}
-case 170:
+ {
+ yyval.list = lcons(makeString(";"), yyvsp[0].list);;
+ break;
+ }
+ case 170:
#line 1033 "gram.y"
-{ yyval.list = lcons( makeString( "|"), yyvsp[0].list); ;
- break;}
-case 171:
+ {
+ yyval.list = lcons(makeString("|"), yyvsp[0].list);;
+ break;
+ }
+ case 171:
#line 1035 "gram.y"
-{
- yyvsp[0].typnam->name = fmtId(yyvsp[0].typnam->name);
- yyval.list = nconc( lcons( makeString( "CAST"), yyvsp[-2].list), makeList( makeString("AS"), yyvsp[0].typnam, -1));
+ {
+ yyvsp[0].typnam->name = fmtId(yyvsp[0].typnam->name);
+ yyval.list = nconc(lcons(makeString("CAST"), yyvsp[-2].list), makeList(makeString("AS"), yyvsp[0].typnam, -1));
;
- break;}
-case 172:
+ break;
+ }
+ case 172:
#line 1040 "gram.y"
-{
- yyvsp[-1].typnam->name = fmtId(yyvsp[-1].typnam->name);
- yyval.list = nconc( lcons( makeString( "CAST"), yyvsp[-3].list), makeList( makeString("AS"), yyvsp[-1].typnam, -1));
+ {
+ yyvsp[-1].typnam->name = fmtId(yyvsp[-1].typnam->name);
+ yyval.list = nconc(lcons(makeString("CAST"), yyvsp[-3].list), makeList(makeString("AS"), yyvsp[-1].typnam, -1));
;
- break;}
-case 173:
+ break;
+ }
+ case 173:
#line 1045 "gram.y"
-{ yyval.list = lappend( lcons( makeString( "("), yyvsp[-1].list), makeString( ")")); ;
- break;}
-case 174:
+ {
+ yyval.list = lappend(lcons(makeString("("), yyvsp[-1].list), makeString(")"));;
+ break;
+ }
+ case 174:
#line 1047 "gram.y"
-{
- yyval.list = makeList( makeString(yyvsp[-2].str), makeString("("), -1);
- yyval.list = lappend( yyval.list, makeString(")"));
+ {
+ yyval.list = makeList(makeString(yyvsp[-2].str), makeString("("), -1);
+ yyval.list = lappend(yyval.list, makeString(")"));
;
- break;}
-case 175:
+ break;
+ }
+ case 175:
#line 1052 "gram.y"
-{
- yyval.list = makeList( makeString(yyvsp[-3].str), makeString("("), -1);
- yyval.list = nconc( yyval.list, yyvsp[-1].list);
- yyval.list = lappend( yyval.list, makeString(")"));
+ {
+ yyval.list = makeList(makeString(yyvsp[-3].str), makeString("("), -1);
+ yyval.list = nconc(yyval.list, yyvsp[-1].list);
+ yyval.list = lappend(yyval.list, makeString(")"));
;
- break;}
-case 176:
+ break;
+ }
+ case 176:
#line 1058 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( yyvsp[-1].str), yyvsp[0].list)); ;
- break;}
-case 177:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString(yyvsp[-1].str), yyvsp[0].list));;
+ break;
+ }
+ case 177:
#line 1060 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "LIKE"), yyvsp[0].list)); ;
- break;}
-case 178:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("LIKE"), yyvsp[0].list));;
+ break;
+ }
+ case 178:
#line 1062 "gram.y"
-{ yyval.list = nconc( yyvsp[-3].list, lcons( makeString( "NOT LIKE"), yyvsp[0].list)); ;
- break;}
-case 179:
+ {
+ yyval.list = nconc(yyvsp[-3].list, lcons(makeString("NOT LIKE"), yyvsp[0].list));;
+ break;
+ }
+ case 179:
#line 1064 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "AND"), yyvsp[0].list)); ;
- break;}
-case 180:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("AND"), yyvsp[0].list));;
+ break;
+ }
+ case 180:
#line 1066 "gram.y"
-{ yyval.list = nconc( yyvsp[-2].list, lcons( makeString( "OR"), yyvsp[0].list)); ;
- break;}
-case 181:
+ {
+ yyval.list = nconc(yyvsp[-2].list, lcons(makeString("OR"), yyvsp[0].list));;
+ break;
+ }
+ case 181:
#line 1068 "gram.y"
-{ yyval.list = lcons( makeString( "NOT"), yyvsp[0].list); ;
- break;}
-case 182:
+ {
+ yyval.list = lcons(makeString("NOT"), yyvsp[0].list);;
+ break;
+ }
+ case 182:
#line 1070 "gram.y"
-{ yyval.list = lcons( makeString( yyvsp[-1].str), yyvsp[0].list); ;
- break;}
-case 183:
+ {
+ yyval.list = lcons(makeString(yyvsp[-1].str), yyvsp[0].list);;
+ break;
+ }
+ case 183:
#line 1072 "gram.y"
-{ yyval.list = lappend( yyvsp[-1].list, makeString( yyvsp[0].str)); ;
- break;}
-case 184:
+ {
+ yyval.list = lappend(yyvsp[-1].list, makeString(yyvsp[0].str));;
+ break;
+ }
+ case 184:
#line 1074 "gram.y"
-{ yyval.list = lappend( yyvsp[-1].list, makeString( "IS NULL")); ;
- break;}
-case 185:
+ {
+ yyval.list = lappend(yyvsp[-1].list, makeString("IS NULL"));;
+ break;
+ }
+ case 185:
#line 1076 "gram.y"
-{ yyval.list = lappend( yyvsp[-2].list, makeString( "IS NULL")); ;
- break;}
-case 186:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString("IS NULL"));;
+ break;
+ }
+ case 186:
#line 1078 "gram.y"
-{ yyval.list = lappend( yyvsp[-1].list, makeString( "IS NOT NULL")); ;
- break;}
-case 187:
+ {
+ yyval.list = lappend(yyvsp[-1].list, makeString("IS NOT NULL"));;
+ break;
+ }
+ case 187:
#line 1080 "gram.y"
-{ yyval.list = lappend( yyvsp[-3].list, makeString( "IS NOT NULL")); ;
- break;}
-case 188:
+ {
+ yyval.list = lappend(yyvsp[-3].list, makeString("IS NOT NULL"));;
+ break;
+ }
+ case 188:
#line 1082 "gram.y"
-{ yyval.list = lappend( yyvsp[-2].list, makeString( "IS TRUE")); ;
- break;}
-case 189:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString("IS TRUE"));;
+ break;
+ }
+ case 189:
#line 1084 "gram.y"
-{ yyval.list = lappend( yyvsp[-2].list, makeString( "IS FALSE")); ;
- break;}
-case 190:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString("IS FALSE"));;
+ break;
+ }
+ case 190:
#line 1086 "gram.y"
-{ yyval.list = lappend( yyvsp[-3].list, makeString( "IS NOT TRUE")); ;
- break;}
-case 191:
+ {
+ yyval.list = lappend(yyvsp[-3].list, makeString("IS NOT TRUE"));;
+ break;
+ }
+ case 191:
#line 1088 "gram.y"
-{ yyval.list = lappend( yyvsp[-3].list, makeString( "IS NOT FALSE")); ;
- break;}
-case 192:
+ {
+ yyval.list = lappend(yyvsp[-3].list, makeString("IS NOT FALSE"));;
+ break;
+ }
+ case 192:
#line 1090 "gram.y"
-{
- yyval.list = lappend( yyvsp[-4].list, makeString("IN"));
- yyval.list = lappend( yyval.list, makeString("("));
- yyval.list = nconc( yyval.list, yyvsp[-1].list);
- yyval.list = lappend( yyval.list, makeString(")"));
+ {
+ yyval.list = lappend(yyvsp[-4].list, makeString("IN"));
+ yyval.list = lappend(yyval.list, makeString("("));
+ yyval.list = nconc(yyval.list, yyvsp[-1].list);
+ yyval.list = lappend(yyval.list, makeString(")"));
;
- break;}
-case 193:
+ break;
+ }
+ case 193:
#line 1097 "gram.y"
-{
- yyval.list = lappend( yyvsp[-5].list, makeString("NOT IN"));
- yyval.list = lappend( yyval.list, makeString("("));
- yyval.list = nconc( yyval.list, yyvsp[-1].list);
- yyval.list = lappend( yyval.list, makeString(")"));
+ {
+ yyval.list = lappend(yyvsp[-5].list, makeString("NOT IN"));
+ yyval.list = lappend(yyval.list, makeString("("));
+ yyval.list = nconc(yyval.list, yyvsp[-1].list);
+ yyval.list = lappend(yyval.list, makeString(")"));
;
- break;}
-case 194:
+ break;
+ }
+ case 194:
#line 1104 "gram.y"
-{
- yyval.list = lappend( yyvsp[-4].list, makeString("BETWEEN"));
- yyval.list = nconc( yyval.list, yyvsp[-2].list);
- yyval.list = lappend( yyval.list, makeString("AND"));
- yyval.list = nconc( yyval.list, yyvsp[0].list);
+ {
+ yyval.list = lappend(yyvsp[-4].list, makeString("BETWEEN"));
+ yyval.list = nconc(yyval.list, yyvsp[-2].list);
+ yyval.list = lappend(yyval.list, makeString("AND"));
+ yyval.list = nconc(yyval.list, yyvsp[0].list);
;
- break;}
-case 195:
+ break;
+ }
+ case 195:
#line 1111 "gram.y"
-{
- yyval.list = lappend( yyvsp[-5].list, makeString("NOT BETWEEN"));
- yyval.list = nconc( yyval.list, yyvsp[-2].list);
- yyval.list = lappend( yyval.list, makeString("AND"));
- yyval.list = nconc( yyval.list, yyvsp[0].list);
+ {
+ yyval.list = lappend(yyvsp[-5].list, makeString("NOT BETWEEN"));
+ yyval.list = nconc(yyval.list, yyvsp[-2].list);
+ yyval.list = lappend(yyval.list, makeString("AND"));
+ yyval.list = nconc(yyval.list, yyvsp[0].list);
;
- break;}
-case 196:
+ break;
+ }
+ case 196:
#line 1120 "gram.y"
-{
- yyval.list = lappend(yyvsp[-2].list, makeString(","));
- yyval.list = nconc(yyval.list, yyvsp[0].list);
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString(","));
+ yyval.list = nconc(yyval.list, yyvsp[0].list);
;
- break;}
-case 197:
+ break;
+ }
+ case 197:
#line 1125 "gram.y"
-{
- yyval.list = yyvsp[0].list;
+ {
+ yyval.list = yyvsp[0].list;
;
- break;}
-case 198:
+ break;
+ }
+ case 198:
#line 1131 "gram.y"
-{ yyval.list = makeConstantList((A_Const *) yyvsp[0].node); ;
- break;}
-case 199:
+ {
+ yyval.list = makeConstantList((A_Const *) yyvsp[0].node);;
+ break;
+ }
+ case 199:
#line 1134 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 200:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 200:
#line 1135 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 201:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 201:
#line 1136 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 202:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 202:
#line 1139 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 203:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 203:
#line 1140 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 204:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 204:
#line 1141 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 205:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 205:
#line 1144 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 206:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 206:
#line 1145 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 207:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 207:
#line 1148 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 208:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 208:
#line 1149 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 209:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 209:
#line 1150 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 210:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 210:
#line 1151 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 211:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 211:
#line 1154 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 212:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 212:
#line 1155 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 213:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 213:
#line 1162 "gram.y"
-{ ;
- break;}
-case 214:
+ {;
+ break;
+ }
+ case 214:
#line 1163 "gram.y"
-{ ;
- break;}
-case 215:
+ {;
+ break;
+ }
+ case 215:
#line 1167 "gram.y"
-{
- SelectStmt *n = (SelectStmt *)yyvsp[0].node;
- if (yyvsp[-2].list != NIL)
- mapTargetColumns(yyvsp[-2].list, n->targetList);
- n->into = yyvsp[-3].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 216:
+ {
+ SelectStmt *n = (SelectStmt *) yyvsp[0].node;
+
+ if (yyvsp[-2].list != NIL)
+ mapTargetColumns(yyvsp[-2].list, n->targetList);
+ n->into = yyvsp[-3].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 216:
#line 1176 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 217:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 217:
#line 1177 "gram.y"
-{ yyval.list = NULL; ;
- break;}
-case 218:
+ {
+ yyval.list = NULL;;
+ break;
+ }
+ case 218:
#line 1180 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node); ;
- break;}
-case 219:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);;
+ break;
+ }
+ case 219:
#line 1181 "gram.y"
-{ yyval.list = lcons(yyvsp[0].node, NIL); ;
- break;}
-case 220:
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 220:
#line 1185 "gram.y"
-{
- ColumnDef *n = makeNode(ColumnDef);
- n->colname = yyvsp[0].str;
- n->typename = NULL;
- n->defval = NULL;
- n->is_not_null = FALSE;
- n->constraints = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 221:
+ {
+ ColumnDef *n = makeNode(ColumnDef);
+
+ n->colname = yyvsp[0].str;
+ n->typename = NULL;
+ n->defval = NULL;
+ n->is_not_null = FALSE;
+ n->constraints = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 221:
#line 1205 "gram.y"
-{
- CreateSeqStmt *n = makeNode(CreateSeqStmt);
- n->seqname = yyvsp[-1].str;
- n->options = yyvsp[0].list;
- yyval.node = (Node *)n;
+ {
+ CreateSeqStmt *n = makeNode(CreateSeqStmt);
+
+ n->seqname = yyvsp[-1].str;
+ n->options = yyvsp[0].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 222:
+ break;
+ }
+ case 222:
#line 1214 "gram.y"
-{ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].defelt); ;
- break;}
-case 223:
+ {
+ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].defelt);;
+ break;
+ }
+ case 223:
#line 1215 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 224:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 224:
#line 1219 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "cache";
- yyval.defelt->arg = (Node *)yyvsp[0].value;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "cache";
+ yyval.defelt->arg = (Node *) yyvsp[0].value;
;
- break;}
-case 225:
+ break;
+ }
+ case 225:
#line 1225 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "cycle";
- yyval.defelt->arg = (Node *)NULL;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "cycle";
+ yyval.defelt->arg = (Node *) NULL;
;
- break;}
-case 226:
+ break;
+ }
+ case 226:
#line 1231 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "increment";
- yyval.defelt->arg = (Node *)yyvsp[0].value;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "increment";
+ yyval.defelt->arg = (Node *) yyvsp[0].value;
;
- break;}
-case 227:
+ break;
+ }
+ case 227:
#line 1237 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "maxvalue";
- yyval.defelt->arg = (Node *)yyvsp[0].value;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "maxvalue";
+ yyval.defelt->arg = (Node *) yyvsp[0].value;
;
- break;}
-case 228:
+ break;
+ }
+ case 228:
#line 1243 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "minvalue";
- yyval.defelt->arg = (Node *)yyvsp[0].value;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "minvalue";
+ yyval.defelt->arg = (Node *) yyvsp[0].value;
;
- break;}
-case 229:
+ break;
+ }
+ case 229:
#line 1249 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "start";
- yyval.defelt->arg = (Node *)yyvsp[0].value;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "start";
+ yyval.defelt->arg = (Node *) yyvsp[0].value;
;
- break;}
-case 230:
+ break;
+ }
+ case 230:
#line 1256 "gram.y"
-{ yyval.value = yyvsp[0].value; ;
- break;}
-case 231:
+ {
+ yyval.value = yyvsp[0].value;;
+ break;
+ }
+ case 231:
#line 1257 "gram.y"
-{ yyval.value = yyvsp[0].value; ;
- break;}
-case 232:
+ {
+ yyval.value = yyvsp[0].value;;
+ break;
+ }
+ case 232:
#line 1260 "gram.y"
-{
- yyval.value = makeFloat(yyvsp[0].dval);
+ {
+ yyval.value = makeFloat(yyvsp[0].dval);
;
- break;}
-case 233:
+ break;
+ }
+ case 233:
#line 1264 "gram.y"
-{
- yyval.value = makeFloat(yyvsp[0].dval);
- yyval.value->val.dval = - yyval.value->val.dval;
+ {
+ yyval.value = makeFloat(yyvsp[0].dval);
+ yyval.value->val.dval = -yyval.value->val.dval;
;
- break;}
-case 234:
+ break;
+ }
+ case 234:
#line 1271 "gram.y"
-{
- yyval.value = makeInteger(yyvsp[0].ival);
+ {
+ yyval.value = makeInteger(yyvsp[0].ival);
;
- break;}
-case 235:
+ break;
+ }
+ case 235:
#line 1275 "gram.y"
-{
- yyval.value = makeInteger(yyvsp[0].ival);
- yyval.value->val.ival = - yyval.value->val.ival;
+ {
+ yyval.value = makeInteger(yyvsp[0].ival);
+ yyval.value->val.ival = -yyval.value->val.ival;
;
- break;}
-case 236:
+ break;
+ }
+ case 236:
#line 1291 "gram.y"
-{
+ {
CreatePLangStmt *n = makeNode(CreatePLangStmt);
+
n->plname = yyvsp[-4].str;
n->plhandler = yyvsp[-2].str;
n->plcompiler = yyvsp[0].str;
n->pltrusted = yyvsp[-7].boolean;
- yyval.node = (Node *)n;
- ;
- break;}
-case 237:
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 237:
#line 1301 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 238:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 238:
#line 1302 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 239:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 239:
#line 1305 "gram.y"
-{
+ {
DropPLangStmt *n = makeNode(DropPLangStmt);
+
n->plname = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 240:
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 240:
#line 1323 "gram.y"
-{
- CreateTrigStmt *n = makeNode(CreateTrigStmt);
- n->trigname = yyvsp[-11].str;
- n->relname = yyvsp[-7].str;
- n->funcname = yyvsp[-3].str;
- n->args = yyvsp[-1].list;
- n->before = yyvsp[-10].boolean;
- n->row = yyvsp[-6].boolean;
- memcpy (n->actions, yyvsp[-9].str, 4);
- yyval.node = (Node *)n;
- ;
- break;}
-case 241:
+ {
+ CreateTrigStmt *n = makeNode(CreateTrigStmt);
+
+ n->trigname = yyvsp[-11].str;
+ n->relname = yyvsp[-7].str;
+ n->funcname = yyvsp[-3].str;
+ n->args = yyvsp[-1].list;
+ n->before = yyvsp[-10].boolean;
+ n->row = yyvsp[-6].boolean;
+ memcpy(n->actions, yyvsp[-9].str, 4);
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 241:
#line 1336 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 242:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 242:
#line 1337 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 243:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 243:
#line 1341 "gram.y"
-{
- char *e = palloc (4);
- e[0] = yyvsp[0].chr; e[1] = 0; yyval.str = e;
+ {
+ char *e = palloc(4);
+
+ e[0] = yyvsp[0].chr;
+ e[1] = 0;
+ yyval.str = e;
;
- break;}
-case 244:
+ break;
+ }
+ case 244:
#line 1346 "gram.y"
-{
- char *e = palloc (4);
- e[0] = yyvsp[-2].chr; e[1] = yyvsp[0].chr; e[2] = 0; yyval.str = e;
+ {
+ char *e = palloc(4);
+
+ e[0] = yyvsp[-2].chr;
+ e[1] = yyvsp[0].chr;
+ e[2] = 0;
+ yyval.str = e;
;
- break;}
-case 245:
+ break;
+ }
+ case 245:
#line 1351 "gram.y"
-{
- char *e = palloc (4);
- e[0] = yyvsp[-4].chr; e[1] = yyvsp[-2].chr; e[2] = yyvsp[0].chr; e[3] = 0;
- yyval.str = e;
+ {
+ char *e = palloc(4);
+
+ e[0] = yyvsp[-4].chr;
+ e[1] = yyvsp[-2].chr;
+ e[2] = yyvsp[0].chr;
+ e[3] = 0;
+ yyval.str = e;
;
- break;}
-case 246:
+ break;
+ }
+ case 246:
#line 1358 "gram.y"
-{ yyval.chr = 'i'; ;
- break;}
-case 247:
+ {
+ yyval.chr = 'i';;
+ break;
+ }
+ case 247:
#line 1359 "gram.y"
-{ yyval.chr = 'd'; ;
- break;}
-case 248:
+ {
+ yyval.chr = 'd';;
+ break;
+ }
+ case 248:
#line 1360 "gram.y"
-{ yyval.chr = 'u'; ;
- break;}
-case 249:
+ {
+ yyval.chr = 'u';;
+ break;
+ }
+ case 249:
#line 1364 "gram.y"
-{
- yyval.boolean = yyvsp[0].boolean;
+ {
+ yyval.boolean = yyvsp[0].boolean;
;
- break;}
-case 250:
+ break;
+ }
+ case 250:
#line 1369 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 251:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 251:
#line 1370 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 252:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 252:
#line 1373 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 253:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 253:
#line 1374 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 254:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 254:
#line 1378 "gram.y"
-{ yyval.list = lcons(yyvsp[0].str, NIL); ;
- break;}
-case 255:
+ {
+ yyval.list = lcons(yyvsp[0].str, NIL);;
+ break;
+ }
+ case 255:
#line 1380 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].str); ;
- break;}
-case 256:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].str);;
+ break;
+ }
+ case 256:
#line 1382 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 257:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 257:
#line 1386 "gram.y"
-{
- char *s = (char *) palloc (256);
- sprintf (s, "%d", yyvsp[0].ival);
- yyval.str = s;
+ {
+ char *s = (char *) palloc(256);
+
+ sprintf(s, "%d", yyvsp[0].ival);
+ yyval.str = s;
;
- break;}
-case 258:
+ break;
+ }
+ case 258:
#line 1392 "gram.y"
-{
- char *s = (char *) palloc (256);
- sprintf (s, "%g", yyvsp[0].dval);
- yyval.str = s;
+ {
+ char *s = (char *) palloc(256);
+
+ sprintf(s, "%g", yyvsp[0].dval);
+ yyval.str = s;
;
- break;}
-case 259:
+ break;
+ }
+ case 259:
#line 1397 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 260:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 260:
#line 1398 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 261:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 261:
#line 1402 "gram.y"
-{
- DropTrigStmt *n = makeNode(DropTrigStmt);
- n->trigname = yyvsp[-2].str;
- n->relname = yyvsp[0].str;
- yyval.node = (Node *) n;
+ {
+ DropTrigStmt *n = makeNode(DropTrigStmt);
+
+ n->trigname = yyvsp[-2].str;
+ n->relname = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 262:
+ break;
+ }
+ case 262:
#line 1419 "gram.y"
-{
- yyvsp[0].dstmt->defType = yyvsp[-1].ival;
- yyval.node = (Node *)yyvsp[0].dstmt;
+ {
+ yyvsp[0].dstmt->defType = yyvsp[-1].ival;
+ yyval.node = (Node *) yyvsp[0].dstmt;
;
- break;}
-case 263:
+ break;
+ }
+ case 263:
#line 1426 "gram.y"
-{
- yyval.dstmt = makeNode(DefineStmt);
- yyval.dstmt->defname = yyvsp[-1].str;
- yyval.dstmt->definition = yyvsp[0].list;
+ {
+ yyval.dstmt = makeNode(DefineStmt);
+ yyval.dstmt->defname = yyvsp[-1].str;
+ yyval.dstmt->definition = yyvsp[0].list;
;
- break;}
-case 264:
+ break;
+ }
+ case 264:
#line 1433 "gram.y"
-{ yyval.ival = OPERATOR; ;
- break;}
-case 265:
+ {
+ yyval.ival = OPERATOR;;
+ break;
+ }
+ case 265:
#line 1434 "gram.y"
-{ yyval.ival = TYPE_P; ;
- break;}
-case 266:
+ {
+ yyval.ival = TYPE_P;;
+ break;
+ }
+ case 266:
#line 1435 "gram.y"
-{ yyval.ival = AGGREGATE; ;
- break;}
-case 267:
+ {
+ yyval.ival = AGGREGATE;;
+ break;
+ }
+ case 267:
#line 1438 "gram.y"
-{ yyval.str = "procedure"; ;
- break;}
-case 268:
+ {
+ yyval.str = "procedure";;
+ break;
+ }
+ case 268:
#line 1439 "gram.y"
-{ yyval.str = "join"; ;
- break;}
-case 269:
+ {
+ yyval.str = "join";;
+ break;
+ }
+ case 269:
#line 1440 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 270:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 270:
#line 1441 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 271:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 271:
#line 1442 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 272:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 272:
#line 1445 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 273:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 273:
#line 1448 "gram.y"
-{ yyval.list = lcons(yyvsp[0].defelt, NIL); ;
- break;}
-case 274:
+ {
+ yyval.list = lcons(yyvsp[0].defelt, NIL);;
+ break;
+ }
+ case 274:
#line 1449 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].defelt); ;
- break;}
-case 275:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].defelt);;
+ break;
+ }
+ case 275:
#line 1453 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = yyvsp[-2].str;
- yyval.defelt->arg = (Node *)yyvsp[0].node;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = yyvsp[-2].str;
+ yyval.defelt->arg = (Node *) yyvsp[0].node;
;
- break;}
-case 276:
+ break;
+ }
+ case 276:
#line 1459 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = yyvsp[0].str;
- yyval.defelt->arg = (Node *)NULL;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = yyvsp[0].str;
+ yyval.defelt->arg = (Node *) NULL;
;
- break;}
-case 277:
+ break;
+ }
+ case 277:
#line 1465 "gram.y"
-{
- yyval.defelt = makeNode(DefElem);
- yyval.defelt->defname = "default";
- yyval.defelt->arg = (Node *)yyvsp[0].node;
+ {
+ yyval.defelt = makeNode(DefElem);
+ yyval.defelt->defname = "default";
+ yyval.defelt->arg = (Node *) yyvsp[0].node;
;
- break;}
-case 278:
+ break;
+ }
+ case 278:
#line 1472 "gram.y"
-{ yyval.node = (Node *)makeString(yyvsp[0].str); ;
- break;}
-case 279:
+ {
+ yyval.node = (Node *) makeString(yyvsp[0].str);;
+ break;
+ }
+ case 279:
#line 1473 "gram.y"
-{ yyval.node = (Node *)makeString(yyvsp[0].str); ;
- break;}
-case 280:
+ {
+ yyval.node = (Node *) makeString(yyvsp[0].str);;
+ break;
+ }
+ case 280:
#line 1474 "gram.y"
-{ yyval.node = (Node *)yyvsp[0].value; ;
- break;}
-case 281:
+ {
+ yyval.node = (Node *) yyvsp[0].value;;
+ break;
+ }
+ case 281:
#line 1475 "gram.y"
-{ yyval.node = (Node *)makeString(yyvsp[0].str); ;
- break;}
-case 282:
+ {
+ yyval.node = (Node *) makeString(yyvsp[0].str);;
+ break;
+ }
+ case 282:
#line 1477 "gram.y"
-{
- TypeName *n = makeNode(TypeName);
- n->name = yyvsp[0].str;
- n->setof = TRUE;
- n->arrayBounds = NULL;
- n->typmod = -1;
- yyval.node = (Node *)n;
- ;
- break;}
-case 283:
+ {
+ TypeName *n = makeNode(TypeName);
+
+ n->name = yyvsp[0].str;
+ n->setof = TRUE;
+ n->arrayBounds = NULL;
+ n->typmod = -1;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 283:
#line 1496 "gram.y"
-{
- DestroyStmt *n = makeNode(DestroyStmt);
- n->relNames = yyvsp[0].list;
- n->sequence = FALSE;
- yyval.node = (Node *)n;
+ {
+ DestroyStmt *n = makeNode(DestroyStmt);
+
+ n->relNames = yyvsp[0].list;
+ n->sequence = FALSE;
+ yyval.node = (Node *) n;
;
- break;}
-case 284:
+ break;
+ }
+ case 284:
#line 1503 "gram.y"
-{
- DestroyStmt *n = makeNode(DestroyStmt);
- n->relNames = yyvsp[0].list;
- n->sequence = TRUE;
- yyval.node = (Node *)n;
+ {
+ DestroyStmt *n = makeNode(DestroyStmt);
+
+ n->relNames = yyvsp[0].list;
+ n->sequence = TRUE;
+ yyval.node = (Node *) n;
;
- break;}
-case 285:
+ break;
+ }
+ case 285:
#line 1520 "gram.y"
-{
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = yyvsp[-2].ival;
- n->howMany = yyvsp[-1].ival;
- n->portalname = yyvsp[0].str;
- n->ismove = false;
- yyval.node = (Node *)n;
- ;
- break;}
-case 286:
+ {
+ FetchStmt *n = makeNode(FetchStmt);
+
+ n->direction = yyvsp[-2].ival;
+ n->howMany = yyvsp[-1].ival;
+ n->portalname = yyvsp[0].str;
+ n->ismove = false;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 286:
#line 1529 "gram.y"
-{
- FetchStmt *n = makeNode(FetchStmt);
- n->direction = yyvsp[-2].ival;
- n->howMany = yyvsp[-1].ival;
- n->portalname = yyvsp[0].str;
- n->ismove = TRUE;
- yyval.node = (Node *)n;
- ;
- break;}
-case 287:
+ {
+ FetchStmt *n = makeNode(FetchStmt);
+
+ n->direction = yyvsp[-2].ival;
+ n->howMany = yyvsp[-1].ival;
+ n->portalname = yyvsp[0].str;
+ n->ismove = TRUE;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 287:
#line 1539 "gram.y"
-{ yyval.ival = FORWARD; ;
- break;}
-case 288:
+ {
+ yyval.ival = FORWARD;;
+ break;
+ }
+ case 288:
#line 1540 "gram.y"
-{ yyval.ival = BACKWARD; ;
- break;}
-case 289:
+ {
+ yyval.ival = BACKWARD;;
+ break;
+ }
+ case 289:
#line 1541 "gram.y"
-{ yyval.ival = FORWARD; /* default */ ;
- break;}
-case 290:
+ {
+ yyval.ival = FORWARD; /* default */ ;
+ break;
+ }
+ case 290:
#line 1545 "gram.y"
-{ yyval.ival = yyvsp[0].ival;
- if (yyvsp[0].ival <= 0) elog(ERROR,"Please specify nonnegative count for fetch"); ;
- break;}
-case 291:
+ {
+ yyval.ival = yyvsp[0].ival;
+ if (yyvsp[0].ival <= 0)
+ elog(ERROR, "Please specify nonnegative count for fetch");;
+ break;
+ }
+ case 291:
#line 1547 "gram.y"
-{ yyval.ival = 0; /* 0 means fetch all tuples*/ ;
- break;}
-case 292:
+ {
+ yyval.ival = 0; /* 0 means fetch all tuples */ ;
+ break;
+ }
+ case 292:
#line 1548 "gram.y"
-{ yyval.ival = 1; /*default*/ ;
- break;}
-case 293:
+ {
+ yyval.ival = 1; /* default */ ;
+ break;
+ }
+ case 293:
#line 1551 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 294:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 294:
#line 1552 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 295:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 295:
#line 1564 "gram.y"
-{
- yyval.node = (Node*)makeAclStmt(yyvsp[-5].str,yyvsp[-3].list,yyvsp[-1].str,'+');
+ {
+ yyval.node = (Node *) makeAclStmt(yyvsp[-5].str, yyvsp[-3].list, yyvsp[-1].str, '+');
;
- break;}
-case 296:
+ break;
+ }
+ case 296:
#line 1570 "gram.y"
-{
- yyval.str = aclmakepriv("rwaR",0);
+ {
+ yyval.str = aclmakepriv("rwaR", 0);
;
- break;}
-case 297:
+ break;
+ }
+ case 297:
#line 1574 "gram.y"
-{
- yyval.str = aclmakepriv("rwaR",0);
+ {
+ yyval.str = aclmakepriv("rwaR", 0);
;
- break;}
-case 298:
+ break;
+ }
+ case 298:
#line 1578 "gram.y"
-{
- yyval.str = yyvsp[0].str;
+ {
+ yyval.str = yyvsp[0].str;
;
- break;}
-case 299:
+ break;
+ }
+ case 299:
#line 1584 "gram.y"
-{
- yyval.str = aclmakepriv("",yyvsp[0].chr);
+ {
+ yyval.str = aclmakepriv("", yyvsp[0].chr);
;
- break;}
-case 300:
+ break;
+ }
+ case 300:
#line 1588 "gram.y"
-{
- yyval.str = aclmakepriv(yyvsp[-2].str,yyvsp[0].chr);
+ {
+ yyval.str = aclmakepriv(yyvsp[-2].str, yyvsp[0].chr);
;
- break;}
-case 301:
+ break;
+ }
+ case 301:
#line 1594 "gram.y"
-{
- yyval.chr = ACL_MODE_RD_CHR;
+ {
+ yyval.chr = ACL_MODE_RD_CHR;
;
- break;}
-case 302:
+ break;
+ }
+ case 302:
#line 1598 "gram.y"
-{
- yyval.chr = ACL_MODE_AP_CHR;
+ {
+ yyval.chr = ACL_MODE_AP_CHR;
;
- break;}
-case 303:
+ break;
+ }
+ case 303:
#line 1602 "gram.y"
-{
- yyval.chr = ACL_MODE_WR_CHR;
+ {
+ yyval.chr = ACL_MODE_WR_CHR;
;
- break;}
-case 304:
+ break;
+ }
+ case 304:
#line 1606 "gram.y"
-{
- yyval.chr = ACL_MODE_WR_CHR;
+ {
+ yyval.chr = ACL_MODE_WR_CHR;
;
- break;}
-case 305:
+ break;
+ }
+ case 305:
#line 1610 "gram.y"
-{
- yyval.chr = ACL_MODE_RU_CHR;
+ {
+ yyval.chr = ACL_MODE_RU_CHR;
;
- break;}
-case 306:
+ break;
+ }
+ case 306:
#line 1616 "gram.y"
-{
- yyval.str = aclmakeuser("A","");
+ {
+ yyval.str = aclmakeuser("A", "");
;
- break;}
-case 307:
+ break;
+ }
+ case 307:
#line 1620 "gram.y"
-{
- yyval.str = aclmakeuser("G",yyvsp[0].str);
+ {
+ yyval.str = aclmakeuser("G", yyvsp[0].str);
;
- break;}
-case 308:
+ break;
+ }
+ case 308:
#line 1624 "gram.y"
-{
- yyval.str = aclmakeuser("U",yyvsp[0].str);
+ {
+ yyval.str = aclmakeuser("U", yyvsp[0].str);
;
- break;}
-case 309:
+ break;
+ }
+ case 309:
#line 1630 "gram.y"
-{
- yyerror("WITH GRANT OPTION is not supported. Only relation owners can set privileges");
- ;
- break;}
-case 311:
+ {
+ yyerror("WITH GRANT OPTION is not supported. Only relation owners can set privileges");
+ ;
+ break;
+ }
+ case 311:
#line 1645 "gram.y"
-{
- yyval.node = (Node*)makeAclStmt(yyvsp[-4].str,yyvsp[-2].list,yyvsp[0].str,'-');
+ {
+ yyval.node = (Node *) makeAclStmt(yyvsp[-4].str, yyvsp[-2].list, yyvsp[0].str, '-');
;
- break;}
-case 312:
+ break;
+ }
+ case 312:
#line 1663 "gram.y"
-{
- /* should check that access_method is valid,
- etc ... but doesn't */
- IndexStmt *n = makeNode(IndexStmt);
- n->unique = yyvsp[-9].boolean;
- n->idxname = yyvsp[-7].str;
- n->relname = yyvsp[-5].str;
- n->accessMethod = yyvsp[-4].str;
- n->indexParams = yyvsp[-2].list;
- n->withClause = yyvsp[0].list;
- n->whereClause = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 313:
+ {
+
+ /*
+ * should check that access_method is valid, etc ... but
+ * doesn't
+ */
+ IndexStmt *n = makeNode(IndexStmt);
+
+ n->unique = yyvsp[-9].boolean;
+ n->idxname = yyvsp[-7].str;
+ n->relname = yyvsp[-5].str;
+ n->accessMethod = yyvsp[-4].str;
+ n->indexParams = yyvsp[-2].list;
+ n->withClause = yyvsp[0].list;
+ n->whereClause = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 313:
#line 1678 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 314:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 314:
#line 1679 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 315:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 315:
#line 1682 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 316:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 316:
#line 1683 "gram.y"
-{ yyval.str = "btree"; ;
- break;}
-case 317:
+ {
+ yyval.str = "btree";;
+ break;
+ }
+ case 317:
#line 1686 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 318:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 318:
#line 1687 "gram.y"
-{ yyval.list = lcons(yyvsp[0].ielem,NIL); ;
- break;}
-case 319:
+ {
+ yyval.list = lcons(yyvsp[0].ielem, NIL);;
+ break;
+ }
+ case 319:
#line 1690 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].ielem); ;
- break;}
-case 320:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].ielem);;
+ break;
+ }
+ case 320:
#line 1691 "gram.y"
-{ yyval.list = lcons(yyvsp[0].ielem, NIL); ;
- break;}
-case 321:
+ {
+ yyval.list = lcons(yyvsp[0].ielem, NIL);;
+ break;
+ }
+ case 321:
#line 1695 "gram.y"
-{
- yyval.ielem = makeNode(IndexElem);
- yyval.ielem->name = yyvsp[-5].str;
- yyval.ielem->args = yyvsp[-3].list;
- yyval.ielem->class = yyvsp[0].str;
- yyval.ielem->typename = yyvsp[-1].typnam;
- ;
- break;}
-case 322:
+ {
+ yyval.ielem = makeNode(IndexElem);
+ yyval.ielem->name = yyvsp[-5].str;
+ yyval.ielem->args = yyvsp[-3].list;
+ yyval.ielem->class = yyvsp[0].str;
+ yyval.ielem->typename = yyvsp[-1].typnam;
+ ;
+ break;
+ }
+ case 322:
#line 1705 "gram.y"
-{
- yyval.ielem = makeNode(IndexElem);
- yyval.ielem->name = yyvsp[-2].str;
- yyval.ielem->args = NIL;
- yyval.ielem->class = yyvsp[0].str;
- yyval.ielem->typename = yyvsp[-1].typnam;
- ;
- break;}
-case 323:
+ {
+ yyval.ielem = makeNode(IndexElem);
+ yyval.ielem->name = yyvsp[-2].str;
+ yyval.ielem->args = NIL;
+ yyval.ielem->class = yyvsp[0].str;
+ yyval.ielem->typename = yyvsp[-1].typnam;
+ ;
+ break;
+ }
+ case 323:
#line 1714 "gram.y"
-{ yyval.typnam = yyvsp[0].typnam; ;
- break;}
-case 324:
+ {
+ yyval.typnam = yyvsp[0].typnam;;
+ break;
+ }
+ case 324:
#line 1715 "gram.y"
-{ yyval.typnam = yyvsp[0].typnam; ;
- break;}
-case 325:
+ {
+ yyval.typnam = yyvsp[0].typnam;;
+ break;
+ }
+ case 325:
#line 1716 "gram.y"
-{ yyval.typnam = NULL; ;
- break;}
-case 326:
+ {
+ yyval.typnam = NULL;;
+ break;
+ }
+ case 326:
#line 1725 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 327:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 327:
#line 1726 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 328:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 328:
#line 1727 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 329:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 329:
#line 1739 "gram.y"
-{
- ExtendStmt *n = makeNode(ExtendStmt);
- n->idxname = yyvsp[-1].str;
- n->whereClause = yyvsp[0].node;
- yyval.node = (Node *)n;
+ {
+ ExtendStmt *n = makeNode(ExtendStmt);
+
+ n->idxname = yyvsp[-1].str;
+ n->whereClause = yyvsp[0].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 330:
+ break;
+ }
+ case 330:
#line 1756 "gram.y"
-{
- RecipeStmt *n;
- if (!IsTransactionBlock())
- elog(ERROR,"EXECUTE RECIPE may only be used in begin/end transaction blocks");
+ {
+ RecipeStmt *n;
- n = makeNode(RecipeStmt);
- n->recipeName = yyvsp[0].str;
- yyval.node = (Node *)n;
+ if (!IsTransactionBlock())
+ elog(ERROR, "EXECUTE RECIPE may only be used in begin/end transaction blocks");
+
+ n = makeNode(RecipeStmt);
+ n->recipeName = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 331:
+ break;
+ }
+ case 331:
#line 1786 "gram.y"
-{
- ProcedureStmt *n = makeNode(ProcedureStmt);
- n->funcname = yyvsp[-8].str;
- n->defArgs = yyvsp[-7].list;
- n->returnType = yyvsp[-5].node;
- n->withClause = yyvsp[-4].list;
- n->as = yyvsp[-2].str;
- n->language = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 332:
+ {
+ ProcedureStmt *n = makeNode(ProcedureStmt);
+
+ n->funcname = yyvsp[-8].str;
+ n->defArgs = yyvsp[-7].list;
+ n->returnType = yyvsp[-5].node;
+ n->withClause = yyvsp[-4].list;
+ n->as = yyvsp[-2].str;
+ n->language = yyvsp[0].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 332:
#line 1797 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 333:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 333:
#line 1798 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 334:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 334:
#line 1801 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 335:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 335:
#line 1802 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 336:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 336:
#line 1806 "gram.y"
-{ yyval.list = lcons(makeString(yyvsp[0].str),NIL); ;
- break;}
-case 337:
+ {
+ yyval.list = lcons(makeString(yyvsp[0].str), NIL);;
+ break;
+ }
+ case 337:
#line 1808 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list,makeString(yyvsp[0].str)); ;
- break;}
-case 338:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString(yyvsp[0].str));;
+ break;
+ }
+ case 338:
#line 1812 "gram.y"
-{
- TypeName *n = makeNode(TypeName);
- n->name = yyvsp[0].str;
- n->setof = yyvsp[-1].boolean;
- n->arrayBounds = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 339:
+ {
+ TypeName *n = makeNode(TypeName);
+
+ n->name = yyvsp[0].str;
+ n->setof = yyvsp[-1].boolean;
+ n->arrayBounds = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 339:
#line 1821 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 340:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 340:
#line 1822 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 341:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 341:
#line 1843 "gram.y"
-{
- RemoveStmt *n = makeNode(RemoveStmt);
- n->removeType = yyvsp[-1].ival;
- n->name = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ RemoveStmt *n = makeNode(RemoveStmt);
+
+ n->removeType = yyvsp[-1].ival;
+ n->name = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 342:
+ break;
+ }
+ case 342:
#line 1851 "gram.y"
-{ yyval.ival = TYPE_P; ;
- break;}
-case 343:
+ {
+ yyval.ival = TYPE_P;;
+ break;
+ }
+ case 343:
#line 1852 "gram.y"
-{ yyval.ival = INDEX; ;
- break;}
-case 344:
+ {
+ yyval.ival = INDEX;;
+ break;
+ }
+ case 344:
#line 1853 "gram.y"
-{ yyval.ival = RULE; ;
- break;}
-case 345:
+ {
+ yyval.ival = RULE;;
+ break;
+ }
+ case 345:
#line 1854 "gram.y"
-{ yyval.ival = VIEW; ;
- break;}
-case 346:
+ {
+ yyval.ival = VIEW;;
+ break;
+ }
+ case 346:
#line 1859 "gram.y"
-{
- RemoveAggrStmt *n = makeNode(RemoveAggrStmt);
- n->aggname = yyvsp[-1].str;
- n->aggtype = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ RemoveAggrStmt *n = makeNode(RemoveAggrStmt);
+
+ n->aggname = yyvsp[-1].str;
+ n->aggtype = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 347:
+ break;
+ }
+ case 347:
#line 1867 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 348:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 348:
#line 1868 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 349:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 349:
#line 1873 "gram.y"
-{
- RemoveFuncStmt *n = makeNode(RemoveFuncStmt);
- n->funcname = yyvsp[-1].str;
- n->args = yyvsp[0].list;
- yyval.node = (Node *)n;
+ {
+ RemoveFuncStmt *n = makeNode(RemoveFuncStmt);
+
+ n->funcname = yyvsp[-1].str;
+ n->args = yyvsp[0].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 350:
+ break;
+ }
+ case 350:
#line 1883 "gram.y"
-{
- RemoveOperStmt *n = makeNode(RemoveOperStmt);
- n->opname = yyvsp[-3].str;
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ RemoveOperStmt *n = makeNode(RemoveOperStmt);
+
+ n->opname = yyvsp[-3].str;
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 353:
+ break;
+ }
+ case 353:
#line 1893 "gram.y"
-{ yyval.str = "+"; ;
- break;}
-case 354:
+ {
+ yyval.str = "+";;
+ break;
+ }
+ case 354:
#line 1894 "gram.y"
-{ yyval.str = "-"; ;
- break;}
-case 355:
+ {
+ yyval.str = "-";;
+ break;
+ }
+ case 355:
#line 1895 "gram.y"
-{ yyval.str = "*"; ;
- break;}
-case 356:
+ {
+ yyval.str = "*";;
+ break;
+ }
+ case 356:
#line 1896 "gram.y"
-{ yyval.str = "/"; ;
- break;}
-case 357:
+ {
+ yyval.str = "/";;
+ break;
+ }
+ case 357:
#line 1897 "gram.y"
-{ yyval.str = "<"; ;
- break;}
-case 358:
+ {
+ yyval.str = "<";;
+ break;
+ }
+ case 358:
#line 1898 "gram.y"
-{ yyval.str = ">"; ;
- break;}
-case 359:
+ {
+ yyval.str = ">";;
+ break;
+ }
+ case 359:
#line 1899 "gram.y"
-{ yyval.str = "="; ;
- break;}
-case 360:
+ {
+ yyval.str = "=";;
+ break;
+ }
+ case 360:
#line 1903 "gram.y"
-{
- elog(ERROR,"parser: argument type missing (use NONE for unary operators)");
+ {
+ elog(ERROR, "parser: argument type missing (use NONE for unary operators)");
;
- break;}
-case 361:
+ break;
+ }
+ case 361:
#line 1907 "gram.y"
-{ yyval.list = makeList(makeString(yyvsp[-2].str), makeString(yyvsp[0].str), -1); ;
- break;}
-case 362:
+ {
+ yyval.list = makeList(makeString(yyvsp[-2].str), makeString(yyvsp[0].str), -1);;
+ break;
+ }
+ case 362:
#line 1909 "gram.y"
-{ yyval.list = makeList(NULL, makeString(yyvsp[0].str), -1); ;
- break;}
-case 363:
+ {
+ yyval.list = makeList(NULL, makeString(yyvsp[0].str), -1);;
+ break;
+ }
+ case 363:
#line 1911 "gram.y"
-{ yyval.list = makeList(makeString(yyvsp[-2].str), NULL, -1); ;
- break;}
-case 364:
+ {
+ yyval.list = makeList(makeString(yyvsp[-2].str), NULL, -1);;
+ break;
+ }
+ case 364:
#line 1925 "gram.y"
-{
- RenameStmt *n = makeNode(RenameStmt);
- n->relname = yyvsp[-6].str;
- n->inh = yyvsp[-5].boolean;
- n->column = yyvsp[-2].str;
- n->newname = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 365:
+ {
+ RenameStmt *n = makeNode(RenameStmt);
+
+ n->relname = yyvsp[-6].str;
+ n->inh = yyvsp[-5].boolean;
+ n->column = yyvsp[-2].str;
+ n->newname = yyvsp[0].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 365:
#line 1935 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 366:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 366:
#line 1936 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 367:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 367:
#line 1939 "gram.y"
-{ yyval.ival = COLUMN; ;
- break;}
-case 368:
+ {
+ yyval.ival = COLUMN;;
+ break;
+ }
+ case 368:
#line 1940 "gram.y"
-{ yyval.ival = 0; ;
- break;}
-case 369:
+ {
+ yyval.ival = 0;;
+ break;
+ }
+ case 369:
#line 1954 "gram.y"
-{ QueryIsRule=TRUE; ;
- break;}
-case 370:
+ {
+ QueryIsRule = TRUE;;
+ break;
+ }
+ case 370:
#line 1957 "gram.y"
-{
- RuleStmt *n = makeNode(RuleStmt);
- n->rulename = yyvsp[-10].str;
- n->event = yyvsp[-6].ival;
- n->object = yyvsp[-4].attr;
- n->whereClause = yyvsp[-3].node;
- n->instead = yyvsp[-1].boolean;
- n->actions = yyvsp[0].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 371:
+ {
+ RuleStmt *n = makeNode(RuleStmt);
+
+ n->rulename = yyvsp[-10].str;
+ n->event = yyvsp[-6].ival;
+ n->object = yyvsp[-4].attr;
+ n->whereClause = yyvsp[-3].node;
+ n->instead = yyvsp[-1].boolean;
+ n->actions = yyvsp[0].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 371:
#line 1969 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 372:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 372:
#line 1970 "gram.y"
-{ yyval.list = lcons(yyvsp[0].node, NIL); ;
- break;}
-case 373:
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 373:
#line 1971 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 374:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 374:
#line 1972 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 375:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 375:
#line 1976 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 376:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 376:
#line 1978 "gram.y"
-{ yyval.list = lcons(yyvsp[0].node, NIL); ;
- break;}
-case 377:
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 377:
#line 1982 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[-1].node); ;
- break;}
-case 378:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[-1].node);;
+ break;
+ }
+ case 378:
#line 1984 "gram.y"
-{ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].node); ;
- break;}
-case 379:
+ {
+ yyval.list = lappend(yyvsp[-1].list, yyvsp[0].node);;
+ break;
+ }
+ case 379:
#line 1986 "gram.y"
-{ yyval.list = lcons(yyvsp[-1].node, NIL); ;
- break;}
-case 380:
+ {
+ yyval.list = lcons(yyvsp[-1].node, NIL);;
+ break;
+ }
+ case 380:
#line 1990 "gram.y"
-{
- yyval.attr = makeNode(Attr);
- yyval.attr->relname = yyvsp[-2].str;
- yyval.attr->paramNo = NULL;
- yyval.attr->attrs = lcons(makeString(yyvsp[0].str), NIL);
- yyval.attr->indirection = NIL;
- ;
- break;}
-case 381:
+ {
+ yyval.attr = makeNode(Attr);
+ yyval.attr->relname = yyvsp[-2].str;
+ yyval.attr->paramNo = NULL;
+ yyval.attr->attrs = lcons(makeString(yyvsp[0].str), NIL);
+ yyval.attr->indirection = NIL;
+ ;
+ break;
+ }
+ case 381:
#line 1998 "gram.y"
-{
- yyval.attr = makeNode(Attr);
- yyval.attr->relname = yyvsp[0].str;
- yyval.attr->paramNo = NULL;
- yyval.attr->attrs = NIL;
- yyval.attr->indirection = NIL;
- ;
- break;}
-case 382:
+ {
+ yyval.attr = makeNode(Attr);
+ yyval.attr->relname = yyvsp[0].str;
+ yyval.attr->paramNo = NULL;
+ yyval.attr->attrs = NIL;
+ yyval.attr->indirection = NIL;
+ ;
+ break;
+ }
+ case 382:
#line 2008 "gram.y"
-{ yyval.ival = CMD_SELECT; ;
- break;}
-case 383:
+ {
+ yyval.ival = CMD_SELECT;;
+ break;
+ }
+ case 383:
#line 2009 "gram.y"
-{ yyval.ival = CMD_UPDATE; ;
- break;}
-case 384:
+ {
+ yyval.ival = CMD_UPDATE;;
+ break;
+ }
+ case 384:
#line 2010 "gram.y"
-{ yyval.ival = CMD_DELETE; ;
- break;}
-case 385:
+ {
+ yyval.ival = CMD_DELETE;;
+ break;
+ }
+ case 385:
#line 2011 "gram.y"
-{ yyval.ival = CMD_INSERT; ;
- break;}
-case 386:
+ {
+ yyval.ival = CMD_INSERT;;
+ break;
+ }
+ case 386:
#line 2014 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 387:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 387:
#line 2015 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 388:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 388:
#line 2028 "gram.y"
-{
- NotifyStmt *n = makeNode(NotifyStmt);
- n->relname = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ NotifyStmt *n = makeNode(NotifyStmt);
+
+ n->relname = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 389:
+ break;
+ }
+ case 389:
#line 2036 "gram.y"
-{
- ListenStmt *n = makeNode(ListenStmt);
- n->relname = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ ListenStmt *n = makeNode(ListenStmt);
+
+ n->relname = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 390:
+ break;
+ }
+ case 390:
#line 2044 "gram.y"
-{
- UnlistenStmt *n = makeNode(UnlistenStmt);
- n->relname = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ UnlistenStmt *n = makeNode(UnlistenStmt);
+
+ n->relname = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 391:
+ break;
+ }
+ case 391:
#line 2066 "gram.y"
-{
- TransactionStmt *n = makeNode(TransactionStmt);
- n->command = ABORT_TRANS;
- yyval.node = (Node *)n;
+ {
+ TransactionStmt *n = makeNode(TransactionStmt);
+
+ n->command = ABORT_TRANS;
+ yyval.node = (Node *) n;
;
- break;}
-case 392:
+ break;
+ }
+ case 392:
#line 2072 "gram.y"
-{
- TransactionStmt *n = makeNode(TransactionStmt);
- n->command = BEGIN_TRANS;
- yyval.node = (Node *)n;
+ {
+ TransactionStmt *n = makeNode(TransactionStmt);
+
+ n->command = BEGIN_TRANS;
+ yyval.node = (Node *) n;
;
- break;}
-case 393:
+ break;
+ }
+ case 393:
#line 2078 "gram.y"
-{
- TransactionStmt *n = makeNode(TransactionStmt);
- n->command = END_TRANS;
- yyval.node = (Node *)n;
+ {
+ TransactionStmt *n = makeNode(TransactionStmt);
+
+ n->command = END_TRANS;
+ yyval.node = (Node *) n;
;
- break;}
-case 394:
+ break;
+ }
+ case 394:
#line 2084 "gram.y"
-{
- TransactionStmt *n = makeNode(TransactionStmt);
- n->command = END_TRANS;
- yyval.node = (Node *)n;
+ {
+ TransactionStmt *n = makeNode(TransactionStmt);
+
+ n->command = END_TRANS;
+ yyval.node = (Node *) n;
;
- break;}
-case 395:
+ break;
+ }
+ case 395:
#line 2090 "gram.y"
-{
- TransactionStmt *n = makeNode(TransactionStmt);
- n->command = ABORT_TRANS;
- yyval.node = (Node *)n;
+ {
+ TransactionStmt *n = makeNode(TransactionStmt);
+
+ n->command = ABORT_TRANS;
+ yyval.node = (Node *) n;
;
- break;}
-case 396:
+ break;
+ }
+ case 396:
#line 2097 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 397:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 397:
#line 2098 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 398:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 398:
#line 2099 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 399:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 399:
#line 2111 "gram.y"
-{
- ViewStmt *n = makeNode(ViewStmt);
- n->viewname = yyvsp[-2].str;
- n->query = (Query *)yyvsp[0].node;
- if (((SelectStmt *)n->query)->sortClause != NULL)
- elog(ERROR,"Order by and Distinct on views is not implemented.");
- if (((SelectStmt *)n->query)->unionClause != NULL)
- elog(ERROR,"Views on unions not implemented.");
- yyval.node = (Node *)n;
- ;
- break;}
-case 400:
+ {
+ ViewStmt *n = makeNode(ViewStmt);
+
+ n->viewname = yyvsp[-2].str;
+ n->query = (Query *) yyvsp[0].node;
+ if (((SelectStmt *) n->query)->sortClause != NULL)
+ elog(ERROR, "Order by and Distinct on views is not implemented.");
+ if (((SelectStmt *) n->query)->unionClause != NULL)
+ elog(ERROR, "Views on unions not implemented.");
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 400:
#line 2132 "gram.y"
-{
- LoadStmt *n = makeNode(LoadStmt);
- n->filename = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ LoadStmt *n = makeNode(LoadStmt);
+
+ n->filename = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 401:
+ break;
+ }
+ case 401:
#line 2148 "gram.y"
-{
- CreatedbStmt *n = makeNode(CreatedbStmt);
- if (yyvsp[-1].str == NULL && yyvsp[0].str == NULL) {
- elog(ERROR, "CREATE DATABASE WITH requires at least an option");
- }
- n->dbname = yyvsp[-3].str;
- n->dbpath = yyvsp[-1].str;
+ {
+ CreatedbStmt *n = makeNode(CreatedbStmt);
+
+ if (yyvsp[-1].str == NULL && yyvsp[0].str == NULL)
+ elog(ERROR, "CREATE DATABASE WITH requires at least an option");
+ n->dbname = yyvsp[-3].str;
+ n->dbpath = yyvsp[-1].str;
#ifdef MULTIBYTE
- if (yyvsp[0].str != NULL) {
- n->encoding = pg_char_to_encoding(yyvsp[0].str);
- if (n->encoding < 0) {
- elog(ERROR, "invalid encoding name %s", yyvsp[0].str);
- }
- } else {
- n->encoding = GetTemplateEncoding();
- }
+ if (yyvsp[0].str != NULL)
+ {
+ n->encoding = pg_char_to_encoding(yyvsp[0].str);
+ if (n->encoding < 0)
+ elog(ERROR, "invalid encoding name %s", yyvsp[0].str);
+ }
+ else
+ n->encoding = GetTemplateEncoding();
#else
- if (yyvsp[0].str != NULL)
- elog(ERROR, "WITH ENCODING is not supported");
- n->encoding = 0;
+ if (yyvsp[0].str != NULL)
+ elog(ERROR, "WITH ENCODING is not supported");
+ n->encoding = 0;
#endif
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 402:
+ break;
+ }
+ case 402:
#line 2172 "gram.y"
-{
- CreatedbStmt *n = makeNode(CreatedbStmt);
- n->dbname = yyvsp[0].str;
- n->dbpath = NULL;
+ {
+ CreatedbStmt *n = makeNode(CreatedbStmt);
+
+ n->dbname = yyvsp[0].str;
+ n->dbpath = NULL;
#ifdef MULTIBYTE
- n->encoding = GetTemplateEncoding();
+ n->encoding = GetTemplateEncoding();
#else
- n->encoding = 0;
+ n->encoding = 0;
#endif
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 403:
+ break;
+ }
+ case 403:
#line 2185 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 404:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 404:
#line 2186 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 405:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 405:
#line 2189 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 406:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 406:
#line 2190 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 407:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 407:
#line 2193 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 408:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 408:
#line 2194 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 409:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 409:
#line 2195 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 410:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 410:
#line 2198 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 411:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 411:
#line 2199 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 412:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 412:
#line 2200 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 413:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 413:
#line 2211 "gram.y"
-{
- DestroydbStmt *n = makeNode(DestroydbStmt);
- n->dbname = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ DestroydbStmt *n = makeNode(DestroydbStmt);
+
+ n->dbname = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 414:
+ break;
+ }
+ case 414:
#line 2227 "gram.y"
-{
- ClusterStmt *n = makeNode(ClusterStmt);
- n->relname = yyvsp[0].str;
- n->indexname = yyvsp[-2].str;
- yyval.node = (Node*)n;
+ {
+ ClusterStmt *n = makeNode(ClusterStmt);
+
+ n->relname = yyvsp[0].str;
+ n->indexname = yyvsp[-2].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 415:
+ break;
+ }
+ case 415:
#line 2244 "gram.y"
-{
- VacuumStmt *n = makeNode(VacuumStmt);
- n->verbose = yyvsp[-1].boolean;
- n->analyze = yyvsp[0].boolean;
- n->vacrel = NULL;
- n->va_spec = NIL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 416:
+ {
+ VacuumStmt *n = makeNode(VacuumStmt);
+
+ n->verbose = yyvsp[-1].boolean;
+ n->analyze = yyvsp[0].boolean;
+ n->vacrel = NULL;
+ n->va_spec = NIL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 416:
#line 2253 "gram.y"
-{
- VacuumStmt *n = makeNode(VacuumStmt);
- n->verbose = yyvsp[-3].boolean;
- n->analyze = yyvsp[-2].boolean;
- n->vacrel = yyvsp[-1].str;
- n->va_spec = yyvsp[0].list;
- if ( yyvsp[0].list != NIL && !yyvsp[-1].str )
- elog(ERROR,"parser: syntax error at or near \"(\"");
- yyval.node = (Node *)n;
- ;
- break;}
-case 417:
+ {
+ VacuumStmt *n = makeNode(VacuumStmt);
+
+ n->verbose = yyvsp[-3].boolean;
+ n->analyze = yyvsp[-2].boolean;
+ n->vacrel = yyvsp[-1].str;
+ n->va_spec = yyvsp[0].list;
+ if (yyvsp[0].list != NIL && !yyvsp[-1].str)
+ elog(ERROR, "parser: syntax error at or near \"(\"");
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 417:
#line 2265 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 418:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 418:
#line 2266 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 419:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 419:
#line 2269 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 420:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 420:
#line 2270 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 421:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 421:
#line 2273 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 422:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 422:
#line 2274 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 423:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 423:
#line 2278 "gram.y"
-{ yyval.list=lcons(yyvsp[0].str,NIL); ;
- break;}
-case 424:
+ {
+ yyval.list = lcons(yyvsp[0].str, NIL);;
+ break;
+ }
+ case 424:
#line 2280 "gram.y"
-{ yyval.list=lappend(yyvsp[-2].list,yyvsp[0].str); ;
- break;}
-case 425:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].str);;
+ break;
+ }
+ case 425:
#line 2292 "gram.y"
-{
- ExplainStmt *n = makeNode(ExplainStmt);
- n->verbose = yyvsp[-1].boolean;
- n->query = (Query*)yyvsp[0].node;
- yyval.node = (Node *)n;
+ {
+ ExplainStmt *n = makeNode(ExplainStmt);
+
+ n->verbose = yyvsp[-1].boolean;
+ n->query = (Query *) yyvsp[0].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 432:
+ break;
+ }
+ case 432:
#line 2329 "gram.y"
-{
- yyvsp[0].astmt->relname = yyvsp[-2].str;
- yyvsp[0].astmt->cols = yyvsp[-1].list;
- yyval.node = (Node *)yyvsp[0].astmt;
+ {
+ yyvsp[0].astmt->relname = yyvsp[-2].str;
+ yyvsp[0].astmt->cols = yyvsp[-1].list;
+ yyval.node = (Node *) yyvsp[0].astmt;
;
- break;}
-case 433:
+ break;
+ }
+ case 433:
#line 2337 "gram.y"
-{
- yyval.astmt = makeNode(InsertStmt);
- yyval.astmt->unique = NULL;
- yyval.astmt->targetList = yyvsp[-1].list;
- yyval.astmt->fromClause = NIL;
- yyval.astmt->whereClause = NULL;
- yyval.astmt->groupClause = NIL;
- yyval.astmt->havingClause = NULL;
- yyval.astmt->unionClause = NIL;
- ;
- break;}
-case 434:
+ {
+ yyval.astmt = makeNode(InsertStmt);
+ yyval.astmt->unique = NULL;
+ yyval.astmt->targetList = yyvsp[-1].list;
+ yyval.astmt->fromClause = NIL;
+ yyval.astmt->whereClause = NULL;
+ yyval.astmt->groupClause = NIL;
+ yyval.astmt->havingClause = NULL;
+ yyval.astmt->unionClause = NIL;
+ ;
+ break;
+ }
+ case 434:
#line 2351 "gram.y"
-{
- yyval.astmt = makeNode(InsertStmt);
- yyval.astmt->unique = yyvsp[-6].str;
- yyval.astmt->targetList = yyvsp[-5].list;
- yyval.astmt->fromClause = yyvsp[-4].list;
- yyval.astmt->whereClause = yyvsp[-3].node;
- yyval.astmt->groupClause = yyvsp[-2].list;
- yyval.astmt->havingClause = yyvsp[-1].node;
- yyval.astmt->unionClause = yyvsp[0].list;
- ;
- break;}
-case 435:
+ {
+ yyval.astmt = makeNode(InsertStmt);
+ yyval.astmt->unique = yyvsp[-6].str;
+ yyval.astmt->targetList = yyvsp[-5].list;
+ yyval.astmt->fromClause = yyvsp[-4].list;
+ yyval.astmt->whereClause = yyvsp[-3].node;
+ yyval.astmt->groupClause = yyvsp[-2].list;
+ yyval.astmt->havingClause = yyvsp[-1].node;
+ yyval.astmt->unionClause = yyvsp[0].list;
+ ;
+ break;
+ }
+ case 435:
#line 2363 "gram.y"
-{ yyval.list = yyvsp[-1].list; ;
- break;}
-case 436:
+ {
+ yyval.list = yyvsp[-1].list;;
+ break;
+ }
+ case 436:
#line 2364 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 437:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 437:
#line 2369 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node); ;
- break;}
-case 438:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);;
+ break;
+ }
+ case 438:
#line 2371 "gram.y"
-{ yyval.list = lcons(yyvsp[0].node, NIL); ;
- break;}
-case 439:
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 439:
#line 2375 "gram.y"
-{
- Ident *id = makeNode(Ident);
- id->name = yyvsp[-1].str;
- id->indirection = yyvsp[0].list;
- yyval.node = (Node *)id;
+ {
+ Ident *id = makeNode(Ident);
+
+ id->name = yyvsp[-1].str;
+ id->indirection = yyvsp[0].list;
+ yyval.node = (Node *) id;
;
- break;}
-case 440:
+ break;
+ }
+ case 440:
#line 2393 "gram.y"
-{
- DeleteStmt *n = makeNode(DeleteStmt);
- n->relname = yyvsp[-1].str;
- n->whereClause = yyvsp[0].node;
- yyval.node = (Node *)n;
+ {
+ DeleteStmt *n = makeNode(DeleteStmt);
+
+ n->relname = yyvsp[-1].str;
+ n->whereClause = yyvsp[0].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 441:
+ break;
+ }
+ case 441:
#line 2407 "gram.y"
-{
- DeleteStmt *n = makeNode(DeleteStmt);
- A_Const *c = makeNode(A_Const);
+ {
+ DeleteStmt *n = makeNode(DeleteStmt);
+ A_Const *c = makeNode(A_Const);
- c->val.type = T_String;
- c->val.val.str = "f";
- c->typename = makeNode(TypeName);
- c->typename->name = xlateSqlType("bool");
- c->typename->typmod = -1;
+ c->val.type = T_String;
+ c->val.val.str = "f";
+ c->typename = makeNode(TypeName);
+ c->typename->name = xlateSqlType("bool");
+ c->typename->typmod = -1;
- n->relname = yyvsp[0].str;
- n->whereClause = (Node *)c;
- yyval.node = (Node *)n;
+ n->relname = yyvsp[0].str;
+ n->whereClause = (Node *) c;
+ yyval.node = (Node *) n;
;
- break;}
-case 442:
+ break;
+ }
+ case 442:
#line 2435 "gram.y"
-{
- UpdateStmt *n = makeNode(UpdateStmt);
- n->relname = yyvsp[-4].str;
- n->targetList = yyvsp[-2].list;
- n->fromClause = yyvsp[-1].list;
- n->whereClause = yyvsp[0].node;
- yyval.node = (Node *)n;
- ;
- break;}
-case 443:
-#line 2457 "gram.y"
-{
- SelectStmt *n = makeNode(SelectStmt);
+ {
+ UpdateStmt *n = makeNode(UpdateStmt);
- /* from PORTAL name */
- /*
- * 15 august 1991 -- since 3.0 postgres does locking
- * right, we discovered that portals were violating
- * locking protocol. portal locks cannot span xacts.
- * as a short-term fix, we installed the check here.
- * -- mao
- */
- if (!IsTransactionBlock())
- elog(ERROR,"Named portals may only be used in begin/end transaction blocks");
-
- n->portalname = yyvsp[-12].str;
- n->binary = yyvsp[-11].boolean;
- n->unique = yyvsp[-7].str;
- n->targetList = yyvsp[-6].list;
- n->fromClause = yyvsp[-5].list;
- n->whereClause = yyvsp[-4].node;
- n->groupClause = yyvsp[-3].list;
- n->havingClause = yyvsp[-2].node;
- n->unionClause = yyvsp[-1].list;
- n->sortClause = yyvsp[0].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 444:
+ n->relname = yyvsp[-4].str;
+ n->targetList = yyvsp[-2].list;
+ n->fromClause = yyvsp[-1].list;
+ n->whereClause = yyvsp[0].node;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 443:
+#line 2457 "gram.y"
+ {
+ SelectStmt *n = makeNode(SelectStmt);
+
+ /* from PORTAL name */
+
+ /*
+ * 15 august 1991 -- since 3.0 postgres does locking
+ * right, we discovered that portals were violating
+ * locking protocol. portal locks cannot span xacts. as a
+ * short-term fix, we installed the check here. -- mao
+ */
+ if (!IsTransactionBlock())
+ elog(ERROR, "Named portals may only be used in begin/end transaction blocks");
+
+ n->portalname = yyvsp[-12].str;
+ n->binary = yyvsp[-11].boolean;
+ n->unique = yyvsp[-7].str;
+ n->targetList = yyvsp[-6].list;
+ n->fromClause = yyvsp[-5].list;
+ n->whereClause = yyvsp[-4].node;
+ n->groupClause = yyvsp[-3].list;
+ n->havingClause = yyvsp[-2].node;
+ n->unionClause = yyvsp[-1].list;
+ n->sortClause = yyvsp[0].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 444:
#line 2497 "gram.y"
-{
- SelectStmt *n = makeNode(SelectStmt);
- n->unique = yyvsp[-8].str;
- n->targetList = yyvsp[-7].list;
- n->into = yyvsp[-6].str;
- n->fromClause = yyvsp[-5].list;
- n->whereClause = yyvsp[-4].node;
- n->groupClause = yyvsp[-3].list;
- n->havingClause = yyvsp[-2].node;
- n->unionClause = yyvsp[-1].list;
- n->sortClause = yyvsp[0].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 445:
+ {
+ SelectStmt *n = makeNode(SelectStmt);
+
+ n->unique = yyvsp[-8].str;
+ n->targetList = yyvsp[-7].list;
+ n->into = yyvsp[-6].str;
+ n->fromClause = yyvsp[-5].list;
+ n->whereClause = yyvsp[-4].node;
+ n->groupClause = yyvsp[-3].list;
+ n->havingClause = yyvsp[-2].node;
+ n->unionClause = yyvsp[-1].list;
+ n->sortClause = yyvsp[0].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 445:
#line 2516 "gram.y"
-{
- SelectStmt *n = makeNode(SelectStmt);
- n->unique = yyvsp[-6].str;
- n->targetList = yyvsp[-5].list;
- n->fromClause = yyvsp[-4].list;
- n->whereClause = yyvsp[-3].node;
- n->groupClause = yyvsp[-2].list;
- n->havingClause = yyvsp[-1].node;
- n->unionClause = yyvsp[0].list;
- yyval.node = (Node *)n;
- ;
- break;}
-case 446:
+ {
+ SelectStmt *n = makeNode(SelectStmt);
+
+ n->unique = yyvsp[-6].str;
+ n->targetList = yyvsp[-5].list;
+ n->fromClause = yyvsp[-4].list;
+ n->whereClause = yyvsp[-3].node;
+ n->groupClause = yyvsp[-2].list;
+ n->havingClause = yyvsp[-1].node;
+ n->unionClause = yyvsp[0].list;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 446:
#line 2530 "gram.y"
-{
- SelectStmt *n = (SelectStmt *)lfirst(yyvsp[0].list);
- n->unionall = yyvsp[-1].boolean;
- yyval.list = yyvsp[0].list;
+ {
+ SelectStmt *n = (SelectStmt *) lfirst(yyvsp[0].list);
+
+ n->unionall = yyvsp[-1].boolean;
+ yyval.list = yyvsp[0].list;
;
- break;}
-case 447:
+ break;
+ }
+ case 447:
#line 2536 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 448:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 448:
#line 2540 "gram.y"
-{
- SelectStmt *n = (SelectStmt *)yyvsp[0].node;
- n->unionall = yyvsp[-1].boolean;
- yyval.list = lappend(yyvsp[-3].list, yyvsp[0].node);
+ {
+ SelectStmt *n = (SelectStmt *) yyvsp[0].node;
+
+ n->unionall = yyvsp[-1].boolean;
+ yyval.list = lappend(yyvsp[-3].list, yyvsp[0].node);
;
- break;}
-case 449:
+ break;
+ }
+ case 449:
#line 2546 "gram.y"
-{ yyval.list = lcons(yyvsp[0].node, NIL); ;
- break;}
-case 450:
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 450:
#line 2552 "gram.y"
-{
- SelectStmt *n = makeNode(SelectStmt);
- n->unique = yyvsp[-5].str;
- n->unionall = FALSE;
- n->targetList = yyvsp[-4].list;
- n->fromClause = yyvsp[-3].list;
- n->whereClause = yyvsp[-2].node;
- n->groupClause = yyvsp[-1].list;
- n->havingClause = yyvsp[0].node;
- yyval.node = (Node *)n;
- ;
- break;}
-case 451:
+ {
+ SelectStmt *n = makeNode(SelectStmt);
+
+ n->unique = yyvsp[-5].str;
+ n->unionall = FALSE;
+ n->targetList = yyvsp[-4].list;
+ n->fromClause = yyvsp[-3].list;
+ n->whereClause = yyvsp[-2].node;
+ n->groupClause = yyvsp[-1].list;
+ n->havingClause = yyvsp[0].node;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 451:
#line 2565 "gram.y"
-{ yyval.str= yyvsp[0].str; ;
- break;}
-case 452:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 452:
#line 2566 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 453:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 453:
#line 2569 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 454:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 454:
#line 2570 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 455:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 455:
#line 2573 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 456:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 456:
#line 2574 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 457:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 457:
#line 2577 "gram.y"
-{ yyval.str = "*"; ;
- break;}
-case 458:
+ {
+ yyval.str = "*";;
+ break;
+ }
+ case 458:
#line 2578 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 459:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 459:
#line 2579 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 460:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 460:
#line 2580 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 461:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 461:
#line 2583 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 462:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 462:
#line 2584 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 463:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 463:
#line 2587 "gram.y"
-{ yyval.list = lcons(yyvsp[0].sortgroupby, NIL); ;
- break;}
-case 464:
+ {
+ yyval.list = lcons(yyvsp[0].sortgroupby, NIL);;
+ break;
+ }
+ case 464:
#line 2588 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].sortgroupby); ;
- break;}
-case 465:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].sortgroupby);;
+ break;
+ }
+ case 465:
#line 2592 "gram.y"
-{
- yyval.sortgroupby = makeNode(SortGroupBy);
- yyval.sortgroupby->node = yyvsp[-1].node;
- yyval.sortgroupby->useOp = yyvsp[0].str;
+ {
+ yyval.sortgroupby = makeNode(SortGroupBy);
+ yyval.sortgroupby->node = yyvsp[-1].node;
+ yyval.sortgroupby->useOp = yyvsp[0].str;
;
- break;}
-case 466:
+ break;
+ }
+ case 466:
#line 2599 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 467:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 467:
#line 2600 "gram.y"
-{ yyval.str = "<"; ;
- break;}
-case 468:
+ {
+ yyval.str = "<";;
+ break;
+ }
+ case 468:
#line 2601 "gram.y"
-{ yyval.str = ">"; ;
- break;}
-case 469:
+ {
+ yyval.str = ">";;
+ break;
+ }
+ case 469:
#line 2602 "gram.y"
-{ yyval.str = "<"; ;
- break;}
-case 470:
+ {
+ yyval.str = "<";;
+ break;
+ }
+ case 470:
#line 2603 "gram.y"
-{ yyval.str = ">"; ;
- break;}
-case 471:
+ {
+ yyval.str = ">";;
+ break;
+ }
+ case 471:
#line 2604 "gram.y"
-{ yyval.str = "<"; /*default*/ ;
- break;}
-case 472:
+ {
+ yyval.str = "<"; /* default */ ;
+ break;
+ }
+ case 472:
#line 2614 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 473:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 473:
#line 2615 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 475:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 475:
#line 2621 "gram.y"
-{ yyval.list = lcons(makeString(yyvsp[0].str),NIL); ;
- break;}
-case 476:
+ {
+ yyval.list = lcons(makeString(yyvsp[0].str), NIL);;
+ break;
+ }
+ case 476:
#line 2623 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list,makeString(yyvsp[0].str)); ;
- break;}
-case 477:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString(yyvsp[0].str));;
+ break;
+ }
+ case 477:
#line 2626 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 478:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 478:
#line 2627 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 479:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 479:
#line 2631 "gram.y"
-{
- yyval.node = yyvsp[0].node;
+ {
+ yyval.node = yyvsp[0].node;
;
- break;}
-case 480:
+ break;
+ }
+ case 480:
#line 2634 "gram.y"
-{ yyval.node = NULL; ;
- break;}
-case 481:
+ {
+ yyval.node = NULL;;
+ break;
+ }
+ case 481:
#line 2647 "gram.y"
-{
- yyval.list = NIL;
- elog(ERROR,"JOIN not yet implemented");
+ {
+ yyval.list = NIL;
+ elog(ERROR, "JOIN not yet implemented");
;
- break;}
-case 482:
+ break;
+ }
+ case 482:
#line 2651 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 483:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 483:
#line 2652 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 484:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 484:
#line 2656 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].range); ;
- break;}
-case 485:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].range);;
+ break;
+ }
+ case 485:
#line 2658 "gram.y"
-{ elog(ERROR,"CROSS JOIN not yet implemented"); ;
- break;}
-case 486:
+ {
+ elog(ERROR, "CROSS JOIN not yet implemented");;
+ break;
+ }
+ case 486:
#line 2660 "gram.y"
-{ yyval.list = lcons(yyvsp[0].range, NIL); ;
- break;}
-case 487:
+ {
+ yyval.list = lcons(yyvsp[0].range, NIL);;
+ break;
+ }
+ case 487:
#line 2664 "gram.y"
-{
- yyval.range = makeNode(RangeVar);
- yyval.range->relExpr = yyvsp[-2].relexp;
- yyval.range->name = yyvsp[0].str;
+ {
+ yyval.range = makeNode(RangeVar);
+ yyval.range->relExpr = yyvsp[-2].relexp;
+ yyval.range->name = yyvsp[0].str;
;
- break;}
-case 488:
+ break;
+ }
+ case 488:
#line 2670 "gram.y"
-{
- yyval.range = makeNode(RangeVar);
- yyval.range->relExpr = yyvsp[-1].relexp;
- yyval.range->name = yyvsp[0].str;
+ {
+ yyval.range = makeNode(RangeVar);
+ yyval.range->relExpr = yyvsp[-1].relexp;
+ yyval.range->name = yyvsp[0].str;
;
- break;}
-case 489:
+ break;
+ }
+ case 489:
#line 2676 "gram.y"
-{
- yyval.range = makeNode(RangeVar);
- yyval.range->relExpr = yyvsp[0].relexp;
- yyval.range->name = NULL;
+ {
+ yyval.range = makeNode(RangeVar);
+ yyval.range->relExpr = yyvsp[0].relexp;
+ yyval.range->name = NULL;
;
- break;}
-case 490:
+ break;
+ }
+ case 490:
#line 2683 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 491:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 491:
#line 2685 "gram.y"
-{ elog(ERROR,"FULL OUTER JOIN not yet implemented"); ;
- break;}
-case 492:
+ {
+ elog(ERROR, "FULL OUTER JOIN not yet implemented");;
+ break;
+ }
+ case 492:
#line 2687 "gram.y"
-{ elog(ERROR,"LEFT OUTER JOIN not yet implemented"); ;
- break;}
-case 493:
+ {
+ elog(ERROR, "LEFT OUTER JOIN not yet implemented");;
+ break;
+ }
+ case 493:
#line 2689 "gram.y"
-{ elog(ERROR,"RIGHT OUTER JOIN not yet implemented"); ;
- break;}
-case 494:
+ {
+ elog(ERROR, "RIGHT OUTER JOIN not yet implemented");;
+ break;
+ }
+ case 494:
#line 2691 "gram.y"
-{ elog(ERROR,"OUTER JOIN not yet implemented"); ;
- break;}
-case 495:
+ {
+ elog(ERROR, "OUTER JOIN not yet implemented");;
+ break;
+ }
+ case 495:
#line 2693 "gram.y"
-{ elog(ERROR,"INNER JOIN not yet implemented"); ;
- break;}
-case 496:
+ {
+ elog(ERROR, "INNER JOIN not yet implemented");;
+ break;
+ }
+ case 496:
#line 2695 "gram.y"
-{ elog(ERROR,"UNION JOIN not yet implemented"); ;
- break;}
-case 497:
+ {
+ elog(ERROR, "UNION JOIN not yet implemented");;
+ break;
+ }
+ case 497:
#line 2697 "gram.y"
-{ elog(ERROR,"INNER JOIN not yet implemented"); ;
- break;}
-case 498:
+ {
+ elog(ERROR, "INNER JOIN not yet implemented");;
+ break;
+ }
+ case 498:
#line 2700 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 499:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 499:
#line 2701 "gram.y"
-{ yyval.str = NULL; /* no qualifiers */ ;
- break;}
-case 500:
+ {
+ yyval.str = NULL; /* no qualifiers */ ;
+ break;
+ }
+ case 500:
#line 2704 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 501:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 501:
#line 2705 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 502:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 502:
#line 2706 "gram.y"
-{ yyval.str = NULL; /* no qualifiers */ ;
- break;}
-case 503:
+ {
+ yyval.str = NULL; /* no qualifiers */ ;
+ break;
+ }
+ case 503:
#line 2709 "gram.y"
-{ yyval.list = lcons(yyvsp[0].joinusing, NIL); ;
- break;}
-case 504:
+ {
+ yyval.list = lcons(yyvsp[0].joinusing, NIL);;
+ break;
+ }
+ case 504:
#line 2710 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].joinusing); ;
- break;}
-case 505:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].joinusing);;
+ break;
+ }
+ case 505:
#line 2722 "gram.y"
-{
- yyval.joinusing = makeNode(JoinUsing);
- yyval.joinusing->resno = 0;
- yyval.joinusing->range = NULL;
- yyval.joinusing->name = yyvsp[0].str;
+ {
+ yyval.joinusing = makeNode(JoinUsing);
+ yyval.joinusing->resno = 0;
+ yyval.joinusing->range = NULL;
+ yyval.joinusing->name = yyvsp[0].str;
;
- break;}
-case 506:
+ break;
+ }
+ case 506:
#line 2729 "gram.y"
-{
- yyval.joinusing = makeNode(JoinUsing);
- yyval.joinusing->resno = 0;
- yyval.joinusing->range = yyvsp[-2].str;
- yyval.joinusing->name = yyvsp[0].str;
+ {
+ yyval.joinusing = makeNode(JoinUsing);
+ yyval.joinusing->resno = 0;
+ yyval.joinusing->range = yyvsp[-2].str;
+ yyval.joinusing->name = yyvsp[0].str;
;
- break;}
-case 507:
+ break;
+ }
+ case 507:
#line 2736 "gram.y"
-{
- yyval.joinusing = makeNode(JoinUsing);
- yyval.joinusing->resno = yyvsp[0].ival;
- yyval.joinusing->range = NULL;
- yyval.joinusing->name = NULL;
+ {
+ yyval.joinusing = makeNode(JoinUsing);
+ yyval.joinusing->resno = yyvsp[0].ival;
+ yyval.joinusing->range = NULL;
+ yyval.joinusing->name = NULL;
;
- break;}
-case 508:
+ break;
+ }
+ case 508:
#line 2744 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 509:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 509:
#line 2745 "gram.y"
-{ yyval.node = NULL; /* no qualifiers */ ;
- break;}
-case 510:
+ {
+ yyval.node = NULL; /* no qualifiers */ ;
+ break;
+ }
+ case 510:
#line 2749 "gram.y"
-{
- /* normal relations */
- yyval.relexp = makeNode(RelExpr);
- yyval.relexp->relname = yyvsp[0].str;
- yyval.relexp->inh = FALSE;
+ {
+ /* normal relations */
+ yyval.relexp = makeNode(RelExpr);
+ yyval.relexp->relname = yyvsp[0].str;
+ yyval.relexp->inh = FALSE;
;
- break;}
-case 511:
+ break;
+ }
+ case 511:
#line 2756 "gram.y"
-{
- /* inheritance query */
- yyval.relexp = makeNode(RelExpr);
- yyval.relexp->relname = yyvsp[-1].str;
- yyval.relexp->inh = TRUE;
+ {
+ /* inheritance query */
+ yyval.relexp = makeNode(RelExpr);
+ yyval.relexp->relname = yyvsp[-1].str;
+ yyval.relexp->inh = TRUE;
;
- break;}
-case 512:
+ break;
+ }
+ case 512:
#line 2764 "gram.y"
-{ yyval.list = lcons(makeInteger(-1), yyvsp[0].list); ;
- break;}
-case 513:
+ {
+ yyval.list = lcons(makeInteger(-1), yyvsp[0].list);;
+ break;
+ }
+ case 513:
#line 2766 "gram.y"
-{ yyval.list = lcons(makeInteger(yyvsp[-2].ival), yyvsp[0].list); ;
- break;}
-case 514:
+ {
+ yyval.list = lcons(makeInteger(yyvsp[-2].ival), yyvsp[0].list);;
+ break;
+ }
+ case 514:
#line 2768 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 515:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 515:
#line 2772 "gram.y"
-{ yyval.list = lcons(makeInteger(-1), yyvsp[0].list); ;
- break;}
-case 516:
+ {
+ yyval.list = lcons(makeInteger(-1), yyvsp[0].list);;
+ break;
+ }
+ case 516:
#line 2774 "gram.y"
-{ yyval.list = lcons(makeInteger(yyvsp[-2].ival), yyvsp[0].list); ;
- break;}
-case 517:
+ {
+ yyval.list = lcons(makeInteger(yyvsp[-2].ival), yyvsp[0].list);;
+ break;
+ }
+ case 517:
#line 2776 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 518:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 518:
#line 2791 "gram.y"
-{
- yyval.typnam = yyvsp[-1].typnam;
- yyval.typnam->arrayBounds = yyvsp[0].list;
+ {
+ yyval.typnam = yyvsp[-1].typnam;
+ yyval.typnam->arrayBounds = yyvsp[0].list;
- /* Is this the name of a complex type? If so, implement
- * it as a set.
+ /*
+ * Is this the name of a complex type? If so, implement it
+ * as a set.
+ */
+ if (!strcmp(saved_relname, yyval.typnam->name))
+
+ /*
+ * This attr is the same type as the relation being
+ * defined. The classic example: create
+ * emp(name=text,mgr=emp)
*/
- if (!strcmp(saved_relname, yyval.typnam->name))
- /* This attr is the same type as the relation
- * being defined. The classic example: create
- * emp(name=text,mgr=emp)
- */
- yyval.typnam->setof = TRUE;
- else if (typeTypeRelid(typenameType(yyval.typnam->name)) != InvalidOid)
- /* (Eventually add in here that the set can only
- * contain one element.)
- */
- yyval.typnam->setof = TRUE;
- else
- yyval.typnam->setof = FALSE;
+ yyval.typnam->setof = TRUE;
+ else if (typeTypeRelid(typenameType(yyval.typnam->name)) != InvalidOid)
+
+ /*
+ * (Eventually add in here that the set can only
+ * contain one element.)
+ */
+ yyval.typnam->setof = TRUE;
+ else
+ yyval.typnam->setof = FALSE;
;
- break;}
-case 520:
+ break;
+ }
+ case 520:
#line 2814 "gram.y"
-{
- yyval.typnam = yyvsp[0].typnam;
- yyval.typnam->setof = TRUE;
+ {
+ yyval.typnam = yyvsp[0].typnam;
+ yyval.typnam->setof = TRUE;
;
- break;}
-case 524:
+ break;
+ }
+ case 524:
#line 2826 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType(yyvsp[0].str);
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType(yyvsp[0].str);
+ yyval.typnam->typmod = -1;
;
- break;}
-case 525:
+ break;
+ }
+ case 525:
#line 2833 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 526:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 526:
#line 2834 "gram.y"
-{ yyval.str = xlateSqlType("type"); ;
- break;}
-case 527:
+ {
+ yyval.str = xlateSqlType("type");;
+ break;
+ }
+ case 527:
#line 2844 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType(yyvsp[0].str);
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType(yyvsp[0].str);
+ yyval.typnam->typmod = -1;
;
- break;}
-case 528:
+ break;
+ }
+ case 528:
#line 2850 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType("float");
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType("float");
;
- break;}
-case 529:
+ break;
+ }
+ case 529:
#line 2855 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType("integer");
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType("integer");
+ yyval.typnam->typmod = -1;
;
- break;}
-case 530:
+ break;
+ }
+ case 530:
#line 2861 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType("integer");
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType("integer");
+ yyval.typnam->typmod = -1;
;
- break;}
-case 531:
+ break;
+ }
+ case 531:
#line 2869 "gram.y"
-{ yyval.str = xlateSqlType("float8"); ;
- break;}
-case 532:
+ {
+ yyval.str = xlateSqlType("float8");;
+ break;
+ }
+ case 532:
#line 2871 "gram.y"
-{ yyval.str = xlateSqlType("float8"); ;
- break;}
-case 533:
+ {
+ yyval.str = xlateSqlType("float8");;
+ break;
+ }
+ case 533:
#line 2873 "gram.y"
-{ yyval.str = xlateSqlType("decimal"); ;
- break;}
-case 534:
+ {
+ yyval.str = xlateSqlType("decimal");;
+ break;
+ }
+ case 534:
#line 2875 "gram.y"
-{ yyval.str = xlateSqlType("numeric"); ;
- break;}
-case 535:
+ {
+ yyval.str = xlateSqlType("numeric");;
+ break;
+ }
+ case 535:
#line 2879 "gram.y"
-{
- if (yyvsp[-1].ival < 1)
- elog(ERROR,"precision for FLOAT must be at least 1");
- else if (yyvsp[-1].ival < 7)
- yyval.str = xlateSqlType("float4");
- else if (yyvsp[-1].ival < 16)
- yyval.str = xlateSqlType("float8");
- else
- elog(ERROR,"precision for FLOAT must be less than 16");
+ {
+ if (yyvsp[-1].ival < 1)
+ elog(ERROR, "precision for FLOAT must be at least 1");
+ else if (yyvsp[-1].ival < 7)
+ yyval.str = xlateSqlType("float4");
+ else if (yyvsp[-1].ival < 16)
+ yyval.str = xlateSqlType("float8");
+ else
+ elog(ERROR, "precision for FLOAT must be less than 16");
;
- break;}
-case 536:
+ break;
+ }
+ case 536:
#line 2890 "gram.y"
-{
- yyval.str = xlateSqlType("float8");
+ {
+ yyval.str = xlateSqlType("float8");
;
- break;}
-case 537:
+ break;
+ }
+ case 537:
#line 2896 "gram.y"
-{
- if (yyvsp[-3].ival != 9)
- elog(ERROR,"NUMERIC precision %d must be 9",yyvsp[-3].ival);
- if (yyvsp[-1].ival != 0)
- elog(ERROR,"NUMERIC scale %d must be zero",yyvsp[-1].ival);
+ {
+ if (yyvsp[-3].ival != 9)
+ elog(ERROR, "NUMERIC precision %d must be 9", yyvsp[-3].ival);
+ if (yyvsp[-1].ival != 0)
+ elog(ERROR, "NUMERIC scale %d must be zero", yyvsp[-1].ival);
;
- break;}
-case 538:
+ break;
+ }
+ case 538:
#line 2903 "gram.y"
-{
- if (yyvsp[-1].ival != 9)
- elog(ERROR,"NUMERIC precision %d must be 9",yyvsp[-1].ival);
+ {
+ if (yyvsp[-1].ival != 9)
+ elog(ERROR, "NUMERIC precision %d must be 9", yyvsp[-1].ival);
;
- break;}
-case 539:
+ break;
+ }
+ case 539:
#line 2908 "gram.y"
-{
- yyval.str = NULL;
+ {
+ yyval.str = NULL;
;
- break;}
-case 540:
+ break;
+ }
+ case 540:
#line 2914 "gram.y"
-{
- if (yyvsp[-3].ival > 9)
- elog(ERROR,"DECIMAL precision %d exceeds implementation limit of 9",yyvsp[-3].ival);
- if (yyvsp[-1].ival != 0)
- elog(ERROR,"DECIMAL scale %d must be zero",yyvsp[-1].ival);
- yyval.str = NULL;
- ;
- break;}
-case 541:
+ {
+ if (yyvsp[-3].ival > 9)
+ elog(ERROR, "DECIMAL precision %d exceeds implementation limit of 9", yyvsp[-3].ival);
+ if (yyvsp[-1].ival != 0)
+ elog(ERROR, "DECIMAL scale %d must be zero", yyvsp[-1].ival);
+ yyval.str = NULL;
+ ;
+ break;
+ }
+ case 541:
#line 2922 "gram.y"
-{
- if (yyvsp[-1].ival > 9)
- elog(ERROR,"DECIMAL precision %d exceeds implementation limit of 9",yyvsp[-1].ival);
- yyval.str = NULL;
+ {
+ if (yyvsp[-1].ival > 9)
+ elog(ERROR, "DECIMAL precision %d exceeds implementation limit of 9", yyvsp[-1].ival);
+ yyval.str = NULL;
;
- break;}
-case 542:
+ break;
+ }
+ case 542:
#line 2928 "gram.y"
-{
- yyval.str = NULL;
+ {
+ yyval.str = NULL;
;
- break;}
-case 543:
+ break;
+ }
+ case 543:
#line 2941 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- if (strcasecmp(yyvsp[-3].str, "char") == 0)
- yyval.typnam->name = xlateSqlType("bpchar");
- else if (strcasecmp(yyvsp[-3].str, "varchar") == 0)
- yyval.typnam->name = xlateSqlType("varchar");
- else
- yyerror("internal parsing error; unrecognized character type");
-
- if (yyvsp[-1].ival < 1)
- elog(ERROR,"length for '%s' type must be at least 1",yyvsp[-3].str);
- else if (yyvsp[-1].ival > 4096)
- /* we can store a char() of length up to the size
- * of a page (8KB) - page headers and friends but
- * just to be safe here... - ay 6/95
- * XXX note this hardcoded limit - thomas 1997-07-13
- */
- elog(ERROR,"length for type '%s' cannot exceed 4096",yyvsp[-3].str);
-
- /* we actually implement this sort of like a varlen, so
- * the first 4 bytes is the length. (the difference
- * between this and "text" is that we blank-pad and
- * truncate where necessary
+ {
+ yyval.typnam = makeNode(TypeName);
+ if (strcasecmp(yyvsp[-3].str, "char") == 0)
+ yyval.typnam->name = xlateSqlType("bpchar");
+ else if (strcasecmp(yyvsp[-3].str, "varchar") == 0)
+ yyval.typnam->name = xlateSqlType("varchar");
+ else
+ yyerror("internal parsing error; unrecognized character type");
+
+ if (yyvsp[-1].ival < 1)
+ elog(ERROR, "length for '%s' type must be at least 1", yyvsp[-3].str);
+ else if (yyvsp[-1].ival > 4096)
+
+ /*
+ * we can store a char() of length up to the size of a
+ * page (8KB) - page headers and friends but just to
+ * be safe here... - ay 6/95 XXX note this hardcoded
+ * limit - thomas 1997-07-13
*/
- yyval.typnam->typmod = VARHDRSZ + yyvsp[-1].ival;
+ elog(ERROR, "length for type '%s' cannot exceed 4096", yyvsp[-3].str);
+
+ /*
+ * we actually implement this sort of like a varlen, so
+ * the first 4 bytes is the length. (the difference
+ * between this and "text" is that we blank-pad and
+ * truncate where necessary
+ */
+ yyval.typnam->typmod = VARHDRSZ + yyvsp[-1].ival;
;
- break;}
-case 544:
+ break;
+ }
+ case 544:
#line 2968 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- /* Let's try to make all single-character types into bpchar(1)
- * - thomas 1998-05-07
- */
- if (strcasecmp(yyvsp[0].str, "char") == 0)
- {
- yyval.typnam->name = xlateSqlType("bpchar");
- yyval.typnam->typmod = VARHDRSZ + 1;
- }
+ {
+ yyval.typnam = makeNode(TypeName);
+
+ /*
+ * Let's try to make all single-character types into
+ * bpchar(1) - thomas 1998-05-07
+ */
+ if (strcasecmp(yyvsp[0].str, "char") == 0)
+ {
+ yyval.typnam->name = xlateSqlType("bpchar");
+ yyval.typnam->typmod = VARHDRSZ + 1;
+ }
+ else
+ {
+ yyval.typnam->name = xlateSqlType(yyvsp[0].str);
+ yyval.typnam->typmod = -1;
+ }
+ ;
+ break;
+ }
+ case 545:
+#line 2987 "gram.y"
+ {
+ char *type,
+ *c;
+
+ if ((yyvsp[-1].str == NULL) || (strcasecmp(yyvsp[-1].str, "sql_text") == 0))
+ {
+ if (yyvsp[-2].boolean)
+ type = xlateSqlType("varchar");
else
+ type = xlateSqlType("char");
+ }
+ else
+ {
+ if (yyvsp[-2].boolean)
{
- yyval.typnam->name = xlateSqlType(yyvsp[0].str);
- yyval.typnam->typmod = -1;
+ c = palloc(strlen("var") + strlen(yyvsp[-1].str) + 1);
+ strcpy(c, "var");
+ strcat(c, yyvsp[-1].str);
+ type = xlateSqlType(c);
}
+ else
+ type = xlateSqlType(yyvsp[-1].str);
+ };
+ if (yyvsp[0].str != NULL)
+ elog(NOTICE, "COLLATE %s not yet implemented; clause ignored", yyvsp[0].str);
+ yyval.str = type;
;
- break;}
-case 545:
-#line 2987 "gram.y"
-{
- char *type, *c;
- if ((yyvsp[-1].str == NULL) || (strcasecmp(yyvsp[-1].str, "sql_text") == 0)) {
- if (yyvsp[-2].boolean) type = xlateSqlType("varchar");
- else type = xlateSqlType("char");
- } else {
- if (yyvsp[-2].boolean) {
- c = palloc(strlen("var") + strlen(yyvsp[-1].str) + 1);
- strcpy(c, "var");
- strcat(c, yyvsp[-1].str);
- type = xlateSqlType(c);
- } else {
- type = xlateSqlType(yyvsp[-1].str);
- }
- };
- if (yyvsp[0].str != NULL)
- elog(NOTICE,"COLLATE %s not yet implemented; clause ignored",yyvsp[0].str);
- yyval.str = type;
- ;
- break;}
-case 546:
+ break;
+ }
+ case 546:
#line 3006 "gram.y"
-{ yyval.str = xlateSqlType(yyvsp[0].boolean? "varchar": "char"); ;
- break;}
-case 547:
+ {
+ yyval.str = xlateSqlType(yyvsp[0].boolean ? "varchar" : "char");;
+ break;
+ }
+ case 547:
#line 3007 "gram.y"
-{ yyval.str = xlateSqlType("varchar"); ;
- break;}
-case 548:
+ {
+ yyval.str = xlateSqlType("varchar");;
+ break;
+ }
+ case 548:
#line 3008 "gram.y"
-{ yyval.str = xlateSqlType(yyvsp[0].boolean? "varchar": "char"); ;
- break;}
-case 549:
+ {
+ yyval.str = xlateSqlType(yyvsp[0].boolean ? "varchar" : "char");;
+ break;
+ }
+ case 549:
#line 3009 "gram.y"
-{ yyval.str = xlateSqlType(yyvsp[0].boolean? "varchar": "char"); ;
- break;}
-case 550:
+ {
+ yyval.str = xlateSqlType(yyvsp[0].boolean ? "varchar" : "char");;
+ break;
+ }
+ case 550:
#line 3012 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 551:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 551:
#line 3013 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 552:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 552:
#line 3016 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 553:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 553:
#line 3017 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 554:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 554:
#line 3020 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 555:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 555:
#line 3021 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 556:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 556:
#line 3025 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType(yyvsp[0].str);
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType(yyvsp[0].str);
+ yyval.typnam->typmod = -1;
;
- break;}
-case 557:
+ break;
+ }
+ case 557:
#line 3031 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType("timestamp");
- yyval.typnam->timezone = yyvsp[0].boolean;
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType("timestamp");
+ yyval.typnam->timezone = yyvsp[0].boolean;
+ yyval.typnam->typmod = -1;
;
- break;}
-case 558:
+ break;
+ }
+ case 558:
#line 3038 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType("time");
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType("time");
+ yyval.typnam->typmod = -1;
;
- break;}
-case 559:
+ break;
+ }
+ case 559:
#line 3044 "gram.y"
-{
- yyval.typnam = makeNode(TypeName);
- yyval.typnam->name = xlateSqlType("interval");
- yyval.typnam->typmod = -1;
+ {
+ yyval.typnam = makeNode(TypeName);
+ yyval.typnam->name = xlateSqlType("interval");
+ yyval.typnam->typmod = -1;
;
- break;}
-case 560:
+ break;
+ }
+ case 560:
#line 3051 "gram.y"
-{ yyval.str = "year"; ;
- break;}
-case 561:
+ {
+ yyval.str = "year";;
+ break;
+ }
+ case 561:
#line 3052 "gram.y"
-{ yyval.str = "month"; ;
- break;}
-case 562:
+ {
+ yyval.str = "month";;
+ break;
+ }
+ case 562:
#line 3053 "gram.y"
-{ yyval.str = "day"; ;
- break;}
-case 563:
+ {
+ yyval.str = "day";;
+ break;
+ }
+ case 563:
#line 3054 "gram.y"
-{ yyval.str = "hour"; ;
- break;}
-case 564:
+ {
+ yyval.str = "hour";;
+ break;
+ }
+ case 564:
#line 3055 "gram.y"
-{ yyval.str = "minute"; ;
- break;}
-case 565:
+ {
+ yyval.str = "minute";;
+ break;
+ }
+ case 565:
#line 3056 "gram.y"
-{ yyval.str = "second"; ;
- break;}
-case 566:
+ {
+ yyval.str = "second";;
+ break;
+ }
+ case 566:
#line 3059 "gram.y"
-{ yyval.boolean = TRUE; ;
- break;}
-case 567:
+ {
+ yyval.boolean = TRUE;;
+ break;
+ }
+ case 567:
#line 3060 "gram.y"
-{ yyval.boolean = FALSE; ;
- break;}
-case 568:
+ {
+ yyval.boolean = FALSE;;
+ break;
+ }
+ case 568:
#line 3063 "gram.y"
-{ yyval.list = lcons(yyvsp[0].str, NIL); ;
- break;}
-case 569:
+ {
+ yyval.list = lcons(yyvsp[0].str, NIL);;
+ break;
+ }
+ case 569:
#line 3064 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 570:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 570:
#line 3065 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 571:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 571:
#line 3066 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 572:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 572:
#line 3067 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 573:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 573:
#line 3068 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 574:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 574:
#line 3069 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 575:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 575:
#line 3070 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 576:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 576:
#line 3071 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 577:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 577:
#line 3082 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 578:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 578:
#line 3084 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_Null;
- yyval.node = (Node *)n;
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_Null;
+ yyval.node = (Node *) n;
;
- break;}
-case 579:
+ break;
+ }
+ case 579:
#line 3101 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = yyvsp[-5].list;
- n->oper = lcons("=",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = yyvsp[-5].list;
+ n->oper = lcons("=", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 580:
+ break;
+ }
+ case 580:
#line 3111 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = yyvsp[-6].list;
- n->oper = lcons("<>",NIL);
- n->useor = true;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = yyvsp[-6].list;
+ n->oper = lcons("<>", NIL);
+ n->useor = true;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 581:
+ break;
+ }
+ case 581:
#line 3121 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = yyvsp[-6].list;
- n->oper = lcons(yyvsp[-4].str, NIL);
- if (strcmp(yyvsp[-4].str,"<>") == 0)
- n->useor = true;
- else
- n->useor = false;
- n->subLinkType = yyvsp[-3].ival;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = yyvsp[-6].list;
+ n->oper = lcons(yyvsp[-4].str, NIL);
+ if (strcmp(yyvsp[-4].str, "<>") == 0)
+ n->useor = true;
+ else
+ n->useor = false;
+ n->subLinkType = yyvsp[-3].ival;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 582:
+ break;
+ }
+ case 582:
#line 3134 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = yyvsp[-5].list;
- n->oper = lcons(yyvsp[-3].str, NIL);
- if (strcmp(yyvsp[-3].str,"<>") == 0)
- n->useor = true;
- else
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = yyvsp[-5].list;
+ n->oper = lcons(yyvsp[-3].str, NIL);
+ if (strcmp(yyvsp[-3].str, "<>") == 0)
+ n->useor = true;
+ else
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 583:
+ break;
+ }
+ case 583:
#line 3147 "gram.y"
-{
- yyval.node = makeRowExpr(yyvsp[-3].str, yyvsp[-5].list, yyvsp[-1].list);
+ {
+ yyval.node = makeRowExpr(yyvsp[-3].str, yyvsp[-5].list, yyvsp[-1].list);
;
- break;}
-case 584:
+ break;
+ }
+ case 584:
#line 3153 "gram.y"
-{
- yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);
;
- break;}
-case 585:
+ break;
+ }
+ case 585:
#line 3159 "gram.y"
-{
- yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);
;
- break;}
-case 586:
+ break;
+ }
+ case 586:
#line 3163 "gram.y"
-{
- yyval.list = lcons(yyvsp[0].node, NIL);
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);
;
- break;}
-case 587:
+ break;
+ }
+ case 587:
#line 3168 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 588:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 588:
#line 3169 "gram.y"
-{ yyval.str = "<"; ;
- break;}
-case 589:
+ {
+ yyval.str = "<";;
+ break;
+ }
+ case 589:
#line 3170 "gram.y"
-{ yyval.str = "="; ;
- break;}
-case 590:
+ {
+ yyval.str = "=";;
+ break;
+ }
+ case 590:
#line 3171 "gram.y"
-{ yyval.str = ">"; ;
- break;}
-case 591:
+ {
+ yyval.str = ">";;
+ break;
+ }
+ case 591:
#line 3172 "gram.y"
-{ yyval.str = "+"; ;
- break;}
-case 592:
+ {
+ yyval.str = "+";;
+ break;
+ }
+ case 592:
#line 3173 "gram.y"
-{ yyval.str = "-"; ;
- break;}
-case 593:
+ {
+ yyval.str = "-";;
+ break;
+ }
+ case 593:
#line 3174 "gram.y"
-{ yyval.str = "*"; ;
- break;}
-case 594:
+ {
+ yyval.str = "*";;
+ break;
+ }
+ case 594:
#line 3175 "gram.y"
-{ yyval.str = "/"; ;
- break;}
-case 595:
+ {
+ yyval.str = "/";;
+ break;
+ }
+ case 595:
#line 3178 "gram.y"
-{ yyval.ival = ANY_SUBLINK; ;
- break;}
-case 596:
+ {
+ yyval.ival = ANY_SUBLINK;;
+ break;
+ }
+ case 596:
#line 3179 "gram.y"
-{ yyval.ival = ALL_SUBLINK; ;
- break;}
-case 597:
+ {
+ yyval.ival = ALL_SUBLINK;;
+ break;
+ }
+ case 597:
#line 3191 "gram.y"
-{
- yyvsp[-1].attr->indirection = yyvsp[0].list;
- yyval.node = (Node *)yyvsp[-1].attr;
+ {
+ yyvsp[-1].attr->indirection = yyvsp[0].list;
+ yyval.node = (Node *) yyvsp[-1].attr;
;
- break;}
-case 598:
+ break;
+ }
+ case 598:
#line 3196 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 599:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 599:
#line 3198 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 600:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 600:
#line 3200 "gram.y"
-{
- /* could be a column name or a relation_name */
- Ident *n = makeNode(Ident);
- n->name = yyvsp[0].str;
- n->indirection = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 601:
+ {
+ /* could be a column name or a relation_name */
+ Ident *n = makeNode(Ident);
+
+ n->name = yyvsp[0].str;
+ n->indirection = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 601:
#line 3208 "gram.y"
-{ yyval.node = makeA_Expr(OP, "-", NULL, yyvsp[0].node); ;
- break;}
-case 602:
+ {
+ yyval.node = makeA_Expr(OP, "-", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 602:
#line 3210 "gram.y"
-{ yyval.node = makeA_Expr(OP, "+", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 603:
+ {
+ yyval.node = makeA_Expr(OP, "+", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 603:
#line 3212 "gram.y"
-{ yyval.node = makeA_Expr(OP, "-", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 604:
+ {
+ yyval.node = makeA_Expr(OP, "-", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 604:
#line 3214 "gram.y"
-{ yyval.node = makeA_Expr(OP, "/", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 605:
+ {
+ yyval.node = makeA_Expr(OP, "/", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 605:
#line 3216 "gram.y"
-{ yyval.node = makeA_Expr(OP, "*", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 606:
+ {
+ yyval.node = makeA_Expr(OP, "*", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 606:
#line 3218 "gram.y"
-{ yyval.node = makeA_Expr(OP, "<", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 607:
+ {
+ yyval.node = makeA_Expr(OP, "<", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 607:
#line 3220 "gram.y"
-{ yyval.node = makeA_Expr(OP, ">", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 608:
+ {
+ yyval.node = makeA_Expr(OP, ">", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 608:
#line 3222 "gram.y"
-{ yyval.node = makeA_Expr(OP, "=", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 609:
+ {
+ yyval.node = makeA_Expr(OP, "=", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 609:
#line 3224 "gram.y"
-{ yyval.node = makeA_Expr(OP, ":", NULL, yyvsp[0].node); ;
- break;}
-case 610:
+ {
+ yyval.node = makeA_Expr(OP, ":", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 610:
#line 3226 "gram.y"
-{ yyval.node = makeA_Expr(OP, ";", NULL, yyvsp[0].node); ;
- break;}
-case 611:
+ {
+ yyval.node = makeA_Expr(OP, ";", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 611:
#line 3228 "gram.y"
-{ yyval.node = makeA_Expr(OP, "|", NULL, yyvsp[0].node); ;
- break;}
-case 612:
+ {
+ yyval.node = makeA_Expr(OP, "|", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 612:
#line 3230 "gram.y"
-{
- yyval.node = (Node *)yyvsp[-2].node;
- /* AexprConst can be either A_Const or ParamNo */
- if (nodeTag(yyvsp[-2].node) == T_A_Const) {
- ((A_Const *)yyvsp[-2].node)->typename = yyvsp[0].typnam;
- } else if (nodeTag(yyvsp[-2].node) == T_Param) {
- ((ParamNo *)yyvsp[-2].node)->typename = yyvsp[0].typnam;
+ {
+ yyval.node = (Node *) yyvsp[-2].node;
+ /* AexprConst can be either A_Const or ParamNo */
+ if (nodeTag(yyvsp[-2].node) == T_A_Const)
+ ((A_Const *) yyvsp[-2].node)->typename = yyvsp[0].typnam;
+ else if (nodeTag(yyvsp[-2].node) == T_Param)
+ {
+ ((ParamNo *) yyvsp[-2].node)->typename = yyvsp[0].typnam;
/* otherwise, try to transform to a function call */
- } else {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[0].typnam->name;
- n->args = lcons(yyvsp[-2].node,NIL);
- yyval.node = (Node *)n;
- }
+ }
+ else
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[0].typnam->name;
+ n->args = lcons(yyvsp[-2].node, NIL);
+ yyval.node = (Node *) n;
+ }
;
- break;}
-case 613:
+ break;
+ }
+ case 613:
#line 3246 "gram.y"
-{
- yyval.node = (Node *)yyvsp[-3].node;
- /* AexprConst can be either A_Const or ParamNo */
- if (nodeTag(yyvsp[-3].node) == T_A_Const) {
- ((A_Const *)yyvsp[-3].node)->typename = yyvsp[-1].typnam;
- } else if (nodeTag(yyvsp[-1].typnam) == T_Param) {
- ((ParamNo *)yyvsp[-3].node)->typename = yyvsp[-1].typnam;
+ {
+ yyval.node = (Node *) yyvsp[-3].node;
+ /* AexprConst can be either A_Const or ParamNo */
+ if (nodeTag(yyvsp[-3].node) == T_A_Const)
+ ((A_Const *) yyvsp[-3].node)->typename = yyvsp[-1].typnam;
+ else if (nodeTag(yyvsp[-1].typnam) == T_Param)
+ {
+ ((ParamNo *) yyvsp[-3].node)->typename = yyvsp[-1].typnam;
/* otherwise, try to transform to a function call */
- } else {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-1].typnam->name;
- n->args = lcons(yyvsp[-3].node,NIL);
- yyval.node = (Node *)n;
- }
+ }
+ else
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-1].typnam->name;
+ n->args = lcons(yyvsp[-3].node, NIL);
+ yyval.node = (Node *) n;
+ }
;
- break;}
-case 614:
+ break;
+ }
+ case 614:
#line 3262 "gram.y"
-{ yyval.node = yyvsp[-1].node; ;
- break;}
-case 615:
+ {
+ yyval.node = yyvsp[-1].node;;
+ break;
+ }
+ case 615:
#line 3264 "gram.y"
-{ yyval.node = makeIndexable(yyvsp[-1].str,yyvsp[-2].node,yyvsp[0].node); ;
- break;}
-case 616:
+ {
+ yyval.node = makeIndexable(yyvsp[-1].str, yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 616:
#line 3266 "gram.y"
-{ yyval.node = makeIndexable("~~", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 617:
+ {
+ yyval.node = makeIndexable("~~", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 617:
#line 3268 "gram.y"
-{ yyval.node = makeA_Expr(OP, "!~~", yyvsp[-3].node, yyvsp[0].node); ;
- break;}
-case 618:
+ {
+ yyval.node = makeA_Expr(OP, "!~~", yyvsp[-3].node, yyvsp[0].node);;
+ break;
+ }
+ case 618:
#line 3270 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[-1].str, NULL, yyvsp[0].node); ;
- break;}
-case 619:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[-1].str, NULL, yyvsp[0].node);;
+ break;
+ }
+ case 619:
#line 3272 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[0].str, yyvsp[-1].node, NULL); ;
- break;}
-case 620:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[0].str, yyvsp[-1].node, NULL);;
+ break;
+ }
+ case 620:
#line 3274 "gram.y"
-{
- /* cheap hack for aggregate (eg. count) */
- FuncCall *n = makeNode(FuncCall);
- A_Const *star = makeNode(A_Const);
-
- star->val.type = T_String;
- star->val.val.str = "";
- n->funcname = yyvsp[-3].str;
- n->args = lcons(star, NIL);
- yyval.node = (Node *)n;
- ;
- break;}
-case 621:
+ {
+ /* cheap hack for aggregate (eg. count) */
+ FuncCall *n = makeNode(FuncCall);
+ A_Const *star = makeNode(A_Const);
+
+ star->val.type = T_String;
+ star->val.val.str = "";
+ n->funcname = yyvsp[-3].str;
+ n->args = lcons(star, NIL);
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 621:
#line 3286 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-2].str;
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-2].str;
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 622:
+ break;
+ }
+ case 622:
#line 3293 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-3].str;
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-3].str;
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 623:
+ break;
+ }
+ case 623:
#line 3300 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ A_Const *n = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
+
+ n->val.type = T_String;
+ n->val.val.str = "now";
+ n->typename = t;
- n->val.type = T_String;
- n->val.val.str = "now";
- n->typename = t;
+ t->name = xlateSqlType("date");
+ t->setof = FALSE;
+ t->typmod = -1;
- t->name = xlateSqlType("date");
- t->setof = FALSE;
- t->typmod = -1;
-
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 624:
+ break;
+ }
+ case 624:
#line 3315 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ A_Const *n = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->val.type = T_String;
- n->val.val.str = "now";
- n->typename = t;
+ n->val.type = T_String;
+ n->val.val.str = "now";
+ n->typename = t;
- t->name = xlateSqlType("time");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("time");
+ t->setof = FALSE;
+ t->typmod = -1;
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 625:
+ break;
+ }
+ case 625:
#line 3330 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- A_Const *s = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ FuncCall *n = makeNode(FuncCall);
+ A_Const *s = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->funcname = xlateSqlType("time");
- n->args = lcons(s, NIL);
+ n->funcname = xlateSqlType("time");
+ n->args = lcons(s, NIL);
- s->val.type = T_String;
- s->val.val.str = "now";
- s->typename = t;
+ s->val.type = T_String;
+ s->val.val.str = "now";
+ s->typename = t;
- t->name = xlateSqlType("time");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("time");
+ t->setof = FALSE;
+ t->typmod = -1;
- if (yyvsp[-1].ival != 0)
- elog(NOTICE,"CURRENT_TIME(%d) precision not implemented; zero used instead",yyvsp[-1].ival);
+ if (yyvsp[-1].ival != 0)
+ elog(NOTICE, "CURRENT_TIME(%d) precision not implemented; zero used instead", yyvsp[-1].ival);
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 626:
+ break;
+ }
+ case 626:
#line 3352 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ A_Const *n = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->val.type = T_String;
- n->val.val.str = "now";
- n->typename = t;
+ n->val.type = T_String;
+ n->val.val.str = "now";
+ n->typename = t;
- t->name = xlateSqlType("timestamp");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("timestamp");
+ t->setof = FALSE;
+ t->typmod = -1;
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 627:
+ break;
+ }
+ case 627:
#line 3367 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- A_Const *s = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ FuncCall *n = makeNode(FuncCall);
+ A_Const *s = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->funcname = xlateSqlType("timestamp");
- n->args = lcons(s, NIL);
+ n->funcname = xlateSqlType("timestamp");
+ n->args = lcons(s, NIL);
- s->val.type = T_String;
- s->val.val.str = "now";
- s->typename = t;
+ s->val.type = T_String;
+ s->val.val.str = "now";
+ s->typename = t;
- t->name = xlateSqlType("timestamp");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("timestamp");
+ t->setof = FALSE;
+ t->typmod = -1;
- if (yyvsp[-1].ival != 0)
- elog(NOTICE,"CURRENT_TIMESTAMP(%d) precision not implemented; zero used instead",yyvsp[-1].ival);
+ if (yyvsp[-1].ival != 0)
+ elog(NOTICE, "CURRENT_TIMESTAMP(%d) precision not implemented; zero used instead", yyvsp[-1].ival);
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 628:
+ break;
+ }
+ case 628:
#line 3389 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "getpgusername";
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "getpgusername";
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 629:
+ break;
+ }
+ case 629:
#line 3396 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "getpgusername";
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "getpgusername";
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 630:
+ break;
+ }
+ case 630:
#line 3403 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = NIL;
- n->useor = false;
- n->oper = NIL;
- n->subLinkType = EXISTS_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = NIL;
+ n->useor = false;
+ n->oper = NIL;
+ n->subLinkType = EXISTS_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 631:
+ break;
+ }
+ case 631:
#line 3413 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "date_part";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "date_part";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 632:
+ break;
+ }
+ case 632:
#line 3420 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "strpos";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "strpos";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 633:
+ break;
+ }
+ case 633:
#line 3427 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "substr";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "substr";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 634:
+ break;
+ }
+ case 634:
#line 3435 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "btrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "btrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 635:
+ break;
+ }
+ case 635:
#line 3442 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "ltrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "ltrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 636:
+ break;
+ }
+ case 636:
#line 3449 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "rtrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "rtrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 637:
+ break;
+ }
+ case 637:
#line 3456 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "btrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "btrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 638:
+ break;
+ }
+ case 638:
#line 3463 "gram.y"
-{ yyval.node = makeA_Expr(ISNULL, NULL, yyvsp[-1].node, NULL); ;
- break;}
-case 639:
+ {
+ yyval.node = makeA_Expr(ISNULL, NULL, yyvsp[-1].node, NULL);;
+ break;
+ }
+ case 639:
#line 3465 "gram.y"
-{ yyval.node = makeA_Expr(ISNULL, NULL, yyvsp[-2].node, NULL); ;
- break;}
-case 640:
+ {
+ yyval.node = makeA_Expr(ISNULL, NULL, yyvsp[-2].node, NULL);;
+ break;
+ }
+ case 640:
#line 3467 "gram.y"
-{ yyval.node = makeA_Expr(NOTNULL, NULL, yyvsp[-1].node, NULL); ;
- break;}
-case 641:
+ {
+ yyval.node = makeA_Expr(NOTNULL, NULL, yyvsp[-1].node, NULL);;
+ break;
+ }
+ case 641:
#line 3469 "gram.y"
-{ yyval.node = makeA_Expr(NOTNULL, NULL, yyvsp[-3].node, NULL); ;
- break;}
-case 642:
+ {
+ yyval.node = makeA_Expr(NOTNULL, NULL, yyvsp[-3].node, NULL);;
+ break;
+ }
+ case 642:
#line 3476 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = "t";
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("bool");
- n->typename->typmod = -1;
- yyval.node = makeA_Expr(OP, "=", yyvsp[-2].node,(Node *)n);
- ;
- break;}
-case 643:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = "t";
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("bool");
+ n->typename->typmod = -1;
+ yyval.node = makeA_Expr(OP, "=", yyvsp[-2].node, (Node *) n);
+ ;
+ break;
+ }
+ case 643:
#line 3486 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = "t";
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("bool");
- n->typename->typmod = -1;
- yyval.node = makeA_Expr(OP, "=", yyvsp[-3].node,(Node *)n);
- ;
- break;}
-case 644:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = "t";
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("bool");
+ n->typename->typmod = -1;
+ yyval.node = makeA_Expr(OP, "=", yyvsp[-3].node, (Node *) n);
+ ;
+ break;
+ }
+ case 644:
#line 3496 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = "f";
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("bool");
- n->typename->typmod = -1;
- yyval.node = makeA_Expr(OP, "=", yyvsp[-2].node,(Node *)n);
- ;
- break;}
-case 645:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = "f";
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("bool");
+ n->typename->typmod = -1;
+ yyval.node = makeA_Expr(OP, "=", yyvsp[-2].node, (Node *) n);
+ ;
+ break;
+ }
+ case 645:
#line 3506 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = "f";
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("bool");
- n->typename->typmod = -1;
- yyval.node = makeA_Expr(OP, "=", yyvsp[-3].node,(Node *)n);
- ;
- break;}
-case 646:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = "f";
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("bool");
+ n->typename->typmod = -1;
+ yyval.node = makeA_Expr(OP, "=", yyvsp[-3].node, (Node *) n);
+ ;
+ break;
+ }
+ case 646:
#line 3516 "gram.y"
-{
- yyval.node = makeA_Expr(AND, NULL,
- makeA_Expr(OP, ">=", yyvsp[-4].node, yyvsp[-2].node),
- makeA_Expr(OP, "<=", yyvsp[-4].node, yyvsp[0].node));
+ {
+ yyval.node = makeA_Expr(AND, NULL,
+ makeA_Expr(OP, ">=", yyvsp[-4].node, yyvsp[-2].node),
+ makeA_Expr(OP, "<=", yyvsp[-4].node, yyvsp[0].node));
;
- break;}
-case 647:
+ break;
+ }
+ case 647:
#line 3522 "gram.y"
-{
- yyval.node = makeA_Expr(OR, NULL,
- makeA_Expr(OP, "<", yyvsp[-5].node, yyvsp[-2].node),
- makeA_Expr(OP, ">", yyvsp[-5].node, yyvsp[0].node));
+ {
+ yyval.node = makeA_Expr(OR, NULL,
+ makeA_Expr(OP, "<", yyvsp[-5].node, yyvsp[-2].node),
+ makeA_Expr(OP, ">", yyvsp[-5].node, yyvsp[0].node));
;
- break;}
-case 648:
+ break;
+ }
+ case 648:
#line 3527 "gram.y"
-{ saved_In_Expr = lcons(yyvsp[-1].node,saved_In_Expr); ;
- break;}
-case 649:
+ {
+ saved_In_Expr = lcons(yyvsp[-1].node, saved_In_Expr);;
+ break;
+ }
+ case 649:
#line 3528 "gram.y"
-{
- saved_In_Expr = lnext(saved_In_Expr);
- if (nodeTag(yyvsp[-1].node) == T_SubLink)
- {
- SubLink *n = (SubLink *)yyvsp[-1].node;
- n->lefthand = lcons(yyvsp[-5].node, NIL);
- n->oper = lcons("=",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- yyval.node = (Node *)n;
- }
- else yyval.node = yyvsp[-1].node;
+ {
+ saved_In_Expr = lnext(saved_In_Expr);
+ if (nodeTag(yyvsp[-1].node) == T_SubLink)
+ {
+ SubLink *n = (SubLink *) yyvsp[-1].node;
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("=", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ yyval.node = (Node *) n;
+ }
+ else
+ yyval.node = yyvsp[-1].node;
;
- break;}
-case 650:
+ break;
+ }
+ case 650:
#line 3541 "gram.y"
-{ saved_In_Expr = lcons(yyvsp[-2].node,saved_In_Expr); ;
- break;}
-case 651:
+ {
+ saved_In_Expr = lcons(yyvsp[-2].node, saved_In_Expr);;
+ break;
+ }
+ case 651:
#line 3542 "gram.y"
-{
- saved_In_Expr = lnext(saved_In_Expr);
- if (nodeTag(yyvsp[-1].node) == T_SubLink)
- {
- SubLink *n = (SubLink *)yyvsp[-1].node;
- n->lefthand = lcons(yyvsp[-6].node, NIL);
- n->oper = lcons("<>",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- yyval.node = (Node *)n;
- }
- else yyval.node = yyvsp[-1].node;
+ {
+ saved_In_Expr = lnext(saved_In_Expr);
+ if (nodeTag(yyvsp[-1].node) == T_SubLink)
+ {
+ SubLink *n = (SubLink *) yyvsp[-1].node;
+
+ n->lefthand = lcons(yyvsp[-6].node, NIL);
+ n->oper = lcons("<>", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ yyval.node = (Node *) n;
+ }
+ else
+ yyval.node = yyvsp[-1].node;
;
- break;}
-case 652:
+ break;
+ }
+ case 652:
#line 3556 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons(yyvsp[-3].str,NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons(yyvsp[-3].str, NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 653:
+ break;
+ }
+ case 653:
#line 3566 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons("+",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons("+", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 654:
+ break;
+ }
+ case 654:
#line 3576 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons("-",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons("-", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 655:
+ break;
+ }
+ case 655:
#line 3586 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons("/",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons("/", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 656:
+ break;
+ }
+ case 656:
#line 3596 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons("*",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons("*", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 657:
+ break;
+ }
+ case 657:
#line 3606 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons("<",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons("<", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 658:
+ break;
+ }
+ case 658:
#line 3616 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons(">",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons(">", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 659:
+ break;
+ }
+ case 659:
#line 3626 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-4].node, NULL);
- n->oper = lcons("=",NIL);
- n->useor = false;
- n->subLinkType = EXPR_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-4].node, NULL);
+ n->oper = lcons("=", NIL);
+ n->useor = false;
+ n->subLinkType = EXPR_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 660:
+ break;
+ }
+ case 660:
#line 3636 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons(yyvsp[-4].str,NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons(yyvsp[-4].str, NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 661:
+ break;
+ }
+ case 661:
#line 3646 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons("+",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("+", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 662:
+ break;
+ }
+ case 662:
#line 3656 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons("-",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("-", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 663:
+ break;
+ }
+ case 663:
#line 3666 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons("/",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("/", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 664:
+ break;
+ }
+ case 664:
#line 3676 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons("*",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("*", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 665:
+ break;
+ }
+ case 665:
#line 3686 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons("<",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("<", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 666:
+ break;
+ }
+ case 666:
#line 3696 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons(">",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons(">", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 667:
+ break;
+ }
+ case 667:
#line 3706 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node,NIL);
- n->oper = lcons("=",NIL);
- n->useor = false;
- n->subLinkType = ANY_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NIL);
+ n->oper = lcons("=", NIL);
+ n->useor = false;
+ n->subLinkType = ANY_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 668:
+ break;
+ }
+ case 668:
#line 3716 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons(yyvsp[-4].str,NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons(yyvsp[-4].str, NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 669:
+ break;
+ }
+ case 669:
#line 3726 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons("+",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons("+", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 670:
+ break;
+ }
+ case 670:
#line 3736 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons("-",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons("-", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 671:
+ break;
+ }
+ case 671:
#line 3746 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons("/",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons("/", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 672:
+ break;
+ }
+ case 672:
#line 3756 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons("*",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons("*", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 673:
+ break;
+ }
+ case 673:
#line 3766 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons("<",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons("<", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 674:
+ break;
+ }
+ case 674:
#line 3776 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons(">",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons(">", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 675:
+ break;
+ }
+ case 675:
#line 3786 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->lefthand = lcons(yyvsp[-5].node, NULL);
- n->oper = lcons("=",NIL);
- n->useor = false;
- n->subLinkType = ALL_SUBLINK;
- n->subselect = yyvsp[-1].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->lefthand = lcons(yyvsp[-5].node, NULL);
+ n->oper = lcons("=", NIL);
+ n->useor = false;
+ n->subLinkType = ALL_SUBLINK;
+ n->subselect = yyvsp[-1].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 676:
+ break;
+ }
+ case 676:
#line 3796 "gram.y"
-{ yyval.node = makeA_Expr(AND, NULL, yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 677:
+ {
+ yyval.node = makeA_Expr(AND, NULL, yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 677:
#line 3798 "gram.y"
-{ yyval.node = makeA_Expr(OR, NULL, yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 678:
+ {
+ yyval.node = makeA_Expr(OR, NULL, yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 678:
#line 3800 "gram.y"
-{ yyval.node = makeA_Expr(NOT, NULL, NULL, yyvsp[0].node); ;
- break;}
-case 679:
+ {
+ yyval.node = makeA_Expr(NOT, NULL, NULL, yyvsp[0].node);;
+ break;
+ }
+ case 679:
#line 3810 "gram.y"
-{
- yyvsp[-1].attr->indirection = yyvsp[0].list;
- yyval.node = (Node *)yyvsp[-1].attr;
+ {
+ yyvsp[-1].attr->indirection = yyvsp[0].list;
+ yyval.node = (Node *) yyvsp[-1].attr;
;
- break;}
-case 680:
+ break;
+ }
+ case 680:
#line 3815 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 681:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 681:
#line 3817 "gram.y"
-{
- /* could be a column name or a relation_name */
- Ident *n = makeNode(Ident);
- n->name = yyvsp[0].str;
- n->indirection = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 682:
+ {
+ /* could be a column name or a relation_name */
+ Ident *n = makeNode(Ident);
+
+ n->name = yyvsp[0].str;
+ n->indirection = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 682:
#line 3825 "gram.y"
-{ yyval.node = makeA_Expr(OP, "-", NULL, yyvsp[0].node); ;
- break;}
-case 683:
+ {
+ yyval.node = makeA_Expr(OP, "-", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 683:
#line 3827 "gram.y"
-{ yyval.node = makeA_Expr(OP, "+", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 684:
+ {
+ yyval.node = makeA_Expr(OP, "+", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 684:
#line 3829 "gram.y"
-{ yyval.node = makeA_Expr(OP, "-", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 685:
+ {
+ yyval.node = makeA_Expr(OP, "-", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 685:
#line 3831 "gram.y"
-{ yyval.node = makeA_Expr(OP, "/", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 686:
+ {
+ yyval.node = makeA_Expr(OP, "/", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 686:
#line 3833 "gram.y"
-{ yyval.node = makeA_Expr(OP, "*", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 687:
+ {
+ yyval.node = makeA_Expr(OP, "*", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 687:
#line 3835 "gram.y"
-{ yyval.node = makeA_Expr(OP, ":", NULL, yyvsp[0].node); ;
- break;}
-case 688:
+ {
+ yyval.node = makeA_Expr(OP, ":", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 688:
#line 3837 "gram.y"
-{ yyval.node = makeA_Expr(OP, ";", NULL, yyvsp[0].node); ;
- break;}
-case 689:
+ {
+ yyval.node = makeA_Expr(OP, ";", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 689:
#line 3839 "gram.y"
-{ yyval.node = makeA_Expr(OP, "|", NULL, yyvsp[0].node); ;
- break;}
-case 690:
+ {
+ yyval.node = makeA_Expr(OP, "|", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 690:
#line 3841 "gram.y"
-{
- yyval.node = (Node *)yyvsp[-2].node;
- /* AexprConst can be either A_Const or ParamNo */
- if (nodeTag(yyvsp[-2].node) == T_A_Const) {
- ((A_Const *)yyvsp[-2].node)->typename = yyvsp[0].typnam;
- } else if (nodeTag(yyvsp[-2].node) == T_Param) {
- ((ParamNo *)yyvsp[-2].node)->typename = yyvsp[0].typnam;
+ {
+ yyval.node = (Node *) yyvsp[-2].node;
+ /* AexprConst can be either A_Const or ParamNo */
+ if (nodeTag(yyvsp[-2].node) == T_A_Const)
+ ((A_Const *) yyvsp[-2].node)->typename = yyvsp[0].typnam;
+ else if (nodeTag(yyvsp[-2].node) == T_Param)
+ {
+ ((ParamNo *) yyvsp[-2].node)->typename = yyvsp[0].typnam;
/* otherwise, try to transform to a function call */
- } else {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[0].typnam->name;
- n->args = lcons(yyvsp[-2].node,NIL);
- yyval.node = (Node *)n;
- }
+ }
+ else
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[0].typnam->name;
+ n->args = lcons(yyvsp[-2].node, NIL);
+ yyval.node = (Node *) n;
+ }
;
- break;}
-case 691:
+ break;
+ }
+ case 691:
#line 3857 "gram.y"
-{
- yyval.node = (Node *)yyvsp[-3].node;
- /* AexprConst can be either A_Const or ParamNo */
- if (nodeTag(yyvsp[-3].node) == T_A_Const) {
- ((A_Const *)yyvsp[-3].node)->typename = yyvsp[-1].typnam;
- } else if (nodeTag(yyvsp[-3].node) == T_Param) {
- ((ParamNo *)yyvsp[-3].node)->typename = yyvsp[-1].typnam;
+ {
+ yyval.node = (Node *) yyvsp[-3].node;
+ /* AexprConst can be either A_Const or ParamNo */
+ if (nodeTag(yyvsp[-3].node) == T_A_Const)
+ ((A_Const *) yyvsp[-3].node)->typename = yyvsp[-1].typnam;
+ else if (nodeTag(yyvsp[-3].node) == T_Param)
+ {
+ ((ParamNo *) yyvsp[-3].node)->typename = yyvsp[-1].typnam;
/* otherwise, try to transform to a function call */
- } else {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-1].typnam->name;
- n->args = lcons(yyvsp[-3].node,NIL);
- yyval.node = (Node *)n;
- }
+ }
+ else
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-1].typnam->name;
+ n->args = lcons(yyvsp[-3].node, NIL);
+ yyval.node = (Node *) n;
+ }
;
- break;}
-case 692:
+ break;
+ }
+ case 692:
#line 3873 "gram.y"
-{ yyval.node = yyvsp[-1].node; ;
- break;}
-case 693:
+ {
+ yyval.node = yyvsp[-1].node;;
+ break;
+ }
+ case 693:
#line 3875 "gram.y"
-{ yyval.node = makeIndexable(yyvsp[-1].str,yyvsp[-2].node,yyvsp[0].node); ;
- break;}
-case 694:
+ {
+ yyval.node = makeIndexable(yyvsp[-1].str, yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 694:
#line 3877 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[-1].str, NULL, yyvsp[0].node); ;
- break;}
-case 695:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[-1].str, NULL, yyvsp[0].node);;
+ break;
+ }
+ case 695:
#line 3879 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[0].str, yyvsp[-1].node, NULL); ;
- break;}
-case 696:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[0].str, yyvsp[-1].node, NULL);;
+ break;
+ }
+ case 696:
#line 3881 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-2].str;
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-2].str;
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 697:
+ break;
+ }
+ case 697:
#line 3888 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-3].str;
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-3].str;
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 698:
+ break;
+ }
+ case 698:
#line 3895 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ A_Const *n = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->val.type = T_String;
- n->val.val.str = "now";
- n->typename = t;
+ n->val.type = T_String;
+ n->val.val.str = "now";
+ n->typename = t;
- t->name = xlateSqlType("date");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("date");
+ t->setof = FALSE;
+ t->typmod = -1;
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 699:
+ break;
+ }
+ case 699:
#line 3910 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ A_Const *n = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->val.type = T_String;
- n->val.val.str = "now";
- n->typename = t;
+ n->val.type = T_String;
+ n->val.val.str = "now";
+ n->typename = t;
- t->name = xlateSqlType("time");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("time");
+ t->setof = FALSE;
+ t->typmod = -1;
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 700:
+ break;
+ }
+ case 700:
#line 3925 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- A_Const *s = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ FuncCall *n = makeNode(FuncCall);
+ A_Const *s = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->funcname = xlateSqlType("time");
- n->args = lcons(s, NIL);
+ n->funcname = xlateSqlType("time");
+ n->args = lcons(s, NIL);
- s->val.type = T_String;
- s->val.val.str = "now";
- s->typename = t;
+ s->val.type = T_String;
+ s->val.val.str = "now";
+ s->typename = t;
- t->name = xlateSqlType("time");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("time");
+ t->setof = FALSE;
+ t->typmod = -1;
- if (yyvsp[-1].ival != 0)
- elog(NOTICE,"CURRENT_TIME(%d) precision not implemented; zero used instead",yyvsp[-1].ival);
+ if (yyvsp[-1].ival != 0)
+ elog(NOTICE, "CURRENT_TIME(%d) precision not implemented; zero used instead", yyvsp[-1].ival);
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 701:
+ break;
+ }
+ case 701:
#line 3947 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ A_Const *n = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->val.type = T_String;
- n->val.val.str = "now";
- n->typename = t;
+ n->val.type = T_String;
+ n->val.val.str = "now";
+ n->typename = t;
- t->name = xlateSqlType("timestamp");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("timestamp");
+ t->setof = FALSE;
+ t->typmod = -1;
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 702:
+ break;
+ }
+ case 702:
#line 3962 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- A_Const *s = makeNode(A_Const);
- TypeName *t = makeNode(TypeName);
+ {
+ FuncCall *n = makeNode(FuncCall);
+ A_Const *s = makeNode(A_Const);
+ TypeName *t = makeNode(TypeName);
- n->funcname = xlateSqlType("timestamp");
- n->args = lcons(s, NIL);
+ n->funcname = xlateSqlType("timestamp");
+ n->args = lcons(s, NIL);
- s->val.type = T_String;
- s->val.val.str = "now";
- s->typename = t;
+ s->val.type = T_String;
+ s->val.val.str = "now";
+ s->typename = t;
- t->name = xlateSqlType("timestamp");
- t->setof = FALSE;
- t->typmod = -1;
+ t->name = xlateSqlType("timestamp");
+ t->setof = FALSE;
+ t->typmod = -1;
- if (yyvsp[-1].ival != 0)
- elog(NOTICE,"CURRENT_TIMESTAMP(%d) precision not implemented; zero used instead",yyvsp[-1].ival);
+ if (yyvsp[-1].ival != 0)
+ elog(NOTICE, "CURRENT_TIMESTAMP(%d) precision not implemented; zero used instead", yyvsp[-1].ival);
- yyval.node = (Node *)n;
+ yyval.node = (Node *) n;
;
- break;}
-case 703:
+ break;
+ }
+ case 703:
#line 3984 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "getpgusername";
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "getpgusername";
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 704:
+ break;
+ }
+ case 704:
#line 3991 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "getpgusername";
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "getpgusername";
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 705:
+ break;
+ }
+ case 705:
#line 3998 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "strpos";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "strpos";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 706:
+ break;
+ }
+ case 706:
#line 4005 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "substr";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "substr";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 707:
+ break;
+ }
+ case 707:
#line 4013 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "btrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "btrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 708:
+ break;
+ }
+ case 708:
#line 4020 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "ltrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "ltrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 709:
+ break;
+ }
+ case 709:
#line 4027 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "rtrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "rtrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 710:
+ break;
+ }
+ case 710:
#line 4034 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "btrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "btrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 711:
+ break;
+ }
+ case 711:
#line 4043 "gram.y"
-{
- A_Indices *ai = makeNode(A_Indices);
- ai->lidx = NULL;
- ai->uidx = yyvsp[-2].node;
- yyval.list = lcons(ai, yyvsp[0].list);
+ {
+ A_Indices *ai = makeNode(A_Indices);
+
+ ai->lidx = NULL;
+ ai->uidx = yyvsp[-2].node;
+ yyval.list = lcons(ai, yyvsp[0].list);
;
- break;}
-case 712:
+ break;
+ }
+ case 712:
#line 4050 "gram.y"
-{
- A_Indices *ai = makeNode(A_Indices);
- ai->lidx = yyvsp[-4].node;
- ai->uidx = yyvsp[-2].node;
- yyval.list = lcons(ai, yyvsp[0].list);
+ {
+ A_Indices *ai = makeNode(A_Indices);
+
+ ai->lidx = yyvsp[-4].node;
+ ai->uidx = yyvsp[-2].node;
+ yyval.list = lcons(ai, yyvsp[0].list);
;
- break;}
-case 713:
+ break;
+ }
+ case 713:
#line 4057 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 714:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 714:
#line 4061 "gram.y"
-{ yyval.list = lcons(yyvsp[0].node, NIL); ;
- break;}
-case 715:
+ {
+ yyval.list = lcons(yyvsp[0].node, NIL);;
+ break;
+ }
+ case 715:
#line 4063 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node); ;
- break;}
-case 716:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);;
+ break;
+ }
+ case 716:
#line 4065 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node); ;
- break;}
-case 717:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].node);;
+ break;
+ }
+ case 717:
#line 4069 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = yyvsp[-2].str;
- yyval.list = lappend(lcons((Node *)n,NIL), yyvsp[0].node);
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = yyvsp[-2].str;
+ yyval.list = lappend(lcons((Node *) n, NIL), yyvsp[0].node);
;
- break;}
-case 718:
+ break;
+ }
+ case 718:
#line 4076 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 719:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 719:
#line 4079 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 720:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 720:
#line 4080 "gram.y"
-{ yyval.str = "tz_hour"; ;
- break;}
-case 721:
+ {
+ yyval.str = "tz_hour";;
+ break;
+ }
+ case 721:
#line 4081 "gram.y"
-{ yyval.str = "tz_minute"; ;
- break;}
-case 722:
+ {
+ yyval.str = "tz_minute";;
+ break;
+ }
+ case 722:
#line 4085 "gram.y"
-{ yyval.list = makeList(yyvsp[0].node, yyvsp[-2].node, -1); ;
- break;}
-case 723:
+ {
+ yyval.list = makeList(yyvsp[0].node, yyvsp[-2].node, -1);;
+ break;
+ }
+ case 723:
#line 4087 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 724:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 724:
#line 4091 "gram.y"
-{
- yyvsp[-1].attr->indirection = yyvsp[0].list;
- yyval.node = (Node *)yyvsp[-1].attr;
+ {
+ yyvsp[-1].attr->indirection = yyvsp[0].list;
+ yyval.node = (Node *) yyvsp[-1].attr;
;
- break;}
-case 725:
+ break;
+ }
+ case 725:
#line 4096 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 726:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 726:
#line 4098 "gram.y"
-{ yyval.node = makeA_Expr(OP, "-", NULL, yyvsp[0].node); ;
- break;}
-case 727:
+ {
+ yyval.node = makeA_Expr(OP, "-", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 727:
#line 4100 "gram.y"
-{ yyval.node = makeA_Expr(OP, "+", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 728:
+ {
+ yyval.node = makeA_Expr(OP, "+", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 728:
#line 4102 "gram.y"
-{ yyval.node = makeA_Expr(OP, "-", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 729:
+ {
+ yyval.node = makeA_Expr(OP, "-", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 729:
#line 4104 "gram.y"
-{ yyval.node = makeA_Expr(OP, "/", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 730:
+ {
+ yyval.node = makeA_Expr(OP, "/", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 730:
#line 4106 "gram.y"
-{ yyval.node = makeA_Expr(OP, "*", yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 731:
+ {
+ yyval.node = makeA_Expr(OP, "*", yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 731:
#line 4108 "gram.y"
-{ yyval.node = makeA_Expr(OP, "|", NULL, yyvsp[0].node); ;
- break;}
-case 732:
+ {
+ yyval.node = makeA_Expr(OP, "|", NULL, yyvsp[0].node);;
+ break;
+ }
+ case 732:
#line 4110 "gram.y"
-{
- yyval.node = (Node *)yyvsp[-2].node;
- /* AexprConst can be either A_Const or ParamNo */
- if (nodeTag(yyvsp[-2].node) == T_A_Const) {
- ((A_Const *)yyvsp[-2].node)->typename = yyvsp[0].typnam;
- } else if (nodeTag(yyvsp[-2].node) == T_Param) {
- ((ParamNo *)yyvsp[-2].node)->typename = yyvsp[0].typnam;
+ {
+ yyval.node = (Node *) yyvsp[-2].node;
+ /* AexprConst can be either A_Const or ParamNo */
+ if (nodeTag(yyvsp[-2].node) == T_A_Const)
+ ((A_Const *) yyvsp[-2].node)->typename = yyvsp[0].typnam;
+ else if (nodeTag(yyvsp[-2].node) == T_Param)
+ {
+ ((ParamNo *) yyvsp[-2].node)->typename = yyvsp[0].typnam;
/* otherwise, try to transform to a function call */
- } else {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[0].typnam->name;
- n->args = lcons(yyvsp[-2].node,NIL);
- yyval.node = (Node *)n;
- }
+ }
+ else
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[0].typnam->name;
+ n->args = lcons(yyvsp[-2].node, NIL);
+ yyval.node = (Node *) n;
+ }
;
- break;}
-case 733:
+ break;
+ }
+ case 733:
#line 4126 "gram.y"
-{
- yyval.node = (Node *)yyvsp[-3].node;
- /* AexprConst can be either A_Const or ParamNo */
- if (nodeTag(yyvsp[-3].node) == T_A_Const) {
- ((A_Const *)yyvsp[-3].node)->typename = yyvsp[-1].typnam;
- } else if (nodeTag(yyvsp[-3].node) == T_Param) {
- ((ParamNo *)yyvsp[-3].node)->typename = yyvsp[-1].typnam;
+ {
+ yyval.node = (Node *) yyvsp[-3].node;
+ /* AexprConst can be either A_Const or ParamNo */
+ if (nodeTag(yyvsp[-3].node) == T_A_Const)
+ ((A_Const *) yyvsp[-3].node)->typename = yyvsp[-1].typnam;
+ else if (nodeTag(yyvsp[-3].node) == T_Param)
+ {
+ ((ParamNo *) yyvsp[-3].node)->typename = yyvsp[-1].typnam;
/* otherwise, try to transform to a function call */
- } else {
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-1].typnam->name;
- n->args = lcons(yyvsp[-3].node,NIL);
- yyval.node = (Node *)n;
- }
+ }
+ else
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-1].typnam->name;
+ n->args = lcons(yyvsp[-3].node, NIL);
+ yyval.node = (Node *) n;
+ }
;
- break;}
-case 734:
+ break;
+ }
+ case 734:
#line 4142 "gram.y"
-{ yyval.node = yyvsp[-1].node; ;
- break;}
-case 735:
+ {
+ yyval.node = yyvsp[-1].node;;
+ break;
+ }
+ case 735:
#line 4144 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[-1].str, yyvsp[-2].node, yyvsp[0].node); ;
- break;}
-case 736:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[-1].str, yyvsp[-2].node, yyvsp[0].node);;
+ break;
+ }
+ case 736:
#line 4146 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[-1].str, NULL, yyvsp[0].node); ;
- break;}
-case 737:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[-1].str, NULL, yyvsp[0].node);;
+ break;
+ }
+ case 737:
#line 4148 "gram.y"
-{ yyval.node = makeA_Expr(OP, yyvsp[0].str, yyvsp[-1].node, NULL); ;
- break;}
-case 738:
+ {
+ yyval.node = makeA_Expr(OP, yyvsp[0].str, yyvsp[-1].node, NULL);;
+ break;
+ }
+ case 738:
#line 4150 "gram.y"
-{
- /* could be a column name or a relation_name */
- Ident *n = makeNode(Ident);
- n->name = yyvsp[0].str;
- n->indirection = NULL;
- yyval.node = (Node *)n;
- ;
- break;}
-case 739:
+ {
+ /* could be a column name or a relation_name */
+ Ident *n = makeNode(Ident);
+
+ n->name = yyvsp[0].str;
+ n->indirection = NULL;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 739:
#line 4158 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-2].str;
- n->args = NIL;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-2].str;
+ n->args = NIL;
+ yyval.node = (Node *) n;
;
- break;}
-case 740:
+ break;
+ }
+ case 740:
#line 4165 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = yyvsp[-3].str;
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = yyvsp[-3].str;
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 741:
+ break;
+ }
+ case 741:
#line 4172 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "strpos";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "strpos";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 742:
+ break;
+ }
+ case 742:
#line 4179 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "substr";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "substr";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 743:
+ break;
+ }
+ case 743:
#line 4187 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "btrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "btrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 744:
+ break;
+ }
+ case 744:
#line 4194 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "ltrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "ltrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 745:
+ break;
+ }
+ case 745:
#line 4201 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "rtrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "rtrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 746:
+ break;
+ }
+ case 746:
#line 4208 "gram.y"
-{
- FuncCall *n = makeNode(FuncCall);
- n->funcname = "btrim";
- n->args = yyvsp[-1].list;
- yyval.node = (Node *)n;
+ {
+ FuncCall *n = makeNode(FuncCall);
+
+ n->funcname = "btrim";
+ n->args = yyvsp[-1].list;
+ yyval.node = (Node *) n;
;
- break;}
-case 747:
+ break;
+ }
+ case 747:
#line 4217 "gram.y"
-{
- yyval.list = nconc(nconc(yyvsp[-2].list,yyvsp[-1].list),yyvsp[0].list);
+ {
+ yyval.list = nconc(nconc(yyvsp[-2].list, yyvsp[-1].list), yyvsp[0].list);
;
- break;}
-case 748:
+ break;
+ }
+ case 748:
#line 4221 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 749:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 749:
#line 4225 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 750:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 750:
#line 4227 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_Integer;
- n->val.val.ival = 1;
- yyval.list = lcons((Node *)n,NIL);
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_Integer;
+ n->val.val.ival = 1;
+ yyval.list = lcons((Node *) n, NIL);
;
- break;}
-case 751:
+ break;
+ }
+ case 751:
#line 4236 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 752:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 752:
#line 4238 "gram.y"
-{ yyval.list = NIL; ;
- break;}
-case 753:
+ {
+ yyval.list = NIL;;
+ break;
+ }
+ case 753:
#line 4242 "gram.y"
-{ yyval.list = lappend(yyvsp[0].list, yyvsp[-2].node); ;
- break;}
-case 754:
+ {
+ yyval.list = lappend(yyvsp[0].list, yyvsp[-2].node);;
+ break;
+ }
+ case 754:
#line 4244 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 755:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 755:
#line 4246 "gram.y"
-{ yyval.list = yyvsp[0].list; ;
- break;}
-case 756:
+ {
+ yyval.list = yyvsp[0].list;;
+ break;
+ }
+ case 756:
#line 4250 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->subselect = yyvsp[0].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->subselect = yyvsp[0].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 757:
+ break;
+ }
+ case 757:
#line 4256 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 758:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 758:
#line 4260 "gram.y"
-{ yyval.node = makeA_Expr(OP, "=", lfirst(saved_In_Expr), yyvsp[0].node); ;
- break;}
-case 759:
+ {
+ yyval.node = makeA_Expr(OP, "=", lfirst(saved_In_Expr), yyvsp[0].node);;
+ break;
+ }
+ case 759:
#line 4262 "gram.y"
-{ yyval.node = makeA_Expr(OR, NULL, yyvsp[-2].node,
- makeA_Expr(OP, "=", lfirst(saved_In_Expr), yyvsp[0].node));
+ {
+ yyval.node = makeA_Expr(OR, NULL, yyvsp[-2].node,
+ makeA_Expr(OP, "=", lfirst(saved_In_Expr), yyvsp[0].node));
;
- break;}
-case 760:
+ break;
+ }
+ case 760:
#line 4268 "gram.y"
-{
- SubLink *n = makeNode(SubLink);
- n->subselect = yyvsp[0].node;
- yyval.node = (Node *)n;
+ {
+ SubLink *n = makeNode(SubLink);
+
+ n->subselect = yyvsp[0].node;
+ yyval.node = (Node *) n;
;
- break;}
-case 761:
+ break;
+ }
+ case 761:
#line 4274 "gram.y"
-{ yyval.node = yyvsp[0].node; ;
- break;}
-case 762:
+ {
+ yyval.node = yyvsp[0].node;;
+ break;
+ }
+ case 762:
#line 4278 "gram.y"
-{ yyval.node = makeA_Expr(OP, "<>", lfirst(saved_In_Expr), yyvsp[0].node); ;
- break;}
-case 763:
+ {
+ yyval.node = makeA_Expr(OP, "<>", lfirst(saved_In_Expr), yyvsp[0].node);;
+ break;
+ }
+ case 763:
#line 4280 "gram.y"
-{ yyval.node = makeA_Expr(AND, NULL, yyvsp[-2].node,
- makeA_Expr(OP, "<>", lfirst(saved_In_Expr), yyvsp[0].node));
+ {
+ yyval.node = makeA_Expr(AND, NULL, yyvsp[-2].node,
+ makeA_Expr(OP, "<>", lfirst(saved_In_Expr), yyvsp[0].node));
;
- break;}
-case 764:
+ break;
+ }
+ case 764:
#line 4286 "gram.y"
-{
- yyval.attr = makeNode(Attr);
- yyval.attr->relname = yyvsp[-2].str;
- yyval.attr->paramNo = NULL;
- yyval.attr->attrs = yyvsp[0].list;
- yyval.attr->indirection = NULL;
- ;
- break;}
-case 765:
+ {
+ yyval.attr = makeNode(Attr);
+ yyval.attr->relname = yyvsp[-2].str;
+ yyval.attr->paramNo = NULL;
+ yyval.attr->attrs = yyvsp[0].list;
+ yyval.attr->indirection = NULL;
+ ;
+ break;
+ }
+ case 765:
#line 4294 "gram.y"
-{
- yyval.attr = makeNode(Attr);
- yyval.attr->relname = NULL;
- yyval.attr->paramNo = yyvsp[-2].paramno;
- yyval.attr->attrs = yyvsp[0].list;
- yyval.attr->indirection = NULL;
- ;
- break;}
-case 766:
+ {
+ yyval.attr = makeNode(Attr);
+ yyval.attr->relname = NULL;
+ yyval.attr->paramNo = yyvsp[-2].paramno;
+ yyval.attr->attrs = yyvsp[0].list;
+ yyval.attr->indirection = NULL;
+ ;
+ break;
+ }
+ case 766:
#line 4304 "gram.y"
-{ yyval.list = lcons(makeString(yyvsp[0].str), NIL); ;
- break;}
-case 767:
+ {
+ yyval.list = lcons(makeString(yyvsp[0].str), NIL);;
+ break;
+ }
+ case 767:
#line 4306 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, makeString(yyvsp[0].str)); ;
- break;}
-case 768:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString(yyvsp[0].str));;
+ break;
+ }
+ case 768:
#line 4308 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, makeString("*")); ;
- break;}
-case 769:
+ {
+ yyval.list = lappend(yyvsp[-2].list, makeString("*"));;
+ break;
+ }
+ case 769:
#line 4319 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list,yyvsp[0].target); ;
- break;}
-case 770:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].target);;
+ break;
+ }
+ case 770:
#line 4321 "gram.y"
-{ yyval.list = lcons(yyvsp[0].target, NIL); ;
- break;}
-case 771:
+ {
+ yyval.list = lcons(yyvsp[0].target, NIL);;
+ break;
+ }
+ case 771:
#line 4323 "gram.y"
-{
- ResTarget *rt = makeNode(ResTarget);
- Attr *att = makeNode(Attr);
- att->relname = "*";
- att->paramNo = NULL;
- att->attrs = NULL;
- att->indirection = NIL;
- rt->name = NULL;
- rt->indirection = NULL;
- rt->val = (Node *)att;
- yyval.list = lcons(rt, NIL);
- ;
- break;}
-case 772:
+ {
+ ResTarget *rt = makeNode(ResTarget);
+ Attr *att = makeNode(Attr);
+
+ att->relname = "*";
+ att->paramNo = NULL;
+ att->attrs = NULL;
+ att->indirection = NIL;
+ rt->name = NULL;
+ rt->indirection = NULL;
+ rt->val = (Node *) att;
+ yyval.list = lcons(rt, NIL);
+ ;
+ break;
+ }
+ case 772:
#line 4338 "gram.y"
-{
- yyval.target = makeNode(ResTarget);
- yyval.target->name = yyvsp[-3].str;
- yyval.target->indirection = yyvsp[-2].list;
- yyval.target->val = (Node *)yyvsp[0].node;
+ {
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = yyvsp[-3].str;
+ yyval.target->indirection = yyvsp[-2].list;
+ yyval.target->val = (Node *) yyvsp[0].node;
;
- break;}
-case 773:
+ break;
+ }
+ case 773:
#line 4345 "gram.y"
-{
- yyval.target = makeNode(ResTarget);
- yyval.target->name = NULL;
- yyval.target->indirection = yyvsp[0].list;
- yyval.target->val = (Node *)yyvsp[-1].attr;
+ {
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = NULL;
+ yyval.target->indirection = yyvsp[0].list;
+ yyval.target->val = (Node *) yyvsp[-1].attr;
;
- break;}
-case 774:
+ break;
+ }
+ case 774:
#line 4352 "gram.y"
-{
- Attr *att = makeNode(Attr);
- att->relname = yyvsp[-2].str;
- att->paramNo = NULL;
- att->attrs = lcons(makeString("*"), NIL);
- att->indirection = NIL;
- yyval.target = makeNode(ResTarget);
- yyval.target->name = NULL;
- yyval.target->indirection = NULL;
- yyval.target->val = (Node *)att;
- ;
- break;}
-case 775:
+ {
+ Attr *att = makeNode(Attr);
+
+ att->relname = yyvsp[-2].str;
+ att->paramNo = NULL;
+ att->attrs = lcons(makeString("*"), NIL);
+ att->indirection = NIL;
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = NULL;
+ yyval.target->indirection = NULL;
+ yyval.target->val = (Node *) att;
+ ;
+ break;
+ }
+ case 775:
#line 4371 "gram.y"
-{ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].target); ;
- break;}
-case 776:
+ {
+ yyval.list = lappend(yyvsp[-2].list, yyvsp[0].target);;
+ break;
+ }
+ case 776:
#line 4373 "gram.y"
-{ yyval.list = lcons(yyvsp[0].target, NIL); ;
- break;}
-case 777:
+ {
+ yyval.list = lcons(yyvsp[0].target, NIL);;
+ break;
+ }
+ case 777:
#line 4378 "gram.y"
-{
- yyval.target = makeNode(ResTarget);
- yyval.target->name = yyvsp[0].str;
- yyval.target->indirection = NULL;
- yyval.target->val = (Node *)yyvsp[-2].node;
+ {
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = yyvsp[0].str;
+ yyval.target->indirection = NULL;
+ yyval.target->val = (Node *) yyvsp[-2].node;
;
- break;}
-case 778:
+ break;
+ }
+ case 778:
#line 4385 "gram.y"
-{
- yyval.target = makeNode(ResTarget);
- yyval.target->name = NULL;
- yyval.target->indirection = NULL;
- yyval.target->val = (Node *)yyvsp[0].node;
+ {
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = NULL;
+ yyval.target->indirection = NULL;
+ yyval.target->val = (Node *) yyvsp[0].node;
;
- break;}
-case 779:
+ break;
+ }
+ case 779:
#line 4392 "gram.y"
-{
- Attr *att = makeNode(Attr);
- att->relname = yyvsp[-2].str;
- att->paramNo = NULL;
- att->attrs = lcons(makeString("*"), NIL);
- att->indirection = NIL;
- yyval.target = makeNode(ResTarget);
- yyval.target->name = NULL;
- yyval.target->indirection = NULL;
- yyval.target->val = (Node *)att;
- ;
- break;}
-case 780:
+ {
+ Attr *att = makeNode(Attr);
+
+ att->relname = yyvsp[-2].str;
+ att->paramNo = NULL;
+ att->attrs = lcons(makeString("*"), NIL);
+ att->indirection = NIL;
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = NULL;
+ yyval.target->indirection = NULL;
+ yyval.target->val = (Node *) att;
+ ;
+ break;
+ }
+ case 780:
#line 4404 "gram.y"
-{
- Attr *att = makeNode(Attr);
- att->relname = "*";
- att->paramNo = NULL;
- att->attrs = NULL;
- att->indirection = NIL;
- yyval.target = makeNode(ResTarget);
- yyval.target->name = NULL;
- yyval.target->indirection = NULL;
- yyval.target->val = (Node *)att;
- ;
- break;}
-case 781:
+ {
+ Attr *att = makeNode(Attr);
+
+ att->relname = "*";
+ att->paramNo = NULL;
+ att->attrs = NULL;
+ att->indirection = NIL;
+ yyval.target = makeNode(ResTarget);
+ yyval.target->name = NULL;
+ yyval.target->indirection = NULL;
+ yyval.target->val = (Node *) att;
+ ;
+ break;
+ }
+ case 781:
#line 4417 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 782:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 782:
#line 4418 "gram.y"
-{ yyval.str = NULL; ;
- break;}
-case 783:
+ {
+ yyval.str = NULL;;
+ break;
+ }
+ case 783:
#line 4422 "gram.y"
-{
- yyval.str = yyvsp[0].str;
- StrNCpy(saved_relname, yyvsp[0].str, NAMEDATALEN);
+ {
+ yyval.str = yyvsp[0].str;
+ StrNCpy(saved_relname, yyvsp[0].str, NAMEDATALEN);
;
- break;}
-case 784:
+ break;
+ }
+ case 784:
#line 4427 "gram.y"
-{
- /* disallow refs to variable system tables */
- if (strcmp(LogRelationName, yyvsp[0].str) == 0
- || strcmp(VariableRelationName, yyvsp[0].str) == 0)
- elog(ERROR,"%s cannot be accessed by users",yyvsp[0].str);
- else
- yyval.str = yyvsp[0].str;
- StrNCpy(saved_relname, yyvsp[0].str, NAMEDATALEN);
+ {
+ /* disallow refs to variable system tables */
+ if (strcmp(LogRelationName, yyvsp[0].str) == 0
+ || strcmp(VariableRelationName, yyvsp[0].str) == 0)
+ elog(ERROR, "%s cannot be accessed by users", yyvsp[0].str);
+ else
+ yyval.str = yyvsp[0].str;
+ StrNCpy(saved_relname, yyvsp[0].str, NAMEDATALEN);
;
- break;}
-case 785:
+ break;
+ }
+ case 785:
#line 4438 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 786:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 786:
#line 4439 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 787:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 787:
#line 4440 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 788:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 788:
#line 4441 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 789:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 789:
#line 4442 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 790:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 790:
#line 4448 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 791:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 791:
#line 4449 "gram.y"
-{ yyval.str = xlateSqlFunc(yyvsp[0].str); ;
- break;}
-case 792:
+ {
+ yyval.str = xlateSqlFunc(yyvsp[0].str);;
+ break;
+ }
+ case 792:
#line 4451 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 793:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 793:
#line 4452 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 794:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 794:
#line 4458 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_Integer;
- n->val.val.ival = yyvsp[0].ival;
- yyval.node = (Node *)n;
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_Integer;
+ n->val.val.ival = yyvsp[0].ival;
+ yyval.node = (Node *) n;
;
- break;}
-case 795:
+ break;
+ }
+ case 795:
#line 4465 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_Float;
- n->val.val.dval = yyvsp[0].dval;
- yyval.node = (Node *)n;
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_Float;
+ n->val.val.dval = yyvsp[0].dval;
+ yyval.node = (Node *) n;
;
- break;}
-case 796:
+ break;
+ }
+ case 796:
#line 4472 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = yyvsp[0].str;
- yyval.node = (Node *)n;
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = yyvsp[0].str;
+ yyval.node = (Node *) n;
;
- break;}
-case 797:
+ break;
+ }
+ case 797:
#line 4479 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->typename = yyvsp[-1].typnam;
- n->val.type = T_String;
- n->val.val.str = yyvsp[0].str;
- yyval.node = (Node *)n;
- ;
- break;}
-case 798:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->typename = yyvsp[-1].typnam;
+ n->val.type = T_String;
+ n->val.val.str = yyvsp[0].str;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 798:
#line 4487 "gram.y"
-{ yyval.node = (Node *)yyvsp[0].paramno; ;
- break;}
-case 799:
+ {
+ yyval.node = (Node *) yyvsp[0].paramno;;
+ break;
+ }
+ case 799:
#line 4489 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = "t";
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("bool");
- n->typename->typmod = -1;
- yyval.node = (Node *)n;
- ;
- break;}
-case 800:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = "t";
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("bool");
+ n->typename->typmod = -1;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 800:
#line 4499 "gram.y"
-{
- A_Const *n = makeNode(A_Const);
- n->val.type = T_String;
- n->val.val.str = "f";
- n->typename = makeNode(TypeName);
- n->typename->name = xlateSqlType("bool");
- n->typename->typmod = -1;
- yyval.node = (Node *)n;
- ;
- break;}
-case 801:
+ {
+ A_Const *n = makeNode(A_Const);
+
+ n->val.type = T_String;
+ n->val.val.str = "f";
+ n->typename = makeNode(TypeName);
+ n->typename->name = xlateSqlType("bool");
+ n->typename->typmod = -1;
+ yyval.node = (Node *) n;
+ ;
+ break;
+ }
+ case 801:
#line 4511 "gram.y"
-{
- yyval.paramno = makeNode(ParamNo);
- yyval.paramno->number = yyvsp[0].ival;
+ {
+ yyval.paramno = makeNode(ParamNo);
+ yyval.paramno->number = yyvsp[0].ival;
;
- break;}
-case 802:
+ break;
+ }
+ case 802:
#line 4517 "gram.y"
-{ yyval.ival = yyvsp[0].ival; ;
- break;}
-case 803:
+ {
+ yyval.ival = yyvsp[0].ival;;
+ break;
+ }
+ case 803:
#line 4518 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 804:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 804:
#line 4519 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 805:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 805:
#line 4527 "gram.y"
-{ yyval.str = xlateSqlType(yyvsp[0].str); ;
- break;}
-case 806:
+ {
+ yyval.str = xlateSqlType(yyvsp[0].str);;
+ break;
+ }
+ case 806:
#line 4529 "gram.y"
-{ yyval.str = xlateSqlType(yyvsp[0].str); ;
- break;}
-case 807:
+ {
+ yyval.str = xlateSqlType(yyvsp[0].str);;
+ break;
+ }
+ case 807:
#line 4531 "gram.y"
-{ yyval.str = xlateSqlType(yyvsp[0].str); ;
- break;}
-case 808:
+ {
+ yyval.str = xlateSqlType(yyvsp[0].str);;
+ break;
+ }
+ case 808:
#line 4541 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 809:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 809:
#line 4542 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 810:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 810:
#line 4543 "gram.y"
-{ yyval.str = "action"; ;
- break;}
-case 811:
+ {
+ yyval.str = "action";;
+ break;
+ }
+ case 811:
#line 4544 "gram.y"
-{ yyval.str = "cache"; ;
- break;}
-case 812:
+ {
+ yyval.str = "cache";;
+ break;
+ }
+ case 812:
#line 4545 "gram.y"
-{ yyval.str = "cycle"; ;
- break;}
-case 813:
+ {
+ yyval.str = "cycle";;
+ break;
+ }
+ case 813:
#line 4546 "gram.y"
-{ yyval.str = "database"; ;
- break;}
-case 814:
+ {
+ yyval.str = "database";;
+ break;
+ }
+ case 814:
#line 4547 "gram.y"
-{ yyval.str = "delimiters"; ;
- break;}
-case 815:
+ {
+ yyval.str = "delimiters";;
+ break;
+ }
+ case 815:
#line 4548 "gram.y"
-{ yyval.str = "double"; ;
- break;}
-case 816:
+ {
+ yyval.str = "double";;
+ break;
+ }
+ case 816:
#line 4549 "gram.y"
-{ yyval.str = "each"; ;
- break;}
-case 817:
+ {
+ yyval.str = "each";;
+ break;
+ }
+ case 817:
#line 4550 "gram.y"
-{ yyval.str = "encoding"; ;
- break;}
-case 818:
+ {
+ yyval.str = "encoding";;
+ break;
+ }
+ case 818:
#line 4551 "gram.y"
-{ yyval.str = "function"; ;
- break;}
-case 819:
+ {
+ yyval.str = "function";;
+ break;
+ }
+ case 819:
#line 4552 "gram.y"
-{ yyval.str = "increment"; ;
- break;}
-case 820:
+ {
+ yyval.str = "increment";;
+ break;
+ }
+ case 820:
#line 4553 "gram.y"
-{ yyval.str = "index"; ;
- break;}
-case 821:
+ {
+ yyval.str = "index";;
+ break;
+ }
+ case 821:
#line 4554 "gram.y"
-{ yyval.str = "key"; ;
- break;}
-case 822:
+ {
+ yyval.str = "key";;
+ break;
+ }
+ case 822:
#line 4555 "gram.y"
-{ yyval.str = "language"; ;
- break;}
-case 823:
+ {
+ yyval.str = "language";;
+ break;
+ }
+ case 823:
#line 4556 "gram.y"
-{ yyval.str = "location"; ;
- break;}
-case 824:
+ {
+ yyval.str = "location";;
+ break;
+ }
+ case 824:
#line 4557 "gram.y"
-{ yyval.str = "match"; ;
- break;}
-case 825:
+ {
+ yyval.str = "match";;
+ break;
+ }
+ case 825:
#line 4558 "gram.y"
-{ yyval.str = "maxvalue"; ;
- break;}
-case 826:
+ {
+ yyval.str = "maxvalue";;
+ break;
+ }
+ case 826:
#line 4559 "gram.y"
-{ yyval.str = "minvalue"; ;
- break;}
-case 827:
+ {
+ yyval.str = "minvalue";;
+ break;
+ }
+ case 827:
#line 4560 "gram.y"
-{ yyval.str = "operator"; ;
- break;}
-case 828:
+ {
+ yyval.str = "operator";;
+ break;
+ }
+ case 828:
#line 4561 "gram.y"
-{ yyval.str = "option"; ;
- break;}
-case 829:
+ {
+ yyval.str = "option";;
+ break;
+ }
+ case 829:
#line 4562 "gram.y"
-{ yyval.str = "password"; ;
- break;}
-case 830:
+ {
+ yyval.str = "password";;
+ break;
+ }
+ case 830:
#line 4563 "gram.y"
-{ yyval.str = "privileges"; ;
- break;}
-case 831:
+ {
+ yyval.str = "privileges";;
+ break;
+ }
+ case 831:
#line 4564 "gram.y"
-{ yyval.str = "recipe"; ;
- break;}
-case 832:
+ {
+ yyval.str = "recipe";;
+ break;
+ }
+ case 832:
#line 4565 "gram.y"
-{ yyval.str = "row"; ;
- break;}
-case 833:
+ {
+ yyval.str = "row";;
+ break;
+ }
+ case 833:
#line 4566 "gram.y"
-{ yyval.str = "serial"; ;
- break;}
-case 834:
+ {
+ yyval.str = "serial";;
+ break;
+ }
+ case 834:
#line 4567 "gram.y"
-{ yyval.str = "start"; ;
- break;}
-case 835:
+ {
+ yyval.str = "start";;
+ break;
+ }
+ case 835:
#line 4568 "gram.y"
-{ yyval.str = "statement"; ;
- break;}
-case 836:
+ {
+ yyval.str = "statement";;
+ break;
+ }
+ case 836:
#line 4569 "gram.y"
-{ yyval.str = "time"; ;
- break;}
-case 837:
+ {
+ yyval.str = "time";;
+ break;
+ }
+ case 837:
#line 4570 "gram.y"
-{ yyval.str = "timezone_hour"; ;
- break;}
-case 838:
+ {
+ yyval.str = "timezone_hour";;
+ break;
+ }
+ case 838:
#line 4571 "gram.y"
-{ yyval.str = "timezone_minute"; ;
- break;}
-case 839:
+ {
+ yyval.str = "timezone_minute";;
+ break;
+ }
+ case 839:
#line 4572 "gram.y"
-{ yyval.str = "trigger"; ;
- break;}
-case 840:
+ {
+ yyval.str = "trigger";;
+ break;
+ }
+ case 840:
#line 4573 "gram.y"
-{ yyval.str = "type"; ;
- break;}
-case 841:
+ {
+ yyval.str = "type";;
+ break;
+ }
+ case 841:
#line 4574 "gram.y"
-{ yyval.str = "valid"; ;
- break;}
-case 842:
+ {
+ yyval.str = "valid";;
+ break;
+ }
+ case 842:
#line 4575 "gram.y"
-{ yyval.str = "version"; ;
- break;}
-case 843:
+ {
+ yyval.str = "version";;
+ break;
+ }
+ case 843:
#line 4576 "gram.y"
-{ yyval.str = "zone"; ;
- break;}
-case 844:
+ {
+ yyval.str = "zone";;
+ break;
+ }
+ case 844:
#line 4589 "gram.y"
-{ yyval.str = yyvsp[0].str; ;
- break;}
-case 845:
+ {
+ yyval.str = yyvsp[0].str;;
+ break;
+ }
+ case 845:
#line 4590 "gram.y"
-{ yyval.str = "archive"; ;
- break;}
-case 846:
+ {
+ yyval.str = "archive";;
+ break;
+ }
+ case 846:
#line 4591 "gram.y"
-{ yyval.str = "cluster"; ;
- break;}
-case 847:
+ {
+ yyval.str = "cluster";;
+ break;
+ }
+ case 847:
#line 4592 "gram.y"
-{ yyval.str = "constraint"; ;
- break;}
-case 848:
+ {
+ yyval.str = "constraint";;
+ break;
+ }
+ case 848:
#line 4593 "gram.y"
-{ yyval.str = "cross"; ;
- break;}
-case 849:
+ {
+ yyval.str = "cross";;
+ break;
+ }
+ case 849:
#line 4594 "gram.y"
-{ yyval.str = "foreign"; ;
- break;}
-case 850:
+ {
+ yyval.str = "foreign";;
+ break;
+ }
+ case 850:
#line 4595 "gram.y"
-{ yyval.str = "group"; ;
- break;}
-case 851:
+ {
+ yyval.str = "group";;
+ break;
+ }
+ case 851:
#line 4596 "gram.y"
-{ yyval.str = "load"; ;
- break;}
-case 852:
+ {
+ yyval.str = "load";;
+ break;
+ }
+ case 852:
#line 4597 "gram.y"
-{ yyval.str = "order"; ;
- break;}
-case 853:
+ {
+ yyval.str = "order";;
+ break;
+ }
+ case 853:
#line 4598 "gram.y"
-{ yyval.str = "position"; ;
- break;}
-case 854:
+ {
+ yyval.str = "position";;
+ break;
+ }
+ case 854:
#line 4599 "gram.y"
-{ yyval.str = "precision"; ;
- break;}
-case 855:
+ {
+ yyval.str = "precision";;
+ break;
+ }
+ case 855:
#line 4600 "gram.y"
-{ yyval.str = "table"; ;
- break;}
-case 856:
+ {
+ yyval.str = "table";;
+ break;
+ }
+ case 856:
#line 4601 "gram.y"
-{ yyval.str = "transaction"; ;
- break;}
-case 857:
+ {
+ yyval.str = "transaction";;
+ break;
+ }
+ case 857:
#line 4602 "gram.y"
-{ yyval.str = "true"; ;
- break;}
-case 858:
+ {
+ yyval.str = "true";;
+ break;
+ }
+ case 858:
#line 4603 "gram.y"
-{ yyval.str = "false"; ;
- break;}
-case 859:
+ {
+ yyval.str = "false";;
+ break;
+ }
+ case 859:
#line 4607 "gram.y"
-{
- if (QueryIsRule)
- yyval.str = "*CURRENT*";
- else
- elog(ERROR,"CURRENT used in non-rule query");
+ {
+ if (QueryIsRule)
+ yyval.str = "*CURRENT*";
+ else
+ elog(ERROR, "CURRENT used in non-rule query");
;
- break;}
-case 860:
+ break;
+ }
+ case 860:
#line 4614 "gram.y"
-{
- if (QueryIsRule)
- yyval.str = "*NEW*";
- else
- elog(ERROR,"NEW used in non-rule query");
+ {
+ if (QueryIsRule)
+ yyval.str = "*NEW*";
+ else
+ elog(ERROR, "NEW used in non-rule query");
;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
+ break;
+ }
+ }
+ /* the action file gets copied in in place of this dollarsign */
#line 498 "/usr/local/bison/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
+
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
#ifdef YYLSP_NEEDED
- yylsp -= yylen;
+ yylsp -= yylen;
#endif
#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+
+ fprintf(stderr, "state stack now");
+ while (ssp1 != yyssp)
+ fprintf(stderr, " %d", *++ssp1);
+ fprintf(stderr, "\n");
+ }
#endif
- *++yyvsp = yyval;
+ *++yyvsp = yyval;
#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
+ yylsp++;
+ if (yylen == 0)
+ {
+ yylsp->first_line = yylloc.first_line;
+ yylsp->first_column = yylloc.first_column;
+ yylsp->last_line = (yylsp - 1)->last_line;
+ yylsp->last_column = (yylsp - 1)->last_column;
+ yylsp->text = 0;
+ }
+ else
+ {
+ yylsp->last_line = (yylsp + yylen - 1)->last_line;
+ yylsp->last_column = (yylsp + yylen - 1)->last_column;
+ }
#endif
- /* 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. */
+ /*
+ * 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.
+ */
- yyn = yyr1[yyn];
+ yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTBASE];
- goto yynewstate;
+ goto yynewstate;
-yyerrlab: /* here on detecting error */
+yyerrlab: /* here on detecting error */
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
+ if (!yyerrstatus)
+ /* If not already recovering from an error, report this error. */
+ {
+ ++yynerrs;
#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
+ yyn = yypact[yystate];
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
+ if (yyn > YYFLAG && yyn < YYLAST)
{
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
+ int size = 0;
+ char *msg;
+ int x,
+ count;
+
+ count = 0;
+
+ /*
+ * Start X at -yyn if nec to avoid negative indexes in
+ * yycheck.
+ */
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ size += strlen(yytname[x]) + 15, count++;
+ msg = (char *) malloc(size + 15);
+ if (msg != 0)
+ {
+ strcpy(msg, "parse error");
+
+ if (count < 5)
+ {
+ count = 0;
+ for (x = (yyn < 0 ? -yyn : 0);
+ x < (sizeof(yytname) / sizeof(char *)); x++)
+ if (yycheck[x + yyn] == x)
+ {
+ strcat(msg, count == 0 ? ", expecting `" : " or `");
+ strcat(msg, yytname[x]);
+ strcat(msg, "'");
+ count++;
+ }
+ }
+ yyerror(msg);
+ free(msg);
+ }
+ else
+ yyerror("parse error; also virtual memory exceeded");
}
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror("parse error");
}
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
+ goto yyerrlab1;
+yyerrlab1: /* here on error raised explicitly by an
+ * action */
+
+ if (yyerrstatus == 3)
+ {
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
+ /*
+ * if just tried and failed to reuse lookahead token after an
+ * error, discard it.
+ */
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
+ /* return failure if at end of input */
+ if (yychar == YYEOF)
+ YYABORT;
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+ if (yydebug)
+ fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif
- yychar = YYEMPTY;
- }
+ yychar = YYEMPTY;
+ }
- /* Else will try to reuse lookahead token
- after shifting the error token. */
+ /*
+ * Else will try to reuse lookahead token after shifting the error
+ * token.
+ */
- yyerrstatus = 3; /* Each real token shifted decrements this */
+ yyerrstatus = 3; /* Each real token shifted decrements this */
- goto yyerrhandle;
+ goto yyerrhandle;
-yyerrdefault: /* current state does not do anything special for the error token. */
+yyerrdefault: /* current state does not do anything
+ * special for the error token. */
#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
+
+ /*
+ * This is wrong; only states that explicitly want error tokens should
+ * shift them.
+ */
+ yyn = yydefact[yystate]; /* If its default is to accept any token,
+ * ok. Otherwise pop it. */
+ if (yyn)
+ goto yydefault;
#endif
-yyerrpop: /* pop the current state because it cannot handle the error token */
+yyerrpop: /* pop the current state because it cannot
+ * handle the error token */
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
+ if (yyssp == yyss)
+ YYABORT;
+ yyvsp--;
+ yystate = *--yyssp;
#ifdef YYLSP_NEEDED
- yylsp--;
+ yylsp--;
#endif
#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
+ if (yydebug)
+ {
+ short *ssp1 = yyss - 1;
+
+ fprintf(stderr, "Error: state stack now");
+ while (ssp1 != yyssp)
+ fprintf(stderr, " %d", *++ssp1);
+ fprintf(stderr, "\n");
+ }
#endif
yyerrhandle:
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
+ yyn = yypact[yystate];
+ if (yyn == YYFLAG)
+ goto yyerrdefault;
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
+ yyn += YYTERROR;
+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+ goto yyerrdefault;
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
+ yyn = yytable[yyn];
+ if (yyn < 0)
+ {
+ if (yyn == YYFLAG)
+ goto yyerrpop;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+ else if (yyn == 0)
+ goto yyerrpop;
- if (yyn == YYFINAL)
- YYACCEPT;
+ if (yyn == YYFINAL)
+ YYACCEPT;
#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
+ if (yydebug)
+ fprintf(stderr, "Shifting error token, ");
#endif
- *++yyvsp = yylval;
+ *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
+ *++yylsp = yylloc;
#endif
- yystate = yyn;
- goto yynewstate;
+ yystate = yyn;
+ goto yynewstate;
}
+
#line 4622 "gram.y"
static Node *
makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr)
{
- A_Expr *a = makeNode(A_Expr);
+ A_Expr *a = makeNode(A_Expr);
+
a->oper = oper;
a->opname = opname;
a->lexpr = lexpr;
a->rexpr = rexpr;
- return (Node *)a;
+ return (Node *) a;
}
/* makeRowExpr()
@@ -9877,23 +11472,24 @@ makeA_Expr(int oper, char *opname, Node *lexpr, Node *rexpr)
static Node *
makeRowExpr(char *opr, List *largs, List *rargs)
{
- Node *expr = NULL;
- Node *larg, *rarg;
+ Node *expr = NULL;
+ Node *larg,
+ *rarg;
if (length(largs) != length(rargs))
- elog(ERROR,"Unequal number of entries in row expression");
+ elog(ERROR, "Unequal number of entries in row expression");
if (lnext(largs) != NIL)
- expr = makeRowExpr(opr,lnext(largs),lnext(rargs));
+ expr = makeRowExpr(opr, lnext(largs), lnext(rargs));
larg = lfirst(largs);
rarg = lfirst(rargs);
if ((strcmp(opr, "=") == 0)
- || (strcmp(opr, "<") == 0)
- || (strcmp(opr, "<=") == 0)
- || (strcmp(opr, ">") == 0)
- || (strcmp(opr, ">=") == 0))
+ || (strcmp(opr, "<") == 0)
+ || (strcmp(opr, "<=") == 0)
+ || (strcmp(opr, ">") == 0)
+ || (strcmp(opr, ">=") == 0))
{
if (expr == NULL)
expr = makeA_Expr(OP, opr, larg, rarg);
@@ -9908,9 +11504,7 @@ makeRowExpr(char *opr, List *largs, List *rargs)
expr = makeA_Expr(OR, NULL, expr, makeA_Expr(OP, opr, larg, rarg));
}
else
- {
- elog(ERROR,"Operator '%s' not implemented for row expressions",opr);
- }
+ elog(ERROR, "Operator '%s' not implemented for row expressions", opr);
#if FALSE
while ((largs != NIL) && (rargs != NIL))
@@ -9935,16 +11529,16 @@ makeRowExpr(char *opr, List *largs, List *rargs)
void
mapTargetColumns(List *src, List *dst)
{
- ColumnDef *s;
- ResTarget *d;
+ ColumnDef *s;
+ ResTarget *d;
if (length(src) != length(dst))
- elog(ERROR,"CREATE TABLE/AS SELECT has mismatched column count");
+ elog(ERROR, "CREATE TABLE/AS SELECT has mismatched column count");
while ((src != NIL) && (dst != NIL))
{
- s = (ColumnDef *)lfirst(src);
- d = (ResTarget *)lfirst(dst);
+ s = (ColumnDef *) lfirst(src);
+ d = (ResTarget *) lfirst(dst);
d->name = s->colname;
@@ -9953,24 +11547,26 @@ mapTargetColumns(List *src, List *dst)
}
return;
-} /* mapTargetColumns() */
+} /* mapTargetColumns() */
-static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr)
+static Node *
+makeIndexable(char *opname, Node *lexpr, Node *rexpr)
{
- Node *result = NULL;
+ Node *result = NULL;
/* we do this so indexes can be used */
- if (strcmp(opname,"~") == 0 ||
- strcmp(opname,"~*") == 0)
+ if (strcmp(opname, "~") == 0 ||
+ strcmp(opname, "~*") == 0)
{
if (nodeTag(rexpr) == T_A_Const &&
- ((A_Const *)rexpr)->val.type == T_String &&
- ((A_Const *)rexpr)->val.val.str[0] == '^')
+ ((A_Const *) rexpr)->val.type == T_String &&
+ ((A_Const *) rexpr)->val.val.str[0] == '^')
{
- A_Const *n = (A_Const *)rexpr;
- char *match_least = palloc(strlen(n->val.val.str)+2);
- char *match_most = palloc(strlen(n->val.val.str)+2);
- int pos, match_pos=0;
+ A_Const *n = (A_Const *) rexpr;
+ char *match_least = palloc(strlen(n->val.val.str) + 2);
+ char *match_most = palloc(strlen(n->val.val.str) + 2);
+ int pos,
+ match_pos = 0;
/* skip leading ^ */
for (pos = 1; n->val.val.str[pos]; pos++)
@@ -9980,9 +11576,9 @@ static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr)
n->val.val.str[pos] == '*' ||
n->val.val.str[pos] == '[' ||
n->val.val.str[pos] == '$' ||
- (strcmp(opname,"~*") == 0 && isalpha(n->val.val.str[pos])))
- break;
- if (n->val.val.str[pos] == '\\')
+ (strcmp(opname, "~*") == 0 && isalpha(n->val.val.str[pos])))
+ break;
+ if (n->val.val.str[pos] == '\\')
pos++;
match_least[match_pos] = n->val.val.str[pos];
match_most[match_pos++] = n->val.val.str[pos];
@@ -9990,93 +11586,94 @@ static Node *makeIndexable(char *opname, Node *lexpr, Node *rexpr)
if (match_pos != 0)
{
- A_Const *least = makeNode(A_Const);
- A_Const *most = makeNode(A_Const);
-
+ A_Const *least = makeNode(A_Const);
+ A_Const *most = makeNode(A_Const);
+
/* make strings to be used in index use */
match_least[match_pos] = '\0';
match_most[match_pos] = '\377';
- match_most[match_pos+1] = '\0';
+ match_most[match_pos + 1] = '\0';
least->val.type = T_String;
least->val.val.str = match_least;
most->val.type = T_String;
most->val.val.str = match_most;
result = makeA_Expr(AND, NULL,
- makeA_Expr(OP, "~", lexpr, rexpr),
- makeA_Expr(AND, NULL,
- makeA_Expr(OP, ">=", lexpr, (Node *)least),
- makeA_Expr(OP, "<=", lexpr, (Node *)most)));
+ makeA_Expr(OP, "~", lexpr, rexpr),
+ makeA_Expr(AND, NULL,
+ makeA_Expr(OP, ">=", lexpr, (Node *) least),
+ makeA_Expr(OP, "<=", lexpr, (Node *) most)));
}
}
}
- else if (strcmp(opname,"~~") == 0)
+ else if (strcmp(opname, "~~") == 0)
{
if (nodeTag(rexpr) == T_A_Const &&
- ((A_Const *)rexpr)->val.type == T_String)
+ ((A_Const *) rexpr)->val.type == T_String)
{
- A_Const *n = (A_Const *)rexpr;
- char *match_least = palloc(strlen(n->val.val.str)+2);
- char *match_most = palloc(strlen(n->val.val.str)+2);
- int pos, match_pos=0;
-
+ A_Const *n = (A_Const *) rexpr;
+ char *match_least = palloc(strlen(n->val.val.str) + 2);
+ char *match_most = palloc(strlen(n->val.val.str) + 2);
+ int pos,
+ match_pos = 0;
+
for (pos = 0; n->val.val.str[pos]; pos++)
{
if (n->val.val.str[pos] == '%' &&
- n->val.val.str[pos+1] != '%')
+ n->val.val.str[pos + 1] != '%')
+ break;
+ if (n->val.val.str[pos] == '_')
break;
- if(n->val.val.str[pos] == '_')
- break;
- if (n->val.val.str[pos] == '\\' ||
- n->val.val.str[pos] == '%')
+ if (n->val.val.str[pos] == '\\' ||
+ n->val.val.str[pos] == '%')
pos++;
if (n->val.val.str[pos] == '\0')
break;
match_least[match_pos] = n->val.val.str[pos];
match_most[match_pos++] = n->val.val.str[pos];
}
-
+
if (match_pos != 0)
{
- A_Const *least = makeNode(A_Const);
- A_Const *most = makeNode(A_Const);
-
+ A_Const *least = makeNode(A_Const);
+ A_Const *most = makeNode(A_Const);
+
/* make strings to be used in index use */
match_least[match_pos] = '\0';
match_most[match_pos] = '\377';
- match_most[match_pos+1] = '\0';
+ match_most[match_pos + 1] = '\0';
least->val.type = T_String;
least->val.val.str = match_least;
most->val.type = T_String;
most->val.val.str = match_most;
result = makeA_Expr(AND, NULL,
- makeA_Expr(OP, "~~", lexpr, rexpr),
- makeA_Expr(AND, NULL,
- makeA_Expr(OP, ">=", lexpr, (Node *)least),
- makeA_Expr(OP, "<=", lexpr, (Node *)most)));
+ makeA_Expr(OP, "~~", lexpr, rexpr),
+ makeA_Expr(AND, NULL,
+ makeA_Expr(OP, ">=", lexpr, (Node *) least),
+ makeA_Expr(OP, "<=", lexpr, (Node *) most)));
}
}
}
-
+
if (result == NULL)
result = makeA_Expr(OP, opname, lexpr, rexpr);
return result;
-} /* makeIndexable() */
+} /* makeIndexable() */
/* xlateSqlFunc()
* Convert alternate type names to internal Postgres types.
* Do not convert "float", since that is handled elsewhere
- * for FLOAT(p) syntax.
+ * for FLOAT(p) syntax.
*/
static char *
xlateSqlFunc(char *name)
{
- if (!strcasecmp(name,"character_length")
- || !strcasecmp(name,"char_length"))
+ if (!strcasecmp(name, "character_length")
+ || !strcasecmp(name, "char_length"))
return "length";
else
return name;
-} /* xlateSqlFunc() */
+} /* xlateSqlFunc() */
/* xlateSqlType()
* Convert alternate type names to internal Postgres types.
@@ -10084,13 +11681,13 @@ xlateSqlFunc(char *name)
static char *
xlateSqlType(char *name)
{
- if (!strcasecmp(name,"int")
- || !strcasecmp(name,"integer"))
+ if (!strcasecmp(name, "int")
+ || !strcasecmp(name, "integer"))
return "int4";
else if (!strcasecmp(name, "smallint"))
return "int2";
else if (!strcasecmp(name, "real")
- || !strcasecmp(name, "float"))
+ || !strcasecmp(name, "float"))
return "float8";
else if (!strcasecmp(name, "interval"))
return "timespan";
@@ -10098,13 +11695,14 @@ xlateSqlType(char *name)
return "bool";
else
return name;
-} /* xlateSqlType() */
+} /* xlateSqlType() */
-void parser_init(Oid *typev, int nargs)
+void
+parser_init(Oid *typev, int nargs)
{
QueryIsRule = FALSE;
- saved_relname[0]= '\0';
+ saved_relname[0] = '\0';
saved_In_Expr = NULL;
param_type_init(typev, nargs);
@@ -10120,84 +11718,95 @@ void parser_init(Oid *typev, int nargs)
static char *
FlattenStringList(List *list)
{
- List *l;
- Value *v;
- char *s;
- char *sp;
- int nlist, len = 0;
+ List *l;
+ Value *v;
+ char *s;
+ char *sp;
+ int nlist,
+ len = 0;
nlist = length(list);
l = list;
- while(l != NIL) {
- v = (Value *)lfirst(l);
+ while (l != NIL)
+ {
+ v = (Value *) lfirst(l);
sp = v->val.str;
l = lnext(l);
len += strlen(sp);
};
len += nlist;
- s = (char*) palloc(len+1);
+ s = (char *) palloc(len + 1);
*s = '\0';
l = list;
- while(l != NIL) {
- v = (Value *)lfirst(l);
+ while (l != NIL)
+ {
+ v = (Value *) lfirst(l);
sp = v->val.str;
l = lnext(l);
- strcat(s,sp);
- if (l != NIL) strcat(s," ");
+ strcat(s, sp);
+ if (l != NIL)
+ strcat(s, " ");
};
- *(s+len) = '\0';
+ *(s + len) = '\0';
#ifdef PARSEDEBUG
elog(DEBUG, "flattened string is \"%s\"\n", s);
#endif
return s;
-} /* FlattenStringList() */
+} /* FlattenStringList() */
/* makeConstantList()
* Convert constant value node into string node.
*/
static List *
-makeConstantList( A_Const *n)
+makeConstantList(A_Const *n)
{
- List *result = NIL;
- char *typval = NULL;
- char *defval = NULL;
-
- if (nodeTag(n) != T_A_Const) {
- elog(ERROR,"Cannot handle non-constant parameter");
-
- } else if (n->val.type == T_Float) {
- defval = (char*) palloc(20+1);
- sprintf( defval, "%g", n->val.val.dval);
- result = lcons( makeString(defval), NIL);
-
- } else if (n->val.type == T_Integer) {
- defval = (char*) palloc(20+1);
- sprintf( defval, "%ld", n->val.val.ival);
- result = lcons( makeString(defval), NIL);
-
- } else if (n->val.type == T_String) {
- defval = (char*) palloc(strlen( ((A_Const *) n)->val.val.str) + 3);
- strcpy( defval, "'");
- strcat( defval, ((A_Const *) n)->val.val.str);
- strcat( defval, "'");
+ List *result = NIL;
+ char *typval = NULL;
+ char *defval = NULL;
+
+ if (nodeTag(n) != T_A_Const)
+ {
+ elog(ERROR, "Cannot handle non-constant parameter");
+
+ }
+ else if (n->val.type == T_Float)
+ {
+ defval = (char *) palloc(20 + 1);
+ sprintf(defval, "%g", n->val.val.dval);
+ result = lcons(makeString(defval), NIL);
+
+ }
+ else if (n->val.type == T_Integer)
+ {
+ defval = (char *) palloc(20 + 1);
+ sprintf(defval, "%ld", n->val.val.ival);
+ result = lcons(makeString(defval), NIL);
+
+ }
+ else if (n->val.type == T_String)
+ {
+ defval = (char *) palloc(strlen(((A_Const *) n)->val.val.str) + 3);
+ strcpy(defval, "'");
+ strcat(defval, ((A_Const *) n)->val.val.str);
+ strcat(defval, "'");
if (n->typename != NULL)
{
- typval = (char*) palloc(strlen( n->typename->name) + 1);
+ typval = (char *) palloc(strlen(n->typename->name) + 1);
strcpy(typval, n->typename->name);
- result = lappend( lcons( makeString(typval), NIL), makeString(defval));
+ result = lappend(lcons(makeString(typval), NIL), makeString(defval));
}
else
- {
- result = lcons( makeString(defval), NIL);
- }
+ result = lcons(makeString(defval), NIL);
- } else {
- elog(ERROR,"Internal error in makeConstantList(): cannot encode node");
+ }
+ else
+ {
+ elog(ERROR, "Internal error in makeConstantList(): cannot encode node");
};
#ifdef PARSEDEBUG
@@ -10205,7 +11814,7 @@ makeConstantList( A_Const *n)
#endif
return result;
-} /* makeConstantList() */
+} /* makeConstantList() */
/* fmtId()
@@ -10218,20 +11827,24 @@ fmtId(char *rawid)
static char *cp;
for (cp = rawid; *cp != '\0'; cp++)
- if (! (islower(*cp) || isdigit(*cp) || (*cp == '_'))) break;
-
- if (*cp != '\0') {
- cp = palloc(strlen(rawid)+1);
- strcpy(cp,"\"");
- strcat(cp,rawid);
- strcat(cp,"\"");
- } else {
+ if (!(islower(*cp) || isdigit(*cp) || (*cp == '_')))
+ break;
+
+ if (*cp != '\0')
+ {
+ cp = palloc(strlen(rawid) + 1);
+ strcpy(cp, "\"");
+ strcat(cp, rawid);
+ strcat(cp, "\"");
+ }
+ else
+ {
cp = rawid;
};
#ifdef PARSEDEBUG
elog(DEBUG, "fmtId- %sconvert %s to %s\n",
- ((cp == rawid)? "do not ": ""), rawid, cp);
+ ((cp == rawid) ? "do not " : ""), rawid, cp);
#endif
return cp;
@@ -10250,7 +11863,8 @@ param_type_init(Oid *typev, int nargs)
param_type_info = typev;
}
-Oid param_type(int t)
+Oid
+param_type(int t)
{
if ((t > pfunc_num_args) || (t == 0))
return InvalidOid;
diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c
index d218b11655..97e97d8c8b 100644
--- a/src/backend/parser/keywords.c
+++ b/src/backend/parser/keywords.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.43 1998/09/01 03:24:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.44 1998/09/01 04:30:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,12 +66,9 @@ static ScanKeyword ScanKeywords[] = {
{"createdb", CREATEDB},
{"createuser", CREATEUSER},
{"cross", CROSS},
- {"current", CURRENT}, /*
- * 6.4 to 6.5 is migration time!
- * CURRENT will be removed in 6.5!
- * Use OLD keyword in rules.
- * Jan
- */
+ {"current", CURRENT}, /* 6.4 to 6.5 is migration time! CURRENT
+ * will be removed in 6.5! Use OLD keyword
+ * in rules. Jan */
{"current_date", CURRENT_DATE},
{"current_time", CURRENT_TIME},
{"current_timestamp", CURRENT_TIMESTAMP},
diff --git a/src/backend/parser/parse.h b/src/backend/parser/parse.h
index eb68436d4a..5a5aac37a4 100644
--- a/src/backend/parser/parse.h
+++ b/src/backend/parser/parse.h
@@ -1,236 +1,237 @@
typedef union
{
- double dval;
- int ival;
- char chr;
- char *str;
- bool boolean;
- bool* pboolean; /* for pg_shadow privileges */
- List *list;
- Node *node;
- Value *value;
+ double dval;
+ int ival;
+ char chr;
+ char *str;
+ bool boolean;
+ bool *pboolean; /* for pg_shadow privileges */
+ List *list;
+ Node *node;
+ Value *value;
- Attr *attr;
+ Attr *attr;
- TypeName *typnam;
- DefElem *defelt;
- ParamString *param;
- SortGroupBy *sortgroupby;
- JoinUsing *joinusing;
- IndexElem *ielem;
- RangeVar *range;
- RelExpr *relexp;
- A_Indices *aind;
- ResTarget *target;
- ParamNo *paramno;
+ TypeName *typnam;
+ DefElem *defelt;
+ ParamString *param;
+ SortGroupBy *sortgroupby;
+ JoinUsing *joinusing;
+ IndexElem *ielem;
+ RangeVar *range;
+ RelExpr *relexp;
+ A_Indices *aind;
+ ResTarget *target;
+ ParamNo *paramno;
- VersionStmt *vstmt;
- DefineStmt *dstmt;
- RuleStmt *rstmt;
- InsertStmt *astmt;
+ VersionStmt *vstmt;
+ DefineStmt *dstmt;
+ RuleStmt *rstmt;
+ InsertStmt *astmt;
} YYSTYPE;
-#define ACTION 258
-#define ADD 259
-#define ALL 260
-#define ALTER 261
-#define AND 262
-#define ANY 263
-#define AS 264
-#define ASC 265
-#define BEGIN_TRANS 266
-#define BETWEEN 267
-#define BOTH 268
-#define BY 269
-#define CASCADE 270
-#define CAST 271
-#define CHAR 272
-#define CHARACTER 273
-#define CHECK 274
-#define CLOSE 275
-#define COLLATE 276
-#define COLUMN 277
-#define COMMIT 278
-#define CONSTRAINT 279
-#define CREATE 280
-#define CROSS 281
-#define CURRENT 282
-#define CURRENT_DATE 283
-#define CURRENT_TIME 284
-#define CURRENT_TIMESTAMP 285
-#define CURRENT_USER 286
-#define CURSOR 287
-#define DAY_P 288
-#define DECIMAL 289
-#define DECLARE 290
-#define DEFAULT 291
-#define DELETE 292
-#define DESC 293
-#define DISTINCT 294
-#define DOUBLE 295
-#define DROP 296
-#define END_TRANS 297
-#define EXECUTE 298
-#define EXISTS 299
-#define EXTRACT 300
-#define FETCH 301
-#define FLOAT 302
-#define FOR 303
-#define FOREIGN 304
-#define FROM 305
-#define FULL 306
-#define GRANT 307
-#define GROUP 308
-#define HAVING 309
-#define HOUR_P 310
-#define IN 311
-#define INNER_P 312
-#define INSERT 313
-#define INTERVAL 314
-#define INTO 315
-#define IS 316
-#define JOIN 317
-#define KEY 318
-#define LANGUAGE 319
-#define LEADING 320
-#define LEFT 321
-#define LIKE 322
-#define LOCAL 323
-#define MATCH 324
-#define MINUTE_P 325
-#define MONTH_P 326
-#define NAMES 327
-#define NATIONAL 328
-#define NATURAL 329
-#define NCHAR 330
-#define NO 331
-#define NOT 332
-#define NOTIFY 333
-#define NULL_P 334
-#define NUMERIC 335
-#define ON 336
-#define OPTION 337
-#define OR 338
-#define ORDER 339
-#define OUTER_P 340
-#define PARTIAL 341
-#define POSITION 342
-#define PRECISION 343
-#define PRIMARY 344
-#define PRIVILEGES 345
-#define PROCEDURE 346
-#define PUBLIC 347
-#define REFERENCES 348
-#define REVOKE 349
-#define RIGHT 350
-#define ROLLBACK 351
-#define SECOND_P 352
-#define SELECT 353
-#define SET 354
-#define SUBSTRING 355
-#define TABLE 356
-#define TIME 357
-#define TIMESTAMP 358
-#define TIMEZONE_HOUR 359
-#define TIMEZONE_MINUTE 360
-#define TO 361
-#define TRAILING 362
-#define TRANSACTION 363
-#define TRIM 364
-#define UNION 365
-#define UNIQUE 366
-#define UPDATE 367
-#define USER 368
-#define USING 369
-#define VALUES 370
-#define VARCHAR 371
-#define VARYING 372
-#define VIEW 373
-#define WHERE 374
-#define WITH 375
-#define WORK 376
-#define YEAR_P 377
-#define ZONE 378
-#define FALSE_P 379
-#define TRIGGER 380
-#define TRUE_P 381
-#define TYPE_P 382
-#define ABORT_TRANS 383
-#define AFTER 384
-#define AGGREGATE 385
-#define ANALYZE 386
-#define BACKWARD 387
-#define BEFORE 388
-#define BINARY 389
-#define CACHE 390
-#define CLUSTER 391
-#define COPY 392
-#define CYCLE 393
-#define DATABASE 394
-#define DELIMITERS 395
-#define DO 396
-#define EACH 397
-#define EXPLAIN 398
-#define EXTEND 399
-#define FORWARD 400
-#define FUNCTION 401
-#define HANDLER 402
-#define INCREMENT 403
-#define INDEX 404
-#define INHERITS 405
-#define INSTEAD 406
-#define ISNULL 407
-#define LANCOMPILER 408
-#define LISTEN 409
-#define LOAD 410
-#define LOCK_P 411
-#define LOCATION 412
-#define MAXVALUE 413
-#define MINVALUE 414
-#define MOVE 415
-#define NEW 416
-#define NONE 417
-#define NOTHING 418
-#define NOTNULL 419
-#define OIDS 420
-#define OPERATOR 421
-#define PROCEDURAL 422
-#define RECIPE 423
-#define RENAME 424
-#define RESET 425
-#define RETURNS 426
-#define ROW 427
-#define RULE 428
-#define SEQUENCE 429
-#define SERIAL 430
-#define SETOF 431
-#define SHOW 432
-#define START 433
-#define STATEMENT 434
-#define STDIN 435
-#define STDOUT 436
-#define TRUSTED 437
-#define VACUUM 438
-#define VERBOSE 439
-#define VERSION 440
-#define ENCODING 441
-#define UNLISTEN 442
-#define ARCHIVE 443
-#define PASSWORD 444
-#define CREATEDB 445
-#define NOCREATEDB 446
-#define CREATEUSER 447
-#define NOCREATEUSER 448
-#define VALID 449
-#define UNTIL 450
-#define IDENT 451
-#define SCONST 452
-#define Op 453
-#define ICONST 454
-#define PARAM 455
-#define FCONST 456
-#define OP 457
-#define UMINUS 458
-#define TYPECAST 459
+
+#define ACTION 258
+#define ADD 259
+#define ALL 260
+#define ALTER 261
+#define AND 262
+#define ANY 263
+#define AS 264
+#define ASC 265
+#define BEGIN_TRANS 266
+#define BETWEEN 267
+#define BOTH 268
+#define BY 269
+#define CASCADE 270
+#define CAST 271
+#define CHAR 272
+#define CHARACTER 273
+#define CHECK 274
+#define CLOSE 275
+#define COLLATE 276
+#define COLUMN 277
+#define COMMIT 278
+#define CONSTRAINT 279
+#define CREATE 280
+#define CROSS 281
+#define CURRENT 282
+#define CURRENT_DATE 283
+#define CURRENT_TIME 284
+#define CURRENT_TIMESTAMP 285
+#define CURRENT_USER 286
+#define CURSOR 287
+#define DAY_P 288
+#define DECIMAL 289
+#define DECLARE 290
+#define DEFAULT 291
+#define DELETE 292
+#define DESC 293
+#define DISTINCT 294
+#define DOUBLE 295
+#define DROP 296
+#define END_TRANS 297
+#define EXECUTE 298
+#define EXISTS 299
+#define EXTRACT 300
+#define FETCH 301
+#define FLOAT 302
+#define FOR 303
+#define FOREIGN 304
+#define FROM 305
+#define FULL 306
+#define GRANT 307
+#define GROUP 308
+#define HAVING 309
+#define HOUR_P 310
+#define IN 311
+#define INNER_P 312
+#define INSERT 313
+#define INTERVAL 314
+#define INTO 315
+#define IS 316
+#define JOIN 317
+#define KEY 318
+#define LANGUAGE 319
+#define LEADING 320
+#define LEFT 321
+#define LIKE 322
+#define LOCAL 323
+#define MATCH 324
+#define MINUTE_P 325
+#define MONTH_P 326
+#define NAMES 327
+#define NATIONAL 328
+#define NATURAL 329
+#define NCHAR 330
+#define NO 331
+#define NOT 332
+#define NOTIFY 333
+#define NULL_P 334
+#define NUMERIC 335
+#define ON 336
+#define OPTION 337
+#define OR 338
+#define ORDER 339
+#define OUTER_P 340
+#define PARTIAL 341
+#define POSITION 342
+#define PRECISION 343
+#define PRIMARY 344
+#define PRIVILEGES 345
+#define PROCEDURE 346
+#define PUBLIC 347
+#define REFERENCES 348
+#define REVOKE 349
+#define RIGHT 350
+#define ROLLBACK 351
+#define SECOND_P 352
+#define SELECT 353
+#define SET 354
+#define SUBSTRING 355
+#define TABLE 356
+#define TIME 357
+#define TIMESTAMP 358
+#define TIMEZONE_HOUR 359
+#define TIMEZONE_MINUTE 360
+#define TO 361
+#define TRAILING 362
+#define TRANSACTION 363
+#define TRIM 364
+#define UNION 365
+#define UNIQUE 366
+#define UPDATE 367
+#define USER 368
+#define USING 369
+#define VALUES 370
+#define VARCHAR 371
+#define VARYING 372
+#define VIEW 373
+#define WHERE 374
+#define WITH 375
+#define WORK 376
+#define YEAR_P 377
+#define ZONE 378
+#define FALSE_P 379
+#define TRIGGER 380
+#define TRUE_P 381
+#define TYPE_P 382
+#define ABORT_TRANS 383
+#define AFTER 384
+#define AGGREGATE 385
+#define ANALYZE 386
+#define BACKWARD 387
+#define BEFORE 388
+#define BINARY 389
+#define CACHE 390
+#define CLUSTER 391
+#define COPY 392
+#define CYCLE 393
+#define DATABASE 394
+#define DELIMITERS 395
+#define DO 396
+#define EACH 397
+#define EXPLAIN 398
+#define EXTEND 399
+#define FORWARD 400
+#define FUNCTION 401
+#define HANDLER 402
+#define INCREMENT 403
+#define INDEX 404
+#define INHERITS 405
+#define INSTEAD 406
+#define ISNULL 407
+#define LANCOMPILER 408
+#define LISTEN 409
+#define LOAD 410
+#define LOCK_P 411
+#define LOCATION 412
+#define MAXVALUE 413
+#define MINVALUE 414
+#define MOVE 415
+#define NEW 416
+#define NONE 417
+#define NOTHING 418
+#define NOTNULL 419
+#define OIDS 420
+#define OPERATOR 421
+#define PROCEDURAL 422
+#define RECIPE 423
+#define RENAME 424
+#define RESET 425
+#define RETURNS 426
+#define ROW 427
+#define RULE 428
+#define SEQUENCE 429
+#define SERIAL 430
+#define SETOF 431
+#define SHOW 432
+#define START 433
+#define STATEMENT 434
+#define STDIN 435
+#define STDOUT 436
+#define TRUSTED 437
+#define VACUUM 438
+#define VERBOSE 439
+#define VERSION 440
+#define ENCODING 441
+#define UNLISTEN 442
+#define ARCHIVE 443
+#define PASSWORD 444
+#define CREATEDB 445
+#define NOCREATEDB 446
+#define CREATEUSER 447
+#define NOCREATEUSER 448
+#define VALID 449
+#define UNTIL 450
+#define IDENT 451
+#define SCONST 452
+#define Op 453
+#define ICONST 454
+#define PARAM 455
+#define FCONST 456
+#define OP 457
+#define UMINUS 458
+#define TYPECAST 459
extern YYSTYPE yylval;
diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c
index 5d16d31341..bb8d87d383 100644
--- a/src/backend/parser/parse_agg.c
+++ b/src/backend/parser/parse_agg.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.12 1998/08/19 02:02:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.13 1998/09/01 04:30:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -332,7 +332,7 @@ ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
aggreg->target = lfirst(target);
if (usenulls)
aggreg->usenulls = true;
-
+
pstate->p_hasAggs = true;
return aggreg;
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index 47384994d7..4321c65707 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.24 1998/08/25 03:17:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.25 1998/09/01 04:30:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,7 +35,7 @@
static char *clauseText[] = {"ORDER", "GROUP"};
static TargetEntry *
-findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause);
+ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause);
static void parseFromClause(ParseState *pstate, List *frmList);
@@ -71,7 +71,7 @@ makeRangeTable(ParseState *pstate, char *relname, List *frmList)
/*
* transformWhereClause -
* transforms the qualification and make sure it is of type Boolean
- *
+ *
*/
Node *
transformWhereClause(ParseState *pstate, Node *a_expr)
@@ -138,44 +138,44 @@ parseFromClause(ParseState *pstate, List *frmList)
* returns the Resdom in the target list matching the specified varname
* and range. If none exist one is created.
*
- * Rewritten for ver 6.4 to handle expressions in the GROUP/ORDER BY clauses.
- * - [email protected] 1998-07-31
+ * Rewritten for ver 6.4 to handle expressions in the GROUP/ORDER BY clauses.
+ * - [email protected] 1998-07-31
*
*/
static TargetEntry *
findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
{
- List *l;
- int rtable_pos = 0,
- target_pos = 0,
- targetlist_pos = 0;
+ List *l;
+ int rtable_pos = 0,
+ target_pos = 0,
+ targetlist_pos = 0;
TargetEntry *target_result = NULL;
- Value *val = NULL;
- char *relname = NULL;
- char *name = NULL;
- Node *expr = NULL;
+ Value *val = NULL;
+ char *relname = NULL;
+ char *name = NULL;
+ Node *expr = NULL;
int relCnt = 0;
/* Pull out some values before looping thru target list */
- switch(nodeTag(node))
+ switch (nodeTag(node))
{
- case T_Attr:
- relname = ((Attr*)node)->relname;
- val = (Value *)lfirst(((Attr*)node)->attrs);
+ case T_Attr:
+ relname = ((Attr *) node)->relname;
+ val = (Value *) lfirst(((Attr *) node)->attrs);
name = strVal(val);
rtable_pos = refnameRangeTablePosn(pstate, relname, NULL);
relCnt = length(pstate->p_rtable);
break;
case T_Ident:
- name = ((Ident*)node)->name;
+ name = ((Ident *) node)->name;
relCnt = length(pstate->p_rtable);
break;
case T_A_Const:
- val = &((A_Const*)node)->val;
-
- if (nodeTag(val) != T_Integer)
+ val = &((A_Const *) node)->val;
+
+ if (nodeTag(val) != T_Integer)
elog(ERROR, "Illegal Constant in %s BY", clauseText[clause]);
target_pos = intVal(val);
break;
@@ -190,7 +190,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
}
/*
- * Loop through target entries and try to match to node
+ * Loop through target entries and try to match to node
*/
foreach(l, tlist)
{
@@ -202,93 +202,107 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
++targetlist_pos;
- switch(nodeTag(node))
+ switch (nodeTag(node))
{
- case T_Attr:
- if (strcmp(resname, name) == 0 && rtable_pos == test_rtable_pos)
- {
- /* Check for only 1 table & ORDER BY -ambiguity does not matter here */
- if (clause == ORDER_CLAUSE && relCnt == 1)
- return target;
+ case T_Attr:
+ if (strcmp(resname, name) == 0 && rtable_pos == test_rtable_pos)
+ {
- if (target_result != NULL)
- elog(ERROR, "%s BY '%s' is ambiguous", clauseText[clause], name);
- else
- target_result = target;
- /* Stay in loop to check for ambiguity */
- }
- break;
+ /*
+ * Check for only 1 table & ORDER BY -ambiguity does
+ * not matter here
+ */
+ if (clause == ORDER_CLAUSE && relCnt == 1)
+ return target;
- case T_Ident:
- if (strcmp(resname, name) == 0)
- {
- /* Check for only 1 table & ORDER BY -ambiguity does not matter here */
- if (clause == ORDER_CLAUSE && relCnt == 1)
- return target;
+ if (target_result != NULL)
+ elog(ERROR, "%s BY '%s' is ambiguous", clauseText[clause], name);
+ else
+ target_result = target;
+ /* Stay in loop to check for ambiguity */
+ }
+ break;
- if (target_result != NULL)
- elog(ERROR, "%s BY '%s' is ambiguous", clauseText[clause], name);
- else
- target_result = target;
- /* Stay in loop to check for ambiguity */
- }
- break;
+ case T_Ident:
+ if (strcmp(resname, name) == 0)
+ {
- case T_A_Const:
- if (target_pos == targetlist_pos)
- {
- /* Can't be ambigious and we got what we came for */
- return target;
- }
- break;
+ /*
+ * Check for only 1 table & ORDER BY -ambiguity does
+ * not matter here
+ */
+ if (clause == ORDER_CLAUSE && relCnt == 1)
+ return target;
- case T_FuncCall:
- case T_A_Expr:
- if (equal(expr, target->expr))
- {
- /* Check for only 1 table & ORDER BY -ambiguity does not matter here */
- if (clause == ORDER_CLAUSE)
+ if (target_result != NULL)
+ elog(ERROR, "%s BY '%s' is ambiguous", clauseText[clause], name);
+ else
+ target_result = target;
+ /* Stay in loop to check for ambiguity */
+ }
+ break;
+
+ case T_A_Const:
+ if (target_pos == targetlist_pos)
+ {
+ /* Can't be ambigious and we got what we came for */
return target;
+ }
+ break;
- if (target_result != NULL)
- elog(ERROR, "GROUP BY has ambiguous expression");
- else
- target_result = target;
- }
- break;
+ case T_FuncCall:
+ case T_A_Expr:
+ if (equal(expr, target->expr))
+ {
- default:
- elog(ERROR, "Illegal %s BY node = %d", clauseText[clause], nodeTag(node));
+ /*
+ * Check for only 1 table & ORDER BY -ambiguity does
+ * not matter here
+ */
+ if (clause == ORDER_CLAUSE)
+ return target;
+
+ if (target_result != NULL)
+ elog(ERROR, "GROUP BY has ambiguous expression");
+ else
+ target_result = target;
+ }
+ break;
+
+ default:
+ elog(ERROR, "Illegal %s BY node = %d", clauseText[clause], nodeTag(node));
}
}
- /*
- * If no matches, construct a new target entry which is appended to the end
- * of the target list. This target is set to be resjunk = TRUE so that
- * it will not be projected into the final tuple.
- */
+ /*
+ * If no matches, construct a new target entry which is appended to
+ * the end of the target list. This target is set to be resjunk =
+ * TRUE so that it will not be projected into the final tuple.
+ */
if (target_result == NULL)
- {
- switch(nodeTag(node))
+ {
+ switch (nodeTag(node))
{
- case T_Attr:
+ case T_Attr:
target_result = MakeTargetEntryIdent(pstate, node,
- &((Attr*)node)->relname, NULL,
- ((Attr*)node)->relname, TRUE);
+ &((Attr *) node)->relname, NULL,
+ ((Attr *) node)->relname, TRUE);
lappend(tlist, target_result);
break;
case T_Ident:
target_result = MakeTargetEntryIdent(pstate, node,
- &((Ident*)node)->name, NULL,
- ((Ident*)node)->name, TRUE);
+ &((Ident *) node)->name, NULL,
+ ((Ident *) node)->name, TRUE);
lappend(tlist, target_result);
break;
case T_A_Const:
- /*
- * If we got this far, then must have been an out-of-range column number
- */
+
+ /*
+ * If we got this far, then must have been an out-of-range
+ * column number
+ */
elog(ERROR, "%s BY position %d is not in target list", clauseText[clause], target_pos);
break;
@@ -376,7 +390,7 @@ transformSortClause(ParseState *pstate,
List *s = NIL;
#ifdef PARSEDEBUG
-printf("transformSortClause: entering\n");
+ printf("transformSortClause: entering\n");
#endif
while (orderlist != NIL)
@@ -389,13 +403,16 @@ printf("transformSortClause: entering\n");
restarget = findTargetlistEntry(pstate, sortby->node, targetlist, ORDER_CLAUSE);
#ifdef PARSEDEBUG
-printf("transformSortClause: find sorting operator for type %d\n",
- restarget->resdom->restype);
+ printf("transformSortClause: find sorting operator for type %d\n",
+ restarget->resdom->restype);
#endif
sortcl->resdom = resdom = restarget->resdom;
- /* if we have InvalidOid, then this is a NULL field and don't need to sort */
+ /*
+ * if we have InvalidOid, then this is a NULL field and don't need
+ * to sort
+ */
if (resdom->restype == InvalidOid)
resdom->restype = INT4OID;
@@ -447,10 +464,10 @@ printf("transformSortClause: find sorting operator for type %d\n",
SortClause *sortcl = lfirst(s);
/*
- * We use equal() here because we are called for UNION
- * from the optimizer, and at that point, the sort clause
- * resdom pointers don't match the target list resdom
- * pointers
+ * We use equal() here because we are called for UNION
+ * from the optimizer, and at that point, the sort
+ * clause resdom pointers don't match the target list
+ * resdom pointers
*/
if (equal(sortcl->resdom, tlelt->resdom))
break;
@@ -462,8 +479,8 @@ printf("transformSortClause: find sorting operator for type %d\n",
SortClause *sortcl = makeNode(SortClause);
#ifdef PARSEDEBUG
-printf("transformSortClause: (2) find sorting operator for type %d\n",
- tlelt->resdom->restype);
+ printf("transformSortClause: (2) find sorting operator for type %d\n",
+ tlelt->resdom->restype);
#endif
if (tlelt->resdom->restype == InvalidOid)
@@ -504,8 +521,8 @@ printf("transformSortClause: (2) find sorting operator for type %d\n",
SortClause *sortcl = makeNode(SortClause);
#ifdef PARSEDEBUG
-printf("transformSortClause: try sorting type %d\n",
- tlelt->resdom->restype);
+ printf("transformSortClause: try sorting type %d\n",
+ tlelt->resdom->restype);
#endif
sortcl->resdom = tlelt->resdom;
@@ -523,20 +540,20 @@ printf("transformSortClause: try sorting type %d\n",
* Transform a UNION clause.
* Note that the union clause is actually a fully-formed select structure.
* So, it is evaluated as a select, then the resulting target fields
- * are matched up to ensure correct types in the results.
+ * are matched up to ensure correct types in the results.
* The select clause parsing is done recursively, so the unions are evaluated
- * right-to-left. One might want to look at all columns from all clauses before
- * trying to coerce, but unless we keep track of the call depth we won't know
- * when to do this because of the recursion.
+ * right-to-left. One might want to look at all columns from all clauses before
+ * trying to coerce, but unless we keep track of the call depth we won't know
+ * when to do this because of the recursion.
* Let's just try matching in pairs for now (right to left) and see if it works.
* - thomas 1998-05-22
*/
List *
transformUnionClause(List *unionClause, List *targetlist)
{
- List *union_list = NIL;
+ List *union_list = NIL;
QueryTreeList *qlist;
- int i;
+ int i;
if (unionClause)
{
@@ -547,19 +564,20 @@ transformUnionClause(List *unionClause, List *targetlist)
{
List *prev_target = targetlist;
List *next_target;
-
+
if (length(targetlist) != length(qlist->qtrees[i]->targetList))
- elog(ERROR,"Each UNION clause must have the same number of columns");
-
+ elog(ERROR, "Each UNION clause must have the same number of columns");
+
foreach(next_target, qlist->qtrees[i]->targetList)
{
- Oid itype;
- Oid otype;
- otype = ((TargetEntry *)lfirst(prev_target))->resdom->restype;
- itype = ((TargetEntry *)lfirst(next_target))->resdom->restype;
+ Oid itype;
+ Oid otype;
+
+ otype = ((TargetEntry *) lfirst(prev_target))->resdom->restype;
+ itype = ((TargetEntry *) lfirst(next_target))->resdom->restype;
#ifdef PARSEDEBUG
-printf("transformUnionClause: types are %d -> %d\n", itype, otype);
+ printf("transformUnionClause: types are %d -> %d\n", itype, otype);
#endif
/* one or both is a NULL column? then don't convert... */
@@ -567,14 +585,12 @@ printf("transformUnionClause: types are %d -> %d\n", itype, otype);
{
/* propagate a known type forward, if available */
if (itype != InvalidOid)
- {
- ((TargetEntry *)lfirst(prev_target))->resdom->restype = itype;
- }
+ ((TargetEntry *) lfirst(prev_target))->resdom->restype = itype;
#if FALSE
else
{
- ((TargetEntry *)lfirst(prev_target))->resdom->restype = UNKNOWNOID;
- ((TargetEntry *)lfirst(next_target))->resdom->restype = UNKNOWNOID;
+ ((TargetEntry *) lfirst(prev_target))->resdom->restype = UNKNOWNOID;
+ ((TargetEntry *) lfirst(next_target))->resdom->restype = UNKNOWNOID;
}
#endif
}
@@ -584,26 +600,26 @@ printf("transformUnionClause: types are %d -> %d\n", itype, otype);
/* they don't match in type? then convert... */
else if (itype != otype)
{
- Node *expr;
+ Node *expr;
- expr = ((TargetEntry *)lfirst(next_target))->expr;
+ expr = ((TargetEntry *) lfirst(next_target))->expr;
expr = CoerceTargetExpr(NULL, expr, itype, otype);
if (expr == NULL)
{
- elog(ERROR,"Unable to transform %s to %s"
+ elog(ERROR, "Unable to transform %s to %s"
"\n\tEach UNION clause must have compatible target types",
typeidTypeName(itype),
typeidTypeName(otype));
}
- ((TargetEntry *)lfirst(next_target))->expr = expr;
- ((TargetEntry *)lfirst(next_target))->resdom->restype = otype;
+ ((TargetEntry *) lfirst(next_target))->expr = expr;
+ ((TargetEntry *) lfirst(next_target))->resdom->restype = otype;
}
/* both are UNKNOWN? then evaluate as text... */
else if (itype == UNKNOWNOID)
{
- ((TargetEntry *)lfirst(next_target))->resdom->restype = TEXTOID;
- ((TargetEntry *)lfirst(prev_target))->resdom->restype = TEXTOID;
+ ((TargetEntry *) lfirst(next_target))->resdom->restype = TEXTOID;
+ ((TargetEntry *) lfirst(prev_target))->resdom->restype = TEXTOID;
}
prev_target = lnext(prev_target);
}
@@ -613,4 +629,4 @@ printf("transformUnionClause: types are %d -> %d\n", itype, otype);
}
else
return NIL;
-} /* transformUnionClause() */
+} /* transformUnionClause() */
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index f8ecc86686..005aadce8d 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.5 1998/09/01 03:24:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.6 1998/09/01 04:30:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,8 +25,8 @@
#include "parser/parse_coerce.h"
#include "utils/syscache.h"
-Oid DemoteType(Oid inType);
-Oid PromoteTypeToNext(Oid inType);
+Oid DemoteType(Oid inType);
+Oid PromoteTypeToNext(Oid inType);
/* coerce_type()
@@ -35,45 +35,57 @@ Oid PromoteTypeToNext(Oid inType);
Node *
coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId)
{
- Node *result = NULL;
- Oid infunc;
- Datum val;
+ Node *result = NULL;
+ Oid infunc;
+ Datum val;
#ifdef PARSEDEBUG
-printf("coerce_type: argument types are %d -> %d\n",
- inputTypeId, targetTypeId);
+ printf("coerce_type: argument types are %d -> %d\n",
+ inputTypeId, targetTypeId);
#endif
if (targetTypeId == InvalidOid)
{
#ifdef PARSEDEBUG
-printf("coerce_type: apparent NULL target argument; suppress type conversion\n");
+ printf("coerce_type: apparent NULL target argument; suppress type conversion\n");
#endif
result = node;
}
else if (inputTypeId != targetTypeId)
{
- /* one of the known-good transparent conversions? then drop through... */
+
+ /*
+ * one of the known-good transparent conversions? then drop
+ * through...
+ */
if (IS_BINARY_COMPATIBLE(inputTypeId, targetTypeId))
{
#ifdef PARSEDEBUG
-printf("coerce_type: argument type %s is known to be convertible to type %s\n",
- typeidTypeName(inputTypeId), typeidTypeName(targetTypeId));
+ printf("coerce_type: argument type %s is known to be convertible to type %s\n",
+ typeidTypeName(inputTypeId), typeidTypeName(targetTypeId));
#endif
result = node;
}
- /* if not unknown input type, try for explicit conversion using functions... */
+ /*
+ * if not unknown input type, try for explicit conversion using
+ * functions...
+ */
else if (inputTypeId != UNKNOWNOID)
{
- /* We already know there is a function which will do this, so let's use it */
- FuncCall *n = makeNode(FuncCall);
+
+ /*
+ * We already know there is a function which will do this, so
+ * let's use it
+ */
+ FuncCall *n = makeNode(FuncCall);
+
n->funcname = typeidTypeName(targetTypeId);
n->args = lcons(node, NIL);
#ifdef PARSEDEBUG
-printf("coerce_type: construct function %s(%s)\n",
- typeidTypeName(targetTypeId), typeidTypeName(inputTypeId));
+ printf("coerce_type: construct function %s(%s)\n",
+ typeidTypeName(targetTypeId), typeidTypeName(inputTypeId));
#endif
result = transformExpr(pstate, (Node *) n, EXPR_COLUMN_FIRST);
@@ -81,14 +93,14 @@ printf("coerce_type: construct function %s(%s)\n",
else
{
#ifdef PARSEDEBUG
-printf("coerce_type: node is UNKNOWN type\n");
+ printf("coerce_type: node is UNKNOWN type\n");
#endif
- if (nodeTag(node) == T_Const)
- {
- Const *con = (Const *) node;
+ if (nodeTag(node) == T_Const)
+ {
+ Const *con = (Const *) node;
val = (Datum) textout((struct varlena *)
- con->constvalue);
+ con->constvalue);
infunc = typeidInfunc(targetTypeId);
con = makeNode(Const);
con->consttype = targetTypeId;
@@ -97,7 +109,7 @@ printf("coerce_type: node is UNKNOWN type\n");
/* use "-1" for varchar() type */
con->constvalue = (Datum) fmgr(infunc,
val,
- typeidTypElem(targetTypeId),
+ typeidTypElem(targetTypeId),
-1);
con->constisnull = false;
con->constbyval = true;
@@ -107,7 +119,7 @@ printf("coerce_type: node is UNKNOWN type\n");
else
{
#ifdef PARSEDEBUG
-printf("coerce_type: should never get here!\n");
+ printf("coerce_type: should never get here!\n");
#endif
result = node;
}
@@ -116,14 +128,14 @@ printf("coerce_type: should never get here!\n");
else
{
#ifdef PARSEDEBUG
-printf("coerce_type: argument type IDs %d match\n", inputTypeId);
+ printf("coerce_type: argument type IDs %d match\n", inputTypeId);
#endif
result = node;
}
return result;
-} /* coerce_type() */
+} /* coerce_type() */
/* can_coerce_type()
@@ -131,12 +143,12 @@ printf("coerce_type: argument type IDs %d match\n", inputTypeId);
*
* There are a few types which are known apriori to be convertible.
* We will check for those cases first, and then look for possible
- * conversion functions.
+ * conversion functions.
*
* Notes:
* This uses the same mechanism as the CAST() SQL construct in gram.y.
* We should also check the function return type on candidate conversion
- * routines just to be safe but we do not do that yet...
+ * routines just to be safe but we do not do that yet...
* We need to have a zero-filled OID array here, otherwise the cache lookup fails.
* - thomas 1998-03-31
*/
@@ -152,17 +164,21 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
for (i = 0; i < nargs; i++)
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: argument #%d types are %d -> %d\n",
- i, input_typeids[i], func_typeids[i]);
+ printf("can_coerce_type: argument #%d types are %d -> %d\n",
+ i, input_typeids[i], func_typeids[i]);
#endif
if (input_typeids[i] != func_typeids[i])
{
- /* one of the known-good transparent conversions? then drop through... */
+
+ /*
+ * one of the known-good transparent conversions? then drop
+ * through...
+ */
if (IS_BINARY_COMPATIBLE(input_typeids[i], func_typeids[i]))
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: argument #%d type %s is known to be convertible to type %s\n",
- i, typeidTypeName(input_typeids[i]), typeidTypeName(func_typeids[i]));
+ printf("can_coerce_type: argument #%d type %s is known to be convertible to type %s\n",
+ i, typeidTypeName(input_typeids[i]), typeidTypeName(func_typeids[i]));
#endif
}
@@ -170,7 +186,7 @@ printf("can_coerce_type: argument #%d type %s is known to be convertible to type
else if (func_typeids[i] == InvalidOid)
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: output OID func_typeids[%d] is zero\n", i);
+ printf("can_coerce_type: output OID func_typeids[%d] is zero\n", i);
#endif
return false;
}
@@ -179,37 +195,46 @@ printf("can_coerce_type: output OID func_typeids[%d] is zero\n", i);
else if (input_typeids[i] == InvalidOid)
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: input OID input_typeids[%d] is zero\n", i);
+ printf("can_coerce_type: input OID input_typeids[%d] is zero\n", i);
#endif
return false;
}
- /* if not unknown input type, try for explicit conversion using functions... */
+ /*
+ * if not unknown input type, try for explicit conversion
+ * using functions...
+ */
else if (input_typeids[i] != UNKNOWNOID)
{
MemSet(&oid_array[0], 0, 8 * sizeof(Oid));
oid_array[0] = input_typeids[i];
- /* look for a single-argument function named with the target type name */
+ /*
+ * look for a single-argument function named with the
+ * target type name
+ */
ftup = SearchSysCacheTuple(PRONAME,
- PointerGetDatum(typeidTypeName(func_typeids[i])),
+ PointerGetDatum(typeidTypeName(func_typeids[i])),
Int32GetDatum(1),
PointerGetDatum(oid_array),
0);
- /* should also check the function return type just to be safe... */
+ /*
+ * should also check the function return type just to be
+ * safe...
+ */
if (HeapTupleIsValid(ftup))
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: found function %s(%s) to convert argument #%d\n",
- typeidTypeName(func_typeids[i]), typeidTypeName(input_typeids[i]), i);
+ printf("can_coerce_type: found function %s(%s) to convert argument #%d\n",
+ typeidTypeName(func_typeids[i]), typeidTypeName(input_typeids[i]), i);
#endif
}
else
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: did not find function %s(%s) to convert argument #%d\n",
- typeidTypeName(func_typeids[i]), typeidTypeName(input_typeids[i]), i);
+ printf("can_coerce_type: did not find function %s(%s) to convert argument #%d\n",
+ typeidTypeName(func_typeids[i]), typeidTypeName(input_typeids[i]), i);
#endif
return false;
}
@@ -217,8 +242,8 @@ printf("can_coerce_type: did not find function %s(%s) to convert argument #%d\n"
else
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: argument #%d type is %d (UNKNOWN)\n",
- i, input_typeids[i]);
+ printf("can_coerce_type: argument #%d type is %d (UNKNOWN)\n",
+ i, input_typeids[i]);
#endif
}
@@ -226,28 +251,28 @@ printf("can_coerce_type: argument #%d type is %d (UNKNOWN)\n",
if (typeTypeFlag(tp) == 'c')
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: typeTypeFlag for %s is 'c'\n",
- typeidTypeName(input_typeids[i]));
+ printf("can_coerce_type: typeTypeFlag for %s is 'c'\n",
+ typeidTypeName(input_typeids[i]));
#endif
return false;
}
#ifdef PARSEDEBUG
-printf("can_coerce_type: conversion from %s to %s is possible\n",
- typeidTypeName(input_typeids[i]), typeidTypeName(func_typeids[i]));
+ printf("can_coerce_type: conversion from %s to %s is possible\n",
+ typeidTypeName(input_typeids[i]), typeidTypeName(func_typeids[i]));
#endif
}
else
{
#ifdef PARSEDEBUG
-printf("can_coerce_type: argument #%d type IDs %d match\n",
- i, input_typeids[i]);
+ printf("can_coerce_type: argument #%d type IDs %d match\n",
+ i, input_typeids[i]);
#endif
}
}
return true;
-} /* can_coerce_type() */
+} /* can_coerce_type() */
/* TypeCategory()
@@ -256,7 +281,7 @@ printf("can_coerce_type: argument #%d type IDs %d match\n",
CATEGORY
TypeCategory(Oid inType)
{
- CATEGORY result;
+ CATEGORY result;
switch (inType)
{
@@ -307,7 +332,7 @@ TypeCategory(Oid inType)
break;
}
return result;
-} /* TypeCategory() */
+} /* TypeCategory() */
/* IsPreferredType()
@@ -317,7 +342,7 @@ bool
IsPreferredType(CATEGORY category, Oid type)
{
return type == PreferredType(category, type);
-} /* IsPreferredType() */
+} /* IsPreferredType() */
/* PreferredType()
@@ -326,7 +351,7 @@ IsPreferredType(CATEGORY category, Oid type)
Oid
PreferredType(CATEGORY category, Oid type)
{
- Oid result;
+ Oid result;
switch (category)
{
@@ -363,17 +388,17 @@ PreferredType(CATEGORY category, Oid type)
break;
}
#ifdef PARSEDEBUG
-printf("PreferredType- (%d) preferred type is %s\n", category, typeidTypeName(result));
+ printf("PreferredType- (%d) preferred type is %s\n", category, typeidTypeName(result));
#endif
return result;
-} /* PreferredType() */
+} /* PreferredType() */
#if FALSE
Oid
PromoteTypeToNext(Oid inType)
{
- Oid result;
+ Oid result;
switch (inType)
{
@@ -418,13 +443,13 @@ PromoteTypeToNext(Oid inType)
break;
}
return result;
-} /* PromoteTypeToNext() */
+} /* PromoteTypeToNext() */
Oid
DemoteType(Oid inType)
{
- Oid result;
+ Oid result;
switch (inType)
{
@@ -438,13 +463,13 @@ DemoteType(Oid inType)
break;
}
return result;
-} /* DemoteType() */
+} /* DemoteType() */
Oid
PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
{
- Oid result;
+ Oid result;
if (inType1 == inType2)
{
@@ -471,34 +496,35 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
switch (*arg1)
{
case (CHAROID):
- switch (*arg2)
- {
- case (BPCHAROID):
- case (VARCHAROID):
- case (TEXTOID):
-
- case (INT2OID):
- case (INT4OID):
- case (FLOAT4OID):
- case (FLOAT8OID):
- case (CASHOID):
-
- case (POINTOID):
- case (LSEGOID):
- case (LINEOID):
- case (BOXOID):
- case (PATHOID):
- case (CIRCLEOID):
- case (POLYGONOID):
-
- case (InvalidOid):
- case (UNKNOWNOID):
- case (BOOLOID):
- default:
- *arg1 = InvalidOid;
- *arg2 = InvalidOid;
- result = InvalidOid;
- }
+ switch (*arg2)
+ {
+ case (BPCHAROID):
+ case (VARCHAROID):
+ case (TEXTOID):
+
+ case (INT2OID):
+ case (INT4OID):
+ case (FLOAT4OID):
+ case (FLOAT8OID):
+ case (CASHOID):
+
+ case (POINTOID):
+ case (LSEGOID):
+ case (LINEOID):
+ case (BOXOID):
+ case (PATHOID):
+ case (CIRCLEOID):
+ case (POLYGONOID):
+
+ case (InvalidOid):
+ case (UNKNOWNOID):
+ case (BOOLOID):
+ default:
+ *arg1 = InvalidOid;
+ *arg2 = InvalidOid;
+ result = InvalidOid;
+ }
+ }
}
else if (isBuiltIn1 && !isBuiltIn2)
{
@@ -536,31 +562,33 @@ PromoteLesserType(Oid inType1, Oid inType2, Oid *newType1, Oid *newType2)
case (CHAROID):
switch (*arg2)
{
- case (BPCHAROID):
- case (VARCHAROID):
- case (TEXTOID):
-
- case (INT2OID):
- case (INT4OID):
- case (FLOAT4OID):
- case (FLOAT8OID):
- case (CASHOID):
-
- case (POINTOID):
- case (LSEGOID):
- case (LINEOID):
- case (BOXOID):
- case (PATHOID):
- case (CIRCLEOID):
- case (POLYGONOID):
-
- case (InvalidOid):
- case (UNKNOWNOID):
- case (BOOLOID):
- default:
- *arg1 = InvalidOid;
- *arg2 = InvalidOid;
- result = InvalidOid;
+ case (BPCHAROID):
+ case (VARCHAROID):
+ case (TEXTOID):
+
+ case (INT2OID):
+ case (INT4OID):
+ case (FLOAT4OID):
+ case (FLOAT8OID):
+ case (CASHOID):
+
+ case (POINTOID):
+ case (LSEGOID):
+ case (LINEOID):
+ case (BOXOID):
+ case (PATHOID):
+ case (CIRCLEOID):
+ case (POLYGONOID):
+
+ case (InvalidOid):
+ case (UNKNOWNOID):
+ case (BOOLOID):
+ default:
+ *arg1 = InvalidOid;
+ *arg2 = InvalidOid;
+ result = InvalidOid;
+ }
}
}
+
#endif
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 80726e2695..a296caad55 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.33 1998/09/01 03:24:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.34 1998/09/01 04:30:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -264,11 +264,11 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
if (length(left_expr) !=
length(right_expr))
elog(ERROR, "parser: Subselect has too many or too few fields.");
-
- if (length(left_expr) > 1 &&
- strcmp (op, "=") != 0 && strcmp (op, "<>") != 0)
+
+ if (length(left_expr) > 1 &&
+ strcmp(op, "=") != 0 && strcmp(op, "<>") != 0)
elog(ERROR, "parser: '%s' is not relational operator", op);
-
+
sublink->oper = NIL;
foreach(elist, left_expr)
{
@@ -301,10 +301,10 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
}
/* Some nodes do _not_ come from the original parse tree,
- * but result from parser transformation in this phase.
+ * but result from parser transformation in this phase.
* At least one construct (BETWEEN/AND) puts the same nodes
- * into two branches of the parse tree; hence, some nodes
- * are transformed twice.
+ * into two branches of the parse tree; hence, some nodes
+ * are transformed twice.
* The three cases below come from transforming function calls.
* Let's try just passing them through...
* - thomas 1998-03-14
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index d2eef80ea3..99c4b754b0 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.27 1998/09/01 03:24:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.28 1998/09/01 04:30:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,8 +45,7 @@
#include "utils/lsyscache.h"
#include "utils/syscache.h"
-static Node *
-ParseComplexProjection(ParseState *pstate,
+static Node *ParseComplexProjection(ParseState *pstate,
char *funcname,
Node *first_arg,
bool *attisset);
@@ -64,14 +63,12 @@ func_get_detail(char *funcname,
Oid **true_typeids);
static Oid funcid_get_rettype(Oid funcid);
static Oid **gen_cross_product(InhPaths *arginh, int nargs);
-static void
-make_arguments(ParseState *pstate,
+static void make_arguments(ParseState *pstate,
int nargs,
List *fargs,
Oid *input_typeids,
Oid *function_typeids);
-static int
-match_argtypes(int nargs,
+static int match_argtypes(int nargs,
Oid *input_typeids,
CandidateList function_typeids,
CandidateList *candidates);
@@ -270,23 +267,24 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
fargs, precedence);
/*
- * See if this is a single argument function with the function name
- * also a type name and the input argument and type name binary compatible...
+ * See if this is a single argument function with the function
+ * name also a type name and the input argument and type name
+ * binary compatible...
*/
if ((HeapTupleIsValid(tp = SearchSysCacheTuple(TYPNAME,
- PointerGetDatum(funcname),
+ PointerGetDatum(funcname),
0, 0, 0)))
- && IS_BINARY_COMPATIBLE(typeTypeId(tp), basetype))
- return((Node *)lfirst(fargs));
+ && IS_BINARY_COMPATIBLE(typeTypeId(tp), basetype))
+ return ((Node *) lfirst(fargs));
}
}
/*
* If we dropped through to here it's really a function (or a set,
- * which is implemented as a function).
- * Extract arg type info and transform relation name arguments
- * into varnodes of the appropriate form.
+ * which is implemented as a function). Extract arg type info and
+ * transform relation name arguments into varnodes of the appropriate
+ * form.
*/
MemSet(&oid_array[0], 0, 8 * sizeof(Oid));
@@ -372,7 +370,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
}
else
{
- bool exists;
+ bool exists;
exists = func_get_detail(funcname, nargs, oid_array, &funcid,
&rettype, &retset, &true_oid_array);
@@ -446,8 +444,8 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
seqrel = textout(seqname);
if ((aclcheck_result = pg_aclcheck(seqrel, GetPgUserName(),
- (((funcid == F_NEXTVAL) || (funcid == F_SETVAL)) ?
- ACL_WR : ACL_RD)))
+ (((funcid == F_NEXTVAL) || (funcid == F_SETVAL)) ?
+ ACL_WR : ACL_RD)))
!= ACLCHECK_OK)
elog(ERROR, "%s.%s: %s",
seqrel, funcname, aclcheck_error_strings[aclcheck_result]);
@@ -544,7 +542,7 @@ func_get_candidates(char *funcname, int nargs)
{
ItemPointer iptr;
Buffer buffer;
-
+
iptr = &indexRes->heap_iptr;
tuple = heap_fetch(heapRelation, SnapshotNow, iptr, &buffer);
pfree(indexRes);
@@ -614,7 +612,7 @@ match_argtypes(int nargs,
}
return ncandidates;
-} /* match_argtypes() */
+} /* match_argtypes() */
/* func_select_candidate()
@@ -633,24 +631,24 @@ func_select_candidate(int nargs,
Oid *input_typeids,
CandidateList candidates)
{
- CandidateList current_candidate;
- CandidateList last_candidate;
- Oid *current_typeids;
- int i;
+ CandidateList current_candidate;
+ CandidateList last_candidate;
+ Oid *current_typeids;
+ int i;
- int ncandidates;
- int nbestMatch,
- nmatch,
- nident;
+ int ncandidates;
+ int nbestMatch,
+ nmatch,
+ nident;
- CATEGORY slot_category,
- current_category;
- Oid slot_type,
- current_type;
+ CATEGORY slot_category,
+ current_category;
+ Oid slot_type,
+ current_type;
/*
* Run through all candidates and keep those with the most matches
- * on explicit types. Keep all candidates if none match.
+ * on explicit types. Keep all candidates if none match.
*/
ncandidates = 0;
nbestMatch = 0;
@@ -665,7 +663,7 @@ func_select_candidate(int nargs,
for (i = 0; i < nargs; i++)
{
if ((input_typeids[i] != UNKNOWNOID)
- && (current_typeids[i] == input_typeids[i]))
+ && (current_typeids[i] == input_typeids[i]))
nmatch++;
else if (IS_BINARY_COMPATIBLE(current_typeids[i], input_typeids[i]))
nident++;
@@ -675,7 +673,7 @@ func_select_candidate(int nargs,
return current_candidate->args;
#ifdef PARSEDEBUG
-printf("func_select_candidate- candidate has %d matches\n", nmatch);
+ printf("func_select_candidate- candidate has %d matches\n", nmatch);
#endif
if ((nmatch > nbestMatch) || (last_candidate == NULL))
{
@@ -684,7 +682,7 @@ printf("func_select_candidate- candidate has %d matches\n", nmatch);
last_candidate = current_candidate;
ncandidates = 1;
#ifdef PARSEDEBUG
-printf("func_select_candidate- choose candidate as best match\n");
+ printf("func_select_candidate- choose candidate as best match\n");
#endif
}
else if (nmatch == nbestMatch)
@@ -693,14 +691,14 @@ printf("func_select_candidate- choose candidate as best match\n");
last_candidate = current_candidate;
ncandidates++;
#ifdef PARSEDEBUG
-printf("func_select_candidate- choose candidate as possible match\n");
+ printf("func_select_candidate- choose candidate as possible match\n");
#endif
}
else
{
last_candidate->next = NULL;
#ifdef PARSEDEBUG
-printf("func_select_candidate- reject candidate as possible match\n");
+ printf("func_select_candidate- reject candidate as possible match\n");
#endif
}
}
@@ -730,15 +728,15 @@ printf("func_select_candidate- reject candidate as possible match\n");
slot_category = current_category;
slot_type = current_type;
#ifdef PARSEDEBUG
-printf("func_select_candidate- assign column #%d first candidate slot type %s\n",
- i, typeidTypeName(current_type));
+ printf("func_select_candidate- assign column #%d first candidate slot type %s\n",
+ i, typeidTypeName(current_type));
#endif
}
else if ((current_category != slot_category)
- && IS_BUILTIN_TYPE(current_type))
+ && IS_BUILTIN_TYPE(current_type))
{
#ifdef PARSEDEBUG
-printf("func_select_candidate- multiple possible types for column #%d; unable to choose candidate\n", i);
+ printf("func_select_candidate- multiple possible types for column #%d; unable to choose candidate\n", i);
#endif
return NULL;
}
@@ -749,15 +747,15 @@ printf("func_select_candidate- multiple possible types for column #%d; unable to
slot_type = current_type;
candidates = current_candidate;
#ifdef PARSEDEBUG
-printf("func_select_candidate- column #%d found preferred candidate type %s\n",
- i, typeidTypeName(slot_type));
+ printf("func_select_candidate- column #%d found preferred candidate type %s\n",
+ i, typeidTypeName(slot_type));
#endif
}
else
{
#ifdef PARSEDEBUG
-printf("func_select_candidate- column #%d found possible candidate type %s\n",
- i, typeidTypeName(current_type));
+ printf("func_select_candidate- column #%d found possible candidate type %s\n",
+ i, typeidTypeName(current_type));
#endif
}
}
@@ -767,16 +765,16 @@ printf("func_select_candidate- column #%d found possible candidate type %s\n",
{
input_typeids[i] = slot_type;
#ifdef PARSEDEBUG
-printf("func_select_candidate- assign column #%d slot type %s\n",
- i, typeidTypeName(input_typeids[i]));
+ printf("func_select_candidate- assign column #%d slot type %s\n",
+ i, typeidTypeName(input_typeids[i]));
#endif
}
}
else
{
#ifdef PARSEDEBUG
-printf("func_select_candidate- column #%d input type is %s\n",
- i, typeidTypeName(input_typeids[i]));
+ printf("func_select_candidate- column #%d input type is %s\n",
+ i, typeidTypeName(input_typeids[i]));
#endif
}
}
@@ -792,36 +790,36 @@ printf("func_select_candidate- column #%d input type is %s\n",
return candidates->args;
return NULL;
-} /* func_select_candidate() */
+} /* func_select_candidate() */
/* func_get_detail()
* Find the named function in the system catalogs.
*
* Attempt to find the named function in the system catalogs with
- * arguments exactly as specified, so that the normal case
- * (exact match) is as quick as possible.
+ * arguments exactly as specified, so that the normal case
+ * (exact match) is as quick as possible.
*
* If an exact match isn't found:
- * 1) get a vector of all possible input arg type arrays constructed
- * from the superclasses of the original input arg types
- * 2) get a list of all possible argument type arrays to the function
- * with given name and number of arguments
- * 3) for each input arg type array from vector #1:
- * a) find how many of the function arg type arrays from list #2
- * it can be coerced to
- * b) if the answer is one, we have our function
- * c) if the answer is more than one, attempt to resolve the conflict
- * d) if the answer is zero, try the next array from vector #1
+ * 1) get a vector of all possible input arg type arrays constructed
+ * from the superclasses of the original input arg types
+ * 2) get a list of all possible argument type arrays to the function
+ * with given name and number of arguments
+ * 3) for each input arg type array from vector #1:
+ * a) find how many of the function arg type arrays from list #2
+ * it can be coerced to
+ * b) if the answer is one, we have our function
+ * c) if the answer is more than one, attempt to resolve the conflict
+ * d) if the answer is zero, try the next array from vector #1
*/
static bool
func_get_detail(char *funcname,
int nargs,
Oid *oid_array,
- Oid *funcid, /* return value */
- Oid *rettype, /* return value */
- bool *retset, /* return value */
- Oid **true_typeids) /* return value */
+ Oid *funcid, /* return value */
+ Oid *rettype, /* return value */
+ bool *retset, /* return value */
+ Oid **true_typeids) /* return value */
{
Oid **input_typeid_vector;
Oid *current_input_typeids;
@@ -864,33 +862,36 @@ func_get_detail(char *funcname,
ftup = SearchSysCacheTuple(PRONAME,
PointerGetDatum(funcname),
Int32GetDatum(nargs),
- PointerGetDatum(*true_typeids),
+ PointerGetDatum(*true_typeids),
0);
Assert(HeapTupleIsValid(ftup));
}
- /* multiple candidates? then better decide or throw an error... */
+ /*
+ * multiple candidates? then better decide or throw an
+ * error...
+ */
else if (ncandidates > 1)
{
*true_typeids = func_select_candidate(nargs,
- current_input_typeids,
- current_function_typeids);
+ current_input_typeids,
+ current_function_typeids);
/* couldn't decide, so quit */
if (*true_typeids == NULL)
{
func_error(NULL, funcname, nargs, oid_array,
- "There is more than one function that satisfies the given argument types"
- "\n\tYou will have to retype your query using explicit typecasts");
+ "There is more than one function that satisfies the given argument types"
+ "\n\tYou will have to retype your query using explicit typecasts");
}
/* found something, so use the first one... */
else
{
ftup = SearchSysCacheTuple(PRONAME,
- PointerGetDatum(funcname),
+ PointerGetDatum(funcname),
Int32GetDatum(nargs),
- PointerGetDatum(*true_typeids),
+ PointerGetDatum(*true_typeids),
0);
Assert(HeapTupleIsValid(ftup));
}
@@ -1155,16 +1156,16 @@ gen_cross_product(InhPaths *arginh, int nargs)
/* make_arguments()
* Given the number and types of arguments to a function, and the
- * actual arguments and argument types, do the necessary typecasting.
+ * actual arguments and argument types, do the necessary typecasting.
*
* There are two ways an input typeid can differ from a function typeid:
- * 1) the input type inherits the function type, so no typecasting required
- * 2) the input type can be typecast into the function type
+ * 1) the input type inherits the function type, so no typecasting required
+ * 2) the input type can be typecast into the function type
* Right now, we only typecast unknowns, and that is all we check for.
*
* func_get_detail() now can find coersions for function arguments which
- * will make this function executable. So, we need to recover these
- * results here too.
+ * will make this function executable. So, we need to recover these
+ * results here too.
* - thomas 1998-03-25
*/
static void
@@ -1181,7 +1182,11 @@ make_arguments(ParseState *pstate,
i < nargs;
i++, current_fargs = lnext(current_fargs))
{
- /* unspecified type for string constant? then use heuristics for conversion... */
+
+ /*
+ * unspecified type for string constant? then use heuristics for
+ * conversion...
+ */
if (input_typeids[i] == UNKNOWNOID && function_typeids[i] != InvalidOid)
{
lfirst(current_fargs) =
@@ -1222,7 +1227,7 @@ setup_tlist(char *attname, Oid relid)
attno = get_attnum(relid, attname);
if (attno < 0)
elog(ERROR, "Cannot reference attribute '%s'"
- " of tuple params/return values for functions", attname);
+ " of tuple params/return values for functions", attname);
typeid = get_atttype(relid, attno);
type_mod = get_atttypmod(relid, attno);
@@ -1454,11 +1459,11 @@ func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg)
if (caller == NULL)
{
elog(ERROR, "Function '%s(%s)' does not exist%s%s",
- funcname, p, ((msg != NULL)? "\n\t": ""), ((msg != NULL)? msg: ""));
+ funcname, p, ((msg != NULL) ? "\n\t" : ""), ((msg != NULL) ? msg : ""));
}
else
{
elog(ERROR, "%s: function '%s(%s)' does not exist%s%s",
- caller, funcname, p, ((msg != NULL)? "\n\t": ""), ((msg != NULL)? msg: ""));
+ caller, funcname, p, ((msg != NULL) ? "\n\t" : ""), ((msg != NULL) ? msg : ""));
}
}
diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c
index a02077b801..d6829261b5 100644
--- a/src/backend/parser/parse_node.c
+++ b/src/backend/parser/parse_node.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.20 1998/09/01 03:24:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_node.c,v 1.21 1998/09/01 04:30:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,8 +31,7 @@
#include "utils/lsyscache.h"
static void disallow_setop(char *op, Type optype, Node *operand);
-static Node *
-make_operand(char *opname,
+static Node *make_operand(char *opname,
Node *tree,
Oid orig_typeId,
Oid true_typeId);
@@ -69,8 +68,8 @@ make_operand(char *opname,
Type true_type;
#ifdef PARSEDEBUG
-printf("make_operand: constructing operand for '%s' %s->%s\n",
- opname, typeidTypeName(orig_typeId), typeidTypeName(true_typeId));
+ printf("make_operand: constructing operand for '%s' %s->%s\n",
+ opname, typeidTypeName(orig_typeId), typeidTypeName(true_typeId));
#endif
if (tree != NULL)
{
@@ -82,8 +81,8 @@ printf("make_operand: constructing operand for '%s' %s->%s\n",
if (true_typeId != orig_typeId)
{
#ifdef PARSEDEBUG
-printf("make_operand: try to convert node from %s to %s\n",
- typeidTypeName(orig_typeId), typeidTypeName(true_typeId));
+ printf("make_operand: try to convert node from %s to %s\n",
+ typeidTypeName(orig_typeId), typeidTypeName(true_typeId));
#endif
result = coerce_type(NULL, tree, orig_typeId, true_typeId);
}
@@ -104,7 +103,7 @@ printf("make_operand: try to convert node from %s to %s\n",
}
return result;
-} /* make_operand() */
+} /* make_operand() */
static void
@@ -157,11 +156,11 @@ make_op(char *opname, Node *ltree, Node *rtree)
rtypeId = (rtree == NULL) ? UNKNOWNOID : exprType(rtree);
tup = left_oper(opname, rtypeId);
#ifdef PARSEDEBUG
-printf("make_op: returned from left_oper() with structure at %p\n", (void *)tup);
+ printf("make_op: returned from left_oper() with structure at %p\n", (void *) tup);
#endif
opform = (Form_pg_operator) GETSTRUCT(tup);
#ifdef PARSEDEBUG
-printf("make_op: calling make_operand()\n");
+ printf("make_op: calling make_operand()\n");
#endif
right = make_operand(opname, rtree, rtypeId, opform->oprright);
left = NULL;
@@ -192,9 +191,9 @@ printf("make_op: calling make_operand()\n");
right = make_operand(opname, rtree, rtypeId, opform->oprright);
}
- newop = makeOper(oprid(tup), /* opno */
- InvalidOid, /* opid */
- opform->oprresult, /* operator result type */
+ newop = makeOper(oprid(tup),/* opno */
+ InvalidOid,/* opid */
+ opform->oprresult, /* operator result type */
0,
NULL);
@@ -211,7 +210,7 @@ printf("make_op: calling make_operand()\n");
result->args = lcons(left, lcons(right, NIL));
return result;
-} /* make_op() */
+} /* make_op() */
Var *
@@ -284,7 +283,7 @@ make_array_ref(Node *expr,
/* get the type tuple for the element type */
type_tuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(type_struct_array->typelem),
+ ObjectIdGetDatum(type_struct_array->typelem),
0, 0, 0);
if (!HeapTupleIsValid(type_tuple))
elog(ERROR, "make_array_ref: Cache lookup failed for type %d\n",
@@ -365,7 +364,7 @@ make_array_set(Expr *target_expr,
type_struct_array->typname);
/* get the type tuple for the element type */
type_tuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(type_struct_array->typelem),
+ ObjectIdGetDatum(type_struct_array->typelem),
0, 0, 0);
if (!HeapTupleIsValid(type_tuple))
diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c
index c57d32a2f4..5cf6f34898 100644
--- a/src/backend/parser/parse_oper.c
+++ b/src/backend/parser/parse_oper.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.16 1998/09/01 03:24:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.17 1998/09/01 04:30:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,19 +29,17 @@
#include "utils/syscache.h"
Oid *
-oper_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates);
-static int
-binary_oper_get_candidates(char *opname,
+ oper_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates);
+static int binary_oper_get_candidates(char *opname,
Oid leftTypeId,
Oid rightTypeId,
CandidateList *candidates);
-static int
-unary_oper_get_candidates(char *op,
+static int unary_oper_get_candidates(char *op,
Oid typeId,
CandidateList *candidates,
char rightleft);
static void
-op_error(char *op, Oid arg1, Oid arg2);
+ op_error(char *op, Oid arg1, Oid arg2);
Oid
any_ordering_op(int restype)
@@ -53,8 +51,8 @@ any_ordering_op(int restype)
if (!HeapTupleIsValid(order_op))
{
elog(ERROR, "Unable to find an ordering operator '%s' for type %s."
- "\n\tUse an explicit ordering operator or modify the query.",
- "<", typeidTypeName(restype));
+ "\n\tUse an explicit ordering operator or modify the query.",
+ "<", typeidTypeName(restype));
}
order_opid = oprid(order_op);
@@ -107,7 +105,7 @@ binary_oper_get_candidates(char *opname,
pg_operator_desc = heap_openr(OperatorRelationName);
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* ??? */
+ SnapshotSelf, /* ??? */
nkeys,
opKey);
@@ -128,7 +126,7 @@ binary_oper_get_candidates(char *opname,
heap_close(pg_operator_desc);
return ncandidates;
-} /* binary_oper_get_candidates() */
+} /* binary_oper_get_candidates() */
/* oper_select_candidate()
@@ -179,24 +177,24 @@ oper_select_candidate(int nargs,
Oid *input_typeids,
CandidateList candidates)
{
- CandidateList current_candidate;
- CandidateList last_candidate;
- Oid *current_typeids;
- int unknownOids;
- int i;
+ CandidateList current_candidate;
+ CandidateList last_candidate;
+ Oid *current_typeids;
+ int unknownOids;
+ int i;
- int ncandidates;
- int nbestMatch,
- nmatch;
+ int ncandidates;
+ int nbestMatch,
+ nmatch;
- CATEGORY slot_category,
- current_category;
- Oid slot_type,
- current_type;
+ CATEGORY slot_category,
+ current_category;
+ Oid slot_type,
+ current_type;
/*
* Run through all candidates and keep those with the most matches
- * on explicit types. Keep all candidates if none match.
+ * on explicit types. Keep all candidates if none match.
*/
ncandidates = 0;
nbestMatch = 0;
@@ -210,12 +208,12 @@ oper_select_candidate(int nargs,
for (i = 0; i < nargs; i++)
{
if ((input_typeids[i] != UNKNOWNOID)
- && (current_typeids[i] == input_typeids[i]))
+ && (current_typeids[i] == input_typeids[i]))
nmatch++;
}
#ifdef PARSEDEBUG
-printf("oper_select_candidate- candidate has %d matches\n", nmatch);
+ printf("oper_select_candidate- candidate has %d matches\n", nmatch);
#endif
if ((nmatch > nbestMatch) || (last_candidate == NULL))
{
@@ -224,7 +222,7 @@ printf("oper_select_candidate- candidate has %d matches\n", nmatch);
last_candidate = current_candidate;
ncandidates = 1;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- choose candidate as best match\n");
+ printf("oper_select_candidate- choose candidate as best match\n");
#endif
}
else if (nmatch == nbestMatch)
@@ -233,14 +231,14 @@ printf("oper_select_candidate- choose candidate as best match\n");
last_candidate = current_candidate;
ncandidates++;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- choose candidate as possible match\n");
+ printf("oper_select_candidate- choose candidate as possible match\n");
#endif
}
else
{
last_candidate->next = NULL;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- reject candidate as possible match\n");
+ printf("oper_select_candidate- reject candidate as possible match\n");
#endif
}
}
@@ -250,7 +248,7 @@ printf("oper_select_candidate- reject candidate as possible match\n");
if (!can_coerce_type(1, &input_typeids[0], &candidates->args[0])
|| !can_coerce_type(1, &input_typeids[1], &candidates->args[1]))
ncandidates = 0;
- return (ncandidates == 1)? candidates->args: NULL;
+ return (ncandidates == 1) ? candidates->args : NULL;
}
/*
@@ -275,13 +273,13 @@ printf("oper_select_candidate- reject candidate as possible match\n");
if (current_typeids[i] == input_typeids[i])
nmatch++;
else if (IsPreferredType(current_category, current_typeids[i])
- && can_coerce_type(1, &input_typeids[i], &current_typeids[i]))
+ && can_coerce_type(1, &input_typeids[i], &current_typeids[i]))
nmatch++;
}
}
#ifdef PARSEDEBUG
-printf("oper_select_candidate- candidate has %d matches\n", nmatch);
+ printf("oper_select_candidate- candidate has %d matches\n", nmatch);
#endif
if ((nmatch > nbestMatch) || (last_candidate == NULL))
{
@@ -290,7 +288,7 @@ printf("oper_select_candidate- candidate has %d matches\n", nmatch);
last_candidate = current_candidate;
ncandidates = 1;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- choose candidate as best match\n");
+ printf("oper_select_candidate- choose candidate as best match\n");
#endif
}
else if (nmatch == nbestMatch)
@@ -299,14 +297,14 @@ printf("oper_select_candidate- choose candidate as best match\n");
last_candidate = current_candidate;
ncandidates++;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- choose candidate as possible match\n");
+ printf("oper_select_candidate- choose candidate as possible match\n");
#endif
}
else
{
last_candidate->next = NULL;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- reject candidate as possible match\n");
+ printf("oper_select_candidate- reject candidate as possible match\n");
#endif
}
}
@@ -318,10 +316,10 @@ printf("oper_select_candidate- reject candidate as possible match\n");
{
ncandidates = 0;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- unable to coerce preferred candidate\n");
+ printf("oper_select_candidate- unable to coerce preferred candidate\n");
#endif
}
- return (ncandidates == 1)? candidates->args: NULL;
+ return (ncandidates == 1) ? candidates->args : NULL;
}
/*
@@ -333,7 +331,7 @@ printf("oper_select_candidate- unable to coerce preferred candidate\n");
for (i = 0; i < nargs; i++)
{
if ((input_typeids[i] != UNKNOWNOID)
- && (input_typeids[i] != InvalidOid))
+ && (input_typeids[i] != InvalidOid))
current_type = input_typeids[i];
else
unknownOids = TRUE;
@@ -350,7 +348,7 @@ printf("oper_select_candidate- unable to coerce preferred candidate\n");
{
current_typeids = current_candidate->args;
if ((current_type == current_typeids[i])
- || IS_BINARY_COMPATIBLE(current_type, current_typeids[i]))
+ || IS_BINARY_COMPATIBLE(current_type, current_typeids[i]))
nmatch++;
}
if (nmatch == nargs)
@@ -376,14 +374,14 @@ printf("oper_select_candidate- unable to coerce preferred candidate\n");
slot_category = current_category;
slot_type = current_type;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- assign column #%d first candidate slot type %s\n",
- i, typeidTypeName(current_type));
+ printf("oper_select_candidate- assign column #%d first candidate slot type %s\n",
+ i, typeidTypeName(current_type));
#endif
}
else if (current_category != slot_category)
{
#ifdef PARSEDEBUG
-printf("oper_select_candidate- multiple possible types for column #%d; unable to choose candidate\n", i);
+ printf("oper_select_candidate- multiple possible types for column #%d; unable to choose candidate\n", i);
#endif
return NULL;
}
@@ -394,15 +392,15 @@ printf("oper_select_candidate- multiple possible types for column #%d; unable to
slot_type = current_type;
candidates = current_candidate;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- column #%d found preferred candidate type %s\n",
- i, typeidTypeName(slot_type));
+ printf("oper_select_candidate- column #%d found preferred candidate type %s\n",
+ i, typeidTypeName(slot_type));
#endif
}
else
{
#ifdef PARSEDEBUG
-printf("oper_select_candidate- column #%d found possible candidate type %s\n",
- i, typeidTypeName(current_type));
+ printf("oper_select_candidate- column #%d found possible candidate type %s\n",
+ i, typeidTypeName(current_type));
#endif
}
}
@@ -412,16 +410,16 @@ printf("oper_select_candidate- column #%d found possible candidate type %s\n",
{
input_typeids[i] = slot_type;
#ifdef PARSEDEBUG
-printf("oper_select_candidate- assign column #%d slot type %s\n",
- i, typeidTypeName(input_typeids[i]));
+ printf("oper_select_candidate- assign column #%d slot type %s\n",
+ i, typeidTypeName(input_typeids[i]));
#endif
}
}
else
{
#ifdef PARSEDEBUG
-printf("oper_select_candidate- column #%d input type is %s\n",
- i, typeidTypeName(input_typeids[i]));
+ printf("oper_select_candidate- column #%d input type is %s\n",
+ i, typeidTypeName(input_typeids[i]));
#endif
}
}
@@ -432,12 +430,12 @@ printf("oper_select_candidate- column #%d input type is %s\n",
current_candidate = current_candidate->next)
{
if (can_coerce_type(1, &input_typeids[0], &current_candidate->args[0])
- && can_coerce_type(1, &input_typeids[1], &current_candidate->args[1]))
+ && can_coerce_type(1, &input_typeids[1], &current_candidate->args[1]))
ncandidates++;
}
- return (ncandidates == 1)? candidates->args: NULL;
-} /* oper_select_candidate() */
+ return (ncandidates == 1) ? candidates->args : NULL;
+} /* oper_select_candidate() */
/* oper_exact()
@@ -452,8 +450,10 @@ oper_exact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarn
Node *tree;
/* Unspecified type for one of the arguments? then use the other */
- if ((arg1 == UNKNOWNOID) && (arg2 != InvalidOid)) arg1 = arg2;
- else if ((arg2 == UNKNOWNOID) && (arg1 != InvalidOid)) arg2 = arg1;
+ if ((arg1 == UNKNOWNOID) && (arg2 != InvalidOid))
+ arg1 = arg2;
+ else if ((arg2 == UNKNOWNOID) && (arg1 != InvalidOid))
+ arg2 = arg1;
tup = SearchSysCacheTuple(OPRNAME,
PointerGetDatum(op),
@@ -461,7 +461,10 @@ oper_exact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarn
ObjectIdGetDatum(arg2),
CharGetDatum('b'));
- /* Did not find anything? then try flipping arguments on a commutative operator... */
+ /*
+ * Did not find anything? then try flipping arguments on a commutative
+ * operator...
+ */
if (!HeapTupleIsValid(tup) && (arg1 != arg2))
{
tup = SearchSysCacheTuple(OPRNAME,
@@ -475,13 +478,13 @@ oper_exact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarn
Form_pg_operator opform;
#if PARSEDEBUG
-printf("oper_exact: found possible commutative operator candidate\n");
+ printf("oper_exact: found possible commutative operator candidate\n");
#endif
opform = (Form_pg_operator) GETSTRUCT(tup);
if (opform->oprcom == tup->t_oid)
{
#if PARSEDEBUG
-printf("oper_exact: commutative operator found\n");
+ printf("oper_exact: commutative operator found\n");
#endif
if ((ltree != NULL) && (rtree != NULL))
{
@@ -499,7 +502,7 @@ printf("oper_exact: commutative operator found\n");
}
return tup;
-} /* oper_exact() */
+} /* oper_exact() */
/* oper_inexact()
@@ -510,11 +513,11 @@ printf("oper_exact: commutative operator found\n");
Operator
oper_inexact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarnings)
{
- HeapTuple tup;
- CandidateList candidates;
- int ncandidates;
- Oid *targetOids;
- Oid inputOids[2];
+ HeapTuple tup;
+ CandidateList candidates;
+ int ncandidates;
+ Oid *targetOids;
+ Oid inputOids[2];
/* Unspecified type for one of the arguments? then use the other */
if (arg2 == InvalidOid)
@@ -543,7 +546,7 @@ oper_inexact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWa
Assert(HeapTupleIsValid(tup));
#if PARSEDEBUG
-printf("oper_inexact: found single candidate\n");
+ printf("oper_inexact: found single candidate\n");
#endif
}
@@ -557,7 +560,7 @@ printf("oper_inexact: found single candidate\n");
if (targetOids != NULL)
{
#if PARSEDEBUG
-printf("oper_inexact: found candidate\n");
+ printf("oper_inexact: found candidate\n");
#endif
tup = SearchSysCacheTuple(OPRNAME,
PointerGetDatum(op),
@@ -574,14 +577,14 @@ printf("oper_inexact: found candidate\n");
if (!noWarnings)
{
elog(ERROR, "There is more than one possible operator '%s' for types '%s' and '%s'"
- "\n\tYou will have to retype this query using an explicit cast",
- op, typeTypeName(typeidType(arg1)), typeTypeName(typeidType(arg2)));
+ "\n\tYou will have to retype this query using an explicit cast",
+ op, typeTypeName(typeidType(arg1)), typeTypeName(typeidType(arg2)));
}
return NULL;
}
}
return (Operator) tup;
-} /* oper_inexact() */
+} /* oper_inexact() */
/* oper()
@@ -592,7 +595,7 @@ printf("oper_inexact: found candidate\n");
Operator
oper(char *opname, Oid ltypeId, Oid rtypeId, bool noWarnings)
{
- HeapTuple tup;
+ HeapTuple tup;
/* check for exact match on this operator... */
if (HeapTupleIsValid(tup = oper_exact(opname, ltypeId, rtypeId, NULL, NULL, TRUE)))
@@ -609,7 +612,7 @@ oper(char *opname, Oid ltypeId, Oid rtypeId, bool noWarnings)
}
return (Operator) tup;
-} /* oper() */
+} /* oper() */
/* unary_oper_get_candidates()
@@ -642,12 +645,12 @@ unary_oper_get_candidates(char *op,
opKey[1].sk_argument = CharGetDatum(rightleft);
#ifdef PARSEDEBUG
-printf("unary_oper_get_candidates: start scan for '%s'\n", op);
+ printf("unary_oper_get_candidates: start scan for '%s'\n", op);
#endif
pg_operator_desc = heap_openr(OperatorRelationName);
pg_operator_scan = heap_beginscan(pg_operator_desc,
0,
- SnapshotSelf, /* ??? */
+ SnapshotSelf, /* ??? */
2,
opKey);
@@ -664,8 +667,8 @@ printf("unary_oper_get_candidates: start scan for '%s'\n", op);
current_candidate->next = *candidates;
*candidates = current_candidate;
#ifdef PARSEDEBUG
-printf("unary_oper_get_candidates: found candidate '%s' for type %s\n",
- op, typeidTypeName(current_candidate->args[0]));
+ printf("unary_oper_get_candidates: found candidate '%s' for type %s\n",
+ op, typeidTypeName(current_candidate->args[0]));
#endif
ncandidates++;
}
@@ -674,10 +677,10 @@ printf("unary_oper_get_candidates: found candidate '%s' for type %s\n",
heap_close(pg_operator_desc);
#ifdef PARSEDEBUG
-printf("unary_oper_get_candidates: found %d candidates\n", ncandidates);
+ printf("unary_oper_get_candidates: found %d candidates\n", ncandidates);
#endif
return ncandidates;
-} /* unary_oper_get_candidates() */
+} /* unary_oper_get_candidates() */
/* Given unary right-side operator (operator on right), return oper struct */
@@ -685,10 +688,10 @@ printf("unary_oper_get_candidates: found %d candidates\n", ncandidates);
Operator
right_oper(char *op, Oid arg)
{
- HeapTuple tup;
- CandidateList candidates;
- int ncandidates;
- Oid *targetOid;
+ HeapTuple tup;
+ CandidateList candidates;
+ int ncandidates;
+ Oid *targetOid;
tup = SearchSysCacheTuple(OPRNAME,
PointerGetDatum(op),
@@ -708,7 +711,7 @@ right_oper(char *op, Oid arg)
{
tup = SearchSysCacheTuple(OPRNAME,
PointerGetDatum(op),
- ObjectIdGetDatum(candidates->args[0]),
+ ObjectIdGetDatum(candidates->args[0]),
ObjectIdGetDatum(InvalidOid),
CharGetDatum('r'));
Assert(HeapTupleIsValid(tup));
@@ -737,7 +740,7 @@ right_oper(char *op, Oid arg)
}
}
return (Operator) tup;
-} /* right_oper() */
+} /* right_oper() */
/* Given unary left-side operator (operator on left), return oper struct */
@@ -745,10 +748,10 @@ right_oper(char *op, Oid arg)
Operator
left_oper(char *op, Oid arg)
{
- HeapTuple tup;
- CandidateList candidates;
- int ncandidates;
- Oid *targetOid;
+ HeapTuple tup;
+ CandidateList candidates;
+ int ncandidates;
+ Oid *targetOid;
tup = SearchSysCacheTuple(OPRNAME,
PointerGetDatum(op),
@@ -769,12 +772,12 @@ left_oper(char *op, Oid arg)
tup = SearchSysCacheTuple(OPRNAME,
PointerGetDatum(op),
ObjectIdGetDatum(InvalidOid),
- ObjectIdGetDatum(candidates->args[0]),
+ ObjectIdGetDatum(candidates->args[0]),
CharGetDatum('l'));
Assert(HeapTupleIsValid(tup));
#ifdef PARSEDEBUG
-printf("left_oper: searched cache for single left oper candidate '%s %s'\n",
- op, typeidTypeName((Oid) candidates->args[0]));
+ printf("left_oper: searched cache for single left oper candidate '%s %s'\n",
+ op, typeidTypeName((Oid) candidates->args[0]));
#endif
}
else
@@ -793,13 +796,13 @@ printf("left_oper: searched cache for single left oper candidate '%s %s'\n",
return NULL;
}
#ifdef PARSEDEBUG
-printf("left_oper: searched cache for best left oper candidate '%s %s'\n",
- op, typeidTypeName(*targetOid));
+ printf("left_oper: searched cache for best left oper candidate '%s %s'\n",
+ op, typeidTypeName(*targetOid));
#endif
}
}
return (Operator) tup;
-} /* left_oper() */
+} /* left_oper() */
/* op_error()
@@ -830,6 +833,6 @@ op_error(char *op, Oid arg1, Oid arg2)
elog(ERROR, "There is no operator '%s' for types '%s' and '%s'"
"\n\tYou will either have to retype this query using an explicit cast,"
- "\n\tor you will have to define the operator using CREATE OPERATOR",
+ "\n\tor you will have to define the operator using CREATE OPERATOR",
op, typeTypeName(tp1), typeTypeName(tp2));
}
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c
index 24d5d8733b..445c8bf4c1 100644
--- a/src/backend/parser/parse_relation.c
+++ b/src/backend/parser/parse_relation.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.15 1998/09/01 03:24:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.16 1998/09/01 04:30:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,8 +25,7 @@
#include "utils/builtins.h"
#include "utils/lsyscache.h"
-static void
-checkTargetTypes(ParseState *pstate, char *target_colname,
+static void checkTargetTypes(ParseState *pstate, char *target_colname,
char *refname, char *colname);
struct
@@ -191,10 +190,13 @@ addRangeTableEntry(ParseState *pstate,
if (pstate != NULL)
{
if (refnameRangeTablePosn(pstate, refname, &sublevels_up) != 0 &&
- (!inFromCl || sublevels_up == 0)) {
- if (!strcmp(refname, "*CURRENT*") || !strcmp(refname, "*NEW*")) {
- int rt_index = refnameRangeTablePosn(pstate, refname, &sublevels_up);
- return (RangeTblEntry *)nth(rt_index - 1, pstate->p_rtable);
+ (!inFromCl || sublevels_up == 0))
+ {
+ if (!strcmp(refname, "*CURRENT*") || !strcmp(refname, "*NEW*"))
+ {
+ int rt_index = refnameRangeTablePosn(pstate, refname, &sublevels_up);
+
+ return (RangeTblEntry *) nth(rt_index - 1, pstate->p_rtable);
}
elog(ERROR, "Table name %s specified more than once", refname);
}
@@ -438,12 +440,12 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
#if FALSE
if ((attrtype_id != attrtype_target)
- || (get_atttypmod(rte->relid, resdomno_id) !=
- get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target)))
+ || (get_atttypmod(rte->relid, resdomno_id) !=
+ get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target)))
{
if (can_coerce_type(1, &attrtype_id, &attrtype_target))
{
- Node *expr = coerce_type(pstate, expr, attrtype_id, attrtype_target);
+ Node *expr = coerce_type(pstate, expr, attrtype_id, attrtype_target);
elog(ERROR, "Type %s(%d) can be coerced to match target column %s(%d)",
colname, get_atttypmod(rte->relid, resdomno_id),
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index 407b923d2e..f97776941c 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.26 1998/09/01 03:24:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.27 1998/09/01 04:30:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,9 +32,8 @@
static List *ExpandAllTables(ParseState *pstate);
static char *FigureColname(Node *expr, Node *resval);
-
-Node *
-SizeTargetExpr(ParseState *pstate,
+
+Node *SizeTargetExpr(ParseState *pstate,
Node *expr,
Oid attrtype,
int32 attrtypmod);
@@ -42,11 +41,11 @@ SizeTargetExpr(ParseState *pstate,
/* MakeTargetEntryIdent()
* Transforms an Ident Node to a Target Entry
- * Created this function to allow the ORDER/GROUP BY clause to be able
- * to construct a TargetEntry from an Ident.
+ * Created this function to allow the ORDER/GROUP BY clause to be able
+ * to construct a TargetEntry from an Ident.
*
* resjunk = TRUE will hide the target entry in the final result tuple.
- * [email protected] 5/20/98
+ * [email protected] 5/20/98
*
* Added more conversion logic to match up types from source to target.
* - thomas 1998-06-02
@@ -63,15 +62,15 @@ MakeTargetEntryIdent(ParseState *pstate,
char *colname,
int16 resjunk)
{
- Node *expr = NULL;
- Oid attrtype_target;
+ Node *expr = NULL;
+ Oid attrtype_target;
TargetEntry *tent = makeNode(TargetEntry);
if (pstate->p_is_insert)
{
if (pstate->p_insert_columns != NIL)
{
- Ident *id = lfirst(pstate->p_insert_columns);
+ Ident *id = lfirst(pstate->p_insert_columns);
*resname = id->name;
pstate->p_insert_columns = lnext(pstate->p_insert_columns);
@@ -82,8 +81,8 @@ MakeTargetEntryIdent(ParseState *pstate,
if (pstate->p_is_insert || pstate->p_is_update)
{
- Oid attrtype_id;
- int resdomno_id,
+ Oid attrtype_id;
+ int resdomno_id,
resdomno_target;
RangeTblEntry *rte;
char *target_colname;
@@ -92,7 +91,10 @@ MakeTargetEntryIdent(ParseState *pstate,
target_colname = *resname;
- /* this looks strange to me, returning an empty TargetEntry bjm 1998/08/24 */
+ /*
+ * this looks strange to me, returning an empty TargetEntry bjm
+ * 1998/08/24
+ */
if (target_colname == NULL || colname == NULL)
return tent;
@@ -115,11 +117,11 @@ MakeTargetEntryIdent(ParseState *pstate,
attrtypmod_target = get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target);
#ifdef PARSEDEBUG
-printf("MakeTargetEntryIdent- transform type %d to %d\n",
- attrtype_id, attrtype_target);
+ printf("MakeTargetEntryIdent- transform type %d to %d\n",
+ attrtype_id, attrtype_target);
#endif
if ((attrtype_id != attrtype_target)
- || ((attrtypmod_target >= 0) && (attrtypmod_target != attrtypmod)))
+ || ((attrtypmod_target >= 0) && (attrtypmod_target != attrtypmod)))
{
if (can_coerce_type(1, &attrtype_id, &attrtype_target))
{
@@ -136,26 +138,25 @@ printf("MakeTargetEntryIdent- transform type %d to %d\n",
target_colname);
#else
elog(ERROR, "Type or size of %s(%d) does not match target column %s(%d)",
- colname, attrtypmod, target_colname, attrtypmod_target);
+ colname, attrtypmod, target_colname, attrtypmod_target);
#endif
}
}
}
/*
- * here we want to look for column names only, not
- * relation names (even though they can be stored in
- * Ident nodes, too)
+ * here we want to look for column names only, not relation names
+ * (even though they can be stored in Ident nodes, too)
*/
if (expr == NULL)
{
- char *name;
- int32 type_mod;
+ char *name;
+ int32 type_mod;
- name = ((*resname != NULL)? *resname: colname);
+ name = ((*resname != NULL) ? *resname : colname);
#ifdef PARSEDEBUG
-printf("MakeTargetEntryIdent- call transformIdent()\n");
+ printf("MakeTargetEntryIdent- call transformIdent()\n");
#endif
#if FALSE
expr = transformIdent(pstate, (Node *) ident, EXPR_COLUMN_FIRST);
@@ -170,7 +171,7 @@ printf("MakeTargetEntryIdent- call transformIdent()\n");
type_mod = -1;
#ifdef PARSEDEBUG
-printf("MakeTargetEntryIdent- attrtype_target = %d; type_mod = %d\n", attrtype_target, type_mod);
+ printf("MakeTargetEntryIdent- attrtype_target = %d; type_mod = %d\n", attrtype_target, type_mod);
#endif
tent->resdom = makeResdom((AttrNumber) pstate->p_last_resno++,
@@ -184,7 +185,7 @@ printf("MakeTargetEntryIdent- attrtype_target = %d; type_mod = %d\n", attrtype_t
}
return tent;
-} /* MakeTargetEntryIdent() */
+} /* MakeTargetEntryIdent() */
/* MakeTargetEntryExpr()
@@ -192,19 +193,19 @@ printf("MakeTargetEntryIdent- attrtype_target = %d; type_mod = %d\n", attrtype_t
* arrayRef is a list of transformed A_Indices.
*
* For type mismatches between expressions and targets, use the same
- * techniques as for function and operator type coersion.
+ * techniques as for function and operator type coersion.
* - thomas 1998-05-08
*
* Added resjunk flag and made extern so that it can be use by GROUP/
* ORDER BY a function or expersion not in the target_list
- * - [email protected] 1998-07-31
+ * - [email protected] 1998-07-31
*/
TargetEntry *
MakeTargetEntryExpr(ParseState *pstate,
- char *colname,
- Node *expr,
- List *arrayRef,
- int16 resjunk)
+ char *colname,
+ Node *expr,
+ List *arrayRef,
+ int16 resjunk)
{
Oid type_id,
attrtype;
@@ -227,6 +228,7 @@ MakeTargetEntryExpr(ParseState *pstate,
/* Process target columns that will be receiving results */
if (pstate->p_is_insert || pstate->p_is_update)
{
+
/*
* insert or update query -- insert, update work only on one
* relation, so multiple occurence of same resdomno is bogus
@@ -240,13 +242,16 @@ MakeTargetEntryExpr(ParseState *pstate,
attrtype = GetArrayElementType(attrtype);
attrtypmod = rd->rd_att->attrs[resdomno - 1]->atttypmod;
- /* Check for InvalidOid since that seems to indicate a NULL constant... */
+ /*
+ * Check for InvalidOid since that seems to indicate a NULL
+ * constant...
+ */
if (type_id != InvalidOid)
{
/* Mismatch on types? then try to coerce to target... */
if (attrtype != type_id)
{
- Oid typelem;
+ Oid typelem;
if (arrayRef && !(((A_Indices *) lfirst(arrayRef))->lidx))
typelem = typeidTypElem(attrtype);
@@ -258,18 +263,19 @@ MakeTargetEntryExpr(ParseState *pstate,
if (!HeapTupleIsValid(expr))
elog(ERROR, "parser: attribute '%s' is of type '%s'"
" but expression is of type '%s'"
- "\n\tYou will need to rewrite or cast the expression",
+ "\n\tYou will need to rewrite or cast the expression",
colname,
typeidTypeName(attrtype),
typeidTypeName(type_id));
}
#ifdef PARSEDEBUG
-printf("MakeTargetEntryExpr: attrtypmod is %d\n", (int4) attrtypmod);
+ printf("MakeTargetEntryExpr: attrtypmod is %d\n", (int4) attrtypmod);
#endif
- /* Apparently going to a fixed-length string?
- * Then explicitly size for storage...
+ /*
+ * Apparently going to a fixed-length string? Then explicitly
+ * size for storage...
*/
if (attrtypmod > 0)
expr = SizeTargetExpr(pstate, expr, attrtype, attrtypmod);
@@ -286,8 +292,8 @@ printf("MakeTargetEntryExpr: attrtypmod is %d\n", (int4) attrtypmod);
att->relname = pstrdup(RelationGetRelationName(rd)->data);
att->attrs = lcons(makeString(colname), NIL);
target_expr = (Expr *) ParseNestedFuncOrColumn(pstate, att,
- &pstate->p_last_resno,
- EXPR_COLUMN_FIRST);
+ &pstate->p_last_resno,
+ EXPR_COLUMN_FIRST);
while (ar != NIL)
{
A_Indices *ind = lfirst(ar);
@@ -329,7 +335,7 @@ printf("MakeTargetEntryExpr: attrtypmod is %d\n", (int4) attrtypmod);
resjunk);
return makeTargetEntry(resnode, expr);
-} /* MakeTargetEntryExpr() */
+} /* MakeTargetEntryExpr() */
/*
* MakeTargetlistComplex()
@@ -337,12 +343,12 @@ printf("MakeTargetEntryExpr: attrtypmod is %d\n", (int4) attrtypmod);
*/
static TargetEntry *
MakeTargetEntryComplex(ParseState *pstate,
- ResTarget *res)
+ ResTarget *res)
{
- Node *expr = transformExpr(pstate, (Node *) res->val, EXPR_COLUMN_FIRST);
+ Node *expr = transformExpr(pstate, (Node *) res->val, EXPR_COLUMN_FIRST);
#ifdef PARSEDEBUG
-printf("transformTargetList: decode T_Expr\n");
+ printf("transformTargetList: decode T_Expr\n");
#endif
handleTargetColname(pstate, &res->name, NULL, NULL);
@@ -366,7 +372,7 @@ printf("transformTargetList: decode T_Expr\n");
elog(ERROR, "yyparse: string constant expected");
val = (char *) textout((struct varlena *)
- ((Const *) expr)->constvalue);
+ ((Const *) expr)->constvalue);
str = save_str = (char *) palloc(strlen(val) + MAXDIM * 25 + 2);
foreach(elt, res->indirection)
{
@@ -406,8 +412,8 @@ printf("transformTargetList: decode T_Expr\n");
constval->type = T_String;
constval->val.str = save_str;
return MakeTargetEntryExpr(pstate, res->name,
- (Node *) make_const(constval),
- NULL, FALSE);
+ (Node *) make_const(constval),
+ NULL, FALSE);
pfree(save_str);
}
else
@@ -417,10 +423,10 @@ printf("transformTargetList: decode T_Expr\n");
/* this is not an array assignment */
if (colname == NULL)
{
+
/*
- * if you're wondering why this is here, look
- * at the yacc grammar for why a name can be
- * missing. -ay
+ * if you're wondering why this is here, look at the yacc
+ * grammar for why a name can be missing. -ay
*/
colname = FigureColname(expr, res->val);
}
@@ -439,7 +445,7 @@ printf("transformTargetList: decode T_Expr\n");
}
res->name = colname;
return MakeTargetEntryExpr(pstate, res->name, expr,
- res->indirection, FALSE);
+ res->indirection, FALSE);
}
}
@@ -449,7 +455,7 @@ printf("transformTargetList: decode T_Expr\n");
*/
static TargetEntry *
MakeTargetEntryAttr(ParseState *pstate,
- ResTarget *res)
+ ResTarget *res)
{
Oid type_id;
int32 type_mod;
@@ -460,16 +466,16 @@ MakeTargetEntryAttr(ParseState *pstate,
Resdom *resnode;
int resdomno;
List *attrs = att->attrs;
- TargetEntry *tent;
+ TargetEntry *tent;
Oid relid;
attrname = strVal(lfirst(att->attrs));
+
/*
- * Target item is fully specified: ie.
- * relation.attribute
+ * Target item is fully specified: ie. relation.attribute
*/
#ifdef PARSEDEBUG
-printf("transformTargetList: decode T_Attr\n");
+ printf("transformTargetList: decode T_Attr\n");
#endif
result = ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno, EXPR_COLUMN_FIRST);
handleTargetColname(pstate, &res->name, att->relname, attrname);
@@ -498,7 +504,8 @@ printf("transformTargetList: decode T_Attr\n");
resname = (res->name) ? res->name : strVal(lfirst(attrs));
if (pstate->p_is_insert || pstate->p_is_update)
{
- Relation rd;
+ Relation rd;
+
/*
* insert or update query -- insert, update work only on one
* relation, so multiple occurence of same resdomno is bogus
@@ -508,7 +515,7 @@ printf("transformTargetList: decode T_Attr\n");
resdomno = attnameAttNum(rd, res->name);
}
else
- resdomno = pstate->p_last_resno++;
+ resdomno = pstate->p_last_resno++;
resnode = makeResdom((AttrNumber) resdomno,
(Oid) type_id,
type_mod,
@@ -522,7 +529,7 @@ printf("transformTargetList: decode T_Attr\n");
return tent;
}
-
+
/* transformTargetList()
* Turns a list of ResTarget's into a list of TargetEntry's.
*/
@@ -534,8 +541,8 @@ transformTargetList(ParseState *pstate, List *targetlist)
while (targetlist != NIL)
{
- ResTarget *res = (ResTarget *) lfirst(targetlist);
- TargetEntry *tent = NULL;
+ ResTarget *res = (ResTarget *) lfirst(targetlist);
+ TargetEntry *tent = NULL;
switch (nodeTag(res->val))
{
@@ -544,10 +551,10 @@ transformTargetList(ParseState *pstate, List *targetlist)
char *identname;
#ifdef PARSEDEBUG
-printf("transformTargetList: decode T_Ident\n");
+ printf("transformTargetList: decode T_Ident\n");
#endif
identname = ((Ident *) res->val)->name;
- tent = MakeTargetEntryIdent(pstate, (Node *)res->val, &res->name, NULL, identname, FALSE);
+ tent = MakeTargetEntryIdent(pstate, (Node *) res->val, &res->name, NULL, identname, FALSE);
break;
}
case T_ParamNo:
@@ -560,9 +567,10 @@ printf("transformTargetList: decode T_Ident\n");
}
case T_Attr:
{
- bool expand_star = false;
+ bool expand_star = false;
char *attrname;
Attr *att = (Attr *) res->val;
+
/*
* Target item is a single '*', expand all tables (eg.
* SELECT * FROM emp)
@@ -577,22 +585,23 @@ printf("transformTargetList: decode T_Ident\n");
}
else
{
+
/*
- * Target item is relation.*, expand the table (eg.
- * SELECT emp.*, dname FROM emp, dept)
+ * Target item is relation.*, expand the table
+ * (eg. SELECT emp.*, dname FROM emp, dept)
*/
attrname = strVal(lfirst(att->attrs));
if (att->attrs != NIL && !strcmp(attrname, "*"))
{
-
+
/*
- * tail_p_target is the target list we're building
- * in the while loop. Make sure we fix it after
- * appending more nodes.
+ * tail_p_target is the target list we're
+ * building in the while loop. Make sure we
+ * fix it after appending more nodes.
*/
if (tail_p_target == NIL)
p_target = tail_p_target = expandAll(pstate, att->relname,
- att->relname, &pstate->p_last_resno);
+ att->relname, &pstate->p_last_resno);
else
lnext(tail_p_target) =
expandAll(pstate, att->relname, att->relname,
@@ -605,6 +614,7 @@ printf("transformTargetList: decode T_Ident\n");
while (lnext(tail_p_target) != NIL)
/* make sure we point to the last target entry */
tail_p_target = lnext(tail_p_target);
+
/*
* skip rest of while loop
*/
@@ -634,7 +644,7 @@ printf("transformTargetList: decode T_Ident\n");
}
return p_target;
-} /* transformTargetList() */
+} /* transformTargetList() */
Node *
@@ -646,20 +656,25 @@ CoerceTargetExpr(ParseState *pstate,
if (can_coerce_type(1, &type_id, &attrtype))
{
#ifdef PARSEDEBUG
-printf("CoerceTargetExpr: coerce type from %s to %s\n",
- typeidTypeName(type_id), typeidTypeName(attrtype));
+ printf("CoerceTargetExpr: coerce type from %s to %s\n",
+ typeidTypeName(type_id), typeidTypeName(attrtype));
#endif
expr = coerce_type(pstate, expr, type_id, attrtype);
}
#ifndef DISABLE_STRING_HACKS
- /* string hacks to get transparent conversions w/o explicit conversions */
+
+ /*
+ * string hacks to get transparent conversions w/o explicit
+ * conversions
+ */
else if ((attrtype == BPCHAROID) || (attrtype == VARCHAROID))
{
- Oid text_id = TEXTOID;
+ Oid text_id = TEXTOID;
+
#ifdef PARSEDEBUG
-printf("CoerceTargetExpr: try coercing from %s to %s via text\n",
- typeidTypeName(type_id), typeidTypeName(attrtype));
+ printf("CoerceTargetExpr: try coercing from %s to %s via text\n",
+ typeidTypeName(type_id), typeidTypeName(attrtype));
#endif
if (type_id == TEXTOID)
{
@@ -675,7 +690,7 @@ printf("CoerceTargetExpr: try coercing from %s to %s via text\n",
expr = NULL;
return expr;
-} /* CoerceTargetExpr() */
+} /* CoerceTargetExpr() */
/* SizeTargetExpr()
@@ -694,19 +709,20 @@ SizeTargetExpr(ParseState *pstate,
Oid oid_array[8];
FuncCall *func;
- A_Const *cons;
+ A_Const *cons;
#ifdef PARSEDEBUG
-printf("SizeTargetExpr: ensure target fits storage\n");
+ printf("SizeTargetExpr: ensure target fits storage\n");
#endif
funcname = typeidTypeName(attrtype);
oid_array[0] = attrtype;
oid_array[1] = INT4OID;
- for (i = 2; i < 8; i++) oid_array[i] = InvalidOid;
+ for (i = 2; i < 8; i++)
+ oid_array[i] = InvalidOid;
#ifdef PARSEDEBUG
-printf("SizeTargetExpr: look for conversion function %s(%s,%s)\n",
- funcname, typeidTypeName(attrtype), typeidTypeName(INT4OID));
+ printf("SizeTargetExpr: look for conversion function %s(%s,%s)\n",
+ funcname, typeidTypeName(attrtype), typeidTypeName(INT4OID));
#endif
/* attempt to find with arguments exactly as specified... */
@@ -719,7 +735,7 @@ printf("SizeTargetExpr: look for conversion function %s(%s,%s)\n",
if (HeapTupleIsValid(ftup))
{
#ifdef PARSEDEBUG
-printf("SizeTargetExpr: found conversion function for sizing\n");
+ printf("SizeTargetExpr: found conversion function for sizing\n");
#endif
func = makeNode(FuncCall);
func->funcname = funcname;
@@ -727,19 +743,17 @@ printf("SizeTargetExpr: found conversion function for sizing\n");
cons = makeNode(A_Const);
cons->val.type = T_Integer;
cons->val.val.ival = attrtypmod;
- func->args = lappend( lcons(expr,NIL), cons);
+ func->args = lappend(lcons(expr, NIL), cons);
expr = transformExpr(pstate, (Node *) func, EXPR_COLUMN_FIRST);
}
#ifdef PARSEDEBUG
else
- {
-printf("SizeTargetExpr: no conversion function for sizing\n");
- }
+ printf("SizeTargetExpr: no conversion function for sizing\n");
#endif
return expr;
-} /* SizeTargetExpr() */
+} /* SizeTargetExpr() */
/*
@@ -790,7 +804,7 @@ makeTargetNames(ParseState *pstate, List *cols)
attnameAttNum(pstate->p_target_relation, name);
foreach(nxt, lnext(tl))
if (!strcmp(name, ((Ident *) lfirst(nxt))->name))
- elog(ERROR, "Attribute '%s' should be specified only once", name);
+ elog(ERROR, "Attribute '%s' should be specified only once", name);
}
}
diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c
index 3a5de42dab..3b3d0c37d9 100644
--- a/src/backend/parser/parse_type.c
+++ b/src/backend/parser/parse_type.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.15 1998/09/01 03:24:20 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.16 1998/09/01 04:30:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -148,7 +148,7 @@ stringTypeString(Type tp, char *string, int32 atttypmod)
Oid typelem;
op = ((Form_pg_type) GETSTRUCT(tp))->typinput;
- typelem = ((Form_pg_type) GETSTRUCT(tp))->typelem; /* XXX - used for
+ typelem = ((Form_pg_type) GETSTRUCT(tp))->typelem; /* XXX - used for
* array_in */
return (char *) fmgr(op, string, typelem, atttypmod);
}
diff --git a/src/backend/parser/parser.c b/src/backend/parser/parser.c
index db1c747f68..ebdb0c2e6b 100644
--- a/src/backend/parser/parser.c
+++ b/src/backend/parser/parser.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.35 1998/09/01 03:24:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.36 1998/09/01 04:30:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,7 +43,7 @@ parser(char *str, Oid *typev, int nargs)
#if defined(FLEX_SCANNER)
extern void DeleteBuffer(void);
-#endif /* FLEX_SCANNER */
+#endif /* FLEX_SCANNER */
init_io();
@@ -54,7 +54,7 @@ parser(char *str, Oid *typev, int nargs)
#if defined(FLEX_SCANNER)
DeleteBuffer();
-#endif /* FLEX_SCANNER */
+#endif /* FLEX_SCANNER */
clearerr(stdin);
diff --git a/src/backend/parser/scan.c b/src/backend/parser/scan.c
index 8724dfe3ed..92837a0c8e 100644
--- a/src/backend/parser/scan.c
+++ b/src/backend/parser/scan.c
@@ -1,7 +1,7 @@
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.26 1998/09/01 03:24:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.27 1998/09/01 04:30:41 momjian Exp $
*/
#define FLEX_SCANNER
@@ -30,19 +30,19 @@
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
-#else /* ! __cplusplus */
+#else /* ! __cplusplus */
#if __STDC__
#define YY_USE_PROTOS
#define YY_USE_CONST
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
+#pragma warn -rch
+#pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
@@ -98,18 +98,19 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
-extern int yyleng;
-extern FILE *yyin, *yyout;
+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
/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
+ * int a single C statement (which needs a semi-colon terminator). This
* avoids problems with code like:
*
- * if ( condition_holds )
+ * if ( condition_holds )
* yyless( 5 );
* else
* do_something_else();
@@ -142,61 +143,65 @@ typedef unsigned int yy_size_t;
struct yy_buffer_state
- {
- FILE *yy_input_file;
+{
+ FILE *yy_input_file;
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
+ 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
+ /*
+ * Size of input buffer in bytes, not including room for EOB
* characters.
*/
- yy_size_t yy_buf_size;
+ yy_size_t yy_buf_size;
- /* Number of characters read into yy_ch_buf, not including EOB
+ /*
+ * Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- int yy_n_chars;
+ 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.
+ /*
+ * 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;
+ 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.
+ /*
+ * 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;
+ 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.
+ /*
+ * 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_at_bol;
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
+ /*
+ * Whether to try to fill the input buffer when we reach the end of
+ * it.
*/
- int yy_fill_buffer;
+ int yy_fill_buffer;
- int yy_buffer_status;
+ 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 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.
+ * 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
- };
+};
static YY_BUFFER_STATE yy_current_buffer = 0;
@@ -210,38 +215,40 @@ static YY_BUFFER_STATE yy_current_buffer = 0;
/* 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 */
+static int yy_n_chars; /* number of characters read into
+ * yy_ch_buf */
-int yyleng;
+int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
+static int yy_init = 1; /* 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 ...
+ * instead of setting up a fresh yyin. A bit of a hack ...
*/
-static int yy_did_buffer_switch_on_eof;
+static int yy_did_buffer_switch_on_eof;
-void yyrestart YY_PROTO(( FILE *input_file ));
+void yyrestart YY_PROTO((FILE *input_file));
+
+void yy_switch_to_buffer YY_PROTO((YY_BUFFER_STATE new_buffer));
+void yy_load_buffer_state YY_PROTO((void));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO((FILE *file, int size));
+void yy_delete_buffer YY_PROTO((YY_BUFFER_STATE b));
+void yy_init_buffer YY_PROTO((YY_BUFFER_STATE b, FILE *file));
+void yy_flush_buffer YY_PROTO((YY_BUFFER_STATE b));
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO((char *base, yy_size_t size));
+YY_BUFFER_STATE yy_scan_string YY_PROTO((yyconst char *yy_str));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO((yyconst char *bytes, int len));
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
+static void *yy_flex_alloc YY_PROTO((yy_size_t));
+static void *yy_flex_realloc YY_PROTO((void *, yy_size_t));
+static void yy_flex_free YY_PROTO((void *));
#define yy_new_buffer yy_create_buffer
@@ -264,15 +271,16 @@ static void yy_flex_free YY_PROTO(( void * ));
#define YY_USES_REJECT
typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
typedef int yy_state_type;
extern char *yytext;
+
#define yytext_ptr yytext
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+static yy_state_type yy_get_previous_state YY_PROTO((void));
+static yy_state_type yy_try_NUL_trans YY_PROTO((yy_state_type current_state));
+static int yy_get_next_buffer YY_PROTO((void));
+static void yy_fatal_error YY_PROTO((yyconst char msg[]));
/* Done after the current pattern has been matched and before the
* corresponding action - sets up yytext.
@@ -287,246 +295,248 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
#define YY_NUM_RULES 41
#define YY_END_OF_BUFFER 42
static yyconst short int yy_acclist[177] =
- { 0,
- 10, 10, 6, 6, 24, 24, 9, 9, 25, 25,
- 18, 18, 42, 40, 41, 39, 40, 41, 39, 41,
- 31, 40, 41, 22, 40, 41, 29, 31, 40, 41,
- 15, 40, 41, 29, 40, 41, 29, 31, 40, 41,
- 29, 31, 40, 41, 29, 40, 41, 29, 31, 40,
- 41, 36, 40, 41,16418, 29, 31, 40, 41, 38,
- 40, 41,16417, 38, 40, 41,16417, 38, 40, 41,
- 16417, 10, 41, 8, 41, 3, 6, 41, 3, 6,
- 41, 3, 41, 6, 41, 24, 41, 23, 41, 9,
- 41, 14, 41, 41, 25, 41, 26, 41, 18, 41,
-
- 16, 41, 41, 31, 31, 31, 32, 31, 31, 36,
- 16418, 37,16419, 4, 31, 31, 37,16419, 27, 31,
- 38,16417, 7, 13, 10, 6, 6, 5, 24, 9,
- 25, 18, 17, 20, 19, 20, 30, 28, 30, 28,
- 30, 32, 28, 1, 31, 31, 28, 30, 4, 31,
- 4, 31, 4, 31, 8226, 37,16419, 37,16419, 8225,
- 12, 5, 11, 21, 30, 8227, 37,16419, 2, 4,
- 31, 30, 2, 2, 2, 2
- } ;
+{0,
+ 10, 10, 6, 6, 24, 24, 9, 9, 25, 25,
+ 18, 18, 42, 40, 41, 39, 40, 41, 39, 41,
+ 31, 40, 41, 22, 40, 41, 29, 31, 40, 41,
+ 15, 40, 41, 29, 40, 41, 29, 31, 40, 41,
+ 29, 31, 40, 41, 29, 40, 41, 29, 31, 40,
+ 41, 36, 40, 41, 16418, 29, 31, 40, 41, 38,
+ 40, 41, 16417, 38, 40, 41, 16417, 38, 40, 41,
+ 16417, 10, 41, 8, 41, 3, 6, 41, 3, 6,
+ 41, 3, 41, 6, 41, 24, 41, 23, 41, 9,
+ 41, 14, 41, 41, 25, 41, 26, 41, 18, 41,
+
+ 16, 41, 41, 31, 31, 31, 32, 31, 31, 36,
+ 16418, 37, 16419, 4, 31, 31, 37, 16419, 27, 31,
+ 38, 16417, 7, 13, 10, 6, 6, 5, 24, 9,
+ 25, 18, 17, 20, 19, 20, 30, 28, 30, 28,
+ 30, 32, 28, 1, 31, 31, 28, 30, 4, 31,
+ 4, 31, 4, 31, 8226, 37, 16419, 37, 16419, 8225,
+ 12, 5, 11, 21, 30, 8227, 37, 16419, 2, 4,
+ 31, 30, 2, 2, 2, 2
+};
static yyconst short int yy_accept[135] =
- { 0,
- 1, 1, 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 16, 19, 21, 24,
- 27, 31, 34, 37, 41, 45, 48, 52, 56, 60,
- 64, 68, 72, 74, 76, 79, 82, 84, 86, 88,
- 90, 92, 94, 95, 97, 99, 101, 103, 104, 105,
- 106, 106, 107, 108, 108, 109, 110, 110, 112, 114,
- 116, 117, 117, 117, 119, 119, 121, 121, 121, 123,
- 124, 125, 126, 126, 126, 127, 128, 128, 128, 129,
- 130, 131, 131, 131, 132, 133, 133, 133, 134, 135,
- 137, 138, 140, 143, 144, 144, 145, 146, 147, 149,
-
- 149, 149, 149, 149, 151, 153, 155, 156, 158, 158,
- 160, 161, 161, 161, 162, 163, 163, 163, 164, 164,
- 164, 165, 166, 167, 167, 169, 169, 172, 173, 174,
- 175, 176, 177, 177
- } ;
+{0,
+ 1, 1, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 16, 19, 21, 24,
+ 27, 31, 34, 37, 41, 45, 48, 52, 56, 60,
+ 64, 68, 72, 74, 76, 79, 82, 84, 86, 88,
+ 90, 92, 94, 95, 97, 99, 101, 103, 104, 105,
+ 106, 106, 107, 108, 108, 109, 110, 110, 112, 114,
+ 116, 117, 117, 117, 119, 119, 121, 121, 121, 123,
+ 124, 125, 126, 126, 126, 127, 128, 128, 128, 129,
+ 130, 131, 131, 131, 132, 133, 133, 133, 134, 135,
+ 137, 138, 140, 143, 144, 144, 145, 146, 147, 149,
+
+ 149, 149, 149, 149, 151, 153, 155, 156, 158, 158,
+ 160, 161, 161, 161, 162, 163, 163, 163, 164, 164,
+ 164, 165, 166, 167, 167, 169, 169, 172, 173, 174,
+ 175, 176, 177, 177
+};
static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 4, 5, 4, 6, 4, 4, 7, 8,
- 8, 9, 10, 8, 11, 12, 13, 14, 14, 14,
- 14, 14, 14, 14, 14, 14, 14, 15, 8, 16,
- 16, 16, 4, 4, 17, 18, 17, 17, 19, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 20, 17, 17,
- 8, 21, 8, 4, 17, 4, 17, 18, 17, 17,
-
- 19, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 20,
- 17, 17, 1, 16, 1, 4, 1, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
-
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17
- } ;
+{0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 4, 6, 4, 4, 7, 8,
+ 8, 9, 10, 8, 11, 12, 13, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14, 15, 8, 16,
+ 16, 16, 4, 4, 17, 18, 17, 17, 19, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 20, 17, 17,
+ 8, 21, 8, 4, 17, 4, 17, 18, 17, 17,
+
+ 19, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 20,
+ 17, 17, 1, 16, 1, 4, 1, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
+ 17, 17, 17, 17, 17
+};
static yyconst int yy_meta[22] =
- { 0,
- 1, 2, 3, 4, 5, 4, 6, 1, 7, 8,
- 9, 10, 4, 11, 4, 4, 2, 2, 11, 2,
- 12
- } ;
+{0,
+ 1, 2, 3, 4, 5, 4, 6, 1, 7, 8,
+ 9, 10, 4, 11, 4, 4, 2, 2, 11, 2,
+ 12
+};
static yyconst short int yy_base[153] =
- { 0,
- 0, 0, 368, 361, 18, 31, 350, 343, 339, 338,
- 46, 48, 18, 31, 344, 451, 451, 451, 332, 451,
- 58, 451, 51, 12, 44, 71, 23, 84, 327, 64,
- 102, 329, 0, 61, 0, 110, 67, 0, 0, 451,
- 0, 68, 451, 75, 451, 0, 81, 328, 247, 78,
- 91, 31, 242, 67, 234, 126, 228, 0, 146, 162,
- 85, 104, 0, 226, 140, 222, 150, 0, 211, 451,
- 451, 0, 98, 115, 0, 0, 99, 174, 153, 0,
- 0, 108, 156, 167, 0, 177, 179, 451, 451, 451,
- 451, 451, 153, 451, 183, 451, 196, 162, 0, 211,
-
- 0, 174, 155, 219, 111, 189, 451, 0, 77, 196,
- 451, 214, 217, 451, 188, 224, 234, 451, 236, 242,
- 451, 0, 451, 54, 51, 195, 244, 21, 248, 250,
- 252, 258, 451, 261, 273, 285, 297, 309, 321, 330,
- 338, 349, 361, 370, 379, 391, 403, 414, 426, 431,
- 435, 439
- } ;
+{0,
+ 0, 0, 368, 361, 18, 31, 350, 343, 339, 338,
+ 46, 48, 18, 31, 344, 451, 451, 451, 332, 451,
+ 58, 451, 51, 12, 44, 71, 23, 84, 327, 64,
+ 102, 329, 0, 61, 0, 110, 67, 0, 0, 451,
+ 0, 68, 451, 75, 451, 0, 81, 328, 247, 78,
+ 91, 31, 242, 67, 234, 126, 228, 0, 146, 162,
+ 85, 104, 0, 226, 140, 222, 150, 0, 211, 451,
+ 451, 0, 98, 115, 0, 0, 99, 174, 153, 0,
+ 0, 108, 156, 167, 0, 177, 179, 451, 451, 451,
+ 451, 451, 153, 451, 183, 451, 196, 162, 0, 211,
+
+ 0, 174, 155, 219, 111, 189, 451, 0, 77, 196,
+ 451, 214, 217, 451, 188, 224, 234, 451, 236, 242,
+ 451, 0, 451, 54, 51, 195, 244, 21, 248, 250,
+ 252, 258, 451, 261, 273, 285, 297, 309, 321, 330,
+ 338, 349, 361, 370, 379, 391, 403, 414, 426, 431,
+ 435, 439
+};
static yyconst short int yy_def[153] =
- { 0,
- 133, 1, 134, 134, 135, 135, 136, 136, 137, 137,
- 138, 138, 139, 139, 133, 133, 133, 133, 140, 133,
- 140, 133, 133, 21, 21, 133, 24, 133, 24, 141,
- 141, 31, 142, 133, 143, 143, 144, 36, 145, 133,
- 146, 133, 133, 133, 133, 147, 133, 148, 140, 140,
- 133, 50, 133, 133, 52, 133, 133, 28, 133, 149,
- 56, 133, 150, 59, 133, 140, 133, 151, 31, 133,
- 133, 142, 133, 133, 143, 36, 144, 144, 144, 145,
- 146, 133, 133, 133, 147, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 56, 133, 95, 97, 95, 133,
-
- 152, 133, 149, 149, 104, 104, 133, 64, 133, 64,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 95, 133, 133, 110, 149, 104, 149, 149, 149,
- 133, 133, 0, 133, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133
- } ;
+{0,
+ 133, 1, 134, 134, 135, 135, 136, 136, 137, 137,
+ 138, 138, 139, 139, 133, 133, 133, 133, 140, 133,
+ 140, 133, 133, 21, 21, 133, 24, 133, 24, 141,
+ 141, 31, 142, 133, 143, 143, 144, 36, 145, 133,
+ 146, 133, 133, 133, 133, 147, 133, 148, 140, 140,
+ 133, 50, 133, 133, 52, 133, 133, 28, 133, 149,
+ 56, 133, 150, 59, 133, 140, 133, 151, 31, 133,
+ 133, 142, 133, 133, 143, 36, 144, 144, 144, 145,
+ 146, 133, 133, 133, 147, 133, 133, 133, 133, 133,
+ 133, 133, 133, 133, 56, 133, 95, 97, 95, 133,
+
+ 152, 133, 149, 149, 104, 104, 133, 64, 133, 64,
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
+ 133, 95, 133, 133, 110, 149, 104, 149, 149, 149,
+ 133, 133, 0, 133, 133, 133, 133, 133, 133, 133,
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
+ 133, 133
+};
static yyconst short int yy_nxt[473] =
- { 0,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
- 25, 26, 27, 28, 29, 24, 30, 31, 30, 32,
- 16, 36, 55, 36, 47, 133, 37, 36, 36, 126,
- 38, 60, 36, 36, 36, 61, 36, 47, 48, 37,
- 36, 36, 92, 38, 93, 36, 36, 44, 44, 44,
- 44, 48, 51, 51, 56, 57, 45, 58, 45, 51,
- 51, 54, 73, 74, 125, 67, 67, 125, 52, 82,
- 83, 53, 51, 51, 68, 77, 84, 84, 94, 79,
- 94, 54, 86, 87, 59, 62, 62, 88, 50, 91,
- 110, 91, 51, 51, 63, 64, 95, 58, 95, 73,
-
- 74, 54, 65, 67, 67, 62, 62, 77, 70, 82,
- 83, 79, 68, 76, 63, 76, 112, 113, 77, 76,
- 76, 114, 76, 127, 76, 76, 95, 95, 96, 97,
- 95, 97, 95, 95, 97, 97, 98, 99, 97, 99,
- 97, 97, 95, 95, 95, 95, 95, 100, 100, 109,
- 109, 67, 67, 110, 115, 115, 101, 116, 117, 59,
- 68, 77, 118, 126, 102, 104, 53, 104, 84, 84,
- 105, 104, 106, 122, 104, 122, 104, 104, 86, 87,
- 119, 120, 77, 124, 124, 121, 95, 125, 95, 115,
- 115, 95, 95, 95, 95, 95, 95, 95, 95, 97,
-
- 128, 97, 128, 126, 97, 97, 98, 129, 97, 110,
- 97, 97, 100, 100, 133, 112, 113, 133, 112, 113,
- 114, 101, 104, 114, 104, 116, 117, 105, 104, 106,
- 118, 104, 50, 104, 104, 116, 117, 119, 120, 108,
- 118, 59, 121, 119, 120, 130, 131, 92, 121, 130,
- 131, 130, 131, 132, 131, 53, 126, 50, 126, 132,
- 131, 33, 33, 33, 33, 33, 33, 33, 33, 33,
- 33, 33, 33, 35, 35, 35, 35, 35, 35, 35,
- 35, 35, 35, 35, 35, 39, 39, 39, 39, 39,
- 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
-
- 41, 41, 41, 41, 41, 41, 41, 41, 41, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 43, 46, 46, 46, 46, 46, 46, 46, 46, 46,
- 46, 46, 46, 49, 90, 71, 49, 49, 49, 69,
- 69, 66, 50, 133, 42, 42, 69, 40, 69, 72,
- 72, 72, 72, 72, 40, 72, 72, 72, 72, 72,
- 72, 75, 75, 75, 75, 75, 75, 34, 75, 75,
- 75, 75, 75, 78, 34, 133, 78, 78, 78, 80,
- 80, 80, 80, 133, 80, 80, 80, 80, 80, 80,
- 80, 81, 81, 81, 81, 81, 133, 81, 81, 81,
-
- 81, 81, 81, 85, 85, 85, 85, 85, 133, 85,
- 85, 85, 85, 85, 89, 89, 89, 89, 89, 89,
- 89, 89, 89, 89, 89, 89, 103, 103, 133, 103,
- 103, 103, 103, 103, 103, 103, 103, 103, 107, 107,
- 107, 107, 111, 111, 111, 111, 123, 123, 123, 123,
- 15, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133
- } ;
+{0,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 24,
+ 25, 26, 27, 28, 29, 24, 30, 31, 30, 32,
+ 16, 36, 55, 36, 47, 133, 37, 36, 36, 126,
+ 38, 60, 36, 36, 36, 61, 36, 47, 48, 37,
+ 36, 36, 92, 38, 93, 36, 36, 44, 44, 44,
+ 44, 48, 51, 51, 56, 57, 45, 58, 45, 51,
+ 51, 54, 73, 74, 125, 67, 67, 125, 52, 82,
+ 83, 53, 51, 51, 68, 77, 84, 84, 94, 79,
+ 94, 54, 86, 87, 59, 62, 62, 88, 50, 91,
+ 110, 91, 51, 51, 63, 64, 95, 58, 95, 73,
+
+ 74, 54, 65, 67, 67, 62, 62, 77, 70, 82,
+ 83, 79, 68, 76, 63, 76, 112, 113, 77, 76,
+ 76, 114, 76, 127, 76, 76, 95, 95, 96, 97,
+ 95, 97, 95, 95, 97, 97, 98, 99, 97, 99,
+ 97, 97, 95, 95, 95, 95, 95, 100, 100, 109,
+ 109, 67, 67, 110, 115, 115, 101, 116, 117, 59,
+ 68, 77, 118, 126, 102, 104, 53, 104, 84, 84,
+ 105, 104, 106, 122, 104, 122, 104, 104, 86, 87,
+ 119, 120, 77, 124, 124, 121, 95, 125, 95, 115,
+ 115, 95, 95, 95, 95, 95, 95, 95, 95, 97,
+
+ 128, 97, 128, 126, 97, 97, 98, 129, 97, 110,
+ 97, 97, 100, 100, 133, 112, 113, 133, 112, 113,
+ 114, 101, 104, 114, 104, 116, 117, 105, 104, 106,
+ 118, 104, 50, 104, 104, 116, 117, 119, 120, 108,
+ 118, 59, 121, 119, 120, 130, 131, 92, 121, 130,
+ 131, 130, 131, 132, 131, 53, 126, 50, 126, 132,
+ 131, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 41, 41, 41,
+
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 43, 46, 46, 46, 46, 46, 46, 46, 46, 46,
+ 46, 46, 46, 49, 90, 71, 49, 49, 49, 69,
+ 69, 66, 50, 133, 42, 42, 69, 40, 69, 72,
+ 72, 72, 72, 72, 40, 72, 72, 72, 72, 72,
+ 72, 75, 75, 75, 75, 75, 75, 34, 75, 75,
+ 75, 75, 75, 78, 34, 133, 78, 78, 78, 80,
+ 80, 80, 80, 133, 80, 80, 80, 80, 80, 80,
+ 80, 81, 81, 81, 81, 81, 133, 81, 81, 81,
+
+ 81, 81, 81, 85, 85, 85, 85, 85, 133, 85,
+ 85, 85, 85, 85, 89, 89, 89, 89, 89, 89,
+ 89, 89, 89, 89, 89, 89, 103, 103, 133, 103,
+ 103, 103, 103, 103, 103, 103, 103, 103, 107, 107,
+ 107, 107, 111, 111, 111, 111, 123, 123, 123, 123,
+ 15, 133, 133, 133, 133, 133, 133, 133, 133, 133,
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
+ 133, 133
+};
static yyconst short int yy_chk[473] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 5, 24, 5, 13, 24, 5, 5, 5, 128,
- 5, 27, 5, 5, 6, 27, 6, 14, 13, 6,
- 6, 6, 52, 6, 52, 6, 6, 11, 11, 12,
- 12, 14, 23, 23, 25, 25, 11, 25, 12, 21,
- 21, 23, 34, 34, 125, 30, 30, 124, 21, 42,
- 42, 21, 26, 26, 30, 37, 44, 44, 54, 37,
- 54, 26, 47, 47, 26, 28, 28, 47, 50, 50,
- 109, 50, 51, 51, 28, 28, 61, 28, 61, 73,
-
- 73, 51, 28, 31, 31, 62, 62, 77, 31, 82,
- 82, 77, 31, 36, 62, 36, 74, 74, 36, 36,
- 36, 74, 36, 105, 36, 36, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
- 56, 56, 56, 56, 56, 56, 56, 59, 59, 65,
- 65, 67, 67, 65, 79, 79, 59, 83, 83, 59,
- 67, 79, 83, 103, 59, 60, 93, 60, 84, 84,
- 60, 60, 60, 98, 60, 98, 60, 60, 86, 86,
- 87, 87, 78, 102, 102, 87, 95, 102, 95, 115,
- 115, 95, 95, 95, 95, 95, 95, 95, 95, 97,
-
- 106, 97, 106, 126, 97, 97, 97, 126, 97, 110,
- 97, 97, 100, 100, 110, 112, 112, 69, 113, 113,
- 112, 100, 104, 113, 104, 116, 116, 104, 104, 104,
- 116, 104, 66, 104, 104, 117, 117, 119, 119, 64,
- 117, 57, 119, 120, 120, 127, 127, 55, 120, 129,
- 129, 130, 130, 131, 131, 53, 129, 49, 130, 132,
- 132, 134, 134, 134, 134, 134, 134, 134, 134, 134,
- 134, 134, 134, 135, 135, 135, 135, 135, 135, 135,
- 135, 135, 135, 135, 135, 136, 136, 136, 136, 136,
- 136, 136, 136, 136, 136, 136, 136, 137, 137, 137,
-
- 137, 137, 137, 137, 137, 137, 137, 137, 137, 138,
- 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
- 138, 139, 139, 139, 139, 139, 139, 139, 139, 139,
- 139, 139, 139, 140, 48, 32, 140, 140, 140, 141,
- 141, 29, 19, 15, 10, 9, 141, 8, 141, 142,
- 142, 142, 142, 142, 7, 142, 142, 142, 142, 142,
- 142, 143, 143, 143, 143, 143, 143, 4, 143, 143,
- 143, 143, 143, 144, 3, 0, 144, 144, 144, 145,
- 145, 145, 145, 0, 145, 145, 145, 145, 145, 145,
- 145, 146, 146, 146, 146, 146, 0, 146, 146, 146,
-
- 146, 146, 146, 147, 147, 147, 147, 147, 0, 147,
- 147, 147, 147, 147, 148, 148, 148, 148, 148, 148,
- 148, 148, 148, 148, 148, 148, 149, 149, 0, 149,
- 149, 149, 149, 149, 149, 149, 149, 149, 150, 150,
- 150, 150, 151, 151, 151, 151, 152, 152, 152, 152,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
- 133, 133
- } ;
-
-static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+{0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 24, 5, 13, 24, 5, 5, 5, 128,
+ 5, 27, 5, 5, 6, 27, 6, 14, 13, 6,
+ 6, 6, 52, 6, 52, 6, 6, 11, 11, 12,
+ 12, 14, 23, 23, 25, 25, 11, 25, 12, 21,
+ 21, 23, 34, 34, 125, 30, 30, 124, 21, 42,
+ 42, 21, 26, 26, 30, 37, 44, 44, 54, 37,
+ 54, 26, 47, 47, 26, 28, 28, 47, 50, 50,
+ 109, 50, 51, 51, 28, 28, 61, 28, 61, 73,
+
+ 73, 51, 28, 31, 31, 62, 62, 77, 31, 82,
+ 82, 77, 31, 36, 62, 36, 74, 74, 36, 36,
+ 36, 74, 36, 105, 36, 36, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
+ 56, 56, 56, 56, 56, 56, 56, 59, 59, 65,
+ 65, 67, 67, 65, 79, 79, 59, 83, 83, 59,
+ 67, 79, 83, 103, 59, 60, 93, 60, 84, 84,
+ 60, 60, 60, 98, 60, 98, 60, 60, 86, 86,
+ 87, 87, 78, 102, 102, 87, 95, 102, 95, 115,
+ 115, 95, 95, 95, 95, 95, 95, 95, 95, 97,
+
+ 106, 97, 106, 126, 97, 97, 97, 126, 97, 110,
+ 97, 97, 100, 100, 110, 112, 112, 69, 113, 113,
+ 112, 100, 104, 113, 104, 116, 116, 104, 104, 104,
+ 116, 104, 66, 104, 104, 117, 117, 119, 119, 64,
+ 117, 57, 119, 120, 120, 127, 127, 55, 120, 129,
+ 129, 130, 130, 131, 131, 53, 129, 49, 130, 132,
+ 132, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 135, 135, 135, 135, 135, 135, 135,
+ 135, 135, 135, 135, 135, 136, 136, 136, 136, 136,
+ 136, 136, 136, 136, 136, 136, 136, 137, 137, 137,
+
+ 137, 137, 137, 137, 137, 137, 137, 137, 137, 138,
+ 138, 138, 138, 138, 138, 138, 138, 138, 138, 138,
+ 138, 139, 139, 139, 139, 139, 139, 139, 139, 139,
+ 139, 139, 139, 140, 48, 32, 140, 140, 140, 141,
+ 141, 29, 19, 15, 10, 9, 141, 8, 141, 142,
+ 142, 142, 142, 142, 7, 142, 142, 142, 142, 142,
+ 142, 143, 143, 143, 143, 143, 143, 4, 143, 143,
+ 143, 143, 143, 144, 3, 0, 144, 144, 144, 145,
+ 145, 145, 145, 0, 145, 145, 145, 145, 145, 145,
+ 145, 146, 146, 146, 146, 146, 0, 146, 146, 146,
+
+ 146, 146, 146, 147, 147, 147, 147, 147, 0, 147,
+ 147, 147, 147, 147, 148, 148, 148, 148, 148, 148,
+ 148, 148, 148, 148, 148, 148, 149, 149, 0, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 150, 150,
+ 150, 150, 151, 151, 151, 151, 152, 152, 152, 152,
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
+ 133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
+ 133, 133
+};
+
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2],
+ *yy_state_ptr;
static char *yy_full_match;
-static int yy_lp;
-static int yy_looking_for_trail_begin = 0;
-static int yy_full_lp;
+static int yy_lp;
+static int yy_looking_for_trail_begin = 0;
+static int yy_full_lp;
static int *yy_full_state;
+
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
@@ -542,7 +552,8 @@ goto find_rule; \
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
+char *yytext;
+
#line 1 "scan.l"
#define INITIAL 0
#line 2 "scan.l"
@@ -555,7 +566,7 @@ char *yytext;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.26 1998/09/01 03:24:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.27 1998/09/01 04:30:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -565,7 +576,7 @@ char *yytext;
#include <math.h>
#else
#include <stdlib.h>
-#endif /* __linux__ */
+#endif /* __linux__ */
#include <string.h>
#include <errno.h>
@@ -585,26 +596,29 @@ static char *parseCh;
/* some versions of lex define this as a macro */
#if defined(yywrap)
#undef yywrap
-#endif /* yywrap */
+#endif /* yywrap */
#if defined(FLEX_SCANNER)
/* MAX_PARSE_BUFFER is defined in miscadmin.h */
#define YYLMAX MAX_PARSE_BUFFER
#define YY_NO_UNPUT
-extern int myinput(char* buf, int max);
+extern int myinput(char *buf, int max);
+
#undef YY_INPUT
#define YY_INPUT(buf,result,max) {result = myinput(buf,max);}
#else
#undef input
-int input();
+int input();
+
#undef unput
-void unput(char);
-#endif /* FLEX_SCANNER */
+void unput(char);
+
+#endif /* FLEX_SCANNER */
extern YYSTYPE yylval;
-int llen;
-char literal[MAX_PARSE_BUFFER];
+int llen;
+char literal[MAX_PARSE_BUFFER];
/* OK, here is a short description of lex/flex rules behavior.
* The longest pattern which matches an input string is always chosen.
@@ -614,18 +628,18 @@ char literal[MAX_PARSE_BUFFER];
*
* Exclusive states change parsing rules while the state is active.
* There are exclusive states for quoted strings, extended comments,
- * and to eliminate parsing troubles for numeric strings.
+ * and to eliminate parsing troubles for numeric strings.
* Exclusive states:
- * <xb> binary numeric string - thomas 1997-11-16
- * <xc> extended C-style comments - tgl 1997-07-12
- * <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
- * <xh> hexadecimal numeric string - thomas 1997-11-16
- * <xm> numeric strings with embedded minus sign - tgl 1997-09-05
- * <xq> quoted strings - tgl 1997-07-30
+ * <xb> binary numeric string - thomas 1997-11-16
+ * <xc> extended C-style comments - tgl 1997-07-12
+ * <xd> delimited identifiers (double-quoted identifiers) - tgl 1997-10-27
+ * <xh> hexadecimal numeric string - thomas 1997-11-16
+ * <xm> numeric strings with embedded minus sign - tgl 1997-09-05
+ * <xq> quoted strings - tgl 1997-07-30
*
* The "extended comment" syntax closely resembles allowable operator syntax.
* So, when in condition <xc>, only strings which would terminate the
- * "extended comment" trigger any action other than "ignore".
+ * "extended comment" trigger any action other than "ignore".
* Be sure to match _any_ candidate comment, including those with appended
* operator-like symbols. - thomas 1997-07-14
*/
@@ -663,12 +677,12 @@ real [\-]?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
* So, put comments here. tgl - 1997-09-08
*
* Quoted strings must allow some special characters such as single-quote
- * and newline.
+ * and newline.
* Embedded single-quotes are implemented both in the SQL/92-standard
- * style of two adjacent single quotes "''" and in the Postgres/Java style
- * of escaped-quote "\'".
+ * 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. - thomas 1997-09-24
+ * backslash is dropped from the string. - thomas 1997-09-24
*/
#line 674 "lex.yy.c"
@@ -678,44 +692,55 @@ real [\-]?{digit}+\.{digit}+([Ee][-+]?{digit}+)?
#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
+extern "C" int yywrap YY_PROTO((void));
+
#else
-extern int yywrap YY_PROTO(( void ));
+extern int yywrap YY_PROTO((void));
+
#endif
#endif
#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+static void yyunput YY_PROTO((int c, char *buf_ptr));
+
#endif
#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+static void yy_flex_strncpy YY_PROTO((char *, yyconst char *, int));
+
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+static int yy_flex_strlen YY_PROTO((yyconst char *));
+
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
+static int yyinput YY_PROTO((void));
+
#else
-static int input YY_PROTO(( void ));
+static int input YY_PROTO((void));
+
#endif
#endif
#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
+
#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
+static void yy_push_state YY_PROTO((int new_state));
+
#endif
#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
+static void yy_pop_state YY_PROTO((void));
+
#endif
#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
+static int yy_top_state YY_PROTO((void));
+
#endif
#else
@@ -762,7 +787,7 @@ YY_MALLOC_DECL
{ \
int c = '*', n; \
for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
if ( c == '\n' ) \
buf[n++] = (char) c; \
@@ -816,48 +841,50 @@ YY_MALLOC_DECL
YY_USER_ACTION
YY_DECL
- {
+{
register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
+ register char *yy_cp,
+ *yy_bp;
register int yy_act;
#line 179 "scan.l"
#line 827 "lex.yy.c"
- if ( yy_init )
- {
+ if (yy_init)
+ {
yy_init = 0;
#ifdef YY_USER_INIT
YY_USER_INIT;
#endif
- if ( ! yy_start )
- yy_start = 1; /* first start state */
+ if (!yy_start)
+ yy_start = 1; /* first start state */
- if ( ! yyin )
+ if (!yyin)
yyin = stdin;
- if ( ! yyout )
+ if (!yyout)
yyout = stdout;
- if ( ! yy_current_buffer )
+ if (!yy_current_buffer)
yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
+ yy_create_buffer(yyin, YY_BUF_SIZE);
yy_load_buffer_state();
- }
+ }
- while ( 1 ) /* loops until end-of-file is reached */
- {
+ while (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 points to the position in yy_ch_buf of the start of the
+ * current run.
*/
yy_bp = yy_cp;
@@ -866,448 +893,455 @@ YY_DECL
*yy_state_ptr++ = yy_current_state;
yy_match:
do
- {
+ {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+
+ 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 >= 134 )
+ if (yy_current_state >= 134)
yy_c = yy_meta[(unsigned int) yy_c];
- }
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
++yy_cp;
- }
- while ( yy_base[yy_current_state] != 451 );
+ }
+ while (yy_base[yy_current_state] != 451);
yy_find_action:
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
-find_rule: /* we branch to this label when backing up */
- for ( ; ; ) /* until we find what rule we matched */
+find_rule: /* we branch to this label when backing up */
+ for (;;) /* until we find what rule we matched */
+ {
+ if (yy_lp && yy_lp < yy_accept[yy_current_state + 1])
{
- if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
- {
yy_act = yy_acclist[yy_lp];
- if ( yy_act & YY_TRAILING_HEAD_MASK ||
- yy_looking_for_trail_begin )
+ if (yy_act & YY_TRAILING_HEAD_MASK ||
+ yy_looking_for_trail_begin)
+ {
+ if (yy_act == yy_looking_for_trail_begin)
{
- if ( yy_act == yy_looking_for_trail_begin )
- {
yy_looking_for_trail_begin = 0;
yy_act &= ~YY_TRAILING_HEAD_MASK;
break;
- }
}
- else if ( yy_act & YY_TRAILING_MASK )
- {
+ }
+ else if (yy_act & YY_TRAILING_MASK)
+ {
yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
- }
+ }
else
- {
+ {
yy_full_match = yy_cp;
yy_full_state = yy_state_ptr;
yy_full_lp = yy_lp;
break;
- }
+ }
++yy_lp;
goto find_rule;
- }
+ }
--yy_cp;
yy_current_state = *--yy_state_ptr;
yy_lp = yy_accept[yy_current_state];
- }
+ }
YY_DO_BEFORE_ACTION;
-do_action: /* This label is used only to access EOF actions. */
+do_action: /* This label is used only to access EOF
+ * actions. */
- switch ( yy_act )
- { /* beginning of action switch */
-case 1:
-YY_RULE_SETUP
+ switch (yy_act)
+ { /* beginning of action switch */
+ case 1:
+ YY_RULE_SETUP
#line 180 "scan.l"
-{ /* ignore */ }
- YY_BREAK
-case 2:
-YY_RULE_SETUP
+ { /* ignore */
+ }
+ YY_BREAK
+ case 2:
+ YY_RULE_SETUP
#line 182 "scan.l"
-{ /* ignore */ }
- YY_BREAK
-case 3:
+ { /* ignore */
+ }
+ YY_BREAK
+ case 3:
#line 185 "scan.l"
-case 4:
-YY_RULE_SETUP
+ case 4:
+ YY_RULE_SETUP
#line 185 "scan.l"
-{ BEGIN(xc); }
- YY_BREAK
-case 5:
-YY_RULE_SETUP
+ BEGIN(xc);
+ YY_BREAK
+ case 5:
+ YY_RULE_SETUP
#line 187 "scan.l"
-{ BEGIN(INITIAL); }
- YY_BREAK
-case 6:
-YY_RULE_SETUP
+ BEGIN(INITIAL);
+ YY_BREAK
+ case 6:
+ YY_RULE_SETUP
#line 189 "scan.l"
-{ /* ignore */ }
- YY_BREAK
-case 7:
-YY_RULE_SETUP
+ { /* ignore */
+ }
+ YY_BREAK
+ case 7:
+ YY_RULE_SETUP
#line 191 "scan.l"
-{
+ {
BEGIN(xb);
llen = 0;
*literal = '\0';
}
- YY_BREAK
-case 8:
-YY_RULE_SETUP
+ YY_BREAK
+ case 8:
+ YY_RULE_SETUP
#line 196 "scan.l"
-{
- char* endptr;
+ {
+ char *endptr;
BEGIN(INITIAL);
errno = 0;
- yylval.ival = strtol((char *)literal,&endptr,2);
+ yylval.ival = strtol((char *) literal, &endptr, 2);
if (*endptr != '\0' || errno == ERANGE)
- elog(ERROR,"Bad binary integer input '%s'",literal);
+ elog(ERROR, "Bad binary integer input '%s'", literal);
return ICONST;
}
- YY_BREAK
-case 9:
+ YY_BREAK
+ case 9:
#line 207 "scan.l"
-case 10:
-YY_RULE_SETUP
+ case 10:
+ YY_RULE_SETUP
#line 207 "scan.l"
-{
- if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
- elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
- memcpy(literal+llen, yytext, yyleng+1);
+ {
+ if ((llen + yyleng) > (MAX_PARSE_BUFFER - 1))
+ elog(ERROR, "quoted string parse buffer of %d chars exceeded", MAX_PARSE_BUFFER);
+ memcpy(literal + llen, yytext, yyleng + 1);
llen += yyleng;
}
- YY_BREAK
-case 11:
+ YY_BREAK
+ case 11:
#line 214 "scan.l"
-case 12:
-YY_RULE_SETUP
+ case 12:
+ YY_RULE_SETUP
#line 214 "scan.l"
-{
+ {
}
- YY_BREAK
-case 13:
-YY_RULE_SETUP
+ YY_BREAK
+ case 13:
+ YY_RULE_SETUP
#line 217 "scan.l"
-{
+ {
BEGIN(xh);
llen = 0;
*literal = '\0';
}
- YY_BREAK
-case 14:
-YY_RULE_SETUP
+ YY_BREAK
+ case 14:
+ YY_RULE_SETUP
#line 222 "scan.l"
-{
- char* endptr;
+ {
+ char *endptr;
BEGIN(INITIAL);
errno = 0;
- yylval.ival = strtol((char *)literal,&endptr,16);
+ yylval.ival = strtol((char *) literal, &endptr, 16);
if (*endptr != '\0' || errno == ERANGE)
- elog(ERROR,"Bad hexadecimal integer input '%s'",literal);
+ elog(ERROR, "Bad hexadecimal integer input '%s'", literal);
return ICONST;
}
- YY_BREAK
-case 15:
-YY_RULE_SETUP
+ YY_BREAK
+ case 15:
+ YY_RULE_SETUP
#line 233 "scan.l"
-{
+ {
BEGIN(xq);
llen = 0;
*literal = '\0';
}
- YY_BREAK
-case 16:
-YY_RULE_SETUP
+ YY_BREAK
+ case 16:
+ YY_RULE_SETUP
#line 238 "scan.l"
-{
+ {
BEGIN(INITIAL);
yylval.str = pstrdup(scanstr(literal));
return SCONST;
}
- YY_BREAK
-case 17:
+ YY_BREAK
+ case 17:
#line 244 "scan.l"
-case 18:
-YY_RULE_SETUP
+ case 18:
+ YY_RULE_SETUP
#line 244 "scan.l"
-{
- if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
- elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
- memcpy(literal+llen, yytext, yyleng+1);
+ {
+ if ((llen + yyleng) > (MAX_PARSE_BUFFER - 1))
+ elog(ERROR, "quoted string parse buffer of %d chars exceeded", MAX_PARSE_BUFFER);
+ memcpy(literal + llen, yytext, yyleng + 1);
llen += yyleng;
}
- YY_BREAK
-case 19:
-YY_RULE_SETUP
+ YY_BREAK
+ case 19:
+ YY_RULE_SETUP
#line 250 "scan.l"
-{
- if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
- elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
- memcpy(literal+llen, yytext, yyleng+1);
- *(literal+llen) = '\'';
+ {
+ if ((llen + yyleng - 1) > (MAX_PARSE_BUFFER - 1))
+ elog(ERROR, "quoted string parse buffer of %d chars exceeded", MAX_PARSE_BUFFER);
+ memcpy(literal + llen, yytext, yyleng + 1);
+ *(literal + llen) = '\'';
llen += yyleng;
}
- YY_BREAK
-case 20:
-YY_RULE_SETUP
+ YY_BREAK
+ case 20:
+ YY_RULE_SETUP
#line 258 "scan.l"
-{
- if ((llen+yyleng-1) > (MAX_PARSE_BUFFER - 1))
- elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
- memcpy(literal+llen, yytext, yyleng+1);
+ {
+ if ((llen + yyleng - 1) > (MAX_PARSE_BUFFER - 1))
+ elog(ERROR, "quoted string parse buffer of %d chars exceeded", MAX_PARSE_BUFFER);
+ memcpy(literal + llen, yytext, yyleng + 1);
llen += yyleng;
}
- YY_BREAK
-case 21:
-YY_RULE_SETUP
+ YY_BREAK
+ case 21:
+ YY_RULE_SETUP
#line 264 "scan.l"
-{
+ {
}
- YY_BREAK
-case 22:
-YY_RULE_SETUP
+ YY_BREAK
+ case 22:
+ YY_RULE_SETUP
#line 268 "scan.l"
-{
+ {
BEGIN(xd);
llen = 0;
*literal = '\0';
}
- YY_BREAK
-case 23:
-YY_RULE_SETUP
+ YY_BREAK
+ case 23:
+ YY_RULE_SETUP
#line 273 "scan.l"
-{
+ {
BEGIN(INITIAL);
yylval.str = pstrdup(literal);
return IDENT;
}
- YY_BREAK
-case 24:
-YY_RULE_SETUP
+ YY_BREAK
+ case 24:
+ YY_RULE_SETUP
#line 278 "scan.l"
-{
- if ((llen+yyleng) > (MAX_PARSE_BUFFER - 1))
- elog(ERROR,"quoted string parse buffer of %d chars exceeded",MAX_PARSE_BUFFER);
- memcpy(literal+llen, yytext, yyleng+1);
+ {
+ if ((llen + yyleng) > (MAX_PARSE_BUFFER - 1))
+ elog(ERROR, "quoted string parse buffer of %d chars exceeded", MAX_PARSE_BUFFER);
+ memcpy(literal + llen, yytext, yyleng + 1);
llen += yyleng;
}
- YY_BREAK
-case 25:
-YY_RULE_SETUP
+ YY_BREAK
+ case 25:
+ YY_RULE_SETUP
#line 286 "scan.l"
-{ /* ignore */ }
- YY_BREAK
-case 26:
-YY_RULE_SETUP
+ { /* ignore */
+ }
+ YY_BREAK
+ case 26:
+ YY_RULE_SETUP
#line 287 "scan.l"
-{
+ {
BEGIN(INITIAL);
return yytext[0];
}
- YY_BREAK
-case 27:
-YY_RULE_SETUP
+ YY_BREAK
+ case 27:
+ YY_RULE_SETUP
#line 293 "scan.l"
-{ return TYPECAST; }
- YY_BREAK
-case 28:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp = yy_bp + 1;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
+ return TYPECAST;
+ YY_BREAK
+ case 28:
+ *yy_cp = yy_hold_char; /* undo effects of setting up
+ * yytext */
+ yy_c_buf_p = yy_cp = yy_bp + 1;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
#line 295 "scan.l"
-{
+ {
BEGIN(xm);
return yytext[0];
}
- YY_BREAK
-case 29:
-YY_RULE_SETUP
+ YY_BREAK
+ case 29:
+ YY_RULE_SETUP
#line 299 "scan.l"
-{ return yytext[0]; }
-{ return yytext[0]; }
- YY_BREAK
-case 30:
-*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
-yy_c_buf_p = yy_cp -= 2;
-YY_DO_BEFORE_ACTION; /* set up yytext again */
-YY_RULE_SETUP
+ return yytext[0];
+ return yytext[0];
+ YY_BREAK
+ case 30:
+ *yy_cp = yy_hold_char; /* undo effects of setting up
+ * yytext */
+ yy_c_buf_p = yy_cp -= 2;
+ YY_DO_BEFORE_ACTION; /* set up yytext again */
+ YY_RULE_SETUP
#line 300 "scan.l"
-{
- yylval.str = pstrdup((char*)yytext);
+ {
+ yylval.str = pstrdup((char *) yytext);
return Op;
}
- YY_BREAK
-case 31:
-YY_RULE_SETUP
+ YY_BREAK
+ case 31:
+ YY_RULE_SETUP
#line 304 "scan.l"
-{
- if (strcmp((char*)yytext,"!=") == 0)
- yylval.str = pstrdup("<>"); /* compatability */
+ {
+ if (strcmp((char *) yytext, "!=") == 0)
+ yylval.str = pstrdup("<>"); /* compatability */
else
- yylval.str = pstrdup((char*)yytext);
+ yylval.str = pstrdup((char *) yytext);
return Op;
}
- YY_BREAK
-case 32:
-YY_RULE_SETUP
+ YY_BREAK
+ case 32:
+ YY_RULE_SETUP
#line 311 "scan.l"
-{
- yylval.ival = atoi((char*)&yytext[1]);
+ {
+ yylval.ival = atoi((char *) &yytext[1]);
return PARAM;
}
- YY_BREAK
-case 33:
-YY_RULE_SETUP
+ YY_BREAK
+ case 33:
+ YY_RULE_SETUP
#line 317 "scan.l"
-{
- int i;
- ScanKeyword *keyword;
+ {
+ int i;
+ ScanKeyword *keyword;
BEGIN(xm);
- for(i = 0; yytext[i]; i++)
- if (isascii((unsigned char)yytext[i]) &&
+ for (i = 0; yytext[i]; i++)
+ if (isascii((unsigned char) yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
if (i >= NAMEDATALEN)
- yytext[NAMEDATALEN-1] = '\0';
+ yytext[NAMEDATALEN - 1] = '\0';
- keyword = ScanKeywordLookup((char*)yytext);
- if (keyword != NULL) {
+ keyword = ScanKeywordLookup((char *) yytext);
+ if (keyword != NULL)
return keyword->value;
- }
else
{
- yylval.str = pstrdup((char*)yytext);
+ yylval.str = pstrdup((char *) yytext);
return IDENT;
}
}
- YY_BREAK
-case 34:
-YY_RULE_SETUP
+ YY_BREAK
+ case 34:
+ YY_RULE_SETUP
#line 339 "scan.l"
-{
- char* endptr;
+ {
+ char *endptr;
BEGIN(xm);
errno = 0;
- yylval.ival = strtol((char *)yytext,&endptr,10);
+ yylval.ival = strtol((char *) yytext, &endptr, 10);
if (*endptr != '\0' || errno == ERANGE)
{
errno = 0;
- yylval.dval = strtod(((char *)yytext),&endptr);
+ yylval.dval = strtod(((char *) yytext), &endptr);
if (*endptr != '\0' || errno == ERANGE)
- elog(ERROR,"Bad integer input '%s'",yytext);
+ elog(ERROR, "Bad integer input '%s'", yytext);
CheckFloat8Val(yylval.dval);
- elog(NOTICE,"Integer input '%s' is out of range; promoted to float", yytext);
+ elog(NOTICE, "Integer input '%s' is out of range; promoted to float", yytext);
return FCONST;
}
return ICONST;
}
- YY_BREAK
-case 35:
-YY_RULE_SETUP
+ YY_BREAK
+ case 35:
+ YY_RULE_SETUP
#line 357 "scan.l"
-{
- char* endptr;
+ {
+ char *endptr;
BEGIN(xm);
errno = 0;
- yylval.dval = strtod(((char *)yytext),&endptr);
+ yylval.dval = strtod(((char *) yytext), &endptr);
if (*endptr != '\0' || errno == ERANGE)
- elog(ERROR,"Bad float8 input '%s'",yytext);
+ elog(ERROR, "Bad float8 input '%s'", yytext);
CheckFloat8Val(yylval.dval);
return FCONST;
}
- YY_BREAK
-case 36:
-YY_RULE_SETUP
+ YY_BREAK
+ case 36:
+ YY_RULE_SETUP
#line 368 "scan.l"
-{
- char* endptr;
+ {
+ char *endptr;
errno = 0;
- yylval.ival = strtol((char *)yytext,&endptr,10);
+ yylval.ival = strtol((char *) yytext, &endptr, 10);
if (*endptr != '\0' || errno == ERANGE)
{
errno = 0;
- yylval.dval = strtod(((char *)yytext),&endptr);
+ yylval.dval = strtod(((char *) yytext), &endptr);
if (*endptr != '\0' || errno == ERANGE)
- elog(ERROR,"Bad integer input '%s'",yytext);
+ elog(ERROR, "Bad integer input '%s'", yytext);
CheckFloat8Val(yylval.dval);
- elog(NOTICE,"Integer input '%s' is out of range; promoted to float", yytext);
+ elog(NOTICE, "Integer input '%s' is out of range; promoted to float", yytext);
return FCONST;
}
return ICONST;
}
- YY_BREAK
-case 37:
-YY_RULE_SETUP
+ YY_BREAK
+ case 37:
+ YY_RULE_SETUP
#line 385 "scan.l"
-{
- char* endptr;
+ {
+ char *endptr;
errno = 0;
- yylval.dval = strtod((char *)yytext,&endptr);
+ yylval.dval = strtod((char *) yytext, &endptr);
if (*endptr != '\0' || errno == ERANGE)
- elog(ERROR,"Bad float input '%s'",yytext);
+ elog(ERROR, "Bad float input '%s'", yytext);
CheckFloat8Val(yylval.dval);
return FCONST;
}
- YY_BREAK
-case 38:
-YY_RULE_SETUP
+ YY_BREAK
+ case 38:
+ YY_RULE_SETUP
#line 397 "scan.l"
-{
- int i;
- ScanKeyword *keyword;
+ {
+ int i;
+ ScanKeyword *keyword;
- for(i = 0; yytext[i]; i++)
- if (isascii((unsigned char)yytext[i]) &&
+ for (i = 0; yytext[i]; i++)
+ if (isascii((unsigned char) yytext[i]) &&
isupper(yytext[i]))
yytext[i] = tolower(yytext[i]);
if (i >= NAMEDATALEN)
- yytext[NAMEDATALEN-1] = '\0';
+ yytext[NAMEDATALEN - 1] = '\0';
- keyword = ScanKeywordLookup((char*)yytext);
- if (keyword != NULL) {
+ keyword = ScanKeywordLookup((char *) yytext);
+ if (keyword != NULL)
return keyword->value;
- }
else
{
- yylval.str = pstrdup((char*)yytext);
+ yylval.str = pstrdup((char *) yytext);
return IDENT;
}
}
- YY_BREAK
-case 39:
-YY_RULE_SETUP
+ YY_BREAK
+ case 39:
+ YY_RULE_SETUP
#line 418 "scan.l"
-{ /* ignore */ }
- YY_BREAK
-case 40:
-YY_RULE_SETUP
+ { /* ignore */
+ }
+ YY_BREAK
+ case 40:
+ YY_RULE_SETUP
#line 420 "scan.l"
-{ return (yytext[0]); }
- YY_BREAK
-case 41:
-YY_RULE_SETUP
+ return (yytext[0]);
+ YY_BREAK
+ case 41:
+ YY_RULE_SETUP
#line 422 "scan.l"
-ECHO;
- YY_BREAK
+ ECHO;
+ YY_BREAK
#line 1311 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(xb):
@@ -1318,134 +1352,143 @@ ECHO;
case YY_STATE_EOF(xq):
yyterminate();
- 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;
+ 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
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
- if ( yy_current_buffer->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->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
+ if (yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW)
+ {
- /* 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->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
+ /*
+ * 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->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+ /*
+ * 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->yy_ch_buf[yy_n_chars])
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
- yy_current_state = yy_get_previous_state();
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
- /* 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_current_state = yy_get_previous_state();
- yy_next_state = yy_try_NUL_trans( yy_current_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_bp = yytext_ptr + YY_MORE_ADJ;
+ yy_next_state = yy_try_NUL_trans(yy_current_state);
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
- else
- {
- yy_cp = yy_c_buf_p;
- 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;
+ if (yy_next_state)
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
}
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
+ 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->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;
}
- 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->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 yylex */
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found");
+ } /* end of action switch */
+ } /* end of scanning one token */
+} /* end of yylex */
/* yy_get_next_buffer - try to read in a new buffer
@@ -1456,122 +1499,131 @@ ECHO;
* EOB_ACT_END_OF_FILE - end of file
*/
-static int yy_get_next_buffer()
- {
+static int
+yy_get_next_buffer()
+{
register char *dest = yy_current_buffer->yy_ch_buf;
register char *source = yytext_ptr;
- register int number_to_move, i;
- int ret_val;
+ register int number_to_move,
+ i;
+ int ret_val;
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ if (yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1])
YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
+ "fatal flex scanner internal error--end of buffer missed");
- if ( yy_current_buffer->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.
+ if (yy_current_buffer->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.
+ {
+
+ /*
+ * 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 )
+ for (i = 0; i < number_to_move; ++i)
*(dest++) = *(source++);
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
+ if (yy_current_buffer->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->yy_n_chars = yy_n_chars = 0;
else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
+ while (num_to_read <= 0)
+ { /* Not enough room in the buffer - grow
+ * it. */
#ifdef YY_USES_REJECT
YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+ "input buffer overflow, can't enlarge buffer because scanner uses REJECT");
#else
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = yy_current_buffer;
- int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
+ 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 (b->yy_is_our_buffer)
+ {
+ int new_size = b->yy_buf_size * 2;
- if ( new_size <= 0 )
+ 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. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
- }
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc((void *) b->yy_ch_buf,
+ b->yy_buf_size + 2);
+ }
else
/* Can't grow it, we don't own it. */
b->yy_ch_buf = 0;
- if ( ! b->yy_ch_buf )
+ if (!b->yy_ch_buf)
YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
+ "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->yy_buf_size -
- number_to_move - 1;
+ number_to_move - 1;
#endif
- }
+ }
- if ( num_to_read > YY_READ_BUF_SIZE )
+ if (num_to_read > YY_READ_BUF_SIZE)
num_to_read = YY_READ_BUF_SIZE;
/* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
+ YY_INPUT((&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read);
yy_current_buffer->yy_n_chars = yy_n_chars;
- }
+ }
- if ( yy_n_chars == 0 )
+ if (yy_n_chars == 0)
+ {
+ if (number_to_move == YY_MORE_ADJ)
{
- if ( number_to_move == YY_MORE_ADJ )
- {
ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
+ yyrestart(yyin);
+ }
else
- {
+ {
ret_val = EOB_ACT_LAST_MATCH;
yy_current_buffer->yy_buffer_status =
YY_BUFFER_EOF_PENDING;
- }
}
+ }
else
ret_val = EOB_ACT_CONTINUE_SCAN;
@@ -1583,13 +1635,14 @@ static int yy_get_next_buffer()
yytext_ptr = &yy_current_buffer->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()
- {
+static yy_state_type
+yy_get_previous_state()
+{
register yy_state_type yy_current_state;
register char *yy_cp;
@@ -1597,21 +1650,22 @@ static yy_state_type yy_get_previous_state()
yy_state_ptr = yy_state_buf;
*yy_state_ptr++ = yy_current_state;
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
+ for (yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp)
+ {
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+
+ 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 >= 134 )
+ if (yy_current_state >= 134)
yy_c = yy_meta[(unsigned int) yy_c];
- }
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
*yy_state_ptr++ = yy_current_state;
- }
+ }
return yy_current_state;
- }
+}
/* yy_try_NUL_trans - try to make a transition on the NUL character
@@ -1621,54 +1675,61 @@ static yy_state_type yy_get_previous_state()
*/
#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+static yy_state_type
+yy_try_NUL_trans(yy_state_type yy_current_state)
#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
+static yy_state_type
+yy_try_NUL_trans(yy_current_state)
yy_state_type yy_current_state;
+
#endif
- {
+{
register int yy_is_jam;
register YY_CHAR yy_c = 1;
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
+
+ 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 >= 134 )
+ if (yy_current_state >= 134)
yy_c = yy_meta[(unsigned int) yy_c];
- }
+ }
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 133);
- if ( ! yy_is_jam )
+ if (!yy_is_jam)
*yy_state_ptr++ = yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
- }
+}
#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
+static void
+yyunput(int c, register char *yy_bp)
#else
-static void yyunput( c, yy_bp )
-int c;
+static void
+yyunput(c, yy_bp)
+int c;
register char *yy_bp;
+
#endif
- {
+{
register char *yy_cp = yy_c_buf_p;
/* undo effects of setting up yytext */
*yy_cp = yy_hold_char;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
+ if (yy_cp < yy_current_buffer->yy_ch_buf + 2)
+ { /* need to shift things up to make room */
/* +2 for EOB chars. */
register int number_to_move = yy_n_chars + 2;
register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
+ yy_current_buffer->yy_buf_size + 2];
register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
+ &yy_current_buffer->yy_ch_buf[number_to_move];
- while ( source > yy_current_buffer->yy_ch_buf )
+ while (source > yy_current_buffer->yy_ch_buf)
*--dest = *--source;
yy_cp += (int) (dest - source);
@@ -1676,9 +1737,9 @@ register char *yy_bp;
yy_current_buffer->yy_n_chars =
yy_n_chars = yy_current_buffer->yy_buf_size;
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
+ if (yy_cp < yy_current_buffer->yy_ch_buf + 2)
+ YY_FATAL_ERROR("flex scanner push-back overflow");
+ }
*--yy_cp = (char) c;
@@ -1686,209 +1747,235 @@ register char *yy_bp;
yytext_ptr = yy_bp;
yy_hold_char = *yy_cp;
yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
+}
+
+#endif /* ifndef YY_NO_UNPUT */
#ifdef __cplusplus
-static int yyinput()
+static int
+yyinput()
#else
-static int input()
+static int
+input()
#endif
- {
- int c;
+{
+ 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_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->yy_ch_buf[yy_n_chars] )
+ if (yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars])
/* This was really a NUL. */
*yy_c_buf_p = '\0';
else
- { /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+
++yy_c_buf_p;
- switch ( yy_get_next_buffer() )
- {
+ 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.
+
+ /*
+ * 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 );
+ yyrestart(yyin);
/* fall through */
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap() )
- return EOF;
+ if (yywrap())
+ return EOF;
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
+ if (!yy_did_buffer_switch_on_eof)
+ YY_NEW_FILE;
#ifdef __cplusplus
- return yyinput();
+ return yyinput();
#else
- return input();
+ 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_c_buf_p = '\0'; /* preserve yytext */
yy_hold_char = *++yy_c_buf_p;
return c;
- }
+}
#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
+void
+yyrestart(FILE *input_file)
#else
-void yyrestart( input_file )
-FILE *input_file;
+void
+yyrestart(input_file)
+FILE *input_file;
+
#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+{
+ if (!yy_current_buffer)
+ yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE);
- yy_init_buffer( yy_current_buffer, input_file );
+ yy_init_buffer(yy_current_buffer, input_file);
yy_load_buffer_state();
- }
+}
#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+void
+yy_switch_to_buffer(YY_BUFFER_STATE new_buffer)
#else
-void yy_switch_to_buffer( new_buffer )
+void
+yy_switch_to_buffer(new_buffer)
YY_BUFFER_STATE new_buffer;
+
#endif
- {
- if ( yy_current_buffer == new_buffer )
+{
+ if (yy_current_buffer == new_buffer)
return;
- if ( yy_current_buffer )
- {
+ if (yy_current_buffer)
+ {
/* Flush out information for old buffer. */
*yy_c_buf_p = yy_hold_char;
yy_current_buffer->yy_buf_pos = yy_c_buf_p;
yy_current_buffer->yy_n_chars = yy_n_chars;
- }
+ }
yy_current_buffer = 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.
+ /*
+ * 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;
- }
+}
#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
+void
+yy_load_buffer_state(void)
#else
-void yy_load_buffer_state()
+void
+yy_load_buffer_state()
#endif
- {
+{
yy_n_chars = yy_current_buffer->yy_n_chars;
yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
yyin = yy_current_buffer->yy_input_file;
yy_hold_char = *yy_c_buf_p;
- }
+}
#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+YY_BUFFER_STATE
+yy_create_buffer(FILE *file, int size)
#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
+YY_BUFFER_STATE
+yy_create_buffer(file, size)
+FILE *file;
+int size;
+
#endif
- {
+{
YY_BUFFER_STATE b;
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ b = (YY_BUFFER_STATE) yy_flex_alloc(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
+ /*
+ * 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 *) yy_flex_alloc( b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+ b->yy_ch_buf = (char *) yy_flex_alloc(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 );
+ yy_init_buffer(b, file);
return b;
- }
+}
#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
+void
+yy_delete_buffer(YY_BUFFER_STATE b)
#else
-void yy_delete_buffer( b )
+void
+yy_delete_buffer(b)
YY_BUFFER_STATE b;
+
#endif
- {
- if ( ! b )
+{
+ if (!b)
return;
- if ( b == yy_current_buffer )
+ if (b == yy_current_buffer)
yy_current_buffer = (YY_BUFFER_STATE) 0;
- if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
+ if (b->yy_is_our_buffer)
+ yy_flex_free((void *) b->yy_ch_buf);
- yy_flex_free( (void *) b );
- }
+ yy_flex_free((void *) b);
+}
#ifndef YY_ALWAYS_INTERACTIVE
#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
+extern int isatty YY_PROTO((int));
+
#endif
#endif
#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+void
+yy_init_buffer(YY_BUFFER_STATE b, FILE *file)
#else
-void yy_init_buffer( b, file )
+void
+yy_init_buffer(b, file)
YY_BUFFER_STATE b;
-FILE *file;
+FILE *file;
+
#endif
- {
- yy_flush_buffer( b );
+{
+ yy_flush_buffer(b);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
@@ -1899,28 +1986,32 @@ FILE *file;
#if YY_NEVER_INTERACTIVE
b->yy_is_interactive = 0;
#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+ b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0;
#endif
#endif
- }
+}
#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
+void
+yy_flush_buffer(YY_BUFFER_STATE b)
#else
-void yy_flush_buffer( b )
+void
+yy_flush_buffer(b)
YY_BUFFER_STATE b;
+
#endif
- {
- if ( ! 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.
+ /*
+ * 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;
@@ -1930,31 +2021,34 @@ YY_BUFFER_STATE b;
b->yy_at_bol = 1;
b->yy_buffer_status = YY_BUFFER_NEW;
- if ( b == yy_current_buffer )
+ if (b == yy_current_buffer)
yy_load_buffer_state();
- }
+}
#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+YY_BUFFER_STATE
+yy_scan_buffer(char *base, yy_size_t size)
#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
+YY_BUFFER_STATE
+yy_scan_buffer(base, size)
+char *base;
+yy_size_t size;
+
#endif
- {
+{
YY_BUFFER_STATE b;
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
+ 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 0;
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+ b = (YY_BUFFER_STATE) yy_flex_alloc(sizeof(struct yy_buffer_state));
+ if (!b)
+ YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()");
b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
b->yy_buf_pos = b->yy_ch_buf = base;
@@ -1966,119 +2060,138 @@ yy_size_t size;
b->yy_fill_buffer = 0;
b->yy_buffer_status = YY_BUFFER_NEW;
- yy_switch_to_buffer( b );
+ yy_switch_to_buffer(b);
return b;
- }
+}
+
#endif
#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+YY_BUFFER_STATE
+yy_scan_string(yyconst char *yy_str)
#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
+YY_BUFFER_STATE
+yy_scan_string(yy_str)
yyconst char *yy_str;
+
#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
+{
+ int len;
+
+ for (len = 0; yy_str[len]; ++len)
;
- return yy_scan_bytes( yy_str, len );
- }
+ return yy_scan_bytes(yy_str, len);
+}
+
#endif
#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+YY_BUFFER_STATE
+yy_scan_bytes(yyconst char *bytes, int len)
#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+YY_BUFFER_STATE
+yy_scan_bytes(bytes, len)
yyconst char *bytes;
-int len;
+int len;
+
#endif
- {
+{
YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
+ char *buf;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = len + 2;
- buf = (char *) yy_flex_alloc( n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+ buf = (char *) yy_flex_alloc(n);
+ if (!buf)
+ YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()");
- for ( i = 0; i < len; ++i )
+ for (i = 0; i < len; ++i)
buf[i] = bytes[i];
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+ buf[len] = buf[len + 1] = YY_END_OF_BUFFER_CHAR;
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+ 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.
+ /*
+ * 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;
- }
+}
+
#endif
#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
+static void
+yy_push_state(int new_state)
#else
-static void yy_push_state( new_state )
-int new_state;
+static void
+yy_push_state(new_state)
+int new_state;
+
#endif
+{
+ if (yy_start_stack_ptr >= yy_start_stack_depth)
{
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
+ yy_size_t new_size;
yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
+ new_size = yy_start_stack_depth * sizeof(int);
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
+ if (!yy_start_stack)
+ yy_start_stack = (int *) yy_flex_alloc(new_size);
else
yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
+ (void *) yy_start_stack, new_size);
- if ( ! yy_start_stack )
+ if (!yy_start_stack)
YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
+ "out of memory expanding start-condition stack");
+ }
yy_start_stack[yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
- }
+}
+
#endif
#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
+static void
+yy_pop_state()
+{
+ if (--yy_start_stack_ptr < 0)
+ YY_FATAL_ERROR("start-condition stack underflow");
BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
+}
+
#endif
#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
+static int
+yy_top_state()
+{
return yy_start_stack[yy_start_stack_ptr - 1];
- }
+}
+
#endif
#ifndef YY_EXIT_FAILURE
@@ -2086,15 +2199,18 @@ static int yy_top_state()
#endif
#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
+static void
+yy_fatal_error(yyconst char msg[])
#else
-static void yy_fatal_error( msg )
-char msg[];
+static void
+yy_fatal_error(msg)
+char msg[];
+
#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
+{
+ (void) fprintf(stderr, "%s\n", msg);
+ exit(YY_EXIT_FAILURE);
+}
@@ -2118,93 +2234,117 @@ char msg[];
#ifndef yytext_ptr
#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+static void
+yy_flex_strncpy(char *s1, yyconst char *s2, int n)
#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
+static void
+yy_flex_strncpy(s1, s2, n)
+char *s1;
yyconst char *s2;
-int n;
+int n;
+
#endif
- {
+{
register int i;
- for ( i = 0; i < n; ++i )
+
+ for (i = 0; i < n; ++i)
s1[i] = s2[i];
- }
+}
+
#endif
#ifdef YY_NEED_STRLEN
#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
+static int
+yy_flex_strlen(yyconst char *s)
#else
-static int yy_flex_strlen( s )
+static int
+yy_flex_strlen(s)
yyconst char *s;
+
#endif
- {
+{
register int n;
- for ( n = 0; s[n]; ++n )
+
+ for (n = 0; s[n]; ++n)
;
return n;
- }
+}
+
#endif
#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
+static void *
+yy_flex_alloc(yy_size_t size)
#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
+static void *
+yy_flex_alloc(size)
+yy_size_t size;
+
#endif
- {
- return (void *) malloc( size );
- }
+{
+ return (void *) malloc(size);
+}
#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
+static void *
+yy_flex_realloc(void *ptr, yy_size_t size)
#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
+static void *
+yy_flex_realloc(ptr, size)
+void *ptr;
+yy_size_t size;
+
#endif
- {
- /* 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.
+{
+
+ /*
+ * 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 (void *) realloc( (char *) ptr, size );
- }
+ return (void *) realloc((char *) ptr, size);
+}
#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
+static void
+yy_flex_free(void *ptr)
#else
-static void yy_flex_free( ptr )
-void *ptr;
+static void
+yy_flex_free(ptr)
+void *ptr;
+
#endif
- {
- free( ptr );
- }
+{
+ free(ptr);
+}
#if YY_MAIN
-int main()
- {
+int
+main()
+{
yylex();
return 0;
- }
+}
+
#endif
#line 422 "scan.l"
-void yyerror(char message[])
+void
+yyerror(char message[])
{
elog(ERROR, "parser: %s at or near \"%s\"", message, yytext);
}
-int yywrap()
+int
+yywrap()
{
- return(1);
+ return (1);
}
/*
@@ -2214,15 +2354,18 @@ int yywrap()
void
init_io()
{
- /* it's important to set this to NULL
- because input()/myinput() checks the non-nullness of parseCh
- to know when to pass the string to lex/flex */
+
+ /*
+ * it's important to set this to NULL because input()/myinput() checks
+ * the non-nullness of parseCh to know when to pass the string to
+ * lex/flex
+ */
parseCh = NULL;
#if defined(FLEX_SCANNER)
if (YY_CURRENT_BUFFER)
yy_flush_buffer(YY_CURRENT_BUFFER);
-#endif /* FLEX_SCANNER */
- BEGIN INITIAL;
+#endif /* FLEX_SCANNER */
+ BEGIN INITIAL;
}
#if !defined(FLEX_SCANNER)
@@ -2233,12 +2376,12 @@ input()
if (parseCh == NULL)
{
parseCh = parseString;
- return(*parseCh++);
+ return (*parseCh++);
}
else if (*parseCh == '\0')
- return(0);
+ return (0);
else
- return(*parseCh++);
+ return (*parseCh++);
}
/* undo lex input from a string instead of from stdin */
@@ -2250,14 +2393,16 @@ unput(char c)
else if (c != 0)
*--parseCh = c;
}
-#endif /* !defined(FLEX_SCANNER) */
+
+#endif /* !defined(FLEX_SCANNER) */
#ifdef FLEX_SCANNER
/* input routine for flex to read input from a string instead of a file */
int
-myinput(char* buf, int max)
+myinput(char *buf, int max)
{
- int len, copylen;
+ int len,
+ copylen;
if (parseCh == NULL)
{
@@ -2273,7 +2418,7 @@ myinput(char* buf, int max)
return copylen;
}
else
- return 0; /* end of string */
+ return 0; /* end of string */
}
-#endif /* FLEX_SCANNER */
+#endif /* FLEX_SCANNER */
diff --git a/src/backend/port/dynloader/aix.h b/src/backend/port/dynloader/aix.h
index 7310aee599..ee19b47ea4 100644
--- a/src/backend/port/dynloader/aix.h
+++ b/src/backend/port/dynloader/aix.h
@@ -1,5 +1,5 @@
/*
- * $Id: aix.h,v 1.1 1997/12/19 22:58:26 scrappy Exp $
+ * $Id: aix.h,v 1.2 1998/09/01 04:30:51 momjian Exp $
*
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
@@ -53,4 +53,4 @@ extern "C"
#define pg_dlclose(h) dlclose(h)
#define pg_dlerror() dlerror()
-#endif /* __dlfcn_h__ */
+#endif /* __dlfcn_h__ */
diff --git a/src/backend/port/dynloader/alpha.h b/src/backend/port/dynloader/alpha.h
index 9b3cf19949..bae85b4929 100644
--- a/src/backend/port/dynloader/alpha.h
+++ b/src/backend/port/dynloader/alpha.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: alpha.h,v 1.1 1998/02/02 03:49:11 scrappy Exp $
+ * $Id: alpha.h,v 1.2 1998/09/01 04:30:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,4 +32,4 @@
#define pg_dlclose(h) dlclose(h)
#define pg_dlerror() dlerror()
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/bsd.c b/src/backend/port/dynloader/bsd.c
index 92412c07d6..48d0d3cc41 100644
--- a/src/backend/port/dynloader/bsd.c
+++ b/src/backend/port/dynloader/bsd.c
@@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <nlist.h>
diff --git a/src/backend/port/dynloader/bsd.h b/src/backend/port/dynloader/bsd.h
index 0f396c7a03..d03655066d 100644
--- a/src/backend/port/dynloader/bsd.h
+++ b/src/backend/port/dynloader/bsd.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bsd.h,v 1.1 1997/12/19 23:17:42 scrappy Exp $
+ * $Id: bsd.h,v 1.2 1998/09/01 04:30:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,4 +45,4 @@ void *BSD44_derived_dlopen(const char *filename, int num);
void *BSD44_derived_dlsym(void *handle, const char *name);
void BSD44_derived_dlclose(void *handle);
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/bsdi.h b/src/backend/port/dynloader/bsdi.h
index 91a5331a8c..8f8c5ee563 100644
--- a/src/backend/port/dynloader/bsdi.h
+++ b/src/backend/port/dynloader/bsdi.h
@@ -31,4 +31,4 @@
/* port.c */
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/dgux.h b/src/backend/port/dynloader/dgux.h
index 8942cb0981..ce5f80fb14 100644
--- a/src/backend/port/dynloader/dgux.h
+++ b/src/backend/port/dynloader/dgux.h
@@ -4,7 +4,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dgux.h,v 1.3 1998/02/26 04:34:25 momjian Exp $
+ * $Id: dgux.h,v 1.4 1998/09/01 04:30:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,4 +28,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/irix5.h b/src/backend/port/dynloader/irix5.h
index a7fcfa991c..0f66ea5074 100644
--- a/src/backend/port/dynloader/irix5.h
+++ b/src/backend/port/dynloader/irix5.h
@@ -31,4 +31,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/linux.h b/src/backend/port/dynloader/linux.h
index 72e48925c6..5a7741d8f5 100644
--- a/src/backend/port/dynloader/linux.h
+++ b/src/backend/port/dynloader/linux.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: linux.h,v 1.3 1998/02/26 04:34:28 momjian Exp $
+ * $Id: linux.h,v 1.4 1998/09/01 04:31:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,4 +39,4 @@
/* port.c */
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/nextstep.h b/src/backend/port/dynloader/nextstep.h
index dfd72a83a6..ecaf48beb2 100644
--- a/src/backend/port/dynloader/nextstep.h
+++ b/src/backend/port/dynloader/nextstep.h
@@ -12,10 +12,10 @@
#include "fmgr.h" /* for func_ptr */
#include "utils/dynamic_loader.h"
-void *next_dlopen(char *name);
-int next_dlclose(void *handle);
-void *next_dlsym(void *handle, char *symbol);
-char *next_dlerror(void);
+void *next_dlopen(char *name);
+int next_dlclose(void *handle);
+void *next_dlsym(void *handle, char *symbol);
+char *next_dlerror(void);
#define pg_dlopen(f) next_dlopen
#define pg_dlsym next_dlsym
@@ -24,4 +24,4 @@ char *next_dlerror(void);
/* port.c */
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/sco.h b/src/backend/port/dynloader/sco.h
index 0c344e4178..c00e8910d6 100644
--- a/src/backend/port/dynloader/sco.h
+++ b/src/backend/port/dynloader/sco.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sco.h,v 1.1 1997/12/20 03:38:19 scrappy Exp $
+ * $Id: sco.h,v 1.2 1998/09/01 04:31:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,4 +33,4 @@
/* port.c */
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/solaris_i386.h b/src/backend/port/dynloader/solaris_i386.h
index 631fa0648e..a4bfcc9c77 100755
--- a/src/backend/port/dynloader/solaris_i386.h
+++ b/src/backend/port/dynloader/solaris_i386.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: solaris_i386.h,v 1.1 1998/06/19 02:55:06 momjian Exp $
+ * $Id: solaris_i386.h,v 1.2 1998/09/01 04:31:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,4 +31,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/solaris_sparc.h b/src/backend/port/dynloader/solaris_sparc.h
index 22c7d67c77..6a876fe267 100755
--- a/src/backend/port/dynloader/solaris_sparc.h
+++ b/src/backend/port/dynloader/solaris_sparc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: solaris_sparc.h,v 1.1 1998/06/19 02:55:06 momjian Exp $
+ * $Id: solaris_sparc.h,v 1.2 1998/09/01 04:31:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,4 +35,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/sunos4.h b/src/backend/port/dynloader/sunos4.h
index cbd5c0386b..3ff9d7d499 100644
--- a/src/backend/port/dynloader/sunos4.h
+++ b/src/backend/port/dynloader/sunos4.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sunos4.h,v 1.1 1997/12/20 03:38:20 scrappy Exp $
+ * $Id: sunos4.h,v 1.2 1998/09/01 04:31:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,4 +31,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/svr4.h b/src/backend/port/dynloader/svr4.h
index e49b5a7446..1829fa7b6c 100644
--- a/src/backend/port/dynloader/svr4.h
+++ b/src/backend/port/dynloader/svr4.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: svr4.h,v 1.1 1998/02/24 03:41:58 scrappy Exp $
+ * $Id: svr4.h,v 1.2 1998/09/01 04:31:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,4 +31,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* DYNLOADER_H */
+#endif /* DYNLOADER_H */
diff --git a/src/backend/port/dynloader/ultrix4.h b/src/backend/port/dynloader/ultrix4.h
index 47bb5e3339..8848ec0b18 100644
--- a/src/backend/port/dynloader/ultrix4.h
+++ b/src/backend/port/dynloader/ultrix4.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ultrix4.h,v 1.1 1998/03/10 05:23:46 scrappy Exp $
+ * $Id: ultrix4.h,v 1.2 1998/09/01 04:31:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -120,4 +120,4 @@ extern char **dl_undefinedSymbols( /* int *count */ );
extern void dl_printAllSymbols( /* void *handle */ );
extern void dl_setLibraries( /* char *libs */ );
-#endif /* _DL_HEADER_ */
+#endif /* _DL_HEADER_ */
diff --git a/src/backend/port/dynloader/univel.h b/src/backend/port/dynloader/univel.h
index 78222686fd..c8b2e70b10 100644
--- a/src/backend/port/dynloader/univel.h
+++ b/src/backend/port/dynloader/univel.h
@@ -31,4 +31,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/dynloader/unixware.h b/src/backend/port/dynloader/unixware.h
index edc3a3b18e..8aed609b67 100644
--- a/src/backend/port/dynloader/unixware.h
+++ b/src/backend/port/dynloader/unixware.h
@@ -31,4 +31,4 @@
#define pg_dlclose dlclose
#define pg_dlerror dlerror
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/hpux/fixade.h b/src/backend/port/hpux/fixade.h
index 8ed40481ab..7d17077f19 100644
--- a/src/backend/port/hpux/fixade.h
+++ b/src/backend/port/hpux/fixade.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fixade.h,v 1.3 1997/09/08 02:26:22 momjian Exp $
+ * $Id: fixade.h,v 1.4 1998/09/01 04:31:16 momjian Exp $
*
* NOTES
* This must be included in EVERY source file.
@@ -54,13 +54,13 @@ struct HP_TOO_BOGUS
int hptb_bogus[8192];
};
-#endif /* BROKEN_STRUCT_INIT */
-#endif /* HP_S500_ALIGN */
+#endif /* BROKEN_STRUCT_INIT */
+#endif /* HP_S500_ALIGN */
#if defined(WEAK_C_OPTIMIZER)
#pragma OPT_LEVEL 1
-#endif /* WEAK_C_OPTIMIZER */
+#endif /* WEAK_C_OPTIMIZER */
-#endif /* !NOFIXADE */
+#endif /* !NOFIXADE */
-#endif /* FIXADE_H */
+#endif /* FIXADE_H */
diff --git a/src/backend/port/hpux/port-protos.h b/src/backend/port/hpux/port-protos.h
index dbf43ce5f1..968c9ab006 100644
--- a/src/backend/port/hpux/port-protos.h
+++ b/src/backend/port/hpux/port-protos.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: port-protos.h,v 1.5 1997/12/19 22:45:57 scrappy Exp $
+ * $Id: port-protos.h,v 1.6 1998/09/01 04:31:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,4 +28,4 @@ extern int init_address_fixup(void);
extern double rint(double x);
extern double cbrt(double x);
-#endif /* PORT_PROTOS_H */
+#endif /* PORT_PROTOS_H */
diff --git a/src/backend/port/snprintf.c b/src/backend/port/snprintf.c
index cc003e9b9b..59f6bed0ea 100644
--- a/src/backend/port/snprintf.c
+++ b/src/backend/port/snprintf.c
@@ -9,22 +9,22 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
+ * must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -37,10 +37,12 @@
#if defined(LIBC_SCCS) && !defined(lint)
#if 0
static char sccsid[] = "@(#)snprintf.c 8.1 (Berkeley) 6/4/93";
+
#endif
static const char rcsid[] =
- "$Id: snprintf.c,v 1.2 1998/09/01 03:24:31 momjian Exp $";
-#endif /* LIBC_SCCS and not lint */
+"$Id: snprintf.c,v 1.3 1998/09/01 04:30:44 momjian Exp $";
+
+#endif /* LIBC_SCCS and not lint */
#include <limits.h>
#include <stdio.h>
@@ -52,20 +54,21 @@ static const char rcsid[] =
#if __STDC__
int
-snprintf(char *str, size_t n, char const *fmt, ...)
+snprintf(char *str, size_t n, char const * fmt,...)
#else
int
snprintf(str, n, fmt, va_alist)
- char *str;
- size_t n;
- char *fmt;
- va_dcl
+char *str;
+size_t n;
+char *fmt;
+
+va_dcl
#endif
{
- size_t on;
- int ret;
- va_list ap;
- FILE f;
+ size_t on;
+ int ret;
+ va_list ap;
+ FILE f;
on = n;
if (n != 0)
@@ -79,7 +82,7 @@ snprintf(str, n, fmt, va_alist)
#endif
f._file = -1;
f._flags = __SWR | __SSTR;
- f._bf._base = f._p = (unsigned char *)str;
+ f._bf._base = f._p = (unsigned char *) str;
f._bf._size = f._w = n;
ret = vfprintf(&f, fmt, ap);
if (on > 0)
diff --git a/src/backend/port/strcasecmp.c b/src/backend/port/strcasecmp.c
index 54a62f7cff..1c4fbd12b4 100644
--- a/src/backend/port/strcasecmp.c
+++ b/src/backend/port/strcasecmp.c
@@ -1,4 +1,4 @@
-/* $Id: strcasecmp.c,v 1.4 1998/06/15 19:28:57 momjian Exp $ */
+/* $Id: strcasecmp.c,v 1.5 1998/09/01 04:30:46 momjian Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
@@ -15,7 +15,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <string.h>
diff --git a/src/backend/port/strtol.c b/src/backend/port/strtol.c
index 9d49dcad25..215bf616f9 100644
--- a/src/backend/port/strtol.c
+++ b/src/backend/port/strtol.c
@@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strtol.c 5.4 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <limits.h>
#include <ctype.h>
diff --git a/src/backend/port/strtoul.c b/src/backend/port/strtoul.c
index 7f7f429f0b..f07b4c3719 100644
--- a/src/backend/port/strtoul.c
+++ b/src/backend/port/strtoul.c
@@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <limits.h>
#include <ctype.h>
diff --git a/src/backend/port/sunos4/float.h b/src/backend/port/sunos4/float.h
index e81d29557f..f190d315ba 100644
--- a/src/backend/port/sunos4/float.h
+++ b/src/backend/port/sunos4/float.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: float.h,v 1.2 1997/09/07 04:46:58 momjian Exp $
+ * $Id: float.h,v 1.3 1998/09/01 04:31:19 momjian Exp $
*
* NOTES
* These come straight out of ANSI X3.159-1989 (p.18) and
@@ -27,4 +27,4 @@
#define DBL_MIN 2.2250738585072014e-308
#define DBL_MAX 1.7976931348623157e+308
-#endif /* FLOAT_H */
+#endif /* FLOAT_H */
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 256e0d4c39..07e5060f30 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.96 1998/09/01 03:24:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.97 1998/09/01 04:31:21 momjian Exp $
*
* NOTES
*
@@ -51,7 +51,7 @@
#if !defined(NO_UNISTD_H)
#include <unistd.h>
-#endif /* !NO_UNISTD_H */
+#endif /* !NO_UNISTD_H */
#include <ctype.h>
#include <sys/types.h> /* for fd_set stuff */
@@ -117,7 +117,7 @@ typedef struct bkend
long cancel_key; /* cancel key for cancels for this backend */
} Backend;
-Port *MyBackendPort = NULL;
+Port *MyBackendPort = NULL;
/* list of active backends. For garbage collection only now. */
@@ -162,7 +162,7 @@ static IpcMemoryKey ipc_key;
static int NextBackendId = MAXINT; /* XXX why? */
static char *progname = (char *) NULL;
static char **real_argv;
-static int real_argc;
+static int real_argc;
/*
* Default Values
@@ -184,10 +184,10 @@ static char ExtraOptions[ARGV_SIZE] = "";
* the postmaster stop (rather than kill) peers and not reinitialize
* shared data structures.
*/
-static bool Reinit = true;
+static bool Reinit = true;
static int SendStop = false;
-static bool NetServer = false; /* if not zero, postmaster listen for
+static bool NetServer = false; /* if not zero, postmaster listen for
* non-local connections */
@@ -196,10 +196,12 @@ static bool NetServer = false; /* if not zero, postmaster listen for
* alternative interface.
*/
#ifdef HAVE_SIGPROCMASK
-static sigset_t oldsigmask,
- newsigmask;
+static sigset_t oldsigmask,
+ newsigmask;
+
#else
-static int orgsigmask = sigblock(0);
+static int orgsigmask = sigblock(0);
+
#endif
/*
@@ -214,7 +216,7 @@ extern char *optarg;
extern int optind,
opterr;
-
+
/*
* postmaster.c - function prototypes
*/
@@ -225,25 +227,26 @@ static void pmdie(SIGNAL_ARGS);
static void reaper(SIGNAL_ARGS);
static void dumpstatus(SIGNAL_ARGS);
static void CleanupProc(int pid, int exitstatus);
-static int DoBackend(Port *port);
+static int DoBackend(Port *port);
static void ExitPostmaster(int status);
static void usage(const char *);
-static int ServerLoop(void);
-static int BackendStartup(Port *port);
-static int readStartupPacket(void *arg, PacketLen len, void *pkt);
-static int processCancelRequest(Port *port, PacketLen len, void *pkt);
-static int initMasks(fd_set *rmask, fd_set *wmask);
+static int ServerLoop(void);
+static int BackendStartup(Port *port);
+static int readStartupPacket(void *arg, PacketLen len, void *pkt);
+static int processCancelRequest(Port *port, PacketLen len, void *pkt);
+static int initMasks(fd_set *rmask, fd_set *wmask);
static long PostmasterRandom(void);
static void RandomSalt(char *salt);
static void SignalChildren(SIGNAL_ARGS);
#ifdef CYR_RECODE
-void GetCharSetByHost(char *, int, char *);
+void GetCharSetByHost(char *, int, char *);
#endif
#ifdef USE_ASSERT_CHECKING
-int assert_enabled = 1;
+int assert_enabled = 1;
+
#endif
static void
@@ -313,17 +316,17 @@ PostmasterMain(int argc, char *argv[])
bool DataDirOK; /* We have a usable PGDATA value */
char hostbuf[MAXHOSTNAMELEN];
int nonblank_argc;
-
+
/*
- * We need three params so we can display status. If we don't
- * get them from the user, let's make them ourselves.
+ * We need three params so we can display status. If we don't get
+ * them from the user, let's make them ourselves.
*/
if (argc < 5)
{
- int i;
- char *new_argv[6];
+ int i;
+ char *new_argv[6];
- for (i=0; i < argc; i++)
+ for (i = 0; i < argc; i++)
new_argv[i] = argv[i];
for (; i < 5; i++)
new_argv[i] = "";
@@ -336,7 +339,7 @@ PostmasterMain(int argc, char *argv[])
exit(1);
}
new_argv[0] = Execfile;
-
+
execv(new_argv[0], new_argv);
/* How did we get here, error! */
@@ -344,14 +347,17 @@ PostmasterMain(int argc, char *argv[])
fprintf(stderr, "PostmasterMain execv failed on %s\n", argv[0]);
exit(1);
}
-
+
progname = argv[0];
real_argv = argv;
real_argc = argc;
- /* don't process any dummy args we placed at the end for status display */
+ /*
+ * don't process any dummy args we placed at the end for status
+ * display
+ */
for (nonblank_argc = argc; nonblank_argc > 0; nonblank_argc--)
- if (argv[nonblank_argc-1] != NULL && argv[nonblank_argc-1][0] != '\0')
+ if (argv[nonblank_argc - 1] != NULL && argv[nonblank_argc - 1][0] != '\0')
break;
/*
@@ -371,7 +377,7 @@ PostmasterMain(int argc, char *argv[])
DataDir = getenv("PGDATA"); /* default value */
opterr = 0;
- while ((opt = getopt(nonblank_argc, argv,"A:a:B:b:D:dim:Mno:p:Ss")) != EOF)
+ while ((opt = getopt(nonblank_argc, argv, "A:a:B:b:D:dim:Mno:p:Ss")) != EOF)
{
switch (opt)
{
@@ -379,6 +385,7 @@ PostmasterMain(int argc, char *argv[])
#ifndef USE_ASSERT_CHECKING
fprintf(stderr, "Assert checking is not enabled\n");
#else
+
/*
* Pass this option also to each backend.
*/
@@ -541,17 +548,17 @@ PostmasterMain(int argc, char *argv[])
* Set up signal handlers for the postmaster process.
*/
- pqsignal(SIGHUP, pmdie); /* send SIGHUP, don't die */
- pqsignal(SIGINT, pmdie); /* die */
- pqsignal(SIGQUIT, pmdie); /* send SIGTERM and die */
- pqsignal(SIGTERM, pmdie); /* send SIGTERM,SIGKILL and die */
- pqsignal(SIGPIPE, SIG_IGN); /* ignored */
- pqsignal(SIGUSR1, pmdie); /* send SIGUSR1 and die */
- pqsignal(SIGUSR2, pmdie); /* send SIGUSR2, don't die */
- pqsignal(SIGCHLD, reaper); /* handle child termination */
- pqsignal(SIGTTIN, SIG_IGN); /* ignored */
- pqsignal(SIGTTOU, SIG_IGN); /* ignored */
- pqsignal(SIGWINCH, dumpstatus); /* dump port status */
+ pqsignal(SIGHUP, pmdie); /* send SIGHUP, don't die */
+ pqsignal(SIGINT, pmdie); /* die */
+ pqsignal(SIGQUIT, pmdie); /* send SIGTERM and die */
+ pqsignal(SIGTERM, pmdie); /* send SIGTERM,SIGKILL and die */
+ pqsignal(SIGPIPE, SIG_IGN); /* ignored */
+ pqsignal(SIGUSR1, pmdie); /* send SIGUSR1 and die */
+ pqsignal(SIGUSR2, pmdie); /* send SIGUSR2, don't die */
+ pqsignal(SIGCHLD, reaper); /* handle child termination */
+ pqsignal(SIGTTIN, SIG_IGN); /* ignored */
+ pqsignal(SIGTTOU, SIG_IGN); /* ignored */
+ pqsignal(SIGWINCH, dumpstatus); /* dump port status */
status = ServerLoop();
@@ -612,7 +619,8 @@ ServerLoop(void)
writemask;
int nSockets;
Dlelem *curr;
- struct timeval now, later;
+ struct timeval now,
+ later;
struct timezone tz;
gettimeofday(&now, &tz);
@@ -655,18 +663,17 @@ ServerLoop(void)
while (random_seed == 0)
{
gettimeofday(&later, &tz);
-
+
/*
- * We are not sure how much precision is in tv_usec, so we
- * swap the nibbles of 'later' and XOR them with 'now'.
- * On the off chance that the result is 0, we loop until
- * it isn't.
+ * We are not sure how much precision is in tv_usec, so we
+ * swap the nibbles of 'later' and XOR them with 'now'. On the
+ * off chance that the result is 0, we loop until it isn't.
*/
random_seed = now.tv_usec ^
- ((later.tv_usec << 16) |
- ((later.tv_usec >> 16) & 0xffff));
+ ((later.tv_usec << 16) |
+ ((later.tv_usec >> 16) & 0xffff));
}
-
+
/*
* [TRH] To avoid race conditions, block SIGCHLD signals while we
* are handling the request. (both reaper() and ConnCreate()
@@ -828,8 +835,9 @@ readStartupPacket(void *arg, PacketLen len, void *pkt)
port = (Port *) arg;
si = (StartupPacket *) pkt;
- /* The first field is either a protocol version number or
- * a special request code.
+ /*
+ * The first field is either a protocol version number or a special
+ * request code.
*/
port->proto = ntohl(si->protoVersion);
@@ -885,15 +893,15 @@ readStartupPacket(void *arg, PacketLen len, void *pkt)
/*
* The client has sent a cancel request packet, not a normal
- * start-a-new-backend packet. Perform the necessary processing.
+ * start-a-new-backend packet. Perform the necessary processing.
* Note that in any case, we return STATUS_ERROR to close the
- * connection immediately. Nothing is sent back to the client.
+ * connection immediately. Nothing is sent back to the client.
*/
static int
processCancelRequest(Port *port, PacketLen len, void *pkt)
{
- CancelRequestPacket *canc = (CancelRequestPacket *) pkt;
+ CancelRequestPacket *canc = (CancelRequestPacket *) pkt;
int backendPID;
long cancelAuthCode;
Dlelem *curr;
@@ -989,14 +997,15 @@ reset_shared(short port)
static void
pmdie(SIGNAL_ARGS)
{
- int i;
+ int i;
TPRINTF(TRACE_VERBOSE, "pmdie %d", postgres_signal_arg);
/*
* Kill self and/or children processes depending on signal number.
*/
- switch (postgres_signal_arg) {
+ switch (postgres_signal_arg)
+ {
case SIGHUP:
/* Send SIGHUP to all children (update options flags) */
SignalChildren(SIGHUP);
@@ -1013,15 +1022,14 @@ pmdie(SIGNAL_ARGS)
case SIGTERM:
/* Shutdown all children with SIGTERM and SIGKILL, then die */
SignalChildren(SIGTERM);
- for (i=0; i<10; i++) {
- if (!DLGetHead(BackendList)) {
+ for (i = 0; i < 10; i++)
+ {
+ if (!DLGetHead(BackendList))
break;
- }
sleep(1);
}
- if (DLGetHead(BackendList)) {
+ if (DLGetHead(BackendList))
SignalChildren(SIGKILL);
- }
break;
case SIGUSR1:
/* Quick die all children with SIGUSR1 and die */
@@ -1095,10 +1103,10 @@ CleanupProc(int pid,
}
/*
- * If a backend dies in an ugly way (i.e.
- * exit status not 0) then we must signal all other backends to
- * quickdie. If exit status is zero we assume everything is hunky
- * dory and simply remove the backend from the active backend list.
+ * If a backend dies in an ugly way (i.e. exit status not 0) then we
+ * must signal all other backends to quickdie. If exit status is zero
+ * we assume everything is hunky dory and simply remove the backend
+ * from the active backend list.
*/
if (!exitstatus)
{
@@ -1183,9 +1191,9 @@ CleanupProc(int pid,
static void
SignalChildren(int signal)
{
- Dlelem *curr,
- *next;
- Backend *bp;
+ Dlelem *curr,
+ *next;
+ Backend *bp;
int mypid = getpid();
curr = DLGetHead(BackendList);
@@ -1261,10 +1269,9 @@ BackendStartup(Port *port)
#endif
/*
- * Compute the cancel key that will be assigned to this backend.
- * The backend will have its own copy in the forked-off process'
- * value of MyCancelKey, so that it can transmit the key to the
- * frontend.
+ * Compute the cancel key that will be assigned to this backend. The
+ * backend will have its own copy in the forked-off process' value of
+ * MyCancelKey, so that it can transmit the key to the frontend.
*/
MyCancelKey = PostmasterRandom();
@@ -1281,21 +1288,22 @@ BackendStartup(Port *port)
fprintf(stderr, "-----------------------------------------\n");
}
- /* Flush all stdio channels just before fork,
- * to avoid double-output problems.
+ /*
+ * Flush all stdio channels just before fork, to avoid double-output
+ * problems.
*/
fflush(NULL);
- if ((pid = fork()) == 0)
- { /* child */
- if (DoBackend(port))
+ if ((pid = fork()) == 0)
+ { /* child */
+ if (DoBackend(port))
{
- fprintf(stderr, "%s child[%d]: BackendStartup: backend startup failed\n",
- progname, (int) getpid());
- exit(1);
+ fprintf(stderr, "%s child[%d]: BackendStartup: backend startup failed\n",
+ progname, (int) getpid());
+ exit(1);
}
else
- exit(0);
+ exit(0);
}
/* in parent */
@@ -1367,9 +1375,9 @@ split_opts(char **argv, int *argcp, char *s)
/*
* DoBackend -- set up the argument list and perform an execv system call
*
- * returns:
- * Shouldn't return at all.
- * If execv() fails, return status.
+ * returns:
+ * Shouldn't return at all.
+ * If execv() fails, return status.
*/
static int
DoBackend(Port *port)
@@ -1390,18 +1398,19 @@ DoBackend(Port *port)
char dbbuf[ARGV_SIZE + 1];
int ac = 0;
int i;
- struct timeval now;
- struct timezone tz;
+ struct timeval now;
+ struct timezone tz;
/*
- * Let's clean up ourselves as the postmaster child
+ * Let's clean up ourselves as the postmaster child
*/
-
- on_exit_reset(); /* we don't want the postmaster's proc_exit() handlers */
+
+ on_exit_reset(); /* we don't want the postmaster's
+ * proc_exit() handlers */
/* ----------------
* register signal handlers.
- * Thanks to the postmaster, these are currently blocked.
+ * Thanks to the postmaster, these are currently blocked.
* ----------------
*/
pqsignal(SIGINT, die);
@@ -1439,26 +1448,26 @@ DoBackend(Port *port)
srandom(now.tv_usec);
/* Now, on to standard postgres stuff */
-
+
MyProcPid = getpid();
strncpy(execbuf, Execfile, MAXPATHLEN - 1);
av[ac++] = execbuf;
/*
- * We need to set our argv[0] to an absolute path name because
- * some OS's use this for dynamic loading, like BSDI. Without it,
- * when we change directories to the database dir, the dynamic
- * loader can't find the base executable and fails.
- * Another advantage is that this changes the 'ps' displayed
- * process name on some platforms. It does on BSDI. That's
- * a big win.
+ * We need to set our argv[0] to an absolute path name because some
+ * OS's use this for dynamic loading, like BSDI. Without it, when we
+ * change directories to the database dir, the dynamic loader can't
+ * find the base executable and fails. Another advantage is that this
+ * changes the 'ps' displayed process name on some platforms. It does
+ * on BSDI. That's a big win.
*/
-
+
#ifndef linux
+
/*
- * This doesn't work on linux and overwrites the only valid
- * pointer to the argv buffer. See PS_INIT_STATUS macro.
+ * This doesn't work on linux and overwrites the only valid pointer to
+ * the argv buffer. See PS_INIT_STATUS macro.
*/
real_argv[0] = Execfile;
#endif
@@ -1516,7 +1525,7 @@ DoBackend(Port *port)
fprintf(stderr, ")\n");
}
- return(PostgresMain(ac, av, real_argc, real_argv));
+ return (PostgresMain(ac, av, real_argc, real_argv));
}
/*
@@ -1581,8 +1590,8 @@ CharRemap(long int ch)
static void
RandomSalt(char *salt)
{
- long rand = PostmasterRandom();
-
+ long rand = PostmasterRandom();
+
*salt = CharRemap(rand % 62);
*(salt + 1) = CharRemap(rand / 62);
}
diff --git a/src/backend/regex/engine.c b/src/backend/regex/engine.c
index 91d88f185f..698d5da729 100644
--- a/src/backend/regex/engine.c
+++ b/src/backend/regex/engine.c
@@ -77,7 +77,7 @@ struct match
pg_wchar *beginp; /* start of string -- virtual NUL precedes */
pg_wchar *endp; /* end of string -- virtual NUL here */
pg_wchar *coldp; /* can be no match starting before here */
- pg_wchar **lastpos; /* [nplus+1] */
+ pg_wchar **lastpos; /* [nplus+1] */
STATEVARS;
states st; /* current states */
states fresh; /* states for a fresh start */
@@ -93,19 +93,19 @@ extern "C"
/* === engine.c === */
static int
- matcher(struct re_guts * g, pg_wchar *string, size_t nmatch,
+ matcher(struct re_guts * g, pg_wchar * string, size_t nmatch,
regmatch_t *pmatch, int eflags);
static pg_wchar *
- dissect(struct match * m, pg_wchar *start, pg_wchar *stop,
+ dissect(struct match * m, pg_wchar * start, pg_wchar * stop,
sopno startst, sopno stopst);
static pg_wchar *
- backref(struct match * m, pg_wchar *start, pg_wchar *stop,
+ backref(struct match * m, pg_wchar * start, pg_wchar * stop,
sopno startst, sopno stopst, sopno lev);
static pg_wchar *
- fast(struct match * m, pg_wchar *start, pg_wchar *stop,
+ fast(struct match * m, pg_wchar * start, pg_wchar * stop,
sopno startst, sopno stopst);
static pg_wchar *
- slow(struct match * m, pg_wchar *start, pg_wchar *stop, sopno startst, sopno stopst);
+ slow(struct match * m, pg_wchar * start, pg_wchar * stop, sopno startst, sopno stopst);
static states
step(struct re_guts * g, sopno start,
sopno stop, states bef, int ch, states aft);
@@ -118,20 +118,20 @@ extern "C"
#define CODEMAX (BOL+5) /* highest code used */
#ifdef MULTIBYTE
-# define NONCHAR(c) ((c) > 16777216) /* 16777216 == 2^24 == 3 bytes */
-# define NNONCHAR (CODEMAX-16777216)
+#define NONCHAR(c) ((c) > 16777216) /* 16777216 == 2^24 == 3 bytes */
+#define NNONCHAR (CODEMAX-16777216)
#else
-# define NONCHAR(c) ((c) > CHAR_MAX)
-# define NNONCHAR (CODEMAX-CHAR_MAX)
+#define NONCHAR(c) ((c) > CHAR_MAX)
+#define NNONCHAR (CODEMAX-CHAR_MAX)
#endif
#ifdef REDEBUG
static void
- print(struct match * m, pg_wchar *caption, states st, int ch, FILE *d);
+ print(struct match * m, pg_wchar * caption, states st, int ch, FILE *d);
#endif
#ifdef REDEBUG
static void
- at(struct match * m, pg_wchar *title, pg_wchar *start, pg_wchar *stop,
+ at(struct match * m, pg_wchar * title, pg_wchar * start, pg_wchar * stop,
sopno startst, sopno stopst);
#endif
#ifdef REDEBUG
@@ -163,20 +163,20 @@ extern "C"
static int /* 0 success, REG_NOMATCH failure */
matcher(g, string, nmatch, pmatch, eflags)
struct re_guts *g;
-pg_wchar *string;
+pg_wchar *string;
size_t nmatch;
-regmatch_t *pmatch;
+regmatch_t *pmatch;
int eflags;
{
- pg_wchar *endp;
+ pg_wchar *endp;
int i;
struct match mv;
struct match *m = &mv;
- pg_wchar *dp;
+ pg_wchar *dp;
const sopno gf = g->firststate + 1; /* +1 for OEND */
const sopno gl = g->laststate;
- pg_wchar *start;
- pg_wchar *stop;
+ pg_wchar *start;
+ pg_wchar *stop;
/* simplify the situation where possible */
if (g->cflags & REG_NOSUB)
@@ -274,7 +274,7 @@ int eflags;
{
if (g->nplus > 0 && m->lastpos == NULL)
m->lastpos = (pg_wchar **) malloc((g->nplus + 1) *
- sizeof(pg_wchar *));
+ sizeof(pg_wchar *));
if (g->nplus > 0 && m->lastpos == NULL)
{
free(m->pmatch);
@@ -354,24 +354,24 @@ int eflags;
static pg_wchar * /* == stop (success) always */
dissect(m, start, stop, startst, stopst)
struct match *m;
-pg_wchar *start;
-pg_wchar *stop;
+pg_wchar *start;
+pg_wchar *stop;
sopno startst;
sopno stopst;
{
int i;
sopno ss; /* start sop of current subRE */
sopno es; /* end sop of current subRE */
- pg_wchar *sp; /* start of string matched by it */
- pg_wchar *stp; /* string matched by it cannot pass here */
- pg_wchar *rest; /* start of rest of string */
- pg_wchar *tail; /* string unmatched by rest of RE */
+ pg_wchar *sp; /* start of string matched by it */
+ pg_wchar *stp; /* string matched by it cannot pass here */
+ pg_wchar *rest; /* start of rest of string */
+ pg_wchar *tail; /* string unmatched by rest of RE */
sopno ssub; /* start sop of subsubRE */
sopno esub; /* end sop of subsubRE */
- pg_wchar *ssp; /* start of string matched by subsubRE */
- pg_wchar *sep; /* end of string matched by subsubRE */
- pg_wchar *oldssp; /* previous ssp */
- pg_wchar *dp;
+ pg_wchar *ssp; /* start of string matched by subsubRE */
+ pg_wchar *sep; /* end of string matched by subsubRE */
+ pg_wchar *oldssp; /* previous ssp */
+ pg_wchar *dp;
AT("diss", start, stop, startst, stopst);
sp = start;
@@ -551,22 +551,22 @@ sopno stopst;
== static char *backref(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst, sopno lev);
*/
-static pg_wchar * /* == stop (success) or NULL (failure) */
+static pg_wchar * /* == stop (success) or NULL (failure) */
backref(m, start, stop, startst, stopst, lev)
struct match *m;
-pg_wchar *start;
-pg_wchar *stop;
+pg_wchar *start;
+pg_wchar *stop;
sopno startst;
sopno stopst;
sopno lev; /* PLUS nesting level */
{
int i;
sopno ss; /* start sop of current subRE */
- pg_wchar *sp; /* start of string matched by it */
+ pg_wchar *sp; /* start of string matched by it */
sopno ssub; /* start sop of subsubRE */
sopno esub; /* end sop of subsubRE */
- pg_wchar *ssp; /* start of string matched by subsubRE */
- pg_wchar *dp;
+ pg_wchar *ssp; /* start of string matched by subsubRE */
+ pg_wchar *dp;
size_t len;
int hard;
sop s;
@@ -685,7 +685,7 @@ sopno lev; /* PLUS nesting level */
case OQUEST_: /* to null or not */
dp = backref(m, sp, stop, ss + 1, stopst, lev);
if (dp != NULL)
- return dp; /* not */
+ return dp; /* not */
return backref(m, sp, stop, ss + OPND(s) + 1, stopst, lev);
break;
case OPLUS_:
@@ -716,7 +716,7 @@ sopno lev; /* PLUS nesting level */
return dp;
/* that one missed, try next one */
if (OP(m->g->strip[esub]) == O_CH)
- return NULL; /* there is none */
+ return NULL;/* there is none */
esub++;
assert(OP(m->g->strip[esub]) == OOR2);
ssub = esub + 1;
@@ -765,23 +765,23 @@ sopno lev; /* PLUS nesting level */
== static char *fast(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
-static pg_wchar * /* where tentative match ended, or NULL */
+static pg_wchar * /* where tentative match ended, or NULL */
fast(m, start, stop, startst, stopst)
struct match *m;
-pg_wchar *start;
-pg_wchar *stop;
+pg_wchar *start;
+pg_wchar *stop;
sopno startst;
sopno stopst;
{
states st = m->st;
states fresh = m->fresh;
states tmp = m->tmp;
- pg_wchar *p = start;
+ pg_wchar *p = start;
int c = (start == m->beginp) ? OUT : *(start - 1);
int lastc; /* previous c */
int flagch;
int i;
- pg_wchar *coldp; /* last p after which no match was
+ pg_wchar *coldp; /* last p after which no match was
* underway */
CLEAR(st);
@@ -860,23 +860,23 @@ sopno stopst;
== static char *slow(struct match *m, char *start, \
== char *stop, sopno startst, sopno stopst);
*/
-static pg_wchar * /* where it ended */
+static pg_wchar * /* where it ended */
slow(m, start, stop, startst, stopst)
struct match *m;
-pg_wchar *start;
-pg_wchar *stop;
+pg_wchar *start;
+pg_wchar *stop;
sopno startst;
sopno stopst;
{
states st = m->st;
states empty = m->empty;
states tmp = m->tmp;
- pg_wchar *p = start;
+ pg_wchar *p = start;
int c = (start == m->beginp) ? OUT : *(start - 1);
int lastc; /* previous c */
int flagch;
int i;
- pg_wchar *matchp; /* last p at which a match ended */
+ pg_wchar *matchp; /* last p at which a match ended */
AT("slow", start, stop, startst, stopst);
CLEAR(st);
@@ -1089,7 +1089,7 @@ states aft; /* states already known reachable after */
static void
print(m, caption, st, ch, d)
struct match *m;
-pg_wchar *caption;
+pg_wchar *caption;
states st;
int ch;
FILE *d;
@@ -1123,9 +1123,9 @@ FILE *d;
static void
at(m, title, start, stop, startst, stopst)
struct match *m;
-pg_wchar *title;
-pg_wchar *start;
-pg_wchar *stop;
+pg_wchar *title;
+pg_wchar *start;
+pg_wchar *stop;
sopno startst;
sopno stopst;
{
@@ -1152,16 +1152,17 @@ sopno stopst;
*/
-static int pg_isprint(int c)
+static int
+pg_isprint(int c)
{
#ifdef MULTIBYTE
- return(c >= 0 && c <= UCHAR_MAX && isprint(c));
+ return (c >= 0 && c <= UCHAR_MAX && isprint(c));
#else
- return(isprint(c));
+ return (isprint(c));
#endif
}
-static pg_wchar * /* -> representation */
+static pg_wchar * /* -> representation */
pchar(ch)
int ch;
{
diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c
index 268ef35461..99b1ade582 100644
--- a/src/backend/regex/regcomp.c
+++ b/src/backend/regex/regcomp.c
@@ -40,7 +40,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
@@ -120,10 +120,10 @@ extern "C"
static void stripsnug(struct parse * p, struct re_guts * g);
static void findmust(struct parse * p, struct re_guts * g);
static sopno pluscount(struct parse * p, struct re_guts * g);
- static int pg_isdigit(int c);
- static int pg_isalpha(int c);
- static int pg_isupper(int c);
- static int pg_islower(int c);
+ static int pg_isdigit(int c);
+ static int pg_isalpha(int c);
+ static int pg_isupper(int c);
+ static int pg_islower(int c);
#ifdef __cplusplus
}
@@ -131,7 +131,7 @@ extern "C"
#endif
/* ========= end header generated by ./mkh ========= */
-static pg_wchar nuls[10]; /* place to point scanner in event of
+static pg_wchar nuls[10]; /* place to point scanner in event of
* error */
/*
@@ -194,8 +194,10 @@ int cflags;
struct parse *p = &pa;
int i;
size_t len;
+
#ifdef MULTIBYTE
- pg_wchar *wcp;
+ pg_wchar *wcp;
+
#endif
#ifdef REDEBUG
@@ -211,7 +213,7 @@ int cflags;
if (cflags & REG_PEND)
{
#ifdef MULTIBYTE
- wcp = preg->patsave;
+ wcp = preg->patsave;
if (preg->re_endp < wcp)
return REG_INVARG;
len = preg->re_endp - wcp;
@@ -221,18 +223,18 @@ int cflags;
len = preg->re_endp - pattern;
#endif
}
- else {
+ else
+ {
#ifdef MULTIBYTE
- wcp = (pg_wchar *)malloc((strlen(pattern)+1) * sizeof(pg_wchar));
- if (wcp == NULL) {
- return REG_ESPACE;
- }
- preg->patsave = wcp;
- (void)pg_mb2wchar((unsigned char *)pattern,wcp);
- len = pg_wchar_strlen(wcp);
+ wcp = (pg_wchar *) malloc((strlen(pattern) + 1) * sizeof(pg_wchar));
+ if (wcp == NULL)
+ return REG_ESPACE;
+ preg->patsave = wcp;
+ (void) pg_mb2wchar((unsigned char *) pattern, wcp);
+ len = pg_wchar_strlen(wcp);
#else
- len = strlen((char *) pattern);
+ len = strlen((char *) pattern);
#endif
}
@@ -256,7 +258,8 @@ int cflags;
#ifdef MULTIBYTE
p->next = wcp;
#else
- p->next = (pg_wchar *)pattern; /* convenience; we do not modify it */
+ p->next = (pg_wchar *) pattern; /* convenience; we do not modify
+ * it */
#endif
p->end = p->next + len;
p->error = 0;
@@ -755,14 +758,16 @@ struct parse *p;
{
cset *cs = allocset(p);
int invert = 0;
+
#ifdef MULTIBYTE
- pg_wchar sp1[] = {'[', ':', '<', ':', ']', ']'};
- pg_wchar sp2[] = {'[', ':', '>', ':', ']', ']'};
+ pg_wchar sp1[] = {'[', ':', '<', ':', ']', ']'};
+ pg_wchar sp2[] = {'[', ':', '>', ':', ']', ']'};
+
#endif
/* Dept of Truly Sickening Special-Case Kludges */
#ifdef MULTIBYTE
- if (p->next + 5 < p->end && pg_wchar_strncmp(p->next, sp1, 6) == 0)
+ if (p->next + 5 < p->end && pg_wchar_strncmp(p->next, sp1, 6) == 0)
#else
if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0)
#endif
@@ -772,7 +777,7 @@ struct parse *p;
return;
}
#ifdef MULTIBYTE
- if (p->next + 5 < p->end && pg_wchar_strncmp(p->next, sp2, 6) == 0)
+ if (p->next + 5 < p->end && pg_wchar_strncmp(p->next, sp2, 6) == 0)
#else
if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0)
#endif
@@ -847,8 +852,8 @@ p_b_term(p, cs)
struct parse *p;
cset *cs;
{
- pg_wchar c;
- pg_wchar start,
+ pg_wchar c;
+ pg_wchar start,
finish;
int i;
@@ -904,9 +909,8 @@ cset *cs;
/* xxx what about signed chars here... */
REQUIRE(start <= finish, REG_ERANGE);
#ifdef MULTIBYTE
- if (CHlc(start) != CHlc(finish)) {
- SETERROR(REG_ERANGE);
- }
+ if (CHlc(start) != CHlc(finish))
+ SETERROR(REG_ERANGE);
#endif
for (i = start; i <= finish; i++)
CHadd(cs, i);
@@ -974,11 +978,11 @@ cset *cs;
- p_b_symbol - parse a character or [..]ed multicharacter collating symbol
== static char p_b_symbol(struct parse *p);
*/
-static pg_wchar /* value of symbol */
+static pg_wchar /* value of symbol */
p_b_symbol(p)
struct parse *p;
{
- pg_wchar value;
+ pg_wchar value;
REQUIRE(MORE(), REG_EBRACK);
if (!EATTWO('[', '.'))
@@ -999,7 +1003,7 @@ p_b_coll_elem(p, endc)
struct parse *p;
int endc; /* name ended by endc,']' */
{
- pg_wchar *sp = p->next;
+ pg_wchar *sp = p->next;
struct cname *cp;
int len;
@@ -1019,7 +1023,7 @@ int endc; /* name ended by endc,']' */
#endif
return cp->code; /* known name */
if (len == 1)
- return *sp; /* single character */
+ return *sp; /* single character */
SETERROR(REG_ECOLLATE); /* neither */
return 0;
}
@@ -1053,9 +1057,9 @@ bothcases(p, ch)
struct parse *p;
int ch;
{
- pg_wchar *oldnext = p->next;
- pg_wchar *oldend = p->end;
- pg_wchar bracket[3];
+ pg_wchar *oldnext = p->next;
+ pg_wchar *oldend = p->end;
+ pg_wchar bracket[3];
assert(othercase(ch) != ch);/* p_bracket() would recurse */
p->next = bracket;
@@ -1104,9 +1108,9 @@ static void
nonnewline(p)
struct parse *p;
{
- pg_wchar *oldnext = p->next;
- pg_wchar *oldend = p->end;
- pg_wchar bracket[4];
+ pg_wchar *oldnext = p->next;
+ pg_wchar *oldend = p->end;
+ pg_wchar bracket[4];
p->next = bracket;
p->end = bracket + 3;
@@ -1733,7 +1737,7 @@ struct re_guts *g;
sop *newstart = 0;
sopno newlen;
sop s;
- pg_wchar *cp;
+ pg_wchar *cp;
sopno i;
/* avoid making error situations worse */
@@ -1789,7 +1793,7 @@ struct re_guts *g;
/* turn it into a character string */
#ifdef MULTIBYTE
- g->must = (pg_wchar *)malloc((size_t) (g->mlen + 1)*sizeof(pg_wchar));
+ g->must = (pg_wchar *) malloc((size_t) (g->mlen + 1) * sizeof(pg_wchar));
#else
g->must = malloc((size_t) g->mlen + 1);
#endif
@@ -1852,38 +1856,42 @@ struct re_guts *g;
/*
* some ctype functions with none-ascii-char guard
*/
-static int pg_isdigit(int c)
+static int
+pg_isdigit(int c)
{
#ifdef MULTIBYTE
- return(c >= 0 && c <= UCHAR_MAX && isdigit(c));
+ return (c >= 0 && c <= UCHAR_MAX && isdigit(c));
#else
- return(isdigit(c));
+ return (isdigit(c));
#endif
}
-static int pg_isalpha(int c)
+static int
+pg_isalpha(int c)
{
#ifdef MULTIBYTE
- return(c >= 0 && c <= UCHAR_MAX && isalpha(c));
+ return (c >= 0 && c <= UCHAR_MAX && isalpha(c));
#else
- return(isalpha(c));
+ return (isalpha(c));
#endif
}
-static int pg_isupper(int c)
+static int
+pg_isupper(int c)
{
#ifdef MULTIBYTE
- return(c >= 0 && c <= UCHAR_MAX && isupper(c));
+ return (c >= 0 && c <= UCHAR_MAX && isupper(c));
#else
- return(isupper(c));
+ return (isupper(c));
#endif
}
-static int pg_islower(int c)
+static int
+pg_islower(int c)
{
#ifdef MULTIBYTE
- return(c >= 0 && c <= UCHAR_MAX && islower(c));
+ return (c >= 0 && c <= UCHAR_MAX && islower(c));
#else
- return(islower(c));
+ return (islower(c));
#endif
}
diff --git a/src/backend/regex/regerror.c b/src/backend/regex/regerror.c
index 15d78325e6..a2ade47966 100644
--- a/src/backend/regex/regerror.c
+++ b/src/backend/regex/regerror.c
@@ -40,7 +40,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)regerror.c 8.4 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
diff --git a/src/backend/regex/regexec.c b/src/backend/regex/regexec.c
index 0aab1923bc..d53a6b4d8b 100644
--- a/src/backend/regex/regexec.c
+++ b/src/backend/regex/regexec.c
@@ -40,7 +40,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)regexec.c 8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
/*
* the outer shell of regexec()
@@ -159,14 +159,15 @@ pg95_regexec(preg, string, nmatch, pmatch, eflags)
const regex_t *preg;
const char *string;
size_t nmatch;
-regmatch_t *pmatch;
+regmatch_t *pmatch;
int eflags;
{
struct re_guts *g = preg->re_g;
#ifdef MULTIBYTE
- pg_wchar *str;
- int sts;
+ pg_wchar *str;
+ int sts;
+
#endif
#ifdef REDEBUG
@@ -183,19 +184,18 @@ int eflags;
eflags = GOODFLAGS(eflags);
#ifdef MULTIBYTE
- str = (pg_wchar *)malloc((strlen(string)+1) * sizeof(pg_wchar));
- if (!str) {
- return(REG_ESPACE);
- }
- (void)pg_mb2wchar((unsigned char *)string,str);
+ str = (pg_wchar *) malloc((strlen(string) + 1) * sizeof(pg_wchar));
+ if (!str)
+ return (REG_ESPACE);
+ (void) pg_mb2wchar((unsigned char *) string, str);
if (g->nstates <= CHAR_BIT * sizeof(states1) && !(eflags & REG_LARGE))
- sts = smatcher(g, str, nmatch, pmatch, eflags);
+ sts = smatcher(g, str, nmatch, pmatch, eflags);
else
- sts = lmatcher(g, str, nmatch, pmatch, eflags);
- free((char *)str);
- return(sts);
+ sts = lmatcher(g, str, nmatch, pmatch, eflags);
+ free((char *) str);
+ return (sts);
-# else
+#else
if (g->nstates <= CHAR_BIT * sizeof(states1) && !(eflags & REG_LARGE))
return smatcher(g, (pg_wchar *) string, nmatch, pmatch, eflags);
diff --git a/src/backend/regex/regfree.c b/src/backend/regex/regfree.c
index aff5f62a9b..1127bd24f8 100644
--- a/src/backend/regex/regfree.c
+++ b/src/backend/regex/regfree.c
@@ -40,7 +40,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)regfree.c 8.3 (Berkeley) 3/20/94";
-#endif /* LIBC_SCCS and not lint */
+#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
#include <stdio.h>
@@ -69,9 +69,8 @@ regex_t *preg;
preg->re_magic = 0; /* mark it invalid */
g->magic = 0; /* mark it invalid */
#ifdef MULTIBYTE
- if (preg->patsave != NULL) {
- free((char *)preg->patsave);
- }
+ if (preg->patsave != NULL)
+ free((char *) preg->patsave);
#endif
if (g->strip != NULL)
free((char *) g->strip);
diff --git a/src/backend/rewrite/locks.c b/src/backend/rewrite/locks.c
index 0d438a3ddc..f57a436420 100644
--- a/src/backend/rewrite/locks.c
+++ b/src/backend/rewrite/locks.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.12 1998/09/01 03:24:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.13 1998/09/01 04:31:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -175,12 +175,12 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
{
Relation ev_rel;
HeapTuple usertup;
- char *evowner;
- RangeTblEntry *rte;
+ char *evowner;
+ RangeTblEntry *rte;
int32 reqperm;
int32 aclcheck_res;
- int i;
- List *l;
+ int i;
+ List *l;
if (locks == NIL)
return;
@@ -188,11 +188,11 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
/*
* Get the usename of the rules event relation owner
*/
- rte = (RangeTblEntry *)nth(rt_index - 1, parsetree->rtable);
+ rte = (RangeTblEntry *) nth(rt_index - 1, parsetree->rtable);
ev_rel = heap_openr(rte->relname);
usertup = SearchSysCacheTuple(USESYSID,
- ObjectIdGetDatum(ev_rel->rd_rel->relowner),
- 0, 0, 0);
+ ObjectIdGetDatum(ev_rel->rd_rel->relowner),
+ 0, 0, 0);
if (!HeapTupleIsValid(usertup))
{
elog(ERROR, "cache lookup for userid %d failed",
@@ -200,29 +200,32 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
}
heap_close(ev_rel);
evowner = nameout(&(((Form_pg_shadow) GETSTRUCT(usertup))->usename));
-
+
/*
* Check all the locks, that should get fired on this query
*/
- foreach (l, locks) {
- RewriteRule *onelock = (RewriteRule *)lfirst(l);
- List *action;
+ foreach(l, locks)
+ {
+ RewriteRule *onelock = (RewriteRule *) lfirst(l);
+ List *action;
/*
* In each lock check every action
*/
- foreach (action, onelock->actions) {
- Query *query = (Query *)lfirst(action);
+ foreach(action, onelock->actions)
+ {
+ Query *query = (Query *) lfirst(action);
/*
- * In each action check every rangetable entry
- * for read/write permission of the event relations
- * owner depending on if it's the result relation
- * (write) or not (read)
+ * In each action check every rangetable entry for read/write
+ * permission of the event relations owner depending on if
+ * it's the result relation (write) or not (read)
*/
- for (i = 2; i < length(query->rtable); i++) {
+ for (i = 2; i < length(query->rtable); i++)
+ {
if (i + 1 == query->resultRelation)
- switch (query->resultRelation) {
+ switch (query->resultRelation)
+ {
case CMD_INSERT:
reqperm = ACL_AP;
break;
@@ -233,19 +236,19 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
else
reqperm = ACL_RD;
- rte = (RangeTblEntry *)nth(i, query->rtable);
- aclcheck_res = pg_aclcheck(rte->relname,
- evowner, reqperm);
- if (aclcheck_res != ACLCHECK_OK) {
- elog(ERROR, "%s: %s",
- rte->relname,
- aclcheck_error_strings[aclcheck_res]);
+ rte = (RangeTblEntry *) nth(i, query->rtable);
+ aclcheck_res = pg_aclcheck(rte->relname,
+ evowner, reqperm);
+ if (aclcheck_res != ACLCHECK_OK)
+ {
+ elog(ERROR, "%s: %s",
+ rte->relname,
+ aclcheck_error_strings[aclcheck_res]);
}
/*
- * So this is allowed due to the permissions
- * of the rules event relation owner. But
- * let's see if the next one too
+ * So this is allowed due to the permissions of the rules
+ * event relation owner. But let's see if the next one too
*/
rte->skipAcl = TRUE;
}
@@ -257,5 +260,3 @@ checkLockPerms(List *locks, Query *parsetree, int rt_index)
*/
return;
}
-
-
diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c
index c055b47dd1..20eff2fbb0 100644
--- a/src/backend/rewrite/rewriteDefine.c
+++ b/src/backend/rewrite/rewriteDefine.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.20 1998/09/01 03:24:54 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.21 1998/09/01 04:31:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -156,6 +156,7 @@ ValidateRule(int event_type,
}
#if 0
+
/*
* on retrieve to class.attribute do instead nothing is converted to
* 'on retrieve to class.attribute do instead retrieve (attribute =
@@ -200,51 +201,55 @@ DefineQueryRewrite(RuleStmt *stmt)
* rules only. And for SELECT events, it expects one non-nothing
* action that is instead. Since we now hand out views and rules
* to regular users, we must deny anything else.
- *
+ *
* I know that I must write a new rewrite handler from scratch
* for 6.5 so we can remove these checks and allow all the rules.
*
- * Jan
+ * Jan
* ----------
*/
if (event_obj->attrs)
elog(ERROR, "attribute level rules currently not supported");
- /*
- eslot_string = strVal(lfirst(event_obj->attrs));
- */
+
+ /*
+ * eslot_string = strVal(lfirst(event_obj->attrs));
+ */
else
eslot_string = NULL;
if (action != NIL)
- foreach (l, action) {
- query = (Query *)lfirst(l);
- if (query->resultRelation == 1) {
- elog(NOTICE, "rule actions on OLD currently not supported");
- elog(ERROR, " use views or triggers instead");
- }
- if (query->resultRelation == 2) {
- elog(NOTICE, "rule actions on NEW currently not supported");
- elog(ERROR, " use triggers instead");
- }
+ foreach(l, action)
+ {
+ query = (Query *) lfirst(l);
+ if (query->resultRelation == 1)
+ {
+ elog(NOTICE, "rule actions on OLD currently not supported");
+ elog(ERROR, " use views or triggers instead");
}
+ if (query->resultRelation == 2)
+ {
+ elog(NOTICE, "rule actions on NEW currently not supported");
+ elog(ERROR, " use triggers instead");
+ }
+ }
- if (event_type == CMD_SELECT) {
- if (length(action) == 0) {
+ if (event_type == CMD_SELECT)
+ {
+ if (length(action) == 0)
+ {
elog(NOTICE, "instead nothing rules on select currently not supported");
elog(ERROR, " use views instead");
}
- if (length(action) > 1) {
+ if (length(action) > 1)
elog(ERROR, "multiple action rules on select currently not supported");
- }
- query = (Query *)lfirst(action);
- if (!is_instead || query->commandType != CMD_SELECT) {
+ query = (Query *) lfirst(action);
+ if (!is_instead || query->commandType != CMD_SELECT)
elog(ERROR, "only instead-select rules currently supported on select");
- }
}
+
/*
- * This rule is currently allowed - too restricted I know -
- * but women and children first
- * Jan
+ * This rule is currently allowed - too restricted I know - but women
+ * and children first Jan
*/
event_relation = heap_openr(event_obj->relname);
diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c
index 02bbc69a8c..7a4637e91e 100644
--- a/src/backend/rewrite/rewriteHandler.c
+++ b/src/backend/rewrite/rewriteHandler.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.20 1998/08/24 01:37:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.21 1998/09/01 04:31:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,12 +35,10 @@
#include "utils/acl.h"
#include "catalog/pg_shadow.h"
-static void
-ApplyRetrieveRule(Query *parsetree, RewriteRule *rule,
+static void ApplyRetrieveRule(Query *parsetree, RewriteRule *rule,
int rt_index, int relation_level,
Relation relation, int *modified);
-static List *
-fireRules(Query *parsetree, int rt_index, CmdType event,
+static List *fireRules(Query *parsetree, int rt_index, CmdType event,
bool *instead_flag, List *locks, List **qual_products);
static void QueryRewriteSubLink(Node *node);
static List *QueryRewriteOne(Query *parsetree);
@@ -146,21 +144,23 @@ OptimizeRIRRules(List *locks)
static List *
orderRules(List *locks)
{
- List *regular = NIL;
- List *instead_rules = NIL;
- List *instead_qualified = NIL;
- List *i;
+ List *regular = NIL;
+ List *instead_rules = NIL;
+ List *instead_qualified = NIL;
+ List *i;
foreach(i, locks)
{
RewriteRule *rule_lock = (RewriteRule *) lfirst(i);
- if (rule_lock->isInstead) {
+ if (rule_lock->isInstead)
+ {
if (rule_lock->qual == NULL)
instead_rules = lappend(instead_rules, rule_lock);
else
instead_qualified = lappend(instead_qualified, rule_lock);
- } else
+ }
+ else
regular = lappend(regular, rule_lock);
}
regular = nconc(regular, instead_qualified);
@@ -202,7 +202,7 @@ FireRetrieveRulesAtQuery(Query *parsetree,
if ((rt_entry_locks = relation->rd_rules) == NULL)
return NIL;
- locks = matchLocks(CMD_SELECT, rt_entry_locks, rt_index, parsetree);
+ locks = matchLocks(CMD_SELECT, rt_entry_locks, rt_index, parsetree);
/* find all retrieve instead */
foreach(i, locks)
@@ -313,7 +313,7 @@ ApplyRetrieveRule(Query *parsetree,
OffsetVarNodes(rule_action->qual, rt_length);
OffsetVarNodes((Node *) rule_action->targetList, rt_length);
OffsetVarNodes(rule_qual, rt_length);
-
+
OffsetVarNodes((Node *) rule_action->groupClause, rt_length);
OffsetVarNodes((Node *) rule_action->havingQual, rt_length);
@@ -330,24 +330,29 @@ ApplyRetrieveRule(Query *parsetree,
if (relation_level)
{
- HandleViewRule(parsetree, rtable, rule_action->targetList, rt_index,
- modified);
+ HandleViewRule(parsetree, rtable, rule_action->targetList, rt_index,
+ modified);
}
else
{
- HandleRIRAttributeRule(parsetree, rtable, rule_action->targetList,
- rt_index, rule->attrno, modified, &badsql);
+ HandleRIRAttributeRule(parsetree, rtable, rule_action->targetList,
+ rt_index, rule->attrno, modified, &badsql);
+ }
+ if (*modified && !badsql)
+ {
+ AddQual(parsetree, rule_action->qual);
+
+ /*
+ * This will only work if the query made to the view defined by
+ * the following groupClause groups by the same attributes or does
+ * not use group at all!
+ */
+ if (parsetree->groupClause == NULL)
+ parsetree->groupClause = rule_action->groupClause;
+ AddHavingQual(parsetree, rule_action->havingQual);
+ parsetree->hasAggs = (rule_action->hasAggs || parsetree->hasAggs);
+ parsetree->hasSubLinks = (rule_action->hasSubLinks || parsetree->hasSubLinks);
}
- if (*modified && !badsql) {
- AddQual(parsetree, rule_action->qual);
- /* This will only work if the query made to the view defined by the following
- * groupClause groups by the same attributes or does not use group at all! */
- if (parsetree->groupClause == NULL)
- parsetree->groupClause=rule_action->groupClause;
- AddHavingQual(parsetree, rule_action->havingQual);
- parsetree->hasAggs = (rule_action->hasAggs || parsetree->hasAggs);
- parsetree->hasSubLinks = (rule_action->hasSubLinks || parsetree->hasSubLinks);
- }
}
static List *
@@ -382,9 +387,8 @@ ProcessRetrieveQuery(Query *parsetree,
rule);
}
heap_close(rt_entry_relation);
- if (*instead_flag) {
+ if (*instead_flag)
return result;
- }
}
if (rule)
return NIL;
@@ -465,7 +469,7 @@ CopyAndAddQual(Query *parsetree,
* with rule qualification save the original parsetree
* and add their negated qualification to it. Real instead
* rules finally throw away the original parsetree.
- *
+ *
* remember: reality is for dead birds -- glass
*
*/
@@ -504,22 +508,22 @@ fireRules(Query *parsetree,
bool orig_instead_flag = *instead_flag;
/*
- * Instead rules change the resultRelation of the
- * query. So the permission checks on the initial
- * resultRelation would never be done (this is
- * normally done in the executor deep down). So
- * we must do it here. The result relations resulting
- * from earlier rewrites are already checked against
- * the rules eventrelation owner (during matchLocks)
- * and have the skipAcl flag set.
+ * Instead rules change the resultRelation of the query. So the
+ * permission checks on the initial resultRelation would never be
+ * done (this is normally done in the executor deep down). So we
+ * must do it here. The result relations resulting from earlier
+ * rewrites are already checked against the rules eventrelation
+ * owner (during matchLocks) and have the skipAcl flag set.
*/
- if (rule_lock->isInstead &&
- parsetree->commandType != CMD_SELECT) {
- RangeTblEntry *rte;
+ if (rule_lock->isInstead &&
+ parsetree->commandType != CMD_SELECT)
+ {
+ RangeTblEntry *rte;
int32 acl_rc;
int32 reqperm;
- switch (parsetree->commandType) {
+ switch (parsetree->commandType)
+ {
case CMD_INSERT:
reqperm = ACL_AP;
break;
@@ -527,16 +531,18 @@ fireRules(Query *parsetree,
reqperm = ACL_WR;
break;
}
-
- rte = (RangeTblEntry *)nth(parsetree->resultRelation - 1,
- parsetree->rtable);
- if (!rte->skipAcl) {
+
+ rte = (RangeTblEntry *) nth(parsetree->resultRelation - 1,
+ parsetree->rtable);
+ if (!rte->skipAcl)
+ {
acl_rc = pg_aclcheck(rte->relname,
- GetPgUserName(), reqperm);
- if (acl_rc != ACLCHECK_OK) {
+ GetPgUserName(), reqperm);
+ if (acl_rc != ACLCHECK_OK)
+ {
elog(ERROR, "%s: %s",
- rte->relname,
- aclcheck_error_strings[acl_rc]);
+ rte->relname,
+ aclcheck_error_strings[acl_rc]);
}
}
}
@@ -545,9 +551,10 @@ fireRules(Query *parsetree,
*instead_flag = rule_lock->isInstead;
event_qual = rule_lock->qual;
actions = rule_lock->actions;
- if (event_qual != NULL && *instead_flag) {
- Query *qual_product;
- RewriteInfo qual_info;
+ if (event_qual != NULL && *instead_flag)
+ {
+ Query *qual_product;
+ RewriteInfo qual_info;
/* ----------
* If there are instead rules with qualifications,
@@ -561,21 +568,20 @@ fireRules(Query *parsetree,
* list after we mangled it up enough.
* ----------
*/
- if (*qual_products == NIL) {
+ if (*qual_products == NIL)
qual_product = parsetree;
- } else {
- qual_product = (Query *)nth(0, *qual_products);
- }
+ else
+ qual_product = (Query *) nth(0, *qual_products);
- qual_info.event = qual_product->commandType;
- qual_info.new_varno = length(qual_product->rtable) + 2;
- qual_product = CopyAndAddQual(qual_product,
- actions,
- event_qual,
- rt_index,
- event);
-
- qual_info.rule_action = qual_product;
+ qual_info.event = qual_product->commandType;
+ qual_info.new_varno = length(qual_product->rtable) + 2;
+ qual_product = CopyAndAddQual(qual_product,
+ actions,
+ event_qual,
+ rt_index,
+ event);
+
+ qual_info.rule_action = qual_product;
if (event == CMD_INSERT || event == CMD_UPDATE)
FixNew(&qual_info, qual_product);
@@ -658,9 +664,8 @@ fireRules(Query *parsetree,
* throw away an eventually saved 'default' parsetree
* ----------
*/
- if (event_qual == NULL && *instead_flag) {
+ if (event_qual == NULL && *instead_flag)
*qual_products = NIL;
- }
}
return results;
}
@@ -682,19 +687,21 @@ RewritePreprocessQuery(Query *parsetree)
* from the rewritten query.
* ----------
*/
- if (parsetree->resultRelation > 0) {
- RangeTblEntry *rte;
+ if (parsetree->resultRelation > 0)
+ {
+ RangeTblEntry *rte;
Relation rd;
- List *tl;
- TargetEntry *tle;
- int resdomno;
-
- rte = (RangeTblEntry *)nth(parsetree->resultRelation - 1,
- parsetree->rtable);
+ List *tl;
+ TargetEntry *tle;
+ int resdomno;
+
+ rte = (RangeTblEntry *) nth(parsetree->resultRelation - 1,
+ parsetree->rtable);
rd = heap_openr(rte->relname);
- foreach (tl, parsetree->targetList) {
- tle = (TargetEntry *)lfirst(tl);
+ foreach(tl, parsetree->targetList)
+ {
+ tle = (TargetEntry *) lfirst(tl);
resdomno = attnameAttNum(rd, tle->resdom->resname);
tle->resdom->resno = resdomno;
}
@@ -713,19 +720,19 @@ RewritePreprocessQuery(Query *parsetree)
static Query *
RewritePostprocessNonSelect(Query *parsetree)
{
- List *rt;
- int rt_index = 0;
- Query *newtree = copyObject(parsetree);
-
+ List *rt;
+ int rt_index = 0;
+ Query *newtree = copyObject(parsetree);
+
foreach(rt, parsetree->rtable)
{
- RangeTblEntry *rt_entry = lfirst(rt);
+ RangeTblEntry *rt_entry = lfirst(rt);
Relation rt_entry_relation = NULL;
- RuleLock *rt_entry_locks = NULL;
- List *locks = NIL;
- List *instead_locks = NIL;
- List *lock;
- RewriteRule *rule;
+ RuleLock *rt_entry_locks = NULL;
+ List *locks = NIL;
+ List *instead_locks = NIL;
+ List *lock;
+ RewriteRule *rule;
rt_index++;
rt_entry_relation = heap_openr(rt_entry->relname);
@@ -733,7 +740,8 @@ RewritePostprocessNonSelect(Query *parsetree)
if (rt_entry_locks)
{
- int origcmdtype = newtree->commandType;
+ int origcmdtype = newtree->commandType;
+
newtree->commandType = CMD_SELECT;
locks =
matchLocks(CMD_SELECT, rt_entry_locks, rt_index, newtree);
@@ -741,28 +749,29 @@ RewritePostprocessNonSelect(Query *parsetree)
}
if (locks != NIL)
{
- foreach (lock, locks) {
- rule = (RewriteRule *)lfirst(lock);
- if (rule->isInstead) {
+ foreach(lock, locks)
+ {
+ rule = (RewriteRule *) lfirst(lock);
+ if (rule->isInstead)
instead_locks = nconc(instead_locks, lock);
- }
}
}
if (instead_locks != NIL)
{
- foreach (lock, instead_locks) {
- int relation_level;
- int modified = 0;
+ foreach(lock, instead_locks)
+ {
+ int relation_level;
+ int modified = 0;
- rule = (RewriteRule *)lfirst(lock);
+ rule = (RewriteRule *) lfirst(lock);
relation_level = (rule->attrno == -1);
ApplyRetrieveRule(newtree,
- rule,
- rt_index,
- relation_level,
- rt_entry_relation,
- &modified);
+ rule,
+ rt_index,
+ relation_level,
+ rt_entry_relation,
+ &modified);
}
}
@@ -813,6 +822,7 @@ RewriteQuery(Query *parsetree, bool *instead_flag, List **qual_products)
{
List *locks =
matchLocks(event, rt_entry_locks, result_relation, parsetree);
+
product_queries =
fireRules(parsetree,
result_relation,
@@ -829,16 +839,18 @@ RewriteQuery(Query *parsetree, bool *instead_flag, List **qual_products)
* So we care for them here.
* ----------
*/
- if (product_queries != NIL) {
- List *pq;
- Query *tmp;
- List *new_products = NIL;
-
- foreach (pq, product_queries) {
- tmp = (Query *)lfirst(pq);
+ if (product_queries != NIL)
+ {
+ List *pq;
+ Query *tmp;
+ List *new_products = NIL;
+
+ foreach(pq, product_queries)
+ {
+ tmp = (Query *) lfirst(pq);
tmp = RewritePostprocessNonSelect(tmp);
new_products = lappend(new_products, tmp);
- }
+ }
product_queries = new_products;
}
@@ -937,7 +949,7 @@ QueryRewriteSubLink(Node *node)
* SubLink we don't process it as part of this loop.
*/
QueryRewriteSubLink((Node *) query->qual);
-
+
QueryRewriteSubLink((Node *) query->havingQual);
ret = QueryRewriteOne(query);
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c
index 83b6c9f5c5..14e1c79656 100644
--- a/src/backend/rewrite/rewriteManip.c
+++ b/src/backend/rewrite/rewriteManip.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.16 1998/09/01 03:24:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.17 1998/09/01 04:31:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,8 +28,7 @@
#include "nodes/plannodes.h"
#include "optimizer/clauses.h"
-static void
-ResolveNew(RewriteInfo *info, List *targetlist,
+static void ResolveNew(RewriteInfo *info, List *targetlist,
Node **node, int sublevels_up);
@@ -55,14 +54,18 @@ OffsetVarNodes(Node *node, int offset)
OffsetVarNodes(agg->target, offset);
}
break;
- /* This has to be done to make queries using groupclauses work on views */
- case T_GroupClause:
- {
- GroupClause *group = (GroupClause *) node;
-
- OffsetVarNodes((Node *)(group->entry), offset);
+
+ /*
+ * This has to be done to make queries using groupclauses work
+ * on views
+ */
+ case T_GroupClause:
+ {
+ GroupClause *group = (GroupClause *) node;
+
+ OffsetVarNodes((Node *) (group->entry), offset);
}
- break;
+ break;
case T_Expr:
{
Expr *expr = (Expr *) node;
@@ -90,16 +93,20 @@ OffsetVarNodes(Node *node, int offset)
{
SubLink *sublink = (SubLink *) node;
- /* We also have to adapt the variables used in sublink->lefthand
- * and sublink->oper */
- OffsetVarNodes((Node *)(sublink->lefthand), offset);
-
- /* Make sure the first argument of sublink->oper points to the
- * same var as sublink->lefthand does otherwise we will
- * run into troubles using aggregates (aggno will not be
- * set correctly) */
- lfirst(((Expr *) lfirst(sublink->oper))->args) =
- lfirst(sublink->lefthand);
+ /*
+ * We also have to adapt the variables used in
+ * sublink->lefthand and sublink->oper
+ */
+ OffsetVarNodes((Node *) (sublink->lefthand), offset);
+
+ /*
+ * Make sure the first argument of sublink->oper points to
+ * the same var as sublink->lefthand does otherwise we
+ * will run into troubles using aggregates (aggno will not
+ * be set correctly)
+ */
+ lfirst(((Expr *) lfirst(sublink->oper))->args) =
+ lfirst(sublink->lefthand);
}
break;
default:
@@ -129,15 +136,19 @@ ChangeVarNodes(Node *node, int old_varno, int new_varno, int sublevels_up)
ChangeVarNodes(agg->target, old_varno, new_varno, sublevels_up);
}
break;
- /* This has to be done to make queries using groupclauses work on views */
- case T_GroupClause:
- {
- GroupClause *group = (GroupClause *) node;
-
- ChangeVarNodes((Node *)(group->entry),old_varno, new_varno,
- sublevels_up);
+
+ /*
+ * This has to be done to make queries using groupclauses work
+ * on views
+ */
+ case T_GroupClause:
+ {
+ GroupClause *group = (GroupClause *) node;
+
+ ChangeVarNodes((Node *) (group->entry), old_varno, new_varno,
+ sublevels_up);
}
- break;
+ break;
case T_Expr:
{
@@ -156,8 +167,9 @@ ChangeVarNodes(Node *node, int old_varno, int new_varno, int sublevels_up)
var->varno = new_varno;
var->varnoold = new_varno;
}
- if (var->varlevelsup > 0) OffsetVarNodes((Node *)var,3);
-
+ if (var->varlevelsup > 0)
+ OffsetVarNodes((Node *) var, 3);
+
}
break;
case T_List:
@@ -176,17 +188,24 @@ ChangeVarNodes(Node *node, int old_varno, int new_varno, int sublevels_up)
ChangeVarNodes((Node *) query->qual, old_varno, new_varno,
sublevels_up + 1);
- /* We also have to adapt the variables used in sublink->lefthand
- * and sublink->oper */
+ /*
+ * We also have to adapt the variables used in
+ * sublink->lefthand and sublink->oper
+ */
ChangeVarNodes((Node *) (sublink->lefthand), old_varno, new_varno,
sublevels_up);
-
- /* Make sure the first argument of sublink->oper points to the
- * same var as sublink->lefthand does otherwise we will
- * run into troubles using aggregates (aggno will not be
- * set correctly */
- /* lfirst(((Expr *) lfirst(sublink->oper))->args) =
- lfirst(sublink->lefthand); */
+
+ /*
+ * Make sure the first argument of sublink->oper points to
+ * the same var as sublink->lefthand does otherwise we
+ * will run into troubles using aggregates (aggno will not
+ * be set correctly
+ */
+
+ /*
+ * lfirst(((Expr *) lfirst(sublink->oper))->args) =
+ * lfirst(sublink->lefthand);
+ */
}
break;
default:
@@ -218,7 +237,8 @@ AddQual(Query *parsetree, Node *qual)
void
AddHavingQual(Query *parsetree, Node *havingQual)
{
- Node *copy, *old;
+ Node *copy,
+ *old;
if (havingQual == NULL)
return;
@@ -553,18 +573,22 @@ nodeHandleViewRule(Node **nodePtr,
Aggreg *agg = (Aggreg *) node;
nodeHandleViewRule(&(agg->target), rtable, targetlist,
- rt_index, modified, sublevels_up);
+ rt_index, modified, sublevels_up);
}
break;
- /* This has to be done to make queries using groupclauses work on views */
- case T_GroupClause:
- {
- GroupClause *group = (GroupClause *) node;
-
- nodeHandleViewRule((Node **) (&(group->entry)), rtable, targetlist,
- rt_index, modified, sublevels_up);
+
+ /*
+ * This has to be done to make queries using groupclauses work
+ * on views
+ */
+ case T_GroupClause:
+ {
+ GroupClause *group = (GroupClause *) node;
+
+ nodeHandleViewRule((Node **) (&(group->entry)), rtable, targetlist,
+ rt_index, modified, sublevels_up);
}
- break;
+ break;
case T_Expr:
{
Expr *expr = (Expr *) node;
@@ -580,40 +604,39 @@ nodeHandleViewRule(Node **nodePtr,
int this_varno = var->varno;
int this_varlevelsup = var->varlevelsup;
Node *n;
-
+
if (this_varno == rt_index &&
- this_varlevelsup == sublevels_up)
- {
- n = FindMatchingTLEntry(targetlist,
- get_attname(getrelid(this_varno,
- rtable),
- var->varattno));
- if (n == NULL)
- {
- *nodePtr = make_null(((Var *) node)->vartype);
- }
-
- else
- /* This is a hack: The varlevelsup of the orignal
- * variable and the new one should be the same.
- * Normally we adapt the node by changing a pointer
- * to point to a var contained in 'targetlist'.
- * In the targetlist all varlevelsups are 0
- * so if we want to change it to the original value
- * we have to copy the node before! (Maybe this will
- * cause troubles with some sophisticated queries on
- * views?) */
- {
- if(this_varlevelsup>0){
- *nodePtr = copyObject(n);
- }
- else {
- *nodePtr = n;
+ this_varlevelsup == sublevels_up)
+ {
+ n = FindMatchingTLEntry(targetlist,
+ get_attname(getrelid(this_varno,
+ rtable),
+ var->varattno));
+ if (n == NULL)
+ *nodePtr = make_null(((Var *) node)->vartype);
+
+ else
+
+ /*
+ * This is a hack: The varlevelsup of the orignal
+ * variable and the new one should be the same.
+ * Normally we adapt the node by changing a
+ * pointer to point to a var contained in
+ * 'targetlist'. In the targetlist all
+ * varlevelsups are 0 so if we want to change it
+ * to the original value we have to copy the node
+ * before! (Maybe this will cause troubles with
+ * some sophisticated queries on views?)
+ */
+ {
+ if (this_varlevelsup > 0)
+ *nodePtr = copyObject(n);
+ else
+ *nodePtr = n;
+ ((Var *) *nodePtr)->varlevelsup = this_varlevelsup;
}
- ((Var *)*nodePtr)->varlevelsup = this_varlevelsup;
- }
- *modified = TRUE;
- }
+ *modified = TRUE;
+ }
break;
}
case T_List:
@@ -634,20 +657,24 @@ nodeHandleViewRule(Node **nodePtr,
Query *query = (Query *) sublink->subselect;
nodeHandleViewRule((Node **) &(query->qual), rtable, targetlist,
- rt_index, modified, sublevels_up + 1);
-
- /* We also have to adapt the variables used in sublink->lefthand
- * and sublink->oper */
- nodeHandleViewRule((Node **) &(sublink->lefthand), rtable,
- targetlist, rt_index, modified, sublevels_up);
-
- /* Make sure the first argument of sublink->oper points to the
- * same var as sublink->lefthand does otherwise we will
- * run into troubles using aggregates (aggno will not be
- * set correctly */
+ rt_index, modified, sublevels_up + 1);
+
+ /*
+ * We also have to adapt the variables used in
+ * sublink->lefthand and sublink->oper
+ */
+ nodeHandleViewRule((Node **) &(sublink->lefthand), rtable,
+ targetlist, rt_index, modified, sublevels_up);
+
+ /*
+ * Make sure the first argument of sublink->oper points to
+ * the same var as sublink->lefthand does otherwise we
+ * will run into troubles using aggregates (aggno will not
+ * be set correctly
+ */
pfree(lfirst(((Expr *) lfirst(sublink->oper))->args));
- lfirst(((Expr *) lfirst(sublink->oper))->args) =
- lfirst(sublink->lefthand);
+ lfirst(((Expr *) lfirst(sublink->oper))->args) =
+ lfirst(sublink->lefthand);
}
break;
default:
@@ -667,10 +694,13 @@ HandleViewRule(Query *parsetree,
modified, 0);
nodeHandleViewRule((Node **) (&(parsetree->targetList)), rtable, targetlist,
rt_index, modified, 0);
- /* The variables in the havingQual and groupClause also have to be adapted */
+
+ /*
+ * The variables in the havingQual and groupClause also have to be
+ * adapted
+ */
nodeHandleViewRule(&parsetree->havingQual, rtable, targetlist, rt_index,
modified, 0);
nodeHandleViewRule((Node **) (&(parsetree->groupClause)), rtable, targetlist, rt_index,
modified, 0);
}
-
diff --git a/src/backend/rewrite/rewriteRemove.c b/src/backend/rewrite/rewriteRemove.c
index eaa4e0112c..244d9b181d 100644
--- a/src/backend/rewrite/rewriteRemove.c
+++ b/src/backend/rewrite/rewriteRemove.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.17 1998/09/01 03:24:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.18 1998/09/01 04:31:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,15 +36,15 @@ RewriteGetRuleEventRel(char *rulename)
Oid eventrel;
htup = SearchSysCacheTuple(REWRITENAME,
- PointerGetDatum(rulename),
- 0, 0, 0);
+ PointerGetDatum(rulename),
+ 0, 0, 0);
if (!HeapTupleIsValid(htup))
elog(ERROR, "RewriteGetRuleEventRel: rule \"%s\" not found",
rulename);
eventrel = ((Form_pg_rewrite) GETSTRUCT(htup))->ev_class;
htup = SearchSysCacheTuple(RELOID,
- PointerGetDatum(eventrel),
- 0, 0, 0);
+ PointerGetDatum(eventrel),
+ 0, 0, 0);
if (!HeapTupleIsValid(htup))
elog(ERROR, "RewriteGetRuleEventRel: class %d not found",
eventrel);
@@ -87,6 +87,7 @@ RemoveRewriteRule(char *ruleName)
tuple = SearchSysCacheTupleCopy(REWRITENAME,
PointerGetDatum(ruleName),
0, 0, 0);
+
/*
* complain if no rule with such name existed
*/
@@ -101,10 +102,10 @@ RemoveRewriteRule(char *ruleName)
* relation's OID
*/
ruleId = tuple->t_oid;
- eventRelationOidDatum = heap_getattr(tuple,
- Anum_pg_rewrite_ev_class,
- RelationGetDescr(RewriteRelation),
- &isNull);
+ eventRelationOidDatum = heap_getattr(tuple,
+ Anum_pg_rewrite_ev_class,
+ RelationGetDescr(RewriteRelation),
+ &isNull);
if (isNull)
{
/* XXX strange!!! */
diff --git a/src/backend/rewrite/rewriteSupport.c b/src/backend/rewrite/rewriteSupport.c
index 035c92f52f..59d8117283 100644
--- a/src/backend/rewrite/rewriteSupport.c
+++ b/src/backend/rewrite/rewriteSupport.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.27 1998/09/01 03:24:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.28 1998/09/01 04:31:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -99,8 +99,9 @@ IsDefinedRewriteRule(char *ruleName)
RewriteRelation = heap_openr(RewriteRelationName);
tuple = SearchSysCacheTuple(REWRITENAME,
- PointerGetDatum(ruleName),
- 0, 0, 0);
+ PointerGetDatum(ruleName),
+ 0, 0, 0);
+
/*
* return whether or not the rewrite rule existed
*/
@@ -121,12 +122,12 @@ setRelhasrulesInRelation(Oid relationId, bool relhasrules)
* lock to it.
*/
tuple = SearchSysCacheTupleCopy(RELOID,
- ObjectIdGetDatum(relationId),
- 0, 0, 0);
+ ObjectIdGetDatum(relationId),
+ 0, 0, 0);
Assert(HeapTupleIsValid(tuple));
relationRelation = heap_openr(RelationRelationName);
- ((Form_pg_class)GETSTRUCT(tuple))->relhasrules = relhasrules;
+ ((Form_pg_class) GETSTRUCT(tuple))->relhasrules = relhasrules;
heap_replace(relationRelation, &tuple->t_ctid, tuple);
/* keep the catalog indices up to date */
diff --git a/src/backend/storage/buffer/buf_init.c b/src/backend/storage/buffer/buf_init.c
index 64eb13688f..975e999ec2 100644
--- a/src/backend/storage/buffer/buf_init.c
+++ b/src/backend/storage/buffer/buf_init.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.18 1998/06/27 15:47:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_init.c,v 1.19 1998/09/01 04:31:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -48,7 +48,7 @@ bmtrace *TraceBuf;
long *CurTraceBuf;
#define BMT_LIMIT 200
-#endif /* BMTRACE */
+#endif /* BMTRACE */
int ShowPinTrace = 0;
int NBuffers = NDBUFS; /* NDBUFS defined in miscadmin.h */
@@ -278,7 +278,7 @@ BufferShmemSize()
nsegs = 1 << (int) my_log2((nbuckets - 1) / DEF_SEGSIZE + 1);
/* size of shmem index table */
- size += MAXALIGN(my_log2(SHMEM_INDEX_SIZE) * sizeof(void *)); /* HTAB->dir */
+ size += MAXALIGN(my_log2(SHMEM_INDEX_SIZE) * sizeof(void *)); /* HTAB->dir */
size += MAXALIGN(sizeof(HHDR)); /* HTAB->hctl */
size += MAXALIGN(DEF_SEGSIZE * sizeof(SEGMENT));
size += BUCKET_ALLOC_INCR *
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 837b02dbf1..f283887eb0 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.42 1998/09/01 03:25:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.43 1998/09/01 04:31:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -87,13 +87,11 @@ static void WaitIO(BufferDesc *buf, SPINLOCK spinlock);
static void SignalIO(BufferDesc *buf);
extern long *NWaitIOBackendP; /* defined in buf_init.c */
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
-static Buffer
-ReadBufferWithBufferLock(Relation relation, BlockNumber blockNum,
+static Buffer ReadBufferWithBufferLock(Relation relation, BlockNumber blockNum,
bool bufferLockHeld);
-static BufferDesc *
-BufferAlloc(Relation reln, BlockNumber blockNum,
+static BufferDesc *BufferAlloc(Relation reln, BlockNumber blockNum,
bool *foundPtr, bool bufferLockHeld);
static int FlushBuffer(Buffer buffer, bool release);
static void BufferSync(void);
@@ -119,8 +117,8 @@ RelationGetBufferWithBuffer(Relation relation,
{
if (!BufferIsLocal(buffer))
{
- LockRelId *lrelId = &(((LockInfo)(relation->lockInfo))->lockRelId);
-
+ LockRelId *lrelId = &(((LockInfo) (relation->lockInfo))->lockRelId);
+
bufHdr = &BufferDescriptors[buffer - 1];
SpinAcquire(BufMgrLock);
if (bufHdr->tag.blockNum == blockNumber &&
@@ -417,7 +415,7 @@ BufferAlloc(Relation reln,
}
#ifdef BMTRACE
_bm_trace((reln->rd_rel->relisshared ? 0 : MyDatabaseId), RelationGetRelid(reln), blockNum, BufferDescriptorGetBuffer(buf), BMT_ALLOCFND);
-#endif /* BMTRACE */
+#endif /* BMTRACE */
SpinRelease(BufMgrLock);
@@ -480,7 +478,7 @@ BufferAlloc(Relation reln,
*/
Assert(S_LOCK_FREE(&(buf->io_in_progress_lock)));
S_LOCK(&(buf->io_in_progress_lock));
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
/*
* Write the buffer out, being careful to release BufMgrLock
@@ -493,7 +491,7 @@ BufferAlloc(Relation reln,
smok = BufferReplace(buf, true);
#ifndef OPTIMIZE_SINGLE
SpinAcquire(BufMgrLock);
-#endif /* OPTIMIZE_SINGLE */
+#endif /* OPTIMIZE_SINGLE */
if (smok == FALSE)
{
@@ -507,7 +505,7 @@ BufferAlloc(Relation reln,
#else /* !HAS_TEST_AND_SET */
if (buf->refcount > 1)
SignalIO(buf);
-#endif /* !HAS_TEST_AND_SET */
+#endif /* !HAS_TEST_AND_SET */
PrivateRefCount[BufferDescriptorGetBuffer(buf) - 1] = 0;
buf->refcount--;
if (buf->refcount == 0)
@@ -553,7 +551,7 @@ BufferAlloc(Relation reln,
#else /* !HAS_TEST_AND_SET */
if (buf->refcount > 1)
SignalIO(buf);
-#endif /* !HAS_TEST_AND_SET */
+#endif /* !HAS_TEST_AND_SET */
PrivateRefCount[BufferDescriptorGetBuffer(buf) - 1] = 0;
buf->refcount--;
buf = (BufferDesc *) NULL;
@@ -583,7 +581,7 @@ BufferAlloc(Relation reln,
#else /* !HAS_TEST_AND_SET */
if (buf->refcount > 1)
SignalIO(buf);
-#endif /* !HAS_TEST_AND_SET */
+#endif /* !HAS_TEST_AND_SET */
/* give up the buffer since we don't need it any more */
buf->refcount--;
@@ -656,12 +654,12 @@ BufferAlloc(Relation reln,
#ifdef HAS_TEST_AND_SET
Assert(S_LOCK_FREE(&(buf->io_in_progress_lock)));
S_LOCK(&(buf->io_in_progress_lock));
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
}
#ifdef BMTRACE
_bm_trace((reln->rd_rel->relisshared ? 0 : MyDatabaseId), RelationGetRelid(reln), blockNum, BufferDescriptorGetBuffer(buf), BMT_ALLOCNOTFND);
-#endif /* BMTRACE */
+#endif /* BMTRACE */
SpinRelease(BufMgrLock);
@@ -1018,7 +1016,7 @@ BufferSync()
#ifndef OPTIMIZE_SINGLE
SpinRelease(BufMgrLock);
-#endif /* OPTIMIZE_SINGLE */
+#endif /* OPTIMIZE_SINGLE */
if (reln == (Relation) NULL)
{
status = smgrblindwrt(DEFAULT_SMGR, bufHdr->sb_dbname,
@@ -1034,7 +1032,7 @@ BufferSync()
}
#ifndef OPTIMIZE_SINGLE
SpinAcquire(BufMgrLock);
-#endif /* OPTIMIZE_SINGLE */
+#endif /* OPTIMIZE_SINGLE */
UnpinBuffer(bufHdr);
if (status == SM_FAIL)
@@ -1129,7 +1127,7 @@ SignalIO(BufferDesc *buf)
*NWaitIOBackendP = 0;
}
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
long NDirectFileRead; /* some I/O's are direct file access.
* bypass bufmgr */
@@ -1575,7 +1573,7 @@ BlowawayRelationBuffers(Relation rel, BlockNumber block)
if (buf->flags & BM_DIRTY)
{
elog(NOTICE, "BlowawayRelationBuffers(%s (local), %u): block %u is dirty",
- rel->rd_rel->relname.data, block, buf->tag.blockNum);
+ rel->rd_rel->relname.data, block, buf->tag.blockNum);
return -1;
}
if (LocalRefCount[i] > 0)
@@ -1888,7 +1886,7 @@ _bm_die(Oid dbId, Oid relId, int blkNo, int bufNo,
kill(getpid(), SIGILL);
}
-#endif /* BMTRACE */
+#endif /* BMTRACE */
void
BufferRefCountReset(int *refcountsave)
diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c
index 421bce86e2..8b853ec7c6 100644
--- a/src/backend/storage/buffer/freelist.c
+++ b/src/backend/storage/buffer/freelist.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.12 1998/09/01 03:25:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.13 1998/09/01 04:31:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,7 +68,7 @@ AddBufferToFreelist(BufferDesc *bf)
#ifdef BMTRACE
_bm_trace(bf->tag.relId.dbId, bf->tag.relId.relId, bf->tag.blockNum,
BufferDescriptorGetBuffer(bf), BMT_DEALLOC);
-#endif /* BMTRACE */
+#endif /* BMTRACE */
NotInQueue(bf);
/* change bf so it points to inFrontOfNew and its successor */
diff --git a/src/backend/storage/buffer/s_lock.c b/src/backend/storage/buffer/s_lock.c
index 23bc0ec2c4..84b9868bc0 100644
--- a/src/backend/storage/buffer/s_lock.c
+++ b/src/backend/storage/buffer/s_lock.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.8 1998/06/16 07:18:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.9 1998/09/01 04:31:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,12 +27,12 @@
* granularity.
* note: total time to cycle through all 16 entries might be about .07 sec.
*/
-#define S_NSPINCYCLE 20
-#define S_MAX_BUSY 500 * S_NSPINCYCLE
+#define S_NSPINCYCLE 20
+#define S_MAX_BUSY 500 * S_NSPINCYCLE
-int s_spincycle[S_NSPINCYCLE] =
-{ 0, 0, 0, 0, 10000, 0, 0, 0, 10000, 0,
- 0, 10000, 0, 0, 10000, 0, 10000, 0, 10000, 10000
+int s_spincycle[S_NSPINCYCLE] =
+{0, 0, 0, 0, 10000, 0, 0, 0, 10000, 0,
+ 0, 10000, 0, 0, 10000, 0, 10000, 0, 10000, 10000
};
@@ -111,11 +111,12 @@ success: \n\
blr \n\
");
}
-#endif /* PPC */
+#endif /* PPC */
-#else /* defined(__GNUC__) */
+
+#else /* defined(__GNUC__) */
/***************************************************************************
* All non gcc
*/
@@ -124,7 +125,8 @@ success: \n\
#if defined(sun3)
static void
-tas_dummy() /* really means: extern int tas(slock_t *lock); */
+tas_dummy() /* really means: extern int tas(slock_t
+ * *lock); */
{
asm("LLA0:");
asm(" .data");
@@ -143,7 +145,8 @@ tas_dummy() /* really means: extern int tas(slock_t *lock); */
asm(" rts");
asm(" .data");
}
-#endif /* sun3 */
+
+#endif /* sun3 */
@@ -152,11 +155,13 @@ tas_dummy() /* really means: extern int tas(slock_t *lock); */
* sparc machines not using gcc
*/
static void
-tas_dummy() /* really means: extern int tas(slock_t *lock); */
+tas_dummy() /* really means: extern int tas(slock_t
+ * *lock); */
{
asm(".seg \"data\"");
asm(".seg \"text\"");
asm("_tas:");
+
/*
* Sparc atomic test and set (sparc calls it "atomic load-store")
*/
@@ -165,18 +170,18 @@ tas_dummy() /* really means: extern int tas(slock_t *lock); */
asm("nop");
}
-#endif /* NEED_SPARC_TAS_ASM */
+#endif /* NEED_SPARC_TAS_ASM */
#if defined(NEED_I386_TAS_ASM)
/* non gcc i386 based things */
-#endif /* NEED_I386_TAS_ASM */
+#endif /* NEED_I386_TAS_ASM */
-#endif /* not __GNUC__ */
+#endif /* not __GNUC__ */
@@ -188,7 +193,7 @@ tas_dummy() /* really means: extern int tas(slock_t *lock); */
* test program for verifying a port.
*/
-volatile slock_t test_lock;
+volatile slock_t test_lock;
void
main()
@@ -219,5 +224,4 @@ main()
}
-#endif /* S_LOCK_TEST */
-
+#endif /* S_LOCK_TEST */
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index 88288c9a5e..3b0824dad4 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Id: fd.c,v 1.33 1998/09/01 03:25:06 momjian Exp $
+ * $Id: fd.c,v 1.34 1998/09/01 04:31:45 momjian Exp $
*
* NOTES:
*
@@ -220,7 +220,7 @@ _dump_lru()
elog(DEBUG, buf);
}
-#endif /* FDDEBUG */
+#endif /* FDDEBUG */
static void
Delete(File file)
diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c
index 48ccd13fba..f266789c88 100644
--- a/src/backend/storage/ipc/ipc.c
+++ b/src/backend/storage/ipc/ipc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.32 1998/09/01 03:25:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.33 1998/09/01 04:31:47 momjian Exp $
*
* NOTES
*
@@ -46,7 +46,7 @@
#include <sys/ipc.h>
#endif
-static int UsePrivateMemory = 0;
+static int UsePrivateMemory = 0;
static void IpcMemoryDetach(int status, char *shmaddr);
@@ -61,9 +61,10 @@ static struct ONEXIT
{
void (*function) ();
caddr_t arg;
-} on_proc_exit_list[MAX_ON_EXITS], on_shmem_exit_list[MAX_ON_EXITS];
+} on_proc_exit_list[MAX_ON_EXITS], on_shmem_exit_list[MAX_ON_EXITS];
-static int on_proc_exit_index, on_shmem_exit_index;
+static int on_proc_exit_index,
+ on_shmem_exit_index;
static void IpcConfigTip(void);
typedef struct _PrivateMemStruct
@@ -116,11 +117,12 @@ proc_exit(int code)
TPRINTF(TRACE_VERBOSE, "proc_exit(%d) [#%d]", code, proc_exit_inprogress);
- /*
- * If proc_exit is called too many times something bad is
- * happenig, so exit immediately.
+ /*
+ * If proc_exit is called too many times something bad is happenig, so
+ * exit immediately.
*/
- if (proc_exit_inprogress > 9) {
+ if (proc_exit_inprogress > 9)
+ {
elog(ERROR, "infinite recursion in proc_exit");
goto exit;
}
@@ -136,7 +138,7 @@ proc_exit(int code)
/* do our shared memory exits first */
shmem_exit(code);
-
+
/* ----------------
* call all the callbacks registered before calling exit().
* ----------------
@@ -166,10 +168,11 @@ shmem_exit(int code)
code, shmem_exit_inprogress);
/*
- * If shmem_exit is called too many times something bad is
- * happenig, so exit immediately.
+ * If shmem_exit is called too many times something bad is happenig,
+ * so exit immediately.
*/
- if (shmem_exit_inprogress > 9) {
+ if (shmem_exit_inprogress > 9)
+ {
elog(ERROR, "infinite recursion in shmem_exit");
exit(-1);
}
@@ -202,7 +205,7 @@ shmem_exit(int code)
* ----------------------------------------------------------------
*/
int
-on_proc_exit(void (*function) (), caddr_t arg)
+ on_proc_exit(void (*function) (), caddr_t arg)
{
if (on_proc_exit_index >= MAX_ON_EXITS)
return -1;
@@ -223,7 +226,7 @@ on_proc_exit(void (*function) (), caddr_t arg)
* ----------------------------------------------------------------
*/
int
-on_shmem_exit(void (*function) (), caddr_t arg)
+ on_shmem_exit(void (*function) (), caddr_t arg)
{
if (on_shmem_exit_index >= MAX_ON_EXITS)
return -1;
@@ -402,7 +405,7 @@ IpcSemaphoreSet(int semId, int semno, int value)
if (errStatus == -1)
{
- EPRINTF("IpcSemaphoreSet: semctl failed (%s) id=%d",
+ EPRINTF("IpcSemaphoreSet: semctl failed (%s) id=%d",
strerror(errno), semId);
}
}
@@ -734,7 +737,7 @@ LockIsFree(int lockid)
#endif
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
static void
IpcConfigTip(void)
diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index f8f45aa436..18b8d718d6 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.30 1998/09/01 03:25:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.31 1998/09/01 04:31:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -76,7 +76,7 @@ unsigned long ShmemBase = 0; /* start and end address of shared memory */
static unsigned long ShmemEnd = 0;
static unsigned long ShmemSize = 0; /* current size (and default) */
-extern VariableCache ShmemVariableCache; /* varsup.c */
+extern VariableCache ShmemVariableCache; /* varsup.c */
SPINLOCK ShmemLock; /* lock for shared memory allocation */
@@ -85,8 +85,9 @@ SPINLOCK ShmemIndexLock; /* lock for shmem index access */
static unsigned long *ShmemFreeStart = NULL; /* pointer to the OFFSET
* of first free shared
* memory */
-static unsigned long *ShmemIndexOffset = NULL; /* start of the shmem index
- * table (for bootstrap) */
+static unsigned long *ShmemIndexOffset = NULL; /* start of the shmem
+ * index table (for
+ * bootstrap) */
static int ShmemBootstrap = FALSE; /* flag becomes true when shared
* mem is created by POSTMASTER */
@@ -155,6 +156,7 @@ InitShmem(unsigned int key, unsigned int size)
item;
bool found;
IpcMemoryId shmid;
+
/* if zero key, use default memory size */
if (size)
ShmemSize = size;
@@ -204,7 +206,7 @@ InitShmem(unsigned int key, unsigned int size)
if (ShmemBootstrap)
{
*ShmemFreeStart = currFreeSpace;
- memset (ShmemVariableCache, 0, sizeof(*ShmemVariableCache));
+ memset(ShmemVariableCache, 0, sizeof(*ShmemVariableCache));
}
/* if ShmemFreeStart is NULL, then the allocator won't work */
@@ -217,8 +219,8 @@ InitShmem(unsigned int key, unsigned int size)
/* This will acquire the shmem index lock, but not release it. */
ShmemIndex = ShmemInitHash("ShmemIndex",
- SHMEM_INDEX_SIZE, SHMEM_INDEX_SIZE,
- &info, hash_flags);
+ SHMEM_INDEX_SIZE, SHMEM_INDEX_SIZE,
+ &info, hash_flags);
if (!ShmemIndex)
{
@@ -248,8 +250,7 @@ InitShmem(unsigned int key, unsigned int size)
{
/*
- * bootstrapping shmem: we have to initialize the shmem index
- * now.
+ * bootstrapping shmem: we have to initialize the shmem index now.
*/
Assert(ShmemBootstrap);
@@ -501,14 +502,16 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
{
#ifdef USE_ASSERT_CHECKING
char *strname = "ShmemIndex";
+
#endif
+
/*
* If the shmem index doesnt exist, we fake it.
*
* If we are creating the first shmem index, then let shmemalloc()
* allocate the space for a new HTAB. Otherwise, find the old one
- * and return that. Notice that the ShmemIndexLock is held until the
- * shmem index has been completely initialized.
+ * and return that. Notice that the ShmemIndexLock is held until
+ * the shmem index has been completely initialized.
*/
Assert(!strcmp(name, strname));
if (ShmemBootstrap)
@@ -545,6 +548,7 @@ ShmemInitStruct(char *name, unsigned long size, bool *foundPtr)
}
else if (*foundPtr)
{
+
/*
* Structure is in the shmem index so someone else has allocated
* it already. The size better be the same as the size we are
@@ -634,23 +638,23 @@ TransactionIdIsInProgress(TransactionId xid)
* placed in array. Current xact ID are never placed there (just
* to reduce its length, xmin/xmax may be equal to cid).
* MyProc->xmin will be setted if equal to InvalidTransactionId.
- *
+ *
* Yet another strange func for this place... - vadim 07/21/98
*/
Snapshot
GetSnapshotData(bool serialized)
{
- Snapshot snapshot = (Snapshot) malloc(sizeof(SnapshotData));
- TransactionId snapshot->xip = (TransactionId*)
- malloc(32 * sizeof(TransactionId));
- ShmemIndexEnt *result;
- PROC *proc;
- TransactionId cid = GetCurrentTransactionId();
- uint count = 0;
- unit free = 31;
+ Snapshot snapshot = (Snapshot) malloc(sizeof(SnapshotData));
+ TransactionId snapshot->xip = (TransactionId *)
+ malloc(32 * sizeof(TransactionId));
+ ShmemIndexEnt *result;
+ PROC *proc;
+ TransactionId cid = GetCurrentTransactionId();
+ uint count = 0;
+ unit free = 31;
Assert(ShmemIndex);
-
+
snapshot->xmax = cid;
snapshot->xmin = cid;
@@ -672,7 +676,7 @@ GetSnapshotData(bool serialized)
continue;
proc = (PROC *) MAKE_PTR(result->location);
if (proc == MyProc || proc->xid < FirstTransactionId ||
- serialized && proc->xid >= cid)
+ serialized && proc->xid >= cid)
continue;
if (proc->xid < snapshot->xmin)
snapshot->xmin = proc->xid;
@@ -680,8 +684,8 @@ GetSnapshotData(bool serialized)
snapshot->xmax = proc->xid;
if (free == 0)
{
- snapshot->xip = (TransactionId*) realloc(snapshot->xip,
- (count + 33) * sizeof(TransactionId));
+ snapshot->xip = (TransactionId *) realloc(snapshot->xip,
+ (count + 33) * sizeof(TransactionId));
free = 32;
}
snapshot->xip[count] = proc->xid;
@@ -695,4 +699,5 @@ GetSnapshotData(bool serialized)
elog(ERROR, "GetSnapshotData: ShmemIndex corrupted");
return NULL;
}
+
#endif
diff --git a/src/backend/storage/ipc/shmqueue.c b/src/backend/storage/ipc/shmqueue.c
index 95ebfd0136..c460beaf90 100644
--- a/src/backend/storage/ipc/shmqueue.c
+++ b/src/backend/storage/ipc/shmqueue.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.8 1998/09/01 03:25:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmqueue.c,v 1.9 1998/09/01 04:31:50 momjian Exp $
*
* NOTES
*
@@ -32,7 +32,7 @@
#define SHMQUEUE_DEBUG_HD /* head inserts */
#define SHMQUEUE_DEBUG_TL /* tail inserts */
#define SHMQUEUE_DEBUG_ELOG NOTICE
-#endif /* SHMQUEUE_DEBUG */
+#endif /* SHMQUEUE_DEBUG */
/*
* ShmemQueueInit -- make the head of a new queue point
@@ -85,14 +85,14 @@ SHMQueueDelete(SHM_QUEUE *queue)
#ifdef SHMQUEUE_DEBUG_DEL
dumpQ(queue, "in SHMQueueDelete: begin");
-#endif /* SHMQUEUE_DEBUG_DEL */
+#endif /* SHMQUEUE_DEBUG_DEL */
prevElem->next = (queue)->next;
nextElem->prev = (queue)->prev;
#ifdef SHMQUEUE_DEBUG_DEL
dumpQ((SHM_QUEUE *) MAKE_PTR(queue->prev), "in SHMQueueDelete: end");
-#endif /* SHMQUEUE_DEBUG_DEL */
+#endif /* SHMQUEUE_DEBUG_DEL */
}
#ifdef SHMQUEUE_DEBUG
@@ -144,7 +144,7 @@ dumpQ(SHM_QUEUE *q, char *s)
elog(SHMQUEUE_DEBUG_ELOG, "%s: %s", s, buf);
}
-#endif /* SHMQUEUE_DEBUG */
+#endif /* SHMQUEUE_DEBUG */
/*
* SHMQueueInsertHD -- put elem in queue between the queue head
@@ -162,7 +162,7 @@ SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
#ifdef SHMQUEUE_DEBUG_HD
dumpQ(queue, "in SHMQueueInsertHD: begin");
-#endif /* SHMQUEUE_DEBUG_HD */
+#endif /* SHMQUEUE_DEBUG_HD */
(elem)->next = prevPtr->next;
(elem)->prev = queue->prev;
@@ -171,7 +171,7 @@ SHMQueueInsertHD(SHM_QUEUE *queue, SHM_QUEUE *elem)
#ifdef SHMQUEUE_DEBUG_HD
dumpQ(queue, "in SHMQueueInsertHD: end");
-#endif /* SHMQUEUE_DEBUG_HD */
+#endif /* SHMQUEUE_DEBUG_HD */
}
#endif
@@ -187,7 +187,7 @@ SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem)
#ifdef SHMQUEUE_DEBUG_TL
dumpQ(queue, "in SHMQueueInsertTL: begin");
-#endif /* SHMQUEUE_DEBUG_TL */
+#endif /* SHMQUEUE_DEBUG_TL */
(elem)->prev = nextPtr->prev;
(elem)->next = queue->next;
@@ -196,7 +196,7 @@ SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem)
#ifdef SHMQUEUE_DEBUG_TL
dumpQ(queue, "in SHMQueueInsertTL: end");
-#endif /* SHMQUEUE_DEBUG_TL */
+#endif /* SHMQUEUE_DEBUG_TL */
}
/*
diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c
index c5c011b5d4..7c4ceaca43 100644
--- a/src/backend/storage/ipc/sinval.c
+++ b/src/backend/storage/ipc/sinval.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.11 1998/08/25 21:31:17 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.12 1998/09/01 04:31:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -157,7 +157,8 @@ RegisterSharedInvalid(int cacheId, /* XXX */
/* should be called by a backend */
/****************************************************************************/
void
-InvalidateSharedInvalid(void (*invalFunction) (), void (*resetFunction) ())
+ InvalidateSharedInvalid(void (*invalFunction) (),
+ void (*resetFunction) ())
{
SpinAcquire(SInvalLock);
SIReadEntryData(shmInvalBuffer, MyBackendId,
diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c
index adfa1757d9..806b780664 100644
--- a/src/backend/storage/ipc/sinvaladt.c
+++ b/src/backend/storage/ipc/sinvaladt.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.14 1998/09/01 03:25:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.15 1998/09/01 04:31:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -88,7 +88,7 @@ SISetActiveProcess(SISeg *segInOutP, BackendId backendId)
int
SIBackendInit(SISeg *segInOutP)
{
- LockRelId LtCreateRelId();
+ LockRelId LtCreateRelId();
TransactionId LMITransactionIdCopy();
Assert(MyBackendTag > 0);
@@ -100,7 +100,7 @@ SIBackendInit(SISeg *segInOutP)
#ifdef INVALIDDEBUG
elog(DEBUG, "SIBackendInit: backend tag %d; backend id %d.",
MyBackendTag, MyBackendId);
-#endif /* INVALIDDEBUG */
+#endif /* INVALIDDEBUG */
SISetActiveProcess(segInOutP, MyBackendId);
on_shmem_exit(CleanupInvalidationState, (caddr_t) segInOutP);
@@ -151,7 +151,7 @@ SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag)
}
Assert(stateP);
-
+
if (stateP->tag != InvalidBackendTag)
{
if (stateP->tag == backendTag)
@@ -360,16 +360,18 @@ SIGetProcStateLimit(SISeg *segP, int i)
static bool
SIIncNumEntries(SISeg *segP, int num)
{
+
/*
- * Try to prevent table overflow. When the table is 70% full send
- * a SIGUSR2 to the postmaster which will send it back to all the
+ * Try to prevent table overflow. When the table is 70% full send a
+ * SIGUSR2 to the postmaster which will send it back to all the
* backends. This will be handled by Async_NotifyHandler() with a
* StartTransactionCommand() which will flush unread SI entries for
* each backend. dz - 27 Jan 1998
*/
- if (segP->numEntries == (MAXNUMMESSAGES * 70 / 100)) {
+ if (segP->numEntries == (MAXNUMMESSAGES * 70 / 100))
+ {
TPRINTF(TRACE_VERBOSE,
- "SIIncNumEntries: table is 70%% full, signaling postmaster");
+ "SIIncNumEntries: table is 70%% full, signaling postmaster");
kill(getppid(), SIGUSR2);
}
@@ -844,7 +846,7 @@ SISegmentInit(bool killExistingSegment, IPCKey key)
if (shmId < 0)
{
perror("SISegmentGet: failed");
- return -1; /* an error */
+ return -1; /* an error */
}
/* Attach the shared cache invalidation segment */
@@ -862,7 +864,7 @@ SISegmentInit(bool killExistingSegment, IPCKey key)
if (shmId < 0)
{
perror("SISegmentGet: getting an existent segment failed");
- return -1; /* an error */
+ return -1; /* an error */
}
/* Attach the shared cache invalidation segment */
SISegmentAttach(shmId);
diff --git a/src/backend/storage/ipc/spin.c b/src/backend/storage/ipc/spin.c
index 398815fe18..2bd88356fe 100644
--- a/src/backend/storage/ipc/spin.c
+++ b/src/backend/storage/ipc/spin.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.16 1998/09/01 03:25:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.17 1998/09/01 04:31:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,6 +63,7 @@ InitSpinLocks(int init, IPCKey key)
#ifdef STABLE_MEMORY_STORAGE
extern SPINLOCK MMCacheLock;
+
#endif
/* These six spinlocks have fixed location is shmem */
@@ -83,7 +84,7 @@ InitSpinLocks(int init, IPCKey key)
#ifdef LOCKDEBUG
#define PRINT_LOCK(LOCK) \
- TPRINTF(TRACE_SPINLOCKS, \
+ TPRINTF(TRACE_SPINLOCKS, \
"(locklock = %d, flag = %d, nshlocks = %d, shlock = %d, " \
"exlock =%d)\n", LOCK->locklock, \
LOCK->flag, LOCK->nshlocks, LOCK->shlock, \
@@ -140,9 +141,10 @@ SpinRelease(SPINLOCK lockid)
slckP = &(SLockArray[lockid]);
#ifdef USE_ASSERT_CHECKING
+
/*
- * Check that we are actually holding the lock we are releasing.
- * This can be done only after MyProc has been initialized.
+ * Check that we are actually holding the lock we are releasing. This
+ * can be done only after MyProc has been initialized.
*/
if (MyProc)
Assert(MyProc->sLocks[lockid] > 0);
@@ -334,4 +336,4 @@ InitSpinLocks(int init, IPCKey key)
return TRUE;
}
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c
index 91f3f9e21f..fde126fb84 100644
--- a/src/backend/storage/large_object/inv_api.c
+++ b/src/backend/storage/large_object/inv_api.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.37 1998/09/01 03:25:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.38 1998/09/01 04:31:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -61,16 +61,16 @@
*/
/*
- * In order to prevent buffer leak on transaction commit, large object
- * scan index handling has been modified. Indexes are persistant inside
- * a transaction but may be closed between two calls to this API (when
- * transaction is committed while object is opened, or when no
- * transaction is active). Scan indexes are thus now reinitialized using
- * the object current offset. [PA]
+ * In order to prevent buffer leak on transaction commit, large object
+ * scan index handling has been modified. Indexes are persistant inside
+ * a transaction but may be closed between two calls to this API (when
+ * transaction is committed while object is opened, or when no
+ * transaction is active). Scan indexes are thus now reinitialized using
+ * the object current offset. [PA]
*
- * Some cleanup has been also done for non freed memory.
+ * Some cleanup has been also done for non freed memory.
*
- * For subsequent notes, [PA] is Pascal Andr� <[email protected]>
+ * For subsequent notes, [PA] is Pascal Andr� <[email protected]>
*/
#define IFREESPC(p) (PageGetFreeSpace(p) - sizeof(HeapTupleData) - sizeof(struct varlena) - sizeof(int32))
@@ -78,13 +78,11 @@
#define IMINBLK 512
/* non-export function prototypes */
-static HeapTuple
-inv_newtuple(LargeObjectDesc *obj_desc, Buffer buffer,
+static HeapTuple inv_newtuple(LargeObjectDesc *obj_desc, Buffer buffer,
Page page, char *dbuf, int nwrite);
static HeapTuple inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *buffer);
static int inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes);
-static int
-inv_wrold(LargeObjectDesc *obj_desc, char *dbuf, int nbytes,
+static int inv_wrold(LargeObjectDesc *obj_desc, char *dbuf, int nbytes,
HeapTuple tuple, Buffer buffer);
static void inv_indextup(LargeObjectDesc *obj_desc, HeapTuple tuple);
static int _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln);
@@ -276,7 +274,8 @@ inv_close(LargeObjectDesc *obj_desc)
{
Assert(PointerIsValid(obj_desc));
- if (obj_desc->iscan != (IndexScanDesc) NULL) {
+ if (obj_desc->iscan != (IndexScanDesc) NULL)
+ {
index_endscan(obj_desc->iscan);
pfree(obj_desc->iscan);
obj_desc->iscan = NULL;
@@ -468,8 +467,8 @@ inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
/* fetch a block at a time */
while (nread < nbytes)
{
- Buffer buffer;
-
+ Buffer buffer;
+
/* fetch an inversion file system block */
tuple = inv_fetchtup(obj_desc, &buffer);
@@ -482,7 +481,7 @@ inv_read(LargeObjectDesc *obj_desc, char *buf, int nbytes)
/* copy the data from this block into the buffer */
d = heap_getattr(tuple, 2, obj_desc->hdesc, &isNull);
ReleaseBuffer(buffer);
-
+
fsblock = (struct varlena *) DatumGetPointer(d);
off = obj_desc->offset - obj_desc->lowbyte;
@@ -526,8 +525,8 @@ inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
/* write a block at a time */
while (nwritten < nbytes)
{
- Buffer buffer;
-
+ Buffer buffer;
+
/*
* Fetch the current inversion file system block. If the class
* storing the inversion file is empty, we don't want to do an
@@ -552,7 +551,7 @@ inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
tuplen = inv_wrold(obj_desc, buf, nbytes - nwritten, tuple, buffer);
}
ReleaseBuffer(buffer);
-
+
/* move pointers past the amount we just wrote */
buf += tuplen;
nwritten += tuplen;
@@ -565,23 +564,24 @@ inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
/*
* inv_cleanindex --
- * Clean opened indexes for large objects, and clears current result.
- * This is necessary on transaction commit in order to prevent buffer
- * leak.
- * This function must be called for each opened large object.
- * [ PA, 7/17/98 ]
+ * Clean opened indexes for large objects, and clears current result.
+ * This is necessary on transaction commit in order to prevent buffer
+ * leak.
+ * This function must be called for each opened large object.
+ * [ PA, 7/17/98 ]
*/
-void
+void
inv_cleanindex(LargeObjectDesc *obj_desc)
{
- Assert(PointerIsValid(obj_desc));
+ Assert(PointerIsValid(obj_desc));
- if (obj_desc->iscan == (IndexScanDesc) NULL) return;
+ if (obj_desc->iscan == (IndexScanDesc) NULL)
+ return;
index_endscan(obj_desc->iscan);
pfree(obj_desc->iscan);
obj_desc->iscan = (IndexScanDesc) NULL;
-
+
ItemPointerSetInvalid(&(obj_desc->htid));
}
@@ -630,13 +630,13 @@ inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *buffer)
{
ScanKeyData skey;
- /*
- * As scan index may be prematurely closed (on commit),
- * we must use object current offset (was 0) to
- * reinitialize the entry [ PA ].
+ /*
+ * As scan index may be prematurely closed (on commit), we
+ * must use object current offset (was 0) to reinitialize the
+ * entry [ PA ].
*/
ScanKeyEntryInitialize(&skey, 0x0, 1, F_INT4GE,
- Int32GetDatum(obj_desc->offset));
+ Int32GetDatum(obj_desc->offset));
obj_desc->iscan =
index_beginscan(obj_desc->index_r,
(bool) 0, (uint16) 1,
@@ -658,13 +658,13 @@ inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *buffer)
* rather that NowTimeQual. We currently have no way to pass
* a time qual in.
*
- * This is now valid for snapshot !!!
- * And should be fixed in some way... - vadim 07/28/98
- *
+ * This is now valid for snapshot !!! And should be fixed in some
+ * way... - vadim 07/28/98
+ *
*/
tuple = heap_fetch(obj_desc->heap_r, SnapshotNow,
- &res->heap_iptr, buffer);
+ &res->heap_iptr, buffer);
pfree(res);
} while (tuple == (HeapTuple) NULL);
@@ -675,7 +675,7 @@ inv_fetchtup(LargeObjectDesc *obj_desc, Buffer *buffer)
else
{
tuple = heap_fetch(obj_desc->heap_r, SnapshotNow,
- &(obj_desc->htid), buffer);
+ &(obj_desc->htid), buffer);
}
/*
@@ -1213,7 +1213,7 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
long size;
bool isNull;
Buffer buffer;
-
+
/* scan backwards from end */
iscan = index_beginscan(ireln, (bool) 1, 0, (ScanKey) NULL);
@@ -1250,6 +1250,6 @@ _inv_getsize(Relation hreln, TupleDesc hdesc, Relation ireln)
d = heap_getattr(tuple, 1, hdesc, &isNull);
size = DatumGetInt32(d) + 1;
ReleaseBuffer(buffer);
-
+
return size;
}
diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c
index a24d729808..13adb8c48f 100644
--- a/src/backend/storage/lmgr/lmgr.c
+++ b/src/backend/storage/lmgr/lmgr.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.18 1998/08/24 01:13:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.19 1998/09/01 04:31:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,7 +16,7 @@
#ifdef LOCKDEBUGALL
#define LOCKDEBUG 1
-#endif /* LOCKDEBUGALL */
+#endif /* LOCKDEBUGALL */
#include <string.h>
@@ -56,20 +56,20 @@ extern Oid MyDatabaseId;
void
RelationInitLockInfo(Relation relation)
{
- LockInfo info;
- char *relname;
- MemoryContext oldcxt;
- extern Oid MyDatabaseId; /* XXX use include */
- extern GlobalMemory CacheCxt;
+ LockInfo info;
+ char *relname;
+ MemoryContext oldcxt;
+ extern Oid MyDatabaseId; /* XXX use include */
+ extern GlobalMemory CacheCxt;
Assert(RelationIsValid(relation));
Assert(OidIsValid(RelationGetRelid(relation)));
info = (LockInfo) relation->lockInfo;
-
+
if (LockInfoIsValid(info))
return;
-
+
relname = (char *) RelationGetRelationName(relation);
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
@@ -99,7 +99,7 @@ elog(DEBUG, "RelationSetLockForDescriptorOpen(%s[%d,%d]) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId)
#else
#define LOCKDEBUGALL_30
-#endif /* LOCKDEBUGALL */
+#endif /* LOCKDEBUGALL */
void
RelationSetLockForDescriptorOpen(Relation relation)
@@ -131,7 +131,7 @@ elog(DEBUG, "RelationSetLockForRead(%s[%d,%d]) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId)
#else
#define LOCKDEBUG_40
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/*
* RelationSetLockForRead --
@@ -180,7 +180,7 @@ elog(DEBUG, "RelationUnsetLockForRead(%s[%d,%d]) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId)
#else
#define LOCKDEBUG_50
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/*
* RelationUnsetLockForRead --
@@ -226,7 +226,7 @@ elog(DEBUG, "RelationSetLockForWrite(%s[%d,%d]) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId)
#else
#define LOCKDEBUG_60
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/*
* RelationSetLockForWrite --
@@ -275,7 +275,7 @@ elog(DEBUG, "RelationUnsetLockForWrite(%s[%d,%d]) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId)
#else
#define LOCKDEBUG_70
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/*
* RelationUnsetLockForWrite --
@@ -316,7 +316,7 @@ elog(DEBUG, "RelationSetLockForReadPage(%s[%d,%d], @%d) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId, page)
#else
#define LOCKDEBUG_90
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/* ----------------
* RelationSetLockForWritePage
@@ -328,7 +328,7 @@ elog(DEBUG, "RelationSetLockForWritePage(%s[%d,%d], @%d) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId, page)
#else
#define LOCKDEBUG_100
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/*
* RelationSetLockForWritePage --
@@ -370,7 +370,7 @@ elog(DEBUG, "RelationUnsetLockForReadPage(%s[%d,%d], @%d) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId, page)
#else
#define LOCKDEBUG_110
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/* ----------------
* RelationUnsetLockForWritePage
@@ -382,7 +382,7 @@ elog(DEBUG, "RelationUnsetLockForWritePage(%s[%d,%d], @%d) called", \
RelationGetRelationName(relation), lockRelId.dbId, lockRelId.relId, page)
#else
#define LOCKDEBUG_120
-#endif /* LOCKDEBUG */
+#endif /* LOCKDEBUG */
/*
* Set a single level write page lock. Assumes that you already
@@ -609,4 +609,3 @@ RelationUnsetLockForExtend(Relation relation)
}
#endif
-
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 2456b2a668..a40034ac33 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.35 1998/09/01 03:25:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.36 1998/09/01 04:32:00 momjian Exp $
*
* NOTES
* Outside modules can create a lock table and acquire/release
@@ -52,7 +52,7 @@
#include "utils/ps_status.h"
static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
- TransactionId xid);
+ TransactionId xid);
/*
* lockDebugRelation can be used to trace unconditionally a single relation,
@@ -64,11 +64,11 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
* If you are using tprintf you should specify a value greater than the max
* oid of system relations, which can be found with the following query:
*
- * select max(int4in(int4out(oid))) from pg_class where relname ~ '^pg_';
+ * select max(int4in(int4out(oid))) from pg_class where relname ~ '^pg_';
*
* To get a useful lock trace you can use the following pg_options:
*
- * -T "verbose,query,locks,userlocks,lock_debug_oidmin=17500"
+ * -T "verbose,query,locks,userlocks,lock_debug_oidmin=17500"
*/
#define LOCKDEBUG(lockmethod) (pg_options[TRACE_SHORTLOCKS+lockmethod])
#define lockDebugRelation (pg_options[TRACE_LOCKRELATION])
@@ -77,10 +77,10 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
#ifdef LOCK_MGR_DEBUG
#define LOCK_PRINT(where,lock,type) \
- if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
- && (lock->tag.relId >= lockDebugOidMin)) \
- || (lock->tag.relId == lockDebugRelation)) \
- LOCK_PRINT_AUX(where,lock,type)
+ if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
+ && (lock->tag.relId >= lockDebugOidMin)) \
+ || (lock->tag.relId == lockDebugRelation)) \
+ LOCK_PRINT_AUX(where,lock,type)
#define LOCK_PRINT_AUX(where,lock,type) \
TPRINTF(TRACE_ALL, \
@@ -113,11 +113,11 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
#define XID_PRINT(where,xidentP) \
if (((LOCKDEBUG(XIDENT_LOCKMETHOD(*(xidentP))) >= 1) \
- && (((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
+ && (((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
>= lockDebugOidMin)) \
- || (((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
+ || (((LOCK *)MAKE_PTR(xidentP->tag.lock))->tag.relId \
== lockDebugRelation)) \
- XID_PRINT_AUX(where,xidentP)
+ XID_PRINT_AUX(where,xidentP)
#define XID_PRINT_AUX(where,xidentP) \
TPRINTF(TRACE_ALL, \
@@ -137,18 +137,18 @@ static int WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
xidentP->nHolding)
#define LOCK_TPRINTF(lock, args...) \
- if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
- && (lock->tag.relId >= lockDebugOidMin)) \
- || (lock->tag.relId == lockDebugRelation)) \
- TPRINTF(TRACE_ALL, args)
+ if (((LOCKDEBUG(LOCK_LOCKMETHOD(*(lock))) >= 1) \
+ && (lock->tag.relId >= lockDebugOidMin)) \
+ || (lock->tag.relId == lockDebugRelation)) \
+ TPRINTF(TRACE_ALL, args)
-#else /* !LOCK_MGR_DEBUG */
+#else /* !LOCK_MGR_DEBUG */
#define LOCK_PRINT(where,lock,type)
#define LOCK_PRINT_AUX(where,lock,type)
#define XID_PRINT(where,xidentP)
#define XID_PRINT_AUX(where,xidentP)
#define LOCK_TPRINTF(lock, args...)
-#endif /* !LOCK_MGR_DEBUG */
+#endif /* !LOCK_MGR_DEBUG */
static char *lock_types[] = {
"",
@@ -204,13 +204,13 @@ InitLocks()
}
#ifdef LOCK_MGR_DEBUG
+
/*
- * If lockDebugOidMin value has not been specified
- * in pg_options set a default value.
+ * If lockDebugOidMin value has not been specified in pg_options set a
+ * default value.
*/
- if (!lockDebugOidMin) {
+ if (!lockDebugOidMin)
lockDebugOidMin = BootstrapObjectIdData;
- }
#endif
}
@@ -232,10 +232,10 @@ LockDisable(int status)
* Notes: just copying. Should only be called once.
*/
static void
-LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
- MASK *conflictsP,
- int *prioP,
- int numModes)
+LockMethodInit(LOCKMETHODTABLE * lockMethodTable,
+ MASK *conflictsP,
+ int *prioP,
+ int numModes)
{
int i;
@@ -260,11 +260,11 @@ LockMethodInit(LOCKMETHODTABLE *lockMethodTable,
*/
LOCKMETHOD
LockMethodTableInit(char *tabName,
- MASK *conflictsP,
- int *prioP,
- int numModes)
+ MASK *conflictsP,
+ int *prioP,
+ int numModes)
{
- LOCKMETHODTABLE *lockMethodTable;
+ LOCKMETHODTABLE *lockMethodTable;
char *shmemName;
HASHCTL info;
int hash_flags;
@@ -355,7 +355,7 @@ LockMethodTableInit(char *tabName,
sprintf(shmemName, "%s (lock hash)", tabName);
lockMethodTable->lockHash = (HTAB *) ShmemInitHash(shmemName,
INIT_TABLE_SIZE, MAX_TABLE_SIZE,
- &info, hash_flags);
+ &info, hash_flags);
Assert(lockMethodTable->lockHash->hash == tag_hash);
if (!lockMethodTable->lockHash)
@@ -377,7 +377,7 @@ LockMethodTableInit(char *tabName,
sprintf(shmemName, "%s (xid hash)", tabName);
lockMethodTable->xidHash = (HTAB *) ShmemInitHash(shmemName,
INIT_TABLE_SIZE, MAX_TABLE_SIZE,
- &info, hash_flags);
+ &info, hash_flags);
if (!lockMethodTable->xidHash)
{
@@ -414,7 +414,7 @@ LockMethodTableInit(char *tabName,
LOCKMETHOD
LockMethodTableRename(LOCKMETHOD lockmethod)
{
- LOCKMETHOD newLockMethod;
+ LOCKMETHOD newLockMethod;
if (NumLockMethods >= MAX_LOCK_METHODS)
return INVALID_LOCKMETHOD;
@@ -494,7 +494,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
bool found;
LOCK *lock = NULL;
SPINLOCK masterLock;
- LOCKMETHODTABLE *lockMethodTable;
+ LOCKMETHODTABLE *lockMethodTable;
int status;
TransactionId xid;
@@ -560,7 +560,9 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
Assert(BlockIdEquals(&(lock->tag.tupleId.ip_blkid),
&(locktag->tupleId.ip_blkid)));
LOCK_PRINT("LockAcquire: new", lock, lockmode);
- } else {
+ }
+ else
+ {
LOCK_PRINT("LockAcquire: found", lock, lockmode);
Assert((lock->nHolding > 0) && (lock->holders[lockmode] >= 0));
Assert((lock->nActive > 0) && (lock->activeHolders[lockmode] >= 0));
@@ -589,7 +591,9 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
{
item.tag.pid = MyProcPid;
item.tag.xid = xid = 0;
- } else {
+ }
+ else
+ {
xid = GetCurrentTransactionId();
TransactionIdStore(xid, &item.tag.xid);
}
@@ -618,7 +622,9 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
MemSet((char *) result->holders, 0, sizeof(int) * MAX_LOCKMODES);
ProcAddLock(&result->queue);
XID_PRINT("LockAcquire: new", result);
- } else {
+ }
+ else
+ {
XID_PRINT("LockAcquire: found", result);
Assert((result->nHolding > 0) && (result->holders[lockmode] >= 0));
Assert(result->nHolding <= lock->nActive);
@@ -658,6 +664,7 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
else if (status == STATUS_FOUND)
{
#ifdef USER_LOCKS
+
/*
* User locks are non blocking. If we can't acquire a lock we must
* remove the xid entry and return FALSE without waiting.
@@ -669,13 +676,12 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
SHMQueueDelete(&result->queue);
result = (XIDLookupEnt *) hash_search(xidTable,
(Pointer) result,
- HASH_REMOVE, &found);
- if (!result || !found) {
+ HASH_REMOVE, &found);
+ if (!result || !found)
elog(NOTICE, "LockAcquire: remove xid, table corrupted");
- }
- } else {
- XID_PRINT_AUX("LockAcquire: NHOLDING", result);
}
+ else
+ XID_PRINT_AUX("LockAcquire: NHOLDING", result);
lock->nHolding--;
lock->holders[lockmode]--;
LOCK_PRINT("LockAcquire: user lock failed", lock, lockmode);
@@ -686,11 +692,13 @@ LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
}
#endif
status = WaitOnLock(lockmethod, lock, lockmode, xid);
+
/*
- * Check the xid entry status, in case something in the
- * ipc communication doesn't work correctly.
+ * Check the xid entry status, in case something in the ipc
+ * communication doesn't work correctly.
*/
- if (!((result->nHolding > 0) && (result->holders[lockmode] > 0))) {
+ if (!((result->nHolding > 0) && (result->holders[lockmode] > 0)))
+ {
XID_PRINT_AUX("LockAcquire: INCONSISTENT ", result);
LOCK_PRINT_AUX("LockAcquire: INCONSISTENT ", lock, lockmode);
/* Should we retry ? */
@@ -737,20 +745,26 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
int bitmask;
int i,
tmpMask;
+
#ifdef USER_LOCKS
int is_user_lock;
+
#endif
numLockModes = LockMethodTable[lockmethod]->ctl->numLockModes;
xidTable = LockMethodTable[lockmethod]->xidHash;
- if (xidentP) {
+ if (xidentP)
+ {
+
/*
* A pointer to the xid entry was supplied from the caller.
* Actually only LockAcquire can do it.
*/
result = xidentP;
- } else {
+ }
+ else
+ {
/* ---------------------
* read my own statistics from the xid table. If there
* isn't an entry, then we'll just add one.
@@ -766,12 +780,13 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
#endif
#ifdef USER_LOCKS
is_user_lock = (lockmethod == 2);
- if (is_user_lock) {
+ if (is_user_lock)
+ {
item.tag.pid = MyProcPid;
item.tag.xid = 0;
- } else {
- TransactionIdStore(xid, &item.tag.xid);
}
+ else
+ TransactionIdStore(xid, &item.tag.xid);
#else
TransactionIdStore(xid, &item.tag.xid);
#endif
@@ -788,9 +803,9 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
}
/*
- * If not found initialize the new entry. THIS SHOULD NEVER HAPPEN,
- * if we are trying to resolve a conflict we must already have
- * allocated an xid entry for this lock. dz 21-11-1997
+ * If not found initialize the new entry. THIS SHOULD NEVER
+ * HAPPEN, if we are trying to resolve a conflict we must already
+ * have allocated an xid entry for this lock. dz 21-11-1997
*/
if (!found)
{
@@ -799,12 +814,12 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
* the lock stats.
* ---------------
*/
- MemSet(result->holders,0, numLockModes * sizeof(*(lock->holders)));
+ MemSet(result->holders, 0, numLockModes * sizeof(*(lock->holders)));
result->nHolding = 0;
XID_PRINT_AUX("LockResolveConflicts: NOT FOUND", result);
- } else {
- XID_PRINT("LockResolveConflicts: found", result);
}
+ else
+ XID_PRINT("LockResolveConflicts: found", result);
}
Assert((result->nHolding >= 0) && (result->holders[lockmode] >= 0));
@@ -822,7 +837,8 @@ LockResolveConflicts(LOCKMETHOD lockmethod,
PROC_QUEUE *waitQueue = &(lock->waitProcs);
PROC *topproc = (PROC *) MAKE_PTR(waitQueue->links.prev);
- if (waitQueue->size && topproc->prio > myprio) {
+ if (waitQueue->size && topproc->prio > myprio)
+ {
XID_PRINT("LockResolveConflicts: higher priority proc waiting",
result);
return STATUS_FOUND;
@@ -904,7 +920,7 @@ WaitOnLock(LOCKMETHOD lockmethod, LOCK *lock, LOCKMODE lockmode,
TransactionId xid)
{
PROC_QUEUE *waitQueue = &(lock->waitProcs);
- LOCKMETHODTABLE *lockMethodTable = LockMethodTable[lockmethod];
+ LOCKMETHODTABLE *lockMethodTable = LockMethodTable[lockmethod];
int prio = lockMethodTable->ctl->prio[lockmode];
char old_status[64],
new_status[64];
@@ -970,7 +986,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
LOCK *lock = NULL;
SPINLOCK masterLock;
bool found;
- LOCKMETHODTABLE *lockMethodTable;
+ LOCKMETHODTABLE *lockMethodTable;
XIDLookupEnt *result,
item;
HTAB *xidTable;
@@ -1024,7 +1040,8 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
HASH_FIND, &found);
/*
- * let the caller print its own error message, too. Do not elog(ERROR).
+ * let the caller print its own error message, too. Do not
+ * elog(ERROR).
*/
if (!lock)
{
@@ -1037,7 +1054,8 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
{
SpinRelease(masterLock);
#ifdef USER_LOCKS
- if (is_user_lock) {
+ if (is_user_lock)
+ {
TPRINTF(TRACE_USERLOCKS, "LockRelease: no lock with this tag");
return FALSE;
}
@@ -1062,10 +1080,13 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
item.tag.lockmethod = lockmethod;
#endif
#ifdef USER_LOCKS
- if (is_user_lock) {
+ if (is_user_lock)
+ {
item.tag.pid = MyProcPid;
item.tag.xid = xid = 0;
- } else {
+ }
+ else
+ {
xid = GetCurrentTransactionId();
TransactionIdStore(xid, &item.tag.xid);
}
@@ -1084,21 +1105,22 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
{
SpinRelease(masterLock);
#ifdef USER_LOCKS
- if (!found && is_user_lock) {
+ if (!found && is_user_lock)
TPRINTF(TRACE_USERLOCKS, "LockRelease: no lock with this tag");
- } else
+ else
#endif
- elog(NOTICE, "LockReplace: xid table corrupted");
+ elog(NOTICE, "LockReplace: xid table corrupted");
return FALSE;
}
XID_PRINT("LockRelease: found", result);
Assert(result->tag.lock == MAKE_OFFSET(lock));
/*
- * Check that we are actually holding a lock of the type we want
- * to release.
+ * Check that we are actually holding a lock of the type we want to
+ * release.
*/
- if (!(result->holders[lockmode] > 0)) {
+ if (!(result->holders[lockmode] > 0))
+ {
SpinRelease(masterLock);
XID_PRINT_AUX("LockAcquire: WRONGTYPE", result);
elog(NOTICE, "LockRelease: you don't own a lock of type %s",
@@ -1114,7 +1136,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
lock->nHolding--;
lock->holders[lockmode]--;
lock->nActive--;
- lock->activeHolders[lockmode]--;
+ lock->activeHolders[lockmode]--;
/* --------------------------
* If there are still active locks of the type I just released, no one
@@ -1123,9 +1145,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
* --------------------------
*/
if (lock->activeHolders[lockmode])
- {
wakeupNeeded = false;
- }
else
{
/* change the conflict mask. No more of this lock type. */
@@ -1169,12 +1189,10 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
*/
if (!result->nHolding)
{
- if (result->queue.prev == INVALID_OFFSET) {
+ if (result->queue.prev == INVALID_OFFSET)
elog(NOTICE, "LockRelease: xid.prev == INVALID_OFFSET");
- }
- if (result->queue.next == INVALID_OFFSET) {
+ if (result->queue.next == INVALID_OFFSET)
elog(NOTICE, "LockRelease: xid.next == INVALID_OFFSET");
- }
if (result->queue.next != INVALID_OFFSET)
SHMQueueDelete(&result->queue);
XID_PRINT("LockRelease: deleting", result);
@@ -1199,9 +1217,7 @@ LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag, LOCKMODE lockmode)
ProcLockWakeup(&(lock->waitProcs), lockmethod, lock);
}
else
- {
LOCK_TPRINTF(lock, "LockRelease: no wakeup needed");
- }
SpinRelease(masterLock);
return TRUE;
@@ -1220,7 +1236,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
XIDLookupEnt *result;
SHMEM_OFFSET end = MAKE_OFFSET(lockQueue);
SPINLOCK masterLock;
- LOCKMETHODTABLE *lockMethodTable;
+ LOCKMETHODTABLE *lockMethodTable;
int i,
numLockModes;
LOCK *lock;
@@ -1245,7 +1261,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
Assert(lockmethod < NumLockMethods);
lockMethodTable = LockMethodTable[lockmethod];
- if (!lockMethodTable) {
+ if (!lockMethodTable)
+ {
elog(NOTICE, "LockAcquire: bad lockmethod %d", lockmethod);
return FALSE;
}
@@ -1261,6 +1278,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
for (;;)
{
+
/*
* Sometimes the queue appears to be messed up.
*/
@@ -1281,7 +1299,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
lock = (LOCK *) MAKE_PTR(xidLook->tag.lock);
xidtag_lockmethod = XIDENT_LOCKMETHOD(*xidLook);
- if ((xidtag_lockmethod == lockmethod) || (trace_flag >= 2)) {
+ if ((xidtag_lockmethod == lockmethod) || (trace_flag >= 2))
+ {
XID_PRINT("LockReleaseAll", xidLook);
LOCK_PRINT("LockReleaseAll", lock, 0);
}
@@ -1291,7 +1310,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
elog(NOTICE, "LockReleaseAll: xid/lock method mismatch: %d != %d",
xidtag_lockmethod, lock->tag.lockmethod);
#endif
- if ((xidtag_lockmethod != lockmethod) && (trace_flag >= 2)) {
+ if ((xidtag_lockmethod != lockmethod) && (trace_flag >= 2))
+ {
TPRINTF(trace_flag, "LockReleaseAll: skipping other table");
nleft++;
goto next_item;
@@ -1310,7 +1330,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
{
TPRINTF(TRACE_USERLOCKS,
"LockReleaseAll: skiping normal lock [%d,%d,%d]",
- xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
+ xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
nleft++;
goto next_item;
}
@@ -1322,28 +1342,32 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
lock->tag.tupleId.ip_posid,
((lock->tag.tupleId.ip_blkid.bi_hi << 16) +
lock->tag.tupleId.ip_blkid.bi_lo),
- xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
+ xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
nleft++;
goto next_item;
}
TPRINTF(TRACE_USERLOCKS,
- "LockReleaseAll: releasing user lock [%u,%u] [%d,%d,%d]",
+ "LockReleaseAll: releasing user lock [%u,%u] [%d,%d,%d]",
lock->tag.tupleId.ip_posid,
((lock->tag.tupleId.ip_blkid.bi_hi << 16) +
lock->tag.tupleId.ip_blkid.bi_lo),
- xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
+ xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
}
else
{
- /* Can't check xidLook->tag.xid, can be 0 also for normal locks */
+
+ /*
+ * Can't check xidLook->tag.xid, can be 0 also for normal
+ * locks
+ */
if (xidLook->tag.pid != 0)
{
TPRINTF(TRACE_LOCKS,
- "LockReleaseAll: skiping user lock [%u,%u] [%d,%d,%d]",
+ "LockReleaseAll: skiping user lock [%u,%u] [%d,%d,%d]",
lock->tag.tupleId.ip_posid,
((lock->tag.tupleId.ip_blkid.bi_hi << 16) +
lock->tag.tupleId.ip_blkid.bi_lo),
- xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
+ xidLook->tag.lock, xidLook->tag.pid, xidLook->tag.xid);
nleft++;
goto next_item;
}
@@ -1362,7 +1386,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
lock->holders[i] -= xidLook->holders[i];
lock->activeHolders[i] -= xidLook->holders[i];
Assert((lock->holders[i] >= 0) \
- && (lock->activeHolders[i] >= 0));
+ &&(lock->activeHolders[i] >= 0));
if (!lock->activeHolders[i])
lock->mask &= BITS_OFF[i];
}
@@ -1380,7 +1404,8 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
*/
lock->nHolding = 0;
/* Fix the lock status, just for next LOCK_PRINT message. */
- for (i=1; i<=numLockModes; i++) {
+ for (i = 1; i <= numLockModes; i++)
+ {
Assert(lock->holders[i] == lock->activeHolders[i]);
lock->holders[i] = lock->activeHolders[i] = 0;
}
@@ -1399,7 +1424,7 @@ LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue)
XID_PRINT("LockReleaseAll: deleting", xidLook);
result = (XIDLookupEnt *) hash_search(lockMethodTable->xidHash,
- (Pointer) xidLook,
+ (Pointer) xidLook,
HASH_REMOVE,
&found);
if (!result || !found)
@@ -1452,7 +1477,8 @@ next_item:
/*
* Reinitialize the queue only if nothing has been left in.
*/
- if (nleft == 0) {
+ if (nleft == 0)
+ {
TPRINTF(trace_flag, "LockReleaseAll: reinitializing lockQueue");
SHMQueueInit(lockQueue);
}
@@ -1479,7 +1505,8 @@ LockShmemSize()
nXidSegs = 1 << (int) my_log2((nLockBuckets - 1) / DEF_SEGSIZE + 1);
size += MAXALIGN(NBACKENDS * sizeof(PROC)); /* each MyProc */
- size += MAXALIGN(NBACKENDS * sizeof(LOCKMETHODCTL)); /* each lockMethodTable->ctl */
+ size += MAXALIGN(NBACKENDS * sizeof(LOCKMETHODCTL)); /* each
+ * lockMethodTable->ctl */
size += MAXALIGN(sizeof(PROC_HDR)); /* ProcGlobal */
size += MAXALIGN(my_log2(NLOCKENTS) * sizeof(void *));
@@ -1531,7 +1558,7 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
SHMEM_OFFSET end = MAKE_OFFSET(lockQueue);
LOCK *lock;
- LOCKMETHODTABLE *lockMethodTable;
+ LOCKMETHODTABLE *lockMethodTable;
XIDLookupEnt *result,
item;
HTAB *xidTable;
@@ -1692,16 +1719,16 @@ DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock, bool skip_check)
* This works only for user locks because normal locks have no
* pid information in the corresponding XIDLookupEnt.
*/
-ArrayType *
+ArrayType *
LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
{
XIDLookupEnt *xidLook = NULL;
SPINLOCK masterLock;
- LOCK *lock;
+ LOCK *lock;
SHMEM_OFFSET lock_offset;
- int count = 0;
- LOCKMETHODTABLE *lockMethodTable;
- HTAB *xidTable;
+ int count = 0;
+ LOCKMETHODTABLE *lockMethodTable;
+ HTAB *xidTable;
bool found;
int ndims,
nitems,
@@ -1709,11 +1736,11 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
size;
int lbounds[1],
hbounds[1];
- ArrayType *array;
- int *data_ptr;
+ ArrayType *array;
+ int *data_ptr;
/* Assume that no one will modify the result */
- static int empty_array[] = { 20, 1, 0, 0, 0 };
+ static int empty_array[] = {20, 1, 0, 0, 0};
#ifdef USER_LOCKS
int is_user_lock;
@@ -1740,9 +1767,7 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
}
if (LockingIsDisabled)
- {
return (ArrayType *) &empty_array;
- }
masterLock = lockMethodTable->ctl->masterLock;
SpinAcquire(masterLock);
@@ -1768,7 +1793,8 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
{
SpinRelease(masterLock);
#ifdef USER_LOCKS
- if (is_user_lock) {
+ if (is_user_lock)
+ {
TPRINTF(TRACE_USERLOCKS, "LockOwners: no lock with this tag");
return (ArrayType *) &empty_array;
}
@@ -1799,53 +1825,61 @@ LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag)
xidTable = lockMethodTable->xidHash;
hash_seq(NULL);
nitems = 0;
- while ((xidLook = (XIDLookupEnt *)hash_seq(xidTable)) &&
- (xidLook != (XIDLookupEnt *)TRUE)) {
- if (count++ > 1000) {
- elog(NOTICE,"LockOwners: possible loop, giving up");
+ while ((xidLook = (XIDLookupEnt *) hash_seq(xidTable)) &&
+ (xidLook != (XIDLookupEnt *) TRUE))
+ {
+ if (count++ > 1000)
+ {
+ elog(NOTICE, "LockOwners: possible loop, giving up");
break;
}
- if (xidLook->tag.pid == 0) {
+ if (xidLook->tag.pid == 0)
+ {
XID_PRINT("LockOwners: no pid", xidLook);
continue;
}
- if (!xidLook->tag.lock) {
+ if (!xidLook->tag.lock)
+ {
XID_PRINT("LockOwners: NULL LOCK", xidLook);
continue;
}
- if (xidLook->tag.lock != lock_offset) {
+ if (xidLook->tag.lock != lock_offset)
+ {
XID_PRINT("LockOwners: different lock", xidLook);
continue;
}
- if (LOCK_LOCKMETHOD(*lock) != lockmethod) {
+ if (LOCK_LOCKMETHOD(*lock) != lockmethod)
+ {
XID_PRINT("LockOwners: other table", xidLook);
continue;
}
- if (xidLook->nHolding <= 0) {
+ if (xidLook->nHolding <= 0)
+ {
XID_PRINT("LockOwners: not holding", xidLook);
continue;
}
- if (nitems >= hbounds[0]) {
- elog(NOTICE,"LockOwners: array size exceeded");
+ if (nitems >= hbounds[0])
+ {
+ elog(NOTICE, "LockOwners: array size exceeded");
break;
}
/*
- * Check that the holding process is still alive by sending
- * him an unused (ignored) signal. If the kill fails the
- * process is not alive.
+ * Check that the holding process is still alive by sending him an
+ * unused (ignored) signal. If the kill fails the process is not
+ * alive.
*/
if ((xidLook->tag.pid != MyProcPid) \
- && (kill(xidLook->tag.pid, SIGCHLD)) != 0)
+ &&(kill(xidLook->tag.pid, SIGCHLD)) != 0)
{
/* Return a negative pid to signal that process is dead */
- data_ptr[nitems++] = - (xidLook->tag.pid);
+ data_ptr[nitems++] = -(xidLook->tag.pid);
XID_PRINT("LockOwners: not alive", xidLook);
/* XXX - TODO: remove this entry and update lock stats */
continue;
@@ -1887,7 +1921,7 @@ DumpLocks()
LOCK *lock;
int count = 0;
int lockmethod = DEFAULT_LOCKMETHOD;
- LOCKMETHODTABLE *lockMethodTable;
+ LOCKMETHODTABLE *lockMethodTable;
ShmemPIDLookup(MyProcPid, &location);
if (location == INVALID_OFFSET)
@@ -1911,9 +1945,8 @@ DumpLocks()
SHMQueueFirst(lockQueue, (Pointer *) &xidLook, &xidLook->queue);
end = MAKE_OFFSET(lockQueue);
- if (MyProc->waitLock) {
+ if (MyProc->waitLock)
LOCK_PRINT_AUX("DumpLocks: waiting on", MyProc->waitLock, 0);
- }
for (;;)
{
@@ -1950,17 +1983,17 @@ void
DumpAllLocks()
{
SHMEM_OFFSET location;
- PROC *proc;
+ PROC *proc;
XIDLookupEnt *xidLook = NULL;
- LOCK *lock;
- int pid;
- int count = 0;
+ LOCK *lock;
+ int pid;
+ int count = 0;
int lockmethod = DEFAULT_LOCKMETHOD;
- LOCKMETHODTABLE *lockMethodTable;
- HTAB *xidTable;
+ LOCKMETHODTABLE *lockMethodTable;
+ HTAB *xidTable;
pid = getpid();
- ShmemPIDLookup(pid,&location);
+ ShmemPIDLookup(pid, &location);
if (location == INVALID_OFFSET)
return;
proc = (PROC *) MAKE_PTR(location);
@@ -1974,26 +2007,29 @@ DumpAllLocks()
xidTable = lockMethodTable->xidHash;
- if (MyProc->waitLock) {
- LOCK_PRINT_AUX("DumpAllLocks: waiting on", MyProc->waitLock,0);
- }
+ if (MyProc->waitLock)
+ LOCK_PRINT_AUX("DumpAllLocks: waiting on", MyProc->waitLock, 0);
hash_seq(NULL);
- while ((xidLook = (XIDLookupEnt *)hash_seq(xidTable)) &&
- (xidLook != (XIDLookupEnt *)TRUE)) {
+ while ((xidLook = (XIDLookupEnt *) hash_seq(xidTable)) &&
+ (xidLook != (XIDLookupEnt *) TRUE))
+ {
XID_PRINT_AUX("DumpAllLocks", xidLook);
- if (xidLook->tag.lock) {
+ if (xidLook->tag.lock)
+ {
lock = (LOCK *) MAKE_PTR(xidLook->tag.lock);
LOCK_PRINT_AUX("DumpAllLocks", lock, 0);
- } else {
- elog(DEBUG, "DumpAllLocks: xidLook->tag.lock = NULL");
}
+ else
+ elog(DEBUG, "DumpAllLocks: xidLook->tag.lock = NULL");
- if (count++ > 2000) {
- elog(NOTICE,"DumpAllLocks: possible loop, giving up");
+ if (count++ > 2000)
+ {
+ elog(NOTICE, "DumpAllLocks: possible loop, giving up");
break;
}
}
}
+
#endif
diff --git a/src/backend/storage/lmgr/multi.c b/src/backend/storage/lmgr/multi.c
index 01d1a0f5fe..9bc6a59815 100644
--- a/src/backend/storage/lmgr/multi.c
+++ b/src/backend/storage/lmgr/multi.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.24 1998/09/01 03:25:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.25 1998/09/01 04:32:01 momjian Exp $
*
* NOTES:
* (1) The lock.c module assumes that the caller here is doing
@@ -30,15 +30,15 @@
#include "miscadmin.h" /* MyDatabaseId */
static bool MultiAcquire(LOCKMETHOD lockmethod, LOCKTAG *tag,
- LOCKMODE lockmode, PG_LOCK_LEVEL level);
+ LOCKMODE lockmode, PG_LOCK_LEVEL level);
static bool MultiRelease(LOCKMETHOD lockmethod, LOCKTAG *tag,
- LOCKMODE lockmode, PG_LOCK_LEVEL level);
+ LOCKMODE lockmode, PG_LOCK_LEVEL level);
#ifdef LowLevelLocking
-static MASK MultiConflicts[] = {
+static MASK MultiConflicts[] = {
(int) NULL,
-
+
/* RowShareLock */
(1 << ExclusiveLock),
@@ -46,26 +46,26 @@ static MASK MultiConflicts[] = {
(1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) | (1 << ShareLock),
/* ShareLock */
- (1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) |
+ (1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) |
(1 << RowExclusiveLock),
/* ShareRowExclusiveLock */
- (1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) |
+ (1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) |
(1 << ShareLock) | (1 << RowExclusiveLock),
-
+
/* ExclusiveLock */
- (1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) | (1 << ShareLock) |
+ (1 << ExclusiveLock) | (1 << ShareRowExclusiveLock) | (1 << ShareLock) |
(1 << RowExclusiveLock) | (1 << RowShareLock),
-
+
/* ObjShareLock */
(1 << ObjExclusiveLock),
-
+
/* ObjExclusiveLock */
(1 << ObjExclusiveLock) | (1 << ObjShareLock),
-
+
/* ExtendLock */
(1 << ExtendLock)
-
+
};
/*
@@ -90,7 +90,7 @@ static int MultiPrios[] = {
* WRITE conflict between the tuple's intent lock and the relation's
* write lock.
*/
-static MASK MultiConflicts[] = {
+static MASK MultiConflicts[] = {
(int) NULL,
/* All reads and writes at any level conflict with a write lock */
(1 << WRITE_LOCK) | (1 << WRITE_INTENT) | (1 << READ_LOCK) | (1 << READ_INTENT),
@@ -121,16 +121,18 @@ static int MultiPrios[] = {
1
};
-#endif /* !LowLevelLocking */
+#endif /* !LowLevelLocking */
/*
* Lock table identifier for this lock table. The multi-level
* lock table is ONE lock table, not three.
*/
-LOCKMETHOD MultiTableId = (LOCKMETHOD) NULL;
-LOCKMETHOD LongTermTableId = (LOCKMETHOD) NULL;
+LOCKMETHOD MultiTableId = (LOCKMETHOD) NULL;
+LOCKMETHOD LongTermTableId = (LOCKMETHOD) NULL;
+
#ifdef NOT_USED
-LOCKMETHOD ShortTermTableId = (LOCKMETHOD) NULL;
+LOCKMETHOD ShortTermTableId = (LOCKMETHOD) NULL;
+
#endif
/*
@@ -141,8 +143,8 @@ InitMultiLevelLocks()
{
int lockmethod;
- lockmethod = LockMethodTableInit("MultiLevelLockTable",
- MultiConflicts, MultiPrios, MAX_LOCKMODES - 1);
+ lockmethod = LockMethodTableInit("MultiLevelLockTable",
+ MultiConflicts, MultiPrios, MAX_LOCKMODES - 1);
MultiTableId = lockmethod;
if (!(MultiTableId))
elog(ERROR, "InitMultiLocks: couldnt initialize lock table");
@@ -157,6 +159,7 @@ InitMultiLevelLocks()
*/
#ifdef USER_LOCKS
+
/*
* Allocate another tableId for long-term locks
*/
@@ -420,7 +423,7 @@ MultiRelease(LOCKMETHOD lockmethod,
LOCKMODE lockmode,
PG_LOCK_LEVEL level)
{
- LOCKMODE locks[N_LEVELS];
+ LOCKMODE locks[N_LEVELS];
int i,
status;
LOCKTAG xxTag,
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 3fc2426031..650500de48 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.42 1998/09/01 03:25:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.43 1998/09/01 04:32:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,7 +46,7 @@
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.42 1998/09/01 03:25:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.43 1998/09/01 04:32:02 momjian Exp $
*/
#include <sys/time.h>
#include <unistd.h>
@@ -187,10 +187,10 @@ InitProcess(IPCKey key)
{
/*
- * have to allocate one. We can't use the normal shmem index table
- * mechanism because the proc structure is stored by PID instead
- * of by a global name (need to look it up by PID when we cleanup
- * dead processes).
+ * have to allocate one. We can't use the normal shmem index
+ * table mechanism because the proc structure is stored by PID
+ * instead of by a global name (need to look it up by PID when we
+ * cleanup dead processes).
*/
MyProc = (PROC *) ShmemAlloc((unsigned) sizeof(PROC));
@@ -364,6 +364,7 @@ ProcKill(int exitStatus, int pid)
LockReleaseAll(DEFAULT_LOCKMETHOD, &proc->lockQueue);
#ifdef USER_LOCKS
+
/*
* Assume we have a second lock table.
*/
@@ -440,12 +441,12 @@ ProcQueueInit(PROC_QUEUE *queue)
* NOTES: The process queue is now a priority queue for locking.
*/
int
-ProcSleep(PROC_QUEUE *waitQueue, /* lock->waitProcs */
+ProcSleep(PROC_QUEUE *waitQueue,/* lock->waitProcs */
SPINLOCK spinlock,
- int token, /* lockmode */
+ int token, /* lockmode */
int prio,
LOCK *lock,
- TransactionId xid) /* needed by user locks, see below */
+ TransactionId xid) /* needed by user locks, see below */
{
int i;
PROC *proc;
@@ -561,7 +562,7 @@ ProcSleep(PROC_QUEUE *waitQueue, /* lock->waitProcs */
#ifdef LOCK_MGR_DEBUG
/* Just to get meaningful debug messages from DumpLocks() */
- MyProc->waitLock = (LOCK *)NULL;
+ MyProc->waitLock = (LOCK *) NULL;
#endif
return MyProc->errType;
@@ -620,13 +621,13 @@ ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod, LOCK *lock)
count = 0;
while ((queue_size--) && (proc))
{
+
/*
- * This proc will conflict as the previous one did, don't even try.
+ * This proc will conflict as the previous one did, don't even
+ * try.
*/
if (proc->token == last_locktype)
- {
continue;
- }
/*
* This proc conflicts with locks held by others, ignored.
@@ -663,7 +664,8 @@ ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod, LOCK *lock)
if (count)
return STATUS_OK;
- else {
+ else
+ {
/* Something is still blocking us. May have deadlocked. */
trace_flag = (lock->tag.lockmethod == USER_LOCKMETHOD) ? \
TRACE_USERLOCKS : TRACE_LOCKS;
diff --git a/src/backend/storage/page/bufpage.c b/src/backend/storage/page/bufpage.c
index bd90d7a29d..674e5ecd99 100644
--- a/src/backend/storage/page/bufpage.c
+++ b/src/backend/storage/page/bufpage.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.19 1998/09/01 03:25:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.20 1998/09/01 04:32:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,8 +24,7 @@
#include "utils/memutils.h"
#include "storage/bufpage.h"
-static void
-PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
+static void PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
char *location, Size size);
static bool PageManagerShuffle = true; /* default is shuffle mode */
@@ -306,7 +305,7 @@ PageRepairFragmentation(Page page)
/* sort itemIdSortData array... */
qsort((char *) itemidbase, nused, sizeof(struct itemIdSortData),
- itemidcompare);
+ itemidcompare);
/* compactify page */
((PageHeader) page)->pd_upper = ((PageHeader) page)->pd_special;
diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c
index fb42163621..1c45872883 100644
--- a/src/backend/storage/smgr/md.c
+++ b/src/backend/storage/smgr/md.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.38 1998/09/01 03:25:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.39 1998/09/01 04:32:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -568,7 +568,7 @@ mdblindwrt(char *dbstr,
int4 owner;
Oid id;
char *tmpPath;
- int tmpEncoding;
+ int tmpEncoding;
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding);
@@ -607,7 +607,7 @@ mdblindwrt(char *dbstr,
int4 owner;
Oid id;
char *tmpPath;
- int tmpEncoding;
+ int tmpEncoding;
GetRawDatabaseInfo(dbstr, &owner, &id, dbpath, &tmpEncoding);
diff --git a/src/backend/storage/smgr/mm.c b/src/backend/storage/smgr/mm.c
index 4b9c9e885a..b3e72e37d6 100644
--- a/src/backend/storage/smgr/mm.c
+++ b/src/backend/storage/smgr/mm.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.11 1998/09/01 03:25:34 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/Attic/mm.c,v 1.12 1998/09/01 04:32:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -138,7 +138,7 @@ mminit()
return SM_FAIL;
}
- if (IsUnderPostmaster) /* was IsPostmaster bjm */
+ if (IsUnderPostmaster) /* was IsPostmaster bjm */
{
MemSet(mmcacheblk, 0, mmsize);
SpinRelease(MMCacheLock);
@@ -608,4 +608,4 @@ MMShmemSize()
return size;
}
-#endif /* STABLE_MEMORY_STORAGE */
+#endif /* STABLE_MEMORY_STORAGE */
diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c
index 75ea2297ef..f3d6cbfafc 100644
--- a/src/backend/storage/smgr/smgr.c
+++ b/src/backend/storage/smgr/smgr.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.19 1998/09/01 03:25:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.20 1998/09/01 04:32:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -132,7 +132,7 @@ smgrcreate(int16 which, Relation reln)
int fd;
if ((fd = (*(smgrsw[which].smgr_create)) (reln)) < 0)
- elog(ERROR, "cannot create %s", reln->rd_rel->relname.data);
+ elog(ERROR, "cannot create %s", reln->rd_rel->relname.data);
return fd;
}
@@ -251,7 +251,7 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer)
if (status == SM_FAIL)
elog(ERROR, "cannot write block %d of %s",
- blocknum, reln->rd_rel->relname.data);
+ blocknum, reln->rd_rel->relname.data);
return status;
}
@@ -349,7 +349,7 @@ smgrtruncate(int16 which, Relation reln, int nblocks)
{
if ((newblks = (*(smgrsw[which].smgr_truncate)) (reln, nblocks)) < 0)
elog(ERROR, "cannot truncate %s to %d blocks",
- reln->rd_rel->relname.data, nblocks);
+ reln->rd_rel->relname.data, nblocks);
}
return newblks;
diff --git a/src/backend/tcop/dest.c b/src/backend/tcop/dest.c
index 11ba43f2e5..0c1a7c530f 100644
--- a/src/backend/tcop/dest.c
+++ b/src/backend/tcop/dest.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.22 1998/09/01 03:25:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/dest.c,v 1.23 1998/09/01 04:32:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -172,8 +172,8 @@ NullCommand(CommandDest dest)
{
switch (dest)
{
- case RemoteInternal:
- case Remote:
+ case RemoteInternal:
+ case Remote:
{
/* ----------------
* tell the fe that we saw an empty query string
@@ -206,8 +206,8 @@ ReadyForQuery(CommandDest dest)
{
switch (dest)
{
- case RemoteInternal:
- case Remote:
+ case RemoteInternal:
+ case Remote:
{
if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)
pq_putnchar("Z", 1);
diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c
index 37c56d9200..ec609a5db7 100644
--- a/src/backend/tcop/fastpath.c
+++ b/src/backend/tcop/fastpath.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.20 1998/09/01 03:25:40 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.21 1998/09/01 04:32:11 momjian Exp $
*
* NOTES
* This cruft is the server side of PQfn.
@@ -350,7 +350,7 @@ HandleFunctionRequest()
#else
retval = NULL;
-#endif /* NO_FASTPATH */
+#endif /* NO_FASTPATH */
/* free palloc'ed arguments */
for (i = 0; i < nargs; ++i)
@@ -368,7 +368,7 @@ HandleFunctionRequest()
SendFunctionResult(fid, retval, fip->retbyval, fip->retlen);
#else
SendFunctionResult(fid, retval, fip->retbyval, 0);
-#endif /* NO_FASTPATH */
+#endif /* NO_FASTPATH */
if (!fip->retbyval)
pfree(retval);
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 9839901d4d..2d9479e771 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.88 1998/09/01 03:25:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.89 1998/09/01 04:32:13 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -35,7 +35,7 @@
#include <errno.h>
#if HAVE_SYS_SELECT_H
#include <sys/select.h>
-#endif /* aix */
+#endif /* aix */
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -140,8 +140,8 @@ jmp_buf Warn_restart;
#else
sigjmp_buf Warn_restart;
-#endif /* defined(nextstep) */
-bool InError;
+#endif /* defined(nextstep) */
+bool InError;
extern int NBuffers;
@@ -162,7 +162,7 @@ int UseNewLine = 1; /* Use newlines query delimiters (the
#else
int UseNewLine = 0; /* Use EOF as query delimiters */
-#endif /* TCOP_DONTUSENEWLINE */
+#endif /* TCOP_DONTUSENEWLINE */
/* ----------------
* bushy tree plan flag: if true planner will generate bushy-tree
@@ -445,27 +445,33 @@ pg_parse_and_plan(char *query_string, /* string to execute */
if (DebugPrintQuery)
{
- if (DebugPrintQuery > 3) {
+ if (DebugPrintQuery > 3)
+ {
/* Print the query string as is if query debug level > 3 */
- TPRINTF(TRACE_QUERY, "query: %s",query_string);
- } else {
+ TPRINTF(TRACE_QUERY, "query: %s", query_string);
+ }
+ else
+ {
/* Print condensed query string to fit in one log line */
- char buff[8192+1];
- char c,
- *s,
- *d;
- int n,
- is_space=1;
-
- for (s=query_string,d=buff,n=0; (c=*s) && (n<8192); s++) {
- switch (c) {
+ char buff[8192 + 1];
+ char c,
+ *s,
+ *d;
+ int n,
+ is_space = 1;
+
+ for (s = query_string, d = buff, n = 0; (c = *s) && (n < 8192); s++)
+ {
+ switch (c)
+ {
case '\r':
case '\n':
case '\t':
c = ' ';
/* fall through */
case ' ':
- if (is_space) continue;
+ if (is_space)
+ continue;
is_space = 1;
break;
default:
@@ -476,7 +482,7 @@ pg_parse_and_plan(char *query_string, /* string to execute */
n++;
}
*d = '\0';
- TPRINTF(TRACE_QUERY, "query: %s",buff);
+ TPRINTF(TRACE_QUERY, "query: %s", buff);
}
}
@@ -549,17 +555,20 @@ pg_parse_and_plan(char *query_string, /* string to execute */
/*
* Override ACL checking if requested
*/
- if (aclOverride) {
- for (i = 0; i < querytree_list->len; i++) {
- RangeTblEntry *rte;
- List *l;
+ if (aclOverride)
+ {
+ for (i = 0; i < querytree_list->len; i++)
+ {
+ RangeTblEntry *rte;
+ List *l;
querytree = querytree_list->qtrees[i];
if (querytree->commandType == CMD_UTILITY)
continue;
- foreach (l, querytree->rtable) {
- rte = (RangeTblEntry *)lfirst(l);
+ foreach(l, querytree->rtable)
+ {
+ rte = (RangeTblEntry *) lfirst(l);
rte->skipAcl = TRUE;
}
@@ -652,7 +661,8 @@ pg_parse_and_plan(char *query_string, /* string to execute */
* Check if the rewriting had thrown away anything
* ----------
*/
- if (querytree_list->len == 0) {
+ if (querytree_list->len == 0)
+ {
free(querytree_list->qtrees);
free(querytree_list);
querytree_list = NULL;
@@ -696,10 +706,8 @@ pg_exec_query_acl_override(char *query_string)
void
pg_exec_query_dest(char *query_string, /* string to execute */
CommandDest dest, /* where results should go */
- bool aclOverride) /* to give utility
- * commands power of
- * superusers
- */
+ bool aclOverride) /* to give utility commands power
+ * of superusers */
{
List *plan_list;
Plan *plan;
@@ -713,7 +721,7 @@ pg_exec_query_dest(char *query_string, /* string to execute */
if (QueryCancel)
CancelQuery();
-
+
/* pg_parse_and_plan could have failed */
if (querytree_list == NULL)
return;
@@ -740,11 +748,10 @@ pg_exec_query_dest(char *query_string, /* string to execute */
* because that is done in ProcessUtility.
* ----------------
*/
- if (DebugPrintQuery) {
+ if (DebugPrintQuery)
TPRINTF(TRACE_QUERY, "ProcessUtility: %s", query_string);
- } else if (Verbose) {
+ else if (Verbose)
TPRINTF(TRACE_VERBOSE, "ProcessUtility");
- }
ProcessUtility(querytree->utilityStmt, dest);
@@ -787,9 +794,7 @@ pg_exec_query_dest(char *query_string, /* string to execute */
for (j = 0; j < _exec_repeat_; j++)
{
if (Verbose)
- {
TPRINTF(TRACE_VERBOSE, "ProcessQuery");
- }
ProcessQuery(querytree, plan, dest);
}
@@ -880,7 +885,9 @@ QueryCancelHandler(SIGNAL_ARGS)
void
CancelQuery(void)
{
- /* QueryCancel flag will be reset in main loop, which we reach by
+
+ /*
+ * QueryCancel flag will be reset in main loop, which we reach by
* longjmp from elog().
*/
elog(ERROR, "Query was cancelled.");
@@ -923,28 +930,28 @@ usage(char *progname)
int
PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
{
- bool flagC = false,
- flagQ = false,
- flagE = false,
- flagEu = false;
- int flag;
+ bool flagC = false,
+ flagQ = false,
+ flagE = false,
+ flagEu = false;
+ int flag;
- char *DBName = NULL;
- int errs = 0;
+ char *DBName = NULL;
+ int errs = 0;
- char firstchar;
- char parser_input[MAX_PARSE_BUFFER];
- char *userName;
+ char firstchar;
+ char parser_input[MAX_PARSE_BUFFER];
+ char *userName;
/* Used if verbose is set, must be initialized */
- char *remote_info = "interactive";
- char *remote_host = "";
- unsigned short remote_port = 0;
+ char *remote_info = "interactive";
+ char *remote_host = "";
+ unsigned short remote_port = 0;
- char *DBDate = NULL;
- extern int optind;
- extern char *optarg;
- extern short DebugLvl;
+ char *DBDate = NULL;
+ extern int optind;
+ extern char *optarg;
+ extern short DebugLvl;
/* ----------------
* parse command line arguments
@@ -992,14 +999,14 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
else if (strcasecmp(DBDate, "EURO") == 0)
EuroDates = TRUE;
}
-
+
/*
* Read default pg_options from file $DATADIR/pg_options.
*/
read_pg_options(0);
- optind = 1; /* reset after postmaster usage */
-
+ optind = 1; /* reset after postmaster usage */
+
while ((flag = getopt(argc, argv,
"A:B:bCD:d:Eef:iK:Lm:MNo:P:pQS:st:v:x:FW:"))
!= EOF)
@@ -1007,7 +1014,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
{
case 'A':
/* ----------------
- * enable/disable assert checking.
+ * enable/disable assert checking.
* ----------------
*/
#ifdef USE_ASSERT_CHECKING
@@ -1048,19 +1055,13 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
flagQ = false;
DebugLvl = (short) atoi(optarg);
if (DebugLvl >= 1)
- {
Verbose = DebugLvl;
- }
if (DebugLvl >= 2)
- {
- DebugPrintQuery = true;
- }
+ DebugPrintQuery = true;
if (DebugLvl >= 3)
- {
DebugPrintQuery = DebugLvl;
- }
if (DebugLvl >= 4)
- {
+ {
DebugPrintParse = true;
DebugPrintPlan = true;
DebugPrintRewrittenParsetree = true;
@@ -1211,7 +1212,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
StatFp = stderr;
break;
- case 'T':
+ case 'T':
parse_options(optarg);
break;
@@ -1252,7 +1253,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
case 'W':
/* ----------------
- * wait N seconds to allow attach from a debugger
+ * wait N seconds to allow attach from a debugger
* ----------------
*/
sleep(atoi(optarg));
@@ -1352,33 +1353,38 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
/*
* Find remote host name or address.
*/
- if (IsUnderPostmaster) {
- switch (MyProcPort->raddr.sa.sa_family) {
- struct hostent *host_ent;
+ if (IsUnderPostmaster)
+ {
+ switch (MyProcPort->raddr.sa.sa_family)
+ {
+ struct hostent *host_ent;
- case AF_INET:
+ case AF_INET:
remote_info = remote_host = malloc(48);
remote_port = ntohs(MyProcPort->raddr.in.sin_port);
strcpy(remote_host, inet_ntoa(MyProcPort->raddr.in.sin_addr));
- if (HostnameLookup) {
+ if (HostnameLookup)
+ {
host_ent = \
- gethostbyaddr((char *)&MyProcPort->raddr.in.sin_addr,
- sizeof(MyProcPort->raddr.in.sin_addr),
+ gethostbyaddr((char *) &MyProcPort->raddr.in.sin_addr,
+ sizeof(MyProcPort->raddr.in.sin_addr),
AF_INET);
- if (host_ent) {
+ if (host_ent)
+ {
strncpy(remote_host, host_ent->h_name, 48);
- *(remote_host+47) = '\0';
+ *(remote_host + 47) = '\0';
}
}
- if (ShowPortNumber) {
- remote_info = malloc(strlen(remote_host)+6);
+ if (ShowPortNumber)
+ {
+ remote_info = malloc(strlen(remote_host) + 6);
sprintf(remote_info, "%s:%d", remote_host, remote_port);
}
break;
- case AF_UNIX:
+ case AF_UNIX:
remote_info = remote_host = "localhost";
break;
- default:
+ default:
remote_info = remote_host = "unknown";
break;
}
@@ -1388,8 +1394,9 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
* set process params for ps
* ----------------
*/
- if (IsUnderPostmaster) {
- PS_INIT_STATUS(real_argc, real_argv, argv[0],
+ if (IsUnderPostmaster)
+ {
+ PS_INIT_STATUS(real_argc, real_argv, argv[0],
remote_info, userName, DBName);
PS_SET_STATUS("idle");
}
@@ -1400,10 +1407,13 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
*/
if (Verbose)
{
- if (Verbose == 1) {
+ if (Verbose == 1)
+ {
TPRINTF(TRACE_VERBOSE, "started: host=%s user=%s database=%s",
remote_host, userName, DBName);
- } else {
+ }
+ else
+ {
TPRINTF(TRACE_VERBOSE, "debug info:");
TPRINTF(TRACE_VERBOSE, "\tUser = %s", userName);
TPRINTF(TRACE_VERBOSE, "\tRemoteHost = %s", remote_host);
@@ -1449,32 +1459,28 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
#ifdef MULTIBYTE
/* set default client encoding */
if (Verbose)
- {
puts("\treset_client_encoding()..");
- }
reset_client_encoding();
if (Verbose)
- {
puts("\treset_client_encoding() done.");
- }
#endif
/* ----------------
- * Set up handler for cancel-request signal, and
+ * Set up handler for cancel-request signal, and
* send this backend's cancellation info to the frontend.
* This should not be done until we are sure startup is successful.
* ----------------
*/
- pqsignal(SIGHUP, read_pg_options); /* upate pg_options from file */
- pqsignal(SIGINT, QueryCancelHandler); /* cancel current query */
- pqsignal(SIGQUIT, handle_warn); /* handle error */
+ pqsignal(SIGHUP, read_pg_options); /* upate pg_options from file */
+ pqsignal(SIGINT, QueryCancelHandler); /* cancel current query */
+ pqsignal(SIGQUIT, handle_warn); /* handle error */
pqsignal(SIGTERM, die);
pqsignal(SIGPIPE, die);
pqsignal(SIGUSR1, quickdie);
- pqsignal(SIGUSR2, Async_NotifyHandler); /* flush also sinval cache */
- pqsignal(SIGCHLD, SIG_IGN); /* ignored, sent by LockOwners */
- pqsignal(SIGFPE, FloatExceptionHandler);
+ pqsignal(SIGUSR2, Async_NotifyHandler); /* flush also sinval cache */
+ pqsignal(SIGCHLD, SIG_IGN); /* ignored, sent by LockOwners */
+ pqsignal(SIGFPE, FloatExceptionHandler);
if (whereToSendOutput == Remote &&
PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)
@@ -1521,7 +1527,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface");
- puts("$Revision: 1.88 $ $Date: 1998/09/01 03:25:41 $");
+ puts("$Revision: 1.89 $ $Date: 1998/09/01 04:32:13 $");
}
/* ----------------
@@ -1564,9 +1570,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
/* start an xact for this function invocation */
if (Verbose)
- {
TPRINTF(TRACE_VERBOSE, "StartTransactionCommand");
- }
StartTransactionCommand();
HandleFunctionRequest();
@@ -1601,9 +1605,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
/* start an xact for this query */
if (Verbose)
- {
TPRINTF(TRACE_VERBOSE, "StartTransactionCommand");
- }
StartTransactionCommand();
pg_exec_query(parser_input);
@@ -1638,9 +1640,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if (!IsEmptyQuery)
{
if (Verbose)
- {
TPRINTF(TRACE_VERBOSE, "CommitTransactionCommand");
- }
PS_SET_STATUS("commit");
CommitTransactionCommand();
PS_SET_STATUS("idle");
@@ -1661,7 +1661,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
#include "rusagestub.h"
#else /* HAVE_GETRUSAGE */
#include <sys/resource.h>
-#endif /* HAVE_GETRUSAGE */
+#endif /* HAVE_GETRUSAGE */
struct rusage Save_r;
struct timeval Save_t;
@@ -1756,7 +1756,7 @@ ShowUsage(void)
r.ru_nvcsw - Save_r.ru_nvcsw,
r.ru_nivcsw - Save_r.ru_nivcsw,
r.ru_nvcsw, r.ru_nivcsw);
-#endif /* HAVE_GETRUSAGE */
+#endif /* HAVE_GETRUSAGE */
fprintf(StatFp, "! postgres usage stats:\n");
PrintBufferUsage(StatFp);
/* DisplayTupleCount(StatFp); */
@@ -1776,14 +1776,16 @@ assertTest(int val)
{
Assert(val == 0);
- if (assert_enabled) {
+ if (assert_enabled)
+ {
/* val != 0 should be trapped by previous Assert */
elog(NOTICE, "Assert test successfull (val = %d)", val);
- } else {
- elog(NOTICE, "Assert checking is disabled (val = %d)", val);
}
+ else
+ elog(NOTICE, "Assert checking is disabled (val = %d)", val);
return val;
}
+
#endif
#endif
diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c
index 5220ac7700..2496bdfdc1 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.17 1998/08/25 21:24:07 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.18 1998/09/01 04:32:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -227,7 +227,7 @@ ProcessQueryDesc(QueryDesc *queryDesc)
plan = queryDesc->plantree;
operation = queryDesc->operation;
- PS_SET_STATUS( tag = CreateOperationTag(operation) );
+ PS_SET_STATUS(tag = CreateOperationTag(operation));
dest = queryDesc->dest;
/* ----------------
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index a8203a40e4..afec8896a6 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.48 1998/08/25 21:36:56 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.49 1998/09/01 04:32:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -108,18 +108,18 @@ ProcessUtility(Node *parsetree,
switch (stmt->command)
{
case BEGIN_TRANS:
- PS_SET_STATUS( commandTag = "BEGIN" );
+ PS_SET_STATUS(commandTag = "BEGIN");
CHECK_IF_ABORTED();
BeginTransactionBlock();
break;
case END_TRANS:
- PS_SET_STATUS( commandTag = "END" );
+ PS_SET_STATUS(commandTag = "END");
EndTransactionBlock();
break;
case ABORT_TRANS:
- PS_SET_STATUS( commandTag = "ABORT" );
+ PS_SET_STATUS(commandTag = "ABORT");
UserAbortTransactionBlock();
break;
}
@@ -134,7 +134,7 @@ ProcessUtility(Node *parsetree,
{
ClosePortalStmt *stmt = (ClosePortalStmt *) parsetree;
- PS_SET_STATUS( commandTag = "CLOSE" );
+ PS_SET_STATUS(commandTag = "CLOSE");
CHECK_IF_ABORTED();
PerformPortalClose(stmt->portalname, dest);
@@ -148,7 +148,7 @@ ProcessUtility(Node *parsetree,
bool forward;
int count;
- PS_SET_STATUS( commandTag = (stmt->ismove) ? "MOVE" : "FETCH" );
+ PS_SET_STATUS(commandTag = (stmt->ismove) ? "MOVE" : "FETCH");
CHECK_IF_ABORTED();
forward = (bool) (stmt->direction == FORWARD);
@@ -169,7 +169,7 @@ ProcessUtility(Node *parsetree,
*
*/
case T_CreateStmt:
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
DefineRelation((CreateStmt *) parsetree, RELKIND_RELATION);
@@ -182,7 +182,7 @@ ProcessUtility(Node *parsetree,
List *args = stmt->relNames;
Relation rel;
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
foreach(arg, args)
@@ -222,7 +222,7 @@ ProcessUtility(Node *parsetree,
{
CopyStmt *stmt = (CopyStmt *) parsetree;
- PS_SET_STATUS( commandTag = "COPY" );
+ PS_SET_STATUS(commandTag = "COPY");
CHECK_IF_ABORTED();
DoCopy(stmt->relname,
@@ -244,7 +244,7 @@ ProcessUtility(Node *parsetree,
{
AddAttrStmt *stmt = (AddAttrStmt *) parsetree;
- PS_SET_STATUS( commandTag = "ADD" );
+ PS_SET_STATUS(commandTag = "ADD");
CHECK_IF_ABORTED();
/*
@@ -265,7 +265,7 @@ ProcessUtility(Node *parsetree,
{
RenameStmt *stmt = (RenameStmt *) parsetree;
- PS_SET_STATUS( commandTag = "RENAME" );
+ PS_SET_STATUS(commandTag = "RENAME");
CHECK_IF_ABORTED();
relname = stmt->relname;
@@ -323,7 +323,7 @@ ProcessUtility(Node *parsetree,
AclItem *aip;
unsigned modechg;
- PS_SET_STATUS( commandTag = "CHANGE" );
+ PS_SET_STATUS(commandTag = "CHANGE");
CHECK_IF_ABORTED();
aip = stmt->aclitem;
@@ -356,7 +356,7 @@ ProcessUtility(Node *parsetree,
{
DefineStmt *stmt = (DefineStmt *) parsetree;
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
switch (stmt->defType)
@@ -366,7 +366,7 @@ ProcessUtility(Node *parsetree,
stmt->definition); /* rest */
break;
case TYPE_P:
- DefineType(stmt->defname, stmt->definition);
+ DefineType(stmt->defname, stmt->definition);
break;
case AGGREGATE:
DefineAggregate(stmt->defname, /* aggregate name */
@@ -380,14 +380,14 @@ ProcessUtility(Node *parsetree,
{
ViewStmt *stmt = (ViewStmt *) parsetree;
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
DefineView(stmt->viewname, stmt->query); /* retrieve parsetree */
}
break;
case T_ProcedureStmt: /* CREATE FUNCTION */
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
CreateFunction((ProcedureStmt *) parsetree, dest); /* everything */
break;
@@ -396,7 +396,7 @@ ProcessUtility(Node *parsetree,
{
IndexStmt *stmt = (IndexStmt *) parsetree;
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
DefineIndex(stmt->relname, /* relation name */
stmt->idxname, /* index name */
@@ -420,14 +420,14 @@ ProcessUtility(Node *parsetree,
if (aclcheck_result != ACLCHECK_OK)
elog(ERROR, "%s: %s", relname, aclcheck_error_strings[aclcheck_result]);
#endif
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
DefineQueryRewrite(stmt);
}
break;
case T_CreateSeqStmt:
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
DefineSequence((CreateSeqStmt *) parsetree);
@@ -437,7 +437,7 @@ ProcessUtility(Node *parsetree,
{
ExtendStmt *stmt = (ExtendStmt *) parsetree;
- PS_SET_STATUS( commandTag = "EXTEND" );
+ PS_SET_STATUS(commandTag = "EXTEND");
CHECK_IF_ABORTED();
ExtendIndex(stmt->idxname, /* index name */
@@ -450,7 +450,7 @@ ProcessUtility(Node *parsetree,
{
RemoveStmt *stmt = (RemoveStmt *) parsetree;
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
switch (stmt->removeType)
@@ -512,7 +512,7 @@ ProcessUtility(Node *parsetree,
{
RemoveAggrStmt *stmt = (RemoveAggrStmt *) parsetree;
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
RemoveAggregate(stmt->aggname, stmt->aggtype);
}
@@ -522,7 +522,7 @@ ProcessUtility(Node *parsetree,
{
RemoveFuncStmt *stmt = (RemoveFuncStmt *) parsetree;
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
RemoveFunction(stmt->funcname,
length(stmt->args),
@@ -536,7 +536,7 @@ ProcessUtility(Node *parsetree,
char *type1 = (char *) NULL;
char *type2 = (char *) NULL;
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
if (lfirst(stmt->args) != NULL)
@@ -548,14 +548,14 @@ ProcessUtility(Node *parsetree,
break;
case T_VersionStmt:
- elog(ERROR, "CREATE VERSION is not currently implemented");
+ elog(ERROR, "CREATE VERSION is not currently implemented");
break;
case T_CreatedbStmt:
{
CreatedbStmt *stmt = (CreatedbStmt *) parsetree;
- PS_SET_STATUS( commandTag = "CREATEDB" );
+ PS_SET_STATUS(commandTag = "CREATEDB");
CHECK_IF_ABORTED();
createdb(stmt->dbname, stmt->dbpath, stmt->encoding);
}
@@ -565,7 +565,7 @@ ProcessUtility(Node *parsetree,
{
DestroydbStmt *stmt = (DestroydbStmt *) parsetree;
- PS_SET_STATUS( commandTag = "DESTROYDB" );
+ PS_SET_STATUS(commandTag = "DESTROYDB");
CHECK_IF_ABORTED();
destroydb(stmt->dbname);
}
@@ -576,7 +576,7 @@ ProcessUtility(Node *parsetree,
{
NotifyStmt *stmt = (NotifyStmt *) parsetree;
- PS_SET_STATUS( commandTag = "NOTIFY" );
+ PS_SET_STATUS(commandTag = "NOTIFY");
CHECK_IF_ABORTED();
Async_Notify(stmt->relname);
@@ -587,7 +587,7 @@ ProcessUtility(Node *parsetree,
{
ListenStmt *stmt = (ListenStmt *) parsetree;
- PS_SET_STATUS( commandTag = "LISTEN" );
+ PS_SET_STATUS(commandTag = "LISTEN");
CHECK_IF_ABORTED();
Async_Listen(stmt->relname, MyProcPid);
@@ -598,7 +598,7 @@ ProcessUtility(Node *parsetree,
{
UnlistenStmt *stmt = (UnlistenStmt *) parsetree;
- PS_SET_STATUS( commandTag = "UNLISTEN" );
+ PS_SET_STATUS(commandTag = "UNLISTEN");
CHECK_IF_ABORTED();
Async_Unlisten(stmt->relname, MyProcPid);
@@ -615,7 +615,7 @@ ProcessUtility(Node *parsetree,
FILE *fp;
char *filename;
- PS_SET_STATUS( commandTag = "LOAD" );
+ PS_SET_STATUS(commandTag = "LOAD");
CHECK_IF_ABORTED();
filename = stmt->filename;
@@ -631,7 +631,7 @@ ProcessUtility(Node *parsetree,
{
ClusterStmt *stmt = (ClusterStmt *) parsetree;
- PS_SET_STATUS( commandTag = "CLUSTER" );
+ PS_SET_STATUS(commandTag = "CLUSTER");
CHECK_IF_ABORTED();
cluster(stmt->relname, stmt->indexname);
@@ -639,7 +639,7 @@ ProcessUtility(Node *parsetree,
break;
case T_VacuumStmt:
- PS_SET_STATUS( commandTag = "VACUUM" );
+ PS_SET_STATUS(commandTag = "VACUUM");
CHECK_IF_ABORTED();
vacuum(((VacuumStmt *) parsetree)->vacrel,
((VacuumStmt *) parsetree)->verbose,
@@ -651,7 +651,7 @@ ProcessUtility(Node *parsetree,
{
ExplainStmt *stmt = (ExplainStmt *) parsetree;
- PS_SET_STATUS( commandTag = "EXPLAIN" );
+ PS_SET_STATUS(commandTag = "EXPLAIN");
CHECK_IF_ABORTED();
ExplainQuery(stmt->query, stmt->verbose, dest);
@@ -665,7 +665,7 @@ ProcessUtility(Node *parsetree,
{
RecipeStmt *stmt = (RecipeStmt *) parsetree;
- PS_SET_STATUS( commandTag = "EXECUTE RECIPE" );
+ PS_SET_STATUS(commandTag = "EXECUTE RECIPE");
CHECK_IF_ABORTED();
beginRecipe(stmt);
}
@@ -679,7 +679,7 @@ ProcessUtility(Node *parsetree,
VariableSetStmt *n = (VariableSetStmt *) parsetree;
SetPGVariable(n->name, n->value);
- PS_SET_STATUS( commandTag = "SET VARIABLE" );
+ PS_SET_STATUS(commandTag = "SET VARIABLE");
}
break;
@@ -688,7 +688,7 @@ ProcessUtility(Node *parsetree,
VariableShowStmt *n = (VariableShowStmt *) parsetree;
GetPGVariable(n->name);
- PS_SET_STATUS( commandTag = "SHOW VARIABLE" );
+ PS_SET_STATUS(commandTag = "SHOW VARIABLE");
}
break;
@@ -697,7 +697,7 @@ ProcessUtility(Node *parsetree,
VariableResetStmt *n = (VariableResetStmt *) parsetree;
ResetPGVariable(n->name);
- PS_SET_STATUS( commandTag = "RESET VARIABLE" );
+ PS_SET_STATUS(commandTag = "RESET VARIABLE");
}
break;
@@ -705,14 +705,14 @@ ProcessUtility(Node *parsetree,
* ******************************** TRIGGER statements *******************************
*/
case T_CreateTrigStmt:
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
CreateTrigger((CreateTrigStmt *) parsetree);
break;
case T_DropTrigStmt:
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
DropTrigger((DropTrigStmt *) parsetree);
@@ -722,14 +722,14 @@ ProcessUtility(Node *parsetree,
* ************* PROCEDURAL LANGUAGE statements *****************
*/
case T_CreatePLangStmt:
- PS_SET_STATUS( commandTag = "CREATE" );
+ PS_SET_STATUS(commandTag = "CREATE");
CHECK_IF_ABORTED();
CreateProceduralLanguage((CreatePLangStmt *) parsetree);
break;
case T_DropPLangStmt:
- PS_SET_STATUS( commandTag = "DROP" );
+ PS_SET_STATUS(commandTag = "DROP");
CHECK_IF_ABORTED();
DropProceduralLanguage((DropPLangStmt *) parsetree);
@@ -740,21 +740,21 @@ ProcessUtility(Node *parsetree,
*
*/
case T_CreateUserStmt:
- PS_SET_STATUS( commandTag = "CREATE USER" );
+ PS_SET_STATUS(commandTag = "CREATE USER");
CHECK_IF_ABORTED();
DefineUser((CreateUserStmt *) parsetree);
break;
case T_AlterUserStmt:
- PS_SET_STATUS( commandTag = "ALTER USER" );
+ PS_SET_STATUS(commandTag = "ALTER USER");
CHECK_IF_ABORTED();
AlterUser((AlterUserStmt *) parsetree);
break;
case T_DropUserStmt:
- PS_SET_STATUS( commandTag = "DROP USER" );
+ PS_SET_STATUS(commandTag = "DROP USER");
CHECK_IF_ABORTED();
RemoveUser(((DropUserStmt *) parsetree)->user);
diff --git a/src/backend/tioga/Arr_TgRecipe.h b/src/backend/tioga/Arr_TgRecipe.h
index ddfcf8ce38..a382411455 100644
--- a/src/backend/tioga/Arr_TgRecipe.h
+++ b/src/backend/tioga/Arr_TgRecipe.h
@@ -29,7 +29,7 @@
#ifndef ARR_TgString_INITIAL_SIZE
#define ARR_TgString_INITIAL_SIZE 32 /* change this size to suit your
* need */
-#endif /* ARR_TgString_INITIAL_SIZE */
+#endif /* ARR_TgString_INITIAL_SIZE */
typedef struct Arr_TgString
{
@@ -53,7 +53,7 @@ typedef struct Arr_TgString
#define deleteArr_TgString(A) FreeVarray(A)
-#endif /* _ARR_TgString_ */
+#endif /* _ARR_TgString_ */
/* -- Defining types and function for Arr_TgElementPtr type -- */
/* -- the following must be supplied by the user:
@@ -67,7 +67,7 @@ typedef struct Arr_TgString
#ifndef ARR_TgElementPtr_INITIAL_SIZE
#define ARR_TgElementPtr_INITIAL_SIZE 32 /* change this size to
* suit your need */
-#endif /* ARR_TgElementPtr_INITIAL_SIZE */
+#endif /* ARR_TgElementPtr_INITIAL_SIZE */
typedef struct Arr_TgElementPtr
{
@@ -91,7 +91,7 @@ typedef struct Arr_TgElementPtr
#define deleteArr_TgElementPtr(A) FreeVarray(A)
-#endif /* _ARR_TgElementPtr_ */
+#endif /* _ARR_TgElementPtr_ */
/* -- Defining types and function for Arr_TgNodePtr type -- */
/* -- the following must be supplied by the user:
@@ -105,7 +105,7 @@ typedef struct Arr_TgElementPtr
#ifndef ARR_TgNodePtr_INITIAL_SIZE
#define ARR_TgNodePtr_INITIAL_SIZE 32 /* change this size to suit your
* need */
-#endif /* ARR_TgNodePtr_INITIAL_SIZE */
+#endif /* ARR_TgNodePtr_INITIAL_SIZE */
typedef struct Arr_TgNodePtr
{
@@ -129,4 +129,4 @@ typedef struct Arr_TgNodePtr
#define deleteArr_TgNodePtr(A) FreeVarray(A)
-#endif /* _ARR_TgNodePtr_ */
+#endif /* _ARR_TgNodePtr_ */
diff --git a/src/backend/tioga/Varray.h b/src/backend/tioga/Varray.h
index 3b229ce462..aed53855a4 100644
--- a/src/backend/tioga/Varray.h
+++ b/src/backend/tioga/Varray.h
@@ -45,4 +45,4 @@ typedef void (*CopyingFunct) (void *from, void *to);
extern Varray *NewVarray(size_t nobj, size_t size);
extern int AppendVarray(Varray * array, void *value, CopyingFunct copy);
-#endif /* _VARRAY_H_ */
+#endif /* _VARRAY_H_ */
diff --git a/src/backend/tioga/tgRecipe.c b/src/backend/tioga/tgRecipe.c
index ab2697085e..0b0e9fa187 100644
--- a/src/backend/tioga/tgRecipe.c
+++ b/src/backend/tioga/tgRecipe.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.9 1998/06/15 19:29:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.10 1998/09/01 04:32:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,8 +50,7 @@ static TgRecipe *fillTgRecipe(PortalBuffer *pbuf, int tupno);
static void lookupEdges(TgRecipe * r, char *name);
static void fillAllNodes(TgRecipe * r, char *name);
static void fillAllElements(TgRecipe * r, char *name);
-static TgNode *
-connectTee(TgRecipe * r, TgNodePtr fromNode, TgNodePtr toNode,
+static TgNode *connectTee(TgRecipe * r, TgNodePtr fromNode, TgNodePtr toNode,
int fromPort, int toPort);
/*
diff --git a/src/backend/tioga/tgRecipe.h b/src/backend/tioga/tgRecipe.h
index 9ffbf20d33..b344bbaba9 100644
--- a/src/backend/tioga/tgRecipe.h
+++ b/src/backend/tioga/tgRecipe.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tgRecipe.h,v 1.6 1998/02/26 04:36:45 momjian Exp $
+ * $Id: tgRecipe.h,v 1.7 1998/09/01 04:32:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,9 +33,11 @@ typedef struct
*
*
*
+ *
+ *
* geo-decls.h */
-#endif /* TIOGA_FRONTEND */
+#endif /* TIOGA_FRONTEND */
typedef enum
{
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index db5ea074c8..15c590dc81 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.30 1998/09/01 03:25:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.31 1998/09/01 04:32:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -151,8 +151,8 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
{
case ACL_IDTYPE_UID:
htup = SearchSysCacheTuple(USENAME,
- PointerGetDatum(name),
- 0, 0, 0);
+ PointerGetDatum(name),
+ 0, 0, 0);
if (!HeapTupleIsValid(htup))
elog(ERROR, "aclparse: non-existent user \"%s\"", name);
aip->ai_id = ((Form_pg_shadow) GETSTRUCT(htup))->usesysid;
@@ -262,8 +262,8 @@ aclitemout(AclItem *aip)
{
case ACL_IDTYPE_UID:
htup = SearchSysCacheTuple(USESYSID,
- ObjectIdGetDatum(aip->ai_id),
- 0, 0, 0);
+ ObjectIdGetDatum(aip->ai_id),
+ 0, 0, 0);
if (!HeapTupleIsValid(htup))
{
char *tmp = int2out(aip->ai_id);
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index cb604baa0f..04a224feae 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.33 1998/09/01 03:25:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.34 1998/09/01 04:32:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,23 +43,19 @@
/*-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-*/
static int _ArrayCount(char *str, int *dim, int typdelim);
-static char *
-_ReadArrayStr(char *arrayStr, int nitems, int ndim, int *dim,
+static char *_ReadArrayStr(char *arrayStr, int nitems, int ndim, int *dim,
FmgrInfo *inputproc, Oid typelem, int32 typmod,
char typdelim, int typlen, bool typbyval,
char typalign, int *nbytes);
#ifdef LOARRAY
-static char *
-_ReadLOArray(char *str, int *nbytes, int *fd, bool *chunkFlag,
+static char *_ReadLOArray(char *str, int *nbytes, int *fd, bool *chunkFlag,
int ndim, int *dim, int baseSize);
#endif
-static void
-_CopyArrayEls(char **values, char *p, int nitems, int typlen,
+static void _CopyArrayEls(char **values, char *p, int nitems, int typlen,
char typalign, bool typbyval);
-static void
-system_cache_lookup(Oid element_type, bool input, int *typlen,
+static void system_cache_lookup(Oid element_type, bool input, int *typlen,
bool *typbyval, char *typdelim, Oid *typelem, Oid *proc,
char *typalign);
static Datum _ArrayCast(char *value, bool byval, int len);
@@ -68,18 +64,15 @@ static Datum _ArrayCast(char *value, bool byval, int len);
static char *_AdvanceBy1word(char *str, char **word);
#endif
-static void
-_ArrayRange(int *st, int *endp, int bsize, char *destPtr,
+static void _ArrayRange(int *st, int *endp, int bsize, char *destPtr,
ArrayType *array, int from);
static int _ArrayClipCount(int *stI, int *endpI, ArrayType *array);
-static void
-_LOArrayRange(int *st, int *endp, int bsize, int srcfd,
+static void _LOArrayRange(int *st, int *endp, int bsize, int srcfd,
int destfd, ArrayType *array, int isSrcLO, bool *isNull);
-static void
-_ReadArray(int *st, int *endp, int bsize, int srcfd, int destfd,
+static void _ReadArray(int *st, int *endp, int bsize, int srcfd, int destfd,
ArrayType *array, int isDestLO, bool *isNull);
-static int ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
-static int SanityCheckInput(int ndim, int n, int *dim, int *lb, int *indx);
+static int ArrayCastAndSet(char *src, bool typbyval, int typlen, char *dest);
+static int SanityCheckInput(int ndim, int n, int *dim, int *lb, int *indx);
static int array_read(char *destptr, int eltsize, int nitems, char *srcptr);
static char *array_seek(char *ptr, int eltsize, int nitems);
@@ -608,7 +601,8 @@ array_out(ArrayType *v, Oid element_type)
FmgrInfo outputproc;
char typalign;
- char *p, *tmp,
+ char *p,
+ *tmp,
*retval,
**values,
delim[2];
@@ -698,9 +692,11 @@ array_out(ArrayType *v, Oid element_type)
*/
overall_length += 2;
}
- for (tmp=values[i];*tmp;tmp++) {
+ for (tmp = values[i]; *tmp; tmp++)
+ {
overall_length += 1;
- if (*tmp=='"') overall_length += 1;
+ if (*tmp == '"')
+ overall_length += 1;
}
overall_length += 1;
}
@@ -729,12 +725,14 @@ array_out(ArrayType *v, Oid element_type)
if (!typbyval)
{
strcat(p, "\"");
- l=strlen(p);
- for (tmp=values[k];*tmp;tmp++) {
- if (*tmp=='"') p[l++]='\\';
- p[l++]=*tmp;
- }
- p[l]='\0';
+ l = strlen(p);
+ for (tmp = values[k]; *tmp; tmp++)
+ {
+ if (*tmp == '"')
+ p[l++] = '\\';
+ p[l++] = *tmp;
+ }
+ p[l] = '\0';
strcat(p, "\"");
}
else
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index dde1eb2f2c..262d2d4ded 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -9,7 +9,7 @@
* workings can be found in the book "Software Solutions in C" by
* Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.25 1998/09/01 03:25:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.26 1998/09/01 04:32:26 momjian Exp $
*/
#include <stdio.h>
@@ -34,6 +34,7 @@ static const char *num_word(Cash value);
#ifdef USE_LOCALE
static struct lconv *lconvert = NULL;
+
#endif
/* cash_in()
@@ -46,7 +47,7 @@ static struct lconv *lconvert = NULL;
* monetary values returned by localeconv() can be multiple
* bytes/characters. This code assumes one byte only. - tgl 97/04/14
* XXX UNHACK Allow the currency symbol to be multi-byte.
- * - thomas 1998-03-01
+ * - thomas 1998-03-01
*/
Cash *
cash_in(const char *str)
@@ -77,11 +78,11 @@ cash_in(const char *str)
/* best guess is 2 in this case I think */
fpoint = ((lconvert->frac_digits != CHAR_MAX) ? lconvert->frac_digits : 2); /* int_frac_digits? */
- dsymbol = ((*lconvert->mon_decimal_point != '\0')? *lconvert->mon_decimal_point: '.');
- ssymbol = ((*lconvert->mon_thousands_sep != '\0')? *lconvert->mon_thousands_sep: ',');
- csymbol = ((*lconvert->currency_symbol != '\0')? lconvert->currency_symbol: "$");
- psymbol = ((*lconvert->positive_sign != '\0')? *lconvert->positive_sign: '+');
- nsymbol = ((*lconvert->negative_sign != '\0')? lconvert->negative_sign: "-");
+ dsymbol = ((*lconvert->mon_decimal_point != '\0') ? *lconvert->mon_decimal_point : '.');
+ ssymbol = ((*lconvert->mon_thousands_sep != '\0') ? *lconvert->mon_thousands_sep : ',');
+ csymbol = ((*lconvert->currency_symbol != '\0') ? lconvert->currency_symbol : "$");
+ psymbol = ((*lconvert->positive_sign != '\0') ? *lconvert->positive_sign : '+');
+ nsymbol = ((*lconvert->negative_sign != '\0') ? lconvert->negative_sign : "-");
#else
fpoint = 2;
dsymbol = '.';
@@ -92,27 +93,29 @@ cash_in(const char *str)
#endif
#ifdef CASHDEBUG
-printf( "cashin- precision '%d'; decimal '%c'; thousands '%c'; currency '%s'; positive '%c'; negative '%s'\n",
- fpoint, dsymbol, ssymbol, csymbol, psymbol, nsymbol);
+ printf("cashin- precision '%d'; decimal '%c'; thousands '%c'; currency '%s'; positive '%c'; negative '%s'\n",
+ fpoint, dsymbol, ssymbol, csymbol, psymbol, nsymbol);
#endif
/* we need to add all sorts of checking here. For now just */
/* strip all leading whitespace and any leading currency symbol */
- while (isspace(*s)) s++;
- if (strncmp(s,csymbol,strlen(csymbol)) == 0) s += strlen(csymbol);
+ while (isspace(*s))
+ s++;
+ if (strncmp(s, csymbol, strlen(csymbol)) == 0)
+ s += strlen(csymbol);
#ifdef CASHDEBUG
-printf( "cashin- string is '%s'\n", s);
+ printf("cashin- string is '%s'\n", s);
#endif
/* a leading minus or paren signifies a negative number */
/* again, better heuristics needed */
- if (strncmp(s,nsymbol,strlen(nsymbol)) == 0)
+ if (strncmp(s, nsymbol, strlen(nsymbol)) == 0)
{
sgn = -1;
s += strlen(nsymbol);
#ifdef CASHDEBUG
-printf( "cashin- negative symbol; string is '%s'\n", s);
+ printf("cashin- negative symbol; string is '%s'\n", s);
#endif
}
else if (*s == '(')
@@ -125,14 +128,16 @@ printf( "cashin- negative symbol; string is '%s'\n", s);
s++;
#ifdef CASHDEBUG
-printf( "cashin- string is '%s'\n", s);
+ printf("cashin- string is '%s'\n", s);
#endif
- while (isspace(*s)) s++;
- if (strncmp(s,csymbol,strlen(csymbol)) == 0) s += strlen(csymbol);
+ while (isspace(*s))
+ s++;
+ if (strncmp(s, csymbol, strlen(csymbol)) == 0)
+ s += strlen(csymbol);
#ifdef CASHDEBUG
-printf( "cashin- string is '%s'\n", s);
+ printf("cashin- string is '%s'\n", s);
#endif
for (;; s++)
@@ -184,7 +189,7 @@ printf( "cashin- string is '%s'\n", s);
*result = (value * sgn);
#ifdef CASHDEBUG
-printf( "cashin- result is %d\n", *result);
+ printf("cashin- result is %d\n", *result);
#endif
return result;
@@ -219,14 +224,14 @@ cash_out(Cash *in_value)
lconvert = localeconv();
mon_group = *lconvert->mon_grouping;
- comma = ((*lconvert->mon_thousands_sep != '\0')? *lconvert->mon_thousands_sep: ',');
+ comma = ((*lconvert->mon_thousands_sep != '\0') ? *lconvert->mon_thousands_sep : ',');
/* frac_digits in the C locale seems to return CHAR_MAX */
/* best guess is 2 in this case I think */
points = ((lconvert->frac_digits != CHAR_MAX) ? lconvert->frac_digits : 2); /* int_frac_digits? */
convention = lconvert->n_sign_posn;
- dsymbol = ((*lconvert->mon_decimal_point != '\0')? *lconvert->mon_decimal_point: '.');
- csymbol = ((*lconvert->currency_symbol != '\0')? lconvert->currency_symbol: "$");
- nsymbol = ((*lconvert->negative_sign != '\0')? lconvert->negative_sign: "-");
+ dsymbol = ((*lconvert->mon_decimal_point != '\0') ? *lconvert->mon_decimal_point : '.');
+ csymbol = ((*lconvert->currency_symbol != '\0') ? lconvert->currency_symbol : "$");
+ nsymbol = ((*lconvert->negative_sign != '\0') ? lconvert->negative_sign : "-");
#else
mon_group = 3;
comma = ',';
@@ -273,8 +278,8 @@ cash_out(Cash *in_value)
value /= 10;
}
- strncpy((buf+count-strlen(csymbol)+1),csymbol,strlen(csymbol));
- count -= strlen(csymbol)-1;
+ strncpy((buf + count - strlen(csymbol) + 1), csymbol, strlen(csymbol));
+ count -= strlen(csymbol) - 1;
if (buf[LAST_DIGIT] == ',')
buf[LAST_DIGIT] = buf[LAST_PAREN];
diff --git a/src/backend/utils/adt/chunk.c b/src/backend/utils/adt/chunk.c
index 05d9a52bc5..2f340f41ad 100644
--- a/src/backend/utils/adt/chunk.c
+++ b/src/backend/utils/adt/chunk.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.17 1998/09/01 03:25:52 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.18 1998/09/01 04:32:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,25 +40,21 @@
static CHUNK_INFO cInfo;
/* non-export function prototypes */
-static int
-_FindBestChunk(int size, int *dmax, int *dbest, int dim,
+static int _FindBestChunk(int size, int *dmax, int *dbest, int dim,
int A[MAXPAT][MAXDIM + 1], int N);
static int get_next(int *d, int k, int C, int *dmax);
static void initialize_info(CHUNK_INFO *A, int ndim, int *dim, int *chunk);
#ifdef LOARRAY
-static void
-_ConvertToChunkFile(int n, int baseSize, int *dim, int *C,
+static void _ConvertToChunkFile(int n, int baseSize, int *dim, int *C,
int srcfd, int destfd);
-static void
-read_chunk(int *chunk_no, int *C, char *a_chunk, int srcfd,
+static void read_chunk(int *chunk_no, int *C, char *a_chunk, int srcfd,
int n, int baseSize, int *PX, int *dist);
static int write_chunk(struct varlena * a_chunk, int ofile);
static int seek_and_read(int pos, int size, char *buff, int fp, int from);
#endif
-static int
-GetChunkSize(FILE *fd, int ndim, int dim[MAXDIM], int baseSize,
+static int GetChunkSize(FILE *fd, int ndim, int dim[MAXDIM], int baseSize,
int d[MAXDIM]);
/*------------------------------------------------------------------------
@@ -421,7 +417,7 @@ seek_and_read(int pos, int size, char *buff, int fp, int from)
}
-#endif /* LOARRAY */
+#endif /* LOARRAY */
/*----------------------------------------------------------------------------
* _ReadChunkArray --
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 720178c400..efbb8e45dc 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.26 1998/09/01 03:25:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.27 1998/09/01 04:32:29 momjian Exp $
*
* NOTES
* This code is actually (almost) unused.
@@ -102,8 +102,7 @@ static int correct_dir(char *direction, int *signptr);
#endif
-static int
-istinterval(char *i_string,
+static int istinterval(char *i_string,
AbsoluteTime *i_start,
AbsoluteTime *i_end);
@@ -207,36 +206,39 @@ reltime2tm(int32 time, struct tm * tm)
} /* reltime2tm() */
#if FALSE
-char *timestring;
-long quantity;
-int i;
-int unitnr;
-
-timestring = (char *) palloc(Max(strlen(INVALID_RELTIME_STR),
- UNITMAXLEN) + 1);
-if (timevalue == INVALID_RELTIME)
+int
+dummyfunc()
{
- strcpy(timestring, INVALID_RELTIME_STR);
- return timestring;
-}
+ char *timestring;
+ long quantity;
+ int i;
+ int unitnr;
+
+ timestring = (char *) palloc(Max(strlen(INVALID_RELTIME_STR),
+ UNITMAXLEN) + 1);
+ if (timevalue == INVALID_RELTIME)
+ {
+ strcpy(timestring, INVALID_RELTIME_STR);
+ return timestring;
+ }
-if (timevalue == 0)
- i = 1; /* unit = 'seconds' */
-else
- for (i = 12; i >= 0; i = i - 2)
- if ((timevalue % sec_tab[i]) == 0)
- break; /* appropriate unit found */
-unitnr = i;
-quantity = (timevalue / sec_tab[unitnr]);
-if (quantity > 1 || quantity < -1)
- unitnr++; /* adjust index for PLURAL of unit */
-if (quantity >= 0)
- sprintf(timestring, "%c %lu %s", RELTIME_LABEL,
- quantity, unit_tab[unitnr]);
-else
- sprintf(timestring, "%c %lu %s %s", RELTIME_LABEL,
- (quantity * -1), unit_tab[unitnr], RELTIME_PAST);
-return timestring;
+ if (timevalue == 0)
+ i = 1; /* unit = 'seconds' */
+ else
+ for (i = 12; i >= 0; i = i - 2)
+ if ((timevalue % sec_tab[i]) == 0)
+ break; /* appropriate unit found */
+ unitnr = i;
+ quantity = (timevalue / sec_tab[unitnr]);
+ if (quantity > 1 || quantity < -1)
+ unitnr++; /* adjust index for PLURAL of unit */
+ if (quantity >= 0)
+ sprintf(timestring, "%c %lu %s", RELTIME_LABEL,
+ quantity, unit_tab[unitnr]);
+ else
+ sprintf(timestring, "%c %lu %s %s", RELTIME_LABEL,
+ (quantity * -1), unit_tab[unitnr], RELTIME_PAST);
+ return timestring;
}
#endif
@@ -987,126 +989,123 @@ isreltime(char *str)
} /* isreltime() */
#if FALSE
-char *p;
-char c;
-int i;
-char unit[UNITMAXLEN];
-char direction[DIRMAXLEN];
-int localSign;
-int localUnitNumber;
-long localQuantity;
-
-if (!PointerIsValid(sign))
-{
- sign = &localSign;
-}
-
-if (!PointerIsValid(unitnr))
+int
+dummyfunc()
{
- unitnr = &localUnitNumber;
-}
+ char *p;
+ char c;
+ int i;
+ char unit[UNITMAXLEN];
+ char direction[DIRMAXLEN];
+ int localSign;
+ int localUnitNumber;
+ long localQuantity;
+
+ if (!PointerIsValid(sign))
+ sign = &localSign;
+
+ if (!PointerIsValid(unitnr))
+ unitnr = &localUnitNumber;
+
+ if (!PointerIsValid(quantity))
+ quantity = &localQuantity;
+
+ unit[0] = '\0';
+ direction[0] = '\0';
+ p = timestring;
+ /* skip leading blanks */
+ while ((c = *p) != '\0')
+ {
+ if (c != ' ')
+ break;
+ p++;
+ }
-if (!PointerIsValid(quantity))
-{
- quantity = &localQuantity;
-}
+ /* Test whether 'invalid time' identifier or not */
+ if (!strncmp(INVALID_RELTIME_STR, p, strlen(INVALID_RELTIME_STR) + 1))
+ return 2; /* correct 'invalid time' identifier found */
-unit[0] = '\0';
-direction[0] = '\0';
-p = timestring;
- /* skip leading blanks */
-while ((c = *p) != '\0')
-{
+ /* handle label of relative time */
+ if (c != RELTIME_LABEL)
+ return 0; /* syntax error */
+ c = *++p;
if (c != ' ')
- break;
+ return 0; /* syntax error */
p++;
-}
-
- /* Test whether 'invalid time' identifier or not */
-if (!strncmp(INVALID_RELTIME_STR, p, strlen(INVALID_RELTIME_STR) + 1))
- return 2; /* correct 'invalid time' identifier found */
-
- /* handle label of relative time */
-if (c != RELTIME_LABEL)
- return 0; /* syntax error */
-c = *++p;
-if (c != ' ')
- return 0; /* syntax error */
-p++;
- /* handle the quantity */
-*quantity = 0;
-for (;;)
-{
- c = *p;
- if (isdigit(c))
- {
- *quantity = *quantity * 10 + (c - '0');
- p++;
- }
- else
+ /* handle the quantity */
+ *quantity = 0;
+ for (;;)
{
- if (c == ' ')
- break; /* correct quantity found */
+ c = *p;
+ if (isdigit(c))
+ {
+ *quantity = *quantity * 10 + (c - '0');
+ p++;
+ }
else
- return 0; /* syntax error */
+ {
+ if (c == ' ')
+ break; /* correct quantity found */
+ else
+ return 0; /* syntax error */
+ }
}
-}
- /* handle unit */
-p++;
-i = 0;
-for (;;)
-{
- c = *p;
- if (c >= 'a' && c <= 'z' && i <= (UNITMAXLEN - 1))
- {
- unit[i] = c;
- p++;
- i++;
- }
- else
+ /* handle unit */
+ p++;
+ i = 0;
+ for (;;)
{
- if ((c == ' ' || c == '\0')
- && correct_unit(unit, unitnr))
- break; /* correct unit found */
+ c = *p;
+ if (c >= 'a' && c <= 'z' && i <= (UNITMAXLEN - 1))
+ {
+ unit[i] = c;
+ p++;
+ i++;
+ }
else
- return 0; /* syntax error */
+ {
+ if ((c == ' ' || c == '\0')
+ && correct_unit(unit, unitnr))
+ break; /* correct unit found */
+ else
+ return 0; /* syntax error */
+ }
}
-}
- /* handle optional direction */
-if (c == ' ')
- p++;
-i = 0;
-*sign = 1;
-for (;;)
-{
- c = *p;
- if (c >= 'a' && c <= 'z' && i <= (DIRMAXLEN - 1))
- {
- direction[i] = c;
+ /* handle optional direction */
+ if (c == ' ')
p++;
- i++;
- }
- else
+ i = 0;
+ *sign = 1;
+ for (;;)
{
- if ((c == ' ' || c == '\0') && i == 0)
+ c = *p;
+ if (c >= 'a' && c <= 'z' && i <= (DIRMAXLEN - 1))
{
- *sign = 1;
- break; /* no direction specified */
+ direction[i] = c;
+ p++;
+ i++;
}
- if ((c == ' ' || c == '\0') && i != 0)
+ else
{
- direction[i] = '\0';
- correct_dir(direction, sign);
- break; /* correct direction found */
+ if ((c == ' ' || c == '\0') && i == 0)
+ {
+ *sign = 1;
+ break; /* no direction specified */
+ }
+ if ((c == ' ' || c == '\0') && i != 0)
+ {
+ direction[i] = '\0';
+ correct_dir(direction, sign);
+ break; /* correct direction found */
+ }
+ else
+ return 0; /* syntax error */
}
- else
- return 0; /* syntax error */
}
-}
-return 1;
+ return 1;
}
/*
diff --git a/src/backend/utils/adt/dt.c b/src/backend/utils/adt/dt.c
index fa6854fdc9..ae9c4663d2 100644
--- a/src/backend/utils/adt/dt.c
+++ b/src/backend/utils/adt/dt.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.56 1998/09/01 03:25:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.57 1998/09/01 04:32:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,15 +32,12 @@
#include "utils/builtins.h"
static int DecodeDate(char *str, int fmask, int *tmask, struct tm * tm);
-static int
-DecodeNumber(int flen, char *field,
+static int DecodeNumber(int flen, char *field,
int fmask, int *tmask, struct tm * tm, double *fsec);
-static int
-DecodeNumberField(int len, char *str,
+static int DecodeNumberField(int len, char *str,
int fmask, int *tmask, struct tm * tm, double *fsec);
static int DecodeSpecial(int field, char *lowtoken, int *val);
-static int
-DecodeTime(char *str, int fmask, int *tmask,
+static int DecodeTime(char *str, int fmask, int *tmask,
struct tm * tm, double *fsec);
static int DecodeTimezone(char *str, int *tzp);
static int DecodeUnits(int field, char *lowtoken, int *val);
@@ -2208,7 +2205,7 @@ static datetkn deltatktbl[] = {
{"mils", UNITS, DTK_MILLENIUM}, /* "millenia" relative time units */
{"millenia", UNITS, DTK_MILLENIUM}, /* "millenia" relative time units */
{DMILLENIUM, UNITS, DTK_MILLENIUM}, /* "millenium" relative time units */
- {"millisecon", UNITS, DTK_MILLISEC}, /* relative time units */
+ {"millisecon", UNITS, DTK_MILLISEC}, /* relative time units */
{"min", UNITS, DTK_MINUTE}, /* "minute" relative time units */
{"mins", UNITS, DTK_MINUTE},/* "minutes" relative time units */
{"mins", UNITS, DTK_MINUTE},/* "minutes" relative time units */
@@ -2223,18 +2220,18 @@ static datetkn deltatktbl[] = {
{DMILLISEC, UNITS, DTK_MILLISEC},
{"mseconds", UNITS, DTK_MILLISEC},
{"msecs", UNITS, DTK_MILLISEC},
- {"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative time */
+ {"qtr", UNITS, DTK_QUARTER},/* "quarter" relative time */
{DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative time */
- {"reltime", IGNORE, 0}, /* for pre-v6.1 "Undefined Reltime" */
+ {"reltime", IGNORE, 0}, /* for pre-v6.1 "Undefined Reltime" */
{"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 */
- {"tz", UNITS, DTK_TZ}, /* "timezone" time offset */
+ {DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */
+ {"tz", UNITS, DTK_TZ}, /* "timezone" time offset */
{"tz_hour", UNITS, DTK_TZ_HOUR}, /* timezone hour units */
- {"tz_minute", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */
+ {"tz_minute", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */
{"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */
{"us", UNITS, DTK_MICROSEC},/* "microsecond" relative time units */
{"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative time
@@ -3645,7 +3642,7 @@ DecodeSpecial(int field, char *lowtoken, int *val)
* an unsigned floating point number. - thomas 1997-11-16
*
* Allow ISO-style time span, with implicit units on number of days
- * preceeding an hh:mm:ss field. - thomas 1998-04-30
+ * preceeding an hh:mm:ss field. - thomas 1998-04-30
*/
int
DecodeDateDelta(char **field, int *ftype, int nf, int *dtype, struct tm * tm, double *fsec)
@@ -3688,8 +3685,10 @@ DecodeDateDelta(char **field, int *ftype, int nf, int *dtype, struct tm * tm, do
break;
case DTK_TZ:
- /* Timezone is a token with a leading sign character
- * and otherwise the same as a non-signed numeric field
+
+ /*
+ * Timezone is a token with a leading sign character and
+ * otherwise the same as a non-signed numeric field
*/
case DTK_DATE:
case DTK_NUMBER:
@@ -4258,7 +4257,7 @@ EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, cha
*
* Support "traditional Postgres" and ISO-8601 styles.
* Actually, afaik ISO does not address time interval formatting,
- * but this looks similar to the spec for absolute date/time.
+ * but this looks similar to the spec for absolute date/time.
* - thomas 1998-04-30
*/
int
@@ -4270,7 +4269,7 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
switch (style)
{
- /* compatible with ISO date formats */
+ /* compatible with ISO date formats */
case USE_ISO_DATES:
break;
@@ -4284,7 +4283,7 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
{
is_before |= (tm->tm_year < 0);
sprintf(cp, "%d year%s",
- abs(tm->tm_year), ((abs(tm->tm_year) != 1) ? "s" : ""));
+ abs(tm->tm_year), ((abs(tm->tm_year) != 1) ? "s" : ""));
cp += strlen(cp);
is_nonzero = TRUE;
}
@@ -4292,26 +4291,26 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
if (tm->tm_mon != 0)
{
is_before |= (tm->tm_mon < 0);
- sprintf(cp, "%s%d mon%s", (is_nonzero? " ": ""),
- abs(tm->tm_mon), ((abs(tm->tm_mon) != 1) ? "s" : ""));
+ sprintf(cp, "%s%d mon%s", (is_nonzero ? " " : ""),
+ abs(tm->tm_mon), ((abs(tm->tm_mon) != 1) ? "s" : ""));
cp += strlen(cp);
is_nonzero = TRUE;
}
switch (style)
{
- /* compatible with ISO date formats */
+ /* compatible with ISO date formats */
case USE_ISO_DATES:
if (tm->tm_mday != 0)
{
is_before |= (tm->tm_mday < 0);
- sprintf(cp, "%s%d", (is_nonzero? " ": ""), abs(tm->tm_mday));
+ sprintf(cp, "%s%d", (is_nonzero ? " " : ""), abs(tm->tm_mday));
cp += strlen(cp);
is_nonzero = TRUE;
}
is_before |= ((tm->tm_hour < 0) || (tm->tm_min < 0));
- sprintf(cp, "%s%02d:%02d", (is_nonzero? " ": ""),
- abs(tm->tm_hour), abs(tm->tm_min));
+ sprintf(cp, "%s%02d:%02d", (is_nonzero ? " " : ""),
+ abs(tm->tm_hour), abs(tm->tm_min));
cp += strlen(cp);
if ((tm->tm_hour != 0) || (tm->tm_min != 0))
is_nonzero = TRUE;
@@ -4341,7 +4340,7 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
if (tm->tm_mday != 0)
{
is_before |= (tm->tm_mday < 0);
- sprintf(cp, "%s%d day%s", (is_nonzero? " ": ""),
+ sprintf(cp, "%s%d day%s", (is_nonzero ? " " : ""),
abs(tm->tm_mday), ((abs(tm->tm_mday) != 1) ? "s" : ""));
cp += strlen(cp);
is_nonzero = TRUE;
@@ -4349,7 +4348,7 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
if (tm->tm_hour != 0)
{
is_before |= (tm->tm_hour < 0);
- sprintf(cp, "%s%d hour%s", (is_nonzero? " ": ""),
+ sprintf(cp, "%s%d hour%s", (is_nonzero ? " " : ""),
abs(tm->tm_hour), ((abs(tm->tm_hour) != 1) ? "s" : ""));
cp += strlen(cp);
is_nonzero = TRUE;
@@ -4358,8 +4357,8 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
if (tm->tm_min != 0)
{
is_before |= (tm->tm_min < 0);
- sprintf(cp, "%s%d min%s", (is_nonzero? " ": ""),
- abs(tm->tm_min), ((abs(tm->tm_min) != 1) ? "s" : ""));
+ sprintf(cp, "%s%d min%s", (is_nonzero ? " " : ""),
+ abs(tm->tm_min), ((abs(tm->tm_min) != 1) ? "s" : ""));
cp += strlen(cp);
is_nonzero = TRUE;
}
@@ -4369,7 +4368,7 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
{
fsec += tm->tm_sec;
is_before |= (fsec < 0);
- sprintf(cp, "%s%.2f secs", (is_nonzero? " ": ""), fabs(fsec));
+ sprintf(cp, "%s%.2f secs", (is_nonzero ? " " : ""), fabs(fsec));
cp += strlen(cp);
is_nonzero = TRUE;
@@ -4378,8 +4377,8 @@ EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str)
else if (tm->tm_sec != 0)
{
is_before |= (tm->tm_sec < 0);
- sprintf(cp, "%s%d sec%s", (is_nonzero? " ": ""),
- abs(tm->tm_sec), ((abs(tm->tm_sec) != 1) ? "s" : ""));
+ sprintf(cp, "%s%d sec%s", (is_nonzero ? " " : ""),
+ abs(tm->tm_sec), ((abs(tm->tm_sec) != 1) ? "s" : ""));
cp += strlen(cp);
is_nonzero = TRUE;
}
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 69cd1a4201..b1de92f643 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.32 1998/09/01 03:25:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.33 1998/09/01 04:32:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -158,7 +158,7 @@ CheckFloat4Val(double val)
if (val != 0.0 && fabs(val) < FLOAT4_MIN)
elog(ERROR, "Bad float4 input format -- underflow");
return;
-#endif /* UNSAFE_FLOATS */
+#endif /* UNSAFE_FLOATS */
}
/*
@@ -183,7 +183,7 @@ CheckFloat8Val(double val)
if (val != 0.0 && fabs(val) < FLOAT8_MIN)
elog(ERROR, "Bad float8 input format -- underflow");
return;
-#endif /* UNSAFE_FLOATS */
+#endif /* UNSAFE_FLOATS */
}
/*
@@ -1491,7 +1491,7 @@ double x;
return w - TWO52[sx];
}
-#endif /* !HAVE_RINT */
+#endif /* !HAVE_RINT */
#ifndef HAVE_CBRT
@@ -1506,4 +1506,4 @@ double x;
return isneg ? -tmpres : tmpres;
}
-#endif /* !HAVE_CBRT */
+#endif /* !HAVE_CBRT */
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 2775f6b5fc..1a99c36616 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.36 1998/09/01 03:26:01 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.37 1998/09/01 04:32:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -777,6 +777,7 @@ line_in(char *str)
LSEG lseg;
int isopen;
char *s;
+
#endif
if (!PointerIsValid(str))
@@ -800,9 +801,11 @@ line_in(char *str)
char *
line_out(LINE *line)
{
- char *result;
+ char *result;
+
#ifdef ENABLE_LINE_TYPE
- LSEG lseg;
+ LSEG lseg;
+
#endif
if (!PointerIsValid(line))
@@ -2343,7 +2346,7 @@ close_pl(Point *pt, LINE *line)
*
* Some tricky code here, relying on boolean expressions
* evaluating to only zero or one to use as an array index.
- * bug fixes by [email protected]; May 1, 1998
+ * bug fixes by [email protected]; May 1, 1998
*/
Point *
close_ps(Point *pt, LSEG *lseg)
@@ -2356,7 +2359,7 @@ close_ps(Point *pt, LSEG *lseg)
#ifdef GEODEBUG
printf("close_sp:pt->x %f pt->y %f\nlseg(0).x %f lseg(0).y %f lseg(1).x %f lseg(1).y %f\n",
- pt->x, pt->y, lseg->p[0].x, lseg->p[0].y, lseg->p[1].x, lseg->p[1].y);
+ pt->x, pt->y, lseg->p[0].x, lseg->p[0].y, lseg->p[1].x, lseg->p[1].y);
#endif
result = NULL;
@@ -2372,14 +2375,14 @@ close_ps(Point *pt, LSEG *lseg)
#endif
/* first check if point is below or above the entire lseg. */
if (pt->y < lseg->p[!yh].y)
- result = point_copy(&lseg->p[!yh]); /* below the lseg */
+ result = point_copy(&lseg->p[!yh]); /* below the lseg */
else if (pt->y > lseg->p[yh].y)
- result = point_copy(&lseg->p[yh]); /* above the lseg */
+ result = point_copy(&lseg->p[yh]); /* above the lseg */
if (result != NULL)
- return result;
+ return result;
/* point lines along (to left or right) of the vertical lseg. */
-
+
result = palloc(sizeof(*result));
result->x = lseg->p[0].x;
result->y = pt->y;
@@ -2392,11 +2395,11 @@ close_ps(Point *pt, LSEG *lseg)
#endif
/* first check if point is left or right of the entire lseg. */
if (pt->x < lseg->p[!xh].x)
- result = point_copy(&lseg->p[!xh]); /* left of the lseg */
+ result = point_copy(&lseg->p[!xh]); /* left of the lseg */
else if (pt->x > lseg->p[xh].x)
- result = point_copy(&lseg->p[xh]); /* right of the lseg */
+ result = point_copy(&lseg->p[xh]); /* right of the lseg */
if (result != NULL)
- return result;
+ return result;
/* point lines along (at top or below) the horiz. lseg. */
result = palloc(sizeof(*result));
@@ -2405,31 +2408,41 @@ close_ps(Point *pt, LSEG *lseg)
return result;
}
- /* vert. and horiz. cases are down, now check if the closest
- * point is one of the end points or someplace on the lseg. */
+ /*
+ * vert. and horiz. cases are down, now check if the closest point is
+ * one of the end points or someplace on the lseg.
+ */
/* TODO: Ask if "tmp" should be freed to prevent memory leak */
invm = -1.0 / point_sl(&(lseg->p[0]), &(lseg->p[1]));
- tmp = line_construct_pm(&lseg->p[!yh], invm); /* lower edge of the "band" */
- if (pt->y < (tmp->A*pt->x + tmp->C)) { /* we are below the lower edge */
- result = point_copy(&lseg->p[!yh]); /* below the lseg, take lower end pt */
-/* fprintf(stderr,"below: tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
- return result;
+ tmp = line_construct_pm(&lseg->p[!yh], invm); /* lower edge of the
+ * "band" */
+ if (pt->y < (tmp->A * pt->x + tmp->C))
+ { /* we are below the lower edge */
+ result = point_copy(&lseg->p[!yh]); /* below the lseg, take
+ * lower end pt */
+/* fprintf(stderr,"below: tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
+ return result;
}
- tmp = line_construct_pm(&lseg->p[yh], invm); /* upper edge of the "band" */
- if (pt->y > (tmp->A*pt->x + tmp->C)) { /* we are below the lower edge */
- result = point_copy(&lseg->p[yh]); /* above the lseg, take higher end pt */
-/* fprintf(stderr,"above: tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
- return result;
+ tmp = line_construct_pm(&lseg->p[yh], invm); /* upper edge of the
+ * "band" */
+ if (pt->y > (tmp->A * pt->x + tmp->C))
+ { /* we are below the lower edge */
+ result = point_copy(&lseg->p[yh]); /* above the lseg, take
+ * higher end pt */
+/* fprintf(stderr,"above: tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
+ return result;
}
- /* at this point the "normal" from point will hit lseg. The closet point
- * will be somewhere on the lseg */
+ /*
+ * at this point the "normal" from point will hit lseg. The closet
+ * point will be somewhere on the lseg
+ */
tmp = line_construct_pm(pt, invm);
-/* fprintf(stderr,"tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
+/* fprintf(stderr,"tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
result = interpt_sl(lseg, tmp);
-/* fprintf(stderr,"result.x %f result.y %f\n", result->x, result->y); */
+/* fprintf(stderr,"result.x %f result.y %f\n", result->x, result->y); */
return result;
} /* close_ps() */
@@ -4428,7 +4441,7 @@ box_circle(BOX *box)
} /* box_circle() */
-POLYGON *
+POLYGON *
circle_poly(int npts, CIRCLE *circle)
{
POLYGON *poly;
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index d1e1a062dc..4eb646392f 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.16 1998/09/01 03:26:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.17 1998/09/01 04:32:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -80,7 +80,7 @@ int2out(int16 sh)
int16 *
int28in(char *shs)
{
- int16 **result;
+ int16 **result;
int nums;
if (shs == NULL)
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index f2ebad62a6..4ffdcbf225 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -208,7 +208,7 @@ int48ge(int32 val1, int64 * val2)
int64 *
int8um(int64 * val)
{
- int64 temp = 0;
+ int64 temp = 0;
int64 *result = palloc(sizeof(int64));
if (!PointerIsValid(val))
@@ -217,7 +217,7 @@ int8um(int64 * val)
#if FALSE
*result = temp - (*val);
#else
- result = int8mi(&temp, val);
+ result = int8mi(&temp, val);
#endif
return result;
@@ -281,17 +281,18 @@ int8larger(int64 * val1, int64 * val2)
{
#if FALSE
int64 *result = palloc(sizeof(int64));
+
#endif
if ((!PointerIsValid(val1)) || (!PointerIsValid(val2)))
return NULL;
#if FALSE
- *result = ((*val1 > *val2)? *val1: *val2);
+ *result = ((*val1 > *val2) ? *val1 : *val2);
return result;
#endif
- return (*val1 > *val2)? val1: val2;
+ return (*val1 > *val2) ? val1 : val2;
} /* int8larger() */
int64 *
@@ -299,17 +300,18 @@ int8smaller(int64 * val1, int64 * val2)
{
#if FALSE
int64 *result = palloc(sizeof(int64));
+
#endif
if ((!PointerIsValid(val1)) || (!PointerIsValid(val2)))
return NULL;
#if FALSE
- *result = ((*val1 < *val2)? *val1: *val2);
+ *result = ((*val1 < *val2) ? *val1 : *val2);
return result;
#endif
- return (*val1 < *val2)? val1: val2;
+ return (*val1 < *val2) ? val1 : val2;
} /* int8smaller() */
@@ -400,7 +402,7 @@ int48mul(int32 val1, int64 * val2)
if (!PointerIsValid(val2))
return NULL;
- *result = (int64) val1 * *val2;
+ *result = (int64) val1 **val2;
return result;
} /* int48mul() */
@@ -442,14 +444,16 @@ int84(int64 * val)
elog(ERROR, "Invalid (null) int64, can't convert int8 to int4", NULL);
#if FALSE
- /* Hmm. This conditional always tests true on my i686/linux box.
- * It's a gcc compiler bug, or I'm missing something obvious, which is more likely...
- * - thomas 1998-06-09
+
+ /*
+ * Hmm. This conditional always tests true on my i686/linux box. It's
+ * a gcc compiler bug, or I'm missing something obvious, which is more
+ * likely... - thomas 1998-06-09
*/
if ((*val < INT_MIN) || (*val > INT_MAX))
#endif
- if ((*val < (-pow(2, 31) + 1)) || (*val > (pow(2, 31) - 1)))
- elog(ERROR, "int8 conversion to int4 is out of range", NULL);
+ if ((*val < (-pow(2, 31) + 1)) || (*val > (pow(2, 31) - 1)))
+ elog(ERROR, "int8 conversion to int4 is out of range", NULL);
result = *val;
@@ -501,10 +505,10 @@ i8tod(int64 * val)
* Convert double float to 8-byte integer.
* Do a range check before the conversion.
* Note that the comparison probably isn't quite right
- * since we only have ~52 bits of precision in a double float
- * and so subtracting one from a large number gives the large
- * number exactly. However, for some reason the comparison below
- * does the right thing on my i686/linux-rh4.2 box.
+ * since we only have ~52 bits of precision in a double float
+ * and so subtracting one from a large number gives the large
+ * number exactly. However, for some reason the comparison below
+ * does the right thing on my i686/linux-rh4.2 box.
* - thomas 1998-06-16
*/
int64 *
diff --git a/src/backend/utils/adt/like.c b/src/backend/utils/adt/like.c
index bae7ae062e..eb764e7c01 100644
--- a/src/backend/utils/adt/like.c
+++ b/src/backend/utils/adt/like.c
@@ -23,7 +23,7 @@
#include "utils/builtins.h" /* where the function declarations go */
#include "mb/pg_wchar.h"
-static int like(pg_wchar *text, pg_wchar *p);
+static int like(pg_wchar * text, pg_wchar * p);
/*
* interface routines called by the function manager
@@ -40,18 +40,18 @@ static int like(pg_wchar *text, pg_wchar *p);
static bool
fixedlen_like(char *s, struct varlena * p, int charlen)
{
- pg_wchar *sterm,
+ pg_wchar *sterm,
*pterm;
int result;
- int len;
+ int len;
if (!s || !p)
return FALSE;
/* be sure sterm is null-terminated */
#ifdef MULTIBYTE
- sterm = (pg_wchar *) palloc((charlen + 1)*sizeof(pg_wchar));
- (void)pg_mb2wchar_with_len((unsigned char *)s,sterm,charlen);
+ sterm = (pg_wchar *) palloc((charlen + 1) * sizeof(pg_wchar));
+ (void) pg_mb2wchar_with_len((unsigned char *) s, sterm, charlen);
#else
sterm = (char *) palloc(charlen + 1);
StrNCpy(sterm, s, charlen + 1);
@@ -65,8 +65,8 @@ fixedlen_like(char *s, struct varlena * p, int charlen)
/* palloc the length of the text + the null character */
len = VARSIZE(p) - VARHDRSZ;
#ifdef MULTIBYTE
- pterm = (pg_wchar *) palloc((len + 1)*sizeof(pg_wchar));
- (void)pg_mb2wchar_with_len((unsigned char *)VARDATA(p),pterm,len);
+ pterm = (pg_wchar *) palloc((len + 1) * sizeof(pg_wchar));
+ (void) pg_mb2wchar_with_len((unsigned char *) VARDATA(p), pterm, len);
#else
pterm = (char *) palloc(len + 1);
memmove(pterm, VARDATA(p), len);
@@ -111,7 +111,7 @@ textnlike(struct varlena * s, struct varlena * p)
}
-/* $Revision: 1.19 $
+/* $Revision: 1.20 $
** "like.c" A first attempt at a LIKE operator for Postgres95.
**
** Originally written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
@@ -146,7 +146,7 @@ textnlike(struct varlena * s, struct varlena * p)
** Match text and p, return LIKE_TRUE, LIKE_FALSE, or LIKE_ABORT.
*/
static int
-DoMatch(pg_wchar *text, pg_wchar *p)
+DoMatch(pg_wchar * text, pg_wchar * p)
{
int matched;
@@ -189,7 +189,7 @@ DoMatch(pg_wchar *text, pg_wchar *p)
** User-level routine. Returns TRUE or FALSE.
*/
static int
-like(pg_wchar *text, pg_wchar *p)
+like(pg_wchar * text, pg_wchar * p)
{
if (p[0] == '%' && p[1] == '\0')
return TRUE;
diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c
index 83632d70ca..c6c84357d7 100644
--- a/src/backend/utils/adt/misc.c
+++ b/src/backend/utils/adt/misc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.14 1998/09/01 03:26:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/misc.c,v 1.15 1998/09/01 04:32:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -73,13 +73,13 @@ oidrand(Oid o, int32 X)
return true;
/*
- * We do this because the cancel key is actually a random, so we don't
- * want them to be able to request random numbers using our postmaster
- * seeded value.
+ * We do this because the cancel key is actually a random, so we don't
+ * want them to be able to request random numbers using our postmaster
+ * seeded value.
*/
if (!random_initialized)
{
- srandom((unsigned int)time(NULL));
+ srandom((unsigned int) time(NULL));
random_initialized = true;
}
diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c
index ad37559bd0..f3a813ca01 100644
--- a/src/backend/utils/adt/name.c
+++ b/src/backend/utils/adt/name.c
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.14 1998/09/01 03:26:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.15 1998/09/01 04:32:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -199,7 +199,7 @@ namestrcmp(Name name, char *str)
if (!name && !str)
return 0;
if (!name)
- return -1; /* NULL < anything */
+ return -1; /* NULL < anything */
if (!str)
return 1; /* NULL < anything */
return strncmp(name->data, str, NAMEDATALEN);
diff --git a/src/backend/utils/adt/not_in.c b/src/backend/utils/adt/not_in.c
index 0bb9412e0e..52d8cd0c17 100644
--- a/src/backend/utils/adt/not_in.c
+++ b/src/backend/utils/adt/not_in.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.12 1998/09/01 03:26:11 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.13 1998/09/01 04:32:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -72,14 +72,14 @@ int4notin(int16 not_in_arg, char *relation_and_attr)
/* the last argument should be a ScanKey, not an integer! - jolly */
/* it looks like the arguments are out of order, too */
/* but skeyData is never initialized! does this work?? - ay 2/95 */
- scan_descriptor = heap_beginscan(relation_to_scan, false, SnapshotNow,
+ scan_descriptor = heap_beginscan(relation_to_scan, false, SnapshotNow,
0, &skeyData);
retval = true;
/* do a scan of the relation, and do the check */
while (HeapTupleIsValid(current_tuple = heap_getnext(scan_descriptor, 0)) &&
- retval)
+ retval)
{
value = heap_getattr(current_tuple,
(AttrNumber) attrid,
diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c
index 86a999709f..b30b2fe557 100644
--- a/src/backend/utils/adt/numutils.c
+++ b/src/backend/utils/adt/numutils.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.25 1998/09/01 03:26:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.26 1998/09/01 04:32:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -77,7 +77,7 @@ pg_atoi(char *s, int size, int c)
errno = ERANGE;
elog(ERROR, "pg_atoi: error reading \"%s\": %m", s);
}
-#endif /* HAS_LONG_LONG */
+#endif /* HAS_LONG_LONG */
break;
case sizeof(int16):
if (l < SHRT_MIN)
diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c
index 153e80854a..b98215f875 100644
--- a/src/backend/utils/adt/oid.c
+++ b/src/backend/utils/adt/oid.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.17 1998/09/01 03:26:13 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.18 1998/09/01 04:32:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,7 @@
Oid *
oid8in(char *oidString)
{
- Oid **result;
+ Oid **result;
int nums;
if (oidString == NULL)
@@ -128,8 +128,9 @@ oid8eq(Oid *arg1, Oid *arg2)
bool
oid8lt(Oid *arg1, Oid *arg2)
{
- int i;
- for (i=0; i < 8; i++)
+ int i;
+
+ for (i = 0; i < 8; i++)
if (!int4eq(arg1[i], arg2[i]))
return int4lt(arg1[i], arg2[i]);
return false;
@@ -138,8 +139,9 @@ oid8lt(Oid *arg1, Oid *arg2)
bool
oid8le(Oid *arg1, Oid *arg2)
{
- int i;
- for (i=0; i < 8; i++)
+ int i;
+
+ for (i = 0; i < 8; i++)
if (!int4eq(arg1[i], arg2[i]))
return int4le(arg1[i], arg2[i]);
return true;
@@ -148,8 +150,9 @@ oid8le(Oid *arg1, Oid *arg2)
bool
oid8ge(Oid *arg1, Oid *arg2)
{
- int i;
- for (i=0; i < 8; i++)
+ int i;
+
+ for (i = 0; i < 8; i++)
if (!int4eq(arg1[i], arg2[i]))
return int4ge(arg1[i], arg2[i]);
return true;
@@ -158,8 +161,9 @@ oid8ge(Oid *arg1, Oid *arg2)
bool
oid8gt(Oid *arg1, Oid *arg2)
{
- int i;
- for (i=0; i < 8; i++)
+ int i;
+
+ for (i = 0; i < 8; i++)
if (!int4eq(arg1[i], arg2[i]))
return int4gt(arg1[i], arg2[i]);
return false;
diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c
index 2297d3246c..084e0911a4 100644
--- a/src/backend/utils/adt/oracle_compat.c
+++ b/src/backend/utils/adt/oracle_compat.c
@@ -1,7 +1,7 @@
/*
* Edmund Mergl <[email protected]>
*
- * $Id: oracle_compat.c,v 1.15 1998/08/11 18:38:07 momjian Exp $
+ * $Id: oracle_compat.c,v 1.16 1998/09/01 04:32:45 momjian Exp $
*
*/
@@ -54,7 +54,7 @@ lower(text *string)
ptr_ret = VARDATA(ret);
while (m--)
- *ptr_ret++ = tolower((unsigned char)*ptr++);
+ *ptr_ret++ = tolower((unsigned char) *ptr++);
return ret;
}
@@ -92,7 +92,7 @@ upper(text *string)
ptr_ret = VARDATA(ret);
while (m--)
- *ptr_ret++ = toupper((unsigned char)*ptr++);
+ *ptr_ret++ = toupper((unsigned char) *ptr++);
return ret;
}
@@ -131,15 +131,15 @@ initcap(text *string)
ptr = VARDATA(string);
ptr_ret = VARDATA(ret);
- *ptr_ret++ = toupper((unsigned char)*ptr++);
+ *ptr_ret++ = toupper((unsigned char) *ptr++);
--m;
while (m--)
{
if (*(ptr_ret - 1) == ' ' || *(ptr_ret - 1) == ' ')
- *ptr_ret++ = toupper((unsigned char)*ptr++);
+ *ptr_ret++ = toupper((unsigned char) *ptr++);
else
- *ptr_ret++ = tolower((unsigned char)*ptr++);
+ *ptr_ret++ = tolower((unsigned char) *ptr++);
}
return ret;
diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c
index 377c3285d9..6efb350266 100644
--- a/src/backend/utils/adt/regexp.c
+++ b/src/backend/utils/adt/regexp.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.19 1998/09/01 03:26:14 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.20 1998/09/01 04:32:46 momjian Exp $
*
* Alistair Crooks added the code for the regex caching
* agc - cached the regular expressions used - there's a good chance
@@ -36,7 +36,7 @@
#if defined(DISABLE_XOPEN_NLS)
#undef _XOPEN_SOURCE
-#endif /* DISABLE_XOPEN_NLS */
+#endif /* DISABLE_XOPEN_NLS */
/* this is the number of cached regular expressions held. */
#ifndef MAX_CACHED_RES
diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c
index 4a9f1a0bc0..056e2fe3f5 100644
--- a/src/backend/utils/adt/regproc.c
+++ b/src/backend/utils/adt/regproc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.25 1998/09/01 03:26:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.26 1998/09/01 04:32:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,7 +28,7 @@
/*****************************************************************************
* USER I/O ROUTINES *
*****************************************************************************/
-
+
/*
* regprocin - converts "proname" to proid
*
@@ -46,27 +46,29 @@ regprocin(char *pro_name_and_oid)
if (!IsBootstrapProcessingMode())
{
+
/*
- * we need to use the oid because there can be multiple entries
- * with the same name. We accept 1323_int4eq and 1323.
+ * we need to use the oid because there can be multiple entries
+ * with the same name. We accept 1323_int4eq and 1323.
*/
- if (strrchr(pro_name_and_oid,'_') != NULL)
+ if (strrchr(pro_name_and_oid, '_') != NULL)
{
proctup = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(atoi(strrchr(pro_name_and_oid,'_')+1)),
- 0, 0, 0);
+ ObjectIdGetDatum(atoi(strrchr(pro_name_and_oid, '_') + 1)),
+ 0, 0, 0);
}
else if (atoi(pro_name_and_oid) != InvalidOid)
{
proctup = SearchSysCacheTuple(PROOID,
- /* atoi stops at the _ */
- ObjectIdGetDatum(atoi(pro_name_and_oid)),
- 0, 0, 0);
+ /* atoi stops at the _ */
+ ObjectIdGetDatum(atoi(pro_name_and_oid)),
+ 0, 0, 0);
}
if (HeapTupleIsValid(proctup))
- result = (RegProcedure) proctup->t_oid;
- else elog(ERROR, "regprocin: no such procedure %s", pro_name_and_oid);
+ result = (RegProcedure) proctup->t_oid;
+ else
+ elog(ERROR, "regprocin: no such procedure %s", pro_name_and_oid);
}
else
{
@@ -74,7 +76,7 @@ regprocin(char *pro_name_and_oid)
HeapScanDesc procscan;
ScanKeyData key;
bool isnull;
-
+
proc = heap_openr(ProcedureRelationName);
if (!RelationIsValid(proc))
{
@@ -87,7 +89,7 @@ regprocin(char *pro_name_and_oid)
(AttrNumber) 1,
(RegProcedure) F_NAMEEQ,
(Datum) pro_name_and_oid);
-
+
procscan = heap_beginscan(proc, 0, SnapshotNow, 1, &key);
if (!HeapScanIsValid(procscan))
{
@@ -99,23 +101,23 @@ regprocin(char *pro_name_and_oid)
proctup = heap_getnext(procscan, 0);
if (HeapTupleIsValid(proctup))
{
- result = (RegProcedure) heap_getattr(proctup,
- ObjectIdAttributeNumber,
- RelationGetDescr(proc),
- &isnull);
- if (isnull)
- elog(FATAL, "regprocin: null procedure %s", pro_name_and_oid);
+ result = (RegProcedure) heap_getattr(proctup,
+ ObjectIdAttributeNumber,
+ RelationGetDescr(proc),
+ &isnull);
+ if (isnull)
+ elog(FATAL, "regprocin: null procedure %s", pro_name_and_oid);
}
else
- result = (RegProcedure) 0;
+ result = (RegProcedure) 0;
heap_endscan(procscan);
heap_close(proc);
- }
+ }
#ifdef EBUG
elog(DEBUG, "regprocin: no such procedure %s", pro_name_and_oid);
-#endif /* defined(EBUG) */
+#endif /* defined(EBUG) */
return (int32) result;
}
@@ -133,15 +135,15 @@ regprocout(RegProcedure proid)
if (!IsBootstrapProcessingMode())
{
proctup = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(proid),
- 0, 0, 0);
-
+ ObjectIdGetDatum(proid),
+ 0, 0, 0);
+
if (HeapTupleIsValid(proctup))
{
- char *s;
-
- s = ((Form_pg_proc) GETSTRUCT(proctup))->proname.data;
- snprintf(result, NAMEDATALEN, "%s_%d", s, proid);
+ char *s;
+
+ s = ((Form_pg_proc) GETSTRUCT(proctup))->proname.data;
+ snprintf(result, NAMEDATALEN, "%s_%d", s, proid);
}
else
{
@@ -154,7 +156,7 @@ regprocout(RegProcedure proid)
Relation proc;
HeapScanDesc procscan;
ScanKeyData key;
-
+
proc = heap_openr(ProcedureRelationName);
if (!RelationIsValid(proc))
{
@@ -167,7 +169,7 @@ regprocout(RegProcedure proid)
(AttrNumber) ObjectIdAttributeNumber,
(RegProcedure) F_INT4EQ,
(Datum) proid);
-
+
procscan = heap_beginscan(proc, 0, SnapshotNow, 1, &key);
if (!HeapScanIsValid(procscan))
{
@@ -183,7 +185,7 @@ regprocout(RegProcedure proid)
bool isnull;
s = (char *) heap_getattr(proctup, 1,
- RelationGetDescr(proc), &isnull);
+ RelationGetDescr(proc), &isnull);
if (!isnull)
StrNCpy(result, s, NAMEDATALEN);
else
@@ -191,8 +193,8 @@ regprocout(RegProcedure proid)
}
else
{
- result[0] = '-';
- result[1] = '\0';
+ result[0] = '-';
+ result[1] = '\0';
}
heap_endscan(procscan);
heap_close(proc);
@@ -200,8 +202,8 @@ regprocout(RegProcedure proid)
}
#ifdef EBUG
- elog(DEBUG, "regprocout: no such procedure %d", proid);
-#endif /* defined(EBUG) */
+ elog(DEBUG, "regprocout: no such procedure %d", proid);
+#endif /* defined(EBUG) */
return result;
}
@@ -232,15 +234,15 @@ oid8types(Oid **oidArray)
if (*sp != InvalidOid)
{
typetup = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(*sp),
- 0, 0, 0);
+ ObjectIdGetDatum(*sp),
+ 0, 0, 0);
if (HeapTupleIsValid(typetup))
{
char *s;
s = ((Form_pg_type) GETSTRUCT(typetup))->typname.data;
StrNCpy(VARDATA(result) + strlen(VARDATA(result)), s,
- NAMEDATALEN);
+ NAMEDATALEN);
strcat(VARDATA(result), " ");
}
}
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 593d670d37..f9774bf62f 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -3,35 +3,35 @@
* out of it's tuple
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.2 1998/09/01 03:26:17 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.3 1998/09/01 04:32:49 momjian Exp $
*
- * This software is copyrighted by Jan Wieck - Hamburg.
+ * This software is copyrighted by Jan Wieck - Hamburg.
*
- * The author hereby grants permission to use, copy, modify,
- * distribute, and license this software and its documentation
- * for any purpose, provided that existing copyright notices are
- * retained in all copies and that this notice is included
- * verbatim in any distributions. No written agreement, license,
- * or royalty fee is required for any of the authorized uses.
- * Modifications to this software may be copyrighted by their
- * author and need not follow the licensing terms described
- * here, provided that the new terms are clearly indicated on
- * the first page of each file where they apply.
+ * The author hereby grants permission to use, copy, modify,
+ * distribute, and license this software and its documentation
+ * for any purpose, provided that existing copyright notices are
+ * retained in all copies and that this notice is included
+ * verbatim in any distributions. No written agreement, license,
+ * or royalty fee is required for any of the authorized uses.
+ * Modifications to this software may be copyrighted by their
+ * author and need not follow the licensing terms described
+ * here, provided that the new terms are clearly indicated on
+ * the first page of each file where they apply.
*
- * IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY
- * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
- * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS
- * SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN
- * IF THE AUTHOR HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
+ * IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY
+ * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
+ * CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS
+ * SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN
+ * IF THE AUTHOR HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
*
- * THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON
- * AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAVE NO
- * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
- * ENHANCEMENTS, OR MODIFICATIONS.
+ * THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ * PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON
+ * AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAVE NO
+ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
+ * ENHANCEMENTS, OR MODIFICATIONS.
*
**********************************************************************/
@@ -70,8 +70,8 @@ static char *query_getview = "SELECT * FROM pg_rewrite WHERE rulename = $1 or ru
* Global functions
* ----------
*/
-text *pg_get_ruledef(NameData *rname);
-text *pg_get_viewdef(NameData *rname);
+text *pg_get_ruledef(NameData *rname);
+text *pg_get_viewdef(NameData *rname);
/* ----------
@@ -103,90 +103,91 @@ static bool check_if_rte_used(int rt_index, Node *node, int sup);
text *
pg_get_ruledef(NameData *rname)
{
- text *ruledef;
- Datum args[1];
- char nulls[2];
- int spirc;
- HeapTuple ruletup;
- TupleDesc rulettc;
- char *tmp;
- int len;
-
- /* ----------
- * We need the rules name somewhere deep down
- * ----------
- */
- rulename = nameout(rname);
-
- /* ----------
- * Connect to SPI manager
- * ----------
- */
- if (SPI_connect() != SPI_OK_CONNECT)
- elog(ERROR, "get_ruledef: cannot connect to SPI manager");
-
- /* ----------
- * On the first call prepare the plan to lookup pg_proc.
- * We read pg_proc over the SPI manager instead of using
- * the syscache to be checked for read access on pg_proc.
- * ----------
- */
- if (plan_getrule == NULL) {
- Oid argtypes[1];
- void *plan;
-
- argtypes[0] = NAMEOID;
- plan = SPI_prepare(query_getrule, 1, argtypes);
- if (plan == NULL)
- elog(ERROR, "SPI_prepare() failed for \"%s\"", query_getrule);
- plan_getrule = SPI_saveplan(plan);
- }
-
- /* ----------
- * Get the pg_rewrite tuple for this rule
- * ----------
- */
- args[0] = PointerGetDatum(rulename);
- nulls[0] = (rulename == NULL) ? 'n' : ' ';
- nulls[1] = '\0';
- spirc = SPI_execp(plan_getrule, args, nulls, 1);
- if (spirc != SPI_OK_SELECT) {
- elog(ERROR, "failed to get pg_rewrite tuple for %s", rulename);
- }
- if (SPI_processed != 1) {
- if (SPI_finish() != SPI_OK_FINISH)
- elog(ERROR, "get_ruledef: SPI_finish() failed");
- ruledef = SPI_palloc(VARHDRSZ + 1);
- VARSIZE(ruledef) = VARHDRSZ + 1;
- VARDATA(ruledef)[0] = '-';
+ text *ruledef;
+ Datum args[1];
+ char nulls[2];
+ int spirc;
+ HeapTuple ruletup;
+ TupleDesc rulettc;
+ char *tmp;
+ int len;
+
+ /* ----------
+ * We need the rules name somewhere deep down
+ * ----------
+ */
+ rulename = nameout(rname);
+
+ /* ----------
+ * Connect to SPI manager
+ * ----------
+ */
+ if (SPI_connect() != SPI_OK_CONNECT)
+ elog(ERROR, "get_ruledef: cannot connect to SPI manager");
+
+ /* ----------
+ * On the first call prepare the plan to lookup pg_proc.
+ * We read pg_proc over the SPI manager instead of using
+ * the syscache to be checked for read access on pg_proc.
+ * ----------
+ */
+ if (plan_getrule == NULL)
+ {
+ Oid argtypes[1];
+ void *plan;
+
+ argtypes[0] = NAMEOID;
+ plan = SPI_prepare(query_getrule, 1, argtypes);
+ if (plan == NULL)
+ elog(ERROR, "SPI_prepare() failed for \"%s\"", query_getrule);
+ plan_getrule = SPI_saveplan(plan);
+ }
+
+ /* ----------
+ * Get the pg_rewrite tuple for this rule
+ * ----------
+ */
+ args[0] = PointerGetDatum(rulename);
+ nulls[0] = (rulename == NULL) ? 'n' : ' ';
+ nulls[1] = '\0';
+ spirc = SPI_execp(plan_getrule, args, nulls, 1);
+ if (spirc != SPI_OK_SELECT)
+ elog(ERROR, "failed to get pg_rewrite tuple for %s", rulename);
+ if (SPI_processed != 1)
+ {
+ if (SPI_finish() != SPI_OK_FINISH)
+ elog(ERROR, "get_ruledef: SPI_finish() failed");
+ ruledef = SPI_palloc(VARHDRSZ + 1);
+ VARSIZE(ruledef) = VARHDRSZ + 1;
+ VARDATA(ruledef)[0] = '-';
+ return ruledef;
+ }
+
+ ruletup = SPI_tuptable->vals[0];
+ rulettc = SPI_tuptable->tupdesc;
+
+ /* ----------
+ * Get the rules definition and put it into executors memory
+ * ----------
+ */
+ tmp = make_ruledef(ruletup, rulettc);
+ len = strlen(tmp) + VARHDRSZ;
+ ruledef = SPI_palloc(len);
+ VARSIZE(ruledef) = len;
+ memcpy(VARDATA(ruledef), tmp, len - VARHDRSZ);
+
+ /* ----------
+ * Disconnect from SPI manager
+ * ----------
+ */
+ if (SPI_finish() != SPI_OK_FINISH)
+ elog(ERROR, "get_ruledef: SPI_finish() failed");
+
+ /* ----------
+ * Easy - isn't it?
+ * ----------
+ */
return ruledef;
- }
-
- ruletup = SPI_tuptable->vals[0];
- rulettc = SPI_tuptable->tupdesc;
-
- /* ----------
- * Get the rules definition and put it into executors memory
- * ----------
- */
- tmp = make_ruledef(ruletup, rulettc);
- len = strlen(tmp) + VARHDRSZ;
- ruledef = SPI_palloc(len);
- VARSIZE(ruledef) = len;
- memcpy(VARDATA(ruledef), tmp, len - VARHDRSZ);
-
- /* ----------
- * Disconnect from SPI manager
- * ----------
- */
- if (SPI_finish() != SPI_OK_FINISH)
- elog(ERROR, "get_ruledef: SPI_finish() failed");
-
- /* ----------
- * Easy - isn't it?
- * ----------
- */
- return ruledef;
}
@@ -198,91 +199,92 @@ pg_get_ruledef(NameData *rname)
text *
pg_get_viewdef(NameData *rname)
{
- text *ruledef;
- Datum args[2];
- char nulls[3];
- int spirc;
- HeapTuple ruletup;
- TupleDesc rulettc;
- char *tmp;
- int len;
- char name1[NAMEDATALEN + 5];
- char name2[NAMEDATALEN + 5];
-
- /* ----------
- * We need the rules name somewhere deep down
- * ----------
- */
- rulename = nameout(rname);
-
- /* ----------
- * Connect to SPI manager
- * ----------
- */
- if (SPI_connect() != SPI_OK_CONNECT)
- elog(ERROR, "get_viewdef: cannot connect to SPI manager");
-
- /* ----------
- * On the first call prepare the plan to lookup pg_proc.
- * We read pg_proc over the SPI manager instead of using
- * the syscache to be checked for read access on pg_proc.
- * ----------
- */
- if (plan_getview == NULL) {
- Oid argtypes[2];
- void *plan;
-
- argtypes[0] = NAMEOID;
- argtypes[1] = NAMEOID;
- plan = SPI_prepare(query_getview, 2, argtypes);
- if (plan == NULL)
- elog(ERROR, "SPI_prepare() failed for \"%s\"", query_getview);
- plan_getview = SPI_saveplan(plan);
- }
-
- /* ----------
- * Get the pg_rewrite tuple for this rule
- * ----------
- */
- sprintf(name1, "_RET%s", rulename);
- sprintf(name2, "_ret%s", rulename);
- args[0] = PointerGetDatum(name1);
- args[1] = PointerGetDatum(name2);
- nulls[0] = ' ';
- nulls[1] = ' ';
- nulls[2] = '\0';
- spirc = SPI_execp(plan_getview, args, nulls, 1);
- if (spirc != SPI_OK_SELECT) {
- elog(ERROR, "failed to get pg_rewrite tuple for view %s", rulename);
- }
- if (SPI_processed != 1) {
- tmp = "Not a view";
- } else {
+ text *ruledef;
+ Datum args[2];
+ char nulls[3];
+ int spirc;
+ HeapTuple ruletup;
+ TupleDesc rulettc;
+ char *tmp;
+ int len;
+ char name1[NAMEDATALEN + 5];
+ char name2[NAMEDATALEN + 5];
+
/* ----------
- * Get the rules definition and put it into executors memory
+ * We need the rules name somewhere deep down
* ----------
*/
- ruletup = SPI_tuptable->vals[0];
- rulettc = SPI_tuptable->tupdesc;
- tmp = make_viewdef(ruletup, rulettc);
- }
- len = strlen(tmp) + VARHDRSZ;
- ruledef = SPI_palloc(len);
- VARSIZE(ruledef) = len;
- memcpy(VARDATA(ruledef), tmp, len - VARHDRSZ);
-
- /* ----------
- * Disconnect from SPI manager
- * ----------
- */
- if (SPI_finish() != SPI_OK_FINISH)
- elog(ERROR, "get_viewdef: SPI_finish() failed");
-
- /* ----------
- * Easy - isn't it?
- * ----------
- */
- return ruledef;
+ rulename = nameout(rname);
+
+ /* ----------
+ * Connect to SPI manager
+ * ----------
+ */
+ if (SPI_connect() != SPI_OK_CONNECT)
+ elog(ERROR, "get_viewdef: cannot connect to SPI manager");
+
+ /* ----------
+ * On the first call prepare the plan to lookup pg_proc.
+ * We read pg_proc over the SPI manager instead of using
+ * the syscache to be checked for read access on pg_proc.
+ * ----------
+ */
+ if (plan_getview == NULL)
+ {
+ Oid argtypes[2];
+ void *plan;
+
+ argtypes[0] = NAMEOID;
+ argtypes[1] = NAMEOID;
+ plan = SPI_prepare(query_getview, 2, argtypes);
+ if (plan == NULL)
+ elog(ERROR, "SPI_prepare() failed for \"%s\"", query_getview);
+ plan_getview = SPI_saveplan(plan);
+ }
+
+ /* ----------
+ * Get the pg_rewrite tuple for this rule
+ * ----------
+ */
+ sprintf(name1, "_RET%s", rulename);
+ sprintf(name2, "_ret%s", rulename);
+ args[0] = PointerGetDatum(name1);
+ args[1] = PointerGetDatum(name2);
+ nulls[0] = ' ';
+ nulls[1] = ' ';
+ nulls[2] = '\0';
+ spirc = SPI_execp(plan_getview, args, nulls, 1);
+ if (spirc != SPI_OK_SELECT)
+ elog(ERROR, "failed to get pg_rewrite tuple for view %s", rulename);
+ if (SPI_processed != 1)
+ tmp = "Not a view";
+ else
+ {
+ /* ----------
+ * Get the rules definition and put it into executors memory
+ * ----------
+ */
+ ruletup = SPI_tuptable->vals[0];
+ rulettc = SPI_tuptable->tupdesc;
+ tmp = make_viewdef(ruletup, rulettc);
+ }
+ len = strlen(tmp) + VARHDRSZ;
+ ruledef = SPI_palloc(len);
+ VARSIZE(ruledef) = len;
+ memcpy(VARDATA(ruledef), tmp, len - VARHDRSZ);
+
+ /* ----------
+ * Disconnect from SPI manager
+ * ----------
+ */
+ if (SPI_finish() != SPI_OK_FINISH)
+ elog(ERROR, "get_viewdef: SPI_finish() failed");
+
+ /* ----------
+ * Easy - isn't it?
+ * ----------
+ */
+ return ruledef;
}
@@ -294,135 +296,151 @@ pg_get_viewdef(NameData *rname)
static char *
make_ruledef(HeapTuple ruletup, TupleDesc rulettc)
{
- char *buf;
- char ev_type;
- Oid ev_class;
- int2 ev_attr;
- bool is_instead;
- char *ev_qual;
- char *ev_action;
- List *actions = NIL;
- int fno;
- bool isnull;
-
- /* ----------
- * Allocate space for the returned rule definition text
- * ----------
- */
- buf = palloc(8192);
-
- /* ----------
- * Get the attribute values from the rules tuple
- * ----------
- */
- fno = SPI_fnumber(rulettc, "ev_type");
- ev_type = (char)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "ev_class");
- ev_class = (Oid)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "ev_attr");
- ev_attr = (int2)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "is_instead");
- is_instead = (bool)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "ev_qual");
- ev_qual = SPI_getvalue(ruletup, rulettc, fno);
- if (isnull) ev_qual = NULL;
-
- fno = SPI_fnumber(rulettc, "ev_action");
- ev_action = SPI_getvalue(ruletup, rulettc, fno);
- if (isnull) ev_action = NULL;
- if (ev_action != NULL) {
- actions = (List *)stringToNode(ev_action);
- }
-
- /* ----------
- * Build the rules definition text
- * ----------
- */
- strcpy(buf, "CREATE RULE ");
-
- /* The rule name */
- strcat(buf, rulename);
- strcat(buf, " AS ON ");
-
- /* The event the rule is fired for */
- switch (ev_type) {
- case '1': strcat(buf, "SELECT TO ");
+ char *buf;
+ char ev_type;
+ Oid ev_class;
+ int2 ev_attr;
+ bool is_instead;
+ char *ev_qual;
+ char *ev_action;
+ List *actions = NIL;
+ int fno;
+ bool isnull;
+
+ /* ----------
+ * Allocate space for the returned rule definition text
+ * ----------
+ */
+ buf = palloc(8192);
+
+ /* ----------
+ * Get the attribute values from the rules tuple
+ * ----------
+ */
+ fno = SPI_fnumber(rulettc, "ev_type");
+ ev_type = (char) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "ev_class");
+ ev_class = (Oid) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "ev_attr");
+ ev_attr = (int2) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "is_instead");
+ is_instead = (bool) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "ev_qual");
+ ev_qual = SPI_getvalue(ruletup, rulettc, fno);
+ if (isnull)
+ ev_qual = NULL;
+
+ fno = SPI_fnumber(rulettc, "ev_action");
+ ev_action = SPI_getvalue(ruletup, rulettc, fno);
+ if (isnull)
+ ev_action = NULL;
+ if (ev_action != NULL)
+ actions = (List *) stringToNode(ev_action);
+
+ /* ----------
+ * Build the rules definition text
+ * ----------
+ */
+ strcpy(buf, "CREATE RULE ");
+
+ /* The rule name */
+ strcat(buf, rulename);
+ strcat(buf, " AS ON ");
+
+ /* The event the rule is fired for */
+ switch (ev_type)
+ {
+ case '1':
+ strcat(buf, "SELECT TO ");
break;
- case '2': strcat(buf, "UPDATE TO ");
+ case '2':
+ strcat(buf, "UPDATE TO ");
break;
- case '3': strcat(buf, "INSERT TO ");
+ case '3':
+ strcat(buf, "INSERT TO ");
break;
- case '4': strcat(buf, "DELETE TO ");
+ case '4':
+ strcat(buf, "DELETE TO ");
break;
- default:
- elog(ERROR, "get_ruledef: rule %s has unsupported event type %d",
- rulename, ev_type);
- break;
- }
+ default:
+ elog(ERROR, "get_ruledef: rule %s has unsupported event type %d",
+ rulename, ev_type);
+ break;
+ }
- /* The relation the rule is fired on */
- strcat(buf, get_relation_name(ev_class));
- if (ev_attr > 0) {
- strcat(buf, ".");
- strcat(buf, get_attribute_name(ev_class, ev_attr));
- }
+ /* The relation the rule is fired on */
+ strcat(buf, get_relation_name(ev_class));
+ if (ev_attr > 0)
+ {
+ strcat(buf, ".");
+ strcat(buf, get_attribute_name(ev_class, ev_attr));
+ }
- /* If the rule has an event qualification, add it */
- if (ev_qual == NULL) ev_qual = "";
- if (strlen(ev_qual) > 0) {
- Node *qual;
- Query *query;
+ /* If the rule has an event qualification, add it */
+ if (ev_qual == NULL)
+ ev_qual = "";
+ if (strlen(ev_qual) > 0)
+ {
+ Node *qual;
+ Query *query;
- qual = stringToNode(ev_qual);
- query = (Query *)lfirst(actions);
+ qual = stringToNode(ev_qual);
+ query = (Query *) lfirst(actions);
- strcat(buf, " WHERE ");
- strcat(buf, get_rule_expr(query->rtable, 0, qual, TRUE));
- }
+ strcat(buf, " WHERE ");
+ strcat(buf, get_rule_expr(query->rtable, 0, qual, TRUE));
+ }
- strcat(buf, " DO ");
+ strcat(buf, " DO ");
- /* The INSTEAD keyword (if so) */
- if (is_instead)
- strcat(buf, "INSTEAD ");
+ /* The INSTEAD keyword (if so) */
+ if (is_instead)
+ strcat(buf, "INSTEAD ");
- /* Finally the rules actions */
- if (length(actions) > 1) {
- List *action;
- Query *query;
+ /* Finally the rules actions */
+ if (length(actions) > 1)
+ {
+ List *action;
+ Query *query;
- strcat(buf, "(");
- foreach (action, actions) {
- query = (Query *)lfirst(action);
- strcat(buf, get_query_def(query));
- strcat(buf, "; ");
+ strcat(buf, "(");
+ foreach(action, actions)
+ {
+ query = (Query *) lfirst(action);
+ strcat(buf, get_query_def(query));
+ strcat(buf, "; ");
+ }
+ strcat(buf, ");");
}
- strcat(buf, ");");
- } else {
- if (length(actions) == 0) {
- strcat(buf, "NOTHING;");
- } else {
- Query *query;
-
- query = (Query *)lfirst(actions);
- strcat(buf, get_query_def(query));
- strcat(buf, ";");
+ else
+ {
+ if (length(actions) == 0)
+ {
+ strcat(buf, "NOTHING;");
+ }
+ else
+ {
+ Query *query;
+
+ query = (Query *) lfirst(actions);
+ strcat(buf, get_query_def(query));
+ strcat(buf, ";");
+ }
}
- }
- /* ----------
- * That's it
- * ----------
- */
- return buf;
+ /* ----------
+ * That's it
+ * ----------
+ */
+ return buf;
}
@@ -434,61 +452,62 @@ make_ruledef(HeapTuple ruletup, TupleDesc rulettc)
static char *
make_viewdef(HeapTuple ruletup, TupleDesc rulettc)
{
- char buf[8192];
- Query *query;
- char ev_type;
- Oid ev_class;
- int2 ev_attr;
- bool is_instead;
- char *ev_qual;
- char *ev_action;
- List *actions = NIL;
- int fno;
- bool isnull;
-
- /* ----------
- * Get the attribute values from the rules tuple
- * ----------
- */
- fno = SPI_fnumber(rulettc, "ev_type");
- ev_type = (char)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "ev_class");
- ev_class = (Oid)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "ev_attr");
- ev_attr = (int2)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "is_instead");
- is_instead = (bool)SPI_getbinval(ruletup, rulettc, fno, &isnull);
-
- fno = SPI_fnumber(rulettc, "ev_qual");
- ev_qual = SPI_getvalue(ruletup, rulettc, fno);
- if (isnull) ev_qual = "";
-
- fno = SPI_fnumber(rulettc, "ev_action");
- ev_action = SPI_getvalue(ruletup, rulettc, fno);
- if (isnull) ev_action = NULL;
- if (ev_action != NULL) {
- actions = (List *)stringToNode(ev_action);
- }
-
- if (length(actions) != 1)
- return "Not a view";
-
- query = (Query *)lfirst(actions);
-
- if (ev_type != '1' || ev_attr >= 0 || !is_instead || strcmp(ev_qual, ""))
- return "Not a view";
-
- strcpy(buf, get_select_query_def(query));
- strcat(buf, ";");
-
- /* ----------
- * That's it
- * ----------
- */
- return pstrdup(buf);
+ char buf[8192];
+ Query *query;
+ char ev_type;
+ Oid ev_class;
+ int2 ev_attr;
+ bool is_instead;
+ char *ev_qual;
+ char *ev_action;
+ List *actions = NIL;
+ int fno;
+ bool isnull;
+
+ /* ----------
+ * Get the attribute values from the rules tuple
+ * ----------
+ */
+ fno = SPI_fnumber(rulettc, "ev_type");
+ ev_type = (char) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "ev_class");
+ ev_class = (Oid) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "ev_attr");
+ ev_attr = (int2) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "is_instead");
+ is_instead = (bool) SPI_getbinval(ruletup, rulettc, fno, &isnull);
+
+ fno = SPI_fnumber(rulettc, "ev_qual");
+ ev_qual = SPI_getvalue(ruletup, rulettc, fno);
+ if (isnull)
+ ev_qual = "";
+
+ fno = SPI_fnumber(rulettc, "ev_action");
+ ev_action = SPI_getvalue(ruletup, rulettc, fno);
+ if (isnull)
+ ev_action = NULL;
+ if (ev_action != NULL)
+ actions = (List *) stringToNode(ev_action);
+
+ if (length(actions) != 1)
+ return "Not a view";
+
+ query = (Query *) lfirst(actions);
+
+ if (ev_type != '1' || ev_attr >= 0 || !is_instead || strcmp(ev_qual, ""))
+ return "Not a view";
+
+ strcpy(buf, get_select_query_def(query));
+ strcat(buf, ";");
+
+ /* ----------
+ * That's it
+ * ----------
+ */
+ return pstrdup(buf);
}
@@ -501,34 +520,35 @@ make_viewdef(HeapTuple ruletup, TupleDesc rulettc)
static char *
get_query_def(Query *query)
{
- switch (query->commandType) {
- case CMD_SELECT:
- return get_select_query_def(query);
- break;
-
- case CMD_UPDATE:
- return get_update_query_def(query);
- break;
-
- case CMD_INSERT:
- return get_insert_query_def(query);
- break;
-
- case CMD_DELETE:
- return get_delete_query_def(query);
- break;
-
- case CMD_NOTHING:
- return "NOTHING";
- break;
-
- default:
- elog(ERROR, "get_ruledef of %s: query command type %d not implemented yet",
- rulename, query->commandType);
- break;
- }
-
- return NULL;
+ switch (query->commandType)
+ {
+ case CMD_SELECT:
+ return get_select_query_def(query);
+ break;
+
+ case CMD_UPDATE:
+ return get_update_query_def(query);
+ break;
+
+ case CMD_INSERT:
+ return get_insert_query_def(query);
+ break;
+
+ case CMD_DELETE:
+ return get_delete_query_def(query);
+ break;
+
+ case CMD_NOTHING:
+ return "NOTHING";
+ break;
+
+ default:
+ elog(ERROR, "get_ruledef of %s: query command type %d not implemented yet",
+ rulename, query->commandType);
+ break;
+ }
+
+ return NULL;
}
@@ -539,144 +559,162 @@ get_query_def(Query *query)
static char *
get_select_query_def(Query *query)
{
- char buf[8192];
- char *sep;
- TargetEntry *tle;
- RangeTblEntry *rte;
- bool *rt_used;
- int rt_length;
- int rt_numused = 0;
- bool rt_constonly = TRUE;
- int i;
- List *l;
-
- /* ----------
- * First we need need to know which and how many of the
- * range table entries in the query are used in the target list
- * or queries qualification
- * ----------
- */
- rt_length = length(query->rtable);
- rt_used = palloc(sizeof(bool) * rt_length);
- for (i = 0; i < rt_length; i++) {
- if (check_if_rte_used(i + 1, (Node *)(query->targetList), 0)) {
- rt_used[i] = TRUE;
- rt_numused++;
- } else {
- if (check_if_rte_used(i + 1, (Node *)(query->qual), 0)) {
- rt_used[i] = TRUE;
- rt_numused++;
- } else {
- rt_used[i] = FALSE;
- }
- }
- }
-
- /* ----------
- * Now check if any of the used rangetable entries is different
- * from *NEW* and *CURRENT*. If so we must omit the FROM clause
- * later.
- * ----------
- */
- i = 0;
- foreach (l, query->rtable) {
- if (!rt_used[i++])
- continue;
-
- rte = (RangeTblEntry *)lfirst(l);
- if (!strcmp(rte->refname, "*NEW*"))
- continue;
- if (!strcmp(rte->refname, "*CURRENT*"))
- continue;
-
- rt_constonly = FALSE;
- break;
- }
-
- /* ----------
- * Build up the query string - first we say SELECT
- * ----------
- */
- strcpy(buf, "SELECT");
-
- /* Then we tell what to select (the targetlist) */
- sep = " ";
- foreach (l, query->targetList) {
- bool tell_as = FALSE;
-
- tle = (TargetEntry *)lfirst(l);
- strcat(buf, sep);
- sep = ", ";
-
- strcat(buf, get_tle_expr(query->rtable, 0, tle, (rt_numused > 1)));
-
- /* Check if we must say AS ... */
- if (nodeTag(tle->expr) != T_Var) {
- tell_as = strcmp(tle->resdom->resname, "?column?");
- } else {
- Var *var = (Var *)(tle->expr);
- char *attname;
-
- rte = (RangeTblEntry *)nth(var->varno - 1, query->rtable);
- attname = get_attribute_name(rte->relid, var->varattno);
- if (strcmp(attname, tle->resdom->resname))
- tell_as = TRUE;
+ char buf[8192];
+ char *sep;
+ TargetEntry *tle;
+ RangeTblEntry *rte;
+ bool *rt_used;
+ int rt_length;
+ int rt_numused = 0;
+ bool rt_constonly = TRUE;
+ int i;
+ List *l;
+
+ /* ----------
+ * First we need need to know which and how many of the
+ * range table entries in the query are used in the target list
+ * or queries qualification
+ * ----------
+ */
+ rt_length = length(query->rtable);
+ rt_used = palloc(sizeof(bool) * rt_length);
+ for (i = 0; i < rt_length; i++)
+ {
+ if (check_if_rte_used(i + 1, (Node *) (query->targetList), 0))
+ {
+ rt_used[i] = TRUE;
+ rt_numused++;
+ }
+ else
+ {
+ if (check_if_rte_used(i + 1, (Node *) (query->qual), 0))
+ {
+ rt_used[i] = TRUE;
+ rt_numused++;
+ }
+ else
+ rt_used[i] = FALSE;
+ }
}
- /* and do if so */
- if (tell_as) {
- strcat(buf, " AS ");
- strcat(buf, tle->resdom->resname);
+ /* ----------
+ * Now check if any of the used rangetable entries is different
+ * from *NEW* and *CURRENT*. If so we must omit the FROM clause
+ * later.
+ * ----------
+ */
+ i = 0;
+ foreach(l, query->rtable)
+ {
+ if (!rt_used[i++])
+ continue;
+
+ rte = (RangeTblEntry *) lfirst(l);
+ if (!strcmp(rte->refname, "*NEW*"))
+ continue;
+ if (!strcmp(rte->refname, "*CURRENT*"))
+ continue;
+
+ rt_constonly = FALSE;
+ break;
}
- }
- /* If we need other tables that *NEW* or *CURRENT* add the FROM clause */
- if (!rt_constonly && rt_numused > 0) {
- strcat(buf, " FROM");
+ /* ----------
+ * Build up the query string - first we say SELECT
+ * ----------
+ */
+ strcpy(buf, "SELECT");
- i = 0;
+ /* Then we tell what to select (the targetlist) */
sep = " ";
- foreach (l, query->rtable) {
- if (rt_used[i++]) {
- rte = (RangeTblEntry *)lfirst(l);
+ foreach(l, query->targetList)
+ {
+ bool tell_as = FALSE;
- if (!strcmp(rte->refname, "*NEW*"))
- continue;
+ tle = (TargetEntry *) lfirst(l);
+ strcat(buf, sep);
+ sep = ", ";
- if (!strcmp(rte->refname, "*CURRENT*"))
- continue;
+ strcat(buf, get_tle_expr(query->rtable, 0, tle, (rt_numused > 1)));
- strcat(buf, sep); sep = ", ";
- strcat(buf, rte->relname);
- if (rt_numused > 1) {
- strcat(buf, " ");
- strcat(buf, rte->refname);
+ /* Check if we must say AS ... */
+ if (nodeTag(tle->expr) != T_Var)
+ tell_as = strcmp(tle->resdom->resname, "?column?");
+ else
+ {
+ Var *var = (Var *) (tle->expr);
+ char *attname;
+
+ rte = (RangeTblEntry *) nth(var->varno - 1, query->rtable);
+ attname = get_attribute_name(rte->relid, var->varattno);
+ if (strcmp(attname, tle->resdom->resname))
+ tell_as = TRUE;
+ }
+
+ /* and do if so */
+ if (tell_as)
+ {
+ strcat(buf, " AS ");
+ strcat(buf, tle->resdom->resname);
}
- }
}
- }
- /* Add the WHERE clause if given */
- if (query->qual != NULL) {
- strcat(buf, " WHERE ");
- strcat(buf, get_rule_expr(query->rtable, 0, query->qual, (rt_numused > 1)));
- }
+ /* If we need other tables that *NEW* or *CURRENT* add the FROM clause */
+ if (!rt_constonly && rt_numused > 0)
+ {
+ strcat(buf, " FROM");
- /* Add the GROUP BY CLAUSE */
- if (query->groupClause != NULL) {
- strcat(buf, " GROUP BY ");
- sep = "";
- foreach (l, query->groupClause) {
- strcat(buf, sep); sep = ", ";
- strcat(buf, get_rule_expr(query->rtable, 0, lfirst(l), (rt_numused > 1)));
+ i = 0;
+ sep = " ";
+ foreach(l, query->rtable)
+ {
+ if (rt_used[i++])
+ {
+ rte = (RangeTblEntry *) lfirst(l);
+
+ if (!strcmp(rte->refname, "*NEW*"))
+ continue;
+
+ if (!strcmp(rte->refname, "*CURRENT*"))
+ continue;
+
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, rte->relname);
+ if (rt_numused > 1)
+ {
+ strcat(buf, " ");
+ strcat(buf, rte->refname);
+ }
+ }
+ }
+ }
+
+ /* Add the WHERE clause if given */
+ if (query->qual != NULL)
+ {
+ strcat(buf, " WHERE ");
+ strcat(buf, get_rule_expr(query->rtable, 0, query->qual, (rt_numused > 1)));
+ }
+
+ /* Add the GROUP BY CLAUSE */
+ if (query->groupClause != NULL)
+ {
+ strcat(buf, " GROUP BY ");
+ sep = "";
+ foreach(l, query->groupClause)
+ {
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, get_rule_expr(query->rtable, 0, lfirst(l), (rt_numused > 1)));
+ }
}
- }
- /* ----------
- * Copy the query string into allocated space and return it
- * ----------
- */
- return pstrdup(buf);
+ /* ----------
+ * Copy the query string into allocated space and return it
+ * ----------
+ */
+ return pstrdup(buf);
}
@@ -687,92 +725,103 @@ get_select_query_def(Query *query)
static char *
get_insert_query_def(Query *query)
{
- char buf[8192];
- char *sep;
- TargetEntry *tle;
- RangeTblEntry *rte;
- bool *rt_used;
- int rt_length;
- int rt_numused = 0;
- bool rt_constonly = TRUE;
- int i;
- List *l;
-
- /* ----------
- * We need to know if other tables than *NEW* or *CURRENT*
- * are used in the query. If not, it's an INSERT ... VALUES,
- * otherwise an INSERT ... SELECT.
- * ----------
- */
- rt_length = length(query->rtable);
- rt_used = palloc(sizeof(bool) * rt_length);
- for (i = 0; i < rt_length; i++) {
- if (check_if_rte_used(i + 1, (Node *)(query->targetList), 0)) {
- rt_used[i] = TRUE;
- rt_numused++;
- } else {
- if (check_if_rte_used(i + 1, (Node *)(query->qual), 0)) {
- rt_used[i] = TRUE;
- rt_numused++;
- } else {
- rt_used[i] = FALSE;
- }
+ char buf[8192];
+ char *sep;
+ TargetEntry *tle;
+ RangeTblEntry *rte;
+ bool *rt_used;
+ int rt_length;
+ int rt_numused = 0;
+ bool rt_constonly = TRUE;
+ int i;
+ List *l;
+
+ /* ----------
+ * We need to know if other tables than *NEW* or *CURRENT*
+ * are used in the query. If not, it's an INSERT ... VALUES,
+ * otherwise an INSERT ... SELECT.
+ * ----------
+ */
+ rt_length = length(query->rtable);
+ rt_used = palloc(sizeof(bool) * rt_length);
+ for (i = 0; i < rt_length; i++)
+ {
+ if (check_if_rte_used(i + 1, (Node *) (query->targetList), 0))
+ {
+ rt_used[i] = TRUE;
+ rt_numused++;
+ }
+ else
+ {
+ if (check_if_rte_used(i + 1, (Node *) (query->qual), 0))
+ {
+ rt_used[i] = TRUE;
+ rt_numused++;
+ }
+ else
+ rt_used[i] = FALSE;
+ }
}
- }
-
- i = 0;
- foreach (l, query->rtable) {
- if (!rt_used[i++])
- continue;
-
- rte = (RangeTblEntry *)lfirst(l);
- if (!strcmp(rte->refname, "*NEW*"))
- continue;
- if (!strcmp(rte->refname, "*CURRENT*"))
- continue;
-
- rt_constonly = FALSE;
- break;
- }
-
- /* ----------
- * Start the query with INSERT INTO relname
- * ----------
- */
- rte = (RangeTblEntry *)nth(query->resultRelation - 1, query->rtable);
- strcpy(buf, "INSERT INTO ");
- strcat(buf, rte->relname);
-
- /* Add the target list */
- sep = " (";
- foreach (l, query->targetList) {
- tle = (TargetEntry *)lfirst(l);
-
- strcat(buf, sep); sep = ", ";
- strcat(buf, tle->resdom->resname);
- }
- strcat(buf, ") ");
-
- /* Add the VALUES or the SELECT */
- if (rt_constonly && query->qual == NULL) {
- strcat(buf, "VALUES (");
- sep = "";
- foreach (l, query->targetList) {
- tle = (TargetEntry *)lfirst(l);
- strcat(buf, sep); sep = ", ";
- strcat(buf, get_tle_expr(query->rtable, 0, tle, (rt_numused > 1)));
+ i = 0;
+ foreach(l, query->rtable)
+ {
+ if (!rt_used[i++])
+ continue;
+
+ rte = (RangeTblEntry *) lfirst(l);
+ if (!strcmp(rte->refname, "*NEW*"))
+ continue;
+ if (!strcmp(rte->refname, "*CURRENT*"))
+ continue;
+
+ rt_constonly = FALSE;
+ break;
}
- strcat(buf, ")");
- } else {
- strcat(buf, get_select_query_def(query));
- }
-
- /* ----------
- * Copy the query string into allocated space and return it
- * ----------
- */
- return pstrdup(buf);
+
+ /* ----------
+ * Start the query with INSERT INTO relname
+ * ----------
+ */
+ rte = (RangeTblEntry *) nth(query->resultRelation - 1, query->rtable);
+ strcpy(buf, "INSERT INTO ");
+ strcat(buf, rte->relname);
+
+ /* Add the target list */
+ sep = " (";
+ foreach(l, query->targetList)
+ {
+ tle = (TargetEntry *) lfirst(l);
+
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, tle->resdom->resname);
+ }
+ strcat(buf, ") ");
+
+ /* Add the VALUES or the SELECT */
+ if (rt_constonly && query->qual == NULL)
+ {
+ strcat(buf, "VALUES (");
+ sep = "";
+ foreach(l, query->targetList)
+ {
+ tle = (TargetEntry *) lfirst(l);
+
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, get_tle_expr(query->rtable, 0, tle, (rt_numused > 1)));
+ }
+ strcat(buf, ")");
+ }
+ else
+ strcat(buf, get_select_query_def(query));
+
+ /* ----------
+ * Copy the query string into allocated space and return it
+ * ----------
+ */
+ return pstrdup(buf);
}
@@ -783,45 +832,48 @@ get_insert_query_def(Query *query)
static char *
get_update_query_def(Query *query)
{
- char buf[8192];
- char *sep;
- TargetEntry *tle;
- RangeTblEntry *rte;
- List *l;
-
- /* ----------
- * Start the query with UPDATE relname SET
- * ----------
- */
- rte = (RangeTblEntry *)nth(query->resultRelation - 1, query->rtable);
- strcpy(buf, "UPDATE ");
- strcat(buf, rte->relname);
- strcat(buf, " SET ");
-
- /* Add the comma separated list of 'attname = value' */
- sep = "";
- foreach (l, query->targetList) {
- tle = (TargetEntry *)lfirst(l);
-
- strcat(buf, sep); sep = ", ";
- strcat(buf, tle->resdom->resname);
- strcat(buf, " = ");
- strcat(buf, get_tle_expr(query->rtable, query->resultRelation,
- tle, TRUE));
- }
-
- /* Finally add a WHERE clause if given */
- if (query->qual != NULL) {
- strcat(buf, " WHERE ");
- strcat(buf, get_rule_expr(query->rtable, query->resultRelation,
- query->qual, TRUE));
- }
-
- /* ----------
- * Copy the query string into allocated space and return it
- * ----------
- */
- return pstrdup(buf);
+ char buf[8192];
+ char *sep;
+ TargetEntry *tle;
+ RangeTblEntry *rte;
+ List *l;
+
+ /* ----------
+ * Start the query with UPDATE relname SET
+ * ----------
+ */
+ rte = (RangeTblEntry *) nth(query->resultRelation - 1, query->rtable);
+ strcpy(buf, "UPDATE ");
+ strcat(buf, rte->relname);
+ strcat(buf, " SET ");
+
+ /* Add the comma separated list of 'attname = value' */
+ sep = "";
+ foreach(l, query->targetList)
+ {
+ tle = (TargetEntry *) lfirst(l);
+
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, tle->resdom->resname);
+ strcat(buf, " = ");
+ strcat(buf, get_tle_expr(query->rtable, query->resultRelation,
+ tle, TRUE));
+ }
+
+ /* Finally add a WHERE clause if given */
+ if (query->qual != NULL)
+ {
+ strcat(buf, " WHERE ");
+ strcat(buf, get_rule_expr(query->rtable, query->resultRelation,
+ query->qual, TRUE));
+ }
+
+ /* ----------
+ * Copy the query string into allocated space and return it
+ * ----------
+ */
+ return pstrdup(buf);
}
@@ -832,28 +884,29 @@ get_update_query_def(Query *query)
static char *
get_delete_query_def(Query *query)
{
- char buf[8192];
- RangeTblEntry *rte;
-
- /* ----------
- * Start the query with DELETE FROM relname
- * ----------
- */
- rte = (RangeTblEntry *)nth(query->resultRelation - 1, query->rtable);
- strcpy(buf, "DELETE FROM ");
- strcat(buf, rte->relname);
-
- /* Add a WHERE clause if given */
- if (query->qual != NULL) {
- strcat(buf, " WHERE ");
- strcat(buf, get_rule_expr(query->rtable, 0, query->qual, FALSE));
- }
-
- /* ----------
- * Copy the query string into allocated space and return it
- * ----------
- */
- return pstrdup(buf);
+ char buf[8192];
+ RangeTblEntry *rte;
+
+ /* ----------
+ * Start the query with DELETE FROM relname
+ * ----------
+ */
+ rte = (RangeTblEntry *) nth(query->resultRelation - 1, query->rtable);
+ strcpy(buf, "DELETE FROM ");
+ strcat(buf, rte->relname);
+
+ /* Add a WHERE clause if given */
+ if (query->qual != NULL)
+ {
+ strcat(buf, " WHERE ");
+ strcat(buf, get_rule_expr(query->rtable, 0, query->qual, FALSE));
+ }
+
+ /* ----------
+ * Copy the query string into allocated space and return it
+ * ----------
+ */
+ return pstrdup(buf);
}
@@ -864,191 +917,197 @@ get_delete_query_def(Query *query)
static char *
get_rule_expr(List *rtable, int rt_index, Node *node, bool varprefix)
{
- char buf[8192];
+ char buf[8192];
- if (node == NULL)
- return pstrdup("");
+ if (node == NULL)
+ return pstrdup("");
- buf[0] = '\0';
+ buf[0] = '\0';
- /* ----------
- * Up to now I don't know if all the node types below
- * can really occur in rules actions and qualifications.
- * There might be some work left.
- * ----------
- */
- switch(nodeTag(node)) {
- case T_TargetEntry:
- {
- TargetEntry *tle = (TargetEntry *)node;
-
- return get_rule_expr(rtable, rt_index,
- (Node *)(tle->expr), varprefix);
- }
- break;
-
- case T_Aggreg:
- {
- Aggreg *agg = (Aggreg *)node;
-
- strcat(buf, agg->aggname);
- strcat(buf, "(");
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)(agg->target), varprefix));
- strcat(buf, ")");
- return pstrdup(buf);
- }
- break;
-
- case T_GroupClause:
- {
- GroupClause *grp = (GroupClause *)node;
+ /* ----------
+ * Up to now I don't know if all the node types below
+ * can really occur in rules actions and qualifications.
+ * There might be some work left.
+ * ----------
+ */
+ switch (nodeTag(node))
+ {
+ case T_TargetEntry:
+ {
+ TargetEntry *tle = (TargetEntry *) node;
+
+ return get_rule_expr(rtable, rt_index,
+ (Node *) (tle->expr), varprefix);
+ }
+ break;
- return get_rule_expr(rtable, rt_index,
- (Node *)(grp->entry), varprefix);
- }
- break;
+ case T_Aggreg:
+ {
+ Aggreg *agg = (Aggreg *) node;
- case T_Expr:
- {
- Expr *expr = (Expr *)node;
-
- /* ----------
- * Expr nodes have to be handled a bit detailed
- * ----------
- */
- switch (expr->opType) {
- case OP_EXPR:
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_leftop(expr),
- varprefix));
- strcat(buf, " ");
- strcat(buf, get_opname(((Oper *)expr->oper)->opno));
- strcat(buf, " ");
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_rightop(expr),
- varprefix));
- return pstrdup(buf);
- break;
-
- case OR_EXPR:
+ strcat(buf, agg->aggname);
strcat(buf, "(");
strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_leftop(expr),
- varprefix));
- strcat(buf, ") OR (");
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_rightop(expr),
- varprefix));
+ (Node *) (agg->target), varprefix));
strcat(buf, ")");
return pstrdup(buf);
- break;
-
- case AND_EXPR:
- strcat(buf, "(");
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_leftop(expr),
- varprefix));
- strcat(buf, ") AND (");
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_rightop(expr),
- varprefix));
- strcat(buf, ")");
- return pstrdup(buf);
- break;
-
- case NOT_EXPR:
- strcat(buf, "NOT (");
- strcat(buf, get_rule_expr(rtable, rt_index,
- (Node *)get_leftop(expr),
- varprefix));
- strcat(buf, ")");
- return pstrdup(buf);
- break;
+ }
+ break;
- case FUNC_EXPR:
- return get_func_expr(rtable, rt_index,
- (Expr *)node,
- varprefix);
- break;
+ case T_GroupClause:
+ {
+ GroupClause *grp = (GroupClause *) node;
- default:
- printf("\n%s\n", nodeToString(node));
- elog(ERROR, "Expr not yet supported");
- }
- }
- break;
+ return get_rule_expr(rtable, rt_index,
+ (Node *) (grp->entry), varprefix);
+ }
+ break;
- case T_Var:
- {
- Var *var = (Var *)node;
- RangeTblEntry *rte = (RangeTblEntry *)nth(var->varno - 1, rtable);
-
- if (!strcmp(rte->refname, "*NEW*")) {
- strcat(buf, "new.");
- } else {
- if (!strcmp(rte->refname, "*CURRENT*")) {
- strcat(buf, "current.");
- } else {
- if (varprefix && var->varno != rt_index) {
- strcat(buf, rte->refname);
- strcat(buf, ".");
+ case T_Expr:
+ {
+ Expr *expr = (Expr *) node;
+
+ /* ----------
+ * Expr nodes have to be handled a bit detailed
+ * ----------
+ */
+ switch (expr->opType)
+ {
+ case OP_EXPR:
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_leftop(expr),
+ varprefix));
+ strcat(buf, " ");
+ strcat(buf, get_opname(((Oper *) expr->oper)->opno));
+ strcat(buf, " ");
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_rightop(expr),
+ varprefix));
+ return pstrdup(buf);
+ break;
+
+ case OR_EXPR:
+ strcat(buf, "(");
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_leftop(expr),
+ varprefix));
+ strcat(buf, ") OR (");
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_rightop(expr),
+ varprefix));
+ strcat(buf, ")");
+ return pstrdup(buf);
+ break;
+
+ case AND_EXPR:
+ strcat(buf, "(");
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_leftop(expr),
+ varprefix));
+ strcat(buf, ") AND (");
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_rightop(expr),
+ varprefix));
+ strcat(buf, ")");
+ return pstrdup(buf);
+ break;
+
+ case NOT_EXPR:
+ strcat(buf, "NOT (");
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ (Node *) get_leftop(expr),
+ varprefix));
+ strcat(buf, ")");
+ return pstrdup(buf);
+ break;
+
+ case FUNC_EXPR:
+ return get_func_expr(rtable, rt_index,
+ (Expr *) node,
+ varprefix);
+ break;
+
+ default:
+ printf("\n%s\n", nodeToString(node));
+ elog(ERROR, "Expr not yet supported");
}
- }
}
- strcat(buf, get_attribute_name(rte->relid, var->varattno));
+ break;
- return pstrdup(buf);
- }
- break;
+ case T_Var:
+ {
+ Var *var = (Var *) node;
+ RangeTblEntry *rte = (RangeTblEntry *) nth(var->varno - 1, rtable);
+
+ if (!strcmp(rte->refname, "*NEW*"))
+ strcat(buf, "new.");
+ else
+ {
+ if (!strcmp(rte->refname, "*CURRENT*"))
+ strcat(buf, "current.");
+ else
+ {
+ if (varprefix && var->varno != rt_index)
+ {
+ strcat(buf, rte->refname);
+ strcat(buf, ".");
+ }
+ }
+ }
+ strcat(buf, get_attribute_name(rte->relid, var->varattno));
- case T_List:
- {
- printf("\n%s\n", nodeToString(node));
- elog(ERROR, "List not yet supported");
- }
- break;
+ return pstrdup(buf);
+ }
+ break;
- case T_SubLink:
- {
- SubLink *sublink = (SubLink *)node;
- Query *query = (Query *)(sublink->subselect);
- List *l;
- char *sep;
-
- if (sublink->lefthand != NULL) {
- strcat(buf, "(");
- sep = "";
- foreach (l, sublink->lefthand) {
- strcat(buf, sep); sep = ", ";
- strcat(buf, get_rule_expr(rtable, rt_index,
- lfirst(l), varprefix));
- }
- strcat(buf, ") IN ");
+ case T_List:
+ {
+ printf("\n%s\n", nodeToString(node));
+ elog(ERROR, "List not yet supported");
}
+ break;
- strcat(buf, "(");
- strcat(buf, get_query_def(query));
- strcat(buf, ")");
+ case T_SubLink:
+ {
+ SubLink *sublink = (SubLink *) node;
+ Query *query = (Query *) (sublink->subselect);
+ List *l;
+ char *sep;
+
+ if (sublink->lefthand != NULL)
+ {
+ strcat(buf, "(");
+ sep = "";
+ foreach(l, sublink->lefthand)
+ {
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, get_rule_expr(rtable, rt_index,
+ lfirst(l), varprefix));
+ }
+ strcat(buf, ") IN ");
+ }
- return pstrdup(buf);
- }
- break;
+ strcat(buf, "(");
+ strcat(buf, get_query_def(query));
+ strcat(buf, ")");
- case T_Const:
- {
- return get_const_expr((Const *)node);
- }
- break;
+ return pstrdup(buf);
+ }
+ break;
- default:
- printf("\n%s\n", nodeToString(node));
- elog(ERROR, "get_ruledef of %s: unknown node type %d get_rule_expr()",
- rulename, nodeTag(node));
- break;
- }
+ case T_Const:
+ return get_const_expr((Const *) node);
+ break;
- return FALSE;
+ default:
+ printf("\n%s\n", nodeToString(node));
+ elog(ERROR, "get_ruledef of %s: unknown node type %d get_rule_expr()",
+ rulename, nodeTag(node));
+ break;
+ }
+
+ return FALSE;
}
@@ -1059,61 +1118,66 @@ get_rule_expr(List *rtable, int rt_index, Node *node, bool varprefix)
static char *
get_func_expr(List *rtable, int rt_index, Expr *expr, bool varprefix)
{
- char buf[8192];
- HeapTuple proctup;
- Form_pg_proc procStruct;
- List *l;
- char *sep;
- Func *func = (Func *)(expr->oper);
- char *proname;
-
- /* ----------
- * Get the functions pg_proc tuple
- * ----------
- */
- proctup = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(func->funcid), 0, 0, 0);
- if (!HeapTupleIsValid(proctup))
- elog(ERROR, "cache lookup for proc %d failed", func->funcid);
-
- procStruct = (Form_pg_proc) GETSTRUCT(proctup);
- proname = nameout(&(procStruct->proname));
-
- if (procStruct->pronargs == 1 && procStruct->proargtypes[0] == InvalidOid) {
- if (!strcmp(proname, "nullvalue")) {
- strcpy(buf, "(");
- strcat(buf, get_rule_expr(rtable, rt_index, lfirst(expr->args),
- varprefix));
- strcat(buf, ") ISNULL");
- return pstrdup(buf);
+ char buf[8192];
+ HeapTuple proctup;
+ Form_pg_proc procStruct;
+ List *l;
+ char *sep;
+ Func *func = (Func *) (expr->oper);
+ char *proname;
+
+ /* ----------
+ * Get the functions pg_proc tuple
+ * ----------
+ */
+ proctup = SearchSysCacheTuple(PROOID,
+ ObjectIdGetDatum(func->funcid), 0, 0, 0);
+ if (!HeapTupleIsValid(proctup))
+ elog(ERROR, "cache lookup for proc %d failed", func->funcid);
+
+ procStruct = (Form_pg_proc) GETSTRUCT(proctup);
+ proname = nameout(&(procStruct->proname));
+
+ if (procStruct->pronargs == 1 && procStruct->proargtypes[0] == InvalidOid)
+ {
+ if (!strcmp(proname, "nullvalue"))
+ {
+ strcpy(buf, "(");
+ strcat(buf, get_rule_expr(rtable, rt_index, lfirst(expr->args),
+ varprefix));
+ strcat(buf, ") ISNULL");
+ return pstrdup(buf);
+ }
+ if (!strcmp(proname, "nonnullvalue"))
+ {
+ strcpy(buf, "(");
+ strcat(buf, get_rule_expr(rtable, rt_index, lfirst(expr->args),
+ varprefix));
+ strcat(buf, ") NOTNULL");
+ return pstrdup(buf);
+ }
}
- if (!strcmp(proname, "nonnullvalue")) {
- strcpy(buf, "(");
- strcat(buf, get_rule_expr(rtable, rt_index, lfirst(expr->args),
- varprefix));
- strcat(buf, ") NOTNULL");
- return pstrdup(buf);
+
+ /* ----------
+ * Build a string of proname(args)
+ * ----------
+ */
+ strcpy(buf, proname);
+ strcat(buf, "(");
+ sep = "";
+ foreach(l, expr->args)
+ {
+ strcat(buf, sep);
+ sep = ", ";
+ strcat(buf, get_rule_expr(rtable, rt_index, lfirst(l), varprefix));
}
- }
-
- /* ----------
- * Build a string of proname(args)
- * ----------
- */
- strcpy(buf, proname);
- strcat(buf, "(");
- sep = "";
- foreach (l, expr->args) {
- strcat(buf, sep); sep = ", ";
- strcat(buf, get_rule_expr(rtable, rt_index, lfirst(l), varprefix));
- }
- strcat(buf, ")");
-
- /* ----------
- * Copy the function call string into allocated space and return it
- * ----------
- */
- return pstrdup(buf);
+ strcat(buf, ")");
+
+ /* ----------
+ * Copy the function call string into allocated space and return it
+ * ----------
+ */
+ return pstrdup(buf);
}
@@ -1132,75 +1196,67 @@ get_func_expr(List *rtable, int rt_index, Expr *expr, bool varprefix)
static char *
get_tle_expr(List *rtable, int rt_index, TargetEntry *tle, bool varprefix)
{
- HeapTuple proctup;
- Form_pg_proc procStruct;
- Expr *expr;
- Func *func;
- Const *second_arg;
-
- /* ----------
- * Check if the result has an atttypmod and if the
- * expression in the targetlist entry is a function call
- * ----------
- */
- if (tle->resdom->restypmod < 0) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
- if (nodeTag(tle->expr) != T_Expr) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
- expr = (Expr *)(tle->expr);
- if (expr->opType != FUNC_EXPR) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
-
- func = (Func *)(expr->oper);
-
- /* ----------
- * Get the functions pg_proc tuple
- * ----------
- */
- proctup = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(func->funcid), 0, 0, 0);
- if (!HeapTupleIsValid(proctup))
- elog(ERROR, "cache lookup for proc %d failed", func->funcid);
-
- procStruct = (Form_pg_proc) GETSTRUCT(proctup);
-
- /* ----------
- * It must be a function with two arguments where the first
- * is of the same type as the return value and the second is
- * an int4.
- * ----------
- */
- if (procStruct->pronargs != 2) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
- if (procStruct->prorettype != procStruct->proargtypes[0]) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
- if (procStruct->proargtypes[1] != INT4OID) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
-
- /* ----------
- * Finally (to be totally safe) the second argument must be a
- * const and match the value in the results atttypmod.
- * ----------
- */
- second_arg = (Const *)nth(1, expr->args);
- if (nodeTag((Node *)second_arg) != T_Const) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
- if ((int4)(second_arg->constvalue) != tle->resdom->restypmod) {
- return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
- }
-
- /* ----------
- * Whow - got it. Now get rid of the padding function
- * ----------
- */
- return get_rule_expr(rtable, rt_index, lfirst(expr->args), varprefix);
+ HeapTuple proctup;
+ Form_pg_proc procStruct;
+ Expr *expr;
+ Func *func;
+ Const *second_arg;
+
+ /* ----------
+ * Check if the result has an atttypmod and if the
+ * expression in the targetlist entry is a function call
+ * ----------
+ */
+ if (tle->resdom->restypmod < 0)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+ if (nodeTag(tle->expr) != T_Expr)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+ expr = (Expr *) (tle->expr);
+ if (expr->opType != FUNC_EXPR)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+
+ func = (Func *) (expr->oper);
+
+ /* ----------
+ * Get the functions pg_proc tuple
+ * ----------
+ */
+ proctup = SearchSysCacheTuple(PROOID,
+ ObjectIdGetDatum(func->funcid), 0, 0, 0);
+ if (!HeapTupleIsValid(proctup))
+ elog(ERROR, "cache lookup for proc %d failed", func->funcid);
+
+ procStruct = (Form_pg_proc) GETSTRUCT(proctup);
+
+ /* ----------
+ * It must be a function with two arguments where the first
+ * is of the same type as the return value and the second is
+ * an int4.
+ * ----------
+ */
+ if (procStruct->pronargs != 2)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+ if (procStruct->prorettype != procStruct->proargtypes[0])
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+ if (procStruct->proargtypes[1] != INT4OID)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+
+ /* ----------
+ * Finally (to be totally safe) the second argument must be a
+ * const and match the value in the results atttypmod.
+ * ----------
+ */
+ second_arg = (Const *) nth(1, expr->args);
+ if (nodeTag((Node *) second_arg) != T_Const)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+ if ((int4) (second_arg->constvalue) != tle->resdom->restypmod)
+ return get_rule_expr(rtable, rt_index, tle->expr, varprefix);
+
+ /* ----------
+ * Whow - got it. Now get rid of the padding function
+ * ----------
+ */
+ return get_rule_expr(rtable, rt_index, lfirst(expr->args), varprefix);
}
@@ -1212,29 +1268,29 @@ get_tle_expr(List *rtable, int rt_index, TargetEntry *tle, bool varprefix)
char *
get_const_expr(Const *constval)
{
- HeapTuple typetup;
- Form_pg_type typeStruct;
- FmgrInfo finfo_output;
- char *extval;
- bool isnull = FALSE;
- char buf[8192];
+ HeapTuple typetup;
+ Form_pg_type typeStruct;
+ FmgrInfo finfo_output;
+ char *extval;
+ bool isnull = FALSE;
+ char buf[8192];
- if (constval->constisnull)
- return "NULL";
+ if (constval->constisnull)
+ return "NULL";
- typetup = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(constval->consttype), 0, 0, 0);
- if (!HeapTupleIsValid(typetup))
- elog(ERROR, "cache lookup of type %d failed", constval->consttype);
+ typetup = SearchSysCacheTuple(TYPOID,
+ ObjectIdGetDatum(constval->consttype), 0, 0, 0);
+ if (!HeapTupleIsValid(typetup))
+ elog(ERROR, "cache lookup of type %d failed", constval->consttype);
- typeStruct = (Form_pg_type) GETSTRUCT(typetup);
+ typeStruct = (Form_pg_type) GETSTRUCT(typetup);
- fmgr_info(typeStruct->typoutput, &finfo_output);
- extval = (char *)(*fmgr_faddr(&finfo_output))(constval->constvalue,
- &isnull, -1);
+ fmgr_info(typeStruct->typoutput, &finfo_output);
+ extval = (char *) (*fmgr_faddr(&finfo_output)) (constval->constvalue,
+ &isnull, -1);
- sprintf(buf, "'%s'::%s", extval, nameout(&(typeStruct->typname)));
- return pstrdup(buf);
+ sprintf(buf, "'%s'::%s", extval, nameout(&(typeStruct->typname)));
+ return pstrdup(buf);
}
@@ -1245,16 +1301,16 @@ get_const_expr(Const *constval)
static char *
get_relation_name(Oid relid)
{
- HeapTuple classtup;
- Form_pg_class classStruct;
+ HeapTuple classtup;
+ Form_pg_class classStruct;
- classtup = SearchSysCacheTuple(RELOID,
- ObjectIdGetDatum(relid), 0, 0, 0);
- if (!HeapTupleIsValid(classtup))
- elog(ERROR, "cache lookup of relation %d failed", relid);
+ classtup = SearchSysCacheTuple(RELOID,
+ ObjectIdGetDatum(relid), 0, 0, 0);
+ if (!HeapTupleIsValid(classtup))
+ elog(ERROR, "cache lookup of relation %d failed", relid);
- classStruct = (Form_pg_class) GETSTRUCT(classtup);
- return nameout(&(classStruct->relname));
+ classStruct = (Form_pg_class) GETSTRUCT(classtup);
+ return nameout(&(classStruct->relname));
}
@@ -1266,17 +1322,17 @@ get_relation_name(Oid relid)
static char *
get_attribute_name(Oid relid, int2 attnum)
{
- HeapTuple atttup;
- Form_pg_attribute attStruct;
+ HeapTuple atttup;
+ Form_pg_attribute attStruct;
- atttup = SearchSysCacheTuple(ATTNUM,
- ObjectIdGetDatum(relid), (Datum)attnum, 0, 0);
- if (!HeapTupleIsValid(atttup))
- elog(ERROR, "cache lookup of attribute %d in relation %d failed",
- attnum, relid);
+ atttup = SearchSysCacheTuple(ATTNUM,
+ ObjectIdGetDatum(relid), (Datum) attnum, 0, 0);
+ if (!HeapTupleIsValid(atttup))
+ elog(ERROR, "cache lookup of attribute %d in relation %d failed",
+ attnum, relid);
- attStruct = (Form_pg_attribute) GETSTRUCT(atttup);
- return nameout(&(attStruct->attname));
+ attStruct = (Form_pg_attribute) GETSTRUCT(atttup);
+ return nameout(&(attStruct->attname));
}
@@ -1289,88 +1345,92 @@ get_attribute_name(Oid relid, int2 attnum)
static bool
check_if_rte_used(int rt_index, Node *node, int sup)
{
- if (node == NULL)
- return FALSE;
+ if (node == NULL)
+ return FALSE;
- switch(nodeTag(node)) {
- case T_TargetEntry:
- {
- TargetEntry *tle = (TargetEntry *)node;
+ switch (nodeTag(node))
+ {
+ case T_TargetEntry:
+ {
+ TargetEntry *tle = (TargetEntry *) node;
- return check_if_rte_used(rt_index,
- (Node *)(tle->expr), sup);
- }
- break;
+ return check_if_rte_used(rt_index,
+ (Node *) (tle->expr), sup);
+ }
+ break;
- case T_Aggreg:
- {
- Aggreg *agg = (Aggreg *)node;
- return check_if_rte_used(rt_index,
- (Node *)(agg->target), sup);
- }
- break;
+ case T_Aggreg:
+ {
+ Aggreg *agg = (Aggreg *) node;
- case T_GroupClause:
- {
- GroupClause *grp = (GroupClause *)node;
- return check_if_rte_used(rt_index,
- (Node *)(grp->entry), sup);
- }
- break;
+ return check_if_rte_used(rt_index,
+ (Node *) (agg->target), sup);
+ }
+ break;
- case T_Expr:
- {
- Expr *expr = (Expr *)node;
- return check_if_rte_used(rt_index,
- (Node *)(expr->args), sup);
- }
- break;
+ case T_GroupClause:
+ {
+ GroupClause *grp = (GroupClause *) node;
- case T_Var:
- {
- Var *var = (Var *)node;
- return var->varno == rt_index && var->varlevelsup == sup;
- }
- break;
+ return check_if_rte_used(rt_index,
+ (Node *) (grp->entry), sup);
+ }
+ break;
- case T_List:
- {
- List *l;
+ case T_Expr:
+ {
+ Expr *expr = (Expr *) node;
- foreach (l, (List *)node) {
- if (check_if_rte_used(rt_index, lfirst(l), sup))
- return TRUE;
+ return check_if_rte_used(rt_index,
+ (Node *) (expr->args), sup);
}
- return FALSE;
- }
- break;
+ break;
- case T_SubLink:
- {
- SubLink *sublink = (SubLink *)node;
- Query *query = (Query *)sublink->subselect;
+ case T_Var:
+ {
+ Var *var = (Var *) node;
- if (check_if_rte_used(rt_index, (Node *)(query->qual), sup + 1))
- return TRUE;
+ return var->varno == rt_index && var->varlevelsup == sup;
+ }
+ break;
- if (check_if_rte_used(rt_index, (Node *)(sublink->lefthand), sup))
- return TRUE;
+ case T_List:
+ {
+ List *l;
- return FALSE;
- }
- break;
+ foreach(l, (List *) node)
+ {
+ if (check_if_rte_used(rt_index, lfirst(l), sup))
+ return TRUE;
+ }
+ return FALSE;
+ }
+ break;
- case T_Const:
- return FALSE;
- break;
+ case T_SubLink:
+ {
+ SubLink *sublink = (SubLink *) node;
+ Query *query = (Query *) sublink->subselect;
- default:
- elog(ERROR, "get_ruledef of %s: unknown node type %d in check_if_rte_used()",
- rulename, nodeTag(node));
- break;
- }
+ if (check_if_rte_used(rt_index, (Node *) (query->qual), sup + 1))
+ return TRUE;
- return FALSE;
-}
+ if (check_if_rte_used(rt_index, (Node *) (sublink->lefthand), sup))
+ return TRUE;
+
+ return FALSE;
+ }
+ break;
+ case T_Const:
+ return FALSE;
+ break;
+
+ default:
+ elog(ERROR, "get_ruledef of %s: unknown node type %d in check_if_rte_used()",
+ rulename, nodeTag(node));
+ break;
+ }
+ return FALSE;
+}
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 6389dc4b0d..c8dfc20442 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -12,7 +12,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.22 1998/09/01 03:26:18 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.23 1998/09/01 04:32:50 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,8 +41,7 @@
#define FunctionalSelectivity(nIndKeys,attNum) (attNum==InvalidAttrNumber)
static float32data getattdisbursion(Oid relid, AttrNumber attnum);
-static void
-gethilokey(Oid relid, AttrNumber attnum, Oid opid,
+static void gethilokey(Oid relid, AttrNumber attnum, Oid opid,
char **high, char **low);
diff --git a/src/backend/utils/adt/sets.c b/src/backend/utils/adt/sets.c
index 588876dadd..54aadc407c 100644
--- a/src/backend/utils/adt/sets.c
+++ b/src/backend/utils/adt/sets.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.17 1998/09/01 03:26:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.18 1998/09/01 04:32:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -112,8 +112,8 @@ SetDefine(char *querystr, char *typename)
RelationSetLockForWrite(procrel);
tup = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(setoid),
- 0, 0, 0);
+ ObjectIdGetDatum(setoid),
+ 0, 0, 0);
if (HeapTupleIsValid(tup))
{
newtup = heap_modifytuple(tup,
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index 9f76c7c61a..6f8f82d840 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.38 1998/09/01 03:26:22 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.39 1998/09/01 04:32:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -137,7 +137,8 @@ bpchar(char *s, int32 len)
{
char *result,
*r;
- int rlen, slen;
+ int rlen,
+ slen;
int i;
if (s == NULL)
@@ -152,8 +153,8 @@ bpchar(char *s, int32 len)
elog(ERROR, "bpchar: length of char() must be less than 4096");
#ifdef STRINGDEBUG
-printf("bpchar- convert string length %d (%d) ->%d (%d)\n",
- VARSIZE(s)-VARHDRSZ, VARSIZE(s), rlen, len);
+ printf("bpchar- convert string length %d (%d) ->%d (%d)\n",
+ VARSIZE(s) - VARHDRSZ, VARSIZE(s), rlen, len);
#endif
result = (char *) palloc(len);
@@ -163,7 +164,7 @@ printf("bpchar- convert string length %d (%d) ->%d (%d)\n",
s = VARDATA(s);
#ifdef STRINGDEBUG
-printf("bpchar- string is '");
+ printf("bpchar- string is '");
#endif
for (i = 0; (i < rlen) && (i < slen); i++)
@@ -172,14 +173,14 @@ printf("bpchar- string is '");
break;
#ifdef STRINGDEBUG
-printf("%c", *s);
+ printf("%c", *s);
#endif
*r++ = *s++;
}
#ifdef STRINGDEBUG
-printf("'\n");
+ printf("'\n");
#endif
/* blank pad the string if necessary */
@@ -187,7 +188,7 @@ printf("'\n");
*r++ = ' ';
return result;
-} /* bpchar() */
+} /* bpchar() */
/* bpchar_char()
@@ -197,7 +198,7 @@ int32
bpchar_char(char *s)
{
return (int32) *VARDATA(s);
-} /* bpchar_char() */
+} /* bpchar_char() */
/* char_bpchar()
* Convert char to bpchar(1).
@@ -205,21 +206,21 @@ bpchar_char(char *s)
char *
char_bpchar(int32 c)
{
- char *result;
+ char *result;
- result = palloc(VARHDRSZ+1);
+ result = palloc(VARHDRSZ + 1);
- VARSIZE(result) = VARHDRSZ+1;
+ VARSIZE(result) = VARHDRSZ + 1;
*(VARDATA(result)) = (char) c;
return result;
-} /* char_bpchar() */
+} /* char_bpchar() */
/* bpchar_name()
* Converts a bpchar() type to a NameData type.
*/
-NameData *
+NameData *
bpchar_name(char *s)
{
NameData *result;
@@ -229,29 +230,33 @@ bpchar_name(char *s)
return NULL;
len = VARSIZE(s) - VARHDRSZ;
- if (len > NAMEDATALEN) len = NAMEDATALEN;
+ if (len > NAMEDATALEN)
+ len = NAMEDATALEN;
- while (len > 0) {
- if (*(VARDATA(s)+len-1) != ' ') break;
+ while (len > 0)
+ {
+ if (*(VARDATA(s) + len - 1) != ' ')
+ break;
len--;
}
#ifdef STRINGDEBUG
-printf("bpchar- convert string length %d (%d) ->%d\n",
- VARSIZE(s)-VARHDRSZ, VARSIZE(s), len);
+ printf("bpchar- convert string length %d (%d) ->%d\n",
+ VARSIZE(s) - VARHDRSZ, VARSIZE(s), len);
#endif
result = (NameData *) palloc(NAMEDATALEN);
StrNCpy(result->data, VARDATA(s), NAMEDATALEN);
/* now null pad to full length... */
- while (len < NAMEDATALEN) {
+ while (len < NAMEDATALEN)
+ {
*(result->data + len) = '\0';
len++;
}
return result;
-} /* bpchar_name() */
+} /* bpchar_name() */
/* name_bpchar()
* Converts a NameData type to a bpchar type.
@@ -268,8 +273,8 @@ name_bpchar(NameData *s)
len = strlen(s->data);
#ifdef STRINGDEBUG
-printf("bpchar- convert string length %d (%d) ->%d\n",
- VARSIZE(s)-VARHDRSZ, VARSIZE(s), len);
+ printf("bpchar- convert string length %d (%d) ->%d\n",
+ VARSIZE(s) - VARHDRSZ, VARSIZE(s), len);
#endif
result = (char *) palloc(VARHDRSZ + len);
@@ -277,7 +282,7 @@ printf("bpchar- convert string length %d (%d) ->%d\n",
VARSIZE(result) = len + VARHDRSZ;
return result;
-} /* name_bpchar() */
+} /* name_bpchar() */
/*****************************************************************************
@@ -372,7 +377,7 @@ varchar(char *s, int32 slen)
strncpy(VARDATA(result), VARDATA(s), len);
return result;
-} /* varchar() */
+} /* varchar() */
/*****************************************************************************
@@ -400,7 +405,10 @@ bpcharlen(char *arg)
{
#ifdef MULTIBYTE
unsigned char *s;
- int len, l, wl;
+ int len,
+ l,
+ wl;
+
#endif
if (!PointerIsValid(arg))
elog(ERROR, "Bad (null) char() external representation", NULL);
@@ -408,13 +416,14 @@ bpcharlen(char *arg)
l = bcTruelen(arg);
len = 0;
s = VARDATA(arg);
- while (l > 0) {
- wl = pg_mblen(s);
- l -= wl;
- s += wl;
- len++;
+ while (l > 0)
+ {
+ wl = pg_mblen(s);
+ l -= wl;
+ s += wl;
+ len++;
}
- return(len);
+ return (len);
#else
return bcTruelen(arg);
#endif
@@ -565,7 +574,10 @@ varcharlen(char *arg)
{
#ifdef MULTIBYTE
unsigned char *s;
- int len, l, wl;
+ int len,
+ l,
+ wl;
+
#endif
if (!PointerIsValid(arg))
elog(ERROR, "Bad (null) varchar() external representation", NULL);
@@ -574,13 +586,14 @@ varcharlen(char *arg)
len = 0;
s = VARDATA(arg);
l = VARSIZE(arg) - VARHDRSZ;
- while (l > 0) {
- wl = pg_mblen(s);
- l -= wl;
- s += wl;
- len++;
+ while (l > 0)
+ {
+ wl = pg_mblen(s);
+ l -= wl;
+ s += wl;
+ len++;
}
- return(len);
+ return (len);
#else
return VARSIZE(arg) - VARHDRSZ;
#endif
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index 22e0e98124..4410aa1c9a 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.41 1998/09/01 03:26:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.42 1998/09/01 04:32:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -208,9 +208,12 @@ textlen(text *t)
{
#ifdef MULTIBYTE
unsigned char *s;
- int len, l, wl;
+ int len,
+ l,
+ wl;
+
#endif
-
+
if (!PointerIsValid(t))
elog(ERROR, "Null input to textlen");
@@ -218,17 +221,18 @@ textlen(text *t)
len = 0;
s = VARDATA(t);
l = VARSIZE(t) - VARHDRSZ;
- while (l > 0) {
- wl = pg_mblen(s);
- l -= wl;
- s += wl;
- len++;
+ while (l > 0)
+ {
+ wl = pg_mblen(s);
+ l -= wl;
+ s += wl;
+ len++;
}
- return(len);
+ return (len);
#else
return VARSIZE(t) - VARHDRSZ;
#endif
-
+
} /* textlen() */
/*
@@ -322,9 +326,11 @@ text_substr(text *string, int32 m, int32 n)
{
text *ret;
int len;
+
#ifdef MULTIBYTE
- int i;
- char *p;
+ int i;
+ char *p;
+
#endif
if ((string == (text *) NULL) || (m <= 0))
@@ -332,7 +338,7 @@ text_substr(text *string, int32 m, int32 n)
len = VARSIZE(string) - VARHDRSZ;
#ifdef MULTIBYTE
- len = pg_mbstrlen_with_len(VARDATA(string),len);
+ len = pg_mbstrlen_with_len(VARDATA(string), len);
#endif
/* m will now become a zero-based starting position */
@@ -350,13 +356,11 @@ text_substr(text *string, int32 m, int32 n)
#ifdef MULTIBYTE
p = VARDATA(string);
- for (i=0;i<m;i++) {
- p += pg_mblen(p);
- }
+ for (i = 0; i < m; i++)
+ p += pg_mblen(p);
m = p - VARDATA(string);
- for (i=0;i<n;i++) {
- p += pg_mblen(p);
- }
+ for (i = 0; i < n; i++)
+ p += pg_mblen(p);
n = p - (VARDATA(string) + m);
#endif
ret = (text *) palloc(VARHDRSZ + n);
@@ -385,10 +389,13 @@ textpos(text *t1, text *t2)
p;
int len1,
len2;
- pg_wchar *p1,
+ pg_wchar *p1,
*p2;
+
#ifdef MULTIBYTE
- pg_wchar *ps1, *ps2;
+ pg_wchar *ps1,
+ *ps2;
+
#endif
if (!PointerIsValid(t1) || !PointerIsValid(t2))
@@ -400,11 +407,11 @@ textpos(text *t1, text *t2)
len1 = (VARSIZE(t1) - VARHDRSZ);
len2 = (VARSIZE(t2) - VARHDRSZ);
#ifdef MULTIBYTE
- ps1 = p1 = (pg_wchar *) palloc((len1 + 1)*sizeof(pg_wchar));
- (void)pg_mb2wchar_with_len((unsigned char *)VARDATA(t1),p1,len1);
+ ps1 = p1 = (pg_wchar *) palloc((len1 + 1) * sizeof(pg_wchar));
+ (void) pg_mb2wchar_with_len((unsigned char *) VARDATA(t1), p1, len1);
len1 = pg_wchar_strlen(p1);
- ps2 = p2 = (pg_wchar *) palloc((len2 + 1)*sizeof(pg_wchar));
- (void)pg_mb2wchar_with_len((unsigned char *)VARDATA(t2),p2,len2);
+ ps2 = p2 = (pg_wchar *) palloc((len2 + 1) * sizeof(pg_wchar));
+ (void) pg_mb2wchar_with_len((unsigned char *) VARDATA(t2), p2, len2);
len2 = pg_wchar_strlen(p2);
#else
p1 = VARDATA(t1);
@@ -477,8 +484,9 @@ textne(text *arg1, text *arg2)
int
varstr_cmp(char *arg1, int len1, char *arg2, int len2)
{
- int result;
- char *a1p, *a2p;
+ int result;
+ char *a1p,
+ *a2p;
#ifdef USE_LOCALE
a1p = (unsigned char *) palloc(len1 + 1);
@@ -518,8 +526,10 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2)
int
text_cmp(text *arg1, text *arg2)
{
- char *a1p, *a2p;
- int len1, len2;
+ char *a1p,
+ *a2p;
+ int len1,
+ len2;
if (arg1 == NULL || arg2 == NULL)
return (bool) FALSE;
@@ -539,7 +549,7 @@ text_cmp(text *arg1, text *arg2)
bool
text_lt(text *arg1, text *arg2)
{
- return (bool)(text_cmp(arg1, arg2) < 0);
+ return (bool) (text_cmp(arg1, arg2) < 0);
} /* text_lt() */
/* text_le()
@@ -548,7 +558,7 @@ text_lt(text *arg1, text *arg2)
bool
text_le(text *arg1, text *arg2)
{
- return (bool)(text_cmp(arg1, arg2) <= 0);
+ return (bool) (text_cmp(arg1, arg2) <= 0);
} /* text_le() */
bool
@@ -725,7 +735,7 @@ byteaSetBit(text *v, int32 n, int32 newBit)
/* text_name()
* Converts a text() type to a NameData type.
*/
-NameData *
+NameData *
text_name(text *s)
{
NameData *result;
@@ -735,24 +745,26 @@ text_name(text *s)
return NULL;
len = VARSIZE(s) - VARHDRSZ;
- if (len > NAMEDATALEN) len = NAMEDATALEN;
+ if (len > NAMEDATALEN)
+ len = NAMEDATALEN;
#ifdef STRINGDEBUG
-printf("text- convert string length %d (%d) ->%d\n",
- VARSIZE(s)-VARHDRSZ, VARSIZE(s), len);
+ printf("text- convert string length %d (%d) ->%d\n",
+ VARSIZE(s) - VARHDRSZ, VARSIZE(s), len);
#endif
result = palloc(NAMEDATALEN);
StrNCpy(result->data, VARDATA(s), NAMEDATALEN);
/* now null pad to full length... */
- while (len < NAMEDATALEN) {
+ while (len < NAMEDATALEN)
+ {
*(result->data + len) = '\0';
len++;
}
return result;
-} /* text_name() */
+} /* text_name() */
/* name_text()
* Converts a NameData type to a text type.
@@ -769,8 +781,8 @@ name_text(NameData *s)
len = strlen(s->data);
#ifdef STRINGDEBUG
-printf("text- convert string length %d (%d) ->%d\n",
- VARSIZE(s)-VARHDRSZ, VARSIZE(s), len);
+ printf("text- convert string length %d (%d) ->%d\n",
+ VARSIZE(s) - VARHDRSZ, VARSIZE(s), len);
#endif
result = palloc(VARHDRSZ + len);
@@ -778,4 +790,4 @@ printf("text- convert string length %d (%d) ->%d\n",
VARSIZE(result) = len + VARHDRSZ;
return result;
-} /* name_text() */
+} /* name_text() */
diff --git a/src/backend/utils/adt/version.c b/src/backend/utils/adt/version.c
index e0af6b2d6d..f15e788bc8 100644
--- a/src/backend/utils/adt/version.c
+++ b/src/backend/utils/adt/version.c
@@ -1,11 +1,11 @@
/*-------------------------------------------------------------------------
*
* version.c--
- * Returns the version string
+ * Returns the version string
*
* IDENTIFICATION
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.1 1998/04/29 12:38:05 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/version.c,v 1.2 1998/09/01 04:32:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,12 +14,13 @@
#include "version.h"
-text* version(void);
+text *version(void);
-text* version(void)
+text *
+version(void)
{
- int n = strlen(PG_VERSION_STR) + VARHDRSZ;
- text *ret = (text *) palloc(n);
+ int n = strlen(PG_VERSION_STR) + VARHDRSZ;
+ text *ret = (text *) palloc(n);
VARSIZE(ret) = n;
strcpy(VARDATA(ret), PG_VERSION_STR);
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index ebc263d8a2..d54d2584ae 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.33 1998/09/01 03:26:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.34 1998/09/01 04:32:57 momjian Exp $
*
* Notes:
* XXX This needs to use exception.h to handle recovery when
@@ -102,7 +102,7 @@ do { \
elog(DEBUG, "CatalogCacheInitializeCache: called w/relname %s", \
cache->cc_relname) \
} while(0)
-
+
#define CatalogCacheInitializeCache_DEBUG2 \
do { \
if (cache->cc_key[i] > 0) { \
@@ -665,7 +665,7 @@ do { \
cp->cc_skey[i].sk_argument); \
} \
} while(0)
-
+
#else
#define InitSysCache_DEBUG1
#endif
@@ -894,7 +894,7 @@ SearchSysCache(struct catcache * cache,
CACHE3_elog(DEBUG, "SearchSysCache(%s): found in bucket %d",
RelationGetRelationName(relation), hash);
heap_close(relation);
-#endif /* CACHEDEBUG */
+#endif /* CACHEDEBUG */
return ct->ct_tup;
}
diff --git a/src/backend/utils/cache/fcache.c b/src/backend/utils/cache/fcache.c
index 8933c66441..8ebef95a2d 100644
--- a/src/backend/utils/cache/fcache.c
+++ b/src/backend/utils/cache/fcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.17 1998/09/01 03:26:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.18 1998/09/01 04:32:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,8 +36,7 @@
#endif
static Oid GetDynamicFuncArgType(Var *arg, ExprContext *econtext);
-static FunctionCachePtr
-init_fcache(Oid foid,
+static FunctionCachePtr init_fcache(Oid foid,
bool use_syscache,
List *argList,
ExprContext *econtext);
@@ -126,7 +125,7 @@ init_fcache(Oid foid,
* ----------------
*/
typeTuple = SearchSysCacheTuple(TYPOID,
- ObjectIdGetDatum(procedureStruct->prorettype),
+ ObjectIdGetDatum(procedureStruct->prorettype),
0, 0, 0);
if (!HeapTupleIsValid(typeTuple))
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 631fc2a18c..d21540776d 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.15 1998/09/01 03:26:29 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.16 1998/09/01 04:33:00 momjian Exp $
*
* Note - this code is real crufty...
*
@@ -33,8 +33,7 @@
static InvalidationEntry InvalidationEntryAllocate(uint16 size);
static void LocalInvalidInvalidate(LocalInvalid invalid, void (*function) ());
-static LocalInvalid
-LocalInvalidRegister(LocalInvalid invalid,
+static LocalInvalid LocalInvalidRegister(LocalInvalid invalid,
InvalidationEntry entry);
static void getmyrelids(void);
@@ -166,7 +165,7 @@ elog(DEBUG, "CacheIdRegisterLocalInvalid(%d, %d, [%d, %d])", \
ItemPointerGetOffsetNumber(pointer))
#else
#define CacheIdRegisterLocalInvalid_DEBUG1
-#endif /* INVALIDDEBUG */
+#endif /* INVALIDDEBUG */
static void
CacheIdRegisterLocalInvalid(Index cacheId,
@@ -218,7 +217,7 @@ RelationIdRegisterLocalInvalid(Oid relationId, Oid objectId)
#ifdef INVALIDDEBUG
elog(DEBUG, "RelationRegisterLocalInvalid(%d, %d)", relationId,
objectId);
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
/* ----------------
* create a message describing the relation descriptor
@@ -267,7 +266,7 @@ getmyrelids()
MyAMRelationId = tuple->t_oid;
tuple = SearchSysCacheTuple(RELNAME,
- PointerGetDatum(AccessMethodOperatorRelationName),
+ PointerGetDatum(AccessMethodOperatorRelationName),
0, 0, 0);
Assert(HeapTupleIsValid(tuple));
MyAMOPRelationId = tuple->t_oid;
@@ -287,7 +286,7 @@ elog(DEBUG, "CacheIdInvalidate(%d, %d, 0x%x[%d])", cacheId, hashIndex,\
pointer, ItemPointerIsValid(pointer))
#else
#define CacheIdInvalidate_DEBUG1
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
static void
CacheIdInvalidate(Index cacheId,
@@ -380,7 +379,7 @@ elog(DEBUG,\
#else
#define InvalidationMessageRegisterSharedInvalid_DEBUG1
#define InvalidationMessageRegisterSharedInvalid_DEBUG2
-#endif /* INVALIDDEBUG */
+#endif /* INVALIDDEBUG */
static void
InvalidationMessageRegisterSharedInvalid(InvalidationMessage message)
@@ -430,7 +429,7 @@ elog(DEBUG, "InvalidationMessageCacheInvalidate(c, %d, %d, [%d, %d])",\
#else
#define InvalidationMessageCacheInvalidate_DEBUG1
#define InvalidationMessageCacheInvalidate_DEBUG2
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
static void
InvalidationMessageCacheInvalidate(InvalidationMessage message)
@@ -536,7 +535,7 @@ DiscardInvalid()
*/
#ifdef INVALIDDEBUG
elog(DEBUG, "DiscardInvalid called");
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
InvalidateSharedInvalid(CacheIdInvalidate, ResetSystemCaches);
}
@@ -557,7 +556,7 @@ RegisterInvalid(bool send)
*/
#ifdef INVALIDDEBUG
elog(DEBUG, "RegisterInvalid(%d) called", send);
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
/* ----------------
* Note: Invalid is a global variable
@@ -582,7 +581,7 @@ SetRefreshWhenInvalidate(bool on)
{
#ifdef INVALIDDEBUG
elog(DEBUG, "RefreshWhenInvalidate(%d) called", on);
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
RefreshWhenInvalidate = on;
}
@@ -603,7 +602,7 @@ elog(DEBUG, "RelationInvalidateHeapTuple(%s, [%d,%d])", \
ItemPointerGetOffsetNumber(&tuple->t_ctid))
#else
#define RelationInvalidateHeapTuple_DEBUG1
-#endif /* defined(INVALIDDEBUG) */
+#endif /* defined(INVALIDDEBUG) */
void
RelationInvalidateHeapTuple(Relation relation, HeapTuple tuple)
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 7189f16c6e..e804f5aa1c 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.21 1998/09/01 03:26:30 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.22 1998/09/01 04:33:01 momjian Exp $
*
* NOTES
* Eventually, the index information should go through here, too.
@@ -136,9 +136,9 @@ get_attisset(Oid relid, char *attname)
attno = get_attnum(relid, attname);
tuple = SearchSysCacheTuple(ATTNAME,
- ObjectIdGetDatum(relid),
- PointerGetDatum(attname),
- 0, 0);
+ ObjectIdGetDatum(relid),
+ PointerGetDatum(attname),
+ 0, 0);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "get_attisset: no attribute %s in relation %d",
attname, relid);
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 078f532c95..ba4acc9fa2 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.49 1998/09/01 03:26:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.50 1998/09/01 04:33:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -81,8 +81,7 @@
#include "utils/syscache.h"
-static void
-RelationFlushRelation(Relation *relationPtr,
+static void RelationFlushRelation(Relation *relationPtr,
bool onlyFlushReferenceCountZero);
static Relation RelationNameCacheGetRelation(char *relationName);
static void init_irels(void);
@@ -195,7 +194,7 @@ do { \
RELATION = NULL; \
} while(0)
-#define RelationIdCacheLookup(ID, RELATION) \
+#define RelationIdCacheLookup(ID, RELATION) \
do { \
RelIdCacheEnt *hentry; \
bool found; \
@@ -233,8 +232,7 @@ do { \
} while(0)
/* non-export function prototypes */
-static void
-formrdesc(char *relationName, u_int natts,
+static void formrdesc(char *relationName, u_int natts,
FormData_pg_attribute *att);
#if 0 /* See comments at line 1304 */
@@ -246,14 +244,11 @@ static HeapTuple ScanPgRelation(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_seq(RelationBuildDescInfo buildinfo);
static HeapTuple scan_pg_rel_ind(RelationBuildDescInfo buildinfo);
static Relation AllocateRelationDesc(u_int natts, Form_pg_class relp);
-static void
-RelationBuildTupleDesc(RelationBuildDescInfo buildinfo,
+static void RelationBuildTupleDesc(RelationBuildDescInfo buildinfo,
Relation relation, u_int natts);
-static void
-build_tupdesc_seq(RelationBuildDescInfo buildinfo,
+static void build_tupdesc_seq(RelationBuildDescInfo buildinfo,
Relation relation, u_int natts);
-static void
-build_tupdesc_ind(RelationBuildDescInfo buildinfo,
+static void build_tupdesc_ind(RelationBuildDescInfo buildinfo,
Relation relation, u_int natts);
static Relation RelationBuildDesc(RelationBuildDescInfo buildinfo);
static void IndexedAccessMethodInitialize(Relation relation);
@@ -596,11 +591,11 @@ build_tupdesc_ind(RelationBuildDescInfo buildinfo,
for (i = 1; i <= relation->rd_rel->relnatts; i++)
{
atttup = (HeapTuple) AttributeNumIndexScan(attrel,
- RelationGetRelid(relation), i);
+ RelationGetRelid(relation), i);
if (!HeapTupleIsValid(atttup))
elog(ERROR, "cannot find attribute %d of relation %s", i,
- relation->rd_rel->relname.data);
+ relation->rd_rel->relname.data);
attp = (Form_pg_attribute) GETSTRUCT(atttup);
relation->rd_att->attrs[i - 1] =
@@ -714,7 +709,7 @@ RelationBuildRuleLock(Relation relation)
* add attribute data to relation->rd_att
* ----------------
*/
- while (HeapTupleIsValid(pg_rewrite_tuple=heap_getnext(pg_rewrite_scan, 0)))
+ while (HeapTupleIsValid(pg_rewrite_tuple = heap_getnext(pg_rewrite_scan, 0)))
{
bool isnull;
Datum ruleaction;
@@ -1094,7 +1089,7 @@ formrdesc(char *relationName,
RelationCacheInsert(relation);
RelationInitLockInfo(relation);
-
+
/*
* Determining this requires a scan on pg_class, but to do the scan
* the rdesc for pg_class must already exist. Therefore we must do
@@ -1689,8 +1684,8 @@ AttrDefaultFetch(Relation relation)
for (found = 0;;)
{
- Buffer buffer;
-
+ Buffer buffer;
+
indexRes = index_getnext(sd, ForwardScanDirection);
if (!indexRes)
break;
@@ -1708,29 +1703,29 @@ AttrDefaultFetch(Relation relation)
continue;
if (attrdef[i].adsrc != NULL)
elog(ERROR, "AttrDefaultFetch: second record found for attr %s in rel %s",
- relation->rd_att->attrs[adform->adnum - 1]->attname.data,
- relation->rd_rel->relname.data);
+ relation->rd_att->attrs[adform->adnum - 1]->attname.data,
+ relation->rd_rel->relname.data);
val = (struct varlena *) fastgetattr(tuple,
Anum_pg_attrdef_adbin,
adrel->rd_att, &isnull);
if (isnull)
elog(ERROR, "AttrDefaultFetch: adbin IS NULL for attr %s in rel %s",
- relation->rd_att->attrs[adform->adnum - 1]->attname.data,
- relation->rd_rel->relname.data);
+ relation->rd_att->attrs[adform->adnum - 1]->attname.data,
+ relation->rd_rel->relname.data);
attrdef[i].adbin = textout(val);
val = (struct varlena *) fastgetattr(tuple,
Anum_pg_attrdef_adsrc,
adrel->rd_att, &isnull);
if (isnull)
elog(ERROR, "AttrDefaultFetch: adsrc IS NULL for attr %s in rel %s",
- relation->rd_att->attrs[adform->adnum - 1]->attname.data,
- relation->rd_rel->relname.data);
+ relation->rd_att->attrs[adform->adnum - 1]->attname.data,
+ relation->rd_rel->relname.data);
attrdef[i].adsrc = textout(val);
break;
}
ReleaseBuffer(buffer);
-
+
if (i >= ndef)
elog(ERROR, "AttrDefaultFetch: unexpected record found for attr %d in rel %s",
adform->adnum,
@@ -1777,8 +1772,8 @@ RelCheckFetch(Relation relation)
for (found = 0;;)
{
- Buffer buffer;
-
+ Buffer buffer;
+
indexRes = index_getnext(sd, ForwardScanDirection);
if (!indexRes)
break;
@@ -1790,7 +1785,7 @@ RelCheckFetch(Relation relation)
continue;
if (found == ncheck)
elog(ERROR, "RelCheckFetch: unexpected record found for rel %s",
- relation->rd_rel->relname.data);
+ relation->rd_rel->relname.data);
rcname = (Name) fastgetattr(tuple,
Anum_pg_relcheck_rcname,
@@ -1982,7 +1977,8 @@ init_irels(void)
#define SMD(i) strat[0].strategyMapData[i].entry[0]
/* have to reinit the function pointers in the strategy maps */
- for (i = 0; i < am->amstrategies * relform->relnatts; i++) {
+ for (i = 0; i < am->amstrategies * relform->relnatts; i++)
+ {
fmgr_info(SMD(i).sk_procedure,
&(SMD(i).sk_func));
SMD(i).sk_nargs = SMD(i).sk_func.fn_nargs;
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index cebbe28ac1..25b3e0a430 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.21 1998/09/01 03:26:33 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.22 1998/09/01 04:33:03 momjian Exp $
*
* NOTES
* These routines allow the parser/planner/executor to perform
@@ -205,7 +205,7 @@ static struct cachedesc cacheinfo[] = {
0,
0
},
- offsetof(FormData_pg_type, typalign) +sizeof(char),
+ offsetof(FormData_pg_type, typalign) + sizeof(char),
TypeNameIndex,
TypeNameIndexScan},
{TypeRelationName, /* TYPOID */
@@ -241,7 +241,7 @@ static struct cachedesc cacheinfo[] = {
sizeof(FormData_pg_opclass),
NULL,
NULL},
- {IndexRelationName, /* INDRELIDKEY */ /* never used */
+ {IndexRelationName, /* INDRELIDKEY *//* never used */
2,
{
Anum_pg_index_indrelid,
@@ -438,6 +438,7 @@ InitCatalogCache()
}
}
}
+
/*
* SearchSysCacheTupleCopy--
*
@@ -445,11 +446,11 @@ InitCatalogCache()
* that the user is required to pfree().
*/
HeapTuple
-SearchSysCacheTupleCopy(int cacheId,/* cache selection code */
- Datum key1,
- Datum key2,
- Datum key3,
- Datum key4)
+SearchSysCacheTupleCopy(int cacheId, /* cache selection code */
+ Datum key1,
+ Datum key2,
+ Datum key3,
+ Datum key4)
{
HeapTuple cachetup;
@@ -457,9 +458,9 @@ SearchSysCacheTupleCopy(int cacheId,/* cache selection code */
if (PointerIsValid(cachetup))
return heap_copytuple(cachetup);
else
- return cachetup; /* NULL */
+ return cachetup; /* NULL */
}
-
+
/*
* SearchSysCacheTuple--
@@ -588,7 +589,7 @@ SearchSysCacheGetAttribute(int cacheId,
elog(DEBUG,
"SearchSysCacheGetAttribute: Lookup in %s(%d) failed",
cacheName, cacheId);
-#endif /* defined(CACHEDEBUG) */
+#endif /* defined(CACHEDEBUG) */
return NULL;
}
@@ -623,6 +624,7 @@ SearchSysCacheGetAttribute(int cacheId,
if (isNull)
{
+
/*
* Used to be an elog(DEBUG, ...) here and a claim that it should
* be a FATAL error, I don't think either is warranted -mer 6/9/92
@@ -681,7 +683,7 @@ TypeDefaultRetrieve(Oid typId)
#ifdef CACHEDEBUG
elog(DEBUG, "TypeDefaultRetrieve: Lookup in %s(%d) failed",
cacheinfo[TYPOID].name, TYPOID);
-#endif /* defined(CACHEDEBUG) */
+#endif /* defined(CACHEDEBUG) */
return NULL;
}
@@ -700,7 +702,7 @@ TypeDefaultRetrieve(Oid typId)
#ifdef CACHEDEBUG
elog(DEBUG, "TypeDefaultRetrieve: No extractable typdefault in %s(%d)",
cacheinfo[TYPOID].name, TYPOID);
-#endif /* defined(CACHEDEBUG) */
+#endif /* defined(CACHEDEBUG) */
return NULL;
}
diff --git a/src/backend/utils/error/assert.c b/src/backend/utils/error/assert.c
index b923028b5f..5f3312d9ea 100644
--- a/src/backend/utils/error/assert.c
+++ b/src/backend/utils/error/assert.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.11 1998/09/01 03:26:35 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/assert.c,v 1.12 1998/09/01 04:33:05 momjian Exp $
*
* NOTE
* This should eventually work with elog(), dlog(), etc.
@@ -50,7 +50,7 @@ ExceptionalCondition(char *conditionName,
else
{
EPRINTF("TRAP: %s(\"%s:%s\", File: \"%s\", Line: %d)\n",
- exceptionP->message, conditionName,
+ exceptionP->message, conditionName,
(detail == NULL ? "" : detail),
fileName, lineNumber);
}
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index 79ae7e8137..09f4627daf 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.34 1998/09/01 03:26:37 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.35 1998/09/01 04:33:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,7 +17,7 @@
#include <fcntl.h>
#ifndef O_RDONLY
#include <sys/file.h>
-#endif /* O_RDONLY */
+#endif /* O_RDONLY */
#include <sys/types.h>
#include <stdarg.h>
#include <errno.h>
@@ -38,12 +38,12 @@
/*
* Global option to control the use of syslog(3) for logging:
*
- * 0 stdout/stderr only
- * 1 stdout/stderr + syslog
- * 2 syslog only
+ * 0 stdout/stderr only
+ * 1 stdout/stderr + syslog
+ * 2 syslog only
*/
#define UseSyslog pg_options[OPT_SYSLOG]
-#define PG_LOG_FACILITY LOG_LOCAL0
+#define PG_LOG_FACILITY LOG_LOCAL0
#else
#define UseSyslog 0
#endif
@@ -69,10 +69,12 @@ elog(int lev, const char *fmt,...)
#ifndef PG_STANDALONE
extern FILE *Pfout;
+
#endif
#ifdef USE_SYSLOG
int log_level;
+
#endif
int len;
@@ -135,25 +137,26 @@ elog(int lev, const char *fmt,...)
va_end(ap);
#ifdef USE_SYSLOG
- switch (lev) {
- case NOIND:
- log_level = LOG_DEBUG;
- break;
- case DEBUG:
- log_level = LOG_DEBUG;
- break;
- case NOTICE:
- log_level = LOG_NOTICE;
- break;
- case ERROR:
- log_level = LOG_WARNING;
- break;
- case FATAL:
- default:
- log_level = LOG_ERR;
- break;
+ switch (lev)
+ {
+ case NOIND:
+ log_level = LOG_DEBUG;
+ break;
+ case DEBUG:
+ log_level = LOG_DEBUG;
+ break;
+ case NOTICE:
+ log_level = LOG_NOTICE;
+ break;
+ case ERROR:
+ log_level = LOG_WARNING;
+ break;
+ case FATAL:
+ default:
+ log_level = LOG_ERR;
+ break;
}
- write_syslog(log_level, line+TIMESTAMP_SIZE);
+ write_syslog(log_level, line + TIMESTAMP_SIZE);
#endif
len = strlen(strcat(line, "\n"));
@@ -195,7 +198,7 @@ elog(int lev, const char *fmt,...)
else
pq_putnchar("E", 1);
/* pq_putint(-101, 4); *//* should be query id */
- pq_putstr(line+TIMESTAMP_SIZE); /* don't show timestamps */
+ pq_putstr(line + TIMESTAMP_SIZE); /* don't show timestamps */
pq_flush();
}
if (Pfout == NULL)
@@ -207,16 +210,16 @@ elog(int lev, const char *fmt,...)
*/
fputs(line, stderr);
}
-#endif /* !PG_STANDALONE */
+#endif /* !PG_STANDALONE */
if (lev == ERROR)
{
- extern bool InError;
+ extern bool InError;
ProcReleaseSpins(NULL); /* get rid of spinlocks we hold */
if (!InError)
{
- kill(MyProcPid, SIGQUIT); /* abort to traffic cop */
+ kill(MyProcPid, SIGQUIT); /* abort to traffic cop */
pause();
}
diff --git a/src/backend/utils/error/exc.c b/src/backend/utils/error/exc.c
index 3061edcc31..5fc7b2188a 100644
--- a/src/backend/utils/error/exc.c
+++ b/src/backend/utils/error/exc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.22 1998/09/01 03:26:38 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/Attic/exc.c,v 1.23 1998/09/01 04:33:08 momjian Exp $
*
* NOTE
* XXX this code needs improvement--check for state violations and
@@ -24,11 +24,9 @@
#include "utils/exc.h"
#include "storage/ipc.h"
-static void
-ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data,
+static void ExcUnCaught(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
-static void
-ExcPrint(Exception *excP, ExcDetail detail, ExcData data,
+static void ExcPrint(Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
/*
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 27c2bd213d..0103350339 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.19 1998/09/01 03:26:43 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.20 1998/09/01 04:33:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -172,7 +172,7 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo)
if (!(fcp = fmgr_isbuiltin(procedureId)))
{
procedureTuple = SearchSysCacheTuple(PROOID,
- ObjectIdGetDatum(procedureId),
+ ObjectIdGetDatum(procedureId),
0, 0, 0);
if (!HeapTupleIsValid(procedureTuple))
{
diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c
index 42de36b39b..ecf87b08f5 100644
--- a/src/backend/utils/hash/dynahash.c
+++ b/src/backend/utils/hash/dynahash.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.15 1998/09/01 03:26:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.16 1998/09/01 04:33:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,7 +47,7 @@
#include "utils/hsearch.h"
#ifndef FRONTEND
#include "utils/mcxt.h"
-#endif /* !FRONTEND */
+#endif /* !FRONTEND */
#include "utils/palloc.h"
/*
@@ -115,7 +115,7 @@ DynaHashFree(Pointer ptr)
#define MEM_ALLOC palloc
#define MEM_FREE pfree
-#endif /* FRONTEND */
+#endif /* FRONTEND */
/* ----------------
* Internal routines
diff --git a/src/backend/utils/init/findbe.c b/src/backend/utils/init/findbe.c
index 115c21e2f7..eadb0b7659 100644
--- a/src/backend/utils/init/findbe.c
+++ b/src/backend/utils/init/findbe.c
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.11 1998/09/01 03:26:51 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.12 1998/09/01 04:33:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -160,8 +160,8 @@ FindExec(char *full_path, char *argv0, char *binary_name)
int pathlen;
/*
- * for the postmaster: First try: use the binary that's located in
- * the same directory as the postmaster, if it was invoked with an
+ * for the postmaster: First try: use the binary that's located in the
+ * same directory as the postmaster, if it was invoked with an
* explicit path. Presumably the user used an explicit path because it
* wasn't in PATH, and we don't want to use incompatible executables.
*
@@ -170,9 +170,9 @@ FindExec(char *full_path, char *argv0, char *binary_name)
* trees (obj/post{master,gres}) because they all put the two binaries
* in the same place.
*
- * for the binary: First try: if we're given some kind of path,
- * use it (making sure that a relative path is made absolute before
- * returning it).
+ * for the binary: First try: if we're given some kind of path, use it
+ * (making sure that a relative path is made absolute before returning
+ * it).
*/
if (argv0 && (p = strrchr(argv0, '/')) && *++p)
{
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 5910655515..3f6075edf2 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.21 1998/09/01 03:26:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.22 1998/09/01 04:33:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -241,9 +241,10 @@ SetDatabaseName(char *name)
const char *
getdatabaseencoding()
{
- elog(ERROR, "you need to enable MB to use this function");
- return("");
+ elog(ERROR, "you need to enable MB to use this function");
+ return ("");
}
+
#endif
#ifdef CYR_RECODE
@@ -433,7 +434,7 @@ SetPgUserName()
free(UserName);
UserName = malloc(strlen(p) + 1);
strcpy(UserName, p);
-#endif /* NO_SECURITY */
+#endif /* NO_SECURITY */
}
/* ----------------------------------------------------------------
@@ -469,8 +470,8 @@ SetUserId()
userName = GetPgUserName();
userTup = SearchSysCacheTuple(USENAME,
- PointerGetDatum(userName),
- 0, 0, 0);
+ PointerGetDatum(userName),
+ 0, 0, 0);
if (!HeapTupleIsValid(userTup))
elog(FATAL, "SetUserId: user \"%s\" is not in \"%s\"",
userName,
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 790684cda1..12bbcf3034 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.34 1998/08/24 01:13:56 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.35 1998/09/01 04:33:17 momjian Exp $
*
* NOTES
* InitPostgres() is the function called from PostgresMain
@@ -121,7 +121,7 @@ InitMyDatabaseInfo(char *name)
int4 owner;
char *path,
myPath[MAXPGPATH + 1];
- int encoding;
+ int encoding;
SetDatabaseName(name);
GetRawDatabaseInfo(name, &owner, &MyDatabaseId, myPath, &encoding);
@@ -201,8 +201,8 @@ VerifySystemDatabase()
static void
VerifyMyDatabase()
{
- const char *name;
- const char *myPath;
+ const char *name;
+ const char *myPath;
/* Failure reason returned by some function. NULL if no failure */
char *reason;
@@ -384,7 +384,7 @@ forcesharedmemory:
#endif
- if (!IsUnderPostmaster) /* postmaster already did this */
+ if (!IsUnderPostmaster) /* postmaster already did this */
{
PostgresIpcKey = key;
AttachSharedMemoryAndSemaphores(key);
@@ -509,6 +509,8 @@ InitPostgres(char *name) /* database name */
/*
* ********************************
*
+ *
+ *
* code after this point assumes we are in the proper directory!
*
* So, how do we implement alternate locations for databases? There are
diff --git a/src/backend/utils/mb/common.c b/src/backend/utils/mb/common.c
index c4e796e79e..dc71122ed3 100644
--- a/src/backend/utils/mb/common.c
+++ b/src/backend/utils/mb/common.c
@@ -2,7 +2,7 @@
* This file contains some public functions
* usable for both the backend and the frontend.
* Tatsuo Ishii
- * $Id: common.c,v 1.1 1998/07/24 03:31:56 scrappy Exp $ */
+ * $Id: common.c,v 1.2 1998/09/01 04:33:19 momjian Exp $ */
#include <stdio.h>
#include <string.h>
@@ -14,54 +14,61 @@
* case is ignored.
* if there's no valid encoding, returns -1
*/
-int pg_char_to_encoding(const char *s)
+int
+pg_char_to_encoding(const char *s)
{
- pg_encoding_conv_tbl *p = pg_conv_tbl;
+ pg_encoding_conv_tbl *p = pg_conv_tbl;
- for(;p->encoding >= 0;p++) {
- if (!strcasecmp(s, p->name)) {
- break;
- }
- }
- return(p->encoding);
+ for (; p->encoding >= 0; p++)
+ {
+ if (!strcasecmp(s, p->name))
+ break;
+ }
+ return (p->encoding);
}
/*
* check to see if encoding name is valid
*/
-int pg_valid_client_encoding(const char *name)
+int
+pg_valid_client_encoding(const char *name)
{
- return(pg_char_to_encoding(name));
+ return (pg_char_to_encoding(name));
}
/*
* find encoding table entry by encoding
*/
-pg_encoding_conv_tbl *pg_get_encent_by_encoding(int encoding)
+pg_encoding_conv_tbl *
+pg_get_encent_by_encoding(int encoding)
{
- pg_encoding_conv_tbl *p = pg_conv_tbl;
- for(;p->encoding >= 0;p++) {
- if (p->encoding == encoding) {
- return(p);
- }
- }
- return(0);
+ pg_encoding_conv_tbl *p = pg_conv_tbl;
+
+ for (; p->encoding >= 0; p++)
+ {
+ if (p->encoding == encoding)
+ return (p);
+ }
+ return (0);
}
/*
* convert encoding symbol to encoding char.
* if there's no valid encoding symbol, returns ""
*/
-const char *pg_encoding_to_char(int encoding)
+const char *
+pg_encoding_to_char(int encoding)
{
- pg_encoding_conv_tbl *p = pg_get_encent_by_encoding(encoding);
+ pg_encoding_conv_tbl *p = pg_get_encent_by_encoding(encoding);
- if (!p) return("");
- return(p->name);
+ if (!p)
+ return ("");
+ return (p->name);
}
/* returns the byte length of a multi-byte word for an encoding */
-int pg_encoding_mblen(int encoding, const unsigned char *mbstr)
+int
+pg_encoding_mblen(int encoding, const unsigned char *mbstr)
{
- return((*pg_wchar_table[encoding].mblen)(mbstr));
+ return ((*pg_wchar_table[encoding].mblen) (mbstr));
}
diff --git a/src/backend/utils/mb/conv.c b/src/backend/utils/mb/conv.c
index 01c92e3b9a..ee9649f32d 100644
--- a/src/backend/utils/mb/conv.c
+++ b/src/backend/utils/mb/conv.c
@@ -2,7 +2,7 @@
* conversion between client encoding and server internal encoding
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
- * $Id: conv.c,v 1.2 1998/08/24 01:13:59 momjian Exp $
+ * $Id: conv.c,v 1.3 1998/09/01 04:33:21 momjian Exp $
*/
#include <stdio.h>
#include <string.h>
@@ -13,405 +13,505 @@
* convert bogus chars that cannot be represented in the current encoding
* system.
*/
-static void printBogusChar(unsigned char **mic, unsigned char **p)
+static void
+printBogusChar(unsigned char **mic, unsigned char **p)
{
- char strbuf[16];
- int l = pg_mic_mblen(*mic);
-
- *(*p)++ = '(';
- while (l--) {
- sprintf(strbuf,"%02x",*(*mic)++);
- *(*p)++ = strbuf[0];
- *(*p)++ = strbuf[1];
- }
- *(*p)++ = ')';
+ char strbuf[16];
+ int l = pg_mic_mblen(*mic);
+
+ *(*p)++ = '(';
+ while (l--)
+ {
+ sprintf(strbuf, "%02x", *(*mic)++);
+ *(*p)++ = strbuf[0];
+ *(*p)++ = strbuf[1];
+ }
+ *(*p)++ = ')';
}
/*
* SJIS ---> MIC
*/
-static void sjis2mic(unsigned char *sjis, unsigned char *p, int len)
+static void
+sjis2mic(unsigned char *sjis, unsigned char *p, int len)
{
- int c1,c2;
-
- while (len > 0 && (c1 = *sjis++)) {
- if (c1 >= 0xa1 && c1 <= 0xdf) { /* 1 byte kana? */
- len--;
- *p++ = LC_JISX0201K;
- *p++ = c1;
- } else if (c1 > 0x7f) { /* kanji? */
- c2 = *sjis++;
- len -= 2;
- *p++ = LC_JISX0208;
- *p++ = ((c1 & 0x3f)<<1) + 0x9f + (c2 > 0x9e);
- *p++ = c2 + ((c2 > 0x9e)? 2 : 0x60) + (c2 < 0x80);
- } else { /* should be ASCII */
- len--;
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1,
+ c2;
+
+ while (len > 0 && (c1 = *sjis++))
+ {
+ if (c1 >= 0xa1 && c1 <= 0xdf)
+ { /* 1 byte kana? */
+ len--;
+ *p++ = LC_JISX0201K;
+ *p++ = c1;
+ }
+ else if (c1 > 0x7f)
+ { /* kanji? */
+ c2 = *sjis++;
+ len -= 2;
+ *p++ = LC_JISX0208;
+ *p++ = ((c1 & 0x3f) << 1) + 0x9f + (c2 > 0x9e);
+ *p++ = c2 + ((c2 > 0x9e) ? 2 : 0x60) + (c2 < 0x80);
+ }
+ else
+ { /* should be ASCII */
+ len--;
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* MIC ---> SJIS
*/
-static void mic2sjis(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2sjis(unsigned char *mic, unsigned char *p, int len)
{
- int c1,c2;
-
- while (len > 0 && (c1 = *mic)) {
- len -= pg_mic_mblen(mic++);
-
- if (c1 == LC_JISX0201K) {
- *p++ = *mic++;
- } else if (c1 == LC_JISX0208) {
- c1 = *mic++;
- c2 = *mic++;
- *p++ = ((c1 - 0xa1)>>1) + ((c1 < 0xdf)? 0x81 : 0xc1);
- *p++ = c2 - ((c1 & 1)? ((c2 < 0xe0)? 0x61 : 0x60) : 2);
- } else if (c1 > 0x7f) { /* cannot convert to SJIS! */
- mic--;
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1,
+ c2;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ len -= pg_mic_mblen(mic++);
+
+ if (c1 == LC_JISX0201K)
+ *p++ = *mic++;
+ else if (c1 == LC_JISX0208)
+ {
+ c1 = *mic++;
+ c2 = *mic++;
+ *p++ = ((c1 - 0xa1) >> 1) + ((c1 < 0xdf) ? 0x81 : 0xc1);
+ *p++ = c2 - ((c1 & 1) ? ((c2 < 0xe0) ? 0x61 : 0x60) : 2);
+ }
+ else if (c1 > 0x7f)
+ { /* cannot convert to SJIS! */
+ mic--;
+ printBogusChar(&mic, &p);
+ }
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* EUC_JP ---> MIC
*/
-static void euc_jp2mic(unsigned char *euc, unsigned char *p, int len)
+static void
+euc_jp2mic(unsigned char *euc, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *euc++)) {
- if (c1 == SS2) { /* 1 byte kana? */
- len -= 2;
- *p++ = LC_JISX0201K;
- *p++ = *euc++;
- } else if (c1 == SS3) { /* JIS X0212 kanji? */
- len -= 3;
- *p++ = LC_JISX0212;
- *p++ = *euc++;
- *p++ = *euc++;
- } else if (c1 & 0x80) { /* kanji? */
- len -= 2;
- *p++ = LC_JISX0208;
- *p++ = c1;
- *p++ = *euc++;
- } else { /* should be ASCII */
- len--;
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *euc++))
+ {
+ if (c1 == SS2)
+ { /* 1 byte kana? */
+ len -= 2;
+ *p++ = LC_JISX0201K;
+ *p++ = *euc++;
+ }
+ else if (c1 == SS3)
+ { /* JIS X0212 kanji? */
+ len -= 3;
+ *p++ = LC_JISX0212;
+ *p++ = *euc++;
+ *p++ = *euc++;
+ }
+ else if (c1 & 0x80)
+ { /* kanji? */
+ len -= 2;
+ *p++ = LC_JISX0208;
+ *p++ = c1;
+ *p++ = *euc++;
+ }
+ else
+ { /* should be ASCII */
+ len--;
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* MIC ---> EUC_JP
*/
-static void mic2euc_jp(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2euc_jp(unsigned char *mic, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *mic)) {
- len -= pg_mic_mblen(mic++);
-
- if (c1 == LC_JISX0201K) {
- *p++ = SS2;
- *p++ = *mic++;
- } else if (c1 == LC_JISX0212) {
- *p++ = SS3;
- *p++ = *mic++;
- *p++ = *mic++;
- } else if (c1 == LC_JISX0208) {
- *p++ = *mic++;
- *p++ = *mic++;
- } else if (c1 > 0x7f) { /* cannot convert to EUC_JP! */
- mic--;
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ len -= pg_mic_mblen(mic++);
+
+ if (c1 == LC_JISX0201K)
+ {
+ *p++ = SS2;
+ *p++ = *mic++;
+ }
+ else if (c1 == LC_JISX0212)
+ {
+ *p++ = SS3;
+ *p++ = *mic++;
+ *p++ = *mic++;
+ }
+ else if (c1 == LC_JISX0208)
+ {
+ *p++ = *mic++;
+ *p++ = *mic++;
+ }
+ else if (c1 > 0x7f)
+ { /* cannot convert to EUC_JP! */
+ mic--;
+ printBogusChar(&mic, &p);
+ }
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* EUC_KR ---> MIC
*/
-static void euc_kr2mic(unsigned char *euc, unsigned char *p, int len)
+static void
+euc_kr2mic(unsigned char *euc, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *euc++)) {
- if (c1 & 0x80) {
- len -= 2;
- *p++ = LC_KS5601;
- *p++ = c1;
- *p++ = *euc++;
- } else { /* should be ASCII */
- len--;
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *euc++))
+ {
+ if (c1 & 0x80)
+ {
+ len -= 2;
+ *p++ = LC_KS5601;
+ *p++ = c1;
+ *p++ = *euc++;
+ }
+ else
+ { /* should be ASCII */
+ len--;
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* MIC ---> EUC_KR
*/
-static void mic2euc_kr(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2euc_kr(unsigned char *mic, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *mic)) {
- len -= pg_mic_mblen(mic++);
-
- if (c1 == LC_KS5601) {
- *p++ = *mic++;
- *p++ = *mic++;
- } else if (c1 > 0x7f) { /* cannot convert to EUC_KR! */
- mic--;
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ len -= pg_mic_mblen(mic++);
+
+ if (c1 == LC_KS5601)
+ {
+ *p++ = *mic++;
+ *p++ = *mic++;
+ }
+ else if (c1 > 0x7f)
+ { /* cannot convert to EUC_KR! */
+ mic--;
+ printBogusChar(&mic, &p);
+ }
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* EUC_CN ---> MIC
*/
-static void euc_cn2mic(unsigned char *euc, unsigned char *p, int len)
+static void
+euc_cn2mic(unsigned char *euc, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *euc++)) {
- if (c1 & 0x80) {
- len -= 2;
- *p++ = LC_GB2312_80;
- *p++ = c1;
- *p++ = *euc++;
- } else { /* should be ASCII */
- len--;
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *euc++))
+ {
+ if (c1 & 0x80)
+ {
+ len -= 2;
+ *p++ = LC_GB2312_80;
+ *p++ = c1;
+ *p++ = *euc++;
+ }
+ else
+ { /* should be ASCII */
+ len--;
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* MIC ---> EUC_CN
*/
-static void mic2euc_cn(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2euc_cn(unsigned char *mic, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *mic)) {
- len -= pg_mic_mblen(mic++);
-
- if (c1 == LC_GB2312_80) {
- *p++ = *mic++;
- *p++ = *mic++;
- } else if (c1 > 0x7f) { /* cannot convert to EUC_CN! */
- mic--;
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ len -= pg_mic_mblen(mic++);
+
+ if (c1 == LC_GB2312_80)
+ {
+ *p++ = *mic++;
+ *p++ = *mic++;
+ }
+ else if (c1 > 0x7f)
+ { /* cannot convert to EUC_CN! */
+ mic--;
+ printBogusChar(&mic, &p);
+ }
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* EUC_TW ---> MIC
*/
-static void euc_tw2mic(unsigned char *euc, unsigned char *p, int len)
+static void
+euc_tw2mic(unsigned char *euc, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *euc++)) {
- if (c1 == SS2) {
- len -= 4;
- c1 = *euc++; /* plane No. */
- if (c1 == 0xa1) {
- *p++ = LC_CNS11643_1;
- } else if (c1 == 0xa2) {
- *p++ = LC_CNS11643_2;
- } else {
- *p++ = 0x9d; /* LCPRV2 */
- *p++ = 0xa3 - c1 + LC_CNS11643_3;
- }
- *p++ = *euc++;
- *p++ = *euc++;
- } else if (c1 & 0x80) { /* CNS11643-1 */
- len -= 2;
- *p++ = LC_CNS11643_1;
- *p++ = c1;
- *p++ = *euc++;
- } else { /* should be ASCII */
- len --;
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *euc++))
+ {
+ if (c1 == SS2)
+ {
+ len -= 4;
+ c1 = *euc++; /* plane No. */
+ if (c1 == 0xa1)
+ *p++ = LC_CNS11643_1;
+ else if (c1 == 0xa2)
+ *p++ = LC_CNS11643_2;
+ else
+ {
+ *p++ = 0x9d; /* LCPRV2 */
+ *p++ = 0xa3 - c1 + LC_CNS11643_3;
+ }
+ *p++ = *euc++;
+ *p++ = *euc++;
+ }
+ else if (c1 & 0x80)
+ { /* CNS11643-1 */
+ len -= 2;
+ *p++ = LC_CNS11643_1;
+ *p++ = c1;
+ *p++ = *euc++;
+ }
+ else
+ { /* should be ASCII */
+ len--;
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* MIC ---> EUC_TW
*/
-static void mic2euc_tw(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2euc_tw(unsigned char *mic, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *mic)) {
- len -= pg_mic_mblen(mic++);
-
- if (c1 == LC_CNS11643_1 || c1 == LC_CNS11643_2) {
- *p++ = *mic++;
- *p++ = *mic++;
- } else if (c1 == 0x9d) { /* LCPRV2? */
- *p++ = SS2;
- *p++ = c1 - LC_CNS11643_3 + 0xa3;
- *p++ = *mic++;
- *p++ = *mic++;
- } else if (c1 > 0x7f) { /* cannot convert to EUC_TW! */
- mic--;
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ len -= pg_mic_mblen(mic++);
+
+ if (c1 == LC_CNS11643_1 || c1 == LC_CNS11643_2)
+ {
+ *p++ = *mic++;
+ *p++ = *mic++;
+ }
+ else if (c1 == 0x9d)
+ { /* LCPRV2? */
+ *p++ = SS2;
+ *p++ = c1 - LC_CNS11643_3 + 0xa3;
+ *p++ = *mic++;
+ *p++ = *mic++;
+ }
+ else if (c1 > 0x7f)
+ { /* cannot convert to EUC_TW! */
+ mic--;
+ printBogusChar(&mic, &p);
+ }
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
/*
* LATINn ---> MIC
*/
-static void latin2mic(unsigned char *l, unsigned char *p, int len, int lc)
+static void
+latin2mic(unsigned char *l, unsigned char *p, int len, int lc)
{
- int c1;
-
- while (len-- > 0 && (c1 = *l++)) {
- if (c1 > 0x7f) { /* Latin1? */
- *p++ = lc;
- }
- *p++ = c1;
- }
- *p = '\0';
+ int c1;
+
+ while (len-- > 0 && (c1 = *l++))
+ {
+ if (c1 > 0x7f)
+ { /* Latin1? */
+ *p++ = lc;
+ }
+ *p++ = c1;
+ }
+ *p = '\0';
}
/*
* MIC ---> LATINn
*/
-static void mic2latin(unsigned char *mic, unsigned char *p, int len, int lc)
+static void
+mic2latin(unsigned char *mic, unsigned char *p, int len, int lc)
{
- int c1;
-
- while (len > 0 && (c1 = *mic)) {
- len -= pg_mic_mblen(mic++);
-
- if (c1 == lc) {
- *p++ = *mic++;
- } else if (c1 > 0x7f) {
- mic--;
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ len -= pg_mic_mblen(mic++);
+
+ if (c1 == lc)
+ *p++ = *mic++;
+ else if (c1 > 0x7f)
+ {
+ mic--;
+ printBogusChar(&mic, &p);
+ }
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
-static void latin12mic(unsigned char *l, unsigned char *p, int len)
+static void
+latin12mic(unsigned char *l, unsigned char *p, int len)
{
- latin2mic(l, p, len, LC_ISO8859_1);
+ latin2mic(l, p, len, LC_ISO8859_1);
}
-static void mic2latin1(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2latin1(unsigned char *mic, unsigned char *p, int len)
{
- mic2latin(mic, p, len, LC_ISO8859_1);
+ mic2latin(mic, p, len, LC_ISO8859_1);
}
-static void latin22mic(unsigned char *l, unsigned char *p, int len)
+static void
+latin22mic(unsigned char *l, unsigned char *p, int len)
{
- latin2mic(l, p, len, LC_ISO8859_2);
+ latin2mic(l, p, len, LC_ISO8859_2);
}
-static void mic2latin2(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2latin2(unsigned char *mic, unsigned char *p, int len)
{
- mic2latin(mic, p, len, LC_ISO8859_2);
+ mic2latin(mic, p, len, LC_ISO8859_2);
}
-static void latin32mic(unsigned char *l, unsigned char *p, int len)
+static void
+latin32mic(unsigned char *l, unsigned char *p, int len)
{
- latin2mic(l, p, len, LC_ISO8859_3);
+ latin2mic(l, p, len, LC_ISO8859_3);
}
-static void mic2latin3(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2latin3(unsigned char *mic, unsigned char *p, int len)
{
- mic2latin(mic, p, len, LC_ISO8859_3);
+ mic2latin(mic, p, len, LC_ISO8859_3);
}
-static void latin42mic(unsigned char *l, unsigned char *p, int len)
+static void
+latin42mic(unsigned char *l, unsigned char *p, int len)
{
- latin2mic(l, p, len, LC_ISO8859_4);
+ latin2mic(l, p, len, LC_ISO8859_4);
}
-static void mic2latin4(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2latin4(unsigned char *mic, unsigned char *p, int len)
{
- mic2latin(mic, p, len, LC_ISO8859_4);
+ mic2latin(mic, p, len, LC_ISO8859_4);
}
-static void latin52mic(unsigned char *l, unsigned char *p, int len)
+static void
+latin52mic(unsigned char *l, unsigned char *p, int len)
{
- latin2mic(l, p, len, LC_ISO8859_5);
+ latin2mic(l, p, len, LC_ISO8859_5);
}
-static void mic2latin5(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2latin5(unsigned char *mic, unsigned char *p, int len)
{
- mic2latin(mic, p, len, LC_ISO8859_5);
+ mic2latin(mic, p, len, LC_ISO8859_5);
}
/*
* ASCII ---> MIC
*/
-static void ascii2mic(unsigned char *l, unsigned char *p, int len)
+static void
+ascii2mic(unsigned char *l, unsigned char *p, int len)
{
- int c1;
+ int c1;
- while (len-- > 0 && (c1 = *l++)) {
- *p++ = (c1 & 0x7f);
- }
- *p = '\0';
+ while (len-- > 0 && (c1 = *l++))
+ *p++ = (c1 & 0x7f);
+ *p = '\0';
}
/*
* MIC ---> ASCII
*/
-static void mic2ascii(unsigned char *mic, unsigned char *p, int len)
+static void
+mic2ascii(unsigned char *mic, unsigned char *p, int len)
{
- int c1;
-
- while (len > 0 && (c1 = *mic)) {
- if (c1 > 0x7f) {
- printBogusChar(&mic, &p);
- } else { /* should be ASCII */
- *p++ = c1;
- }
- }
- *p = '\0';
+ int c1;
+
+ while (len > 0 && (c1 = *mic))
+ {
+ if (c1 > 0x7f)
+ printBogusChar(&mic, &p);
+ else
+ { /* should be ASCII */
+ *p++ = c1;
+ }
+ }
+ *p = '\0';
}
pg_encoding_conv_tbl pg_conv_tbl[] = {
- {SQL_ASCII, "SQL_ASCII", 0, ascii2mic, mic2ascii}, /* SQL/ACII */
- {EUC_JP, "EUC_JP", 0, euc_jp2mic, mic2euc_jp}, /* EUC_JP */
- {EUC_CN, "EUC_CN", 0, euc_cn2mic, mic2euc_cn}, /* EUC_CN */
- {EUC_KR, "EUC_KR", 0, euc_kr2mic, mic2euc_kr}, /* EUC_KR */
- {EUC_TW, "EUC_TW", 0, euc_tw2mic, mic2euc_tw}, /* EUC_TW */
- {UNICODE, "UNICODE", 0, 0, 0}, /* UNICODE */
- {MULE_INTERNAL, "MULE_INTERNAL", 0, 0, 0}, /* MULE_INTERNAL */
- {LATIN1, "LATIN1", 0, latin12mic, mic2latin1}, /* ISO 8859 Latin 1 */
- {LATIN2, "LATIN2", 0, latin22mic, mic2latin2}, /* ISO 8859 Latin 2 */
- {LATIN3, "LATIN3", 0, latin32mic, mic2latin3}, /* ISO 8859 Latin 3 */
- {LATIN4, "LATIN4", 0, latin42mic, mic2latin4}, /* ISO 8859 Latin 4 */
- {LATIN5, "LATIN5", 0, latin52mic, mic2latin5}, /* ISO 8859 Latin 5 */
- {SJIS, "SJIS", 1, sjis2mic, mic2sjis}, /* SJIS */
- {-1, "", 0, 0, 0} /* end mark */
+ {SQL_ASCII, "SQL_ASCII", 0, ascii2mic, mic2ascii}, /* SQL/ACII */
+ {EUC_JP, "EUC_JP", 0, euc_jp2mic, mic2euc_jp}, /* EUC_JP */
+ {EUC_CN, "EUC_CN", 0, euc_cn2mic, mic2euc_cn}, /* EUC_CN */
+ {EUC_KR, "EUC_KR", 0, euc_kr2mic, mic2euc_kr}, /* EUC_KR */
+ {EUC_TW, "EUC_TW", 0, euc_tw2mic, mic2euc_tw}, /* EUC_TW */
+ {UNICODE, "UNICODE", 0, 0, 0}, /* UNICODE */
+ {MULE_INTERNAL, "MULE_INTERNAL", 0, 0, 0}, /* MULE_INTERNAL */
+ {LATIN1, "LATIN1", 0, latin12mic, mic2latin1}, /* ISO 8859 Latin 1 */
+ {LATIN2, "LATIN2", 0, latin22mic, mic2latin2}, /* ISO 8859 Latin 2 */
+ {LATIN3, "LATIN3", 0, latin32mic, mic2latin3}, /* ISO 8859 Latin 3 */
+ {LATIN4, "LATIN4", 0, latin42mic, mic2latin4}, /* ISO 8859 Latin 4 */
+ {LATIN5, "LATIN5", 0, latin52mic, mic2latin5}, /* ISO 8859 Latin 5 */
+ {SJIS, "SJIS", 1, sjis2mic, mic2sjis}, /* SJIS */
+ {-1, "", 0, 0, 0} /* end mark */
};
diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c
index 3a473704dc..2e0a446de2 100644
--- a/src/backend/utils/mb/mbutils.c
+++ b/src/backend/utils/mb/mbutils.c
@@ -3,7 +3,7 @@
* client encoding and server internal encoding.
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
- * $Id: mbutils.c,v 1.2 1998/07/26 04:31:04 scrappy Exp $ */
+ * $Id: mbutils.c,v 1.3 1998/09/01 04:33:22 momjian Exp $ */
#include <stdio.h>
#include <string.h>
@@ -11,77 +11,85 @@
#include "mb/pg_wchar.h"
static client_encoding = -1;
-static void (*client_to_mic)(); /* something to MIC */
-static void (*client_from_mic)(); /* MIC to something */
-static void (*server_to_mic)(); /* something to MIC */
-static void (*server_from_mic)(); /* MIC to something */
+static void (*client_to_mic) ();/* something to MIC */
+static void (*client_from_mic) (); /* MIC to something */
+static void (*server_to_mic) ();/* something to MIC */
+static void (*server_from_mic) (); /* MIC to something */
/*
* find encoding table entry by encoding
*/
-static pg_encoding_conv_tbl *get_enc_ent(int encoding)
+static pg_encoding_conv_tbl *
+get_enc_ent(int encoding)
{
- pg_encoding_conv_tbl *p = pg_conv_tbl;
- for(;p->encoding >= 0;p++) {
- if (p->encoding == encoding) {
- return(p);
- }
- }
- return(0);
+ pg_encoding_conv_tbl *p = pg_conv_tbl;
+
+ for (; p->encoding >= 0; p++)
+ {
+ if (p->encoding == encoding)
+ return (p);
+ }
+ return (0);
}
/*
* set the client encoding. if client/server encoding is
* not supported, returns -1
*/
-int pg_set_client_encoding(int encoding)
+int
+pg_set_client_encoding(int encoding)
{
- int current_server_encoding = GetDatabaseEncoding();
-
- client_encoding = encoding;
-
- if (client_encoding == current_server_encoding) { /* server == client? */
- client_to_mic = client_from_mic = 0;
- server_to_mic = server_from_mic = 0;
- } else if (current_server_encoding == MULE_INTERNAL) { /* server == MULE_INETRNAL? */
- client_to_mic = get_enc_ent(encoding)->to_mic;
- client_from_mic = get_enc_ent(encoding)->from_mic;
- server_to_mic = server_from_mic = 0;
- if (client_to_mic == 0 || client_from_mic == 0) {
- return(-1);
- }
- } else if (encoding == MULE_INTERNAL) { /* client == MULE_INETRNAL? */
- client_to_mic = client_from_mic = 0;
- server_to_mic = get_enc_ent(current_server_encoding)->to_mic;
- server_from_mic = get_enc_ent(current_server_encoding)->from_mic;
- if (server_to_mic == 0 || server_from_mic == 0) {
- return(-1);
- }
- } else {
- client_to_mic = get_enc_ent(encoding)->to_mic;
- client_from_mic = get_enc_ent(encoding)->from_mic;
- server_to_mic = get_enc_ent(current_server_encoding)->to_mic;
- server_from_mic = get_enc_ent(current_server_encoding)->from_mic;
- if (client_to_mic == 0 || client_from_mic == 0) {
- return(-1);
- }
- if (server_to_mic == 0 || server_from_mic == 0) {
- return(-1);
- }
- }
- return(0);
+ int current_server_encoding = GetDatabaseEncoding();
+
+ client_encoding = encoding;
+
+ if (client_encoding == current_server_encoding)
+ { /* server == client? */
+ client_to_mic = client_from_mic = 0;
+ server_to_mic = server_from_mic = 0;
+ }
+ else if (current_server_encoding == MULE_INTERNAL)
+ { /* server == MULE_INETRNAL? */
+ client_to_mic = get_enc_ent(encoding)->to_mic;
+ client_from_mic = get_enc_ent(encoding)->from_mic;
+ server_to_mic = server_from_mic = 0;
+ if (client_to_mic == 0 || client_from_mic == 0)
+ return (-1);
+ }
+ else if (encoding == MULE_INTERNAL)
+ { /* client == MULE_INETRNAL? */
+ client_to_mic = client_from_mic = 0;
+ server_to_mic = get_enc_ent(current_server_encoding)->to_mic;
+ server_from_mic = get_enc_ent(current_server_encoding)->from_mic;
+ if (server_to_mic == 0 || server_from_mic == 0)
+ return (-1);
+ }
+ else
+ {
+ client_to_mic = get_enc_ent(encoding)->to_mic;
+ client_from_mic = get_enc_ent(encoding)->from_mic;
+ server_to_mic = get_enc_ent(current_server_encoding)->to_mic;
+ server_from_mic = get_enc_ent(current_server_encoding)->from_mic;
+ if (client_to_mic == 0 || client_from_mic == 0)
+ return (-1);
+ if (server_to_mic == 0 || server_from_mic == 0)
+ return (-1);
+ }
+ return (0);
}
/*
* returns the current client encoding
*/
-int pg_get_client_encoding()
+int
+pg_get_client_encoding()
{
- if (client_encoding == -1) {
- /* this is the first time */
- client_encoding = GetDatabaseEncoding();
- }
- return(client_encoding);
+ if (client_encoding == -1)
+ {
+ /* this is the first time */
+ client_encoding = GetDatabaseEncoding();
+ }
+ return (client_encoding);
}
/*
@@ -89,25 +97,27 @@ int pg_get_client_encoding()
* client_encoding or no conversion function exists,
* returns s. So be careful.
*/
-unsigned char *pg_client_to_server(unsigned char *s, int len)
+unsigned char *
+pg_client_to_server(unsigned char *s, int len)
{
- static unsigned char b1[MAX_PARSE_BUFFER*4]; /* is this enough? */
- static unsigned char b2[MAX_PARSE_BUFFER*4]; /* is this enough? */
- unsigned char *p = s;
-
- if (client_encoding == GetDatabaseEncoding()) {
- return(p);
- }
- if (client_to_mic) {
- (*client_to_mic)(s, b1, len);
- len = strlen(b1);
- p = b1;
- }
- if (server_from_mic) {
- (*server_from_mic)(p, b2, len);
- p = b2;
- }
- return(p);
+ static unsigned char b1[MAX_PARSE_BUFFER * 4]; /* is this enough? */
+ static unsigned char b2[MAX_PARSE_BUFFER * 4]; /* is this enough? */
+ unsigned char *p = s;
+
+ if (client_encoding == GetDatabaseEncoding())
+ return (p);
+ if (client_to_mic)
+ {
+ (*client_to_mic) (s, b1, len);
+ len = strlen(b1);
+ p = b1;
+ }
+ if (server_from_mic)
+ {
+ (*server_from_mic) (p, b2, len);
+ p = b2;
+ }
+ return (p);
}
/*
@@ -115,102 +125,115 @@ unsigned char *pg_client_to_server(unsigned char *s, int len)
* client_encoding or no conversion function exists,
* returns s. So be careful.
*/
-unsigned char *pg_server_to_client(unsigned char *s, int len)
+unsigned char *
+pg_server_to_client(unsigned char *s, int len)
{
- static unsigned char b1[MAX_PARSE_BUFFER*4]; /* is this enough? */
- static unsigned char b2[MAX_PARSE_BUFFER*4]; /* is this enough? */
- unsigned char *p = s;
-
- if (client_encoding == GetDatabaseEncoding()) {
- return(p);
- }
- if (server_to_mic) {
- (*server_to_mic)(s, b1, len);
- len = strlen(b1);
- p = b1;
- }
- if (client_from_mic) {
- (*client_from_mic)(p, b2, len);
- p = b2;
- }
- return(p);
+ static unsigned char b1[MAX_PARSE_BUFFER * 4]; /* is this enough? */
+ static unsigned char b2[MAX_PARSE_BUFFER * 4]; /* is this enough? */
+ unsigned char *p = s;
+
+ if (client_encoding == GetDatabaseEncoding())
+ return (p);
+ if (server_to_mic)
+ {
+ (*server_to_mic) (s, b1, len);
+ len = strlen(b1);
+ p = b1;
+ }
+ if (client_from_mic)
+ {
+ (*client_from_mic) (p, b2, len);
+ p = b2;
+ }
+ return (p);
}
/* convert a multi-byte string to a wchar */
-void pg_mb2wchar(const unsigned char *from, pg_wchar *to)
+void
+pg_mb2wchar(const unsigned char *from, pg_wchar * to)
{
- (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len)(from,to,strlen(from));
+ (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, strlen(from));
}
/* convert a multi-byte string to a wchar with a limited length */
-void pg_mb2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
+void
+pg_mb2wchar_with_len(const unsigned char *from, pg_wchar * to, int len)
{
- (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len)(from,to,len);
+ (*pg_wchar_table[GetDatabaseEncoding()].mb2wchar_with_len) (from, to, len);
}
/* returns the byte length of a multi-byte word */
-int pg_mblen(const unsigned char *mbstr)
+int
+pg_mblen(const unsigned char *mbstr)
{
- return((*pg_wchar_table[GetDatabaseEncoding()].mblen)(mbstr));
+ return ((*pg_wchar_table[GetDatabaseEncoding()].mblen) (mbstr));
}
/* returns the length (counted as a wchar) of a multi-byte string */
-int pg_mbstrlen(const unsigned char *mbstr)
+int
+pg_mbstrlen(const unsigned char *mbstr)
{
- int len = 0;
- while (*mbstr) {
- mbstr += pg_mblen(mbstr);
- len++;
- }
- return(len);
+ int len = 0;
+
+ while (*mbstr)
+ {
+ mbstr += pg_mblen(mbstr);
+ len++;
+ }
+ return (len);
}
-/* returns the length (counted as a wchar) of a multi-byte string
+/* returns the length (counted as a wchar) of a multi-byte string
(not necessarily NULL terminated) */
-int pg_mbstrlen_with_len(const unsigned char *mbstr, int limit)
+int
+pg_mbstrlen_with_len(const unsigned char *mbstr, int limit)
{
- int len = 0;
- int l;
- while (*mbstr && limit > 0) {
- l = pg_mblen(mbstr);
- limit -= l;
- mbstr += l;
- len++;
- }
- return(len);
+ int len = 0;
+ int l;
+
+ while (*mbstr && limit > 0)
+ {
+ l = pg_mblen(mbstr);
+ limit -= l;
+ mbstr += l;
+ len++;
+ }
+ return (len);
}
/*
* fuctions for utils/init
*/
-static int DatabaseEncoding = MULTIBYTE;
+static int DatabaseEncoding = MULTIBYTE;
void
SetDatabaseEncoding(int encoding)
{
- DatabaseEncoding = encoding;
+ DatabaseEncoding = encoding;
}
int
GetDatabaseEncoding()
{
- return(DatabaseEncoding);
+ return (DatabaseEncoding);
}
/* for builtin-function */
const char *
getdatabaseencoding()
{
- return(pg_encoding_to_char(DatabaseEncoding));
+ return (pg_encoding_to_char(DatabaseEncoding));
}
/* set and get template1 database encoding */
-static int templateEncoding;
-void SetTemplateEncoding(int encoding)
+static int templateEncoding;
+void
+SetTemplateEncoding(int encoding)
{
- templateEncoding = encoding;
+ templateEncoding = encoding;
}
-int GetTemplateEncoding()
+int
+GetTemplateEncoding()
{
- return(templateEncoding);
+ return (templateEncoding);
}
diff --git a/src/backend/utils/mb/utftest.c b/src/backend/utils/mb/utftest.c
index e49f8d7794..c83e54c8ec 100644
--- a/src/backend/utils/mb/utftest.c
+++ b/src/backend/utils/mb/utftest.c
@@ -1,6 +1,6 @@
/*
* testing of utf2wchar()
- * $Id: utftest.c,v 1.1 1998/07/24 03:31:57 scrappy Exp $
+ * $Id: utftest.c,v 1.2 1998/09/01 04:33:23 momjian Exp $
*/
#include <regex/regex.h>
#include <regex/utils.h>
@@ -10,24 +10,28 @@
main()
{
- /* Example 1 from RFC2044 */
- char utf1[] = {0x41,0xe2,0x89,0xa2,0xce,0x91,0x2e,0};
- /* Example 2 from RFC2044 */
- char utf2[] = {0x48,0x69,0x20,0x4d,0x6f,0x6d,0x20,0xe2,0x98,0xba,0x21,0};
- /* Example 3 from RFC2044 */
- char utf3[] = {0xe6,0x97,0xa5,0xe6,0x9c,0xac,0xe8,0xaa,0x9e,0};
- char *utf[] = {utf1,utf2,utf3};
- pg_wchar ucs[128];
- pg_wchar *p;
- int i;
+ /* Example 1 from RFC2044 */
+ char utf1[] = {0x41, 0xe2, 0x89, 0xa2, 0xce, 0x91, 0x2e, 0};
- for (i=0;i<sizeof(utf)/sizeof(char *);i++) {
- pg_utf2wchar(utf[i],ucs);
- p = ucs;
- while(*p) {
- printf("%04x ",*p);
- p++;
- }
- printf("\n");
- }
+ /* Example 2 from RFC2044 */
+ char utf2[] = {0x48, 0x69, 0x20, 0x4d, 0x6f, 0x6d, 0x20, 0xe2, 0x98, 0xba, 0x21, 0};
+
+ /* Example 3 from RFC2044 */
+ char utf3[] = {0xe6, 0x97, 0xa5, 0xe6, 0x9c, 0xac, 0xe8, 0xaa, 0x9e, 0};
+ char *utf[] = {utf1, utf2, utf3};
+ pg_wchar ucs[128];
+ pg_wchar *p;
+ int i;
+
+ for (i = 0; i < sizeof(utf) / sizeof(char *); i++)
+ {
+ pg_utf2wchar(utf[i], ucs);
+ p = ucs;
+ while (*p)
+ {
+ printf("%04x ", *p);
+ p++;
+ }
+ printf("\n");
+ }
}
diff --git a/src/backend/utils/mb/variable.c b/src/backend/utils/mb/variable.c
index 12cc23d3f3..37b95ccf12 100644
--- a/src/backend/utils/mb/variable.c
+++ b/src/backend/utils/mb/variable.c
@@ -2,7 +2,7 @@
* This file contains some public functions
* related to show/set/reset variable commands.
* Tatsuo Ishii
- * $Id: variable.c,v 1.1 1998/07/24 03:31:57 scrappy Exp $
+ * $Id: variable.c,v 1.2 1998/09/01 04:33:24 momjian Exp $
*/
#include "mb/pg_wchar.h"
@@ -10,64 +10,66 @@
bool
parse_client_encoding(const char *value)
{
- int encoding;
+ int encoding;
- encoding = pg_valid_client_encoding(value);
- if (encoding < 0) {
- elog(ERROR, "Client encoding %s is not supported", value);
- } else {
- if (pg_set_client_encoding(encoding)) {
- elog(ERROR, "Conversion between %s and %s is not supported",
- value, pg_encoding_to_char(GetDatabaseEncoding()));
- }
- }
- return TRUE;
+ encoding = pg_valid_client_encoding(value);
+ if (encoding < 0)
+ elog(ERROR, "Client encoding %s is not supported", value);
+ else
+ {
+ if (pg_set_client_encoding(encoding))
+ {
+ elog(ERROR, "Conversion between %s and %s is not supported",
+ value, pg_encoding_to_char(GetDatabaseEncoding()));
+ }
+ }
+ return TRUE;
}
bool
show_client_encoding()
{
- elog(NOTICE, "Current client encoding is %s",
- pg_encoding_to_char(pg_get_client_encoding()));
- return TRUE;
+ elog(NOTICE, "Current client encoding is %s",
+ pg_encoding_to_char(pg_get_client_encoding()));
+ return TRUE;
}
bool
reset_client_encoding()
{
- int encoding;
- char *env = getenv("PGCLIENTENCODING");
+ int encoding;
+ char *env = getenv("PGCLIENTENCODING");
- if (env) {
- encoding = pg_char_to_encoding(env);
- if (encoding < 0) {
- encoding = GetDatabaseEncoding();
- }
- } else {
- encoding = GetDatabaseEncoding();
- }
- pg_set_client_encoding(encoding);
- return TRUE;
+ if (env)
+ {
+ encoding = pg_char_to_encoding(env);
+ if (encoding < 0)
+ encoding = GetDatabaseEncoding();
+ }
+ else
+ encoding = GetDatabaseEncoding();
+ pg_set_client_encoding(encoding);
+ return TRUE;
}
bool
parse_server_encoding(const char *value)
{
- elog(NOTICE, "SET SERVER_ENCODING is not supported");
- return TRUE;
+ elog(NOTICE, "SET SERVER_ENCODING is not supported");
+ return TRUE;
}
bool
show_server_encoding()
{
- elog(NOTICE, "Current server encoding is %s",
- pg_encoding_to_char(GetDatabaseEncoding()));
- return TRUE;
+ elog(NOTICE, "Current server encoding is %s",
+ pg_encoding_to_char(GetDatabaseEncoding()));
+ return TRUE;
}
bool
reset_server_encoding()
{
- elog(NOTICE, "RESET SERVER_ENCODING is not supported");
- return TRUE;
+ elog(NOTICE, "RESET SERVER_ENCODING is not supported");
+ return TRUE;
}
diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c
index 3cc2477061..edd786f29f 100644
--- a/src/backend/utils/mb/wchar.c
+++ b/src/backend/utils/mb/wchar.c
@@ -1,7 +1,7 @@
/*
* conversion functions between pg_wchar and multi-byte streams.
* Tatsuo Ishii
- * $Id: wchar.c,v 1.3 1998/08/25 04:19:16 momjian Exp $
+ * $Id: wchar.c,v 1.4 1998/09/01 04:33:26 momjian Exp $
*/
#include "mb/pg_wchar.h"
@@ -10,7 +10,7 @@
* conversion to pg_wchar is done by "table driven."
* to add an encoding support, define mb2wchar_with_len(), mblen()
* for the particular encoding. Note that if the encoding is only
- * supported in the client, you don't need to define
+ * supported in the client, you don't need to define
* mb2wchar_with_len() function (SJIS is the case).
*/
@@ -18,18 +18,20 @@
* SQL/ASCII
*/
static void pg_ascii2wchar_with_len
-(const unsigned char *from, pg_wchar *to, int len)
+ (const unsigned char *from, pg_wchar * to, int len)
{
- while (*from && len > 0) {
- *to++ = *from++;
- len--;
- }
- *to = 0;
+ while (*from && len > 0)
+ {
+ *to++ = *from++;
+ len--;
+ }
+ *to = 0;
}
-static int pg_ascii_mblen(const unsigned char *s)
+static int
+pg_ascii_mblen(const unsigned char *s)
{
- return(1);
+ return (1);
}
/*
@@ -37,169 +39,195 @@ static int pg_ascii_mblen(const unsigned char *s)
*/
static void pg_euc2wchar_with_len
-(const unsigned char *from, pg_wchar *to, int len)
+ (const unsigned char *from, pg_wchar * to, int len)
{
- while (*from && len > 0) {
- if (*from == SS2) {
- from++;
- len--;
- *to = 0xff & *from++;
- len--;
- } else if (*from == SS3) {
- from++;
- *to = *from++ << 8;
- *to |= 0x3f & *from++;
- len -= 3;
- } else if (*from & 0x80) {
- *to = *from++ << 8;
- *to |= *from++;
- len -= 2;
- } else {
- *to = *from++;
- len--;
- }
- to++;
- }
- *to = 0;
+ while (*from && len > 0)
+ {
+ if (*from == SS2)
+ {
+ from++;
+ len--;
+ *to = 0xff & *from++;
+ len--;
+ }
+ else if (*from == SS3)
+ {
+ from++;
+ *to = *from++ << 8;
+ *to |= 0x3f & *from++;
+ len -= 3;
+ }
+ else if (*from & 0x80)
+ {
+ *to = *from++ << 8;
+ *to |= *from++;
+ len -= 2;
+ }
+ else
+ {
+ *to = *from++;
+ len--;
+ }
+ to++;
+ }
+ *to = 0;
}
-static int pg_euc_mblen(const unsigned char *s)
+static int
+pg_euc_mblen(const unsigned char *s)
{
- int len;
+ int len;
- if (*s == SS2) {
- len = 2;
- } else if (*s == SS3) {
- len = 3;
- } else if (*s & 0x80) {
- len = 2;
- } else {
- len = 1;
- }
- return(len);
+ if (*s == SS2)
+ len = 2;
+ else if (*s == SS3)
+ len = 3;
+ else if (*s & 0x80)
+ len = 2;
+ else
+ len = 1;
+ return (len);
}
/*
* EUC_JP
*/
static void pg_eucjp2wchar_with_len
-(const unsigned char *from, pg_wchar *to, int len)
+ (const unsigned char *from, pg_wchar * to, int len)
{
- pg_euc2wchar_with_len(from,to,len);
+ pg_euc2wchar_with_len(from, to, len);
}
-static int pg_eucjp_mblen(const unsigned char *s)
+static int
+pg_eucjp_mblen(const unsigned char *s)
{
- return(pg_euc_mblen(s));
+ return (pg_euc_mblen(s));
}
/*
* EUC_KR
*/
static void pg_euckr2wchar_with_len
-(const unsigned char *from, pg_wchar *to, int len)
+ (const unsigned char *from, pg_wchar * to, int len)
{
- pg_euc2wchar_with_len(from,to,len);
+ pg_euc2wchar_with_len(from, to, len);
}
-static int pg_euckr_mblen(const unsigned char *s)
+static int
+pg_euckr_mblen(const unsigned char *s)
{
- return(pg_euc_mblen(s));
+ return (pg_euc_mblen(s));
}
/*
* EUC_CN
*/
static void pg_euccn2wchar_with_len
-(const unsigned char *from, pg_wchar *to, int len)
+ (const unsigned char *from, pg_wchar * to, int len)
{
- while (*from && len > 0) {
- if (*from == SS2) {
- from++;
- len--;
- *to = 0x3f00 & (*from++ << 8);
- *to = *from++;
- len -= 2;
- } else if (*from == SS3) {
- from++;
- *to = *from++ << 8;
- *to |= 0x3f & *from++;
- len -= 3;
- } else if (*from & 0x80) {
- *to = *from++ << 8;
- *to |= *from++;
- len -= 2;
- } else {
- *to = *from++;
- len--;
- }
- to++;
- }
- *to = 0;
+ while (*from && len > 0)
+ {
+ if (*from == SS2)
+ {
+ from++;
+ len--;
+ *to = 0x3f00 & (*from++ << 8);
+ *to = *from++;
+ len -= 2;
+ }
+ else if (*from == SS3)
+ {
+ from++;
+ *to = *from++ << 8;
+ *to |= 0x3f & *from++;
+ len -= 3;
+ }
+ else if (*from & 0x80)
+ {
+ *to = *from++ << 8;
+ *to |= *from++;
+ len -= 2;
+ }
+ else
+ {
+ *to = *from++;
+ len--;
+ }
+ to++;
+ }
+ *to = 0;
}
-static int pg_euccn_mblen(const unsigned char *s)
+static int
+pg_euccn_mblen(const unsigned char *s)
{
- int len;
+ int len;
- if (*s == SS2) {
- len = 3;
- } else if (*s == SS3) {
- len = 3;
- } else if (*s & 0x80) {
- len = 2;
- } else {
- len = 1;
- }
- return(len);
+ if (*s == SS2)
+ len = 3;
+ else if (*s == SS3)
+ len = 3;
+ else if (*s & 0x80)
+ len = 2;
+ else
+ len = 1;
+ return (len);
}
/*
* EUC_TW
*/
static void pg_euctw2wchar_with_len
-(const unsigned char *from, pg_wchar *to, int len)
+ (const unsigned char *from, pg_wchar * to, int len)
{
- while (*from && len > 0) {
- if (*from == SS2) {
- from++;
- len--;
- *to = *from++ << 16;
- *to |= *from++ << 8;
- *to |= *from++;
- len -= 3;
- } else if (*from == SS3) {
- from++;
- *to = *from++ << 8;
- *to |= 0x3f & *from++;
- len -= 3;
- } else if (*from & 0x80) {
- *to = *from++ << 8;
- *to |= *from++;
- len -= 2;
- } else {
- *to = *from++;
- len--;
- }
- to++;
- }
- *to = 0;
+ while (*from && len > 0)
+ {
+ if (*from == SS2)
+ {
+ from++;
+ len--;
+ *to = *from++ << 16;
+ *to |= *from++ << 8;
+ *to |= *from++;
+ len -= 3;
+ }
+ else if (*from == SS3)
+ {
+ from++;
+ *to = *from++ << 8;
+ *to |= 0x3f & *from++;
+ len -= 3;
+ }
+ else if (*from & 0x80)
+ {
+ *to = *from++ << 8;
+ *to |= *from++;
+ len -= 2;
+ }
+ else
+ {
+ *to = *from++;
+ len--;
+ }
+ to++;
+ }
+ *to = 0;
}
-static int pg_euctw_mblen(const unsigned char *s)
+static int
+pg_euctw_mblen(const unsigned char *s)
{
- int len;
+ int len;
- if (*s == SS2) {
- len = 4;
- } else if (*s == SS3) {
- len = 3;
- } else if (*s & 0x80) {
- len = 2;
- } else {
- len = 1;
- }
- return(len);
+ if (*s == SS2)
+ len = 4;
+ else if (*s == SS3)
+ len = 3;
+ else if (*s & 0x80)
+ len = 2;
+ else
+ len = 1;
+ return (len);
}
/*
@@ -208,45 +236,55 @@ static int pg_euctw_mblen(const unsigned char *s)
* len: length of from.
* "from" not necessarily null terminated.
*/
-static void pg_utf2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
+static void
+pg_utf2wchar_with_len(const unsigned char *from, pg_wchar * to, int len)
{
- unsigned char c1,c2,c3;
- while (*from && len > 0) {
- if ((*from & 0x80) == 0) {
- *to = *from++;
- len--;
- } else if ((*from & 0xe0) == 0xc0) {
- c1 = *from++ & 0x1f;
- c2 = *from++ & 0x3f;
- len -= 2;
- *to = c1 << 6;
- *to |= c2;
- } else if ((*from & 0xe0) == 0xe0) {
- c1 = *from++ & 0x0f;
- c2 = *from++ & 0x3f;
- c3 = *from++ & 0x3f;
- len -= 3;
- *to = c1 << 12;
- *to |= c2 << 6;
- *to |= c3;
- }
- to++;
- }
- *to = 0;
+ unsigned char c1,
+ c2,
+ c3;
+
+ while (*from && len > 0)
+ {
+ if ((*from & 0x80) == 0)
+ {
+ *to = *from++;
+ len--;
+ }
+ else if ((*from & 0xe0) == 0xc0)
+ {
+ c1 = *from++ & 0x1f;
+ c2 = *from++ & 0x3f;
+ len -= 2;
+ *to = c1 << 6;
+ *to |= c2;
+ }
+ else if ((*from & 0xe0) == 0xe0)
+ {
+ c1 = *from++ & 0x0f;
+ c2 = *from++ & 0x3f;
+ c3 = *from++ & 0x3f;
+ len -= 3;
+ *to = c1 << 12;
+ *to |= c2 << 6;
+ *to |= c3;
+ }
+ to++;
+ }
+ *to = 0;
}
-static int pg_utf_mblen(const unsigned char *s)
+static int
+pg_utf_mblen(const unsigned char *s)
{
- int len = 1;
+ int len = 1;
- if ((*s & 0x80) == 0) {
- len = 1;
- } else if ((*s & 0xe0) == 0xc0) {
- len = 2;
- } else if ((*s & 0xe0) == 0xe0) {
- len = 3;
- }
- return(len);
+ if ((*s & 0x80) == 0)
+ len = 1;
+ else if ((*s & 0xe0) == 0xc0)
+ len = 2;
+ else if ((*s & 0xe0) == 0xe0)
+ len = 3;
+ return (len);
}
/*
@@ -255,127 +293,148 @@ static int pg_utf_mblen(const unsigned char *s)
* len: length of from.
* "from" not necessarily null terminated.
*/
-static void pg_mule2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
+static void
+pg_mule2wchar_with_len(const unsigned char *from, pg_wchar * to, int len)
{
- while (*from && len > 0) {
- if (IS_LC1(*from)) {
- *to = *from++ << 16;
- *to |= *from++;
- len -= 2;
- } else if (IS_LCPRV1(*from)) {
- from++;
- *to = *from++ << 16;
- *to |= *from++;
- len -= 3;
- } else if (IS_LC2(*from)) {
- *to = *from++ << 16;
- *to |= *from++ << 8;
- *to |= *from++;
- len -= 3;
- } else if (IS_LCPRV2(*from)) {
- from++;
- *to = *from++ << 16;
- *to |= *from++ << 8;
- *to |= *from++;
- len -= 4;
- } else { /* assume ASCII */
- *to = (unsigned char)*from++;
- len--;
- }
- to++;
- }
- *to = 0;
+ while (*from && len > 0)
+ {
+ if (IS_LC1(*from))
+ {
+ *to = *from++ << 16;
+ *to |= *from++;
+ len -= 2;
+ }
+ else if (IS_LCPRV1(*from))
+ {
+ from++;
+ *to = *from++ << 16;
+ *to |= *from++;
+ len -= 3;
+ }
+ else if (IS_LC2(*from))
+ {
+ *to = *from++ << 16;
+ *to |= *from++ << 8;
+ *to |= *from++;
+ len -= 3;
+ }
+ else if (IS_LCPRV2(*from))
+ {
+ from++;
+ *to = *from++ << 16;
+ *to |= *from++ << 8;
+ *to |= *from++;
+ len -= 4;
+ }
+ else
+ { /* assume ASCII */
+ *to = (unsigned char) *from++;
+ len--;
+ }
+ to++;
+ }
+ *to = 0;
}
-int pg_mule_mblen(const unsigned char *s)
+int
+pg_mule_mblen(const unsigned char *s)
{
- int len;
+ int len;
- if (IS_LC1(*s)) {
- len = 2;
- } else if (IS_LCPRV1(*s)) {
- len = 3;
- } else if (IS_LC2(*s)) {
- len = 3;
- } else if (IS_LCPRV2(*s)) {
- len = 4;
- } else { /* assume ASCII */
- len = 1;
- }
- return(len);
+ if (IS_LC1(*s))
+ len = 2;
+ else if (IS_LCPRV1(*s))
+ len = 3;
+ else if (IS_LC2(*s))
+ len = 3;
+ else if (IS_LCPRV2(*s))
+ len = 4;
+ else
+ { /* assume ASCII */
+ len = 1;
+ }
+ return (len);
}
/*
* ISO8859-1
*/
-static void pg_latin12wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
+static void
+pg_latin12wchar_with_len(const unsigned char *from, pg_wchar * to, int len)
{
- while (*from && len-- > 0) {
- *to++ = *from++;
- }
- *to = 0;
+ while (*from && len-- > 0)
+ *to++ = *from++;
+ *to = 0;
}
-static int pg_latin1_mblen(const unsigned char *s)
+static int
+pg_latin1_mblen(const unsigned char *s)
{
- return(1);
+ return (1);
}
/*
* SJIS
*/
-static int pg_sjis_mblen(const unsigned char *s)
+static int
+pg_sjis_mblen(const unsigned char *s)
{
- int len;
+ int len;
- if (*s >= 0xa1 && *s <= 0xdf) { /* 1 byte kana? */
- len = 1;
- } else if (*s > 0x7f) { /* kanji? */
- len = 2;
- } else { /* should be ASCII */
- len = 1;
- }
- return(len);
+ if (*s >= 0xa1 && *s <= 0xdf)
+ { /* 1 byte kana? */
+ len = 1;
+ }
+ else if (*s > 0x7f)
+ { /* kanji? */
+ len = 2;
+ }
+ else
+ { /* should be ASCII */
+ len = 1;
+ }
+ return (len);
}
pg_wchar_tbl pg_wchar_table[] = {
- {pg_ascii2wchar_with_len, pg_ascii_mblen},
- {pg_eucjp2wchar_with_len, pg_eucjp_mblen},
- {pg_euccn2wchar_with_len, pg_euccn_mblen},
- {pg_euckr2wchar_with_len, pg_euckr_mblen},
- {pg_euctw2wchar_with_len, pg_euctw_mblen},
- {pg_utf2wchar_with_len, pg_utf_mblen},
- {pg_mule2wchar_with_len, pg_mule_mblen},
- {pg_latin12wchar_with_len, pg_latin1_mblen},
- {pg_latin12wchar_with_len, pg_latin1_mblen},
- {pg_latin12wchar_with_len, pg_latin1_mblen},
- {pg_latin12wchar_with_len, pg_latin1_mblen},
- {pg_latin12wchar_with_len, pg_latin1_mblen},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, 0},
- {0, pg_sjis_mblen}
+ {pg_ascii2wchar_with_len, pg_ascii_mblen},
+ {pg_eucjp2wchar_with_len, pg_eucjp_mblen},
+ {pg_euccn2wchar_with_len, pg_euccn_mblen},
+ {pg_euckr2wchar_with_len, pg_euckr_mblen},
+ {pg_euctw2wchar_with_len, pg_euctw_mblen},
+ {pg_utf2wchar_with_len, pg_utf_mblen},
+ {pg_mule2wchar_with_len, pg_mule_mblen},
+ {pg_latin12wchar_with_len, pg_latin1_mblen},
+ {pg_latin12wchar_with_len, pg_latin1_mblen},
+ {pg_latin12wchar_with_len, pg_latin1_mblen},
+ {pg_latin12wchar_with_len, pg_latin1_mblen},
+ {pg_latin12wchar_with_len, pg_latin1_mblen},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, 0},
+ {0, pg_sjis_mblen}
};
/* returns the byte length of a word for mule internal code */
-int pg_mic_mblen(const unsigned char *mbstr)
+int
+pg_mic_mblen(const unsigned char *mbstr)
{
- return(pg_mule_mblen(mbstr));
+ return (pg_mule_mblen(mbstr));
}
diff --git a/src/backend/utils/mb/wstrcmp.c b/src/backend/utils/mb/wstrcmp.c
index fe2967876f..3efdcc6f39 100644
--- a/src/backend/utils/mb/wstrcmp.c
+++ b/src/backend/utils/mb/wstrcmp.c
@@ -9,22 +9,22 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
+ * must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -38,11 +38,11 @@
int
pg_char_and_wchar_strcmp(s1, s2)
- register const char *s1;
- register const pg_wchar *s2;
+register const char *s1;
+register const pg_wchar *s2;
{
- while ((pg_wchar)*s1 == *s2++)
+ while ((pg_wchar) * s1 == *s2++)
if (*s1++ == 0)
return 0;
- return *(const unsigned char *)s1 - *(const pg_wchar *)(s2 - 1);
+ return *(const unsigned char *) s1 - *(const pg_wchar *) (s2 - 1);
}
diff --git a/src/backend/utils/mb/wstrncmp.c b/src/backend/utils/mb/wstrncmp.c
index 368e39b52e..c7ccf1b4cb 100644
--- a/src/backend/utils/mb/wstrncmp.c
+++ b/src/backend/utils/mb/wstrncmp.c
@@ -8,22 +8,22 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
+ * must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
@@ -37,16 +37,18 @@
int
pg_wchar_strncmp(s1, s2, n)
- register const pg_wchar *s1, *s2;
- register size_t n;
+register const pg_wchar *s1,
+ *s2;
+register size_t n;
{
if (n == 0)
return 0;
- do {
+ do
+ {
if (*s1 != *s2++)
- return (*(const pg_wchar *)s1 -
- *(const pg_wchar *)(s2 - 1));
+ return (*(const pg_wchar *) s1 -
+ *(const pg_wchar *) (s2 - 1));
if (*s1++ == 0)
break;
} while (--n != 0);
@@ -55,17 +57,18 @@ pg_wchar_strncmp(s1, s2, n)
int
pg_char_and_wchar_strncmp(s1, s2, n)
- register const char *s1;
- register const pg_wchar *s2;
- register size_t n;
+register const char *s1;
+register const pg_wchar *s2;
+register size_t n;
{
if (n == 0)
return 0;
- do {
- if ((pg_wchar )*s1 != *s2++)
- return (*(const pg_wchar *)s1 -
- *(const pg_wchar *)(s2 - 1));
+ do
+ {
+ if ((pg_wchar) * s1 != *s2++)
+ return (*(const pg_wchar *) s1 -
+ *(const pg_wchar *) (s2 - 1));
if (*s1++ == 0)
break;
} while (--n != 0);
@@ -74,10 +77,10 @@ pg_char_and_wchar_strncmp(s1, s2, n)
size_t
pg_wchar_strlen(str)
- const pg_wchar *str;
+const pg_wchar *str;
{
register const pg_wchar *s;
for (s = str; *s; ++s);
- return(s - str);
+ return (s - str);
}
diff --git a/src/backend/utils/misc/database.c b/src/backend/utils/misc/database.c
index 3dd61b8e9c..098927bf53 100644
--- a/src/backend/utils/misc/database.c
+++ b/src/backend/utils/misc/database.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.18 1998/09/01 03:26:58 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.19 1998/09/01 04:33:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,6 +106,7 @@ GetDatabaseInfo(char *name, int4 *owner, char *path)
return FALSE;
} /* GetDatabaseInfo() */
+
#endif
char *
@@ -268,14 +269,13 @@ GetRawDatabaseInfo(char *name, int4 *owner, Oid *db_id, char *path, int *encodin
*/
tup_db = (Form_pg_database) GETSTRUCT(tup);
#ifdef MULTIBYTE
- /* get encoding from template database.
- This is the "default for default" for
- create database command.
- */
- if (strcmp("template1",tup_db->datname.data) == 0)
- {
+
+ /*
+ * get encoding from template database. This is the "default
+ * for default" for create database command.
+ */
+ if (strcmp("template1", tup_db->datname.data) == 0)
SetTemplateEncoding(tup_db->encoding);
- }
#endif
if (strcmp(name, tup_db->datname.data) == 0)
{
diff --git a/src/backend/utils/misc/superuser.c b/src/backend/utils/misc/superuser.c
index d5889b8733..3e57e87bee 100644
--- a/src/backend/utils/misc/superuser.c
+++ b/src/backend/utils/misc/superuser.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.6 1998/08/19 02:03:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/superuser.c,v 1.7 1998/09/01 04:33:32 momjian Exp $
*
* DESCRIPTION
* See superuser().
@@ -31,8 +31,8 @@ superuser(void)
HeapTuple utup;
utup = SearchSysCacheTuple(USENAME,
- PointerGetDatum(UserName),
- 0, 0, 0);
+ PointerGetDatum(UserName),
+ 0, 0, 0);
Assert(utup != NULL);
return ((Form_pg_shadow) GETSTRUCT(utup))->usesuper;
}
diff --git a/src/backend/utils/misc/trace.c b/src/backend/utils/misc/trace.c
index 04148e7df4..291bff798c 100644
--- a/src/backend/utils/misc/trace.c
+++ b/src/backend/utils/misc/trace.c
@@ -4,7 +4,7 @@
*
* Conditional trace ans logging functions.
*
- * Massimo Dal Zotto <[email protected]>
+ * Massimo Dal Zotto <[email protected]>
*
*-------------------------------------------------------------------------
*/
@@ -32,12 +32,12 @@
/*
* Global option to control the use of syslog(3) for logging:
*
- * 0 stdout/stderr only
- * 1 stdout/stderr + syslog
- * 2 syslog only
+ * 0 stdout/stderr only
+ * 1 stdout/stderr + syslog
+ * 2 syslog only
*/
-#define UseSyslog pg_options[OPT_SYSLOG]
-#define PG_LOG_FACILITY LOG_LOCAL0
+#define UseSyslog pg_options[OPT_SYSLOG]
+#define PG_LOG_FACILITY LOG_LOCAL0
#define PG_LOG_IDENT "postgres"
#else
#define UseSyslog 0
@@ -56,7 +56,7 @@ static char *opt_names[] = {
"parserstats",
"plannerstats",
"executorstats",
- "shortlocks", /* currently unused but needed, see lock.c */
+ "shortlocks", /* currently unused but needed, see lock.c */
"locks",
"userlocks",
"spinlocks",
@@ -65,59 +65,65 @@ static char *opt_names[] = {
"palloc",
"lock_debug_oidmin",
"lock_debug_relid",
- "lock_read_priority", /* lock priority, see lock.c */
- "deadlock_timeout", /* deadlock timeout, see proc.c */
- "syslog", /* use syslog for error messages */
- "hostlookup", /* enable hostname lookup in ps_status */
- "showportnumber", /* show port number in ps_status */
- "notifyunlock", /* enable unlock of pg_listener after notify */
- "notifyhack" /* enable notify hack to remove duplicate tuples */
+ "lock_read_priority", /* lock priority, see lock.c */
+ "deadlock_timeout", /* deadlock timeout, see proc.c */
+ "syslog", /* use syslog for error messages */
+ "hostlookup", /* enable hostname lookup in ps_status */
+ "showportnumber", /* show port number in ps_status */
+ "notifyunlock", /* enable unlock of pg_listener after
+ * notify */
+ "notifyhack" /* enable notify hack to remove duplicate
+ * tuples */
};
/*
* Array of trace flags which can be set or reset independently.
*/
-int pg_options[NUM_PG_OPTIONS] = { 0 };
+int pg_options[NUM_PG_OPTIONS] = {0};
-static int openlog_done = 0;
+static int openlog_done = 0;
/*
* Print a timestamp and a message to stdout if the trace flag
* indexed by the flag value is set.
*/
int
-tprintf(int flag, const char *fmt, ... )
+tprintf(int flag, const char *fmt,...)
{
va_list ap;
- char line[ELOG_MAXLEN+TIMESTAMP_SIZE+1];
+ char line[ELOG_MAXLEN + TIMESTAMP_SIZE + 1];
#ifdef USE_SYSLOG
- int log_level;
+ int log_level;
+
#endif
- if ((flag == TRACE_ALL) || (pg_options[TRACE_ALL] > 0)) {
+ if ((flag == TRACE_ALL) || (pg_options[TRACE_ALL] > 0))
+ {
/* uconditional trace or trace all option set */
- } else if (pg_options[TRACE_ALL] == 0) {
- if ((flag < 0) || (flag >= NUM_PG_OPTIONS) || (!pg_options[flag])) {
+ }
+ else if (pg_options[TRACE_ALL] == 0)
+ {
+ if ((flag < 0) || (flag >= NUM_PG_OPTIONS) || (!pg_options[flag]))
return 0;
- }
- } else if (pg_options[TRACE_ALL] < 0) {
- return 0;
}
+ else if (pg_options[TRACE_ALL] < 0)
+ return 0;
va_start(ap, fmt);
#ifdef ELOG_TIMESTAMPS
strcpy(line, tprintf_timestamp());
#endif
- vsprintf(line+TIMESTAMP_SIZE, fmt, ap);
+ vsprintf(line + TIMESTAMP_SIZE, fmt, ap);
va_end(ap);
#ifdef USE_SYSLOG
log_level = ((flag == TRACE_ALL) ? LOG_INFO : LOG_DEBUG);
- write_syslog(log_level, line+TIMESTAMP_SIZE);
+ write_syslog(log_level, line + TIMESTAMP_SIZE);
#endif
- if (UseSyslog <= 1) {
+ if (UseSyslog <= 1)
+ {
puts(line);
fflush(stdout);
}
@@ -129,23 +135,24 @@ tprintf(int flag, const char *fmt, ... )
* Print a timestamp and a message to stderr.
*/
int
-eprintf(const char *fmt, ... )
+eprintf(const char *fmt,...)
{
va_list ap;
- char line[ELOG_MAXLEN+TIMESTAMP_SIZE+1];
+ char line[ELOG_MAXLEN + TIMESTAMP_SIZE + 1];
va_start(ap, fmt);
#ifdef ELOG_TIMESTAMPS
strcpy(line, tprintf_timestamp());
#endif
- vsprintf(line+TIMESTAMP_SIZE, fmt, ap);
+ vsprintf(line + TIMESTAMP_SIZE, fmt, ap);
va_end(ap);
#ifdef USE_SYSLOG
- write_syslog(LOG_ERR, line+TIMESTAMP_SIZE);
+ write_syslog(LOG_ERR, line + TIMESTAMP_SIZE);
#endif
- if (UseSyslog <= 1) {
+ if (UseSyslog <= 1)
+ {
fputs(line, stderr);
fputc('\n', stderr);
fflush(stderr);
@@ -161,14 +168,17 @@ eprintf(const char *fmt, ... )
void
write_syslog(int level, char *line)
{
- if (UseSyslog >= 1) {
- if (!openlog_done) {
+ if (UseSyslog >= 1)
+ {
+ if (!openlog_done)
+ {
openlog_done = 1;
- openlog(PG_LOG_IDENT, LOG_PID|LOG_NDELAY, PG_LOG_FACILITY);
+ openlog(PG_LOG_IDENT, LOG_PID | LOG_NDELAY, PG_LOG_FACILITY);
}
syslog(level, "%s", line);
}
}
+
#endif
#ifdef ELOG_TIMESTAMPS
@@ -178,10 +188,11 @@ write_syslog(int level, char *line)
char *
tprintf_timestamp()
{
- struct timeval tv;
- struct tm *time;
- time_t tm;
- static char timestamp[32], pid[8];
+ struct timeval tv;
+ struct tm *time;
+ time_t tm;
+ static char timestamp[32],
+ pid[8];
gettimeofday(&tv, DST_NONE);
tm = tv.tv_sec;
@@ -189,29 +200,28 @@ tprintf_timestamp()
sprintf(pid, "[%d]", MyProcPid);
sprintf(timestamp, "%02d%02d%02d.%02d:%02d:%02d.%03d %7s ",
- time->tm_year, time->tm_mon+1, time->tm_mday,
+ time->tm_year, time->tm_mon + 1, time->tm_mday,
time->tm_hour, time->tm_min, time->tm_sec,
- tv.tv_usec/1000, pid);
+ tv.tv_usec / 1000, pid);
return timestamp;
}
+
#endif
int
option_flag(int flag)
{
- if ((flag < 0) || (flag >= NUM_PG_OPTIONS)) {
+ if ((flag < 0) || (flag >= NUM_PG_OPTIONS))
return 0;
- }
return pg_options[flag];
}
int
set_option_flag(int flag, int value)
{
- if ((flag < 0) || (flag >= NUM_PG_OPTIONS)) {
+ if ((flag < 0) || (flag >= NUM_PG_OPTIONS))
return -1;
- }
pg_options[flag] = value;
return value;
@@ -220,26 +230,29 @@ set_option_flag(int flag, int value)
/*
* Parse an option string like "name,name+,name-,name=value".
* Single options are delimited by ',',space,tab,newline or cr.
- */
+ */
void
parse_options(char *str)
{
- char *s,
- *name;
- int i,
- len,
- val,
- is_comment;
-
- Assert((sizeof(opt_names)/sizeof(char*)) == NUM_PG_OPTIONS);
-
+ char *s,
+ *name;
+ int i,
+ len,
+ val,
+ is_comment;
+
+ Assert((sizeof(opt_names) / sizeof(char *)) == NUM_PG_OPTIONS);
+
str = strdup(str);
- for (s=str; *s;) {
+ for (s = str; *s;)
+ {
is_comment = 0;
name = s;
val = 1;
- for (; *s; s++) {
- switch (*s) {
+ for (; *s; s++)
+ {
+ switch (*s)
+ {
case '#':
is_comment = 1;
break;
@@ -265,26 +278,28 @@ parse_options(char *str)
goto setval;
}
}
- setval:
- for (; *s; s++) {
- if (*s == ',') {
+setval:
+ for (; *s; s++)
+ {
+ if (*s == ',')
+ {
*s++ = '\0';
break;
}
}
len = strlen(name);
- if (len == 0) {
+ if (len == 0)
continue;
- }
- for (i=0; i<NUM_PG_OPTIONS; i++) {
- if (strncmp(name, opt_names[i], len) == 0) {
+ for (i = 0; i < NUM_PG_OPTIONS; i++)
+ {
+ if (strncmp(name, opt_names[i], len) == 0)
+ {
pg_options[i] = val;
break;
}
}
- if (!is_comment && (i >= NUM_PG_OPTIONS)) {
+ if (!is_comment && (i >= NUM_PG_OPTIONS))
fprintf(stderr, "invalid option: %s\n", name);
- }
}
free(str);
}
@@ -299,20 +314,22 @@ read_pg_options(SIGNAL_ARGS)
int verbose;
char buffer[BUF_SIZE];
char c;
- char *s,
- *p;
+ char *s,
+ *p;
sprintf(buffer, "%s/%s", DataDir, "pg_options");
- if ((fd = open(buffer, O_RDONLY)) < 0) {
+ if ((fd = open(buffer, O_RDONLY)) < 0)
return;
- }
- if ((n = read(fd, buffer, BUF_SIZE-1)) > 0) {
+ if ((n = read(fd, buffer, BUF_SIZE - 1)) > 0)
+ {
/* collpse buffer in place removing comments and spaces */
- for (s=buffer,p=buffer,c='\0'; s<(buffer+n); ) {
- switch (*s) {
+ for (s = buffer, p = buffer, c = '\0'; s < (buffer + n);)
+ {
+ switch (*s)
+ {
case '#':
- while ((s < (buffer+n)) && (*s++ != '\n'));
+ while ((s < (buffer + n)) && (*s++ != '\n'));
break;
case ' ':
case '\t':
@@ -333,9 +350,8 @@ read_pg_options(SIGNAL_ARGS)
verbose = pg_options[TRACE_VERBOSE];
parse_options(buffer);
verbose |= pg_options[TRACE_VERBOSE];
- if (verbose || postgres_signal_arg == SIGHUP) {
+ if (verbose || postgres_signal_arg == SIGHUP)
tprintf(TRACE_ALL, "read_pg_options: %s", buffer);
- }
}
close(fd);
@@ -343,8 +359,8 @@ read_pg_options(SIGNAL_ARGS)
/*
* Local variables:
- * tab-width: 4
- * c-indent-level: 4
- * c-basic-offset: 4
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
* End:
*/
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index aa735d05b5..008c629e5c 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.10 1998/09/01 03:27:02 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.11 1998/09/01 04:33:34 momjian Exp $
*
* NOTE
* XXX This is a preliminary implementation which lacks fail-fast
@@ -26,8 +26,7 @@
#endif
static void AllocPointerDump(AllocPointer pointer);
-static int
-AllocSetIterate(AllocSet set,
+static int AllocSetIterate(AllocSet set,
void (*function) (AllocPointer pointer));
#undef AllocSetReset
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index d8ee25627b..46c3869785 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.9 1998/09/01 03:27:03 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.10 1998/09/01 04:33:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,8 +75,7 @@ MemoryContext CurrentMemoryContext = NULL;
static Pointer GlobalMemoryAlloc(GlobalMemory this, Size size);
static void GlobalMemoryFree(GlobalMemory this, Pointer pointer);
-static Pointer
-GlobalMemoryRealloc(GlobalMemory this, Pointer pointer,
+static Pointer GlobalMemoryRealloc(GlobalMemory this, Pointer pointer,
Size size);
static char *GlobalMemoryGetName(GlobalMemory this);
static void GlobalMemoryDump(GlobalMemory this);
diff --git a/src/backend/utils/mmgr/palloc.c b/src/backend/utils/mmgr/palloc.c
index 7a9aff1353..4862c92d96 100644
--- a/src/backend/utils/mmgr/palloc.c
+++ b/src/backend/utils/mmgr/palloc.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.7 1998/09/01 03:27:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/palloc.c,v 1.8 1998/09/01 04:33:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -67,7 +67,7 @@ palloc(Size size)
return malloc(size);
#else
return MemoryContextAlloc(CurrentMemoryContext, size);
-#endif /* PALLOC_IS_MALLOC */
+#endif /* PALLOC_IS_MALLOC */
}
void
@@ -77,7 +77,7 @@ pfree(void *pointer)
free(pointer);
#else
MemoryContextFree(CurrentMemoryContext, pointer);
-#endif /* PALLOC_IS_MALLOC */
+#endif /* PALLOC_IS_MALLOC */
}
/*
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c
index cad7cb4987..eb948123be 100644
--- a/src/backend/utils/mmgr/portalmem.c
+++ b/src/backend/utils/mmgr/portalmem.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.13 1998/09/01 03:27:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.14 1998/09/01 04:33:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -285,7 +285,7 @@ PortalHeapMemoryFree(PortalHeapMemory this,
pointer);
#ifdef ALLOCFREE_ERROR_ABORT
Assert(AllocSetContains(&block->setData, pointer));
-#endif /* ALLOCFREE_ERROR_ABORT */
+#endif /* ALLOCFREE_ERROR_ABORT */
}
}
diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c
index 1724ad2de5..dba296727d 100644
--- a/src/backend/utils/time/tqual.c
+++ b/src/backend/utils/time/tqual.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.18 1998/09/01 03:27:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.19 1998/09/01 04:33:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,7 +32,7 @@ extern bool PostgresIsInitialized;
#ifndef GOODAMI
TransactionId HeapSpecialTransactionId = InvalidTransactionId;
-CommandId HeapSpecialCommandId = FirstCommandId;
+CommandId HeapSpecialCommandId = FirstCommandId;
void
setheapoverride(bool on)
@@ -40,14 +40,14 @@ setheapoverride(bool on)
if (on)
{
TransactionIdStore(GetCurrentTransactionId(),
- &HeapSpecialTransactionId);
+ &HeapSpecialTransactionId);
HeapSpecialCommandId = GetCurrentCommandId();
}
else
HeapSpecialTransactionId = InvalidTransactionId;
}
-#endif /* !defined(GOODAMI) */
+#endif /* !defined(GOODAMI) */
/*
* XXX Transaction system override hacks end here
*/
@@ -196,7 +196,7 @@ HeapTupleSatisfiesNow(HeapTuple tuple)
if (TransactionIdIsCurrentTransactionId(tuple->t_xmin))
{
if (CommandIdGEScanCommandId(tuple->t_cmin))
- return false; /* inserted after scan started */
+ return false; /* inserted after scan started */
if (tuple->t_infomask & HEAP_XMAX_INVALID) /* xid invalid */
return true;
@@ -206,7 +206,7 @@ HeapTupleSatisfiesNow(HeapTuple tuple)
if (CommandIdGEScanCommandId(tuple->t_cmax))
return true; /* deleted after scan started */
else
- return false; /* deleted before scan started */
+ return false; /* deleted before scan started */
}
/*
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index 2797ce7661..62ba98793c 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.23 1998/09/01 03:27:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.24 1998/09/01 04:33:43 momjian Exp $
*
* Modifications - 6/12/96 - [email protected] - version 1.13.dhb.2
*
@@ -36,14 +36,12 @@
#include "pg_dump.h"
-static char **
-findParentsByOid(TableInfo *tbinfo, int numTables,
+static char **findParentsByOid(TableInfo *tbinfo, int numTables,
InhInfo *inhinfo, int numInherits,
const char *oid,
int *numParents);
static int findTableByOid(TableInfo *tbinfo, int numTables, const char *oid);
-static void
-flagInhAttrs(TableInfo *tbinfo, int numTables,
+static void flagInhAttrs(TableInfo *tbinfo, int numTables,
InhInfo *inhinfo, int numInherits);
static int strInArray(const char *pattern, char **arr, int arr_size);
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 5d29197c7b..d9c5ec1a00 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -21,7 +21,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.82 1998/09/01 03:27:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.83 1998/09/01 04:33:45 momjian Exp $
*
* Modifications - 6/10/96 - [email protected] - version 1.13.dhb
*
@@ -80,13 +80,11 @@
static void dumpSequence(FILE *fout, TableInfo tbinfo);
static void dumpACL(FILE *fout, TableInfo tbinfo);
-static void
-dumpTriggers(FILE *fout, const char *tablename,
+static void dumpTriggers(FILE *fout, const char *tablename,
TableInfo *tblinfo, int numTables);
static char *checkForQuote(const char *s);
static void clearTableInfo(TableInfo *, int);
-static void
-dumpOneFunc(FILE *fout, FuncInfo *finfo, int i,
+static void dumpOneFunc(FILE *fout, FuncInfo *finfo, int i,
TypeInfo *tinfo, int numTypes);
static int findLastBuiltinOid(void);
static bool isViewRule(char *relname);
@@ -130,7 +128,7 @@ usage(const char *progname)
fprintf(stderr,
"\t -d \t\t dump data as proper insert strings\n");
fprintf(stderr,
- "\t -D \t\t dump data as inserts with attribute names\n");
+ "\t -D \t\t dump data as inserts with attribute names\n");
fprintf(stderr,
"\t -f filename \t\t script output filename\n");
fprintf(stderr,
@@ -593,8 +591,8 @@ main(int argc, char **argv)
tablename = strdup(optarg);
for (i = 0; tablename[i]; i++)
- if (isascii((unsigned char)tablename[i]) &&
- isupper(tablename[i]))
+ if (isascii((unsigned char) tablename[i]) &&
+ isupper(tablename[i]))
tablename[i] = tolower(tablename[i]);
}
break;
@@ -2158,7 +2156,7 @@ dumpOprs(FILE *fout, OprInfo *oprinfo, int numOperators,
commutator,
negator,
restrictor,
- (strcmp(oprinfo[i].oprcanhash, "t") == 0) ? ", HASHES" : "",
+ (strcmp(oprinfo[i].oprcanhash, "t") == 0) ? ", HASHES" : "",
join,
sortop);
@@ -2287,11 +2285,11 @@ GetPrivledges(char *s)
{
char *acls = NULL;
- /* Grant All == arwR */
- /* INSERT == a */
- /* UPDATE/DELETE == w */
- /* SELECT == r */
- /* RULE == R */
+ /* Grant All == arwR */
+ /* INSERT == a */
+ /* UPDATE/DELETE == w */
+ /* SELECT == r */
+ /* RULE == R */
if (strstr(s, "arwR"))
return strdup("ALL");
@@ -2375,16 +2373,18 @@ ParseACL(const char *acls, int *count)
*count = NumAcls;
return ParsedAcl;
}
+
/*
* dumpACL:
- * Write out grant/revoke information
- * Called for sequences and tables
+ * Write out grant/revoke information
+ * Called for sequences and tables
*/
void
dumpACL(FILE *fout, TableInfo tbinfo)
{
- int k, l;
+ int k,
+ l;
ACL *ACLlist;
ACLlist = ParseACL(tbinfo.relacl, &l);
@@ -2508,13 +2508,13 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
}
else
{
- strcpy(id1, fmtId(tblinfo[i].attnames[j]));
- strcpy(id2, fmtId(tblinfo[i].typnames[j]));
+ strcpy(id1, fmtId(tblinfo[i].attnames[j]));
+ strcpy(id2, fmtId(tblinfo[i].typnames[j]));
sprintf(q, "%s%s%s %s",
q,
(actual_atts > 0) ? ", " : "",
- id1,
- id2);
+ id1,
+ id2);
actual_atts++;
}
if (tblinfo[i].adef_expr[j] != NULL)
@@ -2528,9 +2528,9 @@ dumpTables(FILE *fout, TableInfo *tblinfo, int numTables,
for (k = 0; k < tblinfo[i].ncheck; k++)
{
sprintf(q, "%s%s %s",
- q,
- (actual_atts + k > 0) ? ", " : "",
- tblinfo[i].check_expr[k]);
+ q,
+ (actual_atts + k > 0) ? ", " : "",
+ tblinfo[i].check_expr[k]);
}
strcat(q, ")");
@@ -2584,7 +2584,7 @@ dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
for (i = 0; i < numIndices; i++)
{
tableInd = findTableByName(tblinfo, numTables,
- (indinfo[i].indrelname));
+ (indinfo[i].indrelname));
if (strcmp(indinfo[i].indproc, "0") == 0)
funcname = NULL;
@@ -2987,11 +2987,12 @@ dumpTriggers(FILE *fout, const char *tablename,
* (to avoid the overhead of useless backend launches).
*/
-static void becomeUser(FILE *fout, const char *username)
+static void
+becomeUser(FILE *fout, const char *username)
{
static const char *lastusername = "";
- if (! aclsOption)
+ if (!aclsOption)
return;
if (strcmp(lastusername, username) == 0)
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h
index 03636d4501..28389a75a1 100644
--- a/src/bin/pg_dump/pg_dump.h
+++ b/src/bin/pg_dump/pg_dump.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_dump.h,v 1.31 1998/03/14 21:57:26 momjian Exp $
+ * $Id: pg_dump.h,v 1.32 1998/09/01 04:33:47 momjian Exp $
*
* Modifications - 6/12/96 - [email protected] - version 1.13.dhb.2
*
@@ -183,13 +183,11 @@ extern char g_opaque_type[10]; /* name for the opaque type */
* common utility functions
*/
-extern TableInfo *
-dumpSchema(FILE *fout,
+extern TableInfo *dumpSchema(FILE *fout,
int *numTablesPtr,
const char *tablename,
const bool acls);
-extern void
-dumpSchemaIdx(FILE *fout,
+extern void dumpSchemaIdx(FILE *fout,
const char *tablename,
TableInfo *tblinfo,
int numTables);
@@ -221,25 +219,19 @@ extern TableInfo *getTables(int *numTables, FuncInfo *finfo, int numFuncs);
extern InhInfo *getInherits(int *numInherits);
extern void getTableAttrs(TableInfo *tbinfo, int numTables);
extern IndInfo *getIndices(int *numIndices);
-extern void
-dumpTypes(FILE *fout, FuncInfo *finfo, int numFuncs,
+extern void dumpTypes(FILE *fout, FuncInfo *finfo, int numFuncs,
TypeInfo *tinfo, int numTypes);
-extern void
-dumpFuncs(FILE *fout, FuncInfo *finfo, int numFuncs,
+extern void dumpFuncs(FILE *fout, FuncInfo *finfo, int numFuncs,
TypeInfo *tinfo, int numTypes);
-extern void
-dumpAggs(FILE *fout, AggInfo *agginfo, int numAggregates,
+extern void dumpAggs(FILE *fout, AggInfo *agginfo, int numAggregates,
TypeInfo *tinfo, int numTypes);
-extern void
-dumpOprs(FILE *fout, OprInfo *agginfo, int numOperators,
+extern void dumpOprs(FILE *fout, OprInfo *agginfo, int numOperators,
TypeInfo *tinfo, int numTypes);
-extern void
-dumpTables(FILE *fout, TableInfo *tbinfo, int numTables,
+extern void dumpTables(FILE *fout, TableInfo *tbinfo, int numTables,
InhInfo *inhinfo, int numInherits,
TypeInfo *tinfo, int numTypes, const char *tablename,
const bool acls);
-extern void
-dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
+extern void dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
TableInfo *tbinfo, int numTables, const char *tablename);
extern const char *
diff --git a/src/bin/pg_encoding/pg_encoding.c b/src/bin/pg_encoding/pg_encoding.c
index 38a87a4f39..4ab8cb0255 100644
--- a/src/bin/pg_encoding/pg_encoding.c
+++ b/src/bin/pg_encoding/pg_encoding.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.1 1998/07/24 03:32:10 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_encoding/Attic/pg_encoding.c,v 1.2 1998/09/01 04:33:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,29 +21,32 @@ static void usage(void);
int
main(int argc, char **argv)
{
- char c;
- char *p;
- int rtn;
+ char c;
+ char *p;
+ int rtn;
- if (argc < 2) {
- usage();
- exit(1);
- }
- p = argv[1];
- while((c = *p++)) {
- if (c < '0' || c > '9') {
- rtn = pg_char_to_encoding(argv[1]);
- if (rtn >= 0) {
- printf("%d\n",rtn);
- }
- exit(0);
- }
- }
- printf("%s\n",pg_encoding_to_char(atoi(argv[1])));
- exit(0);
+ if (argc < 2)
+ {
+ usage();
+ exit(1);
+ }
+ p = argv[1];
+ while ((c = *p++))
+ {
+ if (c < '0' || c > '9')
+ {
+ rtn = pg_char_to_encoding(argv[1]);
+ if (rtn >= 0)
+ printf("%d\n", rtn);
+ exit(0);
+ }
+ }
+ printf("%s\n", pg_encoding_to_char(atoi(argv[1])));
+ exit(0);
}
-static void usage()
+static void
+usage()
{
- fprintf(stderr, "pg_encoding: encoding_name | encoding_number\n");
+ fprintf(stderr, "pg_encoding: encoding_name | encoding_number\n");
}
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index 715fb50a2c..ecb441fbc7 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.157 1998/08/29 04:05:39 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.158 1998/09/01 04:33:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -70,15 +70,18 @@
#define pclose(x) _pclose(x)
#define open(x,y,z) _open(x,y,z)
#define strcasecmp(x,y) stricmp(x,y)
-#define pqsignal(x,y)
+#define pqsignal(x,y)
#define MAXPATHLEN MAX_PATH
#define R_OK 0
/* getopt is not in the standard includes on Win32 */
extern char *optarg;
-extern int optind, opterr, optopt;
-int getopt (int, char * const [], const char *);
-char *__progname = "psql";
+extern int optind,
+ opterr,
+ optopt;
+int getopt(int, char *const[], const char *);
+char *__progname = "psql";
+
#endif
/* This prompt string is assumed to have at least 3 characters by code in MainLoop().
@@ -146,11 +149,9 @@ struct winsize
static void usage(char *progname);
static void slashUsage();
static bool handleCopyOut(PGresult *res, FILE *copystream);
-static bool
-handleCopyIn(PGresult *res, const bool mustprompt,
+static bool handleCopyIn(PGresult *res, const bool mustprompt,
FILE *copystream);
-static int
-tableList(PsqlSettings *pset, bool deep_tablelist,
+static int tableList(PsqlSettings *pset, bool deep_tablelist,
char info_type, bool system_tables);
static int tableDesc(PsqlSettings *pset, char *table, FILE *fout);
static int objectDescription(PsqlSettings *pset, char *object);
@@ -161,11 +162,10 @@ static char *gets_noreadline(char *prompt, FILE *source);
static char *gets_readline(char *prompt, FILE *source);
static char *gets_fromFile(char *prompt, FILE *source);
static int listAllDbs(PsqlSettings *pset);
-static void
-SendQuery(bool *success_p, PsqlSettings *pset, const char *query,
+static void SendQuery(bool *success_p, PsqlSettings *pset, const char *query,
const bool copy_in, const bool copy_out, FILE *copystream);
static int
-HandleSlashCmds(PsqlSettings *pset, char *line, char *query);
+ HandleSlashCmds(PsqlSettings *pset, char *line, char *query);
static int MainLoop(PsqlSettings *pset, char *query, FILE *source);
static FILE *setFout(PsqlSettings *pset, char *fname);
@@ -312,18 +312,18 @@ PSQLexec(PsqlSettings *pset, char *query)
* a cancel request to the backend.
* Note that sending the cancel directly from the signal handler
* is safe only because PQrequestCancel is carefully written to
- * make it so. We have to be very careful what else we do in the
+ * make it so. We have to be very careful what else we do in the
* signal handler.
* Writing on stderr is potentially dangerous, if the signal interrupted
- * some stdio operation on stderr. On Unix we can avoid trouble by using
+ * some stdio operation on stderr. On Unix we can avoid trouble by using
* write() instead; on Windows that's probably not workable, but we can
* at least avoid trusting printf by using the more primitive fputs.
*/
-static PGconn * cancelConn = NULL; /* connection to try cancel on */
+static PGconn *cancelConn = NULL; /* connection to try cancel on */
static void
-safe_write_stderr (const char * s)
+safe_write_stderr(const char *s)
{
#ifdef WIN32
fputs(s, stderr);
@@ -333,15 +333,13 @@ safe_write_stderr (const char * s)
}
static void
-handle_sigint (SIGNAL_ARGS)
+handle_sigint(SIGNAL_ARGS)
{
if (cancelConn == NULL)
exit(1); /* accept signal if no connection */
/* Try to send cancel request */
if (PQrequestCancel(cancelConn))
- {
safe_write_stderr("\nCANCEL request sent\n");
- }
else
{
safe_write_stderr("\nCannot send cancel request:\n");
@@ -627,7 +625,8 @@ int
tableDesc(PsqlSettings *pset, char *table, FILE *fout)
{
char descbuf[512];
- int nColumns, nIndices;
+ int nColumns,
+ nIndices;
char *rtype;
char *rnotnull;
char *rhasdef;
@@ -667,12 +666,12 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
else
{
#ifdef MULTIBYTE
- for (i = 0; table[i]; i += PQmblen(table+i))
+ for (i = 0; table[i]; i += PQmblen(table + i))
#else
for (i = 0; table[i]; i++)
#endif
- if (isascii((unsigned char)table[i]) &&
- isupper(table[i]))
+ if (isascii((unsigned char) table[i]) &&
+ isupper(table[i]))
table[i] = tolower(table[i]);
}
@@ -797,21 +796,22 @@ tableDesc(PsqlSettings *pset, char *table, FILE *fout)
nIndices = PQntuples(res);
if (nIndices > 0)
{
+
/*
* Display the information
*/
if (nIndices == 1)
fprintf(fout, "Index: ");
- else
+ else
fprintf(fout, "Indices: ");
-
+
/* next, print out the instances */
for (i = 0; i < PQntuples(res); i++)
- if (i == 0)
- fprintf(fout, "%s\n", PQgetvalue(res, i, 0));
- else
- fprintf(fout, " %s\n", PQgetvalue(res, i, 0));
+ if (i == 0)
+ fprintf(fout, "%s\n", PQgetvalue(res, i, 0));
+ else
+ fprintf(fout, " %s\n", PQgetvalue(res, i, 0));
}
PQclear(res);
}
@@ -844,7 +844,7 @@ objectDescription(PsqlSettings *pset, char *object)
PGresult *res;
int i;
bool success;
-
+
/* Build the query */
while (isspace(*object))
@@ -863,7 +863,7 @@ objectDescription(PsqlSettings *pset, char *object)
else
{
#ifdef MULTIBYTE
- for (i = 0; object[i]; i += PQmblen(object+i))
+ for (i = 0; object[i]; i += PQmblen(object + i))
#else
for (i = 0; object[i]; i++)
#endif
@@ -1139,7 +1139,7 @@ SendQuery(bool *success_p, PsqlSettings *pset, const char *query,
*success_p = handleCopyIn(results, false, copystream);
else
*success_p = handleCopyIn(results,
- !pset->quiet && !pset->notty,
+ !pset->quiet && !pset->notty,
stdin);
break;
case PGRES_NONFATAL_ERROR:
@@ -1437,8 +1437,9 @@ do_connect(const char *new_dbname,
else
userparam = PQuser(olddb);
- /* libpq doesn't provide an accessor function for the password,
- * so we cheat here.
+ /*
+ * libpq doesn't provide an accessor function for the password, so
+ * we cheat here.
*/
pwparam = olddb->pgpass;
@@ -1464,7 +1465,8 @@ do_connect(const char *new_dbname,
}
else
{
- cancelConn = pset->db; /* redirect sigint's loving attentions */
+ cancelConn = pset->db; /* redirect sigint's loving
+ * attentions */
PQfinish(olddb);
free(pset->prompt);
pset->prompt = malloc(strlen(PQdb(pset->db)) + 10);
@@ -1495,7 +1497,7 @@ do_edit(const char *filename_arg, char *query, int *status_p)
#ifndef WIN32
sprintf(tmp, "/tmp/psql.%ld.%ld", (long) geteuid(), (long) getpid());
#else
- GetTempFileName(".","psql",0,tmp);
+ GetTempFileName(".", "psql", 0, tmp);
#endif
fname = tmp;
unlink(tmp);
@@ -1770,7 +1772,7 @@ HandleSlashCmds(PsqlSettings *pset,
case 'c':
{
if (strncmp(cmd, "copy ", strlen("copy ")) == 0 ||
- strncmp(cmd, "copy ", strlen("copy ")) == 0)
+ strncmp(cmd, "copy ", strlen("copy ")) == 0)
do_copy(optarg2, pset);
else if (strcmp(cmd, "copy") == 0)
{
@@ -1820,9 +1822,10 @@ HandleSlashCmds(PsqlSettings *pset,
break;
case 'd': /* \d describe database information */
+
/*
- * if the optarg2 name is surrounded by double-quotes, then don't
- * convert case
+ * if the optarg2 name is surrounded by double-quotes, then
+ * don't convert case
*/
if (optarg2)
{
@@ -1834,9 +1837,10 @@ HandleSlashCmds(PsqlSettings *pset,
}
else
{
- int i;
+ int i;
+
#ifdef MULTIBYTE
- for (i = 0; optarg2[i]; i += PQmblen(optarg2+i))
+ for (i = 0; optarg2[i]; i += PQmblen(optarg2 + i))
#else
for (i = 0; optarg2[i]; i++)
#endif
@@ -1844,7 +1848,7 @@ HandleSlashCmds(PsqlSettings *pset,
optarg2[i] = tolower(optarg2[i]);
}
}
-
+
#ifdef TIOCGWINSZ
if (pset->notty == 0 &&
(ioctl(fileno(stdout), TIOCGWINSZ, &screen_size) == -1 ||
@@ -1859,7 +1863,7 @@ HandleSlashCmds(PsqlSettings *pset,
#endif
if (strncmp(cmd, "da", 2) == 0)
{
- char descbuf[4096];
+ char descbuf[4096];
/* aggregates */
descbuf[0] = '\0';
@@ -1870,9 +1874,9 @@ HandleSlashCmds(PsqlSettings *pset,
strcat(descbuf, "WHERE a.aggbasetype = t.oid ");
if (optarg2)
{
- strcat(descbuf, "AND a.aggname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
+ strcat(descbuf, "AND a.aggname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
}
strcat(descbuf, "UNION ");
strcat(descbuf, "SELECT a.aggname AS aggname, ");
@@ -1882,9 +1886,9 @@ HandleSlashCmds(PsqlSettings *pset,
strcat(descbuf, "WHERE a.aggbasetype = 0 ");
if (optarg2)
{
- strcat(descbuf, "AND a.aggname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
+ strcat(descbuf, "AND a.aggname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
}
strcat(descbuf, "ORDER BY aggname, type;");
SendQuery(&success, pset, descbuf, false, false, NULL);
@@ -1894,7 +1898,8 @@ HandleSlashCmds(PsqlSettings *pset,
objectDescription(pset, optarg + 1);
else if (strncmp(cmd, "df", 2) == 0)
{
- char descbuf[4096];
+ char descbuf[4096];
+
/* functions/procedures */
/*
@@ -1918,9 +1923,9 @@ HandleSlashCmds(PsqlSettings *pset,
strcat(descbuf, "(pronargs = 0 or oid8types(p.proargtypes) != '') ");
if (optarg2)
{
- strcat(descbuf, "AND p.proname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
+ strcat(descbuf, "AND p.proname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
}
strcat(descbuf, "ORDER BY result, function, arguments;");
SendQuery(&success, pset, descbuf, false, false, NULL);
@@ -1930,7 +1935,8 @@ HandleSlashCmds(PsqlSettings *pset,
tableList(pset, false, 'i', false);
else if (strncmp(cmd, "do", 2) == 0)
{
- char descbuf[4096];
+ char descbuf[4096];
+
/* operators */
descbuf[0] = '\0';
strcat(descbuf, "SELECT o.oprname AS op, ");
@@ -1951,9 +1957,9 @@ HandleSlashCmds(PsqlSettings *pset,
strcat(descbuf, " o.oprright = t2.oid ");
if (optarg2)
{
- strcat(descbuf, "AND o.oprname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
+ strcat(descbuf, "AND o.oprname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
}
strcat(descbuf, "UNION ");
strcat(descbuf, "SELECT o.oprname as op, ");
@@ -1971,9 +1977,9 @@ HandleSlashCmds(PsqlSettings *pset,
strcat(descbuf, " o.oprright = t1.oid ");
if (optarg2)
{
- strcat(descbuf, "AND o.oprname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
+ strcat(descbuf, "AND o.oprname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
}
strcat(descbuf, "UNION ");
strcat(descbuf, "SELECT o.oprname as op, ");
@@ -1991,9 +1997,9 @@ HandleSlashCmds(PsqlSettings *pset,
strcat(descbuf, " o.oprleft = t1.oid ");
if (optarg2)
{
- strcat(descbuf, "AND o.oprname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
+ strcat(descbuf, "AND o.oprname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
}
strcat(descbuf, "ORDER BY op, left_arg, right_arg, result;");
SendQuery(&success, pset, descbuf, false, false, NULL);
@@ -2008,24 +2014,24 @@ HandleSlashCmds(PsqlSettings *pset,
/* only tables */
tableList(pset, false, 't', false);
else if (strncmp(cmd, "dT", 2) == 0)
- {
- char descbuf[4096];
-
- /* types */
- descbuf[0] = '\0';
- strcat(descbuf, "SELECT typname AS type, ");
- strcat(descbuf, " obj_description(oid) as description ");
- strcat(descbuf, "FROM pg_type ");
- strcat(descbuf, "WHERE typrelid = 0 AND ");
- strcat(descbuf, " typname !~ '^_.*' ");
- strcat(descbuf, "ORDER BY type;");
- if (optarg2)
- {
- strcat(descbuf, "AND typname ~ '^");
- strcat(descbuf, optarg2);
- strcat(descbuf, "' ");
- }
- SendQuery(&success, pset, descbuf, false, false, NULL);
+ {
+ char descbuf[4096];
+
+ /* types */
+ descbuf[0] = '\0';
+ strcat(descbuf, "SELECT typname AS type, ");
+ strcat(descbuf, " obj_description(oid) as description ");
+ strcat(descbuf, "FROM pg_type ");
+ strcat(descbuf, "WHERE typrelid = 0 AND ");
+ strcat(descbuf, " typname !~ '^_.*' ");
+ strcat(descbuf, "ORDER BY type;");
+ if (optarg2)
+ {
+ strcat(descbuf, "AND typname ~ '^");
+ strcat(descbuf, optarg2);
+ strcat(descbuf, "' ");
+ }
+ SendQuery(&success, pset, descbuf, false, false, NULL);
}
else if (!optarg)
/* show tables, sequences and indices */
@@ -2101,9 +2107,9 @@ HandleSlashCmds(PsqlSettings *pset,
if (optarg && !*optarg && strlen(cmd) > 1)
{
int i;
-
+
/* line and cmd match until the first blank space */
- for (i=2; isspace(line[i]); i++)
+ for (i = 2; isspace(line[i]); i++)
;
fs = cmd + i - 1;
}
@@ -2291,15 +2297,15 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
int successResult = 1;
int slashCmdStatus = CMD_SEND;
- /*--------------------------------------------------------------
+ /*--------------------------------------------------------------
* slashCmdStatus can be:
- * CMD_UNKNOWN - send currently constructed query to backend
- * (i.e. we got a \g)
- * CMD_SEND - send currently constructed query to backend
+ * CMD_UNKNOWN - send currently constructed query to backend
+ * (i.e. we got a \g)
+ * CMD_SEND - send currently constructed query to backend
* (i.e. we got a \g)
- * CMD_SKIP_LINE - skip processing of this line, continue building
- * up query
- * CMD_TERMINATE - terminate processing of this query entirely
+ * CMD_SKIP_LINE - skip processing of this line, continue building
+ * up query
+ * CMD_TERMINATE - terminate processing of this query entirely
* CMD_NEWEDIT - new query supplied by edit
*---------------------------------------------------------------
*/
@@ -2311,7 +2317,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
/* We've reached the end of our command input. */
bool success;
- char in_quote; /* == 0 for no in_quote */
+ char in_quote; /* == 0 for no in_quote */
bool was_bslash; /* backslash */
int paren_level;
char *query_start;
@@ -2453,12 +2459,13 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
int i;
#ifdef MULTIBYTE
- int mblen = 1;
+ int mblen = 1;
+
#endif
was_bslash = false;
#ifdef MULTIBYTE
- for (i = 0; i < len; mblen=PQmblen(line+i), i+=mblen)
+ for (i = 0; i < len; mblen = PQmblen(line + i), i += mblen)
#else
for (i = 0; i < len; i++)
#endif
@@ -2486,8 +2493,8 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
}
if (querySent &&
- isascii((unsigned char)(line[i])) &&
- !isspace(line[i]))
+ isascii((unsigned char) (line[i])) &&
+ !isspace(line[i]))
{
query[0] = '\0';
querySent = false;
@@ -2682,14 +2689,16 @@ main(int argc, char **argv)
#ifdef WIN32
{
- WSADATA wsaData;
- if (WSAStartup(MAKEWORD(1,1),&wsaData)) {
- fprintf(stderr,"Failed to start winsock: %i\n",WSAGetLastError());
+ WSADATA wsaData;
+
+ if (WSAStartup(MAKEWORD(1, 1), &wsaData))
+ {
+ fprintf(stderr, "Failed to start winsock: %i\n", WSAGetLastError());
exit(1);
}
}
#endif
-
+
MemSet(&settings, 0, sizeof settings);
settings.opt.align = 1;
settings.opt.header = 1;
@@ -2704,7 +2713,7 @@ main(int argc, char **argv)
else
{
/* Interactive defaults */
- pqsignal(SIGINT, handle_sigint); /* control-C => cancel */
+ pqsignal(SIGINT, handle_sigint); /* control-C => cancel */
#ifdef USE_READLINE
settings.useReadline = 1;
#endif
@@ -2723,7 +2732,7 @@ main(int argc, char **argv)
settings.opt.align = 0;
break;
case 'a':
-#if 0 /* this no longer does anything */
+#if 0 /* this no longer does anything */
fe_setauthsvc(optarg, errbuf);
#endif
break;
@@ -2941,7 +2950,7 @@ handleCopyOut(PGresult *res, FILE *copystream)
}
}
fflush(copystream);
- return ! PQendcopy(res->conn);
+ return !PQendcopy(res->conn);
}
@@ -2997,7 +3006,7 @@ handleCopyIn(PGresult *res, const bool mustprompt, FILE *copystream)
}
PQputline(res->conn, "\n");
}
- return ! PQendcopy(res->conn);
+ return !PQendcopy(res->conn);
}
@@ -3047,7 +3056,7 @@ setFout(PsqlSettings *pset, char *fname)
static void
prompt_for_password(char *username, char *password)
{
- char buf[512];
+ char buf[512];
int length;
#ifdef HAVE_TERMIOS_H
diff --git a/src/bin/psql/psqlHelp.h b/src/bin/psql/psqlHelp.h
index b806064138..12b98a5ce6 100644
--- a/src/bin/psql/psqlHelp.h
+++ b/src/bin/psql/psqlHelp.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: psqlHelp.h,v 1.51 1998/08/28 03:36:31 momjian Exp $
+ * $Id: psqlHelp.h,v 1.52 1998/09/01 04:33:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,7 +20,7 @@ struct _helpStruct
static struct _helpStruct QL_HELP[] = {
{"abort transaction",
"abort the current transaction",
- "\
+ "\
\tabort [transaction|work];"},
{"alter table",
"add/rename attributes, rename tables",
diff --git a/src/bin/psql/stringutils.c b/src/bin/psql/stringutils.c
index 2b083ad227..2149028a42 100644
--- a/src/bin/psql/stringutils.c
+++ b/src/bin/psql/stringutils.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.14 1998/05/13 03:27:07 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/stringutils.c,v 1.15 1998/09/01 04:33:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,7 +56,8 @@ leftTrim(char *s)
char *
rightTrim(char *s)
{
- char *sEnd, *bsEnd;
+ char *sEnd,
+ *bsEnd;
bool in_bs = false;
sEnd = s + strlen(s) - 1;
diff --git a/src/bin/psql/stringutils.h b/src/bin/psql/stringutils.h
index 79669d3452..bdd3fa4641 100644
--- a/src/bin/psql/stringutils.h
+++ b/src/bin/psql/stringutils.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: stringutils.h,v 1.6 1997/09/08 02:33:46 momjian Exp $
+ * $Id: stringutils.h,v 1.7 1998/09/01 04:33:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,4 +42,4 @@ extern void testStringUtils();
#define NULL 0
#endif
-#endif /* STRINGUTILS_H */
+#endif /* STRINGUTILS_H */
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h
index eb1194f5f3..e85a160262 100644
--- a/src/include/access/attnum.h
+++ b/src/include/access/attnum.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: attnum.h,v 1.7 1998/06/15 18:39:52 momjian Exp $
+ * $Id: attnum.h,v 1.8 1998/09/01 04:34:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,4 +59,4 @@ typedef int16 AttrNumber;
#define AttrOffsetGetAttrNumber(attributeOffset) \
((AttrNumber) (1 + attributeOffset))
-#endif /* ATTNUM_H */
+#endif /* ATTNUM_H */
diff --git a/src/include/access/funcindex.h b/src/include/access/funcindex.h
index a996bb4738..d30dcc704f 100644
--- a/src/include/access/funcindex.h
+++ b/src/include/access/funcindex.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: funcindex.h,v 1.5 1997/09/08 21:50:31 momjian Exp $
+ * $Id: funcindex.h,v 1.6 1998/09/01 04:34:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,4 +39,4 @@ typedef FuncIndexInfo *FuncIndexInfoPtr;
#define FIisFunctionalIndex(FINFO) (FINFO->procOid != InvalidOid)
-#endif /* FUNCINDEX_H */
+#endif /* FUNCINDEX_H */
diff --git a/src/include/access/genam.h b/src/include/access/genam.h
index 7885d1cd0d..647d2d7ff8 100644
--- a/src/include/access/genam.h
+++ b/src/include/access/genam.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: genam.h,v 1.15 1998/09/01 03:27:29 momjian Exp $
+ * $Id: genam.h,v 1.16 1998/09/01 04:34:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,35 +25,29 @@
extern Relation index_open(Oid relationId);
extern Relation index_openr(char *relationName);
extern void index_close(Relation relation);
-extern InsertIndexResult
-index_insert(Relation relation,
+extern InsertIndexResult index_insert(Relation relation,
Datum *datum, char *nulls,
ItemPointer heap_t_ctid,
Relation heapRel);
extern void index_delete(Relation relation, ItemPointer indexItem);
-extern IndexScanDesc
-index_beginscan(Relation relation, bool scanFromEnd,
+extern IndexScanDesc index_beginscan(Relation relation, bool scanFromEnd,
uint16 numberOfKeys, ScanKey key);
extern void index_rescan(IndexScanDesc scan, bool scanFromEnd, ScanKey key);
extern void index_endscan(IndexScanDesc scan);
extern void index_markpos(IndexScanDesc scan);
extern void index_restrpos(IndexScanDesc scan);
-extern RetrieveIndexResult
-index_getnext(IndexScanDesc scan,
+extern RetrieveIndexResult index_getnext(IndexScanDesc scan,
ScanDirection direction);
-extern RegProcedure
-index_getprocid(Relation irel, AttrNumber attnum,
+extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum,
uint16 procnum);
-extern Datum
-GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc,
+extern Datum GetIndexValue(HeapTuple tuple, TupleDesc hTupDesc,
int attOff, AttrNumber *attrNums, FuncIndexInfo *fInfo,
bool *attNull);
/* in genam.c */
-extern IndexScanDesc
-RelationGetIndexScan(Relation relation, bool scanFromEnd,
+extern IndexScanDesc RelationGetIndexScan(Relation relation, bool scanFromEnd,
uint16 numberOfKeys, ScanKey key);
extern void IndexScanMarkPosition(IndexScanDesc scan);
extern void IndexScanRestorePosition(IndexScanDesc scan);
-#endif /* GENAM_H */
+#endif /* GENAM_H */
diff --git a/src/include/access/gist.h b/src/include/access/gist.h
index 15294ce06c..8bcf24ae7f 100644
--- a/src/include/access/gist.h
+++ b/src/include/access/gist.h
@@ -188,25 +188,22 @@ typedef struct intrange
int flag;
} INTRANGE;
-extern void
-gistbuild(Relation heap,
+extern void gistbuild(Relation heap,
Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat,
uint16 pint, Datum *params,
FuncIndexInfo *finfo,
PredInfo *predInfo);
-extern InsertIndexResult
-gistinsert(Relation r, Datum *datum,
+extern InsertIndexResult gistinsert(Relation r, Datum *datum,
char *nulls, ItemPointer ht_ctid, Relation heapRel);
extern void _gistdump(Relation r);
extern void gistfreestack(GISTSTACK *s);
extern void initGISTstate(GISTSTATE *giststate, Relation index);
-extern void
-gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
+extern void gistdentryinit(GISTSTATE *giststate, GISTENTRY *e, char *pr,
Relation r, Page pg, OffsetNumber o, int b, bool l);
extern StrategyNumber RelationGetGISTStrategy(Relation, AttrNumber, RegProcedure);
/* gistget.c */
extern RetrieveIndexResult gistgettuple(IndexScanDesc s, ScanDirection dir);
-#endif /* GIST_H */
+#endif /* GIST_H */
diff --git a/src/include/access/gistscan.h b/src/include/access/gistscan.h
index 071238bd17..553705f139 100644
--- a/src/include/access/gistscan.h
+++ b/src/include/access/gistscan.h
@@ -16,8 +16,7 @@
#include <storage/block.h>
#include <utils/rel.h>
-extern IndexScanDesc
-gistbeginscan(Relation r, bool fromEnd,
+extern IndexScanDesc gistbeginscan(Relation r, bool fromEnd,
uint16 nkeys, ScanKey key);
extern void gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
extern void gistmarkpos(IndexScanDesc s);
@@ -25,4 +24,4 @@ extern void gistrestrpos(IndexScanDesc s);
extern void gistendscan(IndexScanDesc s);
extern void gistadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
-#endif /* GISTSCAN_H */
+#endif /* GISTSCAN_H */
diff --git a/src/include/access/giststrat.h b/src/include/access/giststrat.h
index 1007dd3ec2..9fb0a10da6 100644
--- a/src/include/access/giststrat.h
+++ b/src/include/access/giststrat.h
@@ -15,8 +15,7 @@
#include <access/strat.h>
#include <utils/rel.h>
-extern StrategyNumber
-RelationGetGISTStrategy(Relation r,
+extern StrategyNumber RelationGetGISTStrategy(Relation r,
AttrNumber attnum, RegProcedure proc);
-#endif /* GISTSTRAT_H */
+#endif /* GISTSTRAT_H */
diff --git a/src/include/access/hash.h b/src/include/access/hash.h
index bbc34dbb81..fe49bad037 100644
--- a/src/include/access/hash.h
+++ b/src/include/access/hash.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hash.h,v 1.18 1998/09/01 03:27:31 momjian Exp $
+ * $Id: hash.h,v 1.19 1998/09/01 04:34:11 momjian Exp $
*
* NOTES
* modeled after Margo Seltzer's hash implementation for unix.
@@ -248,16 +248,13 @@ typedef HashItemData *HashItem;
/* public routines */
-extern void
-hashbuild(Relation heap, Relation index, int natts,
+extern void hashbuild(Relation heap, Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
-extern InsertIndexResult
-hashinsert(Relation rel, Datum *datum, char *nulls,
+extern InsertIndexResult hashinsert(Relation rel, Datum *datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *hashgettuple(IndexScanDesc scan, ScanDirection dir);
-extern char *
-hashbeginscan(Relation rel, bool fromEnd, uint16 keysz,
+extern char *hashbeginscan(Relation rel, bool fromEnd, uint16 keysz,
ScanKey scankey);
extern void hashrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey);
extern void hashendscan(IndexScanDesc scan);
@@ -285,11 +282,9 @@ extern InsertIndexResult _hash_doinsert(Relation rel, HashItem hitem);
/* hashovfl.c */
extern Buffer _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf);
extern Buffer _hash_freeovflpage(Relation rel, Buffer ovflbuf);
-extern int32
-_hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum,
+extern int32 _hash_initbitmap(Relation rel, HashMetaPage metap, int32 pnum,
int32 nbits, int32 ndx);
-extern void
-_hash_squeezebucket(Relation rel, HashMetaPage metap,
+extern void _hash_squeezebucket(Relation rel, HashMetaPage metap,
Bucket bucket);
@@ -299,8 +294,7 @@ extern Buffer _hash_getbuf(Relation rel, BlockNumber blkno, int access);
extern void _hash_relbuf(Relation rel, Buffer buf, int access);
extern void _hash_wrtbuf(Relation rel, Buffer buf);
extern void _hash_wrtnorelbuf(Relation rel, Buffer buf);
-extern Page
-_hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access,
+extern Page _hash_chgbufaccess(Relation rel, Buffer *bufp, int from_access,
int to_access);
extern void _hash_pageinit(Page page, Size size);
extern void _hash_pagedel(Relation rel, ItemPointer tid);
@@ -314,19 +308,16 @@ extern void _hash_adjscans(Relation rel, ItemPointer tid);
/* hashsearch.c */
-extern void
-_hash_search(Relation rel, int keysz, ScanKey scankey,
+extern void _hash_search(Relation rel, int keysz, ScanKey scankey,
Buffer *bufP, HashMetaPage metap);
extern RetrieveIndexResult _hash_next(IndexScanDesc scan, ScanDirection dir);
extern RetrieveIndexResult _hash_first(IndexScanDesc scan, ScanDirection dir);
-extern bool
-_hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir,
+extern bool _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir,
Buffer metabuf);
/* hashutil.c */
-extern ScanKey
-_hash_mkscankey(Relation rel, IndexTuple itup,
+extern ScanKey _hash_mkscankey(Relation rel, IndexTuple itup,
HashMetaPage metap);
extern void _hash_freeskey(ScanKey skey);
extern bool _hash_checkqual(IndexScanDesc scan, IndexTuple itup);
@@ -335,4 +326,4 @@ extern Bucket _hash_call(Relation rel, HashMetaPage metap, Datum key);
extern uint32 _hash_log2(uint32 num);
extern void _hash_checkpage(Page page, int flags);
-#endif /* HASH_H */
+#endif /* HASH_H */
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index f8e05b60cf..ecaed32c9f 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.36 1998/09/01 03:27:32 momjian Exp $
+ * $Id: heapam.h,v 1.37 1998/09/01 04:34:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -127,53 +127,54 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
) \
)
-#else /* !defined(DISABLE_COMPLEX_MACRO) */
+#else /* !defined(DISABLE_COMPLEX_MACRO) */
extern Datum nocachegetattr(HeapTuple tup, int attnum,
- TupleDesc att, bool *isnull);
+ TupleDesc att, bool *isnull);
-static Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
- bool *isnull)
+static Datum
+fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+ bool *isnull)
{
- return (
- (attnum) > 0 ?
- (
- ((isnull) ? (*(isnull) = false) : (dummyret)NULL),
- HeapTupleNoNulls(tup) ?
+ return (
+ (attnum) > 0 ?
(
- ((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 ||
- (attnum) == 1) ?
- (
- (Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),
- (char *) (tup) + (tup)->t_hoff +
- (
- ((attnum) != 1) ?
- (tupleDesc)->attrs[(attnum)-1]->attcacheoff
- :
- 0
- )
- )
- )
- :
- nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
- )
+ ((isnull) ? (*(isnull) = false) : (dummyret) NULL),
+ HeapTupleNoNulls(tup) ?
+ (
+ ((tupleDesc)->attrs[(attnum) - 1]->attcacheoff != -1 ||
+ (attnum) == 1) ?
+ (
+ (Datum) fetchatt(&((tupleDesc)->attrs[(attnum) - 1]),
+ (char *) (tup) + (tup)->t_hoff +
+ (
+ ((attnum) != 1) ?
+ (tupleDesc)->attrs[(attnum) - 1]->attcacheoff
+ :
+ 0
+ )
+ )
+ )
+ :
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ :
+ (
+ att_isnull((attnum) - 1, (tup)->t_bits) ?
+ (
+ ((isnull) ? (*(isnull) = true) : (dummyret) NULL),
+ (Datum) NULL
+ )
+ :
+ (
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ )
+ )
:
(
- att_isnull((attnum)-1, (tup)->t_bits) ?
- (
- ((isnull) ? (*(isnull) = true) : (dummyret)NULL),
- (Datum)NULL
- )
- :
- (
- nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
- )
- )
- )
- :
- (
- (Datum)NULL
- )
+ (Datum) NULL
+ )
);
}
@@ -246,8 +247,7 @@ extern void doinsert(Relation relation, HeapTuple tup);
extern Relation heap_open(Oid relationId);
extern Relation heap_openr(char *relationName);
extern void heap_close(Relation relation);
-extern HeapScanDesc
-heap_beginscan(Relation relation, int atend,
+extern HeapScanDesc heap_beginscan(Relation relation, int atend,
Snapshot snapshot, unsigned nkeys, ScanKey key);
extern void heap_rescan(HeapScanDesc scan, bool scanFromEnd, ScanKey key);
extern void heap_endscan(HeapScanDesc scan);
@@ -255,31 +255,26 @@ extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw);
extern HeapTuple heap_fetch(Relation relation, Snapshot snapshot, ItemPointer tid, Buffer *userbuf);
extern Oid heap_insert(Relation relation, HeapTuple tup);
extern int heap_delete(Relation relation, ItemPointer tid);
-extern int
-heap_replace(Relation relation, ItemPointer otid,
+extern int heap_replace(Relation relation, ItemPointer otid,
HeapTuple tup);
extern void heap_markpos(HeapScanDesc scan);
extern void heap_restrpos(HeapScanDesc scan);
/* in common/heaptuple.c */
extern Size ComputeDataSize(TupleDesc tupleDesc, Datum *value, char *nulls);
-extern void
-DataFill(char *data, TupleDesc tupleDesc,
+extern void DataFill(char *data, TupleDesc tupleDesc,
Datum *value, char *nulls, uint16 *infomask,
bits8 *bit);
extern int heap_attisnull(HeapTuple tup, int attnum);
extern int heap_sysattrlen(AttrNumber attno);
extern bool heap_sysattrbyval(AttrNumber attno);
extern Datum heap_getsysattr(HeapTuple tup, Buffer b, int attnum);
-extern Datum
-nocachegetattr(HeapTuple tup, int attnum,
+extern Datum nocachegetattr(HeapTuple tup, int attnum,
TupleDesc att, bool *isnull);
extern HeapTuple heap_copytuple(HeapTuple tuple);
-extern HeapTuple
-heap_formtuple(TupleDesc tupleDescriptor,
+extern HeapTuple heap_formtuple(TupleDesc tupleDescriptor,
Datum *value, char *nulls);
-extern HeapTuple
-heap_modifytuple(HeapTuple tuple,
+extern HeapTuple heap_modifytuple(HeapTuple tuple,
Relation relation, Datum *replValue, char *replNull, char *repl);
HeapTuple heap_addheader(uint32 natts, int structlen, char *structure);
@@ -288,9 +283,8 @@ extern void PrintHeapAccessStatistics(HeapAccessStatistics stats);
extern void initam(void);
/* hio.c */
-extern void
-RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
+extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
HeapTuple tuple);
extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
-#endif /* HEAPAM_H */
+#endif /* HEAPAM_H */
diff --git a/src/include/access/hio.h b/src/include/access/hio.h
index 5b38a42d63..caa5380083 100644
--- a/src/include/access/hio.h
+++ b/src/include/access/hio.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hio.h,v 1.7 1998/02/26 04:40:11 momjian Exp $
+ * $Id: hio.h,v 1.8 1998/09/01 04:34:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,9 +17,8 @@
#include <utils/rel.h>
-extern void
-RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
+extern void RelationPutHeapTuple(Relation relation, BlockNumber blockIndex,
HeapTuple tuple);
extern void RelationPutHeapTupleAtEnd(Relation relation, HeapTuple tuple);
-#endif /* HIO_H */
+#endif /* HIO_H */
diff --git a/src/include/access/htup.h b/src/include/access/htup.h
index 2479fe9d4b..703b032cdd 100644
--- a/src/include/access/htup.h
+++ b/src/include/access/htup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: htup.h,v 1.9 1998/02/26 04:40:14 momjian Exp $
+ * $Id: htup.h,v 1.10 1998/09/01 04:34:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,4 +106,4 @@ extern long heap_sysoffset[];
#define HeapTupleAllFixed(tuple) \
(!(((HeapTuple) (tuple))->t_infomask & HEAP_HASVARLENA))
-#endif /* HTUP_H */
+#endif /* HTUP_H */
diff --git a/src/include/access/ibit.h b/src/include/access/ibit.h
index 5e96f79505..f03ef639bf 100644
--- a/src/include/access/ibit.h
+++ b/src/include/access/ibit.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ibit.h,v 1.7 1997/09/08 21:50:47 momjian Exp $
+ * $Id: ibit.h,v 1.8 1998/09/01 04:34:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,4 +31,4 @@ typedef IndexAttributeBitMapData *IndexAttributeBitMap;
*/
#define IndexAttributeBitMapIsValid(bits) PointerIsValid(bits)
-#endif /* IBIT_H */
+#endif /* IBIT_H */
diff --git a/src/include/access/iqual.h b/src/include/access/iqual.h
index 977045f0dc..dbab405282 100644
--- a/src/include/access/iqual.h
+++ b/src/include/access/iqual.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: iqual.h,v 1.9 1998/02/26 04:40:17 momjian Exp $
+ * $Id: iqual.h,v 1.10 1998/09/01 04:34:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,8 +24,7 @@
extern int NIndexTupleProcessed;
-extern bool
-index_keytest(IndexTuple tuple, TupleDesc tupdesc,
+extern bool index_keytest(IndexTuple tuple, TupleDesc tupdesc,
int scanKeySize, ScanKey key);
-#endif /* IQUAL_H */
+#endif /* IQUAL_H */
diff --git a/src/include/access/istrat.h b/src/include/access/istrat.h
index f1d202a778..2a35556fe4 100644
--- a/src/include/access/istrat.h
+++ b/src/include/access/istrat.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: istrat.h,v 1.10 1998/02/26 04:40:19 momjian Exp $
+ * $Id: istrat.h,v 1.11 1998/09/01 04:34:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -47,26 +47,21 @@
*/
#define IndexStrategyIsValid(s) PointerIsValid(s)
-extern StrategyMap
-IndexStrategyGetStrategyMap(IndexStrategy indexStrategy,
+extern StrategyMap IndexStrategyGetStrategyMap(IndexStrategy indexStrategy,
StrategyNumber maxStrategyNum, AttrNumber attrNum);
-extern Size
-AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
+extern Size AttributeNumberGetIndexStrategySize(AttrNumber maxAttributeNumber,
StrategyNumber maxStrategyNumber);
-extern StrategyNumber
-RelationGetStrategy(Relation relation,
+extern StrategyNumber RelationGetStrategy(Relation relation,
AttrNumber attributeNumber, StrategyEvaluation evaluation,
RegProcedure procedure);
-extern bool
-RelationInvokeStrategy(Relation relation,
+extern bool RelationInvokeStrategy(Relation relation,
StrategyEvaluation evaluation, AttrNumber attributeNumber,
StrategyNumber strategy, Datum left, Datum right);
-extern void
-IndexSupportInitialize(IndexStrategy indexStrategy,
+extern void IndexSupportInitialize(IndexStrategy indexStrategy,
RegProcedure *indexSupport, Oid indexObjectId,
Oid accessMethodObjectId, StrategyNumber maxStrategyNumber,
StrategyNumber maxSupportNumber, AttrNumber maxAttributeNumber);
-#endif /* ISTRAT_H */
+#endif /* ISTRAT_H */
diff --git a/src/include/access/itup.h b/src/include/access/itup.h
index 9b02b6a937..07560fffdb 100644
--- a/src/include/access/itup.h
+++ b/src/include/access/itup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itup.h,v 1.15 1998/09/01 03:27:34 momjian Exp $
+ * $Id: itup.h,v 1.16 1998/09/01 04:34:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -160,16 +160,13 @@ typedef struct PredInfo
/* indextuple.h */
-extern IndexTuple
-index_formtuple(TupleDesc tupleDescriptor,
+extern IndexTuple index_formtuple(TupleDesc tupleDescriptor,
Datum *value, char *null);
-extern Datum
-nocache_index_getattr(IndexTuple tup, int attnum,
+extern Datum nocache_index_getattr(IndexTuple tup, int attnum,
TupleDesc tupleDesc, bool *isnull);
-extern RetrieveIndexResult
-FormRetrieveIndexResult(ItemPointer indexItemPointer,
+extern RetrieveIndexResult FormRetrieveIndexResult(ItemPointer indexItemPointer,
ItemPointer heapItemPointer);
extern void CopyIndexTuple(IndexTuple source, IndexTuple *target);
-#endif /* ITUP_H */
+#endif /* ITUP_H */
diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 5e3d03af3b..848b28164c 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nbtree.h,v 1.21 1998/07/30 05:05:05 vadim Exp $
+ * $Id: nbtree.h,v 1.22 1998/09/01 04:34:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -73,15 +73,15 @@ typedef BTPageOpaqueData *BTPageOpaque;
typedef struct BTScanOpaqueData
{
- Buffer btso_curbuf;
- Buffer btso_mrkbuf;
- ItemPointerData curHeapIptr;
- ItemPointerData mrkHeapIptr;
- uint16 qual_ok; /* 0 for quals like key == 1 && key > 2 */
- uint16 numberOfKeys; /* number of keys */
- uint16 numberOfFirstKeys; /* number of keys for 1st
- * attribute */
- ScanKey keyData; /* key descriptor */
+ Buffer btso_curbuf;
+ Buffer btso_mrkbuf;
+ ItemPointerData curHeapIptr;
+ ItemPointerData mrkHeapIptr;
+ uint16 qual_ok; /* 0 for quals like key == 1 && key > 2 */
+ uint16 numberOfKeys; /* number of keys */
+ uint16 numberOfFirstKeys; /* number of keys for 1st
+ * attribute */
+ ScanKey keyData; /* key descriptor */
} BTScanOpaqueData;
typedef BTScanOpaqueData *BTScanOpaque;
@@ -221,13 +221,11 @@ typedef struct BTPageState
/*
* prototypes for functions in nbtinsert.c
*/
-extern InsertIndexResult
-_bt_doinsert(Relation rel, BTItem btitem,
+extern InsertIndexResult _bt_doinsert(Relation rel, BTItem btitem,
bool index_is_unique, Relation heapRel);
/* default is to allow duplicates */
-extern bool
-_bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2,
+extern bool _bt_itemcmp(Relation rel, Size keysz, BTItem item1, BTItem item2,
StrategyNumber strat);
/*
@@ -249,16 +247,13 @@ extern void _bt_pagedel(Relation rel, ItemPointer tid);
*/
extern bool BuildingBtree; /* in nbtree.c */
-extern void
-btbuild(Relation heap, Relation index, int natts,
+extern void btbuild(Relation heap, Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
-extern InsertIndexResult
-btinsert(Relation rel, Datum *datum, char *nulls,
+extern InsertIndexResult btinsert(Relation rel, Datum *datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *btgettuple(IndexScanDesc scan, ScanDirection dir);
-extern char *
-btbeginscan(Relation rel, bool fromEnd, uint16 keysz,
+extern char *btbeginscan(Relation rel, bool fromEnd, uint16 keysz,
ScanKey scankey);
extern void btrescan(IndexScanDesc scan, bool fromEnd, ScanKey scankey);
@@ -278,17 +273,13 @@ extern void _bt_adjscans(Relation rel, ItemPointer tid, int op);
/*
* prototypes for functions in nbtsearch.c
*/
-extern BTStack
-_bt_search(Relation rel, int keysz, ScanKey scankey,
+extern BTStack _bt_search(Relation rel, int keysz, ScanKey scankey,
Buffer *bufP);
-extern Buffer
-_bt_moveright(Relation rel, Buffer buf, int keysz,
+extern Buffer _bt_moveright(Relation rel, Buffer buf, int keysz,
ScanKey scankey, int access);
-extern bool
-_bt_skeycmp(Relation rel, Size keysz, ScanKey scankey,
+extern bool _bt_skeycmp(Relation rel, Size keysz, ScanKey scankey,
Page page, ItemId itemid, StrategyNumber strat);
-extern OffsetNumber
-_bt_binsrch(Relation rel, Buffer buf, int keysz,
+extern OffsetNumber _bt_binsrch(Relation rel, Buffer buf, int keysz,
ScanKey scankey, int srchtype);
extern RetrieveIndexResult _bt_next(IndexScanDesc scan, ScanDirection dir);
extern RetrieveIndexResult _bt_first(IndexScanDesc scan, ScanDirection dir);
@@ -297,11 +288,9 @@ extern bool _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir);
/*
* prototypes for functions in nbtstrat.c
*/
-extern StrategyNumber
-_bt_getstrat(Relation rel, AttrNumber attno,
+extern StrategyNumber _bt_getstrat(Relation rel, AttrNumber attno,
RegProcedure proc);
-extern bool
-_bt_invokestrat(Relation rel, AttrNumber attno,
+extern bool _bt_invokestrat(Relation rel, AttrNumber attno,
StrategyNumber strat, Datum left, Datum right);
/*
@@ -322,4 +311,4 @@ extern void _bt_spooldestroy(void *spool);
extern void _bt_spool(Relation index, BTItem btitem, void *spool);
extern void _bt_leafbuild(Relation index, void *spool);
-#endif /* NBTREE_H */
+#endif /* NBTREE_H */
diff --git a/src/include/access/printtup.h b/src/include/access/printtup.h
index a86a4596d6..4b7aa7c2dd 100644
--- a/src/include/access/printtup.h
+++ b/src/include/access/printtup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: printtup.h,v 1.4 1997/09/08 02:34:19 momjian Exp $
+ * $Id: printtup.h,v 1.5 1998/09/01 04:34:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern void debugtup(HeapTuple tuple, TupleDesc typeinfo);
extern void printtup_internal(HeapTuple tuple, TupleDesc typeinfo);
extern Oid gettypelem(Oid type);
-#endif /* PRINTTUP_H */
+#endif /* PRINTTUP_H */
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h
index efb970b44b..c16b022bf2 100644
--- a/src/include/access/relscan.h
+++ b/src/include/access/relscan.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relscan.h,v 1.11 1998/07/27 19:38:29 vadim Exp $
+ * $Id: relscan.h,v 1.12 1998/09/01 04:34:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -80,4 +80,4 @@ typedef IndexScanDesc *IndexScanDescPtr;
*/
#define IndexScanIsValid(scan) PointerIsValid(scan)
-#endif /* RELSCAN_H */
+#endif /* RELSCAN_H */
diff --git a/src/include/access/rtree.h b/src/include/access/rtree.h
index ea45c08c11..a31f2c2d64 100644
--- a/src/include/access/rtree.h
+++ b/src/include/access/rtree.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtree.h,v 1.12 1998/02/26 04:40:25 momjian Exp $
+ * $Id: rtree.h,v 1.13 1998/09/01 04:34:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -114,34 +114,29 @@ extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
* RTree code.
* Defined in access/index-rtree/
*/
-extern InsertIndexResult
-rtinsert(Relation r, Datum *datum, char *nulls,
+extern InsertIndexResult rtinsert(Relation r, Datum *datum, char *nulls,
ItemPointer ht_ctid, Relation heapRel);
extern char *rtdelete(Relation r, ItemPointer tid);
extern RetrieveIndexResult rtgettuple(IndexScanDesc s, ScanDirection dir);
-extern IndexScanDesc
-rtbeginscan(Relation r, bool fromEnd, uint16 nkeys,
+extern IndexScanDesc rtbeginscan(Relation r, bool fromEnd, uint16 nkeys,
ScanKey key);
extern void rtendscan(IndexScanDesc s);
extern void rtmarkpos(IndexScanDesc s);
extern void rtrestrpos(IndexScanDesc s);
extern void rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key);
-extern void
-rtbuild(Relation heap, Relation index, int natts,
+extern void rtbuild(Relation heap, Relation index, int natts,
AttrNumber *attnum, IndexStrategy istrat, uint16 pcount,
Datum *params, FuncIndexInfo *finfo, PredInfo *predInfo);
extern void _rtdump(Relation r);
/* rtscan.c */
-extern void
-rtadjscans(Relation r, int op, BlockNumber blkno,
+extern void rtadjscans(Relation r, int op, BlockNumber blkno,
OffsetNumber offnum);
/* rtstrat.h */
-extern RegProcedure
-RTMapOperator(Relation r, AttrNumber attnum,
+extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum,
RegProcedure proc);
-#endif /* RTREE_H */
+#endif /* RTREE_H */
diff --git a/src/include/access/rtscan.h b/src/include/access/rtscan.h
index f3b450023a..067c8374b0 100644
--- a/src/include/access/rtscan.h
+++ b/src/include/access/rtscan.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtscan.h,v 1.4 1997/11/26 01:12:06 momjian Exp $
+ * $Id: rtscan.h,v 1.5 1998/09/01 04:34:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,4 +19,4 @@
void rtadjscans(Relation r, int op, BlockNumber blkno, OffsetNumber offnum);
-#endif /* RTSCAN_H */
+#endif /* RTSCAN_H */
diff --git a/src/include/access/rtstrat.h b/src/include/access/rtstrat.h
index 06236ae220..f9d3639da3 100644
--- a/src/include/access/rtstrat.h
+++ b/src/include/access/rtstrat.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rtstrat.h,v 1.7 1998/02/26 04:40:26 momjian Exp $
+ * $Id: rtstrat.h,v 1.8 1998/09/01 04:34:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,8 +16,7 @@
#include <utils/rel.h>
#include <access/attnum.h>
-extern RegProcedure
-RTMapOperator(Relation r, AttrNumber attnum,
+extern RegProcedure RTMapOperator(Relation r, AttrNumber attnum,
RegProcedure proc);
-#endif /* RTSTRAT_H */
+#endif /* RTSTRAT_H */
diff --git a/src/include/access/sdir.h b/src/include/access/sdir.h
index cc8826c528..89aa8b25c9 100644
--- a/src/include/access/sdir.h
+++ b/src/include/access/sdir.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sdir.h,v 1.3 1997/09/07 04:56:12 momjian Exp $
+ * $Id: sdir.h,v 1.4 1998/09/01 04:34:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,4 +54,4 @@ typedef enum ScanDirection
#define ScanDirectionIsForward(direction) \
((bool) (direction == ForwardScanDirection))
-#endif /* SDIR_H */
+#endif /* SDIR_H */
diff --git a/src/include/access/skey.h b/src/include/access/skey.h
index af60c7656a..c4d3aa7e50 100644
--- a/src/include/access/skey.h
+++ b/src/include/access/skey.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: skey.h,v 1.9 1998/02/26 04:40:27 momjian Exp $
+ * $Id: skey.h,v 1.10 1998/09/01 04:34:29 momjian Exp $
*
*
* Note:
@@ -46,8 +46,7 @@ typedef ScanKeyData *ScanKey;
* prototypes for functions in access/common/scankey.c
*/
extern void ScanKeyEntrySetIllegal(ScanKey entry);
-extern void
-ScanKeyEntryInitialize(ScanKey entry, bits16 flags,
+extern void ScanKeyEntryInitialize(ScanKey entry, bits16 flags,
AttrNumber attributeNumber, RegProcedure procedure, Datum argument);
-#endif /* SKEY_H */
+#endif /* SKEY_H */
diff --git a/src/include/access/strat.h b/src/include/access/strat.h
index a5d08ed2b4..305911ce70 100644
--- a/src/include/access/strat.h
+++ b/src/include/access/strat.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: strat.h,v 1.10 1998/08/11 19:32:39 momjian Exp $
+ * $Id: strat.h,v 1.11 1998/09/01 04:34:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,6 +29,8 @@ typedef struct StrategyTransformMapData
*
*
*
+ *
+ *
* STRUCTURE */
typedef StrategyTransformMapData *StrategyTransformMap;
@@ -90,4 +92,4 @@ typedef struct IndexStrategyData
typedef IndexStrategyData *IndexStrategy;
-#endif /* STRAT_H */
+#endif /* STRAT_H */
diff --git a/src/include/access/transam.h b/src/include/access/transam.h
index 2662c7ad2e..0d6d3e4bbf 100644
--- a/src/include/access/transam.h
+++ b/src/include/access/transam.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: transam.h,v 1.15 1998/07/21 06:17:39 vadim Exp $
+ * $Id: transam.h,v 1.16 1998/09/01 04:34:31 momjian Exp $
*
* NOTES
* Transaction System Version 101 now support proper oid
@@ -124,13 +124,13 @@ typedef VariableRelationContentsData *VariableRelationContents;
*/
typedef struct VariableCacheData
{
- uint32 xid_count;
- TransactionId nextXid;
- uint32 oid_count; /* not implemented, yet */
- Oid nextOid;
-} VariableCacheData;
+ uint32 xid_count;
+ TransactionId nextXid;
+ uint32 oid_count; /* not implemented, yet */
+ Oid nextOid;
+} VariableCacheData;
-typedef VariableCacheData *VariableCache;
+typedef VariableCacheData *VariableCache;
/* ----------------
* extern declarations
@@ -148,14 +148,11 @@ extern void TransactionIdAbort(TransactionId transactionId);
/* in transam/transsup.c */
extern void AmiTransactionOverride(bool flag);
-extern void
-TransComputeBlockNumber(Relation relation,
+extern void TransComputeBlockNumber(Relation relation,
TransactionId transactionId, BlockNumber *blockNumberOutP);
-extern XidStatus
-TransBlockNumberGetXidStatus(Relation relation,
+extern XidStatus TransBlockNumberGetXidStatus(Relation relation,
BlockNumber blockNumber, TransactionId xid, bool *failP);
-extern void
-TransBlockNumberSetXidStatus(Relation relation,
+extern void TransBlockNumberSetXidStatus(Relation relation,
BlockNumber blockNumber, TransactionId xid, XidStatus xstatus,
bool *failP);
@@ -189,4 +186,4 @@ extern bool AMI_OVERRIDE;
/* in varsup.c */
extern int OidGenLockId;
-#endif /* TRAMSAM_H */
+#endif /* TRAMSAM_H */
diff --git a/src/include/access/tupdesc.h b/src/include/access/tupdesc.h
index 050fba81f5..43432b3e17 100644
--- a/src/include/access/tupdesc.h
+++ b/src/include/access/tupdesc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tupdesc.h,v 1.19 1998/09/01 03:27:35 momjian Exp $
+ * $Id: tupdesc.h,v 1.20 1998/09/01 04:34:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,11 +53,11 @@ typedef struct tupleDesc
Form_pg_attribute *attrs;
/* attrs[N] is a pointer to the description of Attribute Number N+1. */
TupleConstr *constr;
-} *TupleDesc;
+} *TupleDesc;
extern TupleDesc CreateTemplateTupleDesc(int natts);
-extern TupleDesc CreateTupleDesc(int natts, Form_pg_attribute *attrs);
+extern TupleDesc CreateTupleDesc(int natts, Form_pg_attribute * attrs);
extern TupleDesc CreateTupleDescCopy(TupleDesc tupdesc);
@@ -65,8 +65,7 @@ extern TupleDesc CreateTupleDescCopyConstr(TupleDesc tupdesc);
extern void FreeTupleDesc(TupleDesc tupdesc);
-extern bool
-TupleDescInitEntry(TupleDesc desc,
+extern bool TupleDescInitEntry(TupleDesc desc,
AttrNumber attributeNumber,
char *attributeName,
Oid typeid,
@@ -76,4 +75,4 @@ TupleDescInitEntry(TupleDesc desc,
extern TupleDesc BuildDescForRelation(List *schema, char *relname);
-#endif /* TUPDESC_H */
+#endif /* TUPDESC_H */
diff --git a/src/include/access/valid.h b/src/include/access/valid.h
index 2eeed643fb..aadaf827c4 100644
--- a/src/include/access/valid.h
+++ b/src/include/access/valid.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: valid.h,v 1.14 1998/09/01 03:27:38 momjian Exp $
+ * $Id: valid.h,v 1.15 1998/09/01 04:34:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -156,4 +156,4 @@ do \
extern bool TupleUpdatedByCurXactAndCmd(HeapTuple t);
-#endif /* VALID_H */
+#endif /* VALID_H */
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index fa24882061..a612910047 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: xact.h,v 1.14 1998/07/27 19:38:30 vadim Exp $
+ * $Id: xact.h,v 1.15 1998/09/01 04:34:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,21 +22,21 @@
*/
typedef struct TransactionStateData
{
- TransactionId transactionIdData;
- CommandId commandId;
- CommandId scanCommandId;
- AbsoluteTime startTime;
- int state;
- int blockState;
+ TransactionId transactionIdData;
+ CommandId commandId;
+ CommandId scanCommandId;
+ AbsoluteTime startTime;
+ int state;
+ int blockState;
} TransactionStateData;
/*
* Xact isolation levels
*/
-#define XACT_DIRTY_READ 0 /* not implemented */
-#define XACT_READ_COMMITTED 1
-#define XACT_REPEATABLE_READ 2 /* not implemented */
-#define XACT_SERIALIZED 3
+#define XACT_DIRTY_READ 0 /* not implemented */
+#define XACT_READ_COMMITTED 1
+#define XACT_REPEATABLE_READ 2 /* not implemented */
+#define XACT_SERIALIZED 3
/* ----------------
* transaction states
@@ -117,4 +117,4 @@ extern bool xideq(TransactionId xid1, TransactionId xid2);
extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2);
extern void TransactionIdAdd(TransactionId *xid, int value);
-#endif /* XACT_H */
+#endif /* XACT_H */
diff --git a/src/include/bootstrap/bootstrap.h b/src/include/bootstrap/bootstrap.h
index e357f9ecc4..7726228014 100644
--- a/src/include/bootstrap/bootstrap.h
+++ b/src/include/bootstrap/bootstrap.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bootstrap.h,v 1.12 1998/09/01 03:27:40 momjian Exp $
+ * $Id: bootstrap.h,v 1.13 1998/09/01 04:34:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,8 +33,7 @@ extern int numattr;
extern int DebugMode;
extern int BootstrapMain(int ac, char *av[]);
-extern void
-index_register(char *heap,
+extern void index_register(char *heap,
char *ind,
int natts,
AttrNumber *attnos,
@@ -57,4 +56,4 @@ extern char *CleanUpStr(char *s);
extern int EnterString(char *str);
extern void build_indices(void);
-#endif /* BOOTSTRAP_H */
+#endif /* BOOTSTRAP_H */
diff --git a/src/include/c.h b/src/include/c.h
index 3d7c08ddd4..02d469bee9 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.44 1998/08/29 04:05:41 momjian Exp $
+ * $Id: c.h,v 1.45 1998/09/01 04:33:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,16 +63,16 @@
#ifndef __cplusplus
typedef char bool;
-#endif /* not C++ */
+#endif /* not C++ */
typedef bool *BoolPtr;
#ifndef TRUE
#define TRUE 1
-#endif /* TRUE */
+#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
-#endif /* FALSE */
+#endif /* FALSE */
/* ----------------------------------------------------------------
* Section 2: __STDC__, non-ansi C definitions:
@@ -102,13 +102,13 @@ typedef char *Pointer;
* Null pointer.
*/
#define NULL ((void *) 0)
-#endif /* !defined(NULL) */
+#endif /* !defined(NULL) */
#define HAVE_ANSI_CPP /* all ANSI C compilers must have this! */
#if defined(NEED_STD_HDRS)
#undef NEED_STD_HDRS /* all ANSI systems must have
* stddef/stdlib */
-#endif /* NEED_STD_HDRS */
+#endif /* NEED_STD_HDRS */
#else /* !defined(__STDC__) *//* NOT ANSI C */
@@ -124,7 +124,7 @@ typedef char *Pointer;
* Null pointer.
*/
#define NULL 0
-#endif /* !defined(NULL) */
+#endif /* !defined(NULL) */
/*
* const --
@@ -153,7 +153,7 @@ typedef char *Pointer;
*/
#define volatile /* volatile */
-#endif /* !defined(__STDC__) *//* NOT ANSI C */
+#endif /* !defined(__STDC__) */ /* NOT ANSI C */
/*
* CppAsString --
@@ -181,7 +181,7 @@ typedef char *Pointer;
#define _priv_CppIdentity(x)x
#define CppConcat(x, y) _priv_CppIdentity(x)y
-#endif /* !HAVE_ANSI_CPP */
+#endif /* !HAVE_ANSI_CPP */
#ifndef __GNUC__ /* GNU cc */
#endif
@@ -207,7 +207,7 @@ typedef char *Pointer;
#else /* NEED_STD_HDRS */
#include <stddef.h>
#include <stdlib.h>
-#endif /* NEED_STD_HDRS */
+#endif /* NEED_STD_HDRS */
/* ----------------------------------------------------------------
* Section 3: standard system types
@@ -555,7 +555,7 @@ typedef Datum *DatumPtr;
*/
#ifndef offsetof
#define offsetof(type, field) ((long) &((type *)0)->field)
-#endif /* offsetof */
+#endif /* offsetof */
/*
* lengthof --
@@ -633,8 +633,9 @@ typedef struct Exception
#define AssertState(condition) \
Trap(!(condition), BadState)
-extern int assert_enabled;
-#endif /* USE_ASSERT_CHECKING */
+extern int assert_enabled;
+
+#endif /* USE_ASSERT_CHECKING */
/*
* LogTrap --
@@ -676,10 +677,12 @@ extern int assert_enabled;
LogTrap(!(condition), BadState, printArgs)
extern int assertEnable(int val);
+
#ifdef ASSERT_CHECKING_TEST
extern int assertTest(int val);
+
#endif
-#endif /* USE_ASSERT_CHECKING */
+#endif /* USE_ASSERT_CHECKING */
/* ----------------------------------------------------------------
* Section 8: Min, Max, Abs macros
@@ -756,8 +759,7 @@ extern Exception BadArg;
extern Exception BadState;
/* in utils/error/assert.c */
-extern int
-ExceptionalCondition(char *conditionName,
+extern int ExceptionalCondition(char *conditionName,
Exception *exceptionP, char *details,
char *fileName, int lineNumber);
@@ -804,7 +806,7 @@ extern char *form(const char *fmt,...);
#ifdef FIXADE
#if defined(hpux)
#include "port/hpux/fixade.h" /* for unaligned access fixup */
-#endif /* hpux */
+#endif /* hpux */
#endif
#if defined(sun) && defined(sparc) && !defined(__SVR4)
@@ -821,4 +823,4 @@ extern char *form(const char *fmt,...);
* end of c.h
* ----------------
*/
-#endif /* C_H */
+#endif /* C_H */
diff --git a/src/include/catalog/catalog.h b/src/include/catalog/catalog.h
index dfa041f421..7fc7ed9fc8 100644
--- a/src/include/catalog/catalog.h
+++ b/src/include/catalog/catalog.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: catalog.h,v 1.5 1998/09/01 03:27:42 momjian Exp $
+ * $Id: catalog.h,v 1.6 1998/09/01 04:34:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,4 +21,4 @@ extern bool IsSharedSystemRelationName(char *relname);
extern Oid newoid(void);
extern void fillatt(TupleDesc att);
-#endif /* CATALOG_H */
+#endif /* CATALOG_H */
diff --git a/src/include/catalog/catname.h b/src/include/catalog/catname.h
index 04d1696d76..3c25cdece2 100644
--- a/src/include/catalog/catname.h
+++ b/src/include/catalog/catname.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: catname.h,v 1.9 1998/02/25 13:09:21 scrappy Exp $
+ * $Id: catname.h,v 1.10 1998/09/01 04:34:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,4 +46,4 @@
extern char *SharedSystemRelationNames[];
-#endif /* CATNAME_H */
+#endif /* CATNAME_H */
diff --git a/src/include/catalog/heap.h b/src/include/catalog/heap.h
index 7f0f91df1e..545bc7c5b8 100644
--- a/src/include/catalog/heap.h
+++ b/src/include/catalog/heap.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heap.h,v 1.15 1998/09/01 03:27:44 momjian Exp $
+ * $Id: heap.h,v 1.16 1998/09/01 04:34:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,8 +17,8 @@
extern Relation heap_create(char *relname, TupleDesc att);
-extern Oid heap_create_with_catalog(char *relname,
- TupleDesc tupdesc, char relkind);
+extern Oid heap_create_with_catalog(char *relname,
+ TupleDesc tupdesc, char relkind);
extern void heap_destroy_with_catalog(char *relname);
extern void heap_destroy(Relation rel);
@@ -26,4 +26,4 @@ extern void heap_destroy(Relation rel);
extern void InitTempRelList(void);
extern void DestroyTempRels(void);
-#endif /* HEAP_H */
+#endif /* HEAP_H */
diff --git a/src/include/catalog/index.h b/src/include/catalog/index.h
index f4fcce9657..d377832241 100644
--- a/src/include/catalog/index.h
+++ b/src/include/catalog/index.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: index.h,v 1.12 1998/09/01 03:27:46 momjian Exp $
+ * $Id: index.h,v 1.13 1998/09/01 04:34:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,13 +22,11 @@ extern Form_pg_am AccessMethodObjectIdGetForm(Oid accessMethodObjectId);
extern void UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate);
-extern void
-InitIndexStrategy(int numatts,
+extern void InitIndexStrategy(int numatts,
Relation indexRelation,
Oid accessMethodObjectId);
-extern void
-index_create(char *heapRelationName,
+extern void index_create(char *heapRelationName,
char *indexRelationName,
FuncIndexInfo *funcInfo,
List *attributeList,
@@ -44,20 +42,17 @@ index_create(char *heapRelationName,
extern void index_destroy(Oid indexId);
-extern void
-FormIndexDatum(int numberOfAttributes,
+extern void FormIndexDatum(int numberOfAttributes,
AttrNumber *attributeNumber, HeapTuple heapTuple,
TupleDesc heapDescriptor, Datum *datum,
char *nullv, FuncIndexInfoPtr fInfo);
extern void UpdateStats(Oid relid, long reltuples, bool hasindex);
-extern void
-FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
+extern void FillDummyExprContext(ExprContext *econtext, TupleTableSlot *slot,
TupleDesc tupdesc, Buffer buffer);
-extern void
-index_build(Relation heapRelation, Relation indexRelation,
+extern void index_build(Relation heapRelation, Relation indexRelation,
int numberOfAttributes, AttrNumber *attributeNumber,
uint16 parameterCount, Datum *parameter, FuncIndexInfo *funcInfo,
PredInfo *predInfo);
@@ -65,4 +60,4 @@ index_build(Relation heapRelation, Relation indexRelation,
extern bool IndexIsUnique(Oid indexId);
extern bool IndexIsUniqueNoCache(Oid indexId);
-#endif /* INDEX_H */
+#endif /* INDEX_H */
diff --git a/src/include/catalog/indexing.h b/src/include/catalog/indexing.h
index 7f0b440a79..dd9b4c4026 100644
--- a/src/include/catalog/indexing.h
+++ b/src/include/catalog/indexing.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: indexing.h,v 1.17 1998/09/01 03:27:47 momjian Exp $
+ * $Id: indexing.h,v 1.18 1998/09/01 04:34:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -66,25 +66,21 @@ extern char *IndexedCatalogNames[];
*/
extern void CatalogOpenIndices(int nIndices, char **names, Relation *idescs);
extern void CatalogCloseIndices(int nIndices, Relation *idescs);
-extern void
-CatalogIndexInsert(Relation *idescs,
+extern void CatalogIndexInsert(Relation *idescs,
int nIndices,
Relation heapRelation,
HeapTuple heapTuple);
extern bool CatalogHasIndex(char *catName, Oid catId);
-extern HeapTuple
-AttributeNameIndexScan(Relation heapRelation,
+extern HeapTuple AttributeNameIndexScan(Relation heapRelation,
Oid relid,
char *attname);
-extern HeapTuple
-AttributeNumIndexScan(Relation heapRelation,
+extern HeapTuple AttributeNumIndexScan(Relation heapRelation,
Oid relid,
AttrNumber attnum);
extern HeapTuple ProcedureOidIndexScan(Relation heapRelation, Oid procId);
-extern HeapTuple
-ProcedureNameIndexScan(Relation heapRelation,
+extern HeapTuple ProcedureNameIndexScan(Relation heapRelation,
char *procName, int2 nargs, Oid *argTypes);
extern HeapTuple ProcedureSrcIndexScan(Relation heapRelation, text *procSrc);
extern HeapTuple TypeOidIndexScan(Relation heapRelation, Oid typeId);
@@ -125,4 +121,4 @@ DECLARE_INDEX(pg_description_objoid_index on pg_description using btree(objoid o
/* now build indices in the initialization scripts */
BUILD_INDICES
-#endif /* INDEXING_H */
+#endif /* INDEXING_H */
diff --git a/src/include/catalog/pg_aggregate.h b/src/include/catalog/pg_aggregate.h
index fd45b24988..a4acb012f8 100644
--- a/src/include/catalog/pg_aggregate.h
+++ b/src/include/catalog/pg_aggregate.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_aggregate.h,v 1.16 1998/08/11 18:28:36 momjian Exp $
+ * $Id: pg_aggregate.h,v 1.17 1998/09/01 04:34:45 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -88,7 +88,7 @@ typedef FormData_pg_aggregate *Form_pg_aggregate;
* ---------------
*/
-DATA(insert OID = 0 ( avg PGUID int8pl int4inc int84div 20 20 23 20 _null_ 0 ));
+DATA(insert OID = 0 ( avg PGUID int8pl int4inc int84div 20 20 23 20 _null_ 0 ));
DATA(insert OID = 0 ( avg PGUID int4pl int4inc int4div 23 23 23 23 _null_ 0 ));
DATA(insert OID = 0 ( avg PGUID int2pl int2inc int2div 21 21 21 21 _null_ 0 ));
DATA(insert OID = 0 ( avg PGUID float4pl float4inc float4div 700 700 700 700 _null_ 0.0 ));
@@ -133,8 +133,7 @@ DATA(insert OID = 0 ( count PGUID - int4inc - 0 0 23 23 _null_ 0 ));
/*
* prototypes for functions in pg_aggregate.c
*/
-extern void
-AggregateCreate(char *aggName,
+extern void AggregateCreate(char *aggName,
char *aggtransfn1Name,
char *aggtransfn2Name,
char *aggfinalfnName,
@@ -143,8 +142,7 @@ AggregateCreate(char *aggName,
char *aggtransfn2typeName,
char *agginitval1,
char *agginitval2);
-extern char *
-AggNameGetInitVal(char *aggName, Oid basetype,
+extern char *AggNameGetInitVal(char *aggName, Oid basetype,
int xfuncno, bool *isNull);
-#endif /* PG_AGGREGATE_H */
+#endif /* PG_AGGREGATE_H */
diff --git a/src/include/catalog/pg_am.h b/src/include/catalog/pg_am.h
index 05e9b797f8..3106ffa7cc 100644
--- a/src/include/catalog/pg_am.h
+++ b/src/include/catalog/pg_am.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_am.h,v 1.8 1998/08/19 02:03:48 momjian Exp $
+ * $Id: pg_am.h,v 1.9 1998/09/01 04:34:47 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -109,4 +109,4 @@ DESCR("");
DATA(insert OID = 783 ( gist PGUID "o" 100 7 gistgettuple gistinsert gistdelete - - - - gistbeginscan gistrescan gistendscan gistmarkpos gistrestrpos - - gistbuild - - ));
DESCR("");
-#endif /* PG_AM_H */
+#endif /* PG_AM_H */
diff --git a/src/include/catalog/pg_amop.h b/src/include/catalog/pg_amop.h
index 2044bff6ea..40a112e642 100644
--- a/src/include/catalog/pg_amop.h
+++ b/src/include/catalog/pg_amop.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_amop.h,v 1.14 1998/08/19 02:03:49 momjian Exp $
+ * $Id: pg_amop.h,v 1.15 1998/09/01 04:34:48 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -182,10 +182,10 @@ DATA(insert OID = 0 ( 403 427 610 5 btreesel btreenpage ));
*/
DATA(insert OID = 0 ( 403 435 645 1 btreesel btreenpage ));
-DATA(insert OID = 0 ( 403 435 647 2 btreesel btreenpage ));
+DATA(insert OID = 0 ( 403 435 647 2 btreesel btreenpage ));
DATA(insert OID = 0 ( 403 435 649 3 btreesel btreenpage ));
-DATA(insert OID = 0 ( 403 435 648 4 btreesel btreenpage ));
-DATA(insert OID = 0 ( 403 435 646 5 btreesel btreenpage ));
+DATA(insert OID = 0 ( 403 435 648 4 btreesel btreenpage ));
+DATA(insert OID = 0 ( 403 435 646 5 btreesel btreenpage ));
/*
* nbtree float4_ops
@@ -333,4 +333,4 @@ DATA(insert OID = 0 ( 405 1312 1320 1 hashsel hashnpage ));
/* timespan_ops */
DATA(insert OID = 0 ( 405 1313 1330 1 hashsel hashnpage ));
-#endif /* PG_AMOP_H */
+#endif /* PG_AMOP_H */
diff --git a/src/include/catalog/pg_amproc.h b/src/include/catalog/pg_amproc.h
index e1726a5961..4c12668d66 100644
--- a/src/include/catalog/pg_amproc.h
+++ b/src/include/catalog/pg_amproc.h
@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_amproc.h,v 1.9 1998/08/19 02:03:51 momjian Exp $
+ * $Id: pg_amproc.h,v 1.10 1998/09/01 04:34:49 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -61,7 +61,7 @@ typedef FormData_pg_amproc *Form_pg_amproc;
* initial contents of pg_amproc
* ----------------
*/
-
+
/* rtree */
DATA(insert OID = 0 (402 422 193 1));
DATA(insert OID = 0 (402 422 194 2));
@@ -122,4 +122,4 @@ DATA(insert OID = 0 (405 1181 455 1));
DATA(insert OID = 0 (405 1312 452 1));
DATA(insert OID = 0 (405 1313 452 1));
-#endif /* PG_AMPROC_H */
+#endif /* PG_AMPROC_H */
diff --git a/src/include/catalog/pg_attrdef.h b/src/include/catalog/pg_attrdef.h
index 6a3b6309d9..22e89c17c1 100644
--- a/src/include/catalog/pg_attrdef.h
+++ b/src/include/catalog/pg_attrdef.h
@@ -52,4 +52,4 @@ typedef FormData_pg_attrdef *Form_pg_attrdef;
#define Anum_pg_attrdef_adsrc 4
-#endif /* PG_ATTRDEF_H */
+#endif /* PG_ATTRDEF_H */
diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h
index 4e4832fe17..4a3bbd6ce5 100644
--- a/src/include/catalog/pg_attribute.h
+++ b/src/include/catalog/pg_attribute.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_attribute.h,v 1.42 1998/09/01 03:27:49 momjian Exp $
+ * $Id: pg_attribute.h,v 1.43 1998/09/01 04:34:51 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -178,10 +178,10 @@ typedef FormData_pg_attribute *Form_pg_attribute;
* ----------------
*/
#define Schema_pg_type \
-{ 1247, {"typname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1247, {"typname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typlen"}, 21, 0, 2, 3, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
-{ 1247, {"typprtlen"}, 21, 0, 2, 4, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
+{ 1247, {"typprtlen"}, 21, 0, 2, 4, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
{ 1247, {"typbyval"}, 16, 0, 1, 5, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typtype"}, 18, 0, 1, 6, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
{ 1247, {"typisdefined"}, 16, 0, 1, 7, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
@@ -189,7 +189,7 @@ typedef FormData_pg_attribute *Form_pg_attribute;
{ 1247, {"typrelid"}, 26, 0, 4, 9, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typelem"}, 26, 0, 4, 10, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typinput"}, 24, 0, 4, 11, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1247, {"typoutput"}, 24, 0, 4, 12, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1247, {"typoutput"}, 24, 0, 4, 12, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typreceive"}, 24, 0, 4, 13, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typsend"}, 24, 0, 4, 14, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1247, {"typalign"}, 18, 0, 1, 15, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
@@ -239,21 +239,21 @@ DATA(insert OID = 0 ( 1262 cmax 29 0 4 -6 0 -1 -1 t f i f f));
*/
#define Schema_pg_proc \
{ 1255, {"proname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"proowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"prolang"}, 26, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"proisinh"}, 16, 0, 1, 4, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255, {"proistrusted"}, 16, 0, 1, 5, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255, {"proiscachable"}, 16, 0, 1, 6, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255, {"pronargs"}, 21, 0, 2, 7, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
-{ 1255, {"proretset"}, 16, 0, 1, 8, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1255, {"prorettype"}, 26, 0, 4, 9, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"proowner"}, 23, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"prolang"}, 26, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"proisinh"}, 16, 0, 1, 4, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255, {"proistrusted"}, 16, 0, 1, 5, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255, {"proiscachable"}, 16, 0, 1, 6, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255, {"pronargs"}, 21, 0, 2, 7, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
+{ 1255, {"proretset"}, 16, 0, 1, 8, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1255, {"prorettype"}, 26, 0, 4, 9, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1255, {"proargtypes"}, 30, 0, 32, 10, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"probyte_pct"}, 23, 0, 4, 11, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"properbyte_cpu"}, 23, 0, 4, 12, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"propercall_cpu"}, 23, 0, 4, 13, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"prooutin_ratio"}, 23, 0, 4, 14, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"prosrc"}, 25, 0, -1, 15, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
-{ 1255, {"probin"}, 17, 0, -1, 16, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
+{ 1255, {"probyte_pct"}, 23, 0, 4, 11, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"properbyte_cpu"}, 23, 0, 4, 12, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"propercall_cpu"}, 23, 0, 4, 13, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"prooutin_ratio"}, 23, 0, 4, 14, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"prosrc"}, 25, 0, -1, 15, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1255, {"probin"}, 17, 0, -1, 16, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
DATA(insert OID = 0 ( 1255 proname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1255 proowner 23 0 4 2 0 -1 -1 t f i f f));
@@ -328,8 +328,8 @@ DATA(insert OID = 0 ( 1261 cmax 29 0 4 -6 0 -1 -1 t f i f f));
{ 1249, {"attbyval"}, 16, 0, 1, 10, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
{ 1249, {"attisset"}, 16, 0, 1, 11, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
{ 1249, {"attalign"}, 18, 0, 1, 12, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1249, {"attnotnull"}, 16, 0, 1, 13, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1249, {"atthasdef"}, 16, 0, 1, 14, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }
+{ 1249, {"attnotnull"}, 16, 0, 1, 13, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1249, {"atthasdef"}, 16, 0, 1, 14, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }
DATA(insert OID = 0 ( 1249 attrelid 26 0 4 1 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1249 attname 19 0 NAMEDATALEN 2 0 -1 -1 f f i f f));
@@ -357,20 +357,20 @@ DATA(insert OID = 0 ( 1249 cmax 29 0 4 -6 0 -1 -1 t f i f f));
* ----------------
*/
#define Schema_pg_class \
-{ 1259, {"relname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
+{ 1259, {"relname"}, 19, 0, NAMEDATALEN, 1, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }, \
{ 1259, {"reltype"}, 26, 0, 4, 2, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relowner"}, 23, 0, 4, 3, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
{ 1259, {"relam"}, 26, 0, 4, 4, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259, {"relpages"}, 23, 0, 4, 5, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259, {"reltuples"}, 23, 0, 4, 6, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
-{ 1259, {"relhasindex"}, 16, 0, 1, 7, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259, {"relisshared"}, 16, 0, 1, 8, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259, {"relkind"}, 18, 0, 1, 9, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259, {"relnatts"}, 21, 0, 2, 10, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
-{ 1259, {"relchecks"}, 21, 0, 2, 11, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
+{ 1259, {"relpages"}, 23, 0, 4, 5, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259, {"reltuples"}, 23, 0, 4, 6, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }, \
+{ 1259, {"relhasindex"}, 16, 0, 1, 7, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259, {"relisshared"}, 16, 0, 1, 8, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259, {"relkind"}, 18, 0, 1, 9, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259, {"relnatts"}, 21, 0, 2, 10, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
+{ 1259, {"relchecks"}, 21, 0, 2, 11, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
{ 1259, {"reltriggers"}, 21, 0, 2, 12, 0, -1, -1, '\001', '\0', 's', '\0', '\0' }, \
-{ 1259, {"relhasrules"}, 16, 0, 1, 13, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
-{ 1259, {"relacl"}, 1034, 0, -1, 14, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
+{ 1259, {"relhasrules"}, 16, 0, 1, 13, 0, -1, -1, '\001', '\0', 'c', '\0', '\0' }, \
+{ 1259, {"relacl"}, 1034, 0, -1, 14, 0, -1, -1, '\0', '\0', 'i', '\0', '\0' }
DATA(insert OID = 0 ( 1259 relname 19 0 NAMEDATALEN 1 0 -1 -1 f f i f f));
DATA(insert OID = 0 ( 1259 reltype 26 0 4 2 0 -1 -1 t f i f f));
@@ -463,4 +463,4 @@ DATA(insert OID = 0 ( 1264 varfoo 26 0 4 1 0 -1 -1 t f i f f));
DATA(insert OID = 0 ( 1269 logfoo 26 0 4 1 0 -1 -1 t f i f f));
-#endif /* PG_ATTRIBUTE_H */
+#endif /* PG_ATTRIBUTE_H */
diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h
index 4fe2460334..e9f860fb44 100644
--- a/src/include/catalog/pg_class.h
+++ b/src/include/catalog/pg_class.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_class.h,v 1.23 1998/08/24 01:14:13 momjian Exp $
+ * $Id: pg_class.h,v 1.24 1998/09/01 04:34:53 momjian Exp $
*
* NOTES
* ``pg_relation'' is being replaced by ``pg_class''. currently
@@ -163,4 +163,4 @@ DESCR("");
#define RELKIND_SEQUENCE 'S' /* SEQUENCE relation */
#define RELKIND_UNCATALOGED 'u' /* temporary heap */
-#endif /* PG_RELATION_H */
+#endif /* PG_RELATION_H */
diff --git a/src/include/catalog/pg_database.h b/src/include/catalog/pg_database.h
index ef68094152..5b546c32b8 100644
--- a/src/include/catalog/pg_database.h
+++ b/src/include/catalog/pg_database.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_database.h,v 1.6 1998/08/24 01:14:17 momjian Exp $
+ * $Id: pg_database.h,v 1.7 1998/09/01 04:34:54 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -37,6 +37,7 @@ CATALOG(pg_database) BOOTSTRAP
int4 encoding;
text datpath; /* VARIABLE LENGTH FIELD */
} FormData_pg_database;
+
/* ----------------
* Form_pg_database corresponds to a pointer to a tuple with
* the format of pg_database relation.
@@ -53,4 +54,4 @@ typedef FormData_pg_database *Form_pg_database;
#define Anum_pg_database_datdba 2
#define Anum_pg_database_encoding 3
#define Anum_pg_database_datpath 4
-#endif /* PG_DATABASE_H */
+#endif /* PG_DATABASE_H */
diff --git a/src/include/catalog/pg_description.h b/src/include/catalog/pg_description.h
index 3a2c4e6b38..b85d6cab4a 100644
--- a/src/include/catalog/pg_description.h
+++ b/src/include/catalog/pg_description.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_description.h,v 1.6 1998/08/19 19:59:47 momjian Exp $
+ * $Id: pg_description.h,v 1.7 1998/09/01 04:34:55 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -60,8 +60,8 @@ typedef FormData_pg_description *Form_pg_description;
/*
* Because the contents of this table are taken from the other *.h files,
- * there is no initialization. It is loaded from initdb using a COPY
+ * there is no initialization. It is loaded from initdb using a COPY
* statement.
*/
-#endif /* PG_DESCRIPTION_H */
+#endif /* PG_DESCRIPTION_H */
diff --git a/src/include/catalog/pg_group.h b/src/include/catalog/pg_group.h
index 5680c0fe1b..863fe78c06 100644
--- a/src/include/catalog/pg_group.h
+++ b/src/include/catalog/pg_group.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_group.h,v 1.4 1997/09/08 02:35:07 momjian Exp $
+ * $Id: pg_group.h,v 1.5 1998/09/01 04:34:56 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -40,4 +40,4 @@ typedef FormData_pg_group *Form_pg_group;
#define Anum_pg_group_grosysid 2
#define Anum_pg_group_grolist 3
-#endif /* PG_GROUP_H */
+#endif /* PG_GROUP_H */
diff --git a/src/include/catalog/pg_index.h b/src/include/catalog/pg_index.h
index ef39b13b7f..4cf6ad95ef 100644
--- a/src/include/catalog/pg_index.h
+++ b/src/include/catalog/pg_index.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_index.h,v 1.7 1998/09/01 03:27:51 momjian Exp $
+ * $Id: pg_index.h,v 1.8 1998/09/01 04:34:58 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -81,4 +81,4 @@ typedef FormData_pg_index *Form_pg_index;
#define Anum_pg_index_indisunique 8
#define Anum_pg_index_indpred 10
-#endif /* PG_INDEX_H */
+#endif /* PG_INDEX_H */
diff --git a/src/include/catalog/pg_inheritproc.h b/src/include/catalog/pg_inheritproc.h
index 60bad51b93..e23bbf880c 100644
--- a/src/include/catalog/pg_inheritproc.h
+++ b/src/include/catalog/pg_inheritproc.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_inheritproc.h,v 1.4 1997/09/08 02:35:13 momjian Exp $
+ * $Id: pg_inheritproc.h,v 1.5 1998/09/01 04:34:59 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -56,4 +56,4 @@ typedef FormData_pg_inheritproc *Form_pg_inheritproc;
#define Anum_pg_inheritproc_inhproc 4
-#endif /* PG_INHERITPROC_H */
+#endif /* PG_INHERITPROC_H */
diff --git a/src/include/catalog/pg_inherits.h b/src/include/catalog/pg_inherits.h
index 1ad2b782cb..45b09a49c1 100644
--- a/src/include/catalog/pg_inherits.h
+++ b/src/include/catalog/pg_inherits.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_inherits.h,v 1.5 1998/09/01 03:27:53 momjian Exp $
+ * $Id: pg_inherits.h,v 1.6 1998/09/01 04:35:00 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -54,4 +54,4 @@ typedef FormData_pg_inherits *Form_pg_inherits;
#define Anum_pg_inherits_inhseqno 3
-#endif /* PG_INHERITS_H */
+#endif /* PG_INHERITS_H */
diff --git a/src/include/catalog/pg_ipl.h b/src/include/catalog/pg_ipl.h
index ea3eb34512..64786ece0a 100644
--- a/src/include/catalog/pg_ipl.h
+++ b/src/include/catalog/pg_ipl.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_ipl.h,v 1.4 1997/09/08 02:35:15 momjian Exp $
+ * $Id: pg_ipl.h,v 1.5 1998/09/01 04:35:01 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -54,4 +54,4 @@ typedef FormData_pg_ipl *Form_pg_ipl;
#define Anum_pg_ipl_iplseqno 3
-#endif /* PG_IPL_H */
+#endif /* PG_IPL_H */
diff --git a/src/include/catalog/pg_language.h b/src/include/catalog/pg_language.h
index 9bf4c11083..5eb8db2a80 100644
--- a/src/include/catalog/pg_language.h
+++ b/src/include/catalog/pg_language.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_language.h,v 1.6 1997/11/13 03:23:02 momjian Exp $
+ * $Id: pg_language.h,v 1.7 1998/09/01 04:35:03 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -75,4 +75,4 @@ DESCR("");
#define SQLlanguageId 14
-#endif /* PG_LANGUAGE_H */
+#endif /* PG_LANGUAGE_H */
diff --git a/src/include/catalog/pg_listener.h b/src/include/catalog/pg_listener.h
index d80bf9df29..4a8717cb9b 100644
--- a/src/include/catalog/pg_listener.h
+++ b/src/include/catalog/pg_listener.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_listener.h,v 1.4 1997/09/08 02:35:17 momjian Exp $
+ * $Id: pg_listener.h,v 1.5 1998/09/01 04:35:04 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -53,4 +53,4 @@ CATALOG(pg_listener)
*/
-#endif /* PG_LISTENER_H */
+#endif /* PG_LISTENER_H */
diff --git a/src/include/catalog/pg_log.h b/src/include/catalog/pg_log.h
index 0cf9dc130b..36f61a96f5 100644
--- a/src/include/catalog/pg_log.h
+++ b/src/include/catalog/pg_log.h
@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_log.h,v 1.4 1997/09/08 02:35:18 momjian Exp $
+ * $Id: pg_log.h,v 1.5 1998/09/01 04:35:05 momjian Exp $
*
* NOTES
* The structures and macros used by the transam/ code
@@ -37,4 +37,4 @@ typedef FormData_pg_log *Form_pg_log;
#define Natts_pg_log 1
#define Anum_pg_log_logfoo 1
-#endif /* PG_LOG_H */
+#endif /* PG_LOG_H */
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h
index 882830be0b..3f7814a11f 100644
--- a/src/include/catalog/pg_opclass.h
+++ b/src/include/catalog/pg_opclass.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_opclass.h,v 1.10 1998/08/19 02:03:52 momjian Exp $
+ * $Id: pg_opclass.h,v 1.11 1998/09/01 04:35:06 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -108,4 +108,4 @@ DESCR("");
DATA(insert OID = 1313 ( timespan_ops 1186 ));
DESCR("");
-#endif /* PG_OPCLASS_H */
+#endif /* PG_OPCLASS_H */
diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h
index 526da0883a..7c2ff3150a 100644
--- a/src/include/catalog/pg_operator.h
+++ b/src/include/catalog/pg_operator.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_operator.h,v 1.35 1998/09/01 03:27:55 momjian Exp $
+ * $Id: pg_operator.h,v 1.36 1998/09/01 04:35:08 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -88,26 +88,26 @@ typedef FormData_pg_operator *Form_pg_operator;
* ----------------
*/
-DATA(insert OID = 15 ( "=" PGUID 0 b t t 23 20 16 416 417 37 37 int48eq eqsel eqjoinsel ));
-DATA(insert OID = 36 ( "<>" PGUID 0 b t t 23 20 16 417 416 0 0 int48ne neqsel neqjoinsel ));
-DATA(insert OID = 37 ( "<" PGUID 0 b t f 23 20 16 430 430 0 0 int48lt intltsel intltjoinsel ));
-DATA(insert OID = 76 ( ">" PGUID 0 b t f 23 20 16 420 420 0 0 int48gt intgtsel intgtjoinsel ));
-DATA(insert OID = 80 ( "<=" PGUID 0 b t f 23 20 16 419 419 0 0 int48le intlesel intlejoinsel ));
-DATA(insert OID = 82 ( ">=" PGUID 0 b t f 23 20 16 418 418 0 0 int48ge intgesel intgejoinsel ));
-
-DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 85 91 0 0 boollt intltsel intltjoinsel ));
-DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 85 91 0 0 boolgt intltsel intltjoinsel ));
-DATA(insert OID = 85 ( "<>" PGUID 0 b t f 16 16 16 85 91 0 0 boolne neqsel neqjoinsel ));
-DATA(insert OID = 91 ( "=" PGUID 0 b t t 16 16 16 91 85 0 0 booleq eqsel eqjoinsel ));
+DATA(insert OID = 15 ( "=" PGUID 0 b t t 23 20 16 416 417 37 37 int48eq eqsel eqjoinsel ));
+DATA(insert OID = 36 ( "<>" PGUID 0 b t t 23 20 16 417 416 0 0 int48ne neqsel neqjoinsel ));
+DATA(insert OID = 37 ( "<" PGUID 0 b t f 23 20 16 430 430 0 0 int48lt intltsel intltjoinsel ));
+DATA(insert OID = 76 ( ">" PGUID 0 b t f 23 20 16 420 420 0 0 int48gt intgtsel intgtjoinsel ));
+DATA(insert OID = 80 ( "<=" PGUID 0 b t f 23 20 16 419 419 0 0 int48le intlesel intlejoinsel ));
+DATA(insert OID = 82 ( ">=" PGUID 0 b t f 23 20 16 418 418 0 0 int48ge intgesel intgejoinsel ));
+
+DATA(insert OID = 58 ( "<" PGUID 0 b t f 16 16 16 85 91 0 0 boollt intltsel intltjoinsel ));
+DATA(insert OID = 59 ( ">" PGUID 0 b t f 16 16 16 85 91 0 0 boolgt intltsel intltjoinsel ));
+DATA(insert OID = 85 ( "<>" PGUID 0 b t f 16 16 16 85 91 0 0 boolne neqsel neqjoinsel ));
+DATA(insert OID = 91 ( "=" PGUID 0 b t t 16 16 16 91 85 0 0 booleq eqsel eqjoinsel ));
#define BooleanEqualOperator 91
-DATA(insert OID = 92 ( "=" PGUID 0 b t t 18 18 16 92 630 631 631 chareq eqsel eqjoinsel ));
-DATA(insert OID = 93 ( "=" PGUID 0 b t t 19 19 16 93 643 660 660 nameeq eqsel eqjoinsel ));
-DATA(insert OID = 94 ( "=" PGUID 0 b t t 21 21 16 94 519 95 95 int2eq eqsel eqjoinsel ));
-DATA(insert OID = 95 ( "<" PGUID 0 b t f 21 21 16 520 524 0 0 int2lt intltsel intltjoinsel ));
-DATA(insert OID = 96 ( "=" PGUID 0 b t t 23 23 16 96 518 97 97 int4eq eqsel eqjoinsel ));
-DATA(insert OID = 97 ( "<" PGUID 0 b t f 23 23 16 521 525 0 0 int4lt intltsel intltjoinsel ));
-DATA(insert OID = 98 ( "=" PGUID 0 b t t 25 25 16 98 531 664 664 texteq eqsel eqjoinsel ));
+DATA(insert OID = 92 ( "=" PGUID 0 b t t 18 18 16 92 630 631 631 chareq eqsel eqjoinsel ));
+DATA(insert OID = 93 ( "=" PGUID 0 b t t 19 19 16 93 643 660 660 nameeq eqsel eqjoinsel ));
+DATA(insert OID = 94 ( "=" PGUID 0 b t t 21 21 16 94 519 95 95 int2eq eqsel eqjoinsel ));
+DATA(insert OID = 95 ( "<" PGUID 0 b t f 21 21 16 520 524 0 0 int2lt intltsel intltjoinsel ));
+DATA(insert OID = 96 ( "=" PGUID 0 b t t 23 23 16 96 518 97 97 int4eq eqsel eqjoinsel ));
+DATA(insert OID = 97 ( "<" PGUID 0 b t f 23 23 16 521 525 0 0 int4lt intltsel intltjoinsel ));
+DATA(insert OID = 98 ( "=" PGUID 0 b t t 25 25 16 98 531 664 664 texteq eqsel eqjoinsel ));
DATA(insert OID = 329 ( "=" PGUID 0 b t t 1000 1000 16 329 0 0 0 array_eq eqsel eqjoinsel ));
DATA(insert OID = 349 ( "=" PGUID 0 b t t 1001 1001 16 349 0 0 0 array_eq eqsel eqjoinsel ));
@@ -142,19 +142,19 @@ DATA(insert OID = 399 ( "=" PGUID 0 b t t 1026 1026 16 399 0 0 0 array_e
DATA(insert OID = 400 ( "=" PGUID 0 b t t 1027 1027 16 400 0 0 0 array_eq eqsel eqjoinsel ));
DATA(insert OID = 401 ( "=" PGUID 0 b t t 1034 1034 16 401 0 0 0 array_eq eqsel eqjoinsel ));
-DATA(insert OID = 410 ( "=" PGUID 0 b t t 20 20 16 410 411 412 412 int8eq eqsel eqjoinsel ));
-DATA(insert OID = 411 ( "<>" PGUID 0 b t t 20 20 16 411 410 0 0 int8ne neqsel neqjoinsel ));
-DATA(insert OID = 412 ( "<" PGUID 0 b t f 20 20 16 415 415 0 0 int8lt intltsel intltjoinsel ));
-DATA(insert OID = 413 ( ">" PGUID 0 b t f 20 20 16 414 414 0 0 int8gt intgtsel intgtjoinsel ));
-DATA(insert OID = 414 ( "<=" PGUID 0 b t f 20 20 16 413 413 0 0 int8le intlesel intlejoinsel ));
-DATA(insert OID = 415 ( ">=" PGUID 0 b t f 20 20 16 412 412 0 0 int8ge intgesel intgejoinsel ));
+DATA(insert OID = 410 ( "=" PGUID 0 b t t 20 20 16 410 411 412 412 int8eq eqsel eqjoinsel ));
+DATA(insert OID = 411 ( "<>" PGUID 0 b t t 20 20 16 411 410 0 0 int8ne neqsel neqjoinsel ));
+DATA(insert OID = 412 ( "<" PGUID 0 b t f 20 20 16 415 415 0 0 int8lt intltsel intltjoinsel ));
+DATA(insert OID = 413 ( ">" PGUID 0 b t f 20 20 16 414 414 0 0 int8gt intgtsel intgtjoinsel ));
+DATA(insert OID = 414 ( "<=" PGUID 0 b t f 20 20 16 413 413 0 0 int8le intlesel intlejoinsel ));
+DATA(insert OID = 415 ( ">=" PGUID 0 b t f 20 20 16 412 412 0 0 int8ge intgesel intgejoinsel ));
-DATA(insert OID = 416 ( "=" PGUID 0 b t t 20 23 16 15 36 418 418 int84eq eqsel eqjoinsel ));
-DATA(insert OID = 417 ( "<>" PGUID 0 b t t 20 23 16 36 15 0 0 int84ne neqsel neqjoinsel ));
-DATA(insert OID = 418 ( "<" PGUID 0 b t f 20 23 16 82 82 0 0 int84lt intltsel intltjoinsel ));
-DATA(insert OID = 419 ( ">" PGUID 0 b t f 20 23 16 80 80 0 0 int84gt intgtsel intgtjoinsel ));
-DATA(insert OID = 420 ( "<=" PGUID 0 b t f 20 23 16 76 76 0 0 int84le intlesel intlejoinsel ));
-DATA(insert OID = 430 ( ">=" PGUID 0 b t f 20 23 16 37 37 0 0 int84ge intgesel intgejoinsel ));
+DATA(insert OID = 416 ( "=" PGUID 0 b t t 20 23 16 15 36 418 418 int84eq eqsel eqjoinsel ));
+DATA(insert OID = 417 ( "<>" PGUID 0 b t t 20 23 16 36 15 0 0 int84ne neqsel neqjoinsel ));
+DATA(insert OID = 418 ( "<" PGUID 0 b t f 20 23 16 82 82 0 0 int84lt intltsel intltjoinsel ));
+DATA(insert OID = 419 ( ">" PGUID 0 b t f 20 23 16 80 80 0 0 int84gt intgtsel intgtjoinsel ));
+DATA(insert OID = 420 ( "<=" PGUID 0 b t f 20 23 16 76 76 0 0 int84le intlesel intlejoinsel ));
+DATA(insert OID = 430 ( ">=" PGUID 0 b t f 20 23 16 37 37 0 0 int84ge intgesel intgejoinsel ));
DATA(insert OID = 484 ( "-" PGUID 0 l t f 0 20 20 0 0 0 0 int8um intltsel intltjoinsel ));
DATA(insert OID = 485 ( "<<" PGUID 0 b t f 604 604 16 0 0 0 0 poly_left intltsel intltjoinsel ));
@@ -639,8 +639,7 @@ DATA(insert OID = 1617 ( "#" PGUID 0 b t f 628 628 600 1617 0 0 0 line_in
/*
* function prototypes
*/
-extern void
-OperatorCreate(char *operatorName,
+extern void OperatorCreate(char *operatorName,
char *leftTypeName,
char *rightTypeName,
char *procedureName,
@@ -654,4 +653,4 @@ OperatorCreate(char *operatorName,
char *leftSortName,
char *rightSortName);
-#endif /* PG_OPERATOR_H */
+#endif /* PG_OPERATOR_H */
diff --git a/src/include/catalog/pg_parg.h b/src/include/catalog/pg_parg.h
index 2840499856..d70c7de4d9 100644
--- a/src/include/catalog/pg_parg.h
+++ b/src/include/catalog/pg_parg.h
@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_parg.h,v 1.5 1997/09/08 02:35:21 momjian Exp $
+ * $Id: pg_parg.h,v 1.6 1998/09/01 04:35:09 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -114,4 +114,4 @@ DATA(insert OID = 0 ( 66 2 - 23 ));
DATA(insert OID = 0 ( 67 1 - 25 ));
DATA(insert OID = 0 ( 67 2 - 25 ));
-#endif /* PG_PARG_H */
+#endif /* PG_PARG_H */
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 88f304ea1a..06cb99d0c1 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_proc.h,v 1.68 1998/08/25 21:25:44 scrappy Exp $
+ * $Id: pg_proc.h,v 1.69 1998/09/01 04:35:10 momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
@@ -785,13 +785,13 @@ DESCR("");
/* OIDS 400 - 499 */
-DATA(insert OID = 406 ( name_text PGUID 11 f t f 1 f 25 "19" 100 0 0 100 foo bar ));
+DATA(insert OID = 406 ( name_text PGUID 11 f t f 1 f 25 "19" 100 0 0 100 foo bar ));
DESCR("convert");
-DATA(insert OID = 407 ( text_name PGUID 11 f t f 1 f 19 "25" 100 0 0 100 foo bar ));
+DATA(insert OID = 407 ( text_name PGUID 11 f t f 1 f 19 "25" 100 0 0 100 foo bar ));
DESCR("convert");
-DATA(insert OID = 408 ( name_bpchar PGUID 11 f t f 1 f 1042 "19" 100 0 0 100 foo bar ));
+DATA(insert OID = 408 ( name_bpchar PGUID 11 f t f 1 f 1042 "19" 100 0 0 100 foo bar ));
DESCR("convert");
-DATA(insert OID = 409 ( bpchar_name PGUID 11 f t f 1 f 19 "1042" 100 0 0 100 foo bar ));
+DATA(insert OID = 409 ( bpchar_name PGUID 11 f t f 1 f 19 "1042" 100 0 0 100 foo bar ));
DESCR("convert");
DATA(insert OID = 438 ( hashsel PGUID 11 f t t 7 f 701 "26 26 21 0 23 23 26" 100 0 0 100 foo bar ));
@@ -876,11 +876,11 @@ DESCR("less-than-or-equal");
DATA(insert OID = 479 ( int84ge PGUID 11 f t f 2 f 16 "20 23" 100 0 0 100 foo bar ));
DESCR("greater-than-or-equal");
-DATA(insert OID = 480 ( int84 PGUID 11 f t f 1 f 23 "20" 100 0 0 100 foo bar ));
+DATA(insert OID = 480 ( int84 PGUID 11 f t f 1 f 23 "20" 100 0 0 100 foo bar ));
DESCR("convert int8 to int4");
-DATA(insert OID = 481 ( int48 PGUID 11 f t f 1 f 20 "23" 100 0 0 100 foo bar ));
+DATA(insert OID = 481 ( int48 PGUID 11 f t f 1 f 20 "23" 100 0 0 100 foo bar ));
DESCR("convert int4 to int8");
-DATA(insert OID = 482 ( i8tod PGUID 11 f t f 1 f 701 "20" 100 0 0 100 foo bar ));
+DATA(insert OID = 482 ( i8tod PGUID 11 f t f 1 f 701 "20" 100 0 0 100 foo bar ));
DESCR("convert int8 to float8");
DATA(insert OID = 483 ( dtoi8 PGUID 11 f t f 1 f 20 "701" 100 0 0 100 foo bar ));
DESCR("convert float8 to int8");
@@ -1076,9 +1076,9 @@ DESCR("matches LIKE expression");
DATA(insert OID = 859 ( namenlike PGUID 11 f t f 2 f 16 "19 25" 100 0 0 100 foo bar ));
DESCR("does not match LIKE expression");
-DATA(insert OID = 846 ( cash_mul_flt4 PGUID 11 f t f 2 f 790 "790 700" 100 0 0 100 foo bar ));
+DATA(insert OID = 846 ( cash_mul_flt4 PGUID 11 f t f 2 f 790 "790 700" 100 0 0 100 foo bar ));
DESCR("multiply");
-DATA(insert OID = 847 ( cash_div_flt4 PGUID 11 f t f 2 f 790 "790 700" 100 0 0 100 foo bar ));
+DATA(insert OID = 847 ( cash_div_flt4 PGUID 11 f t f 2 f 790 "790 700" 100 0 0 100 foo bar ));
DESCR("divide");
DATA(insert OID = 848 ( flt4_mul_cash PGUID 11 f t f 2 f 790 "700 790" 100 0 0 100 foo bar ));
DESCR("multiply");
@@ -1096,9 +1096,9 @@ DESCR("less-than-or-equal");
DATA(insert OID = 857 ( int48ge PGUID 11 f t f 2 f 16 "21 20" 100 0 0 100 foo bar ));
DESCR("greater-than-or-equal");
-DATA(insert OID = 860 ( char_bpchar PGUID 11 f t f 1 f 1042 "18" 100 0 0 100 foo bar ));
+DATA(insert OID = 860 ( char_bpchar PGUID 11 f t f 1 f 1042 "18" 100 0 0 100 foo bar ));
DESCR("convert to bpchar");
-DATA(insert OID = 861 ( bpchar_char PGUID 11 f t f 1 f 18 "1042" 100 0 0 100 foo bar ));
+DATA(insert OID = 861 ( bpchar_char PGUID 11 f t f 1 f 18 "1042" 100 0 0 100 foo bar ));
DESCR("convert to char");
DATA(insert OID = 862 ( int4_mul_cash PGUID 11 f t f 2 f 790 "23 790" 100 0 0 100 foo bar ));
@@ -1465,9 +1465,9 @@ DESCR("truncate datetime to specified units");
DATA(insert OID = 1218 ( timespan_trunc PGUID 11 f t f 2 f 1186 "25 1186" 100 0 0 100 foo bar ));
DESCR("truncate timespan to specified units");
-DATA(insert OID = 1230 ( bpchar PGUID 14 f t f 1 f 1042 "18" 100 0 0 100 "select char_bpchar($1)" - ));
+DATA(insert OID = 1230 ( bpchar PGUID 14 f t f 1 f 1042 "18" 100 0 0 100 "select char_bpchar($1)" - ));
DESCR("convert to bpchar");
-DATA(insert OID = 1231 ( char PGUID 14 f t f 1 f 23 "1042" 100 0 0 100 "select bpchar_char($1)" - ));
+DATA(insert OID = 1231 ( char PGUID 14 f t f 1 f 23 "1042" 100 0 0 100 "select bpchar_char($1)" - ));
DESCR("convert to char");
DATA(insert OID = 1236 ( int8larger PGUID 11 f t f 2 f 20 "20 20" 100 0 0 100 foo bar ));
@@ -1657,15 +1657,15 @@ DESCR("boolean test");
DATA(insert OID = 1393 ( timespan PGUID 14 f t f 1 f 1186 "25" 100 0 0 100 "select text_timespan($1)" - ));
DESCR("convert");
-DATA(insert OID = 1394 ( name PGUID 14 f t f 1 f 19 "25" 100 0 0 100 "select text_name($1)" - ));
+DATA(insert OID = 1394 ( name PGUID 14 f t f 1 f 19 "25" 100 0 0 100 "select text_name($1)" - ));
DESCR("convert");
-DATA(insert OID = 1395 ( text PGUID 14 f t f 1 f 25 "19" 100 0 0 100 "select name_text($1)" - ));
+DATA(insert OID = 1395 ( text PGUID 14 f t f 1 f 25 "19" 100 0 0 100 "select name_text($1)" - ));
DESCR("convert");
-DATA(insert OID = 1396 ( name PGUID 14 f t f 1 f 19 "1042" 100 0 0 100 "select bpchar_name($1)" - ));
+DATA(insert OID = 1396 ( name PGUID 14 f t f 1 f 19 "1042" 100 0 0 100 "select bpchar_name($1)" - ));
DESCR("convert");
DATA(insert OID = 1397 ( bpchar PGUID 14 f t f 1 f 1042 "19" 100 0 0 100 "select name_bpchar($1)" - ));
DESCR("convert");
-DATA(insert OID = 1398 ( name PGUID 14 f t f 1 f 19 "1043" 100 0 0 100 "select text_name($1)" - ));
+DATA(insert OID = 1398 ( name PGUID 14 f t f 1 f 19 "1043" 100 0 0 100 "select text_name($1)" - ));
DESCR("convert");
DATA(insert OID = 1399 ( varchar PGUID 14 f t f 1 f 1043 "19" 100 0 0 100 "select name_text($1)" - ));
DESCR("convert");
@@ -1856,25 +1856,25 @@ DESCR("closest point to line on line segment");
DATA(insert OID = 1489 ( close_lseg PGUID 11 f t f 2 f 600 "601 601" 100 0 10 100 foo bar ));
DESCR("closest point to line segment on line segment");
-DATA(insert OID = 1490 ( line_in PGUID 11 f t f 1 f 628 "0" 100 0 0 100 foo bar ));
+DATA(insert OID = 1490 ( line_in PGUID 11 f t f 1 f 628 "0" 100 0 0 100 foo bar ));
DESCR("(internal)");
-DATA(insert OID = 1491 ( line_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar ));
+DATA(insert OID = 1491 ( line_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar ));
DESCR("(internal)");
-DATA(insert OID = 1492 ( line_eq PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
+DATA(insert OID = 1492 ( line_eq PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
DESCR("lines equal?");
-DATA(insert OID = 1493 ( line_construct_pp PGUID 11 f t f 2 f 628 "600 600" 100 0 0 100 foo bar ));
+DATA(insert OID = 1493 ( line_construct_pp PGUID 11 f t f 2 f 628 "600 600" 100 0 0 100 foo bar ));
DESCR("line from points");
DATA(insert OID = 1494 ( line_interpt PGUID 11 f t f 2 f 600 "628 628" 100 0 0 100 foo bar ));
DESCR("intersection point");
-DATA(insert OID = 1495 ( line_intersect PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
+DATA(insert OID = 1495 ( line_intersect PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
DESCR("lines intersect?");
-DATA(insert OID = 1496 ( line_parallel PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
+DATA(insert OID = 1496 ( line_parallel PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
DESCR("lines parallel?");
-DATA(insert OID = 1497 ( line_perp PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
+DATA(insert OID = 1497 ( line_perp PGUID 11 f t f 2 f 16 "628 628" 100 0 0 100 foo bar ));
DESCR("lines perpendicular?");
-DATA(insert OID = 1498 ( line_vertical PGUID 11 f t f 1 f 16 "628" 100 0 0 100 foo bar ));
+DATA(insert OID = 1498 ( line_vertical PGUID 11 f t f 1 f 16 "628" 100 0 0 100 foo bar ));
DESCR("lines vertical?");
-DATA(insert OID = 1499 ( line_horizontal PGUID 11 f t f 1 f 16 "628" 100 0 0 100 foo bar ));
+DATA(insert OID = 1499 ( line_horizontal PGUID 11 f t f 1 f 16 "628" 100 0 0 100 foo bar ));
DESCR("lines horizontal?");
/* OIDS 1500 - 1599 */
@@ -1965,13 +1965,13 @@ DESCR("");
DATA(insert OID = 1584 ( area PGUID 14 f t f 1 f 701 "718" 100 0 0 100 "select circle_area($1)" - ));
DESCR("");
-DATA(insert OID = 1592 ( int8 PGUID 14 f t f 1 f 20 "20" 100 0 0 100 "select $1" - ));
+DATA(insert OID = 1592 ( int8 PGUID 14 f t f 1 f 20 "20" 100 0 0 100 "select $1" - ));
DESCR("convert int8 to int8 (no-op)");
-DATA(insert OID = 1593 ( int8 PGUID 14 f t f 1 f 20 "23" 100 0 0 100 "select int48($1)" - ));
+DATA(insert OID = 1593 ( int8 PGUID 14 f t f 1 f 20 "23" 100 0 0 100 "select int48($1)" - ));
DESCR("convert int4 to int8");
-DATA(insert OID = 1594 ( int8 PGUID 14 f t f 1 f 20 "701" 100 0 0 100 "select dtoi8($1)" - ));
+DATA(insert OID = 1594 ( int8 PGUID 14 f t f 1 f 20 "701" 100 0 0 100 "select dtoi8($1)" - ));
DESCR("convert float8 to int8");
-DATA(insert OID = 1595 ( int4 PGUID 14 f t f 1 f 23 "20" 100 0 0 100 "select int84($1)" - ));
+DATA(insert OID = 1595 ( int4 PGUID 14 f t f 1 f 23 "20" 100 0 0 100 "select int84($1)" - ));
DESCR("convert int8 to int4");
DATA(insert OID = 1596 ( float8 PGUID 14 f t f 1 f 701 "20" 100 0 0 100 "select i8tod($1)" - ));
DESCR("convert int8 to float8");
@@ -1980,11 +1980,11 @@ DESCR("convert int8 to float8");
DATA(insert OID = 1600 ( line PGUID 14 f t f 2 f 628 "600 600" 100 0 0 100 "select line_construct_pp($1, $2)" - ));
DESCR("");
-DATA(insert OID = 1601 ( ishorizontal PGUID 14 f t f 1 f 16 "628" 100 0 0 100 "select line_horizontal($1)" - ));
+DATA(insert OID = 1601 ( ishorizontal PGUID 14 f t f 1 f 16 "628" 100 0 0 100 "select line_horizontal($1)" - ));
DESCR("");
-DATA(insert OID = 1602 ( isvertical PGUID 14 f t f 1 f 16 "628" 100 0 0 100 "select line_vertical($1)" - ));
+DATA(insert OID = 1602 ( isvertical PGUID 14 f t f 1 f 16 "628" 100 0 0 100 "select line_vertical($1)" - ));
DESCR("");
-DATA(insert OID = 1603 ( isparallel PGUID 14 f t f 2 f 16 "628 628" 100 0 0 100 "select line_parallel($1, $2)" - ));
+DATA(insert OID = 1603 ( isparallel PGUID 14 f t f 2 f 16 "628 628" 100 0 0 100 "select line_parallel($1, $2)" - ));
DESCR("");
/* Oracle Compatibility Related Functions - By Edmund Mergl <[email protected]> */
@@ -2044,8 +2044,7 @@ DESCR("select statement of a view");
/*
* prototypes for functions pg_proc.c
*/
-extern Oid
-ProcedureCreate(char *procedureName,
+extern Oid ProcedureCreate(char *procedureName,
bool returnsSet,
char *returnTypeName,
char *languageName,
@@ -2061,4 +2060,4 @@ ProcedureCreate(char *procedureName,
CommandDest dest);
-#endif /* PG_PROC_H */
+#endif /* PG_PROC_H */
diff --git a/src/include/catalog/pg_relcheck.h b/src/include/catalog/pg_relcheck.h
index 2b80bd9424..1c02734855 100644
--- a/src/include/catalog/pg_relcheck.h
+++ b/src/include/catalog/pg_relcheck.h
@@ -51,4 +51,4 @@ typedef FormData_pg_relcheck *Form_pg_relcheck;
#define Anum_pg_relcheck_rcbin 3
#define Anum_pg_relcheck_rcsrc 4
-#endif /* PG_RELCHECK_H */
+#endif /* PG_RELCHECK_H */
diff --git a/src/include/catalog/pg_rewrite.h b/src/include/catalog/pg_rewrite.h
index 8ec1ba8b9f..39ec022b47 100644
--- a/src/include/catalog/pg_rewrite.h
+++ b/src/include/catalog/pg_rewrite.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_rewrite.h,v 1.5 1997/10/25 05:25:10 thomas Exp $
+ * $Id: pg_rewrite.h,v 1.6 1998/09/01 04:35:13 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -61,4 +61,4 @@ typedef FormData_pg_rewrite *Form_pg_rewrite;
#define Anum_pg_rewrite_ev_qual 6
#define Anum_pg_rewrite_ev_action 7
-#endif /* PG_REWRITE_H */
+#endif /* PG_REWRITE_H */
diff --git a/src/include/catalog/pg_shadow.h b/src/include/catalog/pg_shadow.h
index fbe03775cd..9d4c4549b8 100644
--- a/src/include/catalog/pg_shadow.h
+++ b/src/include/catalog/pg_shadow.h
@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_shadow.h,v 1.2 1998/02/26 04:41:00 momjian Exp $
+ * $Id: pg_shadow.h,v 1.3 1998/09/01 04:35:14 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -99,7 +99,7 @@ DATA(insert OID = 0 ( woodruff 31026 t t t t _null_ 2116994400 ));
DATA(insert OID = 0 ( searcher 8261 t t t t _null_ 2116994400 ));
BKI_BEGIN
-#endif /* ALLOW_PG_GROUP */
+#endif /* ALLOW_PG_GROUP */
BKI_END
-#endif /* PG_SHADOW_H */
+#endif /* PG_SHADOW_H */
diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h
index 7b0919b1e1..3e968eb775 100644
--- a/src/include/catalog/pg_statistic.h
+++ b/src/include/catalog/pg_statistic.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_statistic.h,v 1.4 1997/09/08 02:35:27 momjian Exp $
+ * $Id: pg_statistic.h,v 1.5 1998/09/01 04:35:15 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -57,4 +57,4 @@ typedef FormData_pg_statistic *Form_pg_statistic;
#define Anum_pg_statistic_stalokey 4
#define Anum_pg_statistic_stahikey 5
-#endif /* PG_STATISTIC_H */
+#endif /* PG_STATISTIC_H */
diff --git a/src/include/catalog/pg_trigger.h b/src/include/catalog/pg_trigger.h
index 83fcbef656..9b25508dd7 100644
--- a/src/include/catalog/pg_trigger.h
+++ b/src/include/catalog/pg_trigger.h
@@ -78,4 +78,4 @@ typedef FormData_pg_trigger *Form_pg_trigger;
#define TRIGGER_FOR_DELETE(type) (type & TRIGGER_TYPE_DELETE)
#define TRIGGER_FOR_UPDATE(type) (type & TRIGGER_TYPE_UPDATE)
-#endif /* PG_TRIGGER_H */
+#endif /* PG_TRIGGER_H */
diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h
index 9f204bfec1..99d0de22dc 100644
--- a/src/include/catalog/pg_type.h
+++ b/src/include/catalog/pg_type.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_type.h,v 1.46 1998/09/01 03:27:58 momjian Exp $
+ * $Id: pg_type.h,v 1.47 1998/09/01 04:35:18 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -67,8 +67,8 @@ CATALOG(pg_type) BOOTSTRAP
* the I/O routines are written to expect pass by reference. Note that
* float4 is written for pass by reference and has a declared length
* of 4 bytes, so it looks like pass by reference must be consistant
- * with the declared length, and typbyval is used somewhere.
- * - tgl 1997-03-20).
+ * with the declared length, and typbyval is used somewhere. - tgl
+ * 1997-03-20).
*/
char typtype;
bool typisdefined;
@@ -166,7 +166,7 @@ DATA(insert OID = 19 ( name PGUID NAMEDATALEN NAMEDATALEN f b t \054 0 18 na
DESCR("31-character type for storing system identifiers");
#define NAMEOID 19
-DATA(insert OID = 20 ( int8 PGUID 8 20 f b t \054 0 0 int8in int8out int8in int8out d _null_ ));
+DATA(insert OID = 20 ( int8 PGUID 8 20 f b t \054 0 0 int8in int8out int8in int8out d _null_ ));
DESCR("eight-byte integer, >18 digits");
#define INT8OID 20
@@ -374,8 +374,7 @@ DESCR("limited-range ISO-format date and time");
*/
extern Oid TypeGet(char *typeName, bool *defined);
extern Oid TypeShellMake(char *typeName);
-extern Oid
-TypeCreate(char *typeName,
+extern Oid TypeCreate(char *typeName,
Oid relationOid,
int16 internalSize,
int16 externalSize,
@@ -392,4 +391,4 @@ extern void TypeRename(char *oldTypeName, char *newTypeName);
extern char *makeArrayTypeName(char *typeName);
-#endif /* PG_TYPE_H */
+#endif /* PG_TYPE_H */
diff --git a/src/include/catalog/pg_variable.h b/src/include/catalog/pg_variable.h
index 95063125c8..79db4abfb1 100644
--- a/src/include/catalog/pg_variable.h
+++ b/src/include/catalog/pg_variable.h
@@ -9,7 +9,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_variable.h,v 1.4 1997/09/08 02:35:34 momjian Exp $
+ * $Id: pg_variable.h,v 1.5 1998/09/01 04:35:19 momjian Exp $
*
* NOTES
* The structures and macros used by the transam/ code
@@ -37,4 +37,4 @@ typedef FormData_pg_variable *Form_pg_variable;
#define Natts_pg_variable 1
#define Anum_pg_variable_varfoo 1
-#endif /* PG_VARIABLE_H */
+#endif /* PG_VARIABLE_H */
diff --git a/src/include/catalog/pg_version.h b/src/include/catalog/pg_version.h
index eaf98ffa0e..a38ab0d2df 100644
--- a/src/include/catalog/pg_version.h
+++ b/src/include/catalog/pg_version.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_version.h,v 1.6 1998/09/01 03:28:00 momjian Exp $
+ * $Id: pg_version.h,v 1.7 1998/09/01 04:35:20 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
@@ -54,4 +54,4 @@ typedef FormData_pg_version *Form_pg_version;
#define Anum_pg_version_vertime 3
-#endif /* PG_VERSION_H */
+#endif /* PG_VERSION_H */
diff --git a/src/include/commands/async.h b/src/include/commands/async.h
index bf92a27ee5..2c9d0a348a 100644
--- a/src/include/commands/async.h
+++ b/src/include/commands/async.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: async.h,v 1.8 1998/08/25 21:37:00 scrappy Exp $
+ * $Id: async.h,v 1.9 1998/09/01 04:35:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,4 +24,4 @@ extern void Async_Unlisten(char *relname, int pid);
extern GlobalMemory notifyContext;
-#endif /* ASYNC_H */
+#endif /* ASYNC_H */
diff --git a/src/include/commands/cluster.h b/src/include/commands/cluster.h
index ed89240ae7..ece07382e6 100644
--- a/src/include/commands/cluster.h
+++ b/src/include/commands/cluster.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994-5, Regents of the University of California
*
- * $Id: cluster.h,v 1.5 1998/09/01 03:28:02 momjian Exp $
+ * $Id: cluster.h,v 1.6 1998/09/01 04:35:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,4 +24,4 @@
*/
extern void cluster(char *oldrelname, char *oldindexname);
-#endif /* CLUSTER_H */
+#endif /* CLUSTER_H */
diff --git a/src/include/commands/command.h b/src/include/commands/command.h
index c10807668d..4091a5583e 100644
--- a/src/include/commands/command.h
+++ b/src/include/commands/command.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: command.h,v 1.9 1998/02/26 04:41:04 momjian Exp $
+ * $Id: command.h,v 1.10 1998/09/01 04:35:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,8 +26,7 @@ extern MemoryContext PortalExecutorHeapMemory;
* BadArg if forward invalid.
* "WARN" if portal not found.
*/
-extern void
-PerformPortalFetch(char *name, bool forward, int count,
+extern void PerformPortalFetch(char *name, bool forward, int count,
char *tag, CommandDest dest);
/*
@@ -42,8 +41,7 @@ extern void PortalCleanup(Portal portal);
* PerformAddAttribute --
* Performs the POSTQUEL function ADD.
*/
-extern void
-PerformAddAttribute(char *relationName, char *userName,
+extern void PerformAddAttribute(char *relationName, char *userName,
bool inh, ColumnDef *colDef);
-#endif /* COMMAND_H */
+#endif /* COMMAND_H */
diff --git a/src/include/commands/copy.h b/src/include/commands/copy.h
index e1fb6a3783..16254a33ad 100644
--- a/src/include/commands/copy.h
+++ b/src/include/commands/copy.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: copy.h,v 1.3 1997/09/07 04:57:23 momjian Exp $
+ * $Id: copy.h,v 1.4 1998/09/01 04:35:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,8 +14,7 @@
#define COPY_H
-void
-DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, char *filename,
+void DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe, char *filename,
char *delim);
-#endif /* COPY_H */
+#endif /* COPY_H */
diff --git a/src/include/commands/creatinh.h b/src/include/commands/creatinh.h
index f4e5f39668..a80e754700 100644
--- a/src/include/commands/creatinh.h
+++ b/src/include/commands/creatinh.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: creatinh.h,v 1.7 1998/08/06 05:13:10 momjian Exp $
+ * $Id: creatinh.h,v 1.8 1998/09/01 04:35:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,4 +18,4 @@
extern void DefineRelation(CreateStmt *stmt, char relkind);
extern void RemoveRelation(char *name);
-#endif /* CREATINH_H */
+#endif /* CREATINH_H */
diff --git a/src/include/commands/dbcommands.h b/src/include/commands/dbcommands.h
index 0ee47857c8..d55f45cbfe 100644
--- a/src/include/commands/dbcommands.h
+++ b/src/include/commands/dbcommands.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dbcommands.h,v 1.5 1998/08/24 01:14:20 momjian Exp $
+ * $Id: dbcommands.h,v 1.6 1998/09/01 04:35:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,4 +22,4 @@
extern void createdb(char *dbname, char *dbpath, int encoding);
extern void destroydb(char *dbname);
-#endif /* DBCOMMANDS_H */
+#endif /* DBCOMMANDS_H */
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h
index 9a78b32942..37b287d9fa 100644
--- a/src/include/commands/defrem.h
+++ b/src/include/commands/defrem.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: defrem.h,v 1.12 1998/02/26 04:41:06 momjian Exp $
+ * $Id: defrem.h,v 1.13 1998/09/01 04:35:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,8 +19,7 @@
/*
* prototypes in defind.c
*/
-extern void
-DefineIndex(char *heapRelationName,
+extern void DefineIndex(char *heapRelationName,
char *indexRelationName,
char *accessMethodName,
List *attributeList,
@@ -28,8 +27,7 @@ DefineIndex(char *heapRelationName,
bool unique,
Expr *predicate,
List *rangetable);
-extern void
-ExtendIndex(char *indexRelationName,
+extern void ExtendIndex(char *indexRelationName,
Expr *predicate,
List *rangetable);
extern void RemoveIndex(char *name);
@@ -47,10 +45,9 @@ extern void CreateFunction(ProcedureStmt *stmt, CommandDest dest);
* prototypes in remove.c
*/
extern void RemoveFunction(char *functionName, int nargs, List *argNameList);
-extern void
-RemoveOperator(char *operatorName,
+extern void RemoveOperator(char *operatorName,
char *typeName1, char *typeName2);
extern void RemoveType(char *typeName);
extern void RemoveAggregate(char *aggName, char *aggType);
-#endif /* DEFREM_H */
+#endif /* DEFREM_H */
diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h
index 6b808582a0..d9ca4b1995 100644
--- a/src/include/commands/explain.h
+++ b/src/include/commands/explain.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994-5, Regents of the University of California
*
- * $Id: explain.h,v 1.6 1997/11/26 01:12:16 momjian Exp $
+ * $Id: explain.h,v 1.7 1998/09/01 04:35:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,4 +17,4 @@
extern void ExplainQuery(Query *query, bool verbose, CommandDest dest);
-#endif /* EXPLAIN_H */
+#endif /* EXPLAIN_H */
diff --git a/src/include/commands/proclang.h b/src/include/commands/proclang.h
index 7b9fdf34da..b1ad0f8493 100644
--- a/src/include/commands/proclang.h
+++ b/src/include/commands/proclang.h
@@ -14,4 +14,4 @@
extern void CreateProceduralLanguage(CreatePLangStmt *stmt);
extern void DropProceduralLanguage(DropPLangStmt *stmt);
-#endif /* PROCLANG_H */
+#endif /* PROCLANG_H */
diff --git a/src/include/commands/recipe.h b/src/include/commands/recipe.h
index c90d663295..119e2e1280 100644
--- a/src/include/commands/recipe.h
+++ b/src/include/commands/recipe.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: recipe.h,v 1.5 1997/11/26 01:12:24 momjian Exp $
+ * $Id: recipe.h,v 1.6 1998/09/01 04:35:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,4 +16,4 @@
extern void beginRecipe(RecipeStmt *stmt);
-#endif /* RECIPE_H */
+#endif /* RECIPE_H */
diff --git a/src/include/commands/rename.h b/src/include/commands/rename.h
index 49c42b6b33..e2ddce6d9a 100644
--- a/src/include/commands/rename.h
+++ b/src/include/commands/rename.h
@@ -6,21 +6,19 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rename.h,v 1.4 1998/02/26 04:41:08 momjian Exp $
+ * $Id: rename.h,v 1.5 1998/09/01 04:35:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef RENAME_H
#define RENAME_H
-extern void
-renameatt(char *relname,
+extern void renameatt(char *relname,
char *oldattname,
char *newattname,
char *userName, int recurse);
-extern void
-renamerel(char *oldrelname,
+extern void renamerel(char *oldrelname,
char *newrelname);
-#endif /* RENAME_H */
+#endif /* RENAME_H */
diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h
index f2186cccda..89b628b437 100644
--- a/src/include/commands/sequence.h
+++ b/src/include/commands/sequence.h
@@ -30,7 +30,7 @@
extern void DefineSequence(CreateSeqStmt *stmt);
extern int4 nextval(struct varlena * seqname);
extern int4 currval(struct varlena * seqname);
-extern int4 setval (struct varlena * seqname, int4 next);
+extern int4 setval(struct varlena * seqname, int4 next);
extern void CloseSequences(void);
-#endif /* SEQUENCE_H */
+#endif /* SEQUENCE_H */
diff --git a/src/include/commands/trigger.h b/src/include/commands/trigger.h
index 1ed6b61d1d..3cc0fdcc06 100644
--- a/src/include/commands/trigger.h
+++ b/src/include/commands/trigger.h
@@ -70,4 +70,4 @@ extern void ExecARDeleteTriggers(Relation rel, ItemPointer tupleid);
extern HeapTuple ExecBRUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple tuple);
extern void ExecARUpdateTriggers(Relation rel, ItemPointer tupleid, HeapTuple tuple);
-#endif /* TRIGGER_H */
+#endif /* TRIGGER_H */
diff --git a/src/include/commands/user.h b/src/include/commands/user.h
index d75478403d..a81c6617e8 100644
--- a/src/include/commands/user.h
+++ b/src/include/commands/user.h
@@ -14,4 +14,4 @@ extern void DefineUser(CreateUserStmt *stmt);
extern void AlterUser(AlterUserStmt *stmt);
extern void RemoveUser(char *user);
-#endif /* USER_H */
+#endif /* USER_H */
diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h
index 47a818fb4b..126a9e9f5a 100644
--- a/src/include/commands/vacuum.h
+++ b/src/include/commands/vacuum.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: vacuum.h,v 1.15 1998/09/01 03:28:04 momjian Exp $
+ * $Id: vacuum.h,v 1.16 1998/09/01 04:35:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,9 +33,11 @@ typedef struct VPageDescrData
{
BlockNumber vpd_blkno; /* BlockNumber of this Page */
Size vpd_free; /* FreeSpace on this Page */
- uint16 vpd_offsets_used; /* Number of OffNums used by vacuum */
- uint16 vpd_offsets_free; /* Number of OffNums free or to be free */
- OffsetNumber vpd_offsets[1]; /* Array of its OffNums */
+ uint16 vpd_offsets_used; /* Number of OffNums used by
+ * vacuum */
+ uint16 vpd_offsets_free; /* Number of OffNums free or to be
+ * free */
+ OffsetNumber vpd_offsets[1];/* Array of its OffNums */
} VPageDescrData;
typedef VPageDescrData *VPageDescr;
@@ -43,7 +45,7 @@ typedef VPageDescrData *VPageDescr;
typedef struct VPageListData
{
int vpl_empty_end_pages; /* Number of "empty" end-pages */
- int vpl_num_pages; /* Number of pages in vpl_pagedesc */
+ int vpl_num_pages; /* Number of pages in vpl_pagedesc */
VPageDescr *vpl_pagedesc; /* Descriptions of pages */
} VPageListData;
@@ -112,4 +114,4 @@ extern void vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec);
#define ATTNVALS_SCALE 1000000000 /* XXX so it can act as a float4 */
-#endif /* VACUUM_H */
+#endif /* VACUUM_H */
diff --git a/src/include/commands/variable.h b/src/include/commands/variable.h
index 92f4bda346..4acb426710 100644
--- a/src/include/commands/variable.h
+++ b/src/include/commands/variable.h
@@ -2,7 +2,7 @@
* Headers for handling of 'SET var TO', 'SHOW var' and 'RESET var'
* statements
*
- * $Id: variable.h,v 1.5 1998/07/26 04:31:24 scrappy Exp $
+ * $Id: variable.h,v 1.6 1998/09/01 04:35:40 momjian Exp $
*
*/
#ifndef VARIABLE_H
@@ -55,4 +55,4 @@ extern bool show_geqo(void);
extern bool reset_geqo(void);
extern bool parse_geqo(const char *);
-#endif /* VARIABLE_H */
+#endif /* VARIABLE_H */
diff --git a/src/include/commands/version.h b/src/include/commands/version.h
index 7365a82962..7dd3c4e68e 100644
--- a/src/include/commands/version.h
+++ b/src/include/commands/version.h
@@ -6,11 +6,11 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: version.h,v 1.5 1997/09/07 04:57:35 momjian Exp $
+ * $Id: version.h,v 1.6 1998/09/01 04:35:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef VERSION_H
#define VERSION_H
-#endif /* VERSION_H */
+#endif /* VERSION_H */
diff --git a/src/include/commands/view.h b/src/include/commands/view.h
index da1276d9a7..d039b56b91 100644
--- a/src/include/commands/view.h
+++ b/src/include/commands/view.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: view.h,v 1.5 1997/11/26 01:12:33 momjian Exp $
+ * $Id: view.h,v 1.6 1998/09/01 04:35:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,4 +19,4 @@ extern char *MakeRetrieveViewRuleName(char *view_name);
extern void DefineView(char *view_name, Query *view_parse);
extern void RemoveView(char *view_name);
-#endif /* VIEW_H */
+#endif /* VIEW_H */
diff --git a/src/include/executor/execFlatten.h b/src/include/executor/execFlatten.h
index 3ecb90810b..36f434804f 100644
--- a/src/include/executor/execFlatten.h
+++ b/src/include/executor/execFlatten.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execFlatten.h,v 1.6 1997/11/26 01:12:36 momjian Exp $
+ * $Id: execFlatten.h,v 1.7 1998/09/01 04:35:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,4 +22,4 @@ extern Datum ExecEvalIter(Iter *iterNode, ExprContext *econtext, bool *resultIsN
extern void ExecEvalFjoin(TargetEntry *tlist, ExprContext *econtext, bool *isNullVect, bool *fj_isDone);
-#endif /* EXECFLATTEN_H */
+#endif /* EXECFLATTEN_H */
diff --git a/src/include/executor/execdebug.h b/src/include/executor/execdebug.h
index d9a746a725..40ffd4a1d4 100644
--- a/src/include/executor/execdebug.h
+++ b/src/include/executor/execdebug.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execdebug.h,v 1.5 1998/06/15 18:39:55 momjian Exp $
+ * $Id: execdebug.h,v 1.6 1998/09/01 04:35:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -202,7 +202,7 @@ extern int NIndexTupleInserted;
#define IncrProcessed() (void)(0)
#define IncrIndexProcessed() (void)(0)
#define IncrIndexInserted() (void)(0)
-#endif /* EXEC_TUPLECOUNT */
+#endif /* EXEC_TUPLECOUNT */
/* ----------------
* memory context debugging defines
@@ -214,7 +214,7 @@ extern int NIndexTupleInserted;
#else
#define CXT_printf(s)
#define CXT1_printf(s, a)
-#endif /* EXEC_CONTEXTDEBUG */
+#endif /* EXEC_CONTEXTDEBUG */
/* ----------------
* eutils debugging defines
@@ -234,7 +234,7 @@ extern int NIndexTupleInserted;
#define EU2_printf(s, a, b)
#define EU3_printf(s, a, b, c)
#define EU4_printf(s, a, b, c, d)
-#endif /* EXEC_UTILSDEBUG */
+#endif /* EXEC_UTILSDEBUG */
/* ----------------
@@ -253,7 +253,7 @@ extern int NIndexTupleInserted;
#define NL1_printf(s, a)
#define NL4_printf(s, a, b, c, d)
#define ENL1_printf(message)
-#endif /* EXEC_NESTLOOPDEBUG */
+#endif /* EXEC_NESTLOOPDEBUG */
/* ----------------
* proc node debugging defines
@@ -265,7 +265,7 @@ extern int NIndexTupleInserted;
#else
#define PN_printf(s)
#define PN1_printf(s, p)
-#endif /* EXEC_PROCDEBUG */
+#endif /* EXEC_PROCDEBUG */
/* ----------------
* exec eval / target list debugging defines
@@ -281,7 +281,7 @@ extern int NIndexTupleInserted;
#define EV_printf(s)
#define EV1_printf(s, a)
#define EV5_printf(s, a, b, c, d, e)
-#endif /* EXEC_EVALDEBUG */
+#endif /* EXEC_EVALDEBUG */
/* ----------------
* scan debugging defines
@@ -295,7 +295,7 @@ extern int NIndexTupleInserted;
#define S_nodeDisplay(l)
#define S_printf(s)
#define S1_printf(s, p)
-#endif /* EXEC_SCANDEBUG */
+#endif /* EXEC_SCANDEBUG */
/* ----------------
* sort node debugging defines
@@ -309,7 +309,7 @@ extern int NIndexTupleInserted;
#define SO_nodeDisplay(l)
#define SO_printf(s)
#define SO1_printf(s, p)
-#endif /* EXEC_SORTDEBUG */
+#endif /* EXEC_SORTDEBUG */
/* ----------------
* merge join debugging defines
@@ -343,7 +343,7 @@ extern int NIndexTupleInserted;
#define MJ_DEBUG_QUAL(clause, res)
#define MJ_DEBUG_MERGE_COMPARE(qual, res)
#define MJ_DEBUG_PROC_NODE(slot)
-#endif /* EXEC_MERGEJOINDEBUG */
+#endif /* EXEC_MERGEJOINDEBUG */
/* ----------------------------------------------------------------
* DO NOT DEFINE THESE EVER OR YOU WILL BURN!
@@ -381,4 +381,4 @@ extern int NIndexTupleInserted;
extern long NDirectFileRead;
extern long NDirectFileWrite;
-#endif /* ExecDebugIncluded */
+#endif /* ExecDebugIncluded */
diff --git a/src/include/executor/execdefs.h b/src/include/executor/execdefs.h
index 59748cfe9b..330801e2f9 100644
--- a/src/include/executor/execdefs.h
+++ b/src/include/executor/execdefs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execdefs.h,v 1.2 1997/09/07 04:57:46 momjian Exp $
+ * $Id: execdefs.h,v 1.3 1998/09/01 04:35:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,4 +44,4 @@
#define EXEC_MJ_SKIPINNER 8
#define EXEC_MJ_SKIPOUTER 9
-#endif /* EXECDEFS_H */
+#endif /* EXECDEFS_H */
diff --git a/src/include/executor/execdesc.h b/src/include/executor/execdesc.h
index b7d71250ea..258ff39fae 100644
--- a/src/include/executor/execdesc.h
+++ b/src/include/executor/execdesc.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execdesc.h,v 1.8 1998/02/26 04:41:17 momjian Exp $
+ * $Id: execdesc.h,v 1.9 1998/09/01 04:35:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,8 +33,7 @@ typedef struct QueryDesc
} QueryDesc;
/* in pquery.c */
-extern QueryDesc *
-CreateQueryDesc(Query *parsetree, Plan *plantree,
+extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
CommandDest dest);
-#endif /* EXECDESC_H */
+#endif /* EXECDESC_H */
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index fea963fc11..cf218dcd7f 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: executor.h,v 1.24 1998/09/01 03:28:06 momjian Exp $
+ * $Id: executor.h,v 1.25 1998/09/01 04:35:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,14 +59,12 @@
/*
* prototypes from functions in execAmi.c
*/
-extern void
-ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex,
- ScanDirection dir, Snapshot snapshot,
+extern void ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex,
+ ScanDirection dir, Snapshot snapshot,
Relation *returnRelation, Pointer *returnScanDesc);
extern void ExecCloseR(Plan *node);
extern void ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent);
-extern HeapScanDesc
-ExecReScanR(Relation relDesc, HeapScanDesc scanDesc,
+extern HeapScanDesc ExecReScanR(Relation relDesc, HeapScanDesc scanDesc,
ScanDirection direction, int nkeys, ScanKey skeys);
extern void ExecMarkPos(Plan *node);
extern void ExecRestrPos(Plan *node);
@@ -76,8 +74,7 @@ extern Relation ExecCreatR(TupleDesc tupType, Oid relationOid);
* prototypes from functions in execJunk.c
*/
extern JunkFilter *ExecInitJunkFilter(List *targetList);
-extern bool
-ExecGetJunkAttribute(JunkFilter *junkfilter, TupleTableSlot *slot,
+extern bool ExecGetJunkAttribute(JunkFilter *junkfilter, TupleTableSlot *slot,
char *attrName, Datum *value, bool *isNull);
extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot);
@@ -104,20 +101,16 @@ extern void ExecEndNode(Plan *node, Plan *parent);
extern bool execConstByVal;
extern int execConstLen;
-extern Datum
-ExecExtractResult(TupleTableSlot *slot, AttrNumber attnum,
+extern Datum ExecExtractResult(TupleTableSlot *slot, AttrNumber attnum,
bool *isNull);
-extern Datum
-ExecEvalParam(Param *expression, ExprContext *econtext,
+extern Datum ExecEvalParam(Param *expression, ExprContext *econtext,
bool *isNull);
/* stop here */
-extern char *
-GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno,
+extern char *GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno,
bool *isNull);
extern char *GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull);
-extern Datum
-ExecEvalExpr(Node *expression, ExprContext *econtext, bool *isNull,
+extern Datum ExecEvalExpr(Node *expression, ExprContext *econtext, bool *isNull,
bool *isDone);
extern bool ExecQual(List *qual, ExprContext *econtext);
extern int ExecTargetListLength(List *targetlist);
@@ -134,20 +127,17 @@ extern TupleTableSlot *ExecScan(Scan *node, TupleTableSlot *(*accessMtd) ());
extern TupleTable ExecCreateTupleTable(int initialSize);
extern void ExecDestroyTupleTable(TupleTable table, bool shouldFree);
extern TupleTableSlot *ExecAllocTableSlot(TupleTable table);
-extern TupleTableSlot *
-ExecStoreTuple(HeapTuple tuple,
+extern TupleTableSlot *ExecStoreTuple(HeapTuple tuple,
TupleTableSlot *slot,
Buffer buffer,
bool shouldFree);
extern TupleTableSlot *ExecClearTuple(TupleTableSlot *slot);
extern bool ExecSetSlotPolicy(TupleTableSlot *slot, bool shouldFree);
-extern TupleDesc
-ExecSetSlotDescriptor(TupleTableSlot *slot,
+extern TupleDesc ExecSetSlotDescriptor(TupleTableSlot *slot,
TupleDesc tupdesc);
extern void ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, bool isNew);
extern void ExecInitResultTupleSlot(EState *estate, CommonState *commonstate);
-extern void
-ExecInitScanTupleSlot(EState *estate,
+extern void ExecInitScanTupleSlot(EState *estate,
CommonScanState *commonscanstate);
extern void ExecInitMarkedTupleSlot(EState *estate, MergeJoinState *mergestate);
extern void ExecInitOuterTupleSlot(EState *estate, HashJoinState *hashstate);
@@ -160,35 +150,28 @@ extern void SetChangedParamList(Plan *node, List *newchg);
* prototypes from functions in execTuples.c
*/
extern void ResetTupleCount(void);
-extern void
-ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode,
+extern void ExecAssignNodeBaseInfo(EState *estate, CommonState *basenode,
Plan *parent);
extern void ExecAssignExprContext(EState *estate, CommonState *commonstate);
-extern void
-ExecAssignResultType(CommonState *commonstate,
+extern void ExecAssignResultType(CommonState *commonstate,
TupleDesc tupDesc);
-extern void
-ExecAssignResultTypeFromOuterPlan(Plan *node,
+extern void ExecAssignResultTypeFromOuterPlan(Plan *node,
CommonState *commonstate);
extern void ExecAssignResultTypeFromTL(Plan *node, CommonState *commonstate);
extern TupleDesc ExecGetResultType(CommonState *commonstate);
extern void ExecAssignProjectionInfo(Plan *node, CommonState *commonstate);
extern void ExecFreeProjectionInfo(CommonState *commonstate);
extern TupleDesc ExecGetScanType(CommonScanState *csstate);
-extern void
-ExecAssignScanType(CommonScanState *csstate,
+extern void ExecAssignScanType(CommonScanState *csstate,
TupleDesc tupDesc);
-extern void
-ExecAssignScanTypeFromOuterPlan(Plan *node,
+extern void ExecAssignScanTypeFromOuterPlan(Plan *node,
CommonScanState *csstate);
extern Form_pg_attribute ExecGetTypeInfo(Relation relDesc);
-extern void
-ExecOpenIndices(Oid resultRelationOid,
+extern void ExecOpenIndices(Oid resultRelationOid,
RelationInfo *resultRelationInfo);
extern void ExecCloseIndices(RelationInfo *resultRelationInfo);
-extern void
-ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid,
+extern void ExecInsertIndexTuples(TupleTableSlot *slot, ItemPointer tupleid,
EState *estate, bool is_update);
-#endif /* EXECUTOR_H */
+#endif /* EXECUTOR_H */
diff --git a/src/include/executor/functions.h b/src/include/executor/functions.h
index 209d4b34e9..c521b9efd6 100644
--- a/src/include/executor/functions.h
+++ b/src/include/executor/functions.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: functions.h,v 1.7 1998/02/26 04:41:20 momjian Exp $
+ * $Id: functions.h,v 1.8 1998/09/01 04:35:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,12 +18,10 @@
#include "nodes/primnodes.h"
#include "utils/syscache.h"
-extern Datum
-ProjectAttribute(TupleDesc TD, TargetEntry *tlist,
+extern Datum ProjectAttribute(TupleDesc TD, TargetEntry *tlist,
HeapTuple tup, bool *isnullP);
-extern Datum
-postquel_function(Func *funcNode, char **args,
+extern Datum postquel_function(Func *funcNode, char **args,
bool *isNull, bool *isDone);
-#endif /* FUNCTIONS_H */
+#endif /* FUNCTIONS_H */
diff --git a/src/include/executor/hashjoin.h b/src/include/executor/hashjoin.h
index e6f0766b72..3dceec85f3 100644
--- a/src/include/executor/hashjoin.h
+++ b/src/include/executor/hashjoin.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hashjoin.h,v 1.6 1997/09/08 21:52:00 momjian Exp $
+ * $Id: hashjoin.h,v 1.7 1998/09/01 04:35:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -81,4 +81,4 @@ typedef HashBucketData *HashBucket;
#define HASH_PERMISSION 0700
-#endif /* HASHJOIN_H */
+#endif /* HASHJOIN_H */
diff --git a/src/include/executor/nodeAgg.h b/src/include/executor/nodeAgg.h
index ca8de787d1..7c3ee010e8 100644
--- a/src/include/executor/nodeAgg.h
+++ b/src/include/executor/nodeAgg.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeAgg.h,v 1.7 1998/02/13 03:43:34 vadim Exp $
+ * $Id: nodeAgg.h,v 1.8 1998/09/01 04:35:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern int ExecCountSlotsAgg(Agg *node);
extern void ExecEndAgg(Agg *node);
extern void ExecReScanAgg(Agg *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEAGG_H */
+#endif /* NODEAGG_H */
diff --git a/src/include/executor/nodeAppend.h b/src/include/executor/nodeAppend.h
index 2825cf573f..10549fbaca 100644
--- a/src/include/executor/nodeAppend.h
+++ b/src/include/executor/nodeAppend.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeAppend.h,v 1.8 1998/07/15 22:16:21 momjian Exp $
+ * $Id: nodeAppend.h,v 1.9 1998/09/01 04:35:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern TupleTableSlot *ExecProcAppend(Append *node);
extern void ExecEndAppend(Append *node);
extern void ExecReScanAppend(Append *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEAPPEND_H */
+#endif /* NODEAPPEND_H */
diff --git a/src/include/executor/nodeGroup.h b/src/include/executor/nodeGroup.h
index 4449a09b4a..0c23aa02d3 100644
--- a/src/include/executor/nodeGroup.h
+++ b/src/include/executor/nodeGroup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeGroup.h,v 1.6 1998/07/16 01:49:19 momjian Exp $
+ * $Id: nodeGroup.h,v 1.7 1998/09/01 04:35:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern int ExecCountSlotsGroup(Group *node);
extern void ExecEndGroup(Group *node);
extern void ExecReScanGroup(Group *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEGROUP_H */
+#endif /* NODEGROUP_H */
diff --git a/src/include/executor/nodeHash.h b/src/include/executor/nodeHash.h
index 720fcf8067..27ae5f80d3 100644
--- a/src/include/executor/nodeHash.h
+++ b/src/include/executor/nodeHash.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeHash.h,v 1.9 1998/02/26 04:41:21 momjian Exp $
+ * $Id: nodeHash.h,v 1.10 1998/09/01 04:35:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,18 +26,15 @@ extern bool ExecInitHash(Hash *node, EState *estate, Plan *parent);
extern int ExecCountSlotsHash(Hash *node);
extern void ExecEndHash(Hash *node);
extern HashJoinTable ExecHashTableCreate(Hash *node);
-extern void
-ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext,
+extern void ExecHashTableInsert(HashJoinTable hashtable, ExprContext *econtext,
Var *hashkey, File *batches);
extern void ExecHashTableDestroy(HashJoinTable hashtable);
-extern int
-ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext,
+extern int ExecHashGetBucket(HashJoinTable hashtable, ExprContext *econtext,
Var *hashkey);
-extern HeapTuple
-ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket,
+extern HeapTuple ExecScanHashBucket(HashJoinState *hjstate, HashBucket bucket,
HeapTuple curtuple, List *hjclauses,
ExprContext *econtext);
extern void ExecHashTableReset(HashJoinTable hashtable, int ntuples);
extern void ExecReScanHash(Hash *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEHASH_H */
+#endif /* NODEHASH_H */
diff --git a/src/include/executor/nodeHashjoin.h b/src/include/executor/nodeHashjoin.h
index 08827cec07..8699e59336 100644
--- a/src/include/executor/nodeHashjoin.h
+++ b/src/include/executor/nodeHashjoin.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeHashjoin.h,v 1.9 1998/02/26 04:41:23 momjian Exp $
+ * $Id: nodeHashjoin.h,v 1.10 1998/09/01 04:35:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,10 +21,9 @@ extern TupleTableSlot *ExecHashJoin(HashJoin *node);
extern bool ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent);
extern int ExecCountSlotsHashJoin(HashJoin *node);
extern void ExecEndHashJoin(HashJoin *node);
-extern char *
-ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer,
+extern char *ExecHashJoinSaveTuple(HeapTuple heapTuple, char *buffer,
File file, char *position);
extern void ExecReScanHashJoin(HashJoin *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEHASHJOIN_H */
+#endif /* NODEHASHJOIN_H */
diff --git a/src/include/executor/nodeIndexscan.h b/src/include/executor/nodeIndexscan.h
index 1e13cc9666..2990e75b48 100644
--- a/src/include/executor/nodeIndexscan.h
+++ b/src/include/executor/nodeIndexscan.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeIndexscan.h,v 1.6 1997/11/26 01:12:52 momjian Exp $
+ * $Id: nodeIndexscan.h,v 1.7 1998/09/01 04:35:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,4 +27,4 @@ extern bool ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent);
extern int ExecCountSlotsIndexScan(IndexScan *node);
extern void ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEINDEXSCAN_H */
+#endif /* NODEINDEXSCAN_H */
diff --git a/src/include/executor/nodeMaterial.h b/src/include/executor/nodeMaterial.h
index c52e06ec98..dbd755bae8 100644
--- a/src/include/executor/nodeMaterial.h
+++ b/src/include/executor/nodeMaterial.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeMaterial.h,v 1.7 1998/02/26 04:41:24 momjian Exp $
+ * $Id: nodeMaterial.h,v 1.8 1998/09/01 04:36:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,4 +28,4 @@ extern List ExecMaterialMarkPos(Material *node);
extern void ExecMaterialRestrPos(Material *node);
#endif
-#endif /* NODEMATERIAL_H */
+#endif /* NODEMATERIAL_H */
diff --git a/src/include/executor/nodeMergejoin.h b/src/include/executor/nodeMergejoin.h
index e3d1b15500..1095315978 100644
--- a/src/include/executor/nodeMergejoin.h
+++ b/src/include/executor/nodeMergejoin.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeMergejoin.h,v 1.8 1998/02/27 16:12:09 vadim Exp $
+ * $Id: nodeMergejoin.h,v 1.9 1998/09/01 04:36:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern int ExecCountSlotsMergeJoin(MergeJoin *node);
extern void ExecEndMergeJoin(MergeJoin *node);
extern void ExecReScanMergeJoin(MergeJoin *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEMERGEJOIN_H; */
+#endif /* NODEMERGEJOIN_H; */
diff --git a/src/include/executor/nodeNestloop.h b/src/include/executor/nodeNestloop.h
index 50d2f49820..2c79b4d62a 100644
--- a/src/include/executor/nodeNestloop.h
+++ b/src/include/executor/nodeNestloop.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeNestloop.h,v 1.6 1998/02/13 03:43:38 vadim Exp $
+ * $Id: nodeNestloop.h,v 1.7 1998/09/01 04:36:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern int ExecCountSlotsNestLoop(NestLoop *node);
extern void ExecEndNestLoop(NestLoop *node);
extern void ExecReScanNestLoop(NestLoop *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODENESTLOOP_H */
+#endif /* NODENESTLOOP_H */
diff --git a/src/include/executor/nodeResult.h b/src/include/executor/nodeResult.h
index fffdf52e6a..f966ab0dc9 100644
--- a/src/include/executor/nodeResult.h
+++ b/src/include/executor/nodeResult.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeResult.h,v 1.6 1998/02/13 03:43:39 vadim Exp $
+ * $Id: nodeResult.h,v 1.7 1998/09/01 04:36:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern int ExecCountSlotsResult(Result *node);
extern void ExecEndResult(Result *node);
extern void ExecReScanResult(Result *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODERESULT_H */
+#endif /* NODERESULT_H */
diff --git a/src/include/executor/nodeSeqscan.h b/src/include/executor/nodeSeqscan.h
index 2c980d8eaa..1064b02b97 100644
--- a/src/include/executor/nodeSeqscan.h
+++ b/src/include/executor/nodeSeqscan.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeSeqscan.h,v 1.6 1997/11/26 01:13:00 momjian Exp $
+ * $Id: nodeSeqscan.h,v 1.7 1998/09/01 04:36:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,4 +25,4 @@ extern void ExecSeqReScan(SeqScan *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecSeqMarkPos(SeqScan *node);
extern void ExecSeqRestrPos(SeqScan *node);
-#endif /* NODESEQSCAN_H */
+#endif /* NODESEQSCAN_H */
diff --git a/src/include/executor/nodeSort.h b/src/include/executor/nodeSort.h
index 89beeb8c72..5d405fcc00 100644
--- a/src/include/executor/nodeSort.h
+++ b/src/include/executor/nodeSort.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeSort.h,v 1.6 1998/02/23 06:27:55 vadim Exp $
+ * $Id: nodeSort.h,v 1.7 1998/09/01 04:36:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,4 +25,4 @@ extern void ExecSortMarkPos(Sort *node);
extern void ExecSortRestrPos(Sort *node);
extern void ExecReScanSort(Sort *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODESORT_H */
+#endif /* NODESORT_H */
diff --git a/src/include/executor/nodeSubplan.h b/src/include/executor/nodeSubplan.h
index dc25902a79..a28cd2c485 100644
--- a/src/include/executor/nodeSubplan.h
+++ b/src/include/executor/nodeSubplan.h
@@ -17,4 +17,4 @@ extern void ExecReScanSetParamPlan(SubPlan *node, Plan *parent);
extern void ExecSetParamPlan(SubPlan *node);
extern void ExecEndSubPlan(SubPlan *node);
-#endif /* NODESUBPLAN_H */
+#endif /* NODESUBPLAN_H */
diff --git a/src/include/executor/nodeTee.h b/src/include/executor/nodeTee.h
index d58b0b1cf6..349c091e6a 100644
--- a/src/include/executor/nodeTee.h
+++ b/src/include/executor/nodeTee.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeTee.h,v 1.5 1997/11/26 01:13:06 momjian Exp $
+ * $Id: nodeTee.h,v 1.6 1998/09/01 04:36:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern void ExecTeeReScan(Tee *node, ExprContext *exprCtxt, Plan *parent);
extern void ExecEndTee(Tee *node, Plan *parent);
extern int ExecCountSlotsTee(Tee *node);
-#endif /* NODETEE_H */
+#endif /* NODETEE_H */
diff --git a/src/include/executor/nodeUnique.h b/src/include/executor/nodeUnique.h
index ba4112cb8d..f414b7b659 100644
--- a/src/include/executor/nodeUnique.h
+++ b/src/include/executor/nodeUnique.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeUnique.h,v 1.6 1998/02/23 06:27:56 vadim Exp $
+ * $Id: nodeUnique.h,v 1.7 1998/09/01 04:36:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern int ExecCountSlotsUnique(Unique *node);
extern void ExecEndUnique(Unique *node);
extern void ExecReScanUnique(Unique *node, ExprContext *exprCtxt, Plan *parent);
-#endif /* NODEUNIQUE_H */
+#endif /* NODEUNIQUE_H */
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index d547900708..72b6fe0f1f 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -78,8 +78,7 @@ extern void *SPI_prepare(char *src, int nargs, Oid *argtypes);
extern void *SPI_saveplan(void *plan);
extern HeapTuple SPI_copytuple(HeapTuple tuple);
-extern HeapTuple
-SPI_modifytuple(Relation rel, HeapTuple tuple, int natts,
+extern HeapTuple SPI_modifytuple(Relation rel, HeapTuple tuple, int natts,
int *attnum, Datum *Values, char *Nulls);
extern int SPI_fnumber(TupleDesc tupdesc, char *fname);
extern char *SPI_fname(TupleDesc tupdesc, int fnumber);
@@ -92,4 +91,4 @@ extern void *SPI_palloc(Size size);
extern void *SPI_repalloc(void *pointer, Size size);
extern void SPI_pfree(void *pointer);
-#endif /* SPI_H */
+#endif /* SPI_H */
diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h
index 1df589265e..e0ab50b5f3 100644
--- a/src/include/executor/tuptable.h
+++ b/src/include/executor/tuptable.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tuptable.h,v 1.7 1997/09/08 21:52:16 momjian Exp $
+ * $Id: tuptable.h,v 1.8 1998/09/01 04:36:13 momjian Exp $
*
* NOTES
* The tuple table interface is getting pretty ugly.
@@ -75,4 +75,4 @@ typedef TupleTableData *TupleTable;
- jolly
*/
-#endif /* TUPTABLE_H */
+#endif /* TUPTABLE_H */
diff --git a/src/include/lib/dllist.h b/src/include/lib/dllist.h
index 238ac3b8ea..09428512a0 100644
--- a/src/include/lib/dllist.h
+++ b/src/include/lib/dllist.h
@@ -26,7 +26,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dllist.h,v 1.7 1997/09/08 21:52:17 momjian Exp $
+ * $Id: dllist.h,v 1.8 1998/09/01 04:36:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -69,4 +69,4 @@ extern Dlelem *DLRemHead(Dllist *list); /* remove and return the head */
#define DLE_VAL(x) (x->dle_val)
-#endif /* DLLIST_H */
+#endif /* DLLIST_H */
diff --git a/src/include/lib/fstack.h b/src/include/lib/fstack.h
index 2fbf62606c..d71fe6ce42 100644
--- a/src/include/lib/fstack.h
+++ b/src/include/lib/fstack.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fstack.h,v 1.5 1997/09/08 21:52:20 momjian Exp $
+ * $Id: fstack.h,v 1.6 1998/09/01 04:36:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -111,4 +111,4 @@ extern Pointer FixedStackGetTop(FixedStack stack);
*/
extern Pointer FixedStackGetNext(FixedStack stack, Pointer pointer);
-#endif /* FSTACK_H */
+#endif /* FSTACK_H */
diff --git a/src/include/lib/hasht.h b/src/include/lib/hasht.h
index f2261d3ecc..f23197c0b9 100644
--- a/src/include/lib/hasht.h
+++ b/src/include/lib/hasht.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hasht.h,v 1.5 1997/09/08 21:52:21 momjian Exp $
+ * $Id: hasht.h,v 1.6 1998/09/01 04:36:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,4 +20,4 @@ typedef void (*HashtFunc) ();
extern void HashTableWalk(HTAB *hashtable, HashtFunc function, int arg);
-#endif /* HASHT_H */
+#endif /* HASHT_H */
diff --git a/src/include/lib/lispsort.h b/src/include/lib/lispsort.h
index d4d074ba54..a75c3e1e14 100644
--- a/src/include/lib/lispsort.h
+++ b/src/include/lib/lispsort.h
@@ -6,11 +6,11 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lispsort.h,v 1.3 1997/09/07 04:58:12 momjian Exp $
+ * $Id: lispsort.h,v 1.4 1998/09/01 04:36:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef LISPSORT_H
#define LISPSORT_H
-#endif /* LISPSORT_H */
+#endif /* LISPSORT_H */
diff --git a/src/include/lib/qsort.h b/src/include/lib/qsort.h
index 9bf57408d4..9d27da8f57 100644
--- a/src/include/lib/qsort.h
+++ b/src/include/lib/qsort.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: qsort.h,v 1.5 1998/02/26 04:41:31 momjian Exp $
+ * $Id: qsort.h,v 1.6 1998/09/01 04:36:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -14,10 +14,9 @@
#define QSORT_H
-extern void
-pg_qsort(void *bot,
+extern void pg_qsort(void *bot,
size_t nmemb,
size_t size,
int (*compar) (void *, void *));
-#endif /* QSORT_H */
+#endif /* QSORT_H */
diff --git a/src/include/lib/stringinfo.h b/src/include/lib/stringinfo.h
index f9987db168..2c32fb4e92 100644
--- a/src/include/lib/stringinfo.h
+++ b/src/include/lib/stringinfo.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: stringinfo.h,v 1.6 1998/03/20 04:12:21 momjian Exp $
+ * $Id: stringinfo.h,v 1.7 1998/09/01 04:36:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,4 +44,4 @@ extern StringInfo makeStringInfo(void);
*/
extern void appendStringInfo(StringInfo str, char *buffer);
-#endif /* STRINGINFO_H */
+#endif /* STRINGINFO_H */
diff --git a/src/include/libpq/auth.h b/src/include/libpq/auth.h
index 0adc4d4658..e349cf661e 100644
--- a/src/include/libpq/auth.h
+++ b/src/include/libpq/auth.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: auth.h,v 1.9 1998/02/26 04:41:35 momjian Exp $
+ * $Id: auth.h,v 1.10 1998/09/01 04:36:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,4 +26,4 @@ void auth_failed(Port *port);
#define PG_KRB4_VERSION "PGVER4.1" /* at most KRB_SENDAUTH_VLEN chars */
#define PG_KRB5_VERSION "PGVER5.1"
-#endif /* AUTH_H */
+#endif /* AUTH_H */
diff --git a/src/include/libpq/be-fsstubs.h b/src/include/libpq/be-fsstubs.h
index 108869dac9..6f858fee94 100644
--- a/src/include/libpq/be-fsstubs.h
+++ b/src/include/libpq/be-fsstubs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: be-fsstubs.h,v 1.6 1998/07/21 04:17:26 momjian Exp $
+ * $Id: be-fsstubs.h,v 1.7 1998/09/01 04:36:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,4 +42,4 @@ extern int lowrite(int fd, struct varlena * wbuf);
*/
extern void _lo_commit(void);
-#endif /* BE_FSSTUBS_H */
+#endif /* BE_FSSTUBS_H */
diff --git a/src/include/libpq/hba.h b/src/include/libpq/hba.h
index f8291ccb1c..d93b02014c 100644
--- a/src/include/libpq/hba.h
+++ b/src/include/libpq/hba.h
@@ -4,7 +4,7 @@
* Interface to hba.c
*
*
- * $Id: hba.h,v 1.10 1998/09/01 03:28:10 momjian Exp $
+ * $Id: hba.h,v 1.11 1998/09/01 04:36:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,11 +50,9 @@ typedef enum UserAuth
uaCrypt
} UserAuth;
-int
-hba_getauthmethod(SockAddr *raddr, char *user, char *database,
+int hba_getauthmethod(SockAddr *raddr, char *user, char *database,
char *auth_arg, UserAuth *auth_method);
-int
-authident(struct sockaddr_in * raddr, struct sockaddr_in * laddr,
+int authident(struct sockaddr_in * raddr, struct sockaddr_in * laddr,
const char *postgres_username, const char *auth_arg);
#endif
diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h
index 5d0c6d7ac6..bad77383c9 100644
--- a/src/include/libpq/libpq-be.h
+++ b/src/include/libpq/libpq-be.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-be.h,v 1.11 1998/07/09 03:29:00 scrappy Exp $
+ * $Id: libpq-be.h,v 1.12 1998/09/01 04:36:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,7 +68,7 @@ typedef enum
WritingPacket
} PacketState;
-typedef int (*PacketDoneProc) (void * arg, PacketLen pktlen, void * pktdata);
+typedef int (*PacketDoneProc) (void *arg, PacketLen pktlen, void *pktdata);
typedef struct Packet
{
@@ -76,11 +76,13 @@ typedef struct Packet
PacketLen len; /* Actual length */
int nrtodo; /* Bytes still to transfer */
char *ptr; /* Buffer pointer */
- PacketDoneProc iodone; /* I/O complete callback */
+ PacketDoneProc iodone; /* I/O complete callback */
void *arg; /* Argument to callback */
- /* We declare the data buffer as a union of the allowed packet types,
- * mainly to ensure that enough space is allocated for the largest one.
+ /*
+ * We declare the data buffer as a union of the allowed packet types,
+ * mainly to ensure that enough space is allocated for the largest
+ * one.
*/
union
@@ -143,4 +145,4 @@ void PacketSendSetup(Packet *pkt, int nbytes, PacketDoneProc iodone, void *arg)
int PacketSendFragment(Packet *pkt, int sock);
void PacketSendError(Packet *pkt, char *errormsg);
-#endif /* LIBPQ_BE_H */
+#endif /* LIBPQ_BE_H */
diff --git a/src/include/libpq/libpq-fs.h b/src/include/libpq/libpq-fs.h
index affc01777b..514e259a6b 100644
--- a/src/include/libpq/libpq-fs.h
+++ b/src/include/libpq/libpq-fs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-fs.h,v 1.6 1997/11/21 19:02:59 momjian Exp $
+ * $Id: libpq-fs.h,v 1.7 1998/09/01 04:36:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,7 +18,7 @@
#ifndef MAXNAMLEN
#define MAXNAMLEN 255
-#endif /* MAXNAMLEN */
+#endif /* MAXNAMLEN */
struct pgdirent
{
@@ -38,7 +38,7 @@ struct pgdirent
#else /* SYSV_DIRENT */
#define D_NAMLEN(dp) \
((dp)->d_namlen)
-#endif /* SYSV_DIRENT */
+#endif /* SYSV_DIRENT */
/* for stat(2) */
#ifndef S_IRUSR
@@ -71,7 +71,7 @@ struct pgdirent
#define S_ISDIR( mode ) (((mode) & _S_IFMT) == _S_IFDIR)
-#endif /* S_IRUSR */
+#endif /* S_IRUSR */
/*
* Inversion doesn't have links.
@@ -103,4 +103,4 @@ struct pgdirent
#define PENOTEMPTY 66 /* Directory not empty */
#define PEPGIO 99 /* postgres backend had problems */
-#endif /* LIBPQ_FS_H */
+#endif /* LIBPQ_FS_H */
diff --git a/src/include/libpq/libpq.h b/src/include/libpq/libpq.h
index a328e6dacd..ef7ec5d2cf 100644
--- a/src/include/libpq/libpq.h
+++ b/src/include/libpq/libpq.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq.h,v 1.20 1998/07/20 16:57:06 momjian Exp $
+ * $Id: libpq.h,v 1.21 1998/09/01 04:36:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -50,7 +50,7 @@ typedef struct TypeBlock
{
char name[NAMEDATALEN]; /* name of the attribute */
int typid; /* typid of the type */
- int typlen; /* typlen of the type */
+ int typlen; /* typlen of the type */
} TypeBlock;
/* ----------------
@@ -179,11 +179,9 @@ extern int PQninstancesGroup(PortalBuffer *portal, int group_index);
extern int PQnfieldsGroup(PortalBuffer *portal, int group_index);
extern int PQfnumberGroup(PortalBuffer *portal, int group_index, char *field_name);
extern char *PQfnameGroup(PortalBuffer *portal, int group_index, int field_number);
-extern int
-PQftypeGroup(PortalBuffer *portal, int group_index,
+extern int PQftypeGroup(PortalBuffer *portal, int group_index,
int field_number);
-extern int
-PQfsizeGroup(PortalBuffer *portal, int group_index,
+extern int PQfsizeGroup(PortalBuffer *portal, int group_index,
int field_number);
extern GroupBuffer *PQgroup(PortalBuffer *portal, int tuple_index);
extern int PQgetgroup(PortalBuffer *portal, int tuple_index);
@@ -236,15 +234,13 @@ extern void be_portalpush(PortalEntry *entry);
extern PortalEntry *be_portalpop(void);
extern PortalEntry *be_currentportal(void);
extern PortalEntry *be_newportal(void);
-extern void
-be_typeinit(PortalEntry *entry, TupleDesc attrs,
+extern void be_typeinit(PortalEntry *entry, TupleDesc attrs,
int natts);
extern void be_printtup(HeapTuple tuple, TupleDesc typeinfo);
/* in be-pqexec.c */
-extern char *
-PQfn(int fnid, int *result_buf, int result_len, int result_is_int,
+extern char *PQfn(int fnid, int *result_buf, int result_len, int result_is_int,
PQArgBlock *args, int nargs);
extern char *PQexec(char *query);
extern int pqtest_PQexec(char *q);
@@ -271,16 +267,16 @@ extern int pq_getinaddr(struct sockaddr_in * sin, char *host, int port);
extern int pq_getinserv(struct sockaddr_in * sin, char *host, char *serv);
#ifdef MULTIBYTE
-extern void pq_putncharlen(char *s, int n);
+extern void pq_putncharlen(char *s, int n);
+
#endif
-extern int
-pq_connect(char *dbname, char *user, char *args, char *hostName,
+extern int pq_connect(char *dbname, char *user, char *args, char *hostName,
char *debugTty, char *execFile, short portName);
extern int StreamOpen(char *hostName, short portName, Port *port);
extern void StreamDoUnlink(void);
-extern int StreamServerPort(char *hostName, short portName, int *fdP);
-extern int StreamConnection(int server_fd, Port *port);
+extern int StreamServerPort(char *hostName, short portName, int *fdP);
+extern int StreamConnection(int server_fd, Port *port);
extern void StreamClose(int sock);
-#endif /* LIBPQ_H */
+#endif /* LIBPQ_H */
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index e3b5a71b83..0f36e8e93e 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.28 1998/08/29 04:05:43 momjian Exp $
+ * $Id: pqcomm.h,v 1.29 1998/09/01 04:36:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,11 +41,11 @@ typedef union SockAddr
#if defined(SUN_LEN)
#define UNIXSOCK_PATH(sun,port) \
- (sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), SUN_LEN(&(sun)))
+ (sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), SUN_LEN(&(sun)))
#else
#define UNIXSOCK_PATH(sun,port) \
- (sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), \
- strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))
+ (sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), \
+ strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))
#endif
/*
@@ -140,15 +140,16 @@ typedef ProtocolVersion MsgType;
/* The cancel request code must not match any protocol version number
* we're ever likely to use. This random choice should do.
*/
-#define CANCEL_REQUEST_CODE PG_PROTOCOL(1234,5678)
+#define CANCEL_REQUEST_CODE PG_PROTOCOL(1234,5678)
typedef struct CancelRequestPacket
{
/* Note that each field is stored in network byte order! */
- MsgType cancelRequestCode; /* code to identify a cancel request */
- uint32 backendPID; /* PID of client's backend */
- uint32 cancelAuthCode; /* secret key to authorize cancel */
-} CancelRequestPacket;
+ MsgType cancelRequestCode; /* code to identify a cancel
+ * request */
+ uint32 backendPID; /* PID of client's backend */
+ uint32 cancelAuthCode; /* secret key to authorize cancel */
+} CancelRequestPacket;
/* in pqcompriv.c */
@@ -164,4 +165,4 @@ int pqPutNBytes(const char *, size_t, FILE *);
int pqPutString(const char *, FILE *);
int pqPutByte(int, FILE *);
-#endif /* PQCOMM_H */
+#endif /* PQCOMM_H */
diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h
index f85025a159..ecdc23aac2 100644
--- a/src/include/libpq/pqsignal.h
+++ b/src/include/libpq/pqsignal.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqsignal.h,v 1.7 1997/09/08 02:37:09 momjian Exp $
+ * $Id: pqsignal.h,v 1.8 1998/09/01 04:36:32 momjian Exp $
*
* NOTES
* This shouldn't be in libpq, but the monitor and some other
@@ -21,4 +21,4 @@ typedef void (*pqsigfunc) (int);
extern pqsigfunc pqsignal(int signo, pqsigfunc func);
-#endif /* PQSIGNAL_H */
+#endif /* PQSIGNAL_H */
diff --git a/src/include/mb/pg_wchar.h b/src/include/mb/pg_wchar.h
index aec1ad06a9..5d7c2458dd 100644
--- a/src/include/mb/pg_wchar.h
+++ b/src/include/mb/pg_wchar.h
@@ -1,33 +1,34 @@
-/* $Id: pg_wchar.h,v 1.3 1998/08/24 01:14:22 momjian Exp $ */
+/* $Id: pg_wchar.h,v 1.4 1998/09/01 04:36:34 momjian Exp $ */
#ifndef PG_WCHAR_H
#define PG_WCHAR_H
#include <sys/types.h>
#include "postgres.h"
-#include "miscadmin.h" /* for getdatabaseencoding() */
+#include "miscadmin.h" /* for getdatabaseencoding() */
-#define SQL_ASCII 0 /* SQL/ASCII */
-#define EUC_JP 1 /* EUC for Japanese */
-#define EUC_CN 2 /* EUC for Chinese */
-#define EUC_KR 3 /* EUC for Korean */
-#define EUC_TW 3 /* EUC for Taiwan */
-#define UNICODE 5 /* Unicode UTF-8 */
-#define MULE_INTERNAL 6 /* Mule internal code */
-#define LATIN1 7 /* ISO-8859 Latin 1 */
-#define LATIN2 8 /* ISO-8859 Latin 2 */
-#define LATIN3 9 /* ISO-8859 Latin 3 */
-#define LATIN4 10 /* ISO-8859 Latin 4 */
-#define LATIN5 11 /* ISO-8859 Latin 5 */
-#define LATIN6 12 /* ISO-8859 Latin 6 */
-#define LATIN7 13 /* ISO-8859 Latin 7 */
-#define LATIN8 14 /* ISO-8859 Latin 8 */
-#define LATIN9 15 /* ISO-8859 Latin 9 */
+#define SQL_ASCII 0 /* SQL/ASCII */
+#define EUC_JP 1 /* EUC for Japanese */
+#define EUC_CN 2 /* EUC for Chinese */
+#define EUC_KR 3 /* EUC for Korean */
+#define EUC_TW 3 /* EUC for Taiwan */
+#define UNICODE 5 /* Unicode UTF-8 */
+#define MULE_INTERNAL 6 /* Mule internal code */
+#define LATIN1 7 /* ISO-8859 Latin 1 */
+#define LATIN2 8 /* ISO-8859 Latin 2 */
+#define LATIN3 9 /* ISO-8859 Latin 3 */
+#define LATIN4 10 /* ISO-8859 Latin 4 */
+#define LATIN5 11 /* ISO-8859 Latin 5 */
+#define LATIN6 12 /* ISO-8859 Latin 6 */
+#define LATIN7 13 /* ISO-8859 Latin 7 */
+#define LATIN8 14 /* ISO-8859 Latin 8 */
+#define LATIN9 15 /* ISO-8859 Latin 9 */
/* followings are for client encoding only */
-#define SJIS 32 /* Shift JIS */
+#define SJIS 32 /* Shift JIS */
#ifdef MULTIBYTE
typedef unsigned int pg_wchar;
+
#else
#define pg_wchar char
#endif
@@ -35,8 +36,8 @@ typedef unsigned int pg_wchar;
/*
* various definitions for EUC
*/
-#define SS2 0x8e /* single shift 2 */
-#define SS3 0x8f /* single shift 3 */
+#define SS2 0x8e /* single shift 2 */
+#define SS3 0x8f /* single shift 3 */
/*
* various definitions for mule internal code
@@ -49,56 +50,59 @@ typedef unsigned int pg_wchar;
/*
* leading characters
*/
-#define LC_ISO8859_1 0x81 /* ISO8859 Latin 1 */
-#define LC_ISO8859_2 0x82 /* ISO8859 Latin 2 */
-#define LC_ISO8859_3 0x83 /* ISO8859 Latin 3 */
-#define LC_ISO8859_4 0x84 /* ISO8859 Latin 4 */
-#define LC_ISO8859_5 0x8d /* ISO8859 Latin 5 */
-#define LC_JISX0201K 0x89 /* Japanese 1 byte kana */
-#define LC_JISX0201R 0x90 /* Japanese 1 byte Roman */
-#define LC_GB2312_80 0x91 /* Chinese */
-#define LC_JISX0208 0x92 /* Japanese Kanji */
-#define LC_KS5601 0x93 /* Korean */
-#define LC_JISX0212 0x94 /* Japanese Kanji (JISX0212) */
-#define LC_CNS11643_1 0x95 /* CNS 11643-1992 Plane 1 */
-#define LC_CNS11643_2 0x96 /* CNS 11643-1992 Plane 2 */
-#define LC_CNS11643_3 0xf6 /* CNS 11643-1992 Plane 3 */
-#define LC_CNS11643_4 0xf7 /* CNS 11643-1992 Plane 4 */
-#define LC_CNS11643_5 0xf8 /* CNS 11643-1992 Plane 5 */
-#define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */
-#define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */
+#define LC_ISO8859_1 0x81 /* ISO8859 Latin 1 */
+#define LC_ISO8859_2 0x82 /* ISO8859 Latin 2 */
+#define LC_ISO8859_3 0x83 /* ISO8859 Latin 3 */
+#define LC_ISO8859_4 0x84 /* ISO8859 Latin 4 */
+#define LC_ISO8859_5 0x8d /* ISO8859 Latin 5 */
+#define LC_JISX0201K 0x89 /* Japanese 1 byte kana */
+#define LC_JISX0201R 0x90 /* Japanese 1 byte Roman */
+#define LC_GB2312_80 0x91 /* Chinese */
+#define LC_JISX0208 0x92 /* Japanese Kanji */
+#define LC_KS5601 0x93 /* Korean */
+#define LC_JISX0212 0x94 /* Japanese Kanji (JISX0212) */
+#define LC_CNS11643_1 0x95 /* CNS 11643-1992 Plane 1 */
+#define LC_CNS11643_2 0x96 /* CNS 11643-1992 Plane 2 */
+#define LC_CNS11643_3 0xf6 /* CNS 11643-1992 Plane 3 */
+#define LC_CNS11643_4 0xf7 /* CNS 11643-1992 Plane 4 */
+#define LC_CNS11643_5 0xf8 /* CNS 11643-1992 Plane 5 */
+#define LC_CNS11643_6 0xf9 /* CNS 11643-1992 Plane 6 */
+#define LC_CNS11643_7 0xfa /* CNS 11643-1992 Plane 7 */
#ifdef MULTIBYTE
-typedef struct {
- int encoding; /* encoding symbol value */
- char *name; /* encoding name */
- int is_client_only; /* 0: server/client bothg supported
- 1: client only */
- void (*to_mic)(); /* client encoding to MIC */
- void (*from_mic)(); /* MIC to client encoding */
-} pg_encoding_conv_tbl;
+typedef struct
+{
+ int encoding; /* encoding symbol value */
+ char *name; /* encoding name */
+ int is_client_only; /* 0: server/client bothg supported 1:
+ * client only */
+ void (*to_mic) (); /* client encoding to MIC */
+ void (*from_mic) (); /* MIC to client encoding */
+} pg_encoding_conv_tbl;
extern pg_encoding_conv_tbl pg_conv_tbl[];
-typedef struct {
- void (*mb2wchar_with_len)(); /* convert a multi-byte string to a wchar */
- int (*mblen)(); /* returns the length of a multi-byte word */
-} pg_wchar_tbl;
+typedef struct
+{
+ void (*mb2wchar_with_len) (); /* convert a multi-byte
+ * string to a wchar */
+ int (*mblen) (); /* returns the length of a multi-byte word */
+} pg_wchar_tbl;
extern pg_wchar_tbl pg_wchar_table[];
extern void pg_mb2wchar(const unsigned char *, pg_wchar *);
extern void pg_mb2wchar_with_len(const unsigned char *, pg_wchar *, int);
-extern int pg_char_and_wchar_strcmp(const char *, const pg_wchar *);
-extern int pg_wchar_strncmp(const pg_wchar *, const pg_wchar *, size_t);
-extern int pg_char_and_wchar_strncmp(const char *, const pg_wchar *, size_t);
+extern int pg_char_and_wchar_strcmp(const char *, const pg_wchar *);
+extern int pg_wchar_strncmp(const pg_wchar *, const pg_wchar *, size_t);
+extern int pg_char_and_wchar_strncmp(const char *, const pg_wchar *, size_t);
extern size_t pg_wchar_strlen(const pg_wchar *);
-extern int pg_mblen(const unsigned char *);
-extern int pg_encoding_mblen(int, const unsigned char *);
-extern int pg_mule_mblen(const unsigned char *);
-extern int pg_mic_mblen(const unsigned char *);
-extern int pg_mbstrlen(const unsigned char *);
-extern int pg_mbstrlen_with_len(const unsigned char *, int);
+extern int pg_mblen(const unsigned char *);
+extern int pg_encoding_mblen(int, const unsigned char *);
+extern int pg_mule_mblen(const unsigned char *);
+extern int pg_mic_mblen(const unsigned char *);
+extern int pg_mbstrlen(const unsigned char *);
+extern int pg_mbstrlen_with_len(const unsigned char *, int);
extern pg_encoding_conv_tbl *pg_get_encent_by_encoding(int);
extern bool show_client_encoding(void);
extern bool reset_client_encoding(void);
@@ -106,18 +110,18 @@ extern bool parse_client_encoding(const char *);
extern bool show_server_encoding(void);
extern bool reset_server_encoding(void);
extern bool parse_server_encoding(const char *);
-extern int pg_set_client_encoding(int);
-extern int pg_get_client_encoding(void);
+extern int pg_set_client_encoding(int);
+extern int pg_get_client_encoding(void);
extern unsigned char *pg_client_to_server(unsigned char *, int);
extern unsigned char *pg_server_to_client(unsigned char *, int);
-extern int pg_valid_client_encoding(const char *);
+extern int pg_valid_client_encoding(const char *);
extern const char *pg_encoding_to_char(int);
-extern int pg_char_to_encoding(const char *);
-extern int GetDatabaseEncoding(void);
+extern int pg_char_to_encoding(const char *);
+extern int GetDatabaseEncoding(void);
extern void SetDatabaseEncoding(int);
extern void SetTemplateEncoding(int);
-extern int GetTemplateEncoding(void);
+extern int GetTemplateEncoding(void);
-#endif /* MULTIBYTE */
+#endif /* MULTIBYTE */
-#endif /* PG_WCHAR_H */
+#endif /* PG_WCHAR_H */
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h
index e2632d63e6..6fe0bec78b 100644
--- a/src/include/miscadmin.h
+++ b/src/include/miscadmin.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: miscadmin.h,v 1.32 1998/08/25 21:24:12 scrappy Exp $
+ * $Id: miscadmin.h,v 1.33 1998/09/01 04:33:59 momjian Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -35,14 +35,14 @@ extern int PostmasterMain(int argc, char *argv[]);
* from utils/init/globals.c
*/
extern int Portfd;
-extern bool Noversion;
-extern bool Quiet;
-extern bool QueryCancel;
+extern bool Noversion;
+extern bool Quiet;
+extern bool QueryCancel;
extern char *DataDir;
extern int MyProcPid;
-extern struct Port *MyProcPort;
-extern long MyCancelKey;
+extern struct Port *MyProcPort;
+extern long MyCancelKey;
extern char OutputFileName[];
@@ -123,6 +123,7 @@ extern char *ExpandDatabasePath(char *path);
/* now in utils/init/miscinit.c */
extern void SetDatabaseName(char *name);
extern void SetDatabasePath(char *path);
+
/* even if MB is not enabled, this function is neccesary
* since pg_proc.h does have.
*/
@@ -206,4 +207,4 @@ extern bool IsNormalProcessingMode(void);
extern void SetProcessingMode(ProcessingMode mode);
extern ProcessingMode GetProcessingMode(void);
-#endif /* MISCADMIN_H */
+#endif /* MISCADMIN_H */
diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h
index c582cdd799..a062456c68 100644
--- a/src/include/nodes/execnodes.h
+++ b/src/include/nodes/execnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: execnodes.h,v 1.17 1998/08/03 19:41:31 momjian Exp $
+ * $Id: execnodes.h,v 1.18 1998/09/01 04:36:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -194,20 +194,20 @@ typedef struct JunkFilter
*/
typedef struct EState
{
- NodeTag type;
- ScanDirection es_direction;
- Snapshot es_snapshot;
- List *es_range_table;
- RelationInfo *es_result_relation_info;
- Relation es_into_relation_descriptor;
- ParamListInfo es_param_list_info;
- ParamExecData *es_param_exec_vals; /* this is for subselects */
- int es_BaseId;
- TupleTable es_tupleTable;
- JunkFilter *es_junkFilter;
- int *es_refcount;
- uint32 es_processed; /* # of tuples processed */
- Oid es_lastoid; /* last oid processed (by INSERT) */
+ NodeTag type;
+ ScanDirection es_direction;
+ Snapshot es_snapshot;
+ List *es_range_table;
+ RelationInfo *es_result_relation_info;
+ Relation es_into_relation_descriptor;
+ ParamListInfo es_param_list_info;
+ ParamExecData *es_param_exec_vals; /* this is for subselects */
+ int es_BaseId;
+ TupleTable es_tupleTable;
+ JunkFilter *es_junkFilter;
+ int *es_refcount;
+ uint32 es_processed; /* # of tuples processed */
+ Oid es_lastoid; /* last oid processed (by INSERT) */
} EState;
/* ----------------
@@ -704,4 +704,4 @@ typedef struct TeeState
HeapScanDesc tee_rightScanDesc;
} TeeState;
-#endif /* EXECNODES_H */
+#endif /* EXECNODES_H */
diff --git a/src/include/nodes/makefuncs.h b/src/include/nodes/makefuncs.h
index 58848328a6..43c8d08886 100644
--- a/src/include/nodes/makefuncs.h
+++ b/src/include/nodes/makefuncs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: makefuncs.h,v 1.13 1998/07/20 20:48:52 momjian Exp $
+ * $Id: makefuncs.h,v 1.14 1998/09/01 04:36:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,15 +17,13 @@
#include <nodes/parsenodes.h>
#include <utils/fcache.h>
-extern Oper *
-makeOper(Oid opno,
+extern Oper *makeOper(Oid opno,
Oid opid,
Oid opresulttype,
int opsize,
FunctionCachePtr op_fcache);
-extern Var *
-makeVar(Index varno,
+extern Var *makeVar(Index varno,
AttrNumber varattno,
Oid vartype,
int32 vartypmod,
@@ -34,10 +32,9 @@ makeVar(Index varno,
AttrNumber varoattno);
extern TargetEntry *
-makeTargetEntry(Resdom *resdom, Node *expr);
+ makeTargetEntry(Resdom *resdom, Node *expr);
-extern Resdom *
-makeResdom(AttrNumber resno,
+extern Resdom *makeResdom(AttrNumber resno,
Oid restype,
int32 restypmod,
char *resname,
@@ -45,8 +42,7 @@ makeResdom(AttrNumber resno,
Oid reskeyop,
int resjunk);
-extern Const *
-makeConst(Oid consttype,
+extern Const *makeConst(Oid consttype,
int constlen,
Datum constvalue,
bool constisnull,
@@ -54,4 +50,4 @@ makeConst(Oid consttype,
bool constisset,
bool constiscast);
-#endif /* MAKEFUNC_H */
+#endif /* MAKEFUNC_H */
diff --git a/src/include/nodes/memnodes.h b/src/include/nodes/memnodes.h
index e3104996d4..accf6ed131 100644
--- a/src/include/nodes/memnodes.h
+++ b/src/include/nodes/memnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memnodes.h,v 1.7 1997/09/08 21:52:44 momjian Exp $
+ * $Id: memnodes.h,v 1.8 1998/09/01 04:36:39 momjian Exp $
*
* XXX the typedefs in this file are different from the other ???nodes.h;
* they are pointers to structures instead of the structures themselves.
@@ -98,4 +98,4 @@ typedef struct PortalHeapMemory
(IsA(context,MemoryContext) || IsA(context,GlobalMemory) || \
IsA(context,PortalVariableMemory) || IsA(context,PortalHeapMemory))
-#endif /* MEMNODES_H */
+#endif /* MEMNODES_H */
diff --git a/src/include/nodes/nodeFuncs.h b/src/include/nodes/nodeFuncs.h
index 696f5f7fa6..d7c1b2f696 100644
--- a/src/include/nodes/nodeFuncs.h
+++ b/src/include/nodes/nodeFuncs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodeFuncs.h,v 1.6 1997/11/25 22:06:30 momjian Exp $
+ * $Id: nodeFuncs.h,v 1.7 1998/09/01 04:36:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,4 +22,4 @@ extern bool var_is_rel(Var *var);
extern Oper *replace_opid(Oper *oper);
extern bool non_null(Expr *c);
-#endif /* NODEFUNCS_H */
+#endif /* NODEFUNCS_H */
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index b7fc3ede87..29124a839c 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nodes.h,v 1.29 1998/09/01 03:28:14 momjian Exp $
+ * $Id: nodes.h,v 1.30 1998/09/01 04:36:41 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -306,13 +306,11 @@ typedef enum CmdType
CMD_INSERT, /* insert stmt (formerly append) */
CMD_DELETE,
CMD_NOTIFY,
- CMD_UTILITY, /* cmds like create, destroy, copy,
+ CMD_UTILITY, /* cmds like create, destroy, copy,
* vacuum, etc. */
- CMD_NOTHING /* dummy command for
- * instead nothing
- * rules with qual
- */
+ CMD_NOTHING /* dummy command for instead nothing rules
+ * with qual */
} CmdType;
-#endif /* NODES_H */
+#endif /* NODES_H */
diff --git a/src/include/nodes/params.h b/src/include/nodes/params.h
index aaa5657208..7d88313530 100644
--- a/src/include/nodes/params.h
+++ b/src/include/nodes/params.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: params.h,v 1.8 1998/02/26 04:41:58 momjian Exp $
+ * $Id: params.h,v 1.9 1998/09/01 04:36:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -99,4 +99,4 @@ typedef struct ParamExecData
bool isnull;
} ParamExecData;
-#endif /* PARAMS_H */
+#endif /* PARAMS_H */
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 3555ac49be..26bdc420dd 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsenodes.h,v 1.58 1998/08/26 05:22:55 momjian Exp $
+ * $Id: parsenodes.h,v 1.59 1998/09/01 04:36:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -448,7 +448,7 @@ typedef struct UnlistenStmt
{
NodeTag type;
char *relname; /* relation to unlisten on */
-} UnlistenStmt;
+} UnlistenStmt;
/* ----------------------
* {Begin|Abort|End} Transaction Statement
@@ -490,8 +490,7 @@ typedef struct CreatedbStmt
NodeTag type;
char *dbname; /* database to create */
char *dbpath; /* location of database */
- int encoding; /* default encoding
- (see regex/pg_wchar.h) */
+ int encoding; /* default encoding (see regex/pg_wchar.h) */
} CreatedbStmt;
/* ----------------------
@@ -799,7 +798,7 @@ typedef struct SortGroupBy
{
NodeTag type;
char *useOp; /* operator to use */
- Node *node; /* Expression */
+ Node *node; /* Expression */
} SortGroupBy;
/*
@@ -811,7 +810,7 @@ typedef struct JoinUsing
int resno; /* target number */
char *range;
char *name; /* name of column to sort on */
-} JoinUsing;
+} JoinUsing;
/*
* RangeVar - range variable, used in from clauses
@@ -832,7 +831,7 @@ typedef struct IndexElem
char *name; /* name of index */
List *args; /* if not NULL, function index */
char *class;
- TypeName *typename; /* type of index's keys (optional) */
+ TypeName *typename; /* type of index's keys (optional) */
} IndexElem;
/*
@@ -912,4 +911,4 @@ typedef struct GroupClause
Oid grpOpoid; /* the sort operator to use */
} GroupClause;
-#endif /* PARSENODES_H */
+#endif /* PARSENODES_H */
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h
index e3e3574193..96e721bbf4 100644
--- a/src/include/nodes/pg_list.h
+++ b/src/include/nodes/pg_list.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pg_list.h,v 1.8 1997/09/08 21:52:51 momjian Exp $
+ * $Id: pg_list.h,v 1.9 1998/09/01 04:36:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -117,4 +117,4 @@ extern bool same(List *foo, List *bar);
/* in copyfuncs.c */
extern List *listCopy(List *);
-#endif /* PG_LIST_H */
+#endif /* PG_LIST_H */
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
index 5de80471b3..1731b1a2f5 100644
--- a/src/include/nodes/plannodes.h
+++ b/src/include/nodes/plannodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plannodes.h,v 1.17 1998/08/04 16:44:24 momjian Exp $
+ * $Id: plannodes.h,v 1.18 1998/09/01 04:36:46 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -139,14 +139,10 @@ typedef struct Append
{
Plan plan;
List *appendplans;
- List *unionrtables; /*
- * List of range tables, one for each
- * union query.
- */
- Index inheritrelid; /*
- * The range table has to be changed for
- * inheritance.
- */
+ List *unionrtables; /* List of range tables, one for each
+ * union query. */
+ Index inheritrelid; /* The range table has to be changed for
+ * inheritance. */
List *inheritrtable;
AppendState *appendstate;
} Append;
@@ -382,4 +378,4 @@ typedef struct SubPlan
bool shutdown; /* shutdown plan if TRUE */
} SubPlan;
-#endif /* PLANNODES_H */
+#endif /* PLANNODES_H */
diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h
index 1a62b38879..32701e075e 100644
--- a/src/include/nodes/primnodes.h
+++ b/src/include/nodes/primnodes.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: primnodes.h,v 1.22 1998/07/12 21:29:33 momjian Exp $
+ * $Id: primnodes.h,v 1.23 1998/09/01 04:36:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -351,4 +351,4 @@ typedef struct ArrayRef
Node *refassgnexpr;
} ArrayRef;
-#endif /* PRIMNODES_H */
+#endif /* PRIMNODES_H */
diff --git a/src/include/nodes/print.h b/src/include/nodes/print.h
index 308c2d9363..0df89e2e15 100644
--- a/src/include/nodes/print.h
+++ b/src/include/nodes/print.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: print.h,v 1.7 1998/02/26 04:42:03 momjian Exp $
+ * $Id: print.h,v 1.8 1998/09/01 04:36:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,9 +26,8 @@ extern void print_expr(Node *expr, List *rtable);
extern void print_keys(List *keys, List *rtable);
extern void print_tl(List *tlist, List *rtable);
extern void print_slot(TupleTableSlot *slot);
-extern void
-print_plan_recursive(Plan *p, Query *parsetree,
+extern void print_plan_recursive(Plan *p, Query *parsetree,
int indentLevel, char *label);
extern void print_plan(Plan *p, Query *parsetree);
-#endif /* PRINT_H */
+#endif /* PRINT_H */
diff --git a/src/include/nodes/readfuncs.h b/src/include/nodes/readfuncs.h
index f2b24e18ed..abb1b57eb2 100644
--- a/src/include/nodes/readfuncs.h
+++ b/src/include/nodes/readfuncs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: readfuncs.h,v 1.5 1997/11/26 01:13:09 momjian Exp $
+ * $Id: readfuncs.h,v 1.6 1998/09/01 04:36:49 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,4 +26,4 @@ extern void *nodeRead(bool read_car_only);
*/
extern Node *parsePlanString(void);
-#endif /* READFUNCS_H */
+#endif /* READFUNCS_H */
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 69fb911921..0f350e0f11 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relation.h,v 1.10 1998/09/01 03:28:16 momjian Exp $
+ * $Id: relation.h,v 1.11 1998/09/01 04:36:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,7 +106,7 @@ typedef struct RelOptInfo
List *joininfo; /* join clauses */
List *innerjoin;
List *superrels;
-} RelOptInfo;
+} RelOptInfo;
extern Var *get_expr(TargetEntry *foo);
@@ -139,7 +139,7 @@ typedef struct Path
{
NodeTag type;
- RelOptInfo *parent;
+ RelOptInfo *parent;
Cost path_cost;
NodeTag pathtype;
@@ -221,7 +221,7 @@ typedef struct ClauseInfo
/* hashjoin only */
Oid hashjoinoperator;
Relid cinfojoinid;
-} ClauseInfo;
+} ClauseInfo;
typedef struct JoinMethod
{
@@ -250,7 +250,7 @@ typedef struct JoinInfo
bool mergejoinable;
bool hashjoinable;
bool inactive;
-} JoinInfo;
+} JoinInfo;
typedef struct Iter
{
@@ -285,7 +285,7 @@ typedef struct Stream
{
NodeTag type;
Path *pathptr;
- ClauseInfo *cinfo;
+ ClauseInfo *cinfo;
int *clausetype;
struct Stream *upstream;
struct Stream *downstream;
@@ -294,4 +294,4 @@ typedef struct Stream
Cost groupsel;
} Stream;
-#endif /* RELATION_H */
+#endif /* RELATION_H */
diff --git a/src/include/optimizer/clauseinfo.h b/src/include/optimizer/clauseinfo.h
index 0fa10b2e49..24a3ec5107 100644
--- a/src/include/optimizer/clauseinfo.h
+++ b/src/include/optimizer/clauseinfo.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: clauseinfo.h,v 1.8 1998/09/01 03:28:17 momjian Exp $
+ * $Id: clauseinfo.h,v 1.9 1998/09/01 04:36:52 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,14 +16,12 @@
#include "nodes/pg_list.h"
#include "nodes/relation.h"
-extern bool valid_or_clause(ClauseInfo *clauseinfo);
+extern bool valid_or_clause(ClauseInfo * clauseinfo);
extern List *get_actual_clauses(List *clauseinfo_list);
-extern void
-get_relattvals(List *clauseinfo_list, List **attnos,
+extern void get_relattvals(List *clauseinfo_list, List **attnos,
List **values, List **flags);
-extern void
-get_joinvars(Oid relid, List *clauseinfo_list,
+extern void get_joinvars(Oid relid, List *clauseinfo_list,
List **attnos, List **values, List **flags);
extern List *get_opnos(List *clauseinfo_list);
-#endif /* CLAUSEINFO_H */
+#endif /* CLAUSEINFO_H */
diff --git a/src/include/optimizer/clauses.h b/src/include/optimizer/clauses.h
index 28ac0c003b..08f4a84f10 100644
--- a/src/include/optimizer/clauses.h
+++ b/src/include/optimizer/clauses.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: clauses.h,v 1.12 1998/08/10 02:26:39 momjian Exp $
+ * $Id: clauses.h,v 1.13 1998/09/01 04:36:53 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,11 +42,9 @@ extern bool is_joinable(Node *clause);
extern bool qual_clause_p(Node *clause);
extern void fix_opid(Node *clause);
extern List *fix_opids(List *clauses);
-extern void
-get_relattval(Node *clause, int *relid,
+extern void get_relattval(Node *clause, int *relid,
AttrNumber *attno, Datum *constval, int *flag);
-extern void
-get_rels_atts(Node *clause, int *relid1,
+extern void get_rels_atts(Node *clause, int *relid1,
AttrNumber *attno1, int *relid2, AttrNumber *attno2);
extern void CommuteClause(Node *clause);
@@ -54,4 +52,4 @@ extern void CommuteClause(Node *clause);
nodeTag((Node*) clause) == T_Expr && \
((Expr *) clause)->opType == SUBPLAN_EXPR)
-#endif /* CLAUSES_H */
+#endif /* CLAUSES_H */
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index f0f716c012..4342149e9b 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: cost.h,v 1.10 1998/08/04 16:44:27 momjian Exp $
+ * $Id: cost.h,v 1.11 1998/09/01 04:36:54 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,24 +31,20 @@ extern bool _enable_mergejoin_;
extern bool _enable_hashjoin_;
extern Cost cost_seqscan(int relid, int relpages, int reltuples);
-extern Cost
-cost_index(Oid indexid, int expected_indexpages, Cost selec,
+extern Cost cost_index(Oid indexid, int expected_indexpages, Cost selec,
int relpages, int reltuples, int indexpages,
int indextuples, bool is_injoin);
extern Cost cost_sort(List *keys, int tuples, int width, bool noread);
-extern Cost
-cost_nestloop(Cost outercost, Cost innercost, int outertuples,
+extern Cost cost_nestloop(Cost outercost, Cost innercost, int outertuples,
int innertuples, int outerpages, bool is_indexjoin);
-extern Cost
-cost_mergejoin(Cost outercost, Cost innercost,
+extern Cost cost_mergejoin(Cost outercost, Cost innercost,
List *outersortkeys, List *innersortkeys,
int outersize, int innersize, int outerwidth, int innerwidth);
-extern Cost
-cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys,
+extern Cost cost_hashjoin(Cost outercost, Cost innercost, List *outerkeys,
List *innerkeys, int outersize, int innersize,
int outerwidth, int innerwidth);
-extern int compute_rel_size(RelOptInfo *rel);
-extern int compute_rel_width(RelOptInfo *rel);
+extern int compute_rel_size(RelOptInfo * rel);
+extern int compute_rel_width(RelOptInfo * rel);
extern int compute_joinrel_size(JoinPath *joinpath);
extern int page_size(int tuples, int width);
@@ -60,8 +56,7 @@ extern void set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity
extern Cost product_selec(List *clauseinfo_list);
extern void set_rest_relselec(Query *root, List *rel_list);
extern void set_rest_selec(Query *root, List *clauseinfo_list);
-extern Cost
-compute_clause_selec(Query *root,
+extern Cost compute_clause_selec(Query *root,
Node *clause, List *or_selectivities);
-#endif /* COST_H */
+#endif /* COST_H */
diff --git a/src/include/optimizer/geqo.h b/src/include/optimizer/geqo.h
index 2a1018ed28..150cfc751f 100644
--- a/src/include/optimizer/geqo.h
+++ b/src/include/optimizer/geqo.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo.h,v 1.8 1998/07/18 04:22:50 momjian Exp $
+ * $Id: geqo.h,v 1.9 1998/09/01 04:36:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -76,7 +76,7 @@ extern void geqo_params(int string_length);
extern Cost geqo_eval(Query *root, Gene *tour, int num_gene);
double geqo_log(double x, double b);
-extern RelOptInfo *gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo *outer_rel);
+extern RelOptInfo *gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, RelOptInfo * outer_rel);
-#endif /* GEQO_H */
+#endif /* GEQO_H */
diff --git a/src/include/optimizer/geqo_copy.h b/src/include/optimizer/geqo_copy.h
index 26730d0bc8..bdf521215e 100644
--- a/src/include/optimizer/geqo_copy.h
+++ b/src/include/optimizer/geqo_copy.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_copy.h,v 1.5 1997/11/26 01:13:25 momjian Exp $
+ * $Id: geqo_copy.h,v 1.6 1998/09/01 04:36:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,4 +25,4 @@
extern void geqo_copy(Chromosome *chromo1, Chromosome *chromo2, int string_length);
-#endif /* GEQO_COPY_H */
+#endif /* GEQO_COPY_H */
diff --git a/src/include/optimizer/geqo_gene.h b/src/include/optimizer/geqo_gene.h
index d1f99cced8..a5f0305569 100644
--- a/src/include/optimizer/geqo_gene.h
+++ b/src/include/optimizer/geqo_gene.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_gene.h,v 1.5 1997/11/26 01:13:27 momjian Exp $
+ * $Id: geqo_gene.h,v 1.6 1998/09/01 04:36:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -43,4 +43,4 @@ typedef struct Pool
int string_length;
} Pool;
-#endif /* GEQO_GENE_H */
+#endif /* GEQO_GENE_H */
diff --git a/src/include/optimizer/geqo_misc.h b/src/include/optimizer/geqo_misc.h
index 2dcc6351c5..1de8a9b2c7 100644
--- a/src/include/optimizer/geqo_misc.h
+++ b/src/include/optimizer/geqo_misc.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_misc.h,v 1.6 1998/07/18 04:22:50 momjian Exp $
+ * $Id: geqo_misc.h,v 1.7 1998/09/01 04:36:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,8 +31,8 @@ extern void print_pool(FILE *fp, Pool *pool, int start, int stop);
extern void print_gen(FILE *fp, Pool *pool, int generation);
extern void print_edge_table(FILE *fp, Edge *edge_table, int num_gene);
-extern void geqo_print_rel(Query *root, RelOptInfo *rel);
+extern void geqo_print_rel(Query *root, RelOptInfo * rel);
extern void geqo_print_path(Query *root, Path *path, int indent);
extern void geqo_print_joinclauses(Query *root, List *clauses);
-#endif /* GEQO_MISC_H */
+#endif /* GEQO_MISC_H */
diff --git a/src/include/optimizer/geqo_mutation.h b/src/include/optimizer/geqo_mutation.h
index 94549a3164..5a6b636efd 100644
--- a/src/include/optimizer/geqo_mutation.h
+++ b/src/include/optimizer/geqo_mutation.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_mutation.h,v 1.5 1997/11/26 01:13:29 momjian Exp $
+ * $Id: geqo_mutation.h,v 1.6 1998/09/01 04:37:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,4 +25,4 @@
extern void geqo_mutation(Gene *tour, int num_gene);
-#endif /* GEQO_MUTATION_H */
+#endif /* GEQO_MUTATION_H */
diff --git a/src/include/optimizer/geqo_paths.h b/src/include/optimizer/geqo_paths.h
index c222cb1fae..7cda77c1c2 100644
--- a/src/include/optimizer/geqo_paths.h
+++ b/src/include/optimizer/geqo_paths.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_paths.h,v 1.5 1998/07/18 04:22:50 momjian Exp $
+ * $Id: geqo_paths.h,v 1.6 1998/09/01 04:37:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,6 +23,6 @@
extern List *geqo_prune_rels(List *rel_list);
-extern void geqo_rel_paths(RelOptInfo *rel);
+extern void geqo_rel_paths(RelOptInfo * rel);
-#endif /* GEQO_PATHS_H */
+#endif /* GEQO_PATHS_H */
diff --git a/src/include/optimizer/geqo_pool.h b/src/include/optimizer/geqo_pool.h
index ebc8a3914b..d7916cdecc 100644
--- a/src/include/optimizer/geqo_pool.h
+++ b/src/include/optimizer/geqo_pool.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_pool.h,v 1.5 1997/11/26 01:13:30 momjian Exp $
+ * $Id: geqo_pool.h,v 1.6 1998/09/01 04:37:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,4 +35,4 @@ extern void spread_chromo(Chromosome *chromo, Pool *pool);
extern void sort_pool(Pool *pool);
-#endif /* GEQO_POOL_H */
+#endif /* GEQO_POOL_H */
diff --git a/src/include/optimizer/geqo_random.h b/src/include/optimizer/geqo_random.h
index 73a9d37e53..3d574b74da 100644
--- a/src/include/optimizer/geqo_random.h
+++ b/src/include/optimizer/geqo_random.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_random.h,v 1.2 1997/09/07 04:59:03 momjian Exp $
+ * $Id: geqo_random.h,v 1.3 1998/09/01 04:37:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,4 +34,4 @@
#define geqo_randint(upper,lower) ( (int) floor( geqo_rand()*((upper-lower)+0.999999) ) + lower )
-#endif /* GEQO_RANDOM_H */
+#endif /* GEQO_RANDOM_H */
diff --git a/src/include/optimizer/geqo_recombination.h b/src/include/optimizer/geqo_recombination.h
index 615316f197..a49a9550c7 100644
--- a/src/include/optimizer/geqo_recombination.h
+++ b/src/include/optimizer/geqo_recombination.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_recombination.h,v 1.5 1997/11/26 01:13:32 momjian Exp $
+ * $Id: geqo_recombination.h,v 1.6 1998/09/01 04:37:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -77,4 +77,4 @@ extern void ox1(Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_
extern void ox2(Gene *mom, Gene *dad, Gene *offspring, int num_gene, City *city_table);
-#endif /* GEQO_RECOMBINATION_H */
+#endif /* GEQO_RECOMBINATION_H */
diff --git a/src/include/optimizer/geqo_selection.h b/src/include/optimizer/geqo_selection.h
index 6a8e0cccff..262a1a9cf7 100644
--- a/src/include/optimizer/geqo_selection.h
+++ b/src/include/optimizer/geqo_selection.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geqo_selection.h,v 1.5 1997/11/26 01:13:36 momjian Exp $
+ * $Id: geqo_selection.h,v 1.6 1998/09/01 04:37:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,4 +26,4 @@
extern void geqo_selection(Chromosome *momma, Chromosome *daddy, Pool *pool, double bias);
-#endif /* GEQO_SELECTION_H */
+#endif /* GEQO_SELECTION_H */
diff --git a/src/include/optimizer/internal.h b/src/include/optimizer/internal.h
index f4b8079316..0ebcffc78a 100644
--- a/src/include/optimizer/internal.h
+++ b/src/include/optimizer/internal.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: internal.h,v 1.10 1997/09/12 21:25:02 momjian Exp $
+ * $Id: internal.h,v 1.11 1998/09/01 04:37:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -88,4 +88,4 @@ extern int BushyPlanFlag;
/* GEQO switch according to number of relations in a query */
#define GEQO_RELS 8
-#endif /* INTERNAL_H */
+#endif /* INTERNAL_H */
diff --git a/src/include/optimizer/joininfo.h b/src/include/optimizer/joininfo.h
index cbb2893257..c2573f19be 100644
--- a/src/include/optimizer/joininfo.h
+++ b/src/include/optimizer/joininfo.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: joininfo.h,v 1.7 1998/09/01 03:28:19 momjian Exp $
+ * $Id: joininfo.h,v 1.8 1998/09/01 04:37:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,7 +18,7 @@
#include "nodes/primnodes.h"
extern JoinInfo *joininfo_member(List *join_relids, List *joininfo_list);
-extern JoinInfo *find_joininfo_node(RelOptInfo *this_rel, List *join_relids);
+extern JoinInfo *find_joininfo_node(RelOptInfo * this_rel, List *join_relids);
extern Var *other_join_clause_var(Var *var, Expr *clause);
-#endif /* JOININFO_H */
+#endif /* JOININFO_H */
diff --git a/src/include/optimizer/keys.h b/src/include/optimizer/keys.h
index 3ae613629d..4fe166d549 100644
--- a/src/include/optimizer/keys.h
+++ b/src/include/optimizer/keys.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: keys.h,v 1.7 1998/07/18 04:22:51 momjian Exp $
+ * $Id: keys.h,v 1.8 1998/09/01 04:37:11 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,9 +16,9 @@
#include "nodes/nodes.h"
#include "nodes/relation.h"
-extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo *rel);
+extern bool match_indexkey_operand(int indexkey, Var *operand, RelOptInfo * rel);
extern Var *extract_subkey(JoinKey *jk, int which_subkey);
extern bool samekeys(List *keys1, List *keys2);
extern List *collect_index_pathkeys(int *index_keys, List *tlist);
-#endif /* KEYS_H */
+#endif /* KEYS_H */
diff --git a/src/include/optimizer/ordering.h b/src/include/optimizer/ordering.h
index f06487b447..fb3365c1ef 100644
--- a/src/include/optimizer/ordering.h
+++ b/src/include/optimizer/ordering.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ordering.h,v 1.8 1998/02/26 04:42:15 momjian Exp $
+ * $Id: ordering.h,v 1.9 1998/09/01 04:37:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,14 +15,11 @@
#include <nodes/relation.h>
-extern bool
-equal_path_path_ordering(PathOrder *path_ordering1,
+extern bool equal_path_path_ordering(PathOrder *path_ordering1,
PathOrder *path_ordering2);
-extern bool
-equal_path_merge_ordering(Oid *path_ordering,
+extern bool equal_path_merge_ordering(Oid *path_ordering,
MergeOrder *merge_ordering);
-extern bool
-equal_merge_merge_ordering(MergeOrder *merge_ordering1,
+extern bool equal_merge_merge_ordering(MergeOrder *merge_ordering1,
MergeOrder *merge_ordering2);
-#endif /* ORDERING_H */
+#endif /* ORDERING_H */
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
index a24acd89cb..4c8501de95 100644
--- a/src/include/optimizer/pathnode.h
+++ b/src/include/optimizer/pathnode.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pathnode.h,v 1.9 1998/08/04 16:44:29 momjian Exp $
+ * $Id: pathnode.h,v 1.10 1998/09/01 04:37:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,25 +21,20 @@
* prototypes for pathnode.c
*/
extern bool path_is_cheaper(Path *path1, Path *path2);
-extern Path *set_cheapest(RelOptInfo *parent_rel, List *pathlist);
-extern List *
-add_pathlist(RelOptInfo *parent_rel, List *unique_paths,
+extern Path *set_cheapest(RelOptInfo * parent_rel, List *pathlist);
+extern List *add_pathlist(RelOptInfo * parent_rel, List *unique_paths,
List *new_paths);
-extern Path *create_seqscan_path(RelOptInfo *rel);
-extern IndexPath *
-create_index_path(Query *root, RelOptInfo *rel, RelOptInfo *index,
+extern Path *create_seqscan_path(RelOptInfo * rel);
+extern IndexPath *create_index_path(Query *root, RelOptInfo * rel, RelOptInfo * index,
List *restriction_clauses, bool is_join_scan);
-extern JoinPath *
-create_nestloop_path(RelOptInfo *joinrel, RelOptInfo *outer_rel,
+extern JoinPath *create_nestloop_path(RelOptInfo * joinrel, RelOptInfo * outer_rel,
Path *outer_path, Path *inner_path, List *keys);
-extern MergePath *
-create_mergejoin_path(RelOptInfo *joinrel, int outersize,
+extern MergePath *create_mergejoin_path(RelOptInfo * joinrel, int outersize,
int innersize, int outerwidth, int innerwidth, Path *outer_path,
Path *inner_path, List *keys, MergeOrder *order,
List *mergeclauses, List *outersortkeys, List *innersortkeys);
-extern HashPath *
-create_hashjoin_path(RelOptInfo *joinrel, int outersize,
+extern HashPath *create_hashjoin_path(RelOptInfo * joinrel, int outersize,
int innersize, int outerwidth, int innerwidth, Path *outer_path,
Path *inner_path, List *keys, Oid operator, List *hashclauses,
List *outerkeys, List *innerkeys);
@@ -54,6 +49,6 @@ extern RelOptInfo *get_join_rel(Query *root, List *relid);
/*
* prototypes for indexnode.h
*/
-extern List *find_relation_indices(Query *root, RelOptInfo *rel);
+extern List *find_relation_indices(Query *root, RelOptInfo * rel);
-#endif /* PATHNODE_H */
+#endif /* PATHNODE_H */
diff --git a/src/include/optimizer/paths.h b/src/include/optimizer/paths.h
index 1a2e3db83f..a570d17db5 100644
--- a/src/include/optimizer/paths.h
+++ b/src/include/optimizer/paths.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: paths.h,v 1.9 1998/07/18 04:22:51 momjian Exp $
+ * $Id: paths.h,v 1.10 1998/09/01 04:37:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,8 +27,7 @@ extern List *find_paths(Query *root, List *rels);
* indxpath.h
* routines to generate index paths
*/
-extern List *
-find_index_paths(Query *root, RelOptInfo *rel, List *indices,
+extern List *find_index_paths(Query *root, RelOptInfo * rel, List *indices,
List *clauseinfo_list,
List *joininfo_list);
@@ -42,43 +41,36 @@ extern void find_all_join_paths(Query *root, List *joinrels);
/*
* orindxpath.h
*/
-extern List *create_or_index_paths(Query *root, RelOptInfo *rel, List *clauses);
+extern List *create_or_index_paths(Query *root, RelOptInfo * rel, List *clauses);
/*
* hashutils.h
* routines to deal with hash keys and clauses
*/
-extern List *
-group_clauses_by_hashop(List *clauseinfo_list,
+extern List *group_clauses_by_hashop(List *clauseinfo_list,
int inner_relid);
/*
* joinutils.h
* generic join method key/clause routines
*/
-extern List *
-match_pathkeys_joinkeys(List *pathkeys,
+extern List *match_pathkeys_joinkeys(List *pathkeys,
List *joinkeys, List *joinclauses, int which_subkey,
List **matchedJoinClausesPtr);
-extern List *
-extract_path_keys(List *joinkeys, List *tlist,
+extern List *extract_path_keys(List *joinkeys, List *tlist,
int which_subkey);
-extern Path *
-match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
+extern Path *match_paths_joinkeys(List *joinkeys, PathOrder *ordering,
List *paths, int which_subkey);
-extern List *
-new_join_pathkeys(List *outer_pathkeys,
+extern List *new_join_pathkeys(List *outer_pathkeys,
List *join_rel_tlist, List *joinclauses);
/*
* mergeutils.h
* routines to deal with merge keys and clauses
*/
-extern List *
-group_clauses_by_order(List *clauseinfo_list,
+extern List *group_clauses_by_order(List *clauseinfo_list,
int inner_relid);
-extern MInfo *
-match_order_mergeinfo(PathOrder *ordering,
+extern MInfo *match_order_mergeinfo(PathOrder *ordering,
List *mergeinfo_list);
/*
@@ -94,8 +86,8 @@ extern List *final_join_rels(List *join_rel_list);
*/
extern void prune_joinrels(List *rel_list);
extern void prune_rel_paths(List *rel_list);
-extern Path *prune_rel_path(RelOptInfo *rel, Path *unorderedpath);
+extern Path *prune_rel_path(RelOptInfo * rel, Path *unorderedpath);
extern List *merge_joinrels(List *rel_list1, List *rel_list2);
extern List *prune_oldrels(List *old_rels);
-#endif /* PATHS_H */
+#endif /* PATHS_H */
diff --git a/src/include/optimizer/plancat.h b/src/include/optimizer/plancat.h
index 5eab2c653d..8b4ec88894 100644
--- a/src/include/optimizer/plancat.h
+++ b/src/include/optimizer/plancat.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: plancat.h,v 1.8 1998/02/26 04:42:18 momjian Exp $
+ * $Id: plancat.h,v 1.9 1998/09/01 04:37:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,35 +34,30 @@ typedef struct IdxInfoRetval
} IdxInfoRetval;
-extern void
-relation_info(Query *root,
+extern void relation_info(Query *root,
Oid relid,
bool *hashindex, int *pages,
int *tuples);
-extern bool
-index_info(Query *root,
+extern bool index_info(Query *root,
bool first, int relid, IdxInfoRetval *info);
-extern Cost
-restriction_selectivity(Oid functionObjectId,
+extern Cost restriction_selectivity(Oid functionObjectId,
Oid operatorObjectId,
Oid relationObjectId,
AttrNumber attributeNumber,
char *constValue,
int32 constFlag);
-extern void
-index_selectivity(Oid indid, Oid *classes, List *opnos,
+extern void index_selectivity(Oid indid, Oid *classes, List *opnos,
Oid relid, List *attnos, List *values, List *flags,
int32 nkeys, float *idxPages, float *idxSelec);
-extern Cost
-join_selectivity(Oid functionObjectId, Oid operatorObjectId,
+extern Cost join_selectivity(Oid functionObjectId, Oid operatorObjectId,
Oid relationObjectId1, AttrNumber attributeNumber1,
Oid relationObjectId2, AttrNumber attributeNumber2);
extern List *find_inheritance_children(Oid inhparent);
extern List *VersionGetParents(Oid verrelid);
-#endif /* PLANCAT_H */
+#endif /* PLANCAT_H */
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h
index 306860031d..b0d74cd5f7 100644
--- a/src/include/optimizer/planmain.h
+++ b/src/include/optimizer/planmain.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: planmain.h,v 1.14 1998/08/10 02:26:40 momjian Exp $
+ * $Id: planmain.h,v 1.15 1998/09/01 04:37:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,8 +21,7 @@
/*
* prototypes for plan/planmain.c
*/
-extern Plan *
-query_planner(Query *root,
+extern Plan *query_planner(Query *root,
int command_type, List *tlist, List *qual);
@@ -30,15 +29,12 @@ query_planner(Query *root,
* prototypes for plan/createplan.c
*/
extern Plan *create_plan(Path *best_path);
-extern SeqScan *
-make_seqscan(List *qptlist, List *qpqual, Index scanrelid,
+extern SeqScan *make_seqscan(List *qptlist, List *qpqual, Index scanrelid,
Plan *lefttree);
-extern Sort *
-make_sort(List *tlist, Oid tempid, Plan *lefttree,
+extern Sort *make_sort(List *tlist, Oid tempid, Plan *lefttree,
int keycount);
extern Agg *make_agg(List *tlist, Plan *lefttree);
-extern Group *
-make_group(List *tlist, bool tuplePerGroup, int ngrp,
+extern Group *make_group(List *tlist, bool tuplePerGroup, int ngrp,
AttrNumber *grpColIdx, Sort *lefttree);
extern Unique *make_unique(List *tlist, Plan *lefttree, char *uniqueAttr);
@@ -54,18 +50,16 @@ extern void add_missing_vars_to_tlist(Query *root, List *tlist);
* prototypes for plan/setrefs.c
*/
extern void set_tlist_references(Plan *plan);
-extern List *
-join_references(List *clauses, List *outer_tlist,
+extern List *join_references(List *clauses, List *outer_tlist,
List *inner_tlist);
-extern List *
-index_outerjoin_references(List *inner_indxqual,
+extern List *index_outerjoin_references(List *inner_indxqual,
List *outer_tlist, Index inner_relid);
extern void set_result_tlist_references(Result *resultNode);
extern List *set_agg_tlist_references(Agg *aggNode);
extern void set_agg_agglist_references(Agg *aggNode);
extern void del_agg_tlist_references(List *tlist);
-extern List *check_having_qual_for_aggs(Node *clause,
- List *subplanTargetList, List *groupClause);
+extern List *check_having_qual_for_aggs(Node *clause,
+ List *subplanTargetList, List *groupClause);
extern List *check_having_qual_for_vars(Node *clause, List *targetlist_so_far);
-#endif /* PLANMAIN_H */
+#endif /* PLANMAIN_H */
diff --git a/src/include/optimizer/planner.h b/src/include/optimizer/planner.h
index 38782d3a2c..e620f3a230 100644
--- a/src/include/optimizer/planner.h
+++ b/src/include/optimizer/planner.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: planner.h,v 1.8 1998/02/13 03:46:56 vadim Exp $
+ * $Id: planner.h,v 1.9 1998/09/01 04:37:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,4 +24,4 @@ extern Plan *planner(Query *parse);
extern Plan *union_planner(Query *parse);
extern void pg_checkretval(Oid rettype, QueryTreeList *querytree_list);
-#endif /* PLANNER_H */
+#endif /* PLANNER_H */
diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h
index 7776e5be1e..b972d0952c 100644
--- a/src/include/optimizer/prep.h
+++ b/src/include/optimizer/prep.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: prep.h,v 1.12 1998/02/26 04:42:23 momjian Exp $
+ * $Id: prep.h,v 1.13 1998/09/01 04:37:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,15 +24,13 @@ extern List *cnfify(Expr *qual, bool removeAndFlag);
/*
* prototypes for preptlist.h
*/
-extern List *
-preprocess_targetlist(List *tlist, int command_type,
+extern List *preprocess_targetlist(List *tlist, int command_type,
Index result_relation, List *range_table);
-extern List *
-find_all_inheritors(List *unexamined_relids,
+extern List *find_all_inheritors(List *unexamined_relids,
List *examined_relids);
extern int first_inherit_rt_entry(List *rangetable);
extern Append *plan_union_queries(Query *parse);
extern Append *plan_inherit_queries(Query *parse, Index rt_index);
-#endif /* PREP_H */
+#endif /* PREP_H */
diff --git a/src/include/optimizer/subselect.h b/src/include/optimizer/subselect.h
index 833750c960..66ad302b8b 100644
--- a/src/include/optimizer/subselect.h
+++ b/src/include/optimizer/subselect.h
@@ -17,4 +17,4 @@ extern List *SS_finalize_plan(Plan *plan);
extern Node *SS_replace_correlation_vars(Node *expr);
extern Node *SS_process_sublinks(Node *expr);
-#endif /* SUBSELECT_H */
+#endif /* SUBSELECT_H */
diff --git a/src/include/optimizer/tlist.h b/src/include/optimizer/tlist.h
index 30580bf4d8..5c9cbe45c8 100644
--- a/src/include/optimizer/tlist.h
+++ b/src/include/optimizer/tlist.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tlist.h,v 1.12 1998/07/20 21:18:35 momjian Exp $
+ * $Id: tlist.h,v 1.13 1998/09/01 04:37:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,7 +19,7 @@
extern TargetEntry *tlistentry_member(Var *var, List *targetlist);
extern Expr *matching_tlvar(Var *var, List *targetlist);
-extern void add_tl_element(RelOptInfo *rel, Var *var);
+extern void add_tl_element(RelOptInfo * rel, Var *var);
extern TargetEntry *create_tl_element(Var *var, int resdomno);
extern List *get_actual_tlist(List *tlist);
extern Resdom *tlist_member(Var *var, List *tlist);
@@ -32,4 +32,4 @@ extern List *flatten_tlist(List *tlist);
extern List *flatten_tlist_vars(List *full_tlist,
List *flat_tlist);
-#endif /* TLIST_H */
+#endif /* TLIST_H */
diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h
index 2437b6de1a..23bc30258d 100644
--- a/src/include/optimizer/var.h
+++ b/src/include/optimizer/var.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: var.h,v 1.5 1997/11/26 01:13:52 momjian Exp $
+ * $Id: var.h,v 1.6 1998/09/01 04:37:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,4 +21,4 @@ extern bool contain_var_clause(Node *clause);
extern List *pull_var_clause(Node *clause);
extern bool var_equal(Var *var1, Var *var2);
-#endif /* VAR_H */
+#endif /* VAR_H */
diff --git a/src/include/optimizer/xfunc.h b/src/include/optimizer/xfunc.h
index 77146a326d..8a10ab80a5 100644
--- a/src/include/optimizer/xfunc.h
+++ b/src/include/optimizer/xfunc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: xfunc.h,v 1.9 1998/09/01 03:28:20 momjian Exp $
+ * $Id: xfunc.h,v 1.10 1998/09/01 04:37:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,12 +49,10 @@ extern int XfuncMode; /* defined in tcop/postgres.c */
#define is_join(pathnode) (length(get_relids(get_parent(pathnode))) > 1 ? 1 : 0)
/* function prototypes from planner/path/xfunc.c */
-extern void xfunc_trypullup(RelOptInfo *rel);
-extern int
-xfunc_shouldpull(Path *childpath, JoinPath *parentpath,
- int whichchild, ClauseInfo *maxcinfopt);
-extern ClauseInfo *
-xfunc_pullup(Path *childpath, JoinPath *parentpath, ClauseInfo *cinfo,
+extern void xfunc_trypullup(RelOptInfo * rel);
+extern int xfunc_shouldpull(Path *childpath, JoinPath *parentpath,
+ int whichchild, ClauseInfo * maxcinfopt);
+extern ClauseInfo *xfunc_pullup(Path *childpath, JoinPath *parentpath, ClauseInfo * cinfo,
int whichchild, int clausetype);
extern Cost xfunc_rank(Expr *clause);
extern Cost xfunc_expense(Query *queryInfo, Expr *clause);
@@ -71,7 +69,7 @@ extern List *xfunc_primary_join(JoinPath *pathnode);
extern Cost xfunc_get_path_cost(Path *pathnode);
extern Cost xfunc_total_path_cost(JoinPath *pathnode);
extern Cost xfunc_expense_per_tuple(JoinPath *joinnode, int whichchild);
-extern void xfunc_fixvars(Expr *clause, RelOptInfo *rel, int varno);
+extern void xfunc_fixvars(Expr *clause, RelOptInfo * rel, int varno);
extern int xfunc_cinfo_compare(void *arg1, void *arg2);
extern int xfunc_clause_compare(void *arg1, void *arg2);
extern void xfunc_disjunct_sort(List *clause_list);
@@ -80,11 +78,11 @@ extern int xfunc_func_width(RegProcedure funcid, List *args);
extern int xfunc_tuple_width(Relation rd);
extern int xfunc_num_join_clauses(JoinPath *path);
extern List *xfunc_LispRemove(List *foo, List *bar);
-extern bool xfunc_copyrel(RelOptInfo *from, RelOptInfo **to);
+extern bool xfunc_copyrel(RelOptInfo * from, RelOptInfo ** to);
/*
* function prototypes for path/predmig.c
*/
extern bool xfunc_do_predmig(Path root);
-#endif /* XFUNC_H */
+#endif /* XFUNC_H */
diff --git a/src/include/parser/analyze.h b/src/include/parser/analyze.h
index 85191a60c1..0c4f838d13 100644
--- a/src/include/parser/analyze.h
+++ b/src/include/parser/analyze.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: analyze.h,v 1.3 1998/01/19 05:06:39 momjian Exp $
+ * $Id: analyze.h,v 1.4 1998/09/01 04:37:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,4 +16,4 @@
extern QueryTreeList *parse_analyze(List *pl, ParseState *parentParseState);
-#endif /* ANALYZE_H */
+#endif /* ANALYZE_H */
diff --git a/src/include/parser/gramparse.h b/src/include/parser/gramparse.h
index bb650d3f27..cdf11cc174 100644
--- a/src/include/parser/gramparse.h
+++ b/src/include/parser/gramparse.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: gramparse.h,v 1.7 1998/02/26 04:42:36 momjian Exp $
+ * $Id: gramparse.h,v 1.8 1998/09/01 04:37:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,4 +22,4 @@ extern Oid param_type(int t);
extern void parser_init(Oid *typev, int nargs);
extern int yyparse(void);
-#endif /* GRAMPARSE_H */
+#endif /* GRAMPARSE_H */
diff --git a/src/include/parser/keywords.h b/src/include/parser/keywords.h
index 7feda88a08..437cf69489 100644
--- a/src/include/parser/keywords.h
+++ b/src/include/parser/keywords.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: keywords.h,v 1.4 1997/09/08 21:53:38 momjian Exp $
+ * $Id: keywords.h,v 1.5 1998/09/01 04:37:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ typedef struct ScanKeyword
extern ScanKeyword *ScanKeywordLookup(char *text);
extern char *AtomValueGetString(int atomval);
-#endif /* KEYWORDS_H */
+#endif /* KEYWORDS_H */
diff --git a/src/include/parser/parse_agg.h b/src/include/parser/parse_agg.h
index 5f6987253b..d7f2e08c4f 100644
--- a/src/include/parser/parse_agg.h
+++ b/src/include/parser/parse_agg.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_agg.h,v 1.6 1998/02/26 04:42:39 momjian Exp $
+ * $Id: parse_agg.h,v 1.7 1998/09/01 04:37:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,9 +20,8 @@
extern void AddAggToParseState(ParseState *pstate, Aggreg *aggreg);
extern void parseCheckAggregates(ParseState *pstate, Query *qry);
-extern Aggreg *
-ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
+extern Aggreg *ParseAgg(ParseState *pstate, char *aggname, Oid basetype,
List *target, int precedence);
extern void agg_error(char *caller, char *aggname, Oid basetypeID);
-#endif /* PARSE_AGG_H */
+#endif /* PARSE_AGG_H */
diff --git a/src/include/parser/parse_clause.h b/src/include/parser/parse_clause.h
index 0a232fecd0..3306330c13 100644
--- a/src/include/parser/parse_clause.h
+++ b/src/include/parser/parse_clause.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_clause.h,v 1.6 1998/02/26 04:42:40 momjian Exp $
+ * $Id: parse_clause.h,v 1.7 1998/09/01 04:37:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,13 +21,11 @@
extern void makeRangeTable(ParseState *pstate, char *relname, List *frmList);
extern Node *transformWhereClause(ParseState *pstate, Node *a_expr);
-extern List *
-transformGroupClause(ParseState *pstate, List *grouplist,
+extern List *transformGroupClause(ParseState *pstate, List *grouplist,
List *targetlist);
-extern List *
-transformSortClause(ParseState *pstate,
+extern List *transformSortClause(ParseState *pstate,
List *orderlist, List *sortClause,
List *targetlist, char *uniqueFlag);
extern List *transformUnionClause(List *unionClause, List *targetlist);
-#endif /* PARSE_CLAUSE_H */
+#endif /* PARSE_CLAUSE_H */
diff --git a/src/include/parser/parse_coerce.h b/src/include/parser/parse_coerce.h
index cf701a4c95..7531e5c754 100644
--- a/src/include/parser/parse_coerce.h
+++ b/src/include/parser/parse_coerce.h
@@ -6,14 +6,15 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_coerce.h,v 1.4 1998/08/14 16:07:00 thomas Exp $
+ * $Id: parse_coerce.h,v 1.5 1998/09/01 04:37:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef PARSE_COERCE_H
#define PARSE_COERCE_H
-typedef enum CATEGORY {
+typedef enum CATEGORY
+{
INVALID_TYPE,
UNKNOWN_TYPE,
BOOLEAN_TYPE,
@@ -24,13 +25,13 @@ typedef enum CATEGORY {
GEOMETRIC_TYPE,
USER_TYPE,
MIXED_TYPE
-} CATEGORY;
+} CATEGORY;
/* IS_BUILTIN_TYPE()
* Check for types which are in the core distribution.
* The built-in types can have more explicit support for type coersion, etc,
- * since we know apriori how they should behave.
+ * since we know apriori how they should behave.
* - thomas 1998-05-13
*/
#define IS_BUILTIN_TYPE(t) \
@@ -61,7 +62,7 @@ typedef enum CATEGORY {
/* IS_BINARY_COMPATIBLE()
* Check for types with the same underlying binary representation.
* This allows us to cheat and directly exchange values without
- * going through the trouble of calling a conversion function.
+ * going through the trouble of calling a conversion function.
*/
#define IS_BINARY_COMPATIBLE(a,b) \
(((a) == BPCHAROID && (b) == TEXTOID) \
@@ -97,7 +98,7 @@ typedef enum CATEGORY {
/* IS_HIGHEST_TYPE()
* These types are the most general in each of the type categories.
* Since timespan and datetime overload so many functions, let's
- * give datetime the preference.
+ * give datetime the preference.
* Since text is a generic string type let's leave it out too.
*/
#define IS_HIGHEST_TYPE(t) \
@@ -107,10 +108,10 @@ typedef enum CATEGORY {
extern bool IsPreferredType(CATEGORY category, Oid type);
-extern Oid PreferredType(CATEGORY category, Oid type);
+extern Oid PreferredType(CATEGORY category, Oid type);
extern CATEGORY TypeCategory(Oid type);
extern bool can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids);
extern Node *coerce_type(ParseState *pstate, Node *node, Oid inputTypeId, Oid targetTypeId);
-#endif /* PARSE_COERCE_H */
+#endif /* PARSE_COERCE_H */
diff --git a/src/include/parser/parse_expr.h b/src/include/parser/parse_expr.h
index 9e02458c8e..1d4b594f32 100644
--- a/src/include/parser/parse_expr.h
+++ b/src/include/parser/parse_expr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_expr.h,v 1.9 1998/07/12 21:29:34 momjian Exp $
+ * $Id: parse_expr.h,v 1.10 1998/09/01 04:37:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,4 +23,4 @@ extern Node *transformIdent(ParseState *pstate, Node *expr, int precedence);
extern Oid exprType(Node *expr);
extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int32 attypmod);
-#endif /* PARSE_EXPR_H */
+#endif /* PARSE_EXPR_H */
diff --git a/src/include/parser/parse_func.h b/src/include/parser/parse_func.h
index 655a979dd1..eab4b06ade 100644
--- a/src/include/parser/parse_func.h
+++ b/src/include/parser/parse_func.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_func.h,v 1.10 1998/05/29 14:03:08 thomas Exp $
+ * $Id: parse_func.h,v 1.11 1998/09/01 04:37:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,17 +42,15 @@ typedef struct _CandidateList
struct _CandidateList *next;
} *CandidateList;
-extern Node *
-ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr,
+extern Node *ParseNestedFuncOrColumn(ParseState *pstate, Attr *attr,
int *curr_resno, int precedence);
-extern Node *
-ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
+extern Node *ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
int *curr_resno, int precedence);
extern Oid *
-func_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates);
+ func_select_candidate(int nargs, Oid *input_typeids, CandidateList candidates);
extern void
-func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg);
+ func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg);
-#endif /* PARSE_FUNC_H */
+#endif /* PARSE_FUNC_H */
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h
index e77b3789b0..23040b5723 100644
--- a/src/include/parser/parse_node.h
+++ b/src/include/parser/parse_node.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_node.h,v 1.10 1998/02/26 04:42:46 momjian Exp $
+ * $Id: parse_node.h,v 1.11 1998/09/01 04:37:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,17 +44,14 @@ typedef struct ParseState
extern ParseState *make_parsestate(ParseState *parentParseState);
extern Expr *make_op(char *opname, Node *ltree, Node *rtree);
-extern Var *
-make_var(ParseState *pstate, Oid relid, char *refname,
+extern Var *make_var(ParseState *pstate, Oid relid, char *refname,
char *attrname);
-extern ArrayRef *
-make_array_ref(Node *expr,
+extern ArrayRef *make_array_ref(Node *expr,
List *indirection);
-extern ArrayRef *
-make_array_set(Expr *target_expr,
+extern ArrayRef *make_array_set(Expr *target_expr,
List *upperIndexpr,
List *lowerIndexpr,
Expr *expr);
extern Const *make_const(Value *value);
-#endif /* PARSE_NODE_H */
+#endif /* PARSE_NODE_H */
diff --git a/src/include/parser/parse_oper.h b/src/include/parser/parse_oper.h
index 7a0c9cd97f..56d43b8b11 100644
--- a/src/include/parser/parse_oper.h
+++ b/src/include/parser/parse_oper.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_oper.h,v 1.5 1998/05/29 14:07:50 thomas Exp $
+ * $Id: parse_oper.h,v 1.6 1998/09/01 04:37:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -27,4 +27,4 @@ extern Operator left_oper(char *op, Oid arg);
extern Operator oper_exact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarnings);
extern Operator oper_inexact(char *op, Oid arg1, Oid arg2, Node **ltree, Node **rtree, bool noWarnings);
-#endif /* PARSE_OPER_H */
+#endif /* PARSE_OPER_H */
diff --git a/src/include/parser/parse_relation.h b/src/include/parser/parse_relation.h
index 5fc882e75d..dc227ba5d8 100644
--- a/src/include/parser/parse_relation.h
+++ b/src/include/parser/parse_relation.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_relation.h,v 1.7 1998/02/26 04:42:47 momjian Exp $
+ * $Id: parse_relation.h,v 1.8 1998/09/01 04:37:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,25 +21,21 @@
#include <utils/rel.h>
extern RangeTblEntry *refnameRangeTableEntry(ParseState *pstate, char *refname);
-extern int
-refnameRangeTablePosn(ParseState *pstate,
+extern int refnameRangeTablePosn(ParseState *pstate,
char *refname, int *sublevels_up);
extern RangeTblEntry *colnameRangeTableEntry(ParseState *pstate, char *colname);
-extern RangeTblEntry *
-addRangeTableEntry(ParseState *pstate,
+extern RangeTblEntry *addRangeTableEntry(ParseState *pstate,
char *relname,
char *refname,
bool inh,
bool inFromCl);
-extern List *
-expandAll(ParseState *pstate, char *relname, char *refname,
+extern List *expandAll(ParseState *pstate, char *relname, char *refname,
int *this_resno);
extern int attnameAttNum(Relation rd, char *a);
extern bool attnameIsSet(Relation rd, char *name);
extern int attnumAttNelems(Relation rd, int attid);
extern Oid attnumTypeId(Relation rd, int attid);
-extern void
-handleTargetColname(ParseState *pstate, char **resname,
+extern void handleTargetColname(ParseState *pstate, char **resname,
char *refname, char *colname);
-#endif /* PARSE_RANGE_H */
+#endif /* PARSE_RANGE_H */
diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h
index 884fb299c4..263ed8a504 100644
--- a/src/include/parser/parse_target.h
+++ b/src/include/parser/parse_target.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_target.h,v 1.10 1998/08/25 03:17:29 momjian Exp $
+ * $Id: parse_target.h,v 1.11 1998/09/01 04:37:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,20 +24,18 @@
extern List *transformTargetList(ParseState *pstate, List *targetlist);
extern List *makeTargetNames(ParseState *pstate, List *cols);
-extern TargetEntry *
-MakeTargetEntryIdent(ParseState *pstate,
+extern TargetEntry *MakeTargetEntryIdent(ParseState *pstate,
Node *node,
char **resname,
char *refname,
char *colname,
int16 resjunk);
-extern Node *
-CoerceTargetExpr(ParseState *pstate, Node *expr,
+extern Node *CoerceTargetExpr(ParseState *pstate, Node *expr,
Oid type_id, Oid attrtype);
-TargetEntry * MakeTargetEntryExpr(ParseState *pstate,
- char *colname,
- Node *expr,
- List *arrayRef,
- int16 resjunk);
+TargetEntry *MakeTargetEntryExpr(ParseState *pstate,
+ char *colname,
+ Node *expr,
+ List *arrayRef,
+ int16 resjunk);
-#endif /* PARSE_TARGET_H */
+#endif /* PARSE_TARGET_H */
diff --git a/src/include/parser/parse_type.h b/src/include/parser/parse_type.h
index 7ea8e38329..3a01dd292e 100644
--- a/src/include/parser/parse_type.h
+++ b/src/include/parser/parse_type.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parse_type.h,v 1.7 1998/07/12 21:29:35 momjian Exp $
+ * $Id: parse_type.h,v 1.8 1998/09/01 04:37:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,4 +34,4 @@ extern Oid typeidTypElem(Oid type_id);
extern Oid GetArrayElementType(Oid typearray);
extern Oid typeidInfunc(Oid type_id);
-#endif /* PARSE_TYPE_H */
+#endif /* PARSE_TYPE_H */
diff --git a/src/include/parser/parser.h b/src/include/parser/parser.h
index 17867623e0..8d13e02880 100644
--- a/src/include/parser/parser.h
+++ b/src/include/parser/parser.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parser.h,v 1.3 1998/02/26 04:42:51 momjian Exp $
+ * $Id: parser.h,v 1.4 1998/09/01 04:37:42 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,4 +17,4 @@
extern QueryTreeList *parser(char *str, Oid *typev, int nargs);
-#endif /* PARSER_H */
+#endif /* PARSER_H */
diff --git a/src/include/parser/parsetree.h b/src/include/parser/parsetree.h
index 0d2f83bbb2..b82fe31e70 100644
--- a/src/include/parser/parsetree.h
+++ b/src/include/parser/parsetree.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: parsetree.h,v 1.4 1997/11/21 19:12:28 momjian Exp $
+ * $Id: parsetree.h,v 1.5 1998/09/01 04:37:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -65,4 +65,4 @@
#define getrelname(rangeindex, rangetable) \
rt_relname((RangeTblEntry*)nth((rangeindex)-1, rangetable))
-#endif /* PARSETREE_H */
+#endif /* PARSETREE_H */
diff --git a/src/include/parser/scansup.h b/src/include/parser/scansup.h
index 9a30962cce..3bc0ba46db 100644
--- a/src/include/parser/scansup.h
+++ b/src/include/parser/scansup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: scansup.h,v 1.4 1997/11/26 01:14:18 momjian Exp $
+ * $Id: scansup.h,v 1.5 1998/09/01 04:37:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -16,4 +16,4 @@
extern char *scanstr(char *s);
-#endif /* SCANSUP_H */
+#endif /* SCANSUP_H */
diff --git a/src/include/port/linux.h b/src/include/port/linux.h
index 4ac6684ee7..8d550c0e08 100644
--- a/src/include/port/linux.h
+++ b/src/include/port/linux.h
@@ -15,7 +15,7 @@ typedef unsigned int slock_t;
#elif defined(__alpha)
typedef long int slock_t;
-#else /* i386 probably */
+#else /* i386 probably */
typedef unsigned char slock_t;
#endif
@@ -35,4 +35,3 @@ typedef unsigned char slock_t;
#if defined(PPC)
#undef HAVE_INT_TIMEZONE
#endif
-
diff --git a/src/include/port/solaris_i386.h b/src/include/port/solaris_i386.h
index b2df1ba5e2..4530e4205a 100755
--- a/src/include/port/solaris_i386.h
+++ b/src/include/port/solaris_i386.h
@@ -24,7 +24,7 @@ typedef unsigned char slock_t;
#ifndef __nan_bytes
#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
-#endif /* __nan_bytes */
+#endif /* __nan_bytes */
#ifdef __GNUC__
#define NAN \
@@ -34,8 +34,8 @@ typedef unsigned char slock_t;
#else /* Not GCC. */
#define NAN (*(__const double *) __nan)
-#endif /* GCC. */
-#endif /* NAN */
+#endif /* GCC. */
+#endif /* NAN */
#ifndef index
#define index strchr
diff --git a/src/include/port/univel.h b/src/include/port/univel.h
index ae706eda5e..3e95acd604 100644
--- a/src/include/port/univel.h
+++ b/src/include/port/univel.h
@@ -17,7 +17,7 @@ typedef unsigned char slock_t;
/***************************************************************
* strcasecmp() is in c89.a. The following include will get the
- * needed prototype.
+ * needed prototype.
***************************************************************/
#include <strings.h>
diff --git a/src/include/port/unixware.h b/src/include/port/unixware.h
index c52b9b0948..cbdd4ff4d9 100644
--- a/src/include/port/unixware.h
+++ b/src/include/port/unixware.h
@@ -17,8 +17,8 @@ typedef unsigned char slock_t;
#define DISABLE_COMPLEX_MACRO
/***************************************************************
- * The following include will get the needed prototype for the
- * strcasecmp() function.
+ * The following include will get the needed prototype for the
+ * strcasecmp() function.
***************************************************************/
#include <strings.h>
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 6b659347fa..ff81c2b8bc 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1995, Regents of the University of California
*
- * $Id: postgres.h,v 1.18 1998/08/19 02:03:32 momjian Exp $
+ * $Id: postgres.h,v 1.19 1998/09/01 04:34:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -164,6 +164,6 @@ typedef uint32 CommandId;
#ifdef CYR_RECODE
void SetCharSet();
-#endif /* CYR_RECODE */
+#endif /* CYR_RECODE */
-#endif /* POSTGRES_H */
+#endif /* POSTGRES_H */
diff --git a/src/include/regex/cdefs.h b/src/include/regex/cdefs.h
index 8493c2563c..69f9128f45 100644
--- a/src/include/regex/cdefs.h
+++ b/src/include/regex/cdefs.h
@@ -55,7 +55,7 @@
/*
* @(#)cdefs.h 8.1 (Berkeley) 6/2/93
- * $Id: cdefs.h,v 1.3 1997/09/07 05:00:14 momjian Exp $
+ * $Id: cdefs.h,v 1.4 1998/09/01 04:37:51 momjian Exp $
*/
#ifndef _CDEFS_H_
@@ -96,8 +96,8 @@
#else
#ifndef __GNUC__
#define __inline /* delete GCC keyword */
-#endif /* !__GNUC__ */
-#endif /* !__cplusplus */
+#endif /* !__GNUC__ */
+#endif /* !__cplusplus */
#else /* !(__STDC__ || __cplusplus) */
#define __P(protos) () /* traditional C preprocessor */
@@ -123,8 +123,8 @@
#define signed
#define volatile
#endif
-#endif /* !__GNUC__ */
-#endif /* !(__STDC__ || __cplusplus) */
+#endif /* !__GNUC__ */
+#endif /* !(__STDC__ || __cplusplus) */
/*
* GCC1 and some versions of GCC2 declare dead (non-returning) and
@@ -148,4 +148,4 @@
#define __pure
#endif
-#endif /* !_CDEFS_H_ */
+#endif /* !_CDEFS_H_ */
diff --git a/src/include/regex/regex.h b/src/include/regex/regex.h
index c4a306e4c2..55c11733ea 100644
--- a/src/include/regex/regex.h
+++ b/src/include/regex/regex.h
@@ -50,10 +50,10 @@ typedef struct
{
int re_magic;
size_t re_nsub; /* number of parenthesized subexpressions */
- const pg_wchar *re_endp; /* end pointer for REG_PEND */
+ const pg_wchar *re_endp; /* end pointer for REG_PEND */
struct re_guts *re_g; /* none of your business :-) */
#ifdef MULTIBYTE
- pg_wchar *patsave; /* mee too :-) */
+ pg_wchar *patsave; /* mee too :-) */
#endif
} regex_t;
@@ -104,9 +104,8 @@ typedef struct
int pg95_regcomp(regex_t *, const char *, int);
size_t pg95_regerror(int, const regex_t *, char *, size_t);
-int
-pg95_regexec(const regex_t *,
+int pg95_regexec(const regex_t *,
const char *, size_t, regmatch_t[], int);
void pg95_regfree(regex_t *);
-#endif /* !_REGEX_H_ */
+#endif /* !_REGEX_H_ */
diff --git a/src/include/regex/regex2.h b/src/include/regex/regex2.h
index e17491164a..aab9195dc5 100644
--- a/src/include/regex/regex2.h
+++ b/src/include/regex/regex2.h
@@ -129,9 +129,9 @@ typedef struct
uch mask; /* bit within array */
#ifdef MULTIBYTE
pg_wchar hash; /* hash code */
- unsigned int lc; /* leading character (character-set) */
+ unsigned int lc; /* leading character (character-set) */
#else
- uch hash; /* hash code */
+ uch hash; /* hash code */
#endif
size_t smultis;
char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */
@@ -139,11 +139,11 @@ typedef struct
/* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */
#ifdef MULTIBYTE
-#define CHlc(c) (((unsigned)(c)&0xff0000)>>16)
+#define CHlc(c) (((unsigned)(c)&0xff0000)>>16)
#define CHadd(cs, c) ((cs)->ptr[(unsigned)(c)&0xffff] |= (cs)->mask, (cs)->hash += (unsigned)(c)&0xffff,\
(cs)->lc = CHlc(c))
#define CHsub(cs, c) ((cs)->ptr[(unsigned)(c)&0xffff] &= ~(cs)->mask, (cs)->hash -= (unsigned)(c)&0xffff)
-#define CHIN(cs, c) ((cs)->ptr[(unsigned)(c)&0xffff] & (cs)->mask && \
+#define CHIN(cs, c) ((cs)->ptr[(unsigned)(c)&0xffff] & (cs)->mask && \
((cs)->lc == CHlc(c)))
#define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal
* fns */
@@ -186,7 +186,7 @@ struct re_guts
int neol; /* number of $ used */
int ncategories; /* how many character categories */
cat_t *categories; /* ->catspace[-CHAR_MIN] */
- pg_wchar *must; /* match must contain this string */
+ pg_wchar *must; /* match must contain this string */
int mlen; /* length of must */
size_t nsub; /* copy of re_nsub */
int backrefs; /* does it use back references? */
@@ -197,9 +197,9 @@ struct re_guts
/* misc utilities */
#ifdef MULTIBYTE
-# define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */
+#define OUT (16777216+1) /* 16777216 == 2^24 == 3 bytes */
#else
-# define OUT (CHAR_MAX+1) /* a non-character value */
+#define OUT (CHAR_MAX+1) /* a non-character value */
#endif
#ifdef MULTIBYTE
diff --git a/src/include/regex/regexp.h b/src/include/regex/regexp.h
index d800819070..9efa403eb9 100644
--- a/src/include/regex/regexp.h
+++ b/src/include/regex/regexp.h
@@ -68,4 +68,4 @@ void pg95_regerror __P((const char *));
__END_DECLS
-#endif /* !_REGEXP_H_ */
+#endif /* !_REGEXP_H_ */
diff --git a/src/include/rewrite/locks.h b/src/include/rewrite/locks.h
index 88ff592139..b51b02463e 100644
--- a/src/include/rewrite/locks.h
+++ b/src/include/rewrite/locks.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: locks.h,v 1.8 1998/02/26 04:43:03 momjian Exp $
+ * $Id: locks.h,v 1.9 1998/09/01 04:37:57 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,8 +17,7 @@
#include "nodes/parsenodes.h"
#include "rewrite/prs2lock.h"
-extern List *
-matchLocks(CmdType event, RuleLock *rulelocks, int varno,
+extern List *matchLocks(CmdType event, RuleLock *rulelocks, int varno,
Query *parsetree);
-#endif /* LOCKS_H */
+#endif /* LOCKS_H */
diff --git a/src/include/rewrite/prs2lock.h b/src/include/rewrite/prs2lock.h
index 183abf5130..cbf5705c15 100644
--- a/src/include/rewrite/prs2lock.h
+++ b/src/include/rewrite/prs2lock.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: prs2lock.h,v 1.7 1997/09/08 21:54:03 momjian Exp $
+ * $Id: prs2lock.h,v 1.8 1998/09/01 04:37:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,4 +42,4 @@ typedef struct RuleLock
RewriteRule **rules;
} RuleLock;
-#endif /* REWRITE_H */
+#endif /* REWRITE_H */
diff --git a/src/include/rewrite/rewriteDefine.h b/src/include/rewrite/rewriteDefine.h
index c002dd58f0..3dd43c0125 100644
--- a/src/include/rewrite/rewriteDefine.h
+++ b/src/include/rewrite/rewriteDefine.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteDefine.h,v 1.5 1997/11/26 01:14:22 momjian Exp $
+ * $Id: rewriteDefine.h,v 1.6 1998/09/01 04:38:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,4 +17,4 @@
extern void DefineQueryRewrite(RuleStmt *args);
-#endif /* REWRITEDEFINE_H */
+#endif /* REWRITEDEFINE_H */
diff --git a/src/include/rewrite/rewriteHandler.h b/src/include/rewrite/rewriteHandler.h
index e55e2086bc..ecec766aec 100644
--- a/src/include/rewrite/rewriteHandler.h
+++ b/src/include/rewrite/rewriteHandler.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteHandler.h,v 1.5 1997/11/26 01:14:23 momjian Exp $
+ * $Id: rewriteHandler.h,v 1.6 1998/09/01 04:38:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,4 +35,4 @@ typedef struct _rewrite_meta_knowledge RewriteInfo;
extern List *QueryRewrite(Query *parsetree);
-#endif /* REWRITEHANDLER_H */
+#endif /* REWRITEHANDLER_H */
diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h
index f5934a8962..dd3ba1ff15 100644
--- a/src/include/rewrite/rewriteManip.h
+++ b/src/include/rewrite/rewriteManip.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteManip.h,v 1.8 1998/07/19 05:49:26 momjian Exp $
+ * $Id: rewriteManip.h,v 1.9 1998/09/01 04:38:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,22 +19,19 @@
/* RewriteManip.c */
void OffsetVarNodes(Node *node, int offset);
-void
-ChangeVarNodes(Node *node, int old_varno, int new_varno,
+void ChangeVarNodes(Node *node, int old_varno, int new_varno,
int sublevels_up);
void AddQual(Query *parsetree, Node *qual);
-void AddHavingQual(Query *parsetree, Node *havingQual);
+void AddHavingQual(Query *parsetree, Node *havingQual);
void AddNotQual(Query *parsetree, Node *qual);
void FixResdomTypes(List *user_tlist);
void FixNew(RewriteInfo *info, Query *parsetree);
-void
-HandleRIRAttributeRule(Query *parsetree, List *rtable, List *targetlist,
+void HandleRIRAttributeRule(Query *parsetree, List *rtable, List *targetlist,
int rt_index, int attr_num, int *modified,
int *badpostquel);
-void
-HandleViewRule(Query *parsetree, List *rtable, List *targetlist,
+void HandleViewRule(Query *parsetree, List *rtable, List *targetlist,
int rt_index, int *modified);
-#endif /* REWRITEMANIP_H */
+#endif /* REWRITEMANIP_H */
diff --git a/src/include/rewrite/rewriteRemove.h b/src/include/rewrite/rewriteRemove.h
index ad69e7af03..82875f06d0 100644
--- a/src/include/rewrite/rewriteRemove.h
+++ b/src/include/rewrite/rewriteRemove.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteRemove.h,v 1.3 1997/09/08 02:38:51 momjian Exp $
+ * $Id: rewriteRemove.h,v 1.4 1998/09/01 04:38:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,4 +17,4 @@ extern char *RewriteGetRuleEventRel(char *rulename);
extern void RemoveRewriteRule(char *ruleName);
extern void RelationRemoveRules(Oid relid);
-#endif /* REWRITEREMOVE_H */
+#endif /* REWRITEREMOVE_H */
diff --git a/src/include/rewrite/rewriteSupport.h b/src/include/rewrite/rewriteSupport.h
index 098443144d..49ee00e3cb 100644
--- a/src/include/rewrite/rewriteSupport.h
+++ b/src/include/rewrite/rewriteSupport.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rewriteSupport.h,v 1.8 1998/02/26 04:43:13 momjian Exp $
+ * $Id: rewriteSupport.h,v 1.9 1998/09/01 04:38:05 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,11 +18,10 @@
extern int IsDefinedRewriteRule(char *ruleName);
-extern void
-prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type,
+extern void prs2_addToRelation(Oid relid, Oid ruleId, CmdType event_type,
AttrNumber attno, bool isInstead, Node *qual,
List *actions);
extern void prs2_deleteFromRelation(Oid relid, Oid ruleId);
-#endif /* REWRITESUPPORT_H */
+#endif /* REWRITESUPPORT_H */
diff --git a/src/include/rusagestub.h b/src/include/rusagestub.h
index 794d5bed66..083e664371 100644
--- a/src/include/rusagestub.h
+++ b/src/include/rusagestub.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rusagestub.h,v 1.2 1998/02/26 04:39:50 momjian Exp $
+ * $Id: rusagestub.h,v 1.3 1998/09/01 04:34:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,4 +28,4 @@ struct rusage
extern int getrusage(int who, struct rusage * rusage);
-#endif /* RUSAGESTUB_H */
+#endif /* RUSAGESTUB_H */
diff --git a/src/include/storage/backendid.h b/src/include/storage/backendid.h
index 25be9a4fdc..35a4130782 100644
--- a/src/include/storage/backendid.h
+++ b/src/include/storage/backendid.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: backendid.h,v 1.4 1997/09/08 02:38:53 momjian Exp $
+ * $Id: backendid.h,v 1.5 1998/09/01 04:38:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -29,4 +29,4 @@ typedef int32 BackendTag; /* unique backend identifier */
extern BackendId MyBackendId; /* backend id of this backend */
extern BackendTag MyBackendTag; /* backend tag of this backend */
-#endif /* BACKENDID_H */
+#endif /* BACKENDID_H */
diff --git a/src/include/storage/block.h b/src/include/storage/block.h
index 17b9378688..1f31fadfee 100644
--- a/src/include/storage/block.h
+++ b/src/include/storage/block.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: block.h,v 1.6 1998/06/15 18:40:00 momjian Exp $
+ * $Id: block.h,v 1.7 1998/09/01 04:38:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -115,4 +115,4 @@ typedef BlockIdData *BlockId; /* block identifier */
(BlockNumber) (((blockId)->bi_hi << 16) | ((uint16) (blockId)->bi_lo)) \
)
-#endif /* BLOCK_H */
+#endif /* BLOCK_H */
diff --git a/src/include/storage/buf.h b/src/include/storage/buf.h
index 86288cb345..9b19fa279b 100644
--- a/src/include/storage/buf.h
+++ b/src/include/storage/buf.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: buf.h,v 1.3 1997/09/08 02:38:56 momjian Exp $
+ * $Id: buf.h,v 1.4 1998/09/01 04:38:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,4 +44,4 @@ typedef long Buffer;
*/
#undef NO_BUFFERISVALID
-#endif /* BUF_H */
+#endif /* BUF_H */
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index 03d249195d..61f567b6d3 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: buf_internals.h,v 1.25 1998/08/01 15:26:34 vadim Exp $
+ * $Id: buf_internals.h,v 1.26 1998/09/01 04:38:10 momjian Exp $
*
* NOTE
* If BUFFERPAGE0 is defined, then 0 will be used as a
@@ -51,7 +51,7 @@ typedef long **BufferBlock;
struct buftag
{
- LockRelId relId;
+ LockRelId relId;
BlockNumber blockNum; /* blknum relative to begin of reln */
};
@@ -101,7 +101,7 @@ struct sbufdesc_unpadded
unsigned refcount;
#ifdef HAS_TEST_AND_SET
slock_t io_in_progress_lock;
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
char sb_dbname[NAMEDATALEN];
/* NOTE NO PADDING OF THE MEMBER HERE */
@@ -125,7 +125,7 @@ struct sbufdesc
#ifdef HAS_TEST_AND_SET
/* can afford a dedicated lock if test-and-set locks are available */
slock_t io_in_progress_lock;
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
char sb_dbname[NAMEDATALEN]; /* name of db in which buf belongs */
@@ -173,7 +173,7 @@ typedef struct _bmtrace
} bmtrace;
-#endif /* BMTRACE */
+#endif /* BMTRACE */
/*
@@ -209,8 +209,7 @@ extern long *LocalRefCount;
extern BufferDesc *LocalBufferDescriptors;
extern int NLocBuffer;
-extern BufferDesc *
-LocalBufferAlloc(Relation reln, BlockNumber blockNum,
+extern BufferDesc *LocalBufferAlloc(Relation reln, BlockNumber blockNum,
bool *foundPtr);
extern int WriteLocalBuffer(Buffer buffer, bool release);
extern int FlushLocalBuffer(Buffer buffer, bool release);
@@ -218,4 +217,4 @@ extern void InitLocalBuffer(void);
extern void LocalBufferSync(void);
extern void ResetLocalBufferPool(void);
-#endif /* BUFMGR_INTERNALS_H */
+#endif /* BUFMGR_INTERNALS_H */
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 60acb86634..cfd4a73bc5 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bufmgr.h,v 1.21 1998/08/19 02:03:57 momjian Exp $
+ * $Id: bufmgr.h,v 1.22 1998/09/01 04:38:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -128,14 +128,12 @@ extern int ShowPinTrace;
/*
* prototypes for functions in bufmgr.c
*/
-extern Buffer
-RelationGetBufferWithBuffer(Relation relation,
+extern Buffer RelationGetBufferWithBuffer(Relation relation,
BlockNumber blockNumber, Buffer buffer);
extern Buffer ReadBuffer(Relation reln, BlockNumber blockNum);
extern int WriteBuffer(Buffer buffer);
extern int WriteNoReleaseBuffer(Buffer buffer);
-extern Buffer
-ReleaseAndReadBuffer(Buffer buffer, Relation relation,
+extern Buffer ReleaseAndReadBuffer(Buffer buffer, Relation relation,
BlockNumber blockNum);
extern void InitBufferPool(IPCKey key);
@@ -159,4 +157,4 @@ extern void BufferRefCountRestore(int *refcountsave);
extern int SetBufferWriteMode(int mode);
extern void SetBufferCommitInfoNeedsSave(Buffer buffer);
-#endif /* !defined(BufMgrIncluded) */
+#endif /* !defined(BufMgrIncluded) */
diff --git a/src/include/storage/bufpage.h b/src/include/storage/bufpage.h
index 123192f914..a6c8b8e920 100644
--- a/src/include/storage/bufpage.h
+++ b/src/include/storage/bufpage.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bufpage.h,v 1.19 1998/06/15 18:40:02 momjian Exp $
+ * $Id: bufpage.h,v 1.20 1998/09/01 04:38:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -310,8 +310,7 @@ typedef enum
*/
extern void PageInit(Page page, Size pageSize, Size specialSize);
-extern OffsetNumber
-PageAddItem(Page page, Item item, Size size,
+extern OffsetNumber PageAddItem(Page page, Item item, Size size,
OffsetNumber offsetNumber, ItemIdFlags flags);
extern Page PageGetTempPage(Page page, Size specialSize);
extern void PageRestoreTempPage(Page tempPage, Page oldPage);
@@ -321,4 +320,4 @@ extern void PageManagerModeSet(PageManagerMode mode);
extern void PageIndexTupleDelete(Page page, OffsetNumber offset);
-#endif /* BUFPAGE_H */
+#endif /* BUFPAGE_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index e5404154a6..8e5cc0a4ac 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fd.h,v 1.10 1997/09/08 02:39:00 momjian Exp $
+ * $Id: fd.h,v 1.11 1998/09/01 04:38:14 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -77,4 +77,4 @@ extern void FreeFile(FILE *);
extern void closeAllVfds(void);
extern int pg_fsync(int fd);
-#endif /* FD_H */
+#endif /* FD_H */
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 3691eac675..4733b34bbc 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ipc.h,v 1.29 1998/06/27 15:47:47 momjian Exp $
+ * $Id: ipc.h,v 1.30 1998/09/01 04:38:16 momjian Exp $
*
* NOTES
* This file is very architecture-specific. This stuff should actually
@@ -73,12 +73,11 @@ typedef int IpcMemoryId;
/* ipc.c */
extern void proc_exit(int code);
extern void shmem_exit(int code);
-extern int on_shmem_exit(void (*function) (), caddr_t arg);
-extern int on_proc_exit(void (*function) (), caddr_t arg);
+extern int on_shmem_exit(void (*function) (), caddr_t arg);
+extern int on_proc_exit(void (*function) (), caddr_t arg);
extern void on_exit_reset(void);
-extern IpcSemaphoreId
-IpcSemaphoreCreate(IpcSemaphoreKey semKey,
+extern IpcSemaphoreId IpcSemaphoreCreate(IpcSemaphoreKey semKey,
int semNum, int permission, int semStartValue,
int removeOnExit, int *status);
extern void IpcSemaphoreKill(IpcSemaphoreKey key);
@@ -86,8 +85,7 @@ extern void IpcSemaphoreLock(IpcSemaphoreId semId, int sem, int lock);
extern void IpcSemaphoreUnlock(IpcSemaphoreId semId, int sem, int lock);
extern int IpcSemaphoreGetCount(IpcSemaphoreId semId, int sem);
extern int IpcSemaphoreGetValue(IpcSemaphoreId semId, int sem);
-extern IpcMemoryId
-IpcMemoryCreate(IpcMemoryKey memKey, uint32 size,
+extern IpcMemoryId IpcMemoryCreate(IpcMemoryKey memKey, uint32 size,
int permission);
extern IpcMemoryId IpcMemoryIdGet(IpcMemoryKey memKey, uint32 size);
extern char *IpcMemoryAttach(IpcMemoryId memId);
@@ -155,7 +153,7 @@ typedef enum _LockId_
#define MAX_SPINS FIRSTFREELOCKID
-#endif /* HAS_TEST_AND_SET */
+#endif /* HAS_TEST_AND_SET */
/*
* the following are originally in ipci.h but the prototypes have circular
@@ -204,4 +202,4 @@ extern IPCKey SystemPortAddressCreateIPCKey(SystemPortAddress address);
extern void CreateSharedMemoryAndSemaphores(IPCKey key);
extern void AttachSharedMemoryAndSemaphores(IPCKey key);
-#endif /* IPC_H */
+#endif /* IPC_H */
diff --git a/src/include/storage/item.h b/src/include/storage/item.h
index 6541a717f9..d3cf7bfdff 100644
--- a/src/include/storage/item.h
+++ b/src/include/storage/item.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: item.h,v 1.3 1997/09/07 05:01:16 momjian Exp $
+ * $Id: item.h,v 1.4 1998/09/01 04:38:17 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,4 +15,4 @@
typedef Pointer Item;
-#endif /* ITEM_H */
+#endif /* ITEM_H */
diff --git a/src/include/storage/itemid.h b/src/include/storage/itemid.h
index 5a3953c32e..1c37713f15 100644
--- a/src/include/storage/itemid.h
+++ b/src/include/storage/itemid.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itemid.h,v 1.6 1998/06/15 18:40:03 momjian Exp $
+ * $Id: itemid.h,v 1.7 1998/09/01 04:38:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -75,4 +75,4 @@ typedef struct ItemIdData *ItemId;
(bool) (((itemId)->lp_flags & LP_USED) != 0) \
)
-#endif /* ITEMID_H */
+#endif /* ITEMID_H */
diff --git a/src/include/storage/itempos.h b/src/include/storage/itempos.h
index 332636ce95..6f022e1822 100644
--- a/src/include/storage/itempos.h
+++ b/src/include/storage/itempos.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itempos.h,v 1.5 1997/09/08 02:39:02 momjian Exp $
+ * $Id: itempos.h,v 1.6 1998/09/01 04:38:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,4 +41,4 @@ typedef ItemSubpositionData *ItemSubposition;
#define PSKIP(OBJP, LEN)\
{ (OBJP)->op_cp += (LEN); (OBJP)->op_len -= (LEN); }
-#endif /* ITEMPOS_H */
+#endif /* ITEMPOS_H */
diff --git a/src/include/storage/itemptr.h b/src/include/storage/itemptr.h
index c6922a093f..253d9f2151 100644
--- a/src/include/storage/itemptr.h
+++ b/src/include/storage/itemptr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itemptr.h,v 1.8 1998/06/15 18:40:03 momjian Exp $
+ * $Id: itemptr.h,v 1.9 1998/09/01 04:38:20 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -123,4 +123,4 @@ typedef ItemPointerData *ItemPointer;
extern bool ItemPointerEquals(ItemPointer pointer1, ItemPointer pointer2);
-#endif /* ITEMPTR_H */
+#endif /* ITEMPTR_H */
diff --git a/src/include/storage/large_object.h b/src/include/storage/large_object.h
index 3d35dba907..0918ab03df 100644
--- a/src/include/storage/large_object.h
+++ b/src/include/storage/large_object.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: large_object.h,v 1.8 1998/07/21 04:17:30 momjian Exp $
+ * $Id: large_object.h,v 1.9 1998/09/01 04:38:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,4 +57,4 @@ extern int inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes);
/* added for buffer leak prevention [ PA ] */
extern void inv_cleanindex(LargeObjectDesc *obj_desc);
-#endif /* LARGE_OBJECT_H */
+#endif /* LARGE_OBJECT_H */
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h
index 0ee5334472..4082811bcc 100644
--- a/src/include/storage/lmgr.h
+++ b/src/include/storage/lmgr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lmgr.h,v 1.14 1998/08/01 15:26:36 vadim Exp $
+ * $Id: lmgr.h,v 1.15 1998/09/01 04:38:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -25,19 +25,21 @@ typedef struct LockRelId
{
Oid relId; /* a relation identifier */
Oid dbId; /* a database identifier */
-} LockRelId;
+} LockRelId;
#ifdef LowLevelLocking
typedef struct LockInfoData
{
LockRelId lockRelId;
- bool lockHeld[MAX_LOCKMODES]; /* on table level */
+ bool lockHeld[MAX_LOCKMODES]; /* on table level */
} LockInfoData;
+
#else
typedef struct LockInfoData
{
LockRelId lockRelId;
} LockInfoData;
+
#endif
typedef LockInfoData *LockInfo;
@@ -52,22 +54,17 @@ extern void RelationSetLockForWrite(Relation relation);
extern void RelationUnsetLockForWrite(Relation relation);
/* used in vaccum.c */
-extern void
-RelationSetLockForWritePage(Relation relation,
+extern void RelationSetLockForWritePage(Relation relation,
ItemPointer itemPointer);
/* used in nbtpage.c, hashpage.c */
-extern void
-RelationSetSingleWLockPage(Relation relation,
+extern void RelationSetSingleWLockPage(Relation relation,
ItemPointer itemPointer);
-extern void
-RelationUnsetSingleWLockPage(Relation relation,
+extern void RelationUnsetSingleWLockPage(Relation relation,
ItemPointer itemPointer);
-extern void
-RelationSetSingleRLockPage(Relation relation,
+extern void RelationSetSingleRLockPage(Relation relation,
ItemPointer itemPointer);
-extern void
-RelationUnsetSingleRLockPage(Relation relation,
+extern void RelationUnsetSingleRLockPage(Relation relation,
ItemPointer itemPointer);
extern void RelationSetRIntentLock(Relation relation);
extern void RelationUnsetRIntentLock(Relation relation);
@@ -76,11 +73,10 @@ extern void RelationUnsetWIntentLock(Relation relation);
/* single.c */
extern bool SingleLockReln(LockInfo lockinfo, LOCKMODE lockmode, int action);
-extern bool
-SingleLockPage(LockInfo lockinfo, ItemPointer tidPtr,
+extern bool SingleLockPage(LockInfo lockinfo, ItemPointer tidPtr,
LOCKMODE lockmode, int action);
/* proc.c */
extern void InitProcGlobal(IPCKey key);
-#endif /* LMGR_H */
+#endif /* LMGR_H */
diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h
index e989e57b44..09292c4f74 100644
--- a/src/include/storage/lock.h
+++ b/src/include/storage/lock.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lock.h,v 1.17 1998/08/25 21:20:31 scrappy Exp $
+ * $Id: lock.h,v 1.18 1998/09/01 04:38:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,7 +53,7 @@ typedef int LOCKMETHOD;
* CreateSpinLocks() or the number of shared memory locations allocated
* for lock table spin locks in the case of machines with TAS instructions.
*/
-#define MAX_LOCK_METHODS 3
+#define MAX_LOCK_METHODS 3
#define INVALID_TABLEID 0
@@ -70,7 +70,7 @@ typedef struct LTAG
Oid relId;
Oid dbId;
ItemPointerData tupleId;
- uint16 lockmethod; /* needed by user locks */
+ uint16 lockmethod; /* needed by user locks */
} LOCKTAG;
#define TAGSIZE (sizeof(LOCKTAG))
@@ -98,12 +98,12 @@ typedef struct LTAG
*/
typedef struct LOCKMETHODCTL
{
- LOCKMETHOD lockmethod;
+ LOCKMETHOD lockmethod;
int numLockModes;
int conflictTab[MAX_LOCKMODES];
int prio[MAX_LOCKMODES];
SPINLOCK masterLock;
-} LOCKMETHODCTL;
+} LOCKMETHODCTL;
/*
* lockHash -- hash table on lock Ids,
@@ -115,8 +115,8 @@ typedef struct LOCKMETHODTABLE
{
HTAB *lockHash;
HTAB *xidHash;
- LOCKMETHODCTL *ctl;
-} LOCKMETHODTABLE;
+ LOCKMETHODCTL *ctl;
+} LOCKMETHODTABLE;
/* -----------------------
* A transaction never conflicts with its own locks. Hence, if
@@ -153,7 +153,7 @@ typedef struct XIDTAG
int pid;
TransactionId xid;
#ifdef USE_XIDTAG_LOCKMETHOD
- uint16 lockmethod; /* for debug or consistency checking */
+ uint16 lockmethod; /* for debug or consistency checking */
#endif
} XIDTAG;
@@ -232,26 +232,27 @@ extern SPINLOCK LockMgrLock;
extern void InitLocks(void);
extern void LockDisable(int status);
extern LOCKMETHOD LockMethodTableInit(char *tabName, MASK *conflictsP,
- int *prioP, int numModes);
+ int *prioP, int numModes);
extern LOCKMETHOD LockMethodTableRename(LOCKMETHOD lockmethod);
extern bool LockAcquire(LOCKMETHOD lockmethod, LOCKTAG *locktag,
- LOCKMODE lockmode);
+ LOCKMODE lockmode);
extern int LockResolveConflicts(LOCKMETHOD lockmethod, LOCK *lock,
- LOCKMODE lockmode, TransactionId xid,
- XIDLookupEnt *xidentP);
+ LOCKMODE lockmode, TransactionId xid,
+ XIDLookupEnt *xidentP);
extern bool LockRelease(LOCKMETHOD lockmethod, LOCKTAG *locktag,
- LOCKMODE lockmode);
+ LOCKMODE lockmode);
extern void GrantLock(LOCK *lock, LOCKMODE lockmode);
extern bool LockReleaseAll(LOCKMETHOD lockmethod, SHM_QUEUE *lockQueue);
extern int LockShmemSize(void);
extern bool LockingDisabled(void);
extern bool DeadLockCheck(SHM_QUEUE *lockQueue, LOCK *findlock,
- bool skip_check);
-ArrayType* LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag);
+ bool skip_check);
+ArrayType *LockOwners(LOCKMETHOD lockmethod, LOCKTAG *locktag);
#ifdef DEADLOCK_DEBUG
extern void DumpLocks(void);
extern void DumpAllLocks(void);
+
#endif
-#endif /* LOCK_H */
+#endif /* LOCK_H */
diff --git a/src/include/storage/multilev.h b/src/include/storage/multilev.h
index 7d3a3c983a..a09a6077bd 100644
--- a/src/include/storage/multilev.h
+++ b/src/include/storage/multilev.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: multilev.h,v 1.12 1998/08/01 15:26:38 vadim Exp $
+ * $Id: multilev.h,v 1.13 1998/09/01 04:38:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,18 +19,18 @@
#ifdef LowLevelLocking
/* DML locks */
-#define RowShareLock 1 /* SELECT FOR UPDATE */
-#define RowExclusiveLock 2 /* INSERT, UPDATE, DELETE */
-#define ShareLock 3
-#define ShareRowExclusiveLock 4
-#define ExclusiveLock 5
+#define RowShareLock 1 /* SELECT FOR UPDATE */
+#define RowExclusiveLock 2 /* INSERT, UPDATE, DELETE */
+#define ShareLock 3
+#define ShareRowExclusiveLock 4
+#define ExclusiveLock 5
/* DDL locks */
-#define ObjShareLock 6
-#define ObjExclusiveLock 7
+#define ObjShareLock 6
+#define ObjExclusiveLock 7
/* Special locks */
-#define ExtendLock 8
+#define ExtendLock 8
#else
@@ -49,7 +49,7 @@
#define EXTEND_LOCK 5
-#endif /* !LowLevelLocking */
+#endif /* !LowLevelLocking */
#define SHORT_TERM 1
#define LONG_TERM 2
@@ -64,8 +64,10 @@ typedef int PG_LOCK_LEVEL;
/* multi.c */
extern LOCKMETHOD MultiTableId;
+
#ifdef NOT_USED
extern LOCKMETHOD ShortTermTableId;
+
#endif
/*
@@ -77,4 +79,4 @@ extern bool MultiLockTuple(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockm
extern bool MultiLockPage(LockInfo lockinfo, ItemPointer tidPtr, LOCKMODE lockmode);
extern bool MultiReleaseReln(LockInfo lockinfo, LOCKMODE lockmode);
-#endif /* MULTILEV_H */
+#endif /* MULTILEV_H */
diff --git a/src/include/storage/off.h b/src/include/storage/off.h
index 3dc72d6701..e073839fd4 100644
--- a/src/include/storage/off.h
+++ b/src/include/storage/off.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: off.h,v 1.4 1997/09/08 02:39:06 momjian Exp $
+ * $Id: off.h,v 1.5 1998/09/01 04:38:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -53,4 +53,4 @@ typedef uint16 OffsetNumber;
#define OffsetNumberPrev(offsetNumber) \
((OffsetNumber) (-1 + (offsetNumber)))
-#endif /* OFF_H */
+#endif /* OFF_H */
diff --git a/src/include/storage/page.h b/src/include/storage/page.h
index 17d29746c9..3e03c7c14e 100644
--- a/src/include/storage/page.h
+++ b/src/include/storage/page.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: page.h,v 1.3 1997/09/07 05:01:30 momjian Exp $
+ * $Id: page.h,v 1.4 1998/09/01 04:38:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,4 +21,4 @@ typedef Pointer Page;
*/
#define PageIsValid(page) PointerIsValid(page)
-#endif /* PAGE_H */
+#endif /* PAGE_H */
diff --git a/src/include/storage/pagenum.h b/src/include/storage/pagenum.h
index 95e2b4beb4..bd36d07dc2 100644
--- a/src/include/storage/pagenum.h
+++ b/src/include/storage/pagenum.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pagenum.h,v 1.5 1997/09/08 02:39:06 momjian Exp $
+ * $Id: pagenum.h,v 1.6 1998/09/01 04:38:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,4 +28,4 @@ typedef uint32 LogicalPageNumber;
((bool)((pageNumber) != InvalidLogicalPageNumber))
-#endif /* PAGENUM_H */
+#endif /* PAGENUM_H */
diff --git a/src/include/storage/pos.h b/src/include/storage/pos.h
index 46965b9fbd..4e67fc29cf 100644
--- a/src/include/storage/pos.h
+++ b/src/include/storage/pos.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pos.h,v 1.4 1997/09/08 02:39:07 momjian Exp $
+ * $Id: pos.h,v 1.5 1998/09/01 04:38:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -59,4 +59,4 @@ typedef PositionIdData *PositionId;
#define PositionIdGetOffsetNumber(positionId) \
((OffsetNumber) *(positionId))
-#endif /* POS_H */
+#endif /* POS_H */
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h
index 50f7b03ef6..4a62fac18a 100644
--- a/src/include/storage/proc.h
+++ b/src/include/storage/proc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: proc.h,v 1.14 1998/08/25 21:20:32 scrappy Exp $
+ * $Id: proc.h,v 1.15 1998/09/01 04:38:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -45,11 +45,9 @@ typedef struct proc
* this proc */
#ifdef LowLevelLocking
- TransactionId xmin; /* minimal running XID as it was when
- * we were starting our xact: vacuum
- * must not remove tuples deleted by
- * xid >= xmin !
- */
+ TransactionId xmin; /* minimal running XID as it was when we
+ * were starting our xact: vacuum must not
+ * remove tuples deleted by xid >= xmin ! */
#endif
LOCK *waitLock; /* Lock we're sleeping on */
@@ -106,11 +104,11 @@ extern bool ProcRemove(int pid);
extern void ProcQueueInit(PROC_QUEUE *queue);
extern int ProcSleep(PROC_QUEUE *queue, SPINLOCK spinlock, int token,
- int prio, LOCK *lock, TransactionId xid);
-extern int ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod,
- LOCK *lock);
+ int prio, LOCK *lock, TransactionId xid);
+extern int ProcLockWakeup(PROC_QUEUE *queue, LOCKMETHOD lockmethod,
+ LOCK *lock);
extern void ProcAddLock(SHM_QUEUE *elem);
extern void ProcReleaseSpins(PROC *proc);
extern void ProcFreeAllSemaphores(void);
-#endif /* PROC_H */
+#endif /* PROC_H */
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index 37eb40a2bf..a475d21274 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.44 1998/08/22 04:24:21 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.45 1998/09/01 04:38:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,9 +83,9 @@
static __inline__ int
tas(volatile slock_t *lock)
{
- register slock_t _res;
+ register slock_t _res;
- __asm__(" ldq $0, %0 \n\
+__asm__(" ldq $0, %0 \n\
bne $0, already_set \n\
ldq_l $0, %0 \n\
bne $0, already_set \n\
@@ -97,11 +97,12 @@ tas(volatile slock_t *lock)
jmp $31, end \n\
stqc_fail: or $31, 1, $0 \n\
already_set: bis $0, $0, %1 \n\
- end: nop " : "=m"(*lock), "=r"(_res) : : "0");
+ end: nop ": "=m"(*lock), "=r"(_res): :"0");
return (int) _res;
}
-#endif /* __alpha */
+
+#endif /* __alpha */
@@ -111,12 +112,13 @@ tas(volatile slock_t *lock)
static __inline__ int
tas(volatile slock_t *lock)
{
- register slock_t _res = 1;
+ register slock_t _res = 1;
- __asm__("lock; xchgb %0,%1" : "=q"(_res), "=m"(*lock) : "0"(_res) );
+__asm__("lock; xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(_res));
return (int) _res;
}
-#endif /* i386 */
+
+#endif /* i386 */
@@ -126,14 +128,15 @@ tas(volatile slock_t *lock)
static __inline__ int
tas(volatile slock_t *lock)
{
- register slock_t _res = 1;
+ register slock_t _res = 1;
- __asm__("ldstub [%2], %0" \
- : "=r" (_res), "=m" (*lock) \
- : "r" (lock));
+ __asm__("ldstub [%2], %0" \
+: "=r"(_res), "=m"(*lock) \
+: "r"(lock));
return (int) _res;
}
-#endif /* sparc */
+
+#endif /* sparc */
@@ -151,21 +154,22 @@ tas(volatile slock_t *lock)
{
register _res;
- __asm__(" movl $1, r0
- bbssi $0, (%1), 1f
- clrl r0
- 1: movl r0, %0 "
- : "=r"(_res) /* return value, in register */
- : "r"(lock) /* argument, 'lock pointer', in register */
- : "r0"); /* inline code uses this register */
+ __asm__(" movl $1, r0 \
+ bbssi $0, (%1), 1 f \
+ clrl r0 \
+1: movl r0, %0 "
+: "=r"(_res) /* return value, in register */
+: "r"(lock) /* argument, 'lock pointer', in register */
+: "r0"); /* inline code uses this register */
return (int) _res;
}
-#endif /* NEED_VAX_TAS_ASM */
+
+#endif /* NEED_VAX_TAS_ASM */
-#else /* __GNUC__ */
+#else /* __GNUC__ */
/***************************************************************************
* All non gcc
*/
@@ -181,7 +185,7 @@ tas(volatile slock_t *lock)
#define S_UNLOCK(lock) msem_unlock((lock), 0)
#define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED)
#define S_LOCK_FREE(lock) (!(lock)->msem_state)
-#endif /* __alpha */
+#endif /* __alpha */
@@ -191,21 +195,21 @@ tas(volatile slock_t *lock)
#if defined(USE_UNIVEL_CC)
#define TAS(lock) tas(lock)
-asm int
+asm int
tas(slock_t *s_lock)
{
-% mem s_lock
- pushl %ebx
- movl s_lock,%ebx
- movl $255,%eax
+ %mem s_lock
+ pushl % ebx
+ movl s_lock, %ebx
+ movl $255, %eax
lock
- xchgb %al,(%ebx)
- popl %ebx
+ xchgb % al, (%ebx)
+ popl % ebx
}
-#endif /* USE_UNIVEL_CC */
+#endif /* USE_UNIVEL_CC */
-#endif /* NEED_I386_TAS_ASM */
+#endif /* NEED_I386_TAS_ASM */
@@ -213,19 +217,19 @@ tas(slock_t *s_lock)
#define S_LOCK(lock) \
{ \
- slock_t res = 1; \
- while (res) { \
- __asm__("movqd 0, r0"); \
- __asm__("sbitd r0, %0" : "=m"(*lock)); \
- __asm__("sprb us, %0" : "=r" (res)); \
- res = ((res >> 5) & 1); \
- } \
+ slock_t res = 1; \
+ while (res) { \
+ __asm__("movqd 0, r0"); \
+ __asm__("sbitd r0, %0" : "=m"(*lock)); \
+ __asm__("sprb us, %0" : "=r" (res)); \
+ res = ((res >> 5) & 1); \
+ } \
}
-#endif /* NEED_NS32K_TAS_ASM */
+#endif /* NEED_NS32K_TAS_ASM */
-#endif /* defined(__GNUC__) */
+#endif /* defined(__GNUC__) */
@@ -248,7 +252,7 @@ static const slock_t clear_lock =
#define S_UNLOCK(lock) (*(lock) = clear_lock) /* struct assignment */
#define S_LOCK_FREE(lock) ( *(int *) (((long) (lock) + 15) & ~15) != 0)
-#endif /* __hpux */
+#endif /* __hpux */
#if defined(__sgi)
@@ -265,7 +269,7 @@ static const slock_t clear_lock =
#define S_UNLOCK(lock) release_lock(lock)
#define S_INIT_LOCK(lock) init_lock(lock)
#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED)
-#endif /* __sgi */
+#endif /* __sgi */
#if defined(_AIX)
@@ -276,7 +280,7 @@ static const slock_t clear_lock =
* (see storage/ipc.h).
*/
#define TAS(lock) cs((int *) (lock), 0, 1)
-#endif /* _AIX */
+#endif /* _AIX */
#if defined (nextstep)
@@ -290,7 +294,7 @@ static const slock_t clear_lock =
#define S_INIT_LOCK(lock) mutex_init(lock)
/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */
#define S_LOCK_FREE(alock) ((alock)->lock == 0)
-#endif /* nextstep */
+#endif /* nextstep */
@@ -301,29 +305,31 @@ static const slock_t clear_lock =
#if !defined(S_LOCK)
extern void s_lock(volatile slock_t *lock, const char *file, const int line);
+
#define S_LOCK(lock) \
- if (TAS((volatile slock_t *) lock)) {\
- s_lock((volatile slock_t *) lock, __FILE__, __LINE__); \
- } else
-#endif /* S_LOCK */
+ if (TAS((volatile slock_t *) lock)) {\
+ s_lock((volatile slock_t *) lock, __FILE__, __LINE__); \
+ } else
+#endif /* S_LOCK */
#if !defined(S_LOCK_FREE)
#define S_LOCK_FREE(lock) (*(lock) == 0)
-#endif /* S_LOCK_FREE */
+#endif /* S_LOCK_FREE */
#if !defined(S_UNLOCK)
#define S_UNLOCK(lock) (*(lock) = 0)
-#endif /* S_UNLOCK */
+#endif /* S_UNLOCK */
#if !defined(S_INIT_LOCK)
#define S_INIT_LOCK(lock) S_UNLOCK(lock)
-#endif /* S_INIT_LOCK */
+#endif /* S_INIT_LOCK */
#if !defined(TAS)
-int tas(volatile slock_t *lock); /* port/.../tas.s, or s_lock.c */
-#define TAS(lock) tas((volatile slock_t *) lock)
-#endif /* TAS */
+int tas(volatile slock_t *lock); /* port/.../tas.s, or
+ * s_lock.c */
-#endif /* HAS_TEST_AND_SET */
-#endif /* S_LOCK_H */
+#define TAS(lock) tas((volatile slock_t *) lock)
+#endif /* TAS */
+#endif /* HAS_TEST_AND_SET */
+#endif /* S_LOCK_H */
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index 809b87cdb1..c8524eea5e 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: shmem.h,v 1.13 1998/06/27 15:47:48 momjian Exp $
+ * $Id: shmem.h,v 1.14 1998/09/01 04:38:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -64,13 +64,11 @@ extern void ShmemCreate(unsigned int key, unsigned int size);
extern int InitShmem(unsigned int key, unsigned int size);
extern long *ShmemAlloc(unsigned long size);
extern int ShmemIsValid(unsigned long addr);
-extern HTAB *
-ShmemInitHash(char *name, long init_size, long max_size,
+extern HTAB *ShmemInitHash(char *name, long init_size, long max_size,
HASHCTL *infoP, int hash_flags);
extern bool ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr);
extern SHMEM_OFFSET ShmemPIDDestroy(int pid);
-extern long *
-ShmemInitStruct(char *name, unsigned long size,
+extern long *ShmemInitStruct(char *name, unsigned long size,
bool *foundPtr);
extern bool TransactionIdIsInProgress(TransactionId xid);
@@ -79,7 +77,7 @@ typedef int TableID;
/* size constants for the shmem index table */
/* max size of data structure string name */
-#define SHMEM_INDEX_KEYSIZE (50)
+#define SHMEM_INDEX_KEYSIZE (50)
/* data in shmem index table hash bucket */
#define SHMEM_INDEX_DATASIZE (sizeof(ShmemIndexEnt) - SHMEM_INDEX_KEYSIZE)
/* maximum size of the shmem index table */
@@ -88,10 +86,10 @@ typedef int TableID;
/* this is a hash bucket in the shmem index table */
typedef struct
{
- char key[SHMEM_INDEX_KEYSIZE]; /* string name */
+ char key[SHMEM_INDEX_KEYSIZE]; /* string name */
unsigned long location; /* location in shared mem */
unsigned long size; /* numbytes allocated for the structure */
-} ShmemIndexEnt;
+} ShmemIndexEnt;
/*
* prototypes for functions in shmqueue.c
@@ -100,9 +98,8 @@ extern void SHMQueueInit(SHM_QUEUE *queue);
extern void SHMQueueElemInit(SHM_QUEUE *queue);
extern void SHMQueueDelete(SHM_QUEUE *queue);
extern void SHMQueueInsertTL(SHM_QUEUE *queue, SHM_QUEUE *elem);
-extern void
-SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr,
+extern void SHMQueueFirst(SHM_QUEUE *queue, Pointer *nextPtrPtr,
SHM_QUEUE *nextQueue);
extern bool SHMQueueEmpty(SHM_QUEUE *queue);
-#endif /* SHMEM_H */
+#endif /* SHMEM_H */
diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h
index 2b9939516f..bb825da999 100644
--- a/src/include/storage/sinval.h
+++ b/src/include/storage/sinval.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sinval.h,v 1.8 1998/02/26 04:43:34 momjian Exp $
+ * $Id: sinval.h,v 1.9 1998/09/01 04:38:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,11 +21,10 @@ extern SPINLOCK SInvalLock;
extern void CreateSharedInvalidationState(IPCKey key);
extern void AttachSharedInvalidationState(IPCKey key);
extern void InitSharedInvalidationState(void);
-extern void
-RegisterSharedInvalid(int cacheId, Index hashIndex,
+extern void RegisterSharedInvalid(int cacheId, Index hashIndex,
ItemPointer pointer);
extern void InvalidateSharedInvalid(void (*invalFunction) (),
void (*resetFunction) ());
-#endif /* SINVAL_H */
+#endif /* SINVAL_H */
diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h
index 93e861ebee..ff3e1ef05a 100644
--- a/src/include/storage/sinvaladt.h
+++ b/src/include/storage/sinvaladt.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sinvaladt.h,v 1.9 1998/08/25 21:31:20 scrappy Exp $
+ * $Id: sinvaladt.h,v 1.10 1998/09/01 04:38:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -125,9 +125,8 @@ extern int SISegmentInit(bool killExistingSegment, IPCKey key);
extern bool SISetDataEntry(SISeg *segP, SharedInvalidData *data);
extern void SISetProcStateInvalid(SISeg *segP);
extern bool SIDelDataEntry(SISeg *segP);
-extern void
-SIReadEntryData(SISeg *segP, int backendId,
+extern void SIReadEntryData(SISeg *segP, int backendId,
void (*invalFunction) (), void (*resetFunction) ());
extern void SIDelExpiredDataEntries(SISeg *segP);
-#endif /* SINVALADT_H */
+#endif /* SINVALADT_H */
diff --git a/src/include/storage/smgr.h b/src/include/storage/smgr.h
index 0f7087d646..a2852ad846 100644
--- a/src/include/storage/smgr.h
+++ b/src/include/storage/smgr.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: smgr.h,v 1.11 1998/02/26 04:43:36 momjian Exp $
+ * $Id: smgr.h,v 1.12 1998/09/01 04:38:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,17 +28,13 @@ extern int smgrunlink(int16 which, Relation reln);
extern int smgrextend(int16 which, Relation reln, char *buffer);
extern int smgropen(int16 which, Relation reln);
extern int smgrclose(int16 which, Relation reln);
-extern int
-smgrread(int16 which, Relation reln, BlockNumber blocknum,
+extern int smgrread(int16 which, Relation reln, BlockNumber blocknum,
char *buffer);
-extern int
-smgrwrite(int16 which, Relation reln, BlockNumber blocknum,
+extern int smgrwrite(int16 which, Relation reln, BlockNumber blocknum,
char *buffer);
-extern int
-smgrflush(int16 which, Relation reln, BlockNumber blocknum,
+extern int smgrflush(int16 which, Relation reln, BlockNumber blocknum,
char *buffer);
-extern int
-smgrblindwrt(int16 which, char *dbname, char *relname, Oid dbid,
+extern int smgrblindwrt(int16 which, char *dbname, char *relname, Oid dbid,
Oid relid, BlockNumber blkno, char *buffer);
extern int smgrnblocks(int16 which, Relation reln);
extern int smgrtruncate(int16 which, Relation reln, int nblocks);
@@ -59,8 +55,7 @@ extern int mdclose(Relation reln);
extern int mdread(Relation reln, BlockNumber blocknum, char *buffer);
extern int mdwrite(Relation reln, BlockNumber blocknum, char *buffer);
extern int mdflush(Relation reln, BlockNumber blocknum, char *buffer);
-extern int
-mdblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid,
+extern int mdblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid,
BlockNumber blkno, char *buffer);
extern int mdnblocks(Relation reln);
extern int mdtruncate(Relation reln, int nblocks);
@@ -80,8 +75,7 @@ extern int mmclose(Relation reln);
extern int mmread(Relation reln, BlockNumber blocknum, char *buffer);
extern int mmwrite(Relation reln, BlockNumber blocknum, char *buffer);
extern int mmflush(Relation reln, BlockNumber blocknum, char *buffer);
-extern int
-mmblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid,
+extern int mmblindwrt(char *dbstr, char *relstr, Oid dbid, Oid relid,
BlockNumber blkno, char *buffer);
extern int mmnblocks(Relation reln);
extern int mmcommit(void);
@@ -94,4 +88,4 @@ extern int2 smgrin(char *s);
extern bool smgreq(int2 a, int2 b);
extern bool smgrne(int2 a, int2 b);
-#endif /* SMGR_H */
+#endif /* SMGR_H */
diff --git a/src/include/storage/spin.h b/src/include/storage/spin.h
index c94a74255f..f8d81709c3 100644
--- a/src/include/storage/spin.h
+++ b/src/include/storage/spin.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: spin.h,v 1.6 1997/09/18 14:21:02 momjian Exp $
+ * $Id: spin.h,v 1.7 1998/09/01 04:38:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,4 +32,4 @@ extern bool InitSpinLocks(int init, IPCKey key);
extern void SpinAcquire(SPINLOCK lockid);
extern void SpinRelease(SPINLOCK lockid);
-#endif /* SPIN_H */
+#endif /* SPIN_H */
diff --git a/src/include/tcop/dest.h b/src/include/tcop/dest.h
index 5974f765ca..9a0322e726 100644
--- a/src/include/tcop/dest.h
+++ b/src/include/tcop/dest.h
@@ -26,7 +26,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dest.h,v 1.15 1998/09/01 03:28:23 momjian Exp $
+ * $Id: dest.h,v 1.16 1998/09/01 04:38:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -67,10 +67,9 @@ extern void SendCopyBegin(void);
extern void ReceiveCopyBegin(void);
extern void NullCommand(CommandDest dest);
extern void ReadyForQuery(CommandDest dest);
-extern void
-BeginCommand(char *pname, int operation, TupleDesc attinfo,
+extern void BeginCommand(char *pname, int operation, TupleDesc attinfo,
bool isIntoRel, bool isIntoPortal, char *tag,
CommandDest dest);
extern void UpdateCommandInfo(int operation, Oid lastoid, uint32 tuples);
-#endif /* DEST_H */
+#endif /* DEST_H */
diff --git a/src/include/tcop/fastpath.h b/src/include/tcop/fastpath.h
index 68b6e724a3..c94a11570d 100644
--- a/src/include/tcop/fastpath.h
+++ b/src/include/tcop/fastpath.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fastpath.h,v 1.3 1997/09/08 02:39:18 momjian Exp $
+ * $Id: fastpath.h,v 1.4 1998/09/01 04:38:41 momjian Exp $
*
* NOTES
* This information pulled out of tcop/fastpath.c and put
@@ -28,4 +28,4 @@
extern int HandleFunctionRequest(void);
-#endif /* FASTPATH_H */
+#endif /* FASTPATH_H */
diff --git a/src/include/tcop/pquery.h b/src/include/tcop/pquery.h
index 303487b988..4ac96b7495 100644
--- a/src/include/tcop/pquery.h
+++ b/src/include/tcop/pquery.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pquery.h,v 1.10 1998/06/04 17:26:49 momjian Exp $
+ * $Id: pquery.h,v 1.11 1998/09/01 04:38:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,12 +23,11 @@ extern QueryDesc *CreateQueryDesc(Query *parsetree, Plan *plantree,
extern EState *CreateExecutorState(void);
-extern void
-ProcessPortal(char *portalName, Query *parseTree,
+extern void ProcessPortal(char *portalName, Query *parseTree,
Plan *plan, EState *state, TupleDesc attinfo,
CommandDest dest);
extern void
-ProcessQuery(Query *parsetree, Plan *plan, CommandDest dest);
+ ProcessQuery(Query *parsetree, Plan *plan, CommandDest dest);
-#endif /* pqueryIncluded */
+#endif /* pqueryIncluded */
diff --git a/src/include/tcop/tcopdebug.h b/src/include/tcop/tcopdebug.h
index a4512f6686..c1c631b0d6 100644
--- a/src/include/tcop/tcopdebug.h
+++ b/src/include/tcop/tcopdebug.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tcopdebug.h,v 1.2 1997/09/07 05:01:53 momjian Exp $
+ * $Id: tcopdebug.h,v 1.3 1998/09/01 04:38:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -40,4 +40,4 @@
* ----------------------------------------------------------------
*/
-#endif /* TCOPDEBUG_H */
+#endif /* TCOPDEBUG_H */
diff --git a/src/include/tcop/tcopprot.h b/src/include/tcop/tcopprot.h
index feed580e69..b4356030be 100644
--- a/src/include/tcop/tcopprot.h
+++ b/src/include/tcop/tcopprot.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tcopprot.h,v 1.15 1998/08/24 01:38:11 momjian Exp $
+ * $Id: tcopprot.h,v 1.16 1998/09/01 04:38:45 momjian Exp $
*
* OLD COMMENTS
* This file was created so that other c files could get the two
@@ -22,16 +22,15 @@
#include <parser/parse_node.h>
#ifndef BOOTSTRAP_INCLUDE
-extern List *
-pg_parse_and_plan(char *query_string, Oid *typev, int nargs,
+extern List *pg_parse_and_plan(char *query_string, Oid *typev, int nargs,
QueryTreeList **queryListP, CommandDest dest,
bool aclOverride);
extern void pg_exec_query(char *query_string);
extern void pg_exec_query_acl_override(char *query_string);
extern void
-pg_exec_query_dest(char *query_string, CommandDest dest, bool aclOverride);
+ pg_exec_query_dest(char *query_string, CommandDest dest, bool aclOverride);
-#endif /* BOOTSTRAP_HEADER */
+#endif /* BOOTSTRAP_HEADER */
extern void handle_warn(SIGNAL_ARGS);
extern void quickdie(SIGNAL_ARGS);
@@ -39,8 +38,8 @@ extern void die(SIGNAL_ARGS);
extern void FloatExceptionHandler(SIGNAL_ARGS);
extern void CancelQuery(void);
extern int PostgresMain(int argc, char *argv[],
- int real_argc, char *real_argv[]);
+ int real_argc, char *real_argv[]);
extern void ResetUsage(void);
extern void ShowUsage(void);
-#endif /* tcopprotIncluded */
+#endif /* tcopprotIncluded */
diff --git a/src/include/tcop/utility.h b/src/include/tcop/utility.h
index 99b43229ff..bd5556c46b 100644
--- a/src/include/tcop/utility.h
+++ b/src/include/tcop/utility.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: utility.h,v 1.5 1997/09/08 21:54:45 momjian Exp $
+ * $Id: utility.h,v 1.6 1998/09/01 04:38:47 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,4 +17,4 @@
extern void ProcessUtility(Node *parsetree, CommandDest dest);
-#endif /* UTILITY_H */
+#endif /* UTILITY_H */
diff --git a/src/include/utils/acl.h b/src/include/utils/acl.h
index 6ebd5baf71..93c896320a 100644
--- a/src/include/utils/acl.h
+++ b/src/include/utils/acl.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: acl.h,v 1.17 1998/02/26 04:43:43 momjian Exp $
+ * $Id: acl.h,v 1.18 1998/09/01 04:38:48 momjian Exp $
*
* NOTES
* For backward-compatability purposes we have to allow there
@@ -141,8 +141,7 @@ extern Acl *aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg);
extern char *aclmakepriv(char *old_privlist, char new_priv);
extern char *aclmakeuser(char *user_type, char *user);
-extern ChangeACLStmt *
-makeAclStmt(char *privs, List *rel_list, char *grantee,
+extern ChangeACLStmt *makeAclStmt(char *privs, List *rel_list, char *grantee,
char grant_or_revoke);
/*
@@ -164,11 +163,9 @@ extern char *get_groname(AclId grosysid);
extern int32 pg_aclcheck(char *relname, char *usename, AclMode mode);
extern int32 pg_ownercheck(char *usename, char *value, int cacheid);
-extern int32
-pg_func_ownercheck(char *usename, char *funcname,
+extern int32 pg_func_ownercheck(char *usename, char *funcname,
int nargs, Oid *arglist);
-extern int32
-pg_aggr_ownercheck(char *usename, char *aggname,
+extern int32 pg_aggr_ownercheck(char *usename, char *aggname,
Oid basetypeID);
-#endif /* ACL_H */
+#endif /* ACL_H */
diff --git a/src/include/utils/array.h b/src/include/utils/array.h
index fb7beef36a..6052a8cfcc 100644
--- a/src/include/utils/array.h
+++ b/src/include/utils/array.h
@@ -10,7 +10,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: array.h,v 1.13 1998/09/01 03:28:26 momjian Exp $
+ * $Id: array.h,v 1.14 1998/09/01 04:38:50 momjian Exp $
*
* NOTES
* XXX the data array should be LONGALIGN'd -- notice that the array
@@ -117,22 +117,17 @@ typedef struct
extern char *array_in(char *string, Oid element_type, int32 typmod);
extern char *array_out(ArrayType *v, Oid element_type);
extern char *array_dims(ArrayType *v, bool *isNull);
-extern Datum
-array_ref(ArrayType *array, int n, int *indx, int reftype,
+extern Datum array_ref(ArrayType *array, int n, int *indx, int reftype,
int elmlen, int arraylen, bool *isNull);
-extern Datum
-array_clip(ArrayType *array, int n, int *upperIndx,
+extern Datum array_clip(ArrayType *array, int n, int *upperIndx,
int *lowerIndx, int reftype, int len, bool *isNull);
-extern char *
-array_set(ArrayType *array, int n, int *indx, char *dataPtr,
+extern char *array_set(ArrayType *array, int n, int *indx, char *dataPtr,
int reftype, int elmlen, int arraylen, bool *isNull);
-extern char *
-array_assgn(ArrayType *array, int n, int *upperIndx,
+extern char *array_assgn(ArrayType *array, int n, int *upperIndx,
int *lowerIndx, ArrayType *newArr, int reftype,
int len, bool *isNull);
extern int array_eq(ArrayType *array1, ArrayType *array2);
-extern int
-_LOtransfer(char **destfd, int size, int nitems, char **srcfd,
+extern int _LOtransfer(char **destfd, int size, int nitems, char **srcfd,
int isSrcLO, int isDestLO);
extern char *_array_newLO(int *fd, int flag);
@@ -156,15 +151,12 @@ extern int next_tuple(int n, int *curr, int *span);
/*
* prototypes for functions defined in chunk.c
*/
-extern char *
-_ChunkArray(int fd, FILE *afd, int ndim, int *dim, int baseSize,
+extern char *_ChunkArray(int fd, FILE *afd, int ndim, int *dim, int baseSize,
int *nbytes, char *chunkfile);
-extern int
-_ReadChunkArray(int *st, int *endp, int bsize, int fp,
+extern int _ReadChunkArray(int *st, int *endp, int bsize, int fp,
char *destfp, ArrayType *array, int isDestLO, bool *isNull);
-extern struct varlena *
-_ReadChunkArray1El(int *st, int bsize, int fp,
+extern struct varlena *_ReadChunkArray1El(int *st, int bsize, int fp,
ArrayType *array, bool *isNull);
-#endif /* ARRAY_H */
+#endif /* ARRAY_H */
diff --git a/src/include/utils/bit.h b/src/include/utils/bit.h
index e8235b5a3a..ef060dbb11 100644
--- a/src/include/utils/bit.h
+++ b/src/include/utils/bit.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: bit.h,v 1.3 1997/09/08 02:39:29 momjian Exp $
+ * $Id: bit.h,v 1.4 1998/09/01 04:38:51 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,4 +36,4 @@ extern void BitArrayClearBit(BitArray bitArray, BitIndex bitIndex);
*/
extern bool BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex);
-#endif /* BIT_H */
+#endif /* BIT_H */
diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h
index 931e17f2bd..f10914a6b7 100644
--- a/src/include/utils/builtins.h
+++ b/src/include/utils/builtins.h
@@ -6,15 +6,15 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: builtins.h,v 1.50 1998/09/01 03:28:28 momjian Exp $
+ * $Id: builtins.h,v 1.51 1998/09/01 04:38:52 momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
* Under no circumstances should it ever be included before
* including fmgr.h!
* fmgr.h does not seem to include this file, so don't know where this
- * comment came from. Backend code must include this stuff explicitly
- * as far as I can tell...
+ * comment came from. Backend code must include this stuff explicitly
+ * as far as I can tell...
* - thomas 1998-06-08
*
*-------------------------------------------------------------------------
@@ -149,7 +149,7 @@ extern int namestrcmp(Name name, char *str);
/* XXX hack. HP-UX has a ltoa (with different arguments) already. */
#ifdef __hpux
#define ltoa pg_ltoa
-#endif /* hpux */
+#endif /* hpux */
extern int32 pg_atoi(char *s, int size, int c);
extern void itoa(int i, char *a);
extern void ltoa(int32 l, char *a);
@@ -438,8 +438,8 @@ extern char *textout(text *vlena);
extern text *textcat(text *arg1, text *arg2);
extern bool texteq(text *arg1, text *arg2);
extern bool textne(text *arg1, text *arg2);
-extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2);
-extern int text_cmp(text *arg1, text *arg2);
+extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2);
+extern int text_cmp(text *arg1, text *arg2);
extern bool text_lt(text *arg1, text *arg2);
extern bool text_le(text *arg1, text *arg2);
extern bool text_gt(text *arg1, text *arg2);
@@ -511,4 +511,4 @@ extern text *translate(text *string, char from, char to);
/* acl.c */
-#endif /* BUILTINS_H */
+#endif /* BUILTINS_H */
diff --git a/src/include/utils/cash.h b/src/include/utils/cash.h
index d9d0d0e56a..b5e45fc8da 100644
--- a/src/include/utils/cash.h
+++ b/src/include/utils/cash.h
@@ -46,4 +46,4 @@ extern Cash *cashsmaller(Cash *c1, Cash *c2);
extern const char *cash_words_out(Cash *value);
-#endif /* CASH_H */
+#endif /* CASH_H */
diff --git a/src/include/utils/catcache.h b/src/include/utils/catcache.h
index e955c29f3d..159f6387b0 100644
--- a/src/include/utils/catcache.h
+++ b/src/include/utils/catcache.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: catcache.h,v 1.12 1998/09/01 03:28:29 momjian Exp $
+ * $Id: catcache.h,v 1.13 1998/09/01 04:38:55 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,19 +63,15 @@ typedef struct catcache
extern struct catcache *Caches;
extern GlobalMemory CacheCxt;
-extern void
-CatalogCacheIdInvalidate(int cacheId, Index hashIndex,
+extern void CatalogCacheIdInvalidate(int cacheId, Index hashIndex,
ItemPointer pointer);
extern void ResetSystemCache(void);
extern void SystemCacheRelationFlushed(Oid relId);
-extern CatCache *
-InitSysCache(char *relname, char *indname, int id, int nkeys,
+extern CatCache *InitSysCache(char *relname, char *indname, int id, int nkeys,
int *key, HeapTuple (*iScanfuncP) ());
-extern HeapTuple
-SearchSysCache(struct catcache * cache, Datum v1, Datum v2,
+extern HeapTuple SearchSysCache(struct catcache * cache, Datum v1, Datum v2,
Datum v3, Datum v4);
-extern void
-RelationInvalidateCatalogCacheTuple(Relation relation,
+extern void RelationInvalidateCatalogCacheTuple(Relation relation,
HeapTuple tuple, void (*function) ());
-#endif /* CATCACHE_H */
+#endif /* CATCACHE_H */
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 4c0cefce8f..7248af64d5 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: datetime.h,v 1.5 1997/09/08 02:39:35 momjian Exp $
+ * $Id: datetime.h,v 1.6 1998/09/01 04:38:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,4 +19,4 @@ typedef int32 DateADT;
typedef float8 TimeADT;
-#endif /* DATETIME_H */
+#endif /* DATETIME_H */
diff --git a/src/include/utils/datum.h b/src/include/utils/datum.h
index ab394e7fcd..bd5c6eac8d 100644
--- a/src/include/utils/datum.h
+++ b/src/include/utils/datum.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: datum.h,v 1.7 1998/02/26 04:43:57 momjian Exp $
+ * $Id: datum.h,v 1.8 1998/09/01 04:38:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -57,8 +57,7 @@ extern void datumFree(Datum value, Oid type, bool byVal, Size len);
* return true if thwo datums are equal, false otherwise.
* XXX : See comments in the code for restrictions!
*/
-extern bool
-datumIsEqual(Datum value1, Datum value2, Oid type,
+extern bool datumIsEqual(Datum value1, Datum value2, Oid type,
bool byVal, Size len);
-#endif /* DATUM_H */
+#endif /* DATUM_H */
diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h
index 0e947d6393..10c229beb6 100644
--- a/src/include/utils/dt.h
+++ b/src/include/utils/dt.h
@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dt.h,v 1.31 1998/09/01 03:28:30 momjian Exp $
+ * $Id: dt.h,v 1.32 1998/09/01 04:38:59 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -194,7 +194,7 @@ typedef struct
char *token;
#else
char token[TOKMAXLEN];
-#endif /* _AIX */
+#endif /* _AIX */
char type;
char value; /* this may be unsigned, alas */
} datetkn;
@@ -323,19 +323,15 @@ extern int date2j(int year, int month, int day);
extern double time2t(const int hour, const int min, const double sec);
-extern int
-ParseDateTime(char *timestr, char *lowstr,
+extern int ParseDateTime(char *timestr, char *lowstr,
char **field, int *ftype, int maxfields, int *numfields);
-extern int
-DecodeDateTime(char **field, int *ftype,
+extern int DecodeDateTime(char **field, int *ftype,
int nf, int *dtype, struct tm * tm, double *fsec, int *tzp);
-extern int
-DecodeTimeOnly(char **field, int *ftype, int nf,
+extern int DecodeTimeOnly(char **field, int *ftype, int nf,
int *dtype, struct tm * tm, double *fsec);
-extern int
-DecodeDateDelta(char **field, int *ftype,
+extern int DecodeDateDelta(char **field, int *ftype,
int nf, int *dtype, struct tm * tm, double *fsec);
extern int EncodeDateOnly(struct tm * tm, int style, char *str);
@@ -343,4 +339,4 @@ extern int EncodeTimeOnly(struct tm * tm, double fsec, int style, char *str);
extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str);
extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str);
-#endif /* DT_H */
+#endif /* DT_H */
diff --git a/src/include/utils/dynahash.h b/src/include/utils/dynahash.h
index 6febd293ce..5b59110ccf 100644
--- a/src/include/utils/dynahash.h
+++ b/src/include/utils/dynahash.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dynahash.h,v 1.4 1997/09/08 02:39:38 momjian Exp $
+ * $Id: dynahash.h,v 1.5 1998/09/01 04:39:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,4 +15,4 @@
extern int my_log2(long num);
-#endif /* DYNAHASH_H */
+#endif /* DYNAHASH_H */
diff --git a/src/include/utils/dynamic_loader.h b/src/include/utils/dynamic_loader.h
index 13ed4174f3..8ee1639c43 100644
--- a/src/include/utils/dynamic_loader.h
+++ b/src/include/utils/dynamic_loader.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dynamic_loader.h,v 1.8 1997/09/08 21:54:56 momjian Exp $
+ * $Id: dynamic_loader.h,v 1.9 1998/09/01 04:39:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -21,7 +21,7 @@
#ifdef MIN
#undef MIN
#undef MAX
-#endif /* MIN */
+#endif /* MIN */
/*
* List of dynamically loaded files.
@@ -41,4 +41,4 @@ extern func_ptr pg_dlsym(void *handle, char *funcname);
extern void pg_dlclose(void *handle);
extern char *pg_dlerror(void);
-#endif /* DYNAMIC_LOADER_H */
+#endif /* DYNAMIC_LOADER_H */
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 1b1cb01684..7d74644c62 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: elog.h,v 1.7 1998/01/07 21:06:50 momjian Exp $
+ * $Id: elog.h,v 1.8 1998/09/01 04:39:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -42,4 +42,4 @@ int DebugFileOpen(void);
#endif
-#endif /* ELOG_H */
+#endif /* ELOG_H */
diff --git a/src/include/utils/exc.h b/src/include/utils/exc.h
index 809361c639..365c81278e 100644
--- a/src/include/utils/exc.h
+++ b/src/include/utils/exc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: exc.h,v 1.13 1998/06/15 18:40:05 momjian Exp $
+ * $Id: exc.h,v 1.14 1998/09/01 04:39:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -83,8 +83,7 @@ typedef void ExcProc (Exception *, ExcDetail, ExcData, ExcMessage);
* prototypes for functions in exc.c
*/
extern void EnableExceptionHandling(bool on);
-extern void
-ExcRaise(Exception *excP,
+extern void ExcRaise(Exception *excP,
ExcDetail detail,
ExcData data,
ExcMessage message);
@@ -93,8 +92,7 @@ ExcRaise(Exception *excP,
/*
* prototypes for functions in excabort.c
*/
-extern void
-ExcAbort(const Exception *excP, ExcDetail detail, ExcData data,
+extern void ExcAbort(const Exception *excP, ExcDetail detail, ExcData data,
ExcMessage message);
-#endif /* EXC_H */
+#endif /* EXC_H */
diff --git a/src/include/utils/excid.h b/src/include/utils/excid.h
index 6963654074..98549c0345 100644
--- a/src/include/utils/excid.h
+++ b/src/include/utils/excid.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: excid.h,v 1.4 1997/09/07 05:02:29 momjian Exp $
+ * $Id: excid.h,v 1.5 1998/09/01 04:39:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,4 +26,4 @@ extern Exception InternalError; /* XXX inconsistent naming style */
extern Exception SemanticError; /* XXX inconsistent naming style */
extern Exception SystemError; /* XXX inconsistent naming style */
-#endif /* EXCID_H */
+#endif /* EXCID_H */
diff --git a/src/include/utils/fcache.h b/src/include/utils/fcache.h
index 504ac8e2ad..cc6abbe41f 100644
--- a/src/include/utils/fcache.h
+++ b/src/include/utils/fcache.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fcache.h,v 1.6 1998/01/15 19:46:36 pgsql Exp $
+ * $Id: fcache.h,v 1.7 1998/09/01 04:39:07 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -54,4 +54,4 @@ typedef struct
} FunctionCache,
*FunctionCachePtr;
-#endif /* FCACHE_H */
+#endif /* FCACHE_H */
diff --git a/src/include/utils/fcache2.h b/src/include/utils/fcache2.h
index f980dd9df8..c7781b689a 100644
--- a/src/include/utils/fcache2.h
+++ b/src/include/utils/fcache2.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fcache2.h,v 1.6 1998/01/24 22:50:42 momjian Exp $
+ * $Id: fcache2.h,v 1.7 1998/09/01 04:39:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,4 +17,4 @@
extern void setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext);
-#endif /* FCACHE2_H */
+#endif /* FCACHE2_H */
diff --git a/src/include/utils/fmgrtab.h b/src/include/utils/fmgrtab.h
index 953f181137..3037641545 100644
--- a/src/include/utils/fmgrtab.h
+++ b/src/include/utils/fmgrtab.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: fmgrtab.h,v 1.7 1997/09/08 21:55:04 momjian Exp $
+ * $Id: fmgrtab.h,v 1.8 1998/09/01 04:39:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -26,4 +26,4 @@ extern FmgrCall *fmgr_isbuiltin(Oid id);
extern func_ptr fmgr_lookupByName(char *name);
extern void load_file(char *filename);
-#endif /* FMGRTAB_H */
+#endif /* FMGRTAB_H */
diff --git a/src/include/utils/geo_decls.h b/src/include/utils/geo_decls.h
index 7cd7e88096..44b0d719c7 100644
--- a/src/include/utils/geo_decls.h
+++ b/src/include/utils/geo_decls.h
@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: geo_decls.h,v 1.20 1998/05/09 22:44:38 thomas Exp $
+ * $Id: geo_decls.h,v 1.21 1998/09/01 04:39:11 momjian Exp $
*
* NOTE
* These routines do *not* use the float types from adt/.
@@ -360,11 +360,9 @@ extern double *circle_area(CIRCLE *circle);
extern double circle_dt(CIRCLE *circle1, CIRCLE *circle2);
/* geo_selfuncs.c */
-extern float64
-areasel(Oid opid, Oid relid, AttrNumber attno,
+extern float64 areasel(Oid opid, Oid relid, AttrNumber attno,
char *value, int32 flag);
-extern float64
-areajoinsel(Oid opid, Oid relid, AttrNumber attno,
+extern float64 areajoinsel(Oid opid, Oid relid, AttrNumber attno,
char *value, int32 flag);
-#endif /* GEO_DECLS_H */
+#endif /* GEO_DECLS_H */
diff --git a/src/include/utils/hsearch.h b/src/include/utils/hsearch.h
index 977a843a13..f0a8009776 100644
--- a/src/include/utils/hsearch.h
+++ b/src/include/utils/hsearch.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: hsearch.h,v 1.8 1998/02/26 04:44:01 momjian Exp $
+ * $Id: hsearch.h,v 1.9 1998/09/01 04:39:12 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -133,8 +133,7 @@ typedef enum
extern HTAB *hash_create(int nelem, HASHCTL *info, int flags);
extern void hash_destroy(HTAB *hashp);
extern void hash_stats(char *where, HTAB *hashp);
-extern long *
-hash_search(HTAB *hashp, char *keyPtr, HASHACTION action,
+extern long *hash_search(HTAB *hashp, char *keyPtr, HASHACTION action,
bool *foundPtr);
extern long *hash_seq(HTAB *hashp);
@@ -144,4 +143,4 @@ extern long *hash_seq(HTAB *hashp);
extern long string_hash(char *key, int keysize);
extern long tag_hash(int *key, int keysize);
-#endif /* HSEARCH_H */
+#endif /* HSEARCH_H */
diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h
index dff02b7120..65e8300ee4 100644
--- a/src/include/utils/int8.h
+++ b/src/include/utils/int8.h
@@ -6,16 +6,16 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: int8.h,v 1.2 1998/08/23 22:25:54 momjian Exp $
+ * $Id: int8.h,v 1.3 1998/09/01 04:39:13 momjian Exp $
*
* NOTES
* These data types are supported on all 64-bit architectures, and may
- * be supported through libraries on some 32-bit machines. If your machine
- * is not currently supported, then please try to make it so, then post
- * patches to the postgresql.org hackers mailing list.
+ * be supported through libraries on some 32-bit machines. If your machine
+ * is not currently supported, then please try to make it so, then post
+ * patches to the postgresql.org hackers mailing list.
*
* This code was written for and originally appeared in the contrib
- * directory as a user-defined type.
+ * directory as a user-defined type.
* - thomas 1998-06-08
*
*-------------------------------------------------------------------------
@@ -26,15 +26,18 @@
#ifdef HAVE_LONG_INT_64
/* Plain "long int" fits, use it */
typedef long int int64;
+
#define INT64_FORMAT "%ld"
#else
#ifdef HAVE_LONG_LONG_INT_64
/* We have working support for "long long int", use that */
typedef long long int int64;
+
#define INT64_FORMAT "%Ld"
#else
/* Won't actually work, but fall back to long int so that int8.c compiles */
typedef long int int64;
+
#define INT64_FORMAT "%ld"
#define INT64_IS_BUSTED
#endif
@@ -88,9 +91,10 @@ extern int32 int84(int64 * val);
#if FALSE
extern int64 *int28 (int16 val);
extern int16 int82(int64 * val);
+
#endif
extern float64 i8tod(int64 * val);
extern int64 *dtoi8(float64 val);
-#endif /* INT8_H */
+#endif /* INT8_H */
diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h
index a487e88a74..bb2591552b 100644
--- a/src/include/utils/inval.h
+++ b/src/include/utils/inval.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: inval.h,v 1.8 1998/02/23 17:44:24 scrappy Exp $
+ * $Id: inval.h,v 1.9 1998/09/01 04:39:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,4 +46,4 @@ typedef InvalidationEntry LocalInvalid;
#define EmptyLocalInvalid NULL
-#endif /* INVAL_H */
+#endif /* INVAL_H */
diff --git a/src/include/utils/lselect.h b/src/include/utils/lselect.h
index 40e8d2ba51..08fb6f3c4f 100644
--- a/src/include/utils/lselect.h
+++ b/src/include/utils/lselect.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lselect.h,v 1.10 1998/02/26 04:44:06 momjian Exp $
+ * $Id: lselect.h,v 1.11 1998/09/01 04:39:16 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,14 +39,11 @@ typedef struct
} LeftistContextData;
typedef LeftistContextData *LeftistContext;
-extern struct leftist *
-lmerge(struct leftist * pt, struct leftist * qt,
+extern struct leftist *lmerge(struct leftist * pt, struct leftist * qt,
LeftistContext context);
-extern HeapTuple
-gettuple(struct leftist ** treep, short *devnum,
+extern HeapTuple gettuple(struct leftist ** treep, short *devnum,
LeftistContext context);
-extern void
-puttuple(struct leftist ** treep, HeapTuple newtuple, short devnum,
+extern void puttuple(struct leftist ** treep, HeapTuple newtuple, short devnum,
LeftistContext context);
extern int tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context);
@@ -54,6 +51,6 @@ extern int tuplecmp(HeapTuple ltup, HeapTuple rtup, LeftistContext context);
extern void checktree(struct leftist * tree, LeftistContext context);
extern int checktreer(struct leftist * tree, int level, LeftistContext context);
-#endif /* EBUG */
+#endif /* EBUG */
-#endif /* LSELECT_H */
+#endif /* LSELECT_H */
diff --git a/src/include/utils/lsyscache.h b/src/include/utils/lsyscache.h
index 0d8816da4e..0fd7ad7c79 100644
--- a/src/include/utils/lsyscache.h
+++ b/src/include/utils/lsyscache.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: lsyscache.h,v 1.14 1998/08/11 14:32:03 momjian Exp $
+ * $Id: lsyscache.h,v 1.15 1998/09/01 04:39:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -24,8 +24,7 @@ extern bool get_attisset(Oid relid, char *attname);
extern int32 get_atttypmod(Oid relid, AttrNumber attnum);
extern RegProcedure get_opcode(Oid opid);
extern char *get_opname(Oid opid);
-extern bool
-op_mergejoinable(Oid opid, Oid ltype, Oid rtype,
+extern bool op_mergejoinable(Oid opid, Oid ltype, Oid rtype,
Oid *leftOp, Oid *rightOp);
extern Oid op_hashjoinable(Oid opid, Oid ltype, Oid rtype);
extern Oid get_commutator(Oid opid);
@@ -42,4 +41,4 @@ extern int16 get_typlen(Oid typid);
extern bool get_typbyval(Oid typid);
extern struct varlena *get_typdefault(Oid typid);
-#endif /* LSYSCACHE_H */
+#endif /* LSYSCACHE_H */
diff --git a/src/include/utils/mcxt.h b/src/include/utils/mcxt.h
index 44427d65b6..d4cc427422 100644
--- a/src/include/utils/mcxt.h
+++ b/src/include/utils/mcxt.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: mcxt.h,v 1.10 1998/02/26 04:44:07 momjian Exp $
+ * $Id: mcxt.h,v 1.11 1998/09/01 04:39:19 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -39,8 +39,7 @@ extern MemoryContext TopMemoryContext;
*/
extern void EnableMemoryContext(bool on);
extern Pointer MemoryContextAlloc(MemoryContext context, Size size);
-extern Pointer
-MemoryContextRealloc(MemoryContext context,
+extern Pointer MemoryContextRealloc(MemoryContext context,
Pointer pointer,
Size size);
extern void MemoryContextFree(MemoryContext context, Pointer pointer);
@@ -49,4 +48,4 @@ extern GlobalMemory CreateGlobalMemory(char *name);
extern void GlobalMemoryDestroy(GlobalMemory context);
-#endif /* MCXT_H */
+#endif /* MCXT_H */
diff --git a/src/include/utils/memutils.h b/src/include/utils/memutils.h
index 71a2581676..cfe7cdd626 100644
--- a/src/include/utils/memutils.h
+++ b/src/include/utils/memutils.h
@@ -15,7 +15,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: memutils.h,v 1.16 1998/04/27 14:46:17 scrappy Exp $
+ * $Id: memutils.h,v 1.17 1998/09/01 04:39:20 momjian Exp $
*
* NOTES
* some of the information in this file will be moved to
@@ -51,7 +51,7 @@ s...)
#define DOUBLEALIGN(LEN) _ALIGN(double, (LEN))
#define MAXALIGN(LEN) _ALIGN(double, (LEN))
-#endif /* 0 */
+#endif /* 0 */
/*
* SHORTALIGN(LEN) - length (or address) aligned for shorts
@@ -233,8 +233,7 @@ extern void AllocSetReset(AllocSet set);
extern bool AllocSetContains(AllocSet set, AllocPointer pointer);
extern AllocPointer AllocSetAlloc(AllocSet set, Size size);
extern void AllocSetFree(AllocSet set, AllocPointer pointer);
-extern AllocPointer
-AllocSetRealloc(AllocSet set, AllocPointer pointer,
+extern AllocPointer AllocSetRealloc(AllocSet set, AllocPointer pointer,
Size size);
extern void AllocSetDump(AllocSet set);
@@ -275,4 +274,4 @@ typedef uint32 AttributeSize; /* XXX should be defined elsewhere */
#define MaxIndexAttributeNumber 7
-#endif /* MEMUTILS_H */
+#endif /* MEMUTILS_H */
diff --git a/src/include/utils/module.h b/src/include/utils/module.h
index 2b528fed8f..39d42bc073 100644
--- a/src/include/utils/module.h
+++ b/src/include/utils/module.h
@@ -10,7 +10,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: module.h,v 1.3 1997/09/08 02:39:51 momjian Exp $
+ * $Id: module.h,v 1.4 1998/09/01 04:39:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,4 +22,4 @@
*/
extern bool BypassEnable(int *enableCountInOutP, bool on);
-#endif /* MODULE_H */
+#endif /* MODULE_H */
diff --git a/src/include/utils/nabstime.h b/src/include/utils/nabstime.h
index 16a0221493..7c6828e84c 100644
--- a/src/include/utils/nabstime.h
+++ b/src/include/utils/nabstime.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: nabstime.h,v 1.15 1998/02/13 17:12:08 scrappy Exp $
+ * $Id: nabstime.h,v 1.16 1998/09/01 04:39:23 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,7 +63,7 @@ typedef TimeIntervalData *TimeInterval;
#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)
#else
#define NOSTART_ABSTIME ((AbsoluteTime) 0x80000001) /* -2147483647 == - 2^31 */
-#endif /* _AIX */
+#endif /* _AIX */
#define INVALID_RELTIME ((RelativeTime) 0x7FFFFFFE) /* 2147483647 == 2^31 -
* 1 */
@@ -120,4 +120,4 @@ extern bool AbsoluteTimeIsAfter(AbsoluteTime time1, AbsoluteTime time2);
extern void abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn);
-#endif /* NABSTIME_H */
+#endif /* NABSTIME_H */
diff --git a/src/include/utils/palloc.h b/src/include/utils/palloc.h
index b6f32c4f01..2c969df174 100644
--- a/src/include/utils/palloc.h
+++ b/src/include/utils/palloc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: palloc.h,v 1.5 1997/09/08 02:39:53 momjian Exp $
+ * $Id: palloc.h,v 1.6 1998/09/01 04:39:24 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,4 +22,4 @@ extern void *repalloc(void *pointer, Size size);
/* like strdup except uses palloc */
extern char *pstrdup(char *pointer);
-#endif /* PALLOC_H */
+#endif /* PALLOC_H */
diff --git a/src/include/utils/portal.h b/src/include/utils/portal.h
index 2a99e2381d..2c73972121 100644
--- a/src/include/utils/portal.h
+++ b/src/include/utils/portal.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: portal.h,v 1.9 1998/02/26 04:44:09 momjian Exp $
+ * $Id: portal.h,v 1.10 1998/09/01 04:39:25 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -68,8 +68,7 @@ extern void AtEOXact_portals(void);
extern void EnablePortalManager(bool on);
extern Portal GetPortalByName(char *name);
extern Portal BlankPortalAssignName(char *name);
-extern void
-PortalSetQuery(Portal portal, QueryDesc *queryDesc,
+extern void PortalSetQuery(Portal portal, QueryDesc *queryDesc,
TupleDesc attinfo, EState *state,
void (*cleanup) (Portal portal));
extern QueryDesc *PortalGetQueryDesc(Portal portal);
@@ -87,4 +86,4 @@ extern PortalHeapMemory PortalGetHeapMemory(Portal portal);
#define PORTALS_PER_USER 10
-#endif /* PORTAL_H */
+#endif /* PORTAL_H */
diff --git a/src/include/utils/ps_status.h b/src/include/utils/ps_status.h
index 4ede04c753..11d64cdb4d 100644
--- a/src/include/utils/ps_status.h
+++ b/src/include/utils/ps_status.h
@@ -24,7 +24,7 @@ char *ps_status_buffer = NULL;
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname) \
{ \
- int i; \
+ int i; \
for (i = 0; i < (argc); i++) { \
memset((argv)[i], 0, strlen((argv)[i])); \
} \
@@ -49,7 +49,7 @@ char *ps_status_buffer = NULL;
#else /* !linux */
-extern const char **ps_status;
+extern const char **ps_status;
#define PS_DEFINE_BUFFER \
const char **ps_status = NULL;
@@ -77,11 +77,11 @@ const char **ps_status = NULL;
#endif
#ifdef DONT_HAVE_PS_STATUS
-#define PS_DEFINE_BUFFER
+#define PS_DEFINE_BUFFER
#define PS_INIT_STATUS(argc, argv, execname, username, hostname, dbname)
#define PS_CLEAR_STATUS()
#define PS_SET_STATUS(status) { if ((status)); }
#define PS_STATUS ""
-#endif /* !linux */
+#endif /* !linux */
-#endif /* PS_STATUS_H */
+#endif /* PS_STATUS_H */
diff --git a/src/include/utils/psort.h b/src/include/utils/psort.h
index 435da97782..94477e0eac 100644
--- a/src/include/utils/psort.h
+++ b/src/include/utils/psort.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: psort.h,v 1.15 1998/02/23 06:28:16 vadim Exp $
+ * $Id: psort.h,v 1.16 1998/09/01 04:39:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -106,4 +106,4 @@ extern void psort_restorepos(Sort *node);
extern void psort_end(Sort *node);
extern void psort_rescan(Sort *node);
-#endif /* PSORT_H */
+#endif /* PSORT_H */
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 206c011ba2..456b92305c 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rel.h,v 1.19 1998/09/01 03:28:32 momjian Exp $
+ * $Id: rel.h,v 1.20 1998/09/01 04:39:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -177,8 +177,7 @@ typedef Relation *RelationPtr;
extern IndexStrategy RelationGetIndexStrategy(Relation relation);
-extern void
-RelationSetIndexSupport(Relation relation, IndexStrategy strategy,
+extern void RelationSetIndexSupport(Relation relation, IndexStrategy strategy,
RegProcedure *support);
-#endif /* REL_H */
+#endif /* REL_H */
diff --git a/src/include/utils/rel2.h b/src/include/utils/rel2.h
index 4440e508e4..ef6b7bc437 100644
--- a/src/include/utils/rel2.h
+++ b/src/include/utils/rel2.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: rel2.h,v 1.6 1998/02/26 04:44:10 momjian Exp $
+ * $Id: rel2.h,v 1.7 1998/09/01 04:39:31 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -17,8 +17,7 @@
extern IndexStrategy RelationGetIndexStrategy(Relation relation);
-extern void
-RelationSetIndexSupport(Relation relation, IndexStrategy strategy,
+extern void RelationSetIndexSupport(Relation relation, IndexStrategy strategy,
RegProcedure *support);
-#endif /* TMP_REL2_H */
+#endif /* TMP_REL2_H */
diff --git a/src/include/utils/relcache.h b/src/include/utils/relcache.h
index 19317bedfa..ffe3ec7525 100644
--- a/src/include/utils/relcache.h
+++ b/src/include/utils/relcache.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: relcache.h,v 1.9 1998/01/24 22:50:56 momjian Exp $
+ * $Id: relcache.h,v 1.10 1998/09/01 04:39:32 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,4 +34,4 @@ extern void RelationRegisterRelation(Relation relation);
extern void RelationPurgeLocalRelation(bool xactComitted);
extern void RelationInitialize(void);
-#endif /* RELCACHE_H */
+#endif /* RELCACHE_H */
diff --git a/src/include/utils/sets.h b/src/include/utils/sets.h
index f928b4012b..99ca816f43 100644
--- a/src/include/utils/sets.h
+++ b/src/include/utils/sets.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: sets.h,v 1.3 1997/09/08 02:39:58 momjian Exp $
+ * $Id: sets.h,v 1.4 1998/09/01 04:39:33 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -19,4 +19,4 @@
extern Oid SetDefine(char *querystr, char *typename);
extern int seteval(Oid funcoid);
-#endif /* SETS_H */
+#endif /* SETS_H */
diff --git a/src/include/utils/syscache.h b/src/include/utils/syscache.h
index add859e5ea..3bb5838383 100644
--- a/src/include/utils/syscache.h
+++ b/src/include/utils/syscache.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: syscache.h,v 1.11 1998/08/19 02:04:09 momjian Exp $
+ * $Id: syscache.h,v 1.12 1998/09/01 04:39:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -69,7 +69,8 @@
*/
struct cachedesc
{
- char *name; /* this is Name so that we can initialize it */
+ char *name; /* this is Name so that we can initialize
+ * it */
int nkeys;
int key[4];
int size; /* sizeof(appropriate struct) */
@@ -80,19 +81,15 @@ struct cachedesc
extern void zerocaches(void);
extern void InitCatalogCache(void);
-extern HeapTuple
-SearchSysCacheTupleCopy(int cacheId,
+extern HeapTuple SearchSysCacheTupleCopy(int cacheId,
+ Datum key1, Datum key2, Datum key3, Datum key4);
+extern HeapTuple SearchSysCacheTuple(int cacheId,
Datum key1, Datum key2, Datum key3, Datum key4);
-extern HeapTuple
-SearchSysCacheTuple(int cacheId,
- Datum key1, Datum key2, Datum key3, Datum key4);
-extern int32
-SearchSysCacheStruct(int cacheId, char *returnStruct,
+extern int32 SearchSysCacheStruct(int cacheId, char *returnStruct,
Datum key1, Datum key2, Datum key3, Datum key4);
-extern void *
-SearchSysCacheGetAttribute(int cacheId,
+extern void *SearchSysCacheGetAttribute(int cacheId,
AttrNumber attributeNumber,
- Datum key1, Datum key2, Datum key3, Datum key4);
+ Datum key1, Datum key2, Datum key3, Datum key4);
extern void *TypeDefaultRetrieve(Oid typId);
-#endif /* SYSCACHE_H */
+#endif /* SYSCACHE_H */
diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h
index 8775eaf9aa..39bc9e8655 100644
--- a/src/include/utils/tqual.h
+++ b/src/include/utils/tqual.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tqual.h,v 1.13 1998/07/27 19:38:40 vadim Exp $
+ * $Id: tqual.h,v 1.14 1998/09/01 04:39:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -18,17 +18,17 @@
typedef struct SnapshotData
{
- TransactionId xmin; /* XID < xmin are visible to me */
- TransactionId xmax; /* XID > xmax are invisible to me */
- TransactionId *xip; /* array of xacts in progress */
-} SnapshotData;
+ TransactionId xmin; /* XID < xmin are visible to me */
+ TransactionId xmax; /* XID > xmax are invisible to me */
+ TransactionId *xip; /* array of xacts in progress */
+} SnapshotData;
-typedef SnapshotData *Snapshot;
+typedef SnapshotData *Snapshot;
-#define IsSnapshotNow(snapshot) ((Snapshot) snapshot == (Snapshot) 0x0)
-#define IsSnapshotSelf(snapshot) ((Snapshot) snapshot == (Snapshot) 0x1)
-#define SnapshotNow ((Snapshot) 0x0)
-#define SnapshotSelf ((Snapshot) 0x1)
+#define IsSnapshotNow(snapshot) ((Snapshot) snapshot == (Snapshot) 0x0)
+#define IsSnapshotSelf(snapshot) ((Snapshot) snapshot == (Snapshot) 0x1)
+#define SnapshotNow ((Snapshot) 0x0)
+#define SnapshotSelf ((Snapshot) 0x1)
extern TransactionId HeapSpecialTransactionId;
extern CommandId HeapSpecialCommandId;
@@ -53,7 +53,7 @@ extern CommandId HeapSpecialCommandId;
) \
)
-#define heapisoverride() \
+#define heapisoverride() \
( \
(!TransactionIdIsValid(HeapSpecialTransactionId)) ? \
false \
@@ -77,4 +77,4 @@ extern bool HeapTupleSatisfiesNow(HeapTuple tuple);
extern void setheapoverride(bool on);
-#endif /* TQUAL_H */
+#endif /* TQUAL_H */
diff --git a/src/include/utils/trace.h b/src/include/utils/trace.h
index 7884e197fd..4d71b20ea2 100644
--- a/src/include/utils/trace.h
+++ b/src/include/utils/trace.h
@@ -4,7 +4,7 @@
*
* Conditional trace definitions.
*
- * Massimo Dal Zotto <[email protected]>
+ * Massimo Dal Zotto <[email protected]>
*
*-------------------------------------------------------------------------
*/
@@ -20,16 +20,17 @@
#include "postgres.h"
#ifdef ELOG_TIMESTAMPS
-char *tprintf_timestamp(void);
+char *tprintf_timestamp(void);
+
#define TIMESTAMP_SIZE 28
#else
#define TIMESTAMP_SIZE 0
#endif
-extern int tprintf(int flag, const char *fmt, ...);
-extern int eprintf(const char *fmt, ...);
-extern int option_flag(int flag);
-extern int set_option_flag(int flag, int value);
+extern int tprintf(int flag, const char *fmt,...);
+extern int eprintf(const char *fmt,...);
+extern int option_flag(int flag);
+extern int set_option_flag(int flag, int value);
extern void write_syslog(int level, char *line);
extern void parse_options(char *str);
extern void read_pg_options(SIGNAL_ARGS);
@@ -38,8 +39,10 @@ extern void read_pg_options(SIGNAL_ARGS);
* Trace options, used as index into pg_options.
* Must match the constants in pg_options[].
*/
-enum pg_option_enum {
- TRACE_ALL, /* 0=trace some, 1=trace all, -1=trace none */
+enum pg_option_enum
+{
+ TRACE_ALL, /* 0=trace some, 1=trace all, -1=trace
+ * none */
TRACE_VERBOSE,
TRACE_QUERY,
TRACE_PLAN,
@@ -48,7 +51,7 @@ enum pg_option_enum {
TRACE_PARSERSTATS,
TRACE_PLANNERSTATS,
TRACE_EXECUTORSTATS,
- TRACE_SHORTLOCKS, /* currently unused but needed, see lock.c */
+ TRACE_SHORTLOCKS, /* currently unused but needed, see lock.c */
TRACE_LOCKS,
TRACE_USERLOCKS,
TRACE_SPINLOCKS,
@@ -57,29 +60,31 @@ enum pg_option_enum {
TRACE_PALLOC,
TRACE_LOCKOIDMIN,
TRACE_LOCKRELATION,
- OPT_LOCKREADPRIORITY, /* lock priority, see lock.c */
- OPT_DEADLOCKTIMEOUT, /* deadlock timeout, see proc.c */
- OPT_SYSLOG, /* use syslog for error messages */
- OPT_HOSTLOOKUP, /* enable hostname lookup in ps_status */
- OPT_SHOWPORTNUMBER, /* show port number in ps_status */
- OPT_NOTIFYUNLOCK, /* enable unlock of pg_listener after notify */
- OPT_NOTIFYHACK, /* enable notify hack to remove duplicate tuples */
+ OPT_LOCKREADPRIORITY, /* lock priority, see lock.c */
+ OPT_DEADLOCKTIMEOUT, /* deadlock timeout, see proc.c */
+ OPT_SYSLOG, /* use syslog for error messages */
+ OPT_HOSTLOOKUP, /* enable hostname lookup in ps_status */
+ OPT_SHOWPORTNUMBER, /* show port number in ps_status */
+ OPT_NOTIFYUNLOCK, /* enable unlock of pg_listener after
+ * notify */
+ OPT_NOTIFYHACK, /* enable notify hack to remove duplicate
+ * tuples */
- NUM_PG_OPTIONS /* must be the last item of enum */
+ NUM_PG_OPTIONS /* must be the last item of enum */
};
-extern int pg_options[NUM_PG_OPTIONS];
+extern int pg_options[NUM_PG_OPTIONS];
#define PRINTF(args...) tprintf(TRACE_ALL, args)
-#define EPRINTF(args...) eprintf(args)
+#define EPRINTF(args...) eprintf(args)
#define TPRINTF(flag, args...) tprintf(flag, args)
-#endif /* TRACE_H */
+#endif /* TRACE_H */
/*
* Local variables:
- * tab-width: 4
- * c-indent-level: 4
- * c-basic-offset: 4
+ * tab-width: 4
+ * c-indent-level: 4
+ * c-basic-offset: 4
* End:
*/
diff --git a/src/interfaces/ecpg/include/ecpgerrno.h b/src/interfaces/ecpg/include/ecpgerrno.h
index 2303f2a215..56cf8d5f57 100644
--- a/src/interfaces/ecpg/include/ecpgerrno.h
+++ b/src/interfaces/ecpg/include/ecpgerrno.h
@@ -4,7 +4,7 @@
#include <errno.h>
/* This is a list of all error codes the embedded SQL program can return */
-#define ECPG_NO_ERROR 0
+#define ECPG_NO_ERROR 0
#define ECPG_NOT_FOUND 100
/* system error codes returned by ecpglib get the correct number,
@@ -14,7 +14,7 @@
/* 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_MANY_ARGUMENTS -201
#define ECPG_TOO_FEW_ARGUMENTS -202
#define ECPG_TOO_MANY_MATCHES -203
#define ECPG_INT_FORMAT -204
@@ -33,4 +33,4 @@
#define ECPG_TRANS -401
#define ECPG_CONNECT -402
-#endif /* !_ECPG_ERROR_H */
+#endif /* !_ECPG_ERROR_H */
diff --git a/src/interfaces/ecpg/include/ecpglib.h b/src/interfaces/ecpg/include/ecpglib.h
index 0f0bd2b38c..1c907a673c 100644
--- a/src/interfaces/ecpg/include/ecpglib.h
+++ b/src/interfaces/ecpg/include/ecpglib.h
@@ -1,43 +1,46 @@
#include <c.h>
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-void ECPGdebug(int, FILE *);
-bool ECPGsetconn(int, const char *);
-bool ECPGconnect(int, const char *, const char *, const char *, const char *);
-bool ECPGdo(int, char *,...);
-bool ECPGtrans(int, const char *);
-bool ECPGdisconnect(int, const char *);
+ void ECPGdebug(int, FILE *);
+ bool ECPGsetconn(int, const char *);
+ bool ECPGconnect(int, const char *, const char *, const char *, const char *);
+ bool ECPGdo(int, char *,...);
+ bool ECPGtrans(int, const char *);
+ bool ECPGdisconnect(int, const char *);
-void ECPGlog(const char *format,...);
+ void ECPGlog(const char *format,...);
#ifdef LIBPQ_FE_H
-bool ECPGsetdb(PGconn *);
+ bool ECPGsetdb(PGconn *);
#endif
/* Here are some methods used by the lib. */
/* Returns a pointer to a string containing a simple type name. */
-const char *ECPGtype_name(enum ECPGttype);
+ const char *ECPGtype_name(enum ECPGttype);
/* A generic varchar type. */
-struct ECPGgeneric_varchar
-{
- int len;
- char arr[1];
-};
+ struct ECPGgeneric_varchar
+ {
+ int len;
+ char arr[1];
+ };
/* print an error message */
-void sqlprint(void);
+ void sqlprint(void);
-struct cursor { const char *name;
- char *command;
+ struct cursor
+ {
+ const char *name;
+ char *command;
struct cursor *next;
- };
+ };
-extern int no_auto_trans;
+ extern int no_auto_trans;
/* define this for simplicity as well as compatibility */
@@ -45,6 +48,7 @@ extern int no_auto_trans;
#ifdef __cplusplus
}
+
#endif
#include <ecpgerrno.h>
diff --git a/src/interfaces/ecpg/include/ecpgtype.h b/src/interfaces/ecpg/include/ecpgtype.h
index 27641df39a..945ce0b98d 100644
--- a/src/interfaces/ecpg/include/ecpgtype.h
+++ b/src/interfaces/ecpg/include/ecpgtype.h
@@ -30,27 +30,29 @@
#include <stdio.h>
#ifdef __cplusplus
-extern "C" {
+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_bool,
- ECPGt_float, ECPGt_double,
- ECPGt_varchar, ECPGt_varchar2,
- ECPGt_array,
- ECPGt_struct,
- ECPGt_EOIT, /* End of insert types. */
- ECPGt_EORT, /* End of result types. */
- ECPGt_NO_INDICATOR /* no indicator */
-};
+ enum ECPGttype
+ {
+ ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
+ ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
+ ECPGt_bool,
+ ECPGt_float, ECPGt_double,
+ ECPGt_varchar, ECPGt_varchar2,
+ ECPGt_array,
+ ECPGt_struct,
+ ECPGt_EOIT, /* End of insert types. */
+ ECPGt_EORT, /* End of result types. */
+ ECPGt_NO_INDICATOR /* no indicator */
+ };
#define IS_SIMPLE_TYPE(type) ((type) >= ECPGt_char && (type) <= ECPGt_varchar2)
-const char * ECPGtype_name(enum ECPGttype);
+ const char *ECPGtype_name(enum ECPGttype);
#ifdef __cplusplus
}
+
#endif
diff --git a/src/interfaces/ecpg/include/sqlca.h b/src/interfaces/ecpg/include/sqlca.h
index f96067d974..d1fedd5b85 100644
--- a/src/interfaces/ecpg/include/sqlca.h
+++ b/src/interfaces/ecpg/include/sqlca.h
@@ -2,49 +2,50 @@
#define POSTGRES_SQLCA_H
#ifdef __cplusplus
-extern "C" {
+extern "C"
+{
#endif
-struct sqlca
-{
- char sqlcaid[8];
- long sqlabc;
- long sqlcode;
- struct
+ struct sqlca
{
- int sqlerrml;
- char sqlerrmc[70];
- } sqlerrm;
- char sqlerrp[8];
- long sqlerrd[6];
- /* Element 0: empty */
- /* 1: empty */
- /* 2: number of rows processed */
- /* after an INSERT, UPDATE or*/
- /* DELETE statement */
- /* 3: empty */
- /* 4: empty */
- /* 5: empty */
- char sqlwarn[8];
+ char sqlcaid[8];
+ long sqlabc;
+ long sqlcode;
+ struct
+ {
+ int sqlerrml;
+ char sqlerrmc[70];
+ } sqlerrm;
+ char sqlerrp[8];
+ long sqlerrd[6];
+ /* Element 0: empty */
+ /* 1: empty */
+ /* 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: empty */
- /* 3: empty */
- /* 4: empty */
- /* 5: empty */
- /* 6: empty */
- /* 7: empty */
-
- char sqlext[8];
-};
+ /* 1: if 'W' at least one character string */
+ /* value was truncated when it was */
+ /* stored into a host variable. */
+ /* 2: empty */
+ /* 3: empty */
+ /* 4: empty */
+ /* 5: empty */
+ /* 6: empty */
+ /* 7: empty */
+
+ char sqlext[8];
+ };
+
+ extern struct sqlca sqlca;
-extern struct sqlca sqlca;
-
#endif
#ifdef __cplusplus
}
+
#endif
-
diff --git a/src/interfaces/ecpg/lib/ecpglib.c b/src/interfaces/ecpg/lib/ecpglib.c
index b2bb9f1415..3804544514 100644
--- a/src/interfaces/ecpg/lib/ecpglib.c
+++ b/src/interfaces/ecpg/lib/ecpglib.c
@@ -25,58 +25,58 @@
#include <sqlca.h>
/* variables visible to the programs */
-int no_auto_trans;
+int no_auto_trans;
-static struct sqlca sqlca_init =
+static struct sqlca sqlca_init =
{
- {'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '},
- sizeof(struct sqlca),
- 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, 0, 0, 0}
+ {'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '},
+ sizeof(struct sqlca),
+ 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, 0, 0, 0}
};
struct sqlca sqlca =
{
- {'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '},
- sizeof(struct sqlca),
- 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, 0, 0, 0}
+ {'S', 'Q', 'L', 'C', 'A', ' ', ' ', ' '},
+ sizeof(struct sqlca),
+ 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, 0, 0, 0}
};
static struct connection
{
- char *name;
- PGconn *connection;
+ char *name;
+ PGconn *connection;
struct connection *next;
-} *all_connections = NULL, *actual_connection = NULL;
+} *all_connections = NULL, *actual_connection = NULL;
struct variable
{
enum ECPGttype type;
- void *value;
- long varcharsize;
- long arrsize;
- long offset;
+ void *value;
+ long varcharsize;
+ long arrsize;
+ long offset;
enum ECPGttype ind_type;
- void *ind_value;
- long ind_varcharsize;
- long ind_arrsize;
- long ind_offset;
+ void *ind_value;
+ long ind_varcharsize;
+ long ind_arrsize;
+ long ind_offset;
struct variable *next;
};
struct statement
{
- int lineno;
- char *command;
+ int lineno;
+ char *command;
struct variable *inlist;
struct variable *outlist;
};
@@ -98,7 +98,7 @@ register_error(long code, char *fmt,...)
}
static void
-ECPGfinish(struct connection *act)
+ECPGfinish(struct connection * act)
{
if (act != NULL)
{
@@ -114,8 +114,8 @@ ECPGfinish(struct connection *act)
else
{
struct connection *con;
-
- for (con = all_connections; con->next && con->next != act; con = con->next);
+
+ for (con = all_connections; con->next && con->next != act; con = con->next);
if (con->next)
{
con->next = act->next;
@@ -123,7 +123,7 @@ ECPGfinish(struct connection *act)
free(act);
}
}
-
+
if (actual_connection == act)
actual_connection = all_connections;
}
@@ -131,20 +131,21 @@ ECPGfinish(struct connection *act)
ECPGlog("ECPGfinish: called an extra time.\n");
}
-static char *ecpg_alloc(long size, int lineno)
+static char *
+ecpg_alloc(long size, int lineno)
{
- char *new = (char *) malloc(size);
+ char *new = (char *) malloc(size);
if (!new)
{
ECPGfinish(actual_connection);
ECPGlog("out of memory\n");
- register_error(ECPG_OUT_OF_MEMORY, "out of memory in line %d", lineno);
+ register_error(ECPG_OUT_OF_MEMORY, "out of memory in line %d", lineno);
return NULL;
}
-
+
memset(new, '\0', size);
- return(new);
+ return (new);
}
/* This function returns a newly malloced string that has the ' and \
@@ -159,8 +160,8 @@ quote_postgres(char *arg, int lineno)
ri;
if (!res)
- return(res);
-
+ return (res);
+
for (i = 0, ri = 0; arg[i]; i++, ri++)
{
switch (arg[i])
@@ -181,62 +182,61 @@ quote_postgres(char *arg, int lineno)
/* create a list of variables */
static bool
-create_statement(int lineno, struct statement **stmt, char *query, va_list ap)
+create_statement(int lineno, struct statement ** stmt, char *query, va_list ap)
{
struct variable **list = &((*stmt)->inlist);
- enum ECPGttype type;
-
+ enum ECPGttype type;
+
if (!(*stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno)))
return false;
-
+
(*stmt)->command = query;
(*stmt)->lineno = lineno;
-
+
list = &((*stmt)->inlist);
type = va_arg(ap, 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)))
- return false;
-
- var->type = type;
- var->value = va_arg(ap, void *);
- var->varcharsize = va_arg(ap, long);
- var->arrsize = va_arg(ap, long);
- var->offset = va_arg(ap, long);
- var->ind_type = va_arg(ap, enum ECPGttype);
- var->ind_value = va_arg(ap, void *);
- var->ind_varcharsize = va_arg(ap, long);
- var->ind_arrsize = va_arg(ap, long);
- var->ind_offset = va_arg(ap, long);
- var->next = NULL;
-
- for (ptr = *list; ptr && ptr->next; ptr=ptr->next);
-
- if (ptr == NULL)
- *list = var;
+ {
+ if (type == ECPGt_EOIT)
+ list = &((*stmt)->outlist);
else
- ptr->next = var;
- }
-
- type = va_arg(ap, enum ECPGttype);
+ {
+ struct variable *var,
+ *ptr;
+
+ if (!(var = (struct variable *) ecpg_alloc(sizeof(struct variable), lineno)))
+ return false;
+
+ var->type = type;
+ var->value = va_arg(ap, void *);
+ var->varcharsize = va_arg(ap, long);
+ var->arrsize = va_arg(ap, long);
+ var->offset = va_arg(ap, long);
+ var->ind_type = va_arg(ap, enum ECPGttype);
+ var->ind_value = va_arg(ap, void *);
+ var->ind_varcharsize = va_arg(ap, long);
+ var->ind_arrsize = va_arg(ap, long);
+ var->ind_offset = va_arg(ap, long);
+ var->next = NULL;
+
+ for (ptr = *list; ptr && ptr->next; ptr = ptr->next);
+
+ if (ptr == NULL)
+ *list = var;
+ else
+ ptr->next = var;
+ }
+
+ type = va_arg(ap, enum ECPGttype);
}
-
- return(true);
+
+ return (true);
}
static bool
-ECPGexecute(struct statement *stmt)
+ECPGexecute(struct statement * stmt)
{
bool status = false;
char *copiedquery;
@@ -244,8 +244,8 @@ ECPGexecute(struct statement *stmt)
PGnotify *notify;
struct variable *var;
- memcpy((char *)&sqlca, (char *)&sqlca_init, sizeof(sqlca));
-
+ memcpy((char *) &sqlca, (char *) &sqlca_init, sizeof(sqlca));
+
copiedquery = strdup(stmt->command);
/*
@@ -270,7 +270,7 @@ ECPGexecute(struct statement *stmt)
*/
buff[0] = '\0';
-
+
/* check for null value and set input buffer accordingly */
switch (var->ind_type)
{
@@ -292,117 +292,117 @@ ECPGexecute(struct statement *stmt)
default:
break;
}
-
+
if (*buff == '\0')
{
- switch (var->type)
- {
- case ECPGt_short:
- case ECPGt_int:
- sprintf(buff, "%d", *(int *) var->value);
- tobeinserted = buff;
- break;
+ switch (var->type)
+ {
+ case ECPGt_short:
+ case ECPGt_int:
+ sprintf(buff, "%d", *(int *) var->value);
+ tobeinserted = buff;
+ break;
- case ECPGt_unsigned_short:
- case ECPGt_unsigned_int:
- sprintf(buff, "%d", *(unsigned int *) var->value);
- tobeinserted = buff;
- break;
+ case ECPGt_unsigned_short:
+ case ECPGt_unsigned_int:
+ sprintf(buff, "%d", *(unsigned int *) var->value);
+ tobeinserted = buff;
+ break;
- case ECPGt_long:
- sprintf(buff, "%ld", *(long *) var->value);
- tobeinserted = buff;
- break;
+ case ECPGt_long:
+ sprintf(buff, "%ld", *(long *) var->value);
+ tobeinserted = buff;
+ break;
- case ECPGt_unsigned_long:
- sprintf(buff, "%ld", *(unsigned long *) var->value);
- tobeinserted = buff;
- break;
+ case ECPGt_unsigned_long:
+ sprintf(buff, "%ld", *(unsigned long *) var->value);
+ tobeinserted = buff;
+ break;
- case ECPGt_float:
- sprintf(buff, "%.14g", *(float *) var->value);
- tobeinserted = buff;
- break;
+ case ECPGt_float:
+ sprintf(buff, "%.14g", *(float *) var->value);
+ tobeinserted = buff;
+ break;
- case ECPGt_double:
- sprintf(buff, "%.14g", *(double *) var->value);
- tobeinserted = buff;
- break;
+ case ECPGt_double:
+ sprintf(buff, "%.14g", *(double *) var->value);
+ tobeinserted = buff;
+ break;
- case ECPGt_bool:
- sprintf(buff, "'%c'", (*(char *) var->value ? 't' : 'f'));
- tobeinserted = buff;
- break;
+ case ECPGt_bool:
+ sprintf(buff, "'%c'", (*(char *) var->value ? 't' : 'f'));
+ tobeinserted = buff;
+ break;
- case ECPGt_char:
- case ECPGt_unsigned_char:
- {
- /* set slen to string length if type is char * */
- int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : var->varcharsize;
- char * tmp;
-
- if (!(newcopy = ecpg_alloc(slen + 1, stmt->lineno)))
- return false;
-
- strncpy(newcopy, (char *) var->value, slen);
- newcopy[slen] = '\0';
-
- if (!(mallocedval = (char *) ecpg_alloc(2 * strlen(newcopy) + 3, stmt->lineno)))
- return false;
-
- strcpy(mallocedval, "'");
- tmp = quote_postgres(newcopy, stmt->lineno);
- if (!tmp)
- return false;
-
- strcat(mallocedval, tmp);
- strcat(mallocedval, "'");
-
- free(newcopy);
-
- tobeinserted = mallocedval;
- }
- break;
+ case ECPGt_char:
+ case ECPGt_unsigned_char:
+ {
+ /* set slen to string length if type is char * */
+ int slen = (var->varcharsize == 0) ? strlen((char *) var->value) : var->varcharsize;
+ char *tmp;
- case ECPGt_varchar:
- {
- struct ECPGgeneric_varchar *variable =
- (struct ECPGgeneric_varchar *) (var->value);
- char *tmp;
-
- if (!(newcopy = (char *) ecpg_alloc(variable->len + 1, stmt->lineno)))
- return false;
-
- strncpy(newcopy, variable->arr, variable->len);
- newcopy[variable->len] = '\0';
-
- if (!(mallocedval = (char *) ecpg_alloc(2 * strlen(newcopy) + 3, stmt->lineno)))
- return false;
-
- strcpy(mallocedval, "'");
- tmp = quote_postgres(newcopy, stmt->lineno);
- if (!tmp)
- return false;
-
- strcat(mallocedval, tmp);
- strcat(mallocedval, "'");
-
- free(newcopy);
-
- tobeinserted = mallocedval;
- }
- break;
+ if (!(newcopy = ecpg_alloc(slen + 1, stmt->lineno)))
+ return false;
- default:
- /* Not implemented yet */
- register_error(ECPG_UNSUPPORTED, "Unsupported type %s on line %d.",
- ECPGtype_name(var->type), stmt->lineno);
- return false;
- break;
- }
+ strncpy(newcopy, (char *) var->value, slen);
+ newcopy[slen] = '\0';
+
+ if (!(mallocedval = (char *) ecpg_alloc(2 * strlen(newcopy) + 3, stmt->lineno)))
+ return false;
+
+ strcpy(mallocedval, "'");
+ tmp = quote_postgres(newcopy, stmt->lineno);
+ if (!tmp)
+ return false;
+
+ strcat(mallocedval, tmp);
+ strcat(mallocedval, "'");
+
+ free(newcopy);
+
+ tobeinserted = mallocedval;
+ }
+ break;
+
+ case ECPGt_varchar:
+ {
+ struct ECPGgeneric_varchar *variable =
+ (struct ECPGgeneric_varchar *) (var->value);
+ char *tmp;
+
+ if (!(newcopy = (char *) ecpg_alloc(variable->len + 1, stmt->lineno)))
+ return false;
+
+ strncpy(newcopy, variable->arr, variable->len);
+ newcopy[variable->len] = '\0';
+
+ if (!(mallocedval = (char *) ecpg_alloc(2 * strlen(newcopy) + 3, stmt->lineno)))
+ return false;
+
+ strcpy(mallocedval, "'");
+ tmp = quote_postgres(newcopy, stmt->lineno);
+ if (!tmp)
+ return false;
+
+ strcat(mallocedval, tmp);
+ strcat(mallocedval, "'");
+
+ free(newcopy);
+
+ tobeinserted = mallocedval;
+ }
+ break;
+
+ default:
+ /* Not implemented yet */
+ register_error(ECPG_UNSUPPORTED, "Unsupported type %s on line %d.",
+ ECPGtype_name(var->type), stmt->lineno);
+ return false;
+ break;
+ }
}
else
- tobeinserted = buff;
+ tobeinserted = buff;
/*
* Now tobeinserted points to an area that is to be inserted at
@@ -410,7 +410,7 @@ ECPGexecute(struct statement *stmt)
*/
if (!(newcopy = (char *) ecpg_alloc(strlen(copiedquery) + strlen(tobeinserted) + 1, stmt->lineno)))
return false;
-
+
strcpy(newcopy, copiedquery);
if ((p = strstr(newcopy, ";;")) == NULL)
{
@@ -438,7 +438,8 @@ ECPGexecute(struct statement *stmt)
/*
* Now everything is safely copied to the newcopy. Lets free the
- * oldcopy and let the copiedquery get the var->value from the newcopy.
+ * oldcopy and let the copiedquery get the var->value from the
+ * newcopy.
*/
if (mallocedval != NULL)
{
@@ -481,7 +482,7 @@ ECPGexecute(struct statement *stmt)
ECPGlog("ECPGexecute line %d: error: %s", stmt->lineno,
PQerrorMessage(actual_connection->connection));
register_error(ECPG_PGSQL, "Postgres error: %s line %d.",
- PQerrorMessage(actual_connection->connection), stmt->lineno);
+ PQerrorMessage(actual_connection->connection), stmt->lineno);
}
else
{
@@ -489,7 +490,10 @@ ECPGexecute(struct statement *stmt)
var = stmt->outlist;
switch (PQresultStatus(results))
{
- int nfields, ntuples, act_tuple, act_field;
+ int nfields,
+ ntuples,
+ act_tuple,
+ act_field;
case PGRES_TUPLES_OK:
@@ -502,7 +506,7 @@ ECPGexecute(struct statement *stmt)
nfields = PQnfields(results);
sqlca.sqlerrd[2] = ntuples = PQntuples(results);
status = true;
-
+
if (ntuples < 1)
{
ECPGlog("ECPGexecute line %d: Incorrect number of matches: %d\n",
@@ -512,268 +516,274 @@ ECPGexecute(struct statement *stmt)
break;
}
- for (act_field = 0; act_field < nfields && status; act_field++)
- {
- char *pval;
- char *scan_length;
-
- if (var == NULL)
- {
- ECPGlog("ECPGexecute line %d: Too few arguments.\n", stmt->lineno);
- register_error(ECPG_TOO_FEW_ARGUMENTS, "Too few arguments line %d.", stmt->lineno);
- return(false);
- }
-
- /* 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))
- {
- ECPGlog("ECPGexecute line %d: Incorrect number of matches: %d don't fit into array of %d\n",
- stmt->lineno, ntuples, var->arrsize);
- register_error(ECPG_TOO_MANY_MATCHES, "Too many matches line %d.", stmt->lineno);
- status = false;
- break;
- }
- for (act_tuple = 0; act_tuple < ntuples; act_tuple++)
- {
- pval = PQgetvalue(results, act_tuple, act_field);
-
- ECPGlog("ECPGexecute line %d: RESULT: %s\n", stmt->lineno, pval ? pval : "");
-
- /* Now the pval is a pointer to the var->value. */
- /* We will have to decode the var->value */
-
- /* check for null var->value and set indicator accordingly */
- switch (var->ind_type)
- {
- case ECPGt_short:
- case ECPGt_unsigned_short:
- ((short *) var->ind_value)[act_tuple] = -PQgetisnull(results, act_tuple, act_field);
- break;
- case ECPGt_int:
- case ECPGt_unsigned_int:
- ((int *) var->ind_value)[act_tuple] = -PQgetisnull(results, act_tuple, act_field);
- break;
- case ECPGt_long:
- case ECPGt_unsigned_long:
- ((long *) var->ind_value)[act_tuple] = -PQgetisnull(results, act_tuple, act_field);
- break;
- default:
- break;
- }
-
- switch (var->type)
- {
- long res;
- unsigned long ures;
- double dres;
-
- case ECPGt_short:
- case ECPGt_int:
- case ECPGt_long:
- if (pval)
- {
- res = strtol(pval, &scan_length, 10);
- if (*scan_length != '\0') /* Garbage left */
- {
- register_error(ECPG_INT_FORMAT, "Not correctly formatted int type: %s line %d.",
- pval, stmt->lineno);
- status = false;
- res = 0L;
- }
- }
- else
- res = 0L;
-
- /* Again?! Yes */
- switch (var->type)
- {
- case ECPGt_short:
- ((short *) var->value)[act_tuple] = (short) res;
- break;
- case ECPGt_int:
- ((int *) var->value)[act_tuple] = (int) res;
- break;
- case ECPGt_long:
- ((long *) var->value)[act_tuple] = res;
- break;
- default:
- /* Cannot happen */
- break;
- }
- break;
-
- case ECPGt_unsigned_short:
- case ECPGt_unsigned_int:
- case ECPGt_unsigned_long:
- if (pval)
- {
- ures = strtoul(pval, &scan_length, 10);
- if (*scan_length != '\0') /* Garbage left */
- {
- register_error(ECPG_UINT_FORMAT, "Not correctly formatted unsigned type: %s line %d.",
- pval, stmt->lineno);
- status = false;
- ures = 0L;
- }
- }
- else
- ures = 0L;
-
- /* Again?! Yes */
- switch (var->type)
- {
- case ECPGt_unsigned_short:
- ((unsigned short *) var->value)[act_tuple] = (unsigned short) ures;
- break;
- case ECPGt_unsigned_int:
- ((unsigned int *) var->value)[act_tuple] = (unsigned int) ures;
- break;
- case ECPGt_unsigned_long:
- ((unsigned long *) var->value)[act_tuple] = ures;
- break;
- default:
- /* Cannot happen */
- break;
- }
- break;
-
-
- case ECPGt_float:
- case ECPGt_double:
- if (pval)
- {
- dres = strtod(pval, &scan_length);
- if (*scan_length != '\0') /* Garbage left */
- {
- register_error(ECPG_FLOAT_FORMAT, "Not correctly formatted floating point type: %s line %d.",
- pval, stmt->lineno);
- status = false;
- dres = 0.0;
- }
- }
- else
- dres = 0.0;
-
- /* Again?! Yes */
- switch (var->type)
- {
- case ECPGt_float:
- ((float *) var->value)[act_tuple] = dres;
- break;
- case ECPGt_double:
- ((double *) var->value)[act_tuple] = dres;
- break;
- default:
- /* Cannot happen */
- break;
- }
- break;
-
- case ECPGt_bool:
- if (pval)
- {
- if (pval[0] == 'f' && pval[1] == '\0')
- {
- ((char *) var->value)[act_tuple] = false;
- break;
- }
- else if (pval[0] == 't' && pval[1] == '\0')
- {
- ((char *) var->value)[act_tuple] = true;
- break;
- }
- }
-
- register_error(ECPG_CONVERT_BOOL, "Unable to convert %s to bool on line %d.",
- (pval ? pval : "NULL"),
- stmt->lineno);
- status = false;
- break;
-
- case ECPGt_char:
- case ECPGt_unsigned_char:
- {
- if (var->varcharsize == 0)
- {
- /* char* */
- strncpy(((char **) var->value)[act_tuple], pval, strlen(pval));
- (((char **) var->value)[act_tuple])[strlen(pval)] = '\0';
- }
- else
- {
- strncpy((char *) ((long)var->value + var->offset * act_tuple), pval, var->varcharsize);
- if (var->varcharsize < strlen(pval))
- {
- /* truncation */
- switch (var->ind_type)
- {
- case ECPGt_short:
- case ECPGt_unsigned_short:
- ((short *) var->ind_value)[act_tuple] = var->varcharsize;
- break;
- case ECPGt_int:
- case ECPGt_unsigned_int:
- ((int *) var->ind_value)[act_tuple] = var->varcharsize;
- break;
- case ECPGt_long:
- case ECPGt_unsigned_long:
- ((long *) var->ind_value)[act_tuple] = var->varcharsize;
- break;
- default:
- break;
- }
- sqlca.sqlwarn[0] = sqlca.sqlwarn[1] = 'W';
- }
- }
- }
- break;
-
- case ECPGt_varchar:
- {
- struct ECPGgeneric_varchar *variable =
- (struct ECPGgeneric_varchar *) ((long)var->value + var->offset * act_tuple);
-
- if (var->varcharsize == 0)
- strncpy(variable->arr, pval, strlen(pval));
- else
- strncpy(variable->arr, pval, var->varcharsize);
-
- variable->len = strlen(pval);
- if (var->varcharsize > 0 && variable->len > var->varcharsize)
- {
- /* truncation */
- switch (var->ind_type)
- {
- case ECPGt_short:
- case ECPGt_unsigned_short:
- ((short *) var->ind_value)[act_tuple] = var->varcharsize;
- break;
- case ECPGt_int:
- case ECPGt_unsigned_int:
- ((int *) var->ind_value)[act_tuple] = var->varcharsize;
- break;
- case ECPGt_long:
- case ECPGt_unsigned_long:
-