| From: | Jose Mercedes Venegas Acevedo <jvenegasperu(at)gmail(dot)com> |
|---|---|
| To: | Ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
| Subject: | Indice en campo de tipo tabla |
| Date: | 2020-08-06 16:44:09 |
| Message-ID: | CA+KjtGf80mBfNHUgQZ4wX9zEWQg7TLqBS6ZKktRnaRtP3nZ3Dg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-es-ayuda |
Buen dia a todos tengo una tabla para auditoria es esta
CREATE TABLE cat_lote_audit (
audit_id integer NOT NULL,
audit_timestamp timestamp with time zone NOT NULL,
audit_dbuser name NOT NULL,
audit_action character(1) NOT NULL,
audit_old cat_lote,
audit_new cat_lote
);
uso los campos dentro de audit_old o audit_new en consultas asi
select * from cat_lote l join cat_lote_audit la
on l.id = (audit_new).id
como podria crear un indice para alguno de los campos que estan dentro de
audit_old o audit_new
lo intente asi pero no es posible.
CREATE INDEX id_lote_audit ON cat_lote_audit((audit_new).id);
--
José Mercedes Venegas Acevedo
cel Mov RPC 964185205
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Diego | 2020-08-08 20:38:14 | Re: Indice en campo de tipo tabla |
| Previous Message | Romero, Fernando | 2020-08-06 13:21:10 | RE: Consulta valor hora |