pgsql embedded again! - Mailing list pgsql-sql

From Esteban Gutierrez Abarzua
Subject pgsql embedded again!
Date
Msg-id Pine.LNX.4.21.0110221050001.3475-100000@sauce.chillan.ubiobio.cl
Whole thread Raw
Responses Re: pgsql embedded again!  (Haller Christoph <ch@rodos.fzk.de>)
List pgsql-sql
hi.
  
 
I still have the data type problem.
  
 
I am working with the postgresql system catalog and I wanna get all
  
 
relname of pg_class relation on a C variable.

   
 
-----> \d pg_class

    Attribute   |   Type    | Modifier
    
 
--------------+-----------+----------
  relname      | name      |
   reltype      | oid       |
    relowner     | integer   |
     relam        | oid       |
      .........
       ......
        .....
         ...
          ..

            
 
C program.

   
 
EXEC SQL BEGIN DECLARE SECTION;
         VARCHAR tabla[50];    I also tried with char tabla[50];
          ......
           ....
            .
      
 
EXEC SQL END DECLARE SECTION;


     I used a cursor for results.....
     
 
EXEC SQL DECLARE T99 CURSOR FOR select relname from pg_class

   now I want to get the results of query... then:

               EXEC SQL OPEN T99;
                EXEC SQL FETCH IN T99 INTO :tabla; here is the problem, I can't
       
 
to get on tabla variable results.
  
 
I think that may be the data type ..... I don't know ....


     do you know about psql embedded mail list?
                                                     
 



pgsql-sql by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: CREATE RULE ON UPDATE/DELETE
Next
From: Reiner Dassing
Date:
Subject: Index of a table is not used (in any case)