Re: Create table doesn't work in plpgsql

From: Volker Paul <vpaul(at)dohle(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Create table doesn't work in plpgsql
Date: 2000-12-21 10:51:38
Message-ID: 3A41E0BA.FBEDF52F@dohle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Volker Paul 2000-12-21 11:01:57 Re: Invoice number
Previous Message Kaare Rasmussen 2000-12-21 10:10:00 Invoice number