Keep exec_simple_check_plan() from thinking "SELECT foo INTO bar" is simple.
Keep exec_simple_check_plan() from thinking "SELECT foo INTO bar" is simple.

It's not clear if this situation can occur in plpgsql other than via the
EXECUTE USING case Heikki illustrated, which I will shortly close off.
However, ignoring the intoClause if it's there is surely wrong, so let's
patch it for safety.

Backpatch to 8.3, which is as far back as this code has a PlannedStmt
to deal with.  There might be another way to make an equivalent test
before that, but since this is just preventing hypothetical bugs,
I'm not going to obsess about it.

jmcatamney/gpdb,pavanvd/postgres-xl,tpostgres-projects/tPostgres,oberstet/postgres-xl,50wu/gpdb,oberstet/postgres-xl,Postgres-XL/Postgres-XL,zeroae/postgres-xl,postmind-net/postgres-xl,xinzweb/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,Postgres-XL/Postgres-XL,lisakowen/gpdb,50wu/gpdb,greenplum-db/gpdb,xinzweb/gpdb,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,greenplum-db/gpdb,techdragon/Postgres-XL,kmjungersen/PostgresXL,oberstet/postgres-xl,postmind-net/postgres-xl,adam8157/gpdb,50wu/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,snaga/postgres-xl,techdragon/Postgres-XL,adam8157/gpdb,arcivanov/postgres-xl,jmcatamney/gpdb,xinzweb/gpdb,50wu/gpdb,adam8157/gpdb,ashwinstar/gpdb,adam8157/gpdb,greenplum-db/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,oberstet/postgres-xl,arcivanov/postgres-xl,techdragon/Postgres-XL,jmcatamney/gpdb,pavanvd/postgres-xl,pavanvd/postgres-xl,zeroae/postgres-xl,ovr/postgres-xl,yazun/postgres-xl,kmjungersen/PostgresXL,ashwinstar/gpdb,postmind-net/postgres-xl,arcivanov/postgres-xl,arcivanov/postgres-xl,greenplum-db/gpdb,greenplum-db/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,lisakowen/gpdb,lisakowen/gpdb,snaga/postgres-xl,zeroae/postgres-xl,tpostgres-projects/tPostgres,zeroae/postgres-xl,snaga/postgres-xl,oberstet/postgres-xl,greenplum-db/gpdb,50wu/gpdb,adam8157/gpdb,snaga/postgres-xl,xinzweb/gpdb,adam8157/gpdb,lisakowen/gpdb,ashwinstar/gpdb,kmjungersen/PostgresXL,xinzweb/gpdb,arcivanov/postgres-xl,ashwinstar/gpdb,yazun/postgres-xl,lisakowen/gpdb,lisakowen/gpdb,snaga/postgres-xl,Postgres-XL/Postgres-XL,tpostgres-projects/tPostgres,lisakowen/gpdb,adam8157/gpdb,ovr/postgres-xl,postmind-net/postgres-xl,kmjungersen/PostgresXL,jmcatamney/gpdb,pavanvd/postgres-xl,greenplum-db/gpdb,50wu/gpdb,yazun/postgres-xl,techdragon/Postgres-XL,ovr/postgres-xl,lisakowen/gpdb,ashwinstar/gpdb,ashwinstar/gpdb,xinzweb/gpdb,ovr/postgres-xl,zeroae/postgres-xl,jmcatamney/gpdb,adam8157/gpdb,jmcatamney/gpdb,ashwinstar/gpdb,tpostgres-projects/tPostgres,yazun/postgres-xl,postmind-net/postgres-xl,ovr/postgres-xl