Re: macaddr 64 bit (EUI-64) datatype support - Mailing list pgsql-hackers

From Shay Rojansky
Subject Re: macaddr 64 bit (EUI-64) datatype support
Date
Msg-id CADT4RqCW2U=-j2mF03U9ZEOCB6EnayuRBaLFueWJCftJ_tvE7A@mail.gmail.com
Whole thread Raw
In response to Re: macaddr 64 bit (EUI-64) datatype support  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: macaddr 64 bit (EUI-64) datatype support  (Haribabu Kommi <kommi.haribabu@gmail.com>)
List pgsql-hackers
>     1. Does everyone agrees that renaming the existing datatype without
>     changing the OID?
>
>
> As I said before, Npgsql for one loads data types by name, not by OID.
> So this would definitely cause breakage.

Why would that cause breakage?

Well, the first thing Npgsql does when it connects to a new database, is to query pg_type. The type names are used to associate entries with type handlers, avoiding the hard-coding of OIDs in code. So if the type name "macaddr" suddenly has a new meaning and its wire representation is different breakage will occur. It is possible to release new versions of Npgsql which will look at the PostgreSQL version and say "we know that in PostgreSQL < 10 macaddr means this, but in >= 10 it means that". But that doesn't seem like a good solution, plus old versions of Npgsql from before this change won't work.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Mention column name in error messages
Next
From: Peter Geoghegan
Date:
Subject: Re: [WIP] Effective storage of duplicates in B-tree index.