Re: [HACKERS] atttypmod now 32 bits, interface change - Mailing list pgsql-interfaces

From Bruce Momjian
Subject Re: [HACKERS] atttypmod now 32 bits, interface change
Date
Msg-id 199807221510.LAA24206@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] atttypmod now 32 bits, interface change  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > Might be my atttypmod changes.  I did not make those version-sensitive.
> > I will do that now.
>
> Yes, if we want to have backward compatibility as I just defined it,
> then the backend will have to send atttypmod as either 2 or 4 bytes
> depending on ProtocolVersion.  Shouldn't be too hard.  But I'm concerned
> that you and I both missed that initially.  We had better actually test
> that the current backend sources will work with a 6.3.2-release frontend.

Already done.  We never passed atttypmod to the backend before 6.4, so
the change it just to pass it or not pass it, and Tom already did that.
The fact that the internal length was 2 and is not 4 is not relevant
because we never passed it to the frontend in the past.

    if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 2)
            pq_putint(attrs[i]->atttypmod, sizeof(attrs[i]->atttypmod...


--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

pgsql-interfaces by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] atttypmod now 32 bits, interface change
Next
From: "Chris Williams"
Date:
Subject: Re: [INTERFACES] Win32 version of the psql library