From 23347231a53bc373710db71559a194d87f60a7cb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 15 Jun 2007 20:56:52 +0000 Subject: 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. --- src/backend/utils/adt/numeric.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/utils/adt/numeric.c') diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 95309cbff47..02523b8a5fc 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -14,7 +14,7 @@ * Copyright (c) 1998-2007, PostgreSQL Global Development Group * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/numeric.c,v 1.104 2007/06/09 15:52:30 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/numeric.c,v 1.105 2007/06/15 20:56:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -547,7 +547,7 @@ numerictypmodin(PG_FUNCTION_ARGS) int n; int32 typmod; - tl = ArrayGetTypmods(ta, &n); + tl = ArrayGetIntegerTypmods(ta, &n); if (n == 2) { -- cgit v1.2.3