Problems with PL/PGSQL - functions - Mailing list pgsql-sql

From Unnikrishnan Menon
Subject Problems with PL/PGSQL - functions
Date
Msg-id 008801c19c3f$d588ce70$e90aa8c0@UNNIKRISHNAN
Whole thread Raw
Responses Re: Problems with PL/PGSQL - functions
Re: Problems with PL/PGSQL - functions
List 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
 
 
 

pgsql-sql by date:

Previous
From: Murray Prior Hobbs
Date:
Subject: Re: triggered data change violation
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Problems with PL/PGSQL - functions