From: | "Unnikrishnan Menon" <unnikrishnan(dot)menon(at)chennai(dot)transys(dot)net> |
---|---|
To: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Problems with PL/PGSQL - functions |
Date: | 2002-01-13 14:37:27 |
Message-ID: | 008801c19c3f$d588ce70$e90aa8c0@UNNIKRISHNAN |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Ross J. Reedstrom | 2002-01-13 16:19:31 | Re: Problems with PL/PGSQL - functions |
Previous Message | elisabeth maniez | 2002-01-13 08:23:16 | Re: create table with multiple unique fields |