Skip to content

Problem doing Upsert in version 0.5.4 #59

Closed
@jribeiro

Description

@jribeiro

Hi there! Congrats on the excelent job!

I'm trying to do an upsert using node-postgres. The logic I was trying to implement was if an update returned error it should do the insert.

Both updates and inserts work but the code always executes both because the update statement returns the same values for success and error.

Have anyone tried this? Can anyone give a help please?

You can find full details (code + debug) here:
http://stackoverflow.com/questions/7910174/upsert-in-postgres-using-node-js

Thanks and congrats

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions