| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Chris Travers <chris(at)metatrontech(dot)com> |
| Cc: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Oleg Serov <serovov(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: Bug in triggers |
| Date: | 2010-03-09 16:02:31 |
| Message-ID: | 11439.1268150551@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
Chris Travers <chris(at)metatrontech(dot)com> writes:
> I think this behavior is unexpected, but not a bug. The best fix is
> documenting the datatype better. Something like adding a paragraph to
> chapter 38.9 just above the examples (going off the 8.4 docs):
> Please note, NEW and OLD records are not guaranteed to follow the full
> internal representation of the tuple in question. In some cases (such
> as casting to text) this can create subtle differences which make
> comparisons problematic. In some cases you may need to properly cast
> NEW and OLD prior to making comparisons.
We may need to document it, but not like that; it's (a) incorrect and
(b) unhelpful to the reader, who is left without any clear idea of what
to avoid. I think that the real issue here doesn't have anything to do
with NEW/OLD as such, but is related to the representational difference
between record and row variables.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrea Suisani | 2010-03-09 16:12:38 | Re: duplicate key violates unique contraint on pg_type_typname_nsp_index |
| Previous Message | Tom Lane | 2010-03-09 15:51:14 | Re: duplicate key violates unique contraint on pg_type_typname_nsp_index |