dbTalk Databases Forums  

[BUGS] BUG: PLPGSQL function causes PgSQL process to die when inserting into a view

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG: PLPGSQL function causes PgSQL process to die when inserting into a view in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Christopher Travers
 
Posts: n/a

Default [BUGS] BUG: PLPGSQL function causes PgSQL process to die when inserting into a view - 10-23-2003 , 09:21 AM






Hi all;

I have two tables which have different security considerations wrapped into
a view. Inserting into the view is done using a simple rule which inserts
into both tables (tables have a 1:1 relationship and reflect the
user-defined and admin-defined portions of a user profile). From psql,
inserts into the table work as expected. However from a PLPGSQL function,
any attempt to insert into the table causes the following error:

FATAL: SPI: improper call to spi_dest_setup

The query is a simple insert and the rule merely splits it into two inserts.

The workaround is simply to insert into both tables in the view
independently within the plpgsql function. But this seems like odd behavior
that should not be occurring.

Best Wishes,
Chris Travers

__________________________________________________ _______________
Never get a busy signal because you are always connected with high-speed
Internet access. Click here to comparison-shop providers.
https://broadband.msn.com


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.