ecpg "problem" ...

From: "Marc G(dot) Fournier" <scrappy(at)hub(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ecpg "problem" ...
Date: 2002-11-12 18:58:17
Message-ID: 20021112145704.Q20557-100000@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

if (ic_flag == 1) {
/*only select those non-IC/Spyder nodes that has full update set*/
EXEC SQL DECLARE full_dyn_node CURSOR FOR
SELECT node_name FROM NODE
WHERE dynamic_community = 'f' AND ic_flag='n' AND machine_type!=22
AND node_id != 0 AND NODE_NAME != :nodename;
}
else{
EXEC SQL DECLARE full_dyn_node CURSOR FOR
SELECT node_name FROM NODE
WHERE dynamic_community = 'f'
AND node_id != 0 AND NODE_NAME != :nodename; (line#493)
}

the above code generates the following error:

The compiler complains:
../subapi.pgc:493: ERROR: cursor full_dyn_node already defined

since its envelop'd in an if/else clause, shouldn't it work?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2002-11-12 19:13:09 Re: Inconsistent or incomplete behavior obverse in where
Previous Message Paul Ogden 2002-11-12 18:52:20 Re: Inconsistent or incomplete behavior obverse in where