mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +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:
@ -9,7 +9,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/varbit.c,v 1.53 2007/02/27 23:48:09 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/varbit.c,v 1.54 2007/06/15 20:56:51 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -32,7 +32,7 @@ anybit_typmodin(ArrayType *ta, const char *typename)
|
||||
int32 *tl;
|
||||
int n;
|
||||
|
||||
tl = ArrayGetTypmods(ta, &n);
|
||||
tl = ArrayGetIntegerTypmods(ta, &n);
|
||||
|
||||
/*
|
||||
* we're not too tense about good error message here because grammar
|
||||
|
Reference in New Issue
Block a user