Professional Web Applications Themes

What is the format of 'binary' data in the postgresql client/server protocol version 3 - PostgreSQL / PGSQL

Guys, I am in the middle of implementing postgresql's client server protocol and I have run into a little issue. The spec says that in general data can be of two types, 'text' and 'binary'. The text one is generally pretty simple to figure out. However, there doesn't seem to be any area of the docs that details format for 'binary' data. For example, how do you serialize a float? How about an decimal type?, etc. I hope my question is clear and I look forward to your responses. Thanks, Eric -- I'm a programmer, I don't have to spell ...

  1. #1

    Default What is the format of 'binary' data in the postgresql client/server protocol version 3

    Guys,

    I am in the middle of implementing postgresql's client server
    protocol and I have run into a little issue. The spec says that in
    general data can be of two types, 'text' and 'binary'. The text one is
    generally pretty simple to figure out. However, there doesn't seem to
    be any area of the docs that details format for 'binary' data. For
    example, how do you serialize a float? How about an decimal type?,
    etc.

    I hope my question is clear and I look forward to your responses.

    Thanks,
    Eric
    --
    I'm a programmer, I don't have to spell correctly; I just have to
    spell consistently

    ---------------------------(end of broadcast)---------------------------
    TIP 8: explain yze is your friend

    Eric Merritt Guest

  2. #2

    Default Re: What is the format of 'binary' data in the postgresql client/server protocol version 3

    Eric Merritt <cyberlync> writes:
    > I am in the middle of implementing postgresql's client server
    > protocol and I have run into a little issue. The spec says that in
    > general data can be of two types, 'text' and 'binary'. The text one is
    > generally pretty simple to figure out. However, there doesn't seem to
    > be any area of the docs that details format for 'binary' data.
    Generally you have to look at the send/recv routines for the specific
    data type that you are wondering about. Sooner or later the comments on
    those routines should be transposed into the SGML doentation, but it
    hasn't happened yet.

    (There's still a strong streak of "use the source, Luke" in this
    community, if you hadn't noticed...)

    regards, tom lane

    ---------------------------(end of broadcast)---------------------------
    TIP 6: Have you searched our list archives?

    [url]http://archives.postgresql.org[/url]

    Tom Lane Guest

  3. #3

    Default Re: What is the format of 'binary' data in the postgresql client/server protocol version 3

    On Mon, 24 Jan 2005 18:54:01 -0500, Tom Lane <tglsss.pgh.pa.us> wrote:
    > Eric Merritt <cyberlync> writes:
    > > I am in the middle of implementing postgresql's client server
    > > protocol and I have run into a little issue. The spec says that in
    > > general data can be of two types, 'text' and 'binary'. The text one is
    > > generally pretty simple to figure out. However, there doesn't seem to
    > > be any area of the docs that details format for 'binary' data.
    >
    > Generally you have to look at the send/recv routines for the specific
    > data type that you are wondering about.
    Ik, ok I can do that. Any pointers to the particular sourcefile these
    are implemented in?
    > Sooner or later the comments on
    > those routines should be transposed into the SGML doentation, but it
    > hasn't happened yet.
    >
    > (There's still a strong streak of "use the source, Luke" in this
    > community, if you hadn't noticed...)
    Yea, but its all C and C hurts my eyes. ;)

    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

    Eric Merritt Guest

  4. #4

    Default Re: What is the format of 'binary' data in the postgresql client/server protocol version 3

    Eric Merritt <cyberlync> writes:
    > On Mon, 24 Jan 2005 18:54:01 -0500, Tom Lane <tglsss.pgh.pa.us> wrote:
    >> Generally you have to look at the send/recv routines for the specific
    >> data type that you are wondering about.
    > Ik, ok I can do that. Any pointers to the particular sourcefile these
    > are implemented in?
    They're pretty much all under src/backend/utils/adt/

    regards, tom lane

    ---------------------------(end of broadcast)---------------------------
    TIP 6: Have you searched our list archives?

    [url]http://archives.postgresql.org[/url]

    Tom Lane Guest

  5. #5

    Default Re: What is the format of 'binary' data in the postgresql client/server protocol version 3

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    O, I C -- and agree!

    Unfortunately, though, I don't see many people jumping at the chance to
    translate all of this open source code into a more readable language
    (such as Pascal or Ada).

    And I haven't found (or written) that English compiler I've been
    wanting yet.... although some of the Xtalk languages (HyperTalk,
    Transcript, etc.) get rather close sometimes, depending on what you are
    trying to do.

    Hmm... Actually, now that I google it again:

    [url]http://www.iagora.com/~espel/pleng[/url]


    On Jan 24, 2005, at 7:41 PM, Eric Merritt wrote:
    >>
    >> (There's still a strong streak of "use the source, Luke" in this
    >> community, if you hadn't noticed...)
    >
    > Yea, but its all C and C hurts my eyes. ;)
    >
    > ---------------------------(end of
    > broadcast)---------------------------
    > TIP 4: Don't 'kill -9' the postmaster
    >
    >
    - -----------------------------------------------------------
    Frank D. Engel, Jr. <fde101fjrhome.net>

    $ ln -s /usr/share/kjvbible /usr/manual
    $ true | cat /usr/manual | grep "John 3:16"
    John 3:16 For God so loved the world, that he gave his only begotten
    Son, that whosoever believeth in him should not perish, but have
    everlasting life.
    $
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (Darwin)

    iD8DBQFB9mE57aqtWrR9cZoRAsPyAJ9LOY4Wg6RDfT8P7365Zo 4Kj8V+QACfej/t
    fHowlts3f4OQ7vuSJefUF10=
    =ioBA
    -----END PGP SIGNATURE-----



    __________________________________________________ _________
    $0 Web Hosting with up to 120MB web space, 1000 MB Transfer
    10 Personalized POP and Web E-mail Accounts, and much more.
    Signup at [url]www.doteasy.com[/url]


    ---------------------------(end of broadcast)---------------------------
    TIP 7: don't forget to increase your free space map settings

    Frank D. Engel, Jr. Guest

Similar Threads

  1. Replies: 1
    Last Post: January 7th, 07:37 PM
  2. Replies: 0
    Last Post: February 16th, 11:16 PM
  3. Server vs Client data handling
    By Bruce A. Julseth in forum PHP Development
    Replies: 2
    Last Post: September 12th, 12:32 AM
  4. Replies: 0
    Last Post: July 29th, 11:24 AM
  5. Replies: 0
    Last Post: July 28th, 09:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139