Results 1 to 2 of 2
  1. #1
    Join Date
    May 2005

    Unanswered: insert or update

    Hi All,
    I'm using a perl program to insert data in a table.Depending on the the values,I wish to update some records and the other records are simply inserted.
    What would be the ideal postgresql way of doing it. Can I do without using precedures?
    Thoughts on this are appreciated.

    Kaustav Ghoshal

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    It would be inefficient, but you may be able to do an insert AND an update, ignoring the inevitable errors.

    Ideally, you WOULD build a stored procedure to do it, though.
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts