Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 70E5F2E01B9 for ; Tue, 4 Dec 2007 22:24:57 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 79807-02 for ; Tue, 4 Dec 2007 22:24:51 -0400 (AST) Received: from mailout04.yourhostingaccount.com (mailout04.yourhostingaccount.com [65.254.253.36]) by postgresql.org (Postfix) with ESMTP id 7F9682E01B3 for ; Tue, 4 Dec 2007 22:24:51 -0400 (AST) Received: from mailscan07.yourhostingaccount.com ([10.1.15.7] helo=mailscan07.yourhostingaccount.com) by mailout04.yourhostingaccount.com with esmtp (Exim) id 1IzjwP-0008E1-7G for pgsql-sql@postgresql.org; Tue, 04 Dec 2007 21:24:49 -0500 Received: from impout03.yourhostingaccount.com ([10.1.55.3] helo=impout03.yourhostingaccount.com) by mailscan07.yourhostingaccount.com with esmtp (Exim) id 1IzjwP-0004tc-2Q for pgsql-sql@postgresql.org; Tue, 04 Dec 2007 21:24:49 -0500 Received: from webmail11.yourhostingaccount.com ([10.1.16.11]) by impout03.yourhostingaccount.com with NO UCE id LqQo1Y0010EKF3e0000100; Tue, 04 Dec 2007 21:24:48 -0500 X-EN-OrigOutIP: 10.1.16.11 X-EN-IMPSID: LqQo1Y0010EKF3e0000100 Received: from nobody by webmail11.yourhostingaccount.com with local (Exim) id 1Izjvy-00070b-RR for pgsql-sql@postgresql.org; Tue, 04 Dec 2007 21:24:22 -0500 Received: from 222.124.95.13 (SquirrelMail authenticated user yohanes@pop.powweb.com) by email.powweb.com with HTTP; Tue, 4 Dec 2007 21:24:22 -0500 (EST) Message-ID: <1254.222.124.95.13.1196821462.squirrel@email.powweb.com> Date: Tue, 4 Dec 2007 21:24:22 -0500 (EST) Subject: Error OID From: "Yohanes Purnomo" To: pgsql-sql@postgresql.org Reply-To: yohanes@logicsoftware.info User-Agent: SquirrelMail/1.4.9a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.239 tagged_above=0 required=5 tests=BAYES_50=0.001, FUZZY_CREDIT=1.238 X-Spam-Level: * X-Archive-Number: 200712/9 X-Sequence-Number: 29701 Hi all, I have a big table: CREATE TABLE Jurnal (Rekening Char(4) NOT NULL, Debet Numeric(9) NOT NULL, Kredit Numeric(9) NOT NULL) INSERT INTO Jurnal (Rekening,Debet,Kredit) values ('0001',1,2); INSERT INTO Jurnal (Rekening,Debet,Kredit) values ('0002',3,4); I create a function: CREATE OR REPLACE FUNCTION ReProses() RETURNS BOOLEAN AS $$ DECLARE nHasil Numeric; BEGIN CREATE TEMP TABLE tmpTtlRekening WITHOUT OIDS ON COMMIT DROP AS SELECT Rekening, SUM(Debet) AS Debet, SUM(Kredit) AS Kredit FROM Jurnal GROUP BY Rekening; SELECT COALESCE(SUM(Debet - Kredit), 0) INTO nHasil FROM tmpTtlRekening; -- bla,bla RETURN '1'; END; $$ LANGUAGE 'plpgsql'; Execute Query: SELECT ReProses() Result is fine, but when i execute again SELECT ReProses() ERROR: relation with OID 41573 does not exist Can anyone help me thanks