Re: [HACKERS] [leon@udmnet.ru: [GENERAL] Weird behavior of 'default user'] - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [leon@udmnet.ru: [GENERAL] Weird behavior of 'default user']
Date
Msg-id 10517.932145912@sss.pgh.pa.us
Whole thread Raw
In response to [leon@udmnet.ru: [GENERAL] Weird behavior of 'default user']  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
List pgsql-hackers
"Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu> forwards:
> This absolutely beyond my mind. This means that user, being
> inserted explicitly, is correctly truncated. If it is inserted
> by default, it is wider than column! Seems something very strange
> is going on here.

Yes, I thought that some cases of default insertion were still broken,
and I was right.  The patch Bruce put in before only fixes the case
of a wrong-length string constant being given as the default for a
char(n) field.  When the default is not a constant, there needs to be
a run-time length coercion to char(n), and there isn't.

I have some work to do in that part of the parser anyway; will take care
of it (but not in time for 6.5.1, I fear).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Contributing
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] final #include cleanup