-
- Downloads
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.
Showing
- doc/src/sgml/ref/create_type.sgml 5 additions, 5 deletionsdoc/src/sgml/ref/create_type.sgml
- src/backend/commands/typecmds.c 3 additions, 3 deletionssrc/backend/commands/typecmds.c
- src/backend/parser/gram.y 2 additions, 2 deletionssrc/backend/parser/gram.y
- src/backend/parser/parse_type.c 39 additions, 12 deletionssrc/backend/parser/parse_type.c
- src/backend/utils/adt/arrayutils.c 25 additions, 8 deletionssrc/backend/utils/adt/arrayutils.c
- src/backend/utils/adt/date.c 2 additions, 2 deletionssrc/backend/utils/adt/date.c
- src/backend/utils/adt/numeric.c 2 additions, 2 deletionssrc/backend/utils/adt/numeric.c
- src/backend/utils/adt/timestamp.c 3 additions, 3 deletionssrc/backend/utils/adt/timestamp.c
- src/backend/utils/adt/varbit.c 2 additions, 2 deletionssrc/backend/utils/adt/varbit.c
- src/backend/utils/adt/varchar.c 2 additions, 2 deletionssrc/backend/utils/adt/varchar.c
- src/include/catalog/catversion.h 2 additions, 2 deletionssrc/include/catalog/catversion.h
- src/include/catalog/pg_proc.h 11 additions, 11 deletionssrc/include/catalog/pg_proc.h
- src/include/catalog/pg_type.h 11 additions, 4 deletionssrc/include/catalog/pg_type.h
- src/include/utils/array.h 2 additions, 2 deletionssrc/include/utils/array.h
- src/test/regress/expected/type_sanity.out 1 addition, 1 deletionsrc/test/regress/expected/type_sanity.out
- src/test/regress/sql/type_sanity.sql 1 addition, 1 deletionsrc/test/regress/sql/type_sanity.sql
Loading
Please register or sign in to comment