Re: Cannot insert into view without an appropriate rule (#7) - Mailing list pgsql-odbc

From Tambet Matiisen
Subject Re: Cannot insert into view without an appropriate rule (#7)
Date
Msg-id 005d01c2ce85$66741110$0e01a8c0@aprote.com
Whole thread Raw
In response to Cannot insert into view without an appropriate rule (#7)  ("Makauskas Vidas" <vidas@lindra.lt>)
List pgsql-odbc
----- Original Message -----
From: "Makauskas Vidas" <vidas@lindra.lt>
To: <pgsql-odbc@postgresql.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


pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Insert with bound columns
Next
From: "Tambet Matiisen"
Date:
Subject: Re: record locks?