Re: Rule Error

From: "Hengky Lie" <hengkyliwandouw(at)gmail(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Rule Error
Date: 2007-10-04 23:59:39
Message-ID: 005a01c806e2$a30f3ec0$6f00a8c0@hengky
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org [mailto:pgsql-sql-owner(at)postgresql(dot)org]
On Behalf Of A. Kretschmer
Sent: 04 Oktober 2007 21:00
To: pgsql-sql(at)postgresql(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2007-10-05 04:56:37 Re: Rule Error
Previous Message Andreas Kretschmer 2007-10-04 18:18:05 Re: What SQL is running against my DB?