9.0.X FOR UPDATE|SHARE on Sub-Query Causes "cannot extract system attribute from virtual tuple" if Sub-Query Returns Records (BUG) - Mailing list pgsql-general

From David Johnston
Subject 9.0.X FOR UPDATE|SHARE on Sub-Query Causes "cannot extract system attribute from virtual tuple" if Sub-Query Returns Records (BUG)
Date
Msg-id 001c01cbc7ed$c3eb5eb0$4bc21c10$@yahoo.com
Whole thread Raw
Responses Re: 9.0.X FOR UPDATE|SHARE on Sub-Query Causes "cannot extract system attribute from virtual tuple" if Sub-Query Returns Records (BUG)
List pgsql-general

I actually posted a more detail posting on this issue but I have a lot of extra information that jumbles things up.

 

More simply if you run any query of the form:

 

SELECT subquerycolumn

FROM (

     SELECT subquerycolumn FROM table WHERE [condition] FOR UPDATE -- WHERE is optional but obviously useful; FOR SHARE also causes this behavior

) intermediate

 

The error “cannot extract system attribute from virtual tuple” is thrown IIF the sub-query returns one or more records.  My prior posting on this topic made it seem as if some environments worked because the query I was testing had a sub-query that was not returning any records.  I have tested on both Linux and Windows (both 64-bit) versions of 9.0.3 and get this behavior.

 

Anyway, the above query form works in both 8.2 and 8.4 but fails in 9.0.3 (at least, through probably all 9.0.X releases)

 

I’ll ask in the other thread (once it appears) for suggestions as to possible workarounds (and maybe better performing) methods to accomplish my goal but figured the simple query form shown above should readily re-produce the exception on any 9.0.X system.

 

If there is a BUG (or when one is opened) responding to this message with a BUG# would be welcomed.

 

Thanks,

 

David J

 

pgsql-general by date:

Previous
From: Albert
Date:
Subject: Recovery with WAL
Next
From: David Kerr
Date:
Subject: pg_dump: schema with OID 58698 does not exist