From: Unnikrishnan Menon <unnikrishnan.menon@chennai.transys.net>
To: pgsql-sql@postgresql.org
Subject: Problems with PL/PGSQL - functions
Date: Sun, 13 Jan 2002 20:07:27 +0530
Message-ID: <008801c19c3f$d588ce70$e90aa8c0@UNNIKRISHNAN> (raw)
Hi,
I have a couple of problems :
1. I create a temporary table using the following method within a function:
query := ''Create table S_'' || nextval(sequence) || '' ( abc integer, xyz varchar)'';
Execute query;
This query does create a table. But when I'am unable to access the records in the table. I use the following methods:
a. Select xyz into variable from S_''|| nextval(sequence)||'' where abc = (some counter value) ;
b. query1 := '' Select xyz as variable from S_''|| nextval(sequence)||'' where abc = (some counter value) '' ;
Execute query1;
Both the queries do not give me the desired results. Could anyone suggest a way to get me the values.
2. What command or table gives the details of the constraints created other than check constraints.
3. I'am using version 7.1.3. of PostgreSQL. Any idea whether any of the upcoming versions supports the use of Execute for dynamic queries of Create table as... Select.
Any help would be appreciated.
Thanx in advance
Unni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: unnikrishnan.menon@chennai.transys.net
Subject: Re: Problems with PL/PGSQL - functions
In-Reply-To: <008801c19c3f$d588ce70$e90aa8c0@UNNIKRISHNAN>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox