Thread: 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... Best regards, Vidas
----- 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