Re: unplanned sub-select error?

From: Kyle Bateman <kyle(at)actarg(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: unplanned sub-select error?
Date: 2005-11-22 20:24:59
Message-ID: 43837E9B.20306@actarg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Tom Lane wrote:

>Kyle Bateman <kyle(at)actarg(dot)com> writes:
>
>
>>I have a query:
>>insert into mtr_reg_v_wt (ropnum, inum, pnum, rquant, value, status,
>>ddate, fr_proj, to_proj) values (28985,1,1014,1,(select cost from
>>prd_part where pnum = 1014),'work','2005-Nov-15',50,75);
>>
>>
>
>
>
>>That used to work fine under 7.1.3 but now gives the error:
>>
>>
>
>
>
>>ERROR: cannot handle unplanned sub-select
>>
>>
>
>You need to offer a little more context, like what PG version you are
>using now and what is the underlying DDL --- I suspect some rules or
>views are involved here, but you didn't show them to us.
>
>
>
Sorry, you're right. I have now confirmed that this only happens when
updating via a view/rule (as you suspected). Attached is a minimalist
sql file that demonstrates the same error message from a blank
database. I'm using 8.1.0. I'm pretty sure this problem did not exist
on 8.0.3.

Kyle

Attachment Content-Type Size
testmtr.sql text/x-sql 745 bytes

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Luca Pireddu 2005-11-23 00:08:09 argument type problem with plpgsql function
Previous Message Tom Lane 2005-11-22 19:47:22 Re: unplanned sub-select error?