pgsql-server: Represent type-specific length coercion functions as

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: Represent type-specific length coercion functions as
Date: 2004-06-16 01:27:10
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-committers

Log Message:
Represent type-specific length coercion functions as pg_cast entries,
eliminating the former hard-wired convention about their names. Allow
pg_cast entries to represent both type coercion and length coercion in
a single step --- this is represented by a function that takes an
extra typmod argument, just like a length coercion function. This
nicely merges the type and length coercion mechanisms into something
at least a little cleaner than we had before. Make use of the single-
coercion-step behavior to fix integer-to-bit coercion so that coercing
to bit(n) yields the rightmost n bits of the integer instead of the
leftmost n bits. This should fix recurrent complaints about the odd
behavior of this coercion. Clean up the documentation of the bit string
functions, and try to put it where people might actually find it.
Also, get rid of the unreliable heuristics in ruleutils.c about whether
to display nested coercion steps; instead require parse_coerce.c to
label them properly in the first place.

Modified Files:
catalogs.sgml (r2.86 -> r2.87)
datatype.sgml (r1.145 -> r1.146)
func.sgml (r1.208 -> r1.209)
syntax.sgml (r1.93 -> r1.94)
create_cast.sgml (r1.16 -> r1.17)
copy.c (r1.226 -> r1.227)
functioncmds.c (r1.47 -> r1.48)
preptlist.c (r1.68 -> r1.69)
parse_clause.c (r1.132 -> r1.133)
parse_coerce.c (r2.118 -> r2.119)
parse_expr.c (r1.173 -> r1.174)
parse_func.c (r1.170 -> r1.171)
rewriteHandler.c (r1.139 -> r1.140)
arrayfuncs.c (r1.104 -> r1.105)
ruleutils.c (r1.171 -> r1.172)
varbit.c (r1.38 -> r1.39)
catversion.h (r1.235 -> r1.236)
pg_cast.h (r1.11 -> r1.12)
pg_proc.h (r1.337 -> r1.338)
parse_coerce.h (r1.56 -> r1.57)
array.h (r1.47 -> r1.48)
opr_sanity.out (r1.54 -> r1.55)
opr_sanity.sql (r1.43 -> r1.44)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2004-06-16 02:58:49 pgsql-server: Do PGAC_FUNC_GETPWUID_R_5ARG and PGAC_FUNC_STRERROR_R_INT
Previous Message User Mha 2004-06-15 22:23:46 pginstaller - pginst: Add feature for initdb (directory can be changed)