StartupPacket

From: "M(dot) Bastin" <marcbastin(at)mindspring(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: StartupPacket
Date: 2003-04-25 17:59:16
Message-ID: a05210602bacf25880a88@[192.168.0.14]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

(I've sent this message before with a wrong subject, but in this one
I've added some questions and remarks that weren't in the other.)

I'm trying to write my own frontend. I found the info below (thanks
Tom) about the StartupPacket.

1. For pgsql 7.3.2, what should the protocol version number be?

2. Also, what exactly is a limstring? (I'm not using C, but a
language called REALbasic.) Is this a string of exactly 64 (or 32)
bits? Must it be null terminated? Must empty space be filled with
zeros? etc?

3. What could 'Any additional command line arguments' be? Which
arguments could be valid at this stage?

4. The spec below says the total size of the packet should be 296
bytes, yet, when I add the individual bits up of each part (32 + 32 +
64 + 32 + 64 + 64 + 64 = 352 bits = 44 bytes), there's no way I can
abtain 296 bytes (or even bits, in case of a typo). What am I not
understanding?
Mmmmmh, unless the LIMSTRINGs are expressed in bytes and the INTs in
bits... I think I get it.

Thanks,

Marc

> StartupPacket (F)
> Int32(296) - The size of the packet in bytes.
> Int32 - The protocol version number. The most significant 16
> bits are the major version number. The least 16 significant bits are
> the minor version number.
> LimString64 - The database name, defaults to the user name if
> empty.
> LimString32 - The user name.
> LimString64 - Any additional command line arguments to be passed to
> the backend child process by the server.
> LimString64 - Unused.
> LimString64 - The optional tty the backend should use for debugging
> messages. (Currently, this field is unsupported and ignored.)

Browse pgsql-novice by date

  From Date Subject
Next Message M. Bastin 2003-04-25 18:46:50 StartupPacket
Previous Message Danny Stewart 2003-04-25 16:26:18 SELECT using RegEx inside a POSITION function