pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hengky Lie <hengkyliwandouw@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Rule Error
Date: Fri, 5 Oct 2007 07:59:39 +0800
Message-ID: <005a01c806e2$a30f3ec0$6f00a8c0@hengky> (raw)


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




view thread (6+ messages)  latest in thread

Message-ID: <005a01c806e2$a30f3ec0$6f00a8c0@hengky>
Permalink:  ../005a01c806e2$a30f3ec0$6f00a8c0@hengky/
Also on:    postgresql.org/message-id/005a01c806e2$a30f3ec0$6f00a8c0@hengky

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hengkyliwandouw@gmail.com
  Subject: Re: Rule Error
  In-Reply-To: <005a01c806e2$a30f3ec0$6f00a8c0@hengky>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox