postgresql/src
Tom Lane 9ffcccdb95 Rationalize handling of array type names in bootstrap data.
Formerly, Catalog.pm turned a C array type declaration in the catalog
header files into a SQL type, e.g., 'foo[]'.  Along the way, genbki.pl
turned this into '_foo' for the purpose of type lookups, but wrote 'foo[]'
to postgres.bki.  During bootstrap, bootscanner.l had to have a special
case rule to tokenize this, and then MapArrayTypeName() would turn 'foo[]'
into '_foo' one more time.

This seems unnecessarily complicated, especially since nobody cares that
much about the readability of postgres.bki.  Instead, make Catalog.pm
convert the C declaration into '_foo' to start with, and preserve that
representation of the type name throughout bootstrap data processing.
Then rip out the special-case code in bootscanner.l and bootstrap.c.

This changes postgres.bki to the extent that array fields are now
declared like
  proconfig = _text ,
rather than
  proconfig = text[] ,

No documentation update, since the SGML docs didn't mention any of this
in the first place, and it's all pretty transparent to writers of
catalog header files anyway.

John Naylor

Discussion: https://postgr.es/m/CAJVSVGUNao=-Q2-vAN3PYcdF5tnL5JAHwGwzZGuYHtq+Mk_9ng@mail.gmail.com
2018-04-17 18:29:11 -04:00
..
backend Rationalize handling of array type names in bootstrap data. 2018-04-17 18:29:11 -04:00
bin Fix a few typos in comments and variable names. 2018-04-17 11:54:57 -04:00
common Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
fe_utils Switch client-side code to include catalog/pg_foo_d.h not pg_foo.h. 2018-04-08 13:59:52 -04:00
include Rationalize handling of array type names in bootstrap data. 2018-04-17 18:29:11 -04:00
interfaces In libpq, free any partial query result before collecting a server error. 2018-04-13 12:53:45 -04:00
makefiles Fix pgxs.mk to not try to build generated headers in external builds. 2018-04-10 12:41:51 -04:00
pl Support named and default arguments in CALL 2018-04-14 09:13:53 -04:00
port Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
template Force "restrict" not to be used when compiling with xlc. 2017-10-13 12:15:06 -07:00
test Improve coverage of nodeAppend runtime partition prune 2018-04-17 12:16:22 -03:00
timezone Update time zone data files to tzdata release 2018c. 2018-01-27 16:42:28 -05:00
tools Revert MERGE patch 2018-04-12 11:22:56 +01:00
tutorial Update copyright for 2018 2018-01-02 23:30:12 -05:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Invoke submake-generated-headers during "make check", too. 2018-04-11 13:18:54 -04:00
Makefile.shlib Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-04-03 16:26:05 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00