Re: Rule Error

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Rule Error
Date: 2007-10-04 13:00:11
Message-ID: 20071004130011.GH15428@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

  • Rule Error at 2007-10-04 11:22:32 from Hengky Lie

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Shane Ambler 2007-10-04 14:25:14 Re: Why does the sequence skip a number with generate_series?
Previous Message Bart Degryse 2007-10-04 12:57:03 Re: Rule Error