Problems with PL/PGSQL - functions

Поиск
Список
Период
Сортировка
От Unnikrishnan Menon
Тема Problems with PL/PGSQL - functions
Дата
Msg-id 008801c19c3f$d588ce70$e90aa8c0@UNNIKRISHNAN
обсуждение исходный текст
Ответы Re: Problems with PL/PGSQL - functions  ("Ross J. Reedstrom" <reedstrm@rice.edu>)
Re: Problems with PL/PGSQL - functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Murray Prior Hobbs
Дата:
Сообщение: Re: triggered data change violation
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Problems with PL/PGSQL - functions