Re: PL/pgSQL question about EXCEPTION clause & corrupt records

2020-02-14 Thread Jeremy Schneider
> On Feb 14, 2020, at 04:39, Nick Renders wrote: > > I get the following message: > > ERROR: missing chunk number 0 for toast value 8289525 in pg_toast_5572299 What version of PostgreSQL are you running? I’ve seen this a number of times the past couple years; curious if the lurking bug is

Re: PL/pgSQL question about EXCEPTION clause & corrupt records

2020-02-14 Thread Tom Lane
"Nick Renders" writes: > I thought I would write a little PL script that would loop through all > the data and report any inconsistencies. However, I can't get it to work > properly. > ... > 1) The function has no problem executing the SELECT statement. It is > only when "rcontents" is returned

Re: PL/pgSQL question about EXCEPTION clause & corrupt records

2020-02-14 Thread Achilleas Mantzios
On 14/2/20 2:39 μ.μ., Nick Renders wrote: Hello, We recently suffered a database crash which resulted in some corrupt records. I thought I would write a little PL script that would loop through all the data and report any inconsistencies. However, I can't get it to work properly. For instanc

PL/pgSQL question about EXCEPTION clause & corrupt records

2020-02-14 Thread Nick Renders
Hello, We recently suffered a database crash which resulted in some corrupt records. I thought I would write a little PL script that would loop through all the data and report any inconsistencies. However, I can't get it to work properly. For instance, if I run the following statement in