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?                                           
                                    
                                                 


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to