Re: Rule Error - Mailing list pgsql-sql

From Hengky Lie
Subject Re: Rule Error
Date
Msg-id 005a01c806e2$a30f3ec0$6f00a8c0@hengky
Whole thread Raw
In response to Rule Error  ("Hengky Lie" <hengkyliwandouw@gmail.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: What SQL is running against my DB?
Next
From: "A. Kretschmer"
Date:
Subject: Re: Rule Error