Re: Cannot insert into view without an appropriate rule (#7)

From: "Tambet Matiisen" <t(dot)matiisen(at)aprote(dot)ee>
To: "Makauskas Vidas" <vidas(at)lindra(dot)lt>, <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Cannot insert into view without an appropriate rule (#7)
Date: 2003-02-07 08:46:26
Message-ID: 005d01c2ce85$66741110$0e01a8c0@aprote.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


----- Original Message -----
From: "Makauskas Vidas" <vidas(at)lindra(dot)lt>
To: <pgsql-odbc(at)postgresql(dot)org>
Sent: Monday, February 03, 2003 6:20 PM
Subject: [ODBC] Cannot insert into view without an appropriate rule (#7)

> Hi,
> It's convenient (search, filters, sorting...) to do local forms over ODBC
> with linked tables in access. But exits incompatibility with date types:
> int8, date, time in postgres with access. I've make an attemp link tables
> via views with data conversation and do INSERT into table through CREATE
> VIEW view_table AS SELECT Fdate::timestamp, Fint8::int4 FROM table; and
get
> error 'Cannot insert into view without an appropriate rule (#7)'.
> May I ask such question without myself additional atemptions, because it's
> my first step into postgres, is it mistaken way to solve problem mentioned
> above. Or it's posible to solve problem via rules...
>

Just create insert rule for the view.
http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=rules.html

Or you could also change column types of source table and insert directly
to table. If Access sees the column as int4, you can't insert int8 into it
anyway.

Tambet

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Tambet Matiisen 2003-02-07 09:11:51 Re: record locks?
Previous Message Hiroshi Inoue 2003-02-07 04:17:44 Re: Insert with bound columns