On Thu, 19 May 2005, Tom Lane wrote:

Heikki Linnakangas <[EMAIL PROTECTED]> writes:

* I'm inclined to think that the "gid" identifiers for prepared
transactions ought to be SQL identifiers (names), not string literals.
Was there a particular reason for making them strings?

Sure. No Reason. While you're at it, do you think it's possible to make it
unlimited size? I couldn't think of a simple way.

Actually, one reason for wanting them to be identifiers is so that
there's a principled reason for saying what the max length is ;-)

I took a closer look at the JTA spec and saw that the Xid, which is translated to a gid in the jdbc driver, consists of a format identifier (32-bit int), a branch qualifier (max 64 bytes) and a global transaction identifier (max 64 bytes).

That means that gid needs to hold 132 raw bytes minimum.

Also, it would be nice if the driver could send the gid as a bytea, without converting it to a string. Similar to using parameter markers and parse / bind messages with regular queries. That would require a change in the FE/BE protocol, right?

The branch qualifier and global transaction id structure comes from the OSI CCR specification. Anyone here that knows more about OSI CCR?

- Heikki

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to