From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, bz(at)mailinator(dot)com, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13442: ISBN doesn't always roundtrip with text |
Date: | 2015-08-02 16:57:37 |
Message-ID: | 55BE4C01.9010004@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 07/28/2015 10:57 AM, Fabien COELHO wrote:
>
>> AFAICS, that isn't exactly an improvement. You're telling the user
>> "if you have an ISBN column, you're screwed, and we are going to make it
>> as painful as it can possibly be to get out of that situation".
>>
>> I think we'd be better off trying to migrate to a situation where these
>> type names all still exist but they all act like ISBN13. I'm not sure
>> what the stages on that journey are.
>
> Hmm... This is more or less what the previous version was doing, including
> display bugs.
>
> So the attached v3:
> - distinguishes internally between ISBN & ISBN13 (so it is clean),
> but accepts values of one for the other transparently.
> - displays ISBN as ISBN if possible, otherwise they are show as
> ISBN13. This fixes the reported bug, and the application would
> have to adapt.
> - adds regression tests, including expected errors.
>
> The good news is that there is no extension version update, it is just a
> behavioral change when ISBN13 numbers are used with the ISBN type.
Hmm, I don't think we need or want the separate ISBN and ISBN13 codes
internally. They're used interchangeably, anyway. If we just apply your
change to ean2ISBN(), we're done. Per the attached.
Thanks for the regression tests, that was very badly needed!
- Heikki
Attachment | Content-Type | Size |
---|---|---|
isn-fix-heikki-4.patch | application/x-patch | 12.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2015-08-02 17:18:20 | Re: BUG #13442: ISBN doesn't always roundtrip with text |
Previous Message | Joe Van Dyk | 2015-08-02 14:05:06 | Re: BUG #13457: postgres_fdw, non-postgres user mapping, materialized view leads to failed pg_upgrade |