Whilst working on the change I proposed to make domain types enforce
their constraints inside the typinput/typreceive routines, I realized
that there's a fairly serious flaw in the design of typreceive routines:
we don't pass them a typmod so they cannot enforce type-specific typmod
restrictions. This means for example that COPY FROM BINARY could insert
a more-than-four-character string into a char(4) column.

The correct solution of course is to include a typmod value in the
arguments passed to typreceive routines, and to adjust the receive
routines of those datatypes that use typmod to enforce the same
restrictions as the corresponding typinput routines do.

I think this is a "must fix" for 8.1.

regards, tom lane

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppgsql-hackers @
postedJul 10, '05 at 6:32p
activeJul 10, '05 at 6:32p

1 user in discussion

Tom Lane: 1 post



site design / logo © 2022 Grokbase