Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 0D860475A49 for ; Mon, 25 Mar 2002 02:45:25 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g2P7j9S17457; Mon, 25 Mar 2002 02:45:09 -0500 (EST) To: "jack" Cc: pgsql-sql@postgresql.org Subject: Re: About EXECUTE in pl/pgsql In-reply-to: <003401c1d3af$17bf8710$1400a8c0@jac> References: <003401c1d3af$17bf8710$1400a8c0@jac> Comments: In-reply-to "jack" message dated "Mon, 25 Mar 2002 13:42:22 +1000" Date: Mon, 25 Mar 2002 02:45:09 -0500 Message-ID: <17454.1017042309@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200203/307 X-Sequence-Number: 7186 "jack" writes: > I do following in pl/pgsql. (st1 has been set to "LIKE 'abc%' ") > EXECUTE > ''CREATE TEMP TABLE comuser AS '' || > ''SELECT * FROM comt_user1 WHERE username ''||St1|| > ''ORDER BY username;''; > I've got "ERROR: EXECUTE ..SELECT INTO hasn't impletmented", How can?? Ooops :-(. That check was intended to prevent SELECT ... INTO table from being used in EXECUTE, mainly because of the confusion factor (SELECT INTO in plpgsql doesn't mean what it means in SQL, but the SQL interpretation is what you'd get from EXECUTE). However, the check wasn't intended to trigger on CREATE AS. I've stuck a quick fix into the current sources. Should be in 7.2.1. regards, tom lane