Need help with decoding of sql array from WAL files version 7.4.17

From: "Andrey Stoev" <stoev(at)webscience(dot)it>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Need help with decoding of sql array from WAL files version 7.4.17
Date: 2008-02-07 12:21:05
Message-ID: 20080207122047.5450D1CD0004@simrevolution.webscience.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I need to restore two records from a lost transaction and I am having only
the WAL file, managed by Postgresql 7.4.17. The structure of records is:

* Record 1: varchar(400)[] with exact 191 elements, where al least 185
elements are just "*" and at most 6 are string with length>1. Like this
{first string,*,*,*,*,*,second string,.}

* Record 2: smallint[] with exact 191 elements, where every element is
between [-1 and 8]. Like this {-1,0,7,3,-1,-1,3,4,5,.}

Can anybody give me more information about the implementation of SQL arrays
like:

1) hex markers for the beginning, length, or ending of the array

2) way of encoding strings inside the array

3) some idea in which interval should be the size of the encoded
array. Should be correct if I say that my first record is more than 191
bytes or not?

4) particular documentation for sql array encoding in the 7.4.17
implementation

10x in advance for any answer!

---

Andrew

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2008-02-07 12:34:01 Re: PostgreSQL 8.4 development plan
Previous Message Andrew Dunstan 2008-02-07 11:32:08 Re: [HACKERS] possible bug windows setup