Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/03/2011, 15:26
RayCast
 
Fecha de Ingreso: febrero-2010
Mensajes: 26
Antigüedad: 14 años, 3 meses
Puntos: 0
Pregunta Problema obteniendo nombres de columnas

Hola a todos

Estoy ejecutando un query que obtiene los nombres de las columnas de una tabla deseada, lo cual me funciona con todas las tablas menos una.

El sql que estoy utilizando es este:

select a.attname from pg_attribute a, pg_class b where b.relfilenode=a.attrelid
and b.relname = 'TABLA' and a.attname not in ('tableoid','cmax','xmax','cmin''xmin','ctid','gid ','the_geom','cmin','xmin')


Y este es el codigo de la tabla para la que no me funciona:

-- Table: f_suelos

-- DROP TABLE f_suelos;

CREATE TABLE f_suelos
(
gid integer NOT NULL DEFAULT nextval('f_suelos_temp_gid_seq'::regclass),
id integer,
tipo character varying(30),
subtipo character varying(30),
erosion character varying(30),
matorg integer,
profefect double precision,
textura character varying(30),
estructura character varying(30),
ph double precision,
pendiente smallint,
gravas double precision,
piedras double precision,
rocas double precision,
the_geom geometry,
CONSTRAINT f_suelos_temp_pkey PRIMARY KEY (gid),
CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) = 'MULTIPOLYGON'::text OR the_geom IS NULL),
CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 2085)
)
WITH (OIDS=FALSE);
ALTER TABLE f_suelos OWNER TO postgres;


Alguien sabe que pueda ser?


Gracias de antemano

Saludos, Raisel