Received: from odysseus2.dohle.com (odysseus2.dohle.com [194.127.185.20]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBLAYH696487 for ; Thu, 21 Dec 2000 05:34:18 -0500 (EST) (envelope-from vpaul@dohle.com) Received: from majestix.dohle.com (majestix.dohle.com [194.127.190.1]) by odysseus2.dohle.com (8.9.3/8.9.3) with SMTP id LAA19739 for ; Thu, 21 Dec 2000 11:34:06 +0100 Received: from wpaul.dohle.com by majestix.dohle.com id aa21484; 21 Dec 100 11:34 CET Message-ID: <3A41E0BA.FBEDF52F@dohle.com> Date: Thu, 21 Dec 2000 11:51:38 +0100 From: Volker Paul Organization: Dohle Handelsgruppe Systemberatung GmbH X-Mailer: Mozilla 4.05 [en] (WinNT; I) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Create table doesn't work in plpgsql References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/246 X-Sequence-Number: 583 Hi, > I don't think you can use DDL(data definition language) in PL/SQL. > create table is not DML(data munipulation language) instead > it's a DDL. Thanks, but that leaves me with a problem. What I really want to do is something like select str from person where id=1234; where str is a string that contains an expression like famname || ', ' || givname i.e. the final select is select famname || ', ' || givname from person where id=1234; I know it's possible by building the select e.g. in bash and calling psql with it as an argument, but do you see a possibility that is closer to Postgres, e.g. in plpgsql? Volker Paul