Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 7D0FB9FB6F9 for ; Thu, 4 Oct 2007 21:00:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 42385-07 for ; Thu, 4 Oct 2007 21:00:16 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.179]) by postgresql.org (Postfix) with ESMTP id 4095E9FB6A9 for ; Thu, 4 Oct 2007 21:00:16 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id m38so446945waf for ; Thu, 04 Oct 2007 17:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:x-mimeole:thread-index; bh=+RxVICYsNxXKHkdADFfhg2Z68FNGaPYZYuVCd84My/8=; b=N4Ogft4X5guIy7wcIW2PMQRB/dNqQJRO7YqH4L2UOhuDFgjxXxXZh2oNRLjeiEvtuybYmm2/T0YqFLDyi1D/kokmFV4tZWXljXOCdEFLSEik877gSWQdPsgVvQK8P7TBKRl88Vz7zRHddlgBF0MZ+Fhvy2TUrh2lgDIQbjz+eo0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-mailer:x-mimeole:thread-index; b=TARkAIBfuXt2qJktV8YbYf67vhnc1vNjdT7SBJbLzKD/ETFHTFr5t1I2OQCNZK1MxO5w1h3weeGpWEevOaaVzwmnxO3Xgx21oWGRno9C+4x7ynX0z9Ih/CQkRDG3YfCK6ucWu0ucul5M5dup/w3K414X0lkk2iHWZC76D1/Xj1s= Received: by 10.115.15.1 with SMTP id s1mr8531526wai.1191542414271; Thu, 04 Oct 2007 17:00:14 -0700 (PDT) Received: from hengky ( [125.162.255.170]) by mx.google.com with ESMTPS id l36sm4844969waf.2007.10.04.17.00.11 (version=SSLv3 cipher=RC4-MD5); Thu, 04 Oct 2007 17:00:13 -0700 (PDT) From: "Hengky Lie" To: Subject: Re: Rule Error Date: Fri, 5 Oct 2007 07:59:39 +0800 Message-ID: <005a01c806e2$a30f3ec0$6f00a8c0@hengky> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Thread-Index: AcgGhzM8d/WxvyXOQmG2Jh/PmxJAHQAVDNsgAAHKJuA= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/30 X-Sequence-Number: 29402 Yes, it works now ! Wow, the problem is in the field name. Changed it to lowercase solved the problem. Thank you to all ho give me this advice. But now I have another question regarding to this field, what command I can use in UPDATE RULE to make these 2 fields (KODEGL and NAMAREK) keep syncron between these 2 tables (tblmasdbt and tblmasgl) ? Thank you so much. -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of A. Kretschmer Sent: 04 Oktober 2007 21:00 To: pgsql-sql@postgresql.org Subject: Re: [SQL] Rule Error am Thu, dem 04.10.2007, um 19:22:32 +0800 mailte Hengky Lie folgendes: > CREATE RULE "rule1" AS ON INSERT TO "public"."tblmasdbt" > > DO (insert into tblmasgl (KODEGL,NAMAREK) VALUES (new.KODEGL, new.NAMAREK)); > > > > But I always get this error : > > > ERROR: column "kodegl" of relation "tblmasgl" does not exist > > > Here is the Table Structure > > CREATE TABLE "public"."tblmasgl" ( > > "KODEGL" VARCHAR(15) NOT NULL, Okay, you need to quote the column-name with " since they are in uppercase. DO (insert into tblmasgl ("KODEGL","NAMAREK") and maybe also new."KODEGL" and new."NAMAREK". Try it and tell if you have success. Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header) GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster