pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed From: J.Fernando Moyano <txinete@wanadoo.es>
To: pgsql-sql@postgresql.org
Subject: cache lookup failed ???? What is it ???!!!
Date: Fri, 22 Jun 2001 17:10:39 -0400
Message-ID: <01062217103904.27627@txino.mikasa.eh> (raw )
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I can't execute this SQL query: DELETE FROM piezas WHERE ord_mec = '01-001'
I get: ERROR: fmgr_info: function 39816: cache lookup failed
Can someone help me with this error ??
******************************************************
CREATE TABLE piezas (
n_pieza INTEGER PRIMARY KEY,
n_material INTEGER NOT NULL,
ord_mec VARCHAR(8) NOT NULL,
t_inicio TIMESTAMP DEFAULT 'invalid',
t_final TIMESTAMP DEFAULT 'invalid',
ref_eisenor VARCHAR(32),
ref_cliente VARCHAR(32),
n_plano VARCHAR(32),
n_lote VARCHAR(8),
observaciones VARCHAR(256),
FOREIGN KEY (n_material) REFERENCES materia_prima(n_material),
FOREIGN KEY (ord_mec) REFERENCES ord_mecanizado(ord_mec)
);
CREATE TABLE materia_prima (
n_material INTEGER PRIMARY KEY,
fecha DATE NOT NULL DEFAULT 'today',
n_albaran INTEGER,
n_pedido_mp INTEGER,
n_lote VARCHAR(8),
cantidad INTEGER,
usadas INTEGER DEFAULT '0' CHECK (usadas>=0 AND usadas<=cantidad),
torcidas_plano INTEGER DEFAULT '0' CHECK (torcidas_plano>=0 AND
torcidas_plano<=cantidad),
torcidas_canto INTEGER DEFAULT '0' CHECK (torcidas_canto>=0 AND
torcidas_canto<=cantidad),
dim_ancho FLOAT,
dim_alto FLOAT,
dim_largo FLOAT,
material VARCHAR(32),
pc_C FLOAT,
observaciones VARCHAR(256)
);
CREATE FUNCTION materia_prima_release_one() RETURNS OPAQUE AS '
BEGIN
UPDATE materia_prima SET usadas=usadas-1 WHERE n_material = OLD.n_material;
RETURN OLD;
END;'
LANGUAGE 'plpgsql';
CREATE TRIGGER piezas_delete AFTER DELETE ON piezas
FOR EACH ROW EXECUTE PROCEDURE materia_prima_release_one();
- --
Fernando Moyano
Frase del día:
- --------------
Si las mujeres fueran buenas, Dios tendria una.
(*) SymeX ==> http://symex.lantik.com
(*) WDBIL ==> http://wdbil.sourceforge.net
(*) Informate sobre LINUX en http://www.linux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7M7RPoZaf9MvtDvcRApqgAJ9tQjdcd6ACuvWMDrFXR2erAIlfOQCgoyBk
TJhAno7UmoZfD/CUxvnMLpM=
=HDIQ
-----END PGP SIGNATURE-----
view thread (2+ messages)
Message-ID: <01062217103904.27627@txino.mikasa.eh>
Permalink: ../01062217103904.27627@txino.mikasa.eh/
Also on: postgresql.org/message-id/01062217103904.27627@txino.mikasa.eh
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: txinete@wanadoo.es
Subject: Re: cache lookup failed ???? What is it ???!!!
In-Reply-To: <01062217103904.27627@txino.mikasa.eh>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox