From: | "Zeb Fropiaz" <aik__1(at)hotmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | help with error: "... is not a column in an inserted table" |
Date: | 2002-07-27 16:59:34 |
Message-ID: | WjA09.216077$WJf1.122114@news01.bloor.is.net.cable.rogers.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I am trying to update a field of a specific tuple. 'new_cid' is a short that
has been filled with some value before the following piece of code is
reached.
EXEC SQL UPDATE myuserid.spies
SET country_id = new_cid // where country_id is the name of the field in
the schema
WHERE CURRENT OF spies_cursor;
The cursor has been declared and opened properly. But this is the error I
get:
Error: "NEW_CID" is not a column in an inserted table, updated table, or any
table identified in a FROM clause or is not a valid transition variable for
the subject table of a trigger. SQLSTATE=42703
This seems to happen everytime I want to update something. Basically, I am
unable to store a C variable in a field of a tuple. How do I do that? I
could find example of updating a tuple using one of its own fields, i.e. say
field1 is a field of some tuple of type short int, and I go "field1 = field1
* 2" -- that works! But say I have a C variable foo and I go "field1 =
foo" -- this gives me the above type of error.
What am I doing wrong? Anyone!
Thanx
From | Date | Subject | |
---|---|---|---|
Next Message | jgdon | 2002-07-27 18:02:44 | Postgres and Perl: Which DBI module? |
Previous Message | Vasco Amaral | 2002-07-27 13:44:58 | UDFs, table functions, returning rows |