1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-24 09:27:52 +03:00

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.
This commit is contained in:
Tom Lane
2007-06-15 20:56:52 +00:00
parent 839fcc9fd0
commit 23347231a5
16 changed files with 113 additions and 62 deletions

View File

@@ -49,7 +49,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/utils/array.h,v 1.64 2007/03/27 23:21:12 tgl Exp $
* $PostgreSQL: pgsql/src/include/utils/array.h,v 1.65 2007/06/15 20:56:52 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -256,7 +256,7 @@ extern void mda_get_range(int n, int *span, const int *st, const int *endp);
extern void mda_get_prod(int n, const int *range, int *prod);
extern void mda_get_offset_values(int n, int *dist, const int *prod, const int *span);
extern int mda_next_tuple(int n, int *curr, const int *span);
extern int32 *ArrayGetTypmods(ArrayType *arr, int *n);
extern int32 *ArrayGetIntegerTypmods(ArrayType *arr, int *n);
/*
* prototypes for functions defined in array_userfuncs.c