]> granicus.if.org Git - postgresql/commit
Tweak the API for per-datatype typmodin functions so that they are passed
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Jun 2007 20:56:52 +0000 (20:56 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Jun 2007 20:56:52 +0000 (20:56 +0000)
commit23347231a53bc373710db71559a194d87f60a7cb
tree04c6e8af0afb299a0a112da5c92124a377d1abb3
parent839fcc9fd09452c406b67fb2e1af87d55d0ad4e2
Tweak the API for per-datatype typmodin functions so that they are passed
an array of strings rather than an array of integers, and allow any simple
constant or identifier to be used in typmods; for example
create table foo (f1 widget(42,'23skidoo',point));
Of course the typmodin function has still got to pack this info into a
non-negative int32 for storage, but it's still a useful improvement in
flexibility, especially considering that you can do nearly anything if you
are willing to keep the info in a side table.  We can get away with this
change since we have not yet released a version providing user-definable
typmods.  Per discussion.
16 files changed:
doc/src/sgml/ref/create_type.sgml
src/backend/commands/typecmds.c
src/backend/parser/gram.y
src/backend/parser/parse_type.c
src/backend/utils/adt/arrayutils.c
src/backend/utils/adt/date.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/varbit.c
src/backend/utils/adt/varchar.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_type.h
src/include/utils/array.h
src/test/regress/expected/type_sanity.out
src/test/regress/sql/type_sanity.sql