Re: Description on bind message - Mailing list pgsql-hackers

From Marko Tiikkaja
Subject Re: Description on bind message
Date
Msg-id 525D062E.1030807@joh.to
Whole thread Raw
In response to Description on bind message  (Tatsuo Ishii <ishii@postgresql.org>)
Responses Re: Description on bind message  (Tatsuo Ishii <ishii@postgresql.org>)
List pgsql-hackers
On 10/15/13 11:02 AM, Tatsuo Ishii wrote:
> In manual of "48.5. Message Formats" section, there is a description
> of "Bind" message.
>
> Int16[C]
>      The parameter format codes. Each must presently be zero (text) or one (binary).
>
> This could be completely non-existent field in the current
> implementation of PostgreSQL. I think the fact is not very clear from
> the description. It would be nice the description is something like:
>
> Int16[C]
>      The parameter format codes. Each must presently be zero (text) or one (binary).
>     This field does not exist if the number of prameter values is 0.

This is already explicitly said in the description of the previous field:

"The number of parameter format codes that follow (denoted C below). 
This can be zero to indicate that there are no parameters or that the 
parameters all use the default format (text); or one, in which case the 
specified format code is applied to all parameters; or it can equal the 
actual number of parameters."

Also the documentation for the array notation explains this: "An array 
of k n-bit integers, each in network byte order. The array length k is 
always determined by an earlier field in the message. Eg. Int16[M].".

This part seems clear enough to me, and I don't think repeating that 
*three times* is necessary.  We already say it twice.


Regards,
Marko Tiikkaja



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Description on bind message
Next
From: Tatsuo Ishii
Date:
Subject: Re: Description on bind message