Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: [OT] SQL "on duplicate key" custom action

by Corion (Patriarch)
on Oct 21, 2019 at 07:36 UTC ( [id://11107748]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    create or replace function skip_insert() returns trigger language plpg
    +sql as $$
    begin
    ...
        WHEN old.PriKey = new.PriKey and (old.Foo!=new.Foo or old.Bar!=new
    +.Bar)
        FOR EACH ROW
        EXECUTE PROCEDURE raise_exception()
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11107748]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 06:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found