Need help with decoding of sql array from WAL files version 7.4.17 - Mailing list pgsql-hackers

From Andrey Stoev
Subject Need help with decoding of sql array from WAL files version 7.4.17
Date
Msg-id 20080207122047.5450D1CD0004@simrevolution.webscience.it
Whole thread Raw
List pgsql-hackers
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I need to restore two records from a lost transaction and I am having only the WAL file, managed by
Postgresql7.4.17. The structure of records is:</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> * Record 1: varchar(400)[] with exact 191 elements, where al least 185 elements are just “*” and at
most6 are string with length>1. Like this {first string,*,*,*,*,*,second string,…}</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> * 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,…}</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Can anybody give me more information about the implementation of SQL arrays like:</span></font><p
class="MsoNormal"style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">1)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">hexmarkers for the beginning, length, or ending of the array</span></font><p
class="MsoNormal"style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">2)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">wayof encoding strings inside the array</span></font><p class="MsoNormal"
style="margin-left:.5in;text-indent:-.25in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">3)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">someidea in which interval should be the size of the encoded array. Should
becorrect if I say that my first record is more than 191 bytes or not?</span></font><p class="MsoNormal"
style="margin-left:.5in;text-indent:-.25in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">4)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">particulardocumentation for sql array encoding in the 7.4.17
implementation</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">10x in advance for any answer!</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">---</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Andrew</span></font></div>

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: [BUGS] possible bug windows setup
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: PostgreSQL 8.4 development plan