How can I make sure that DELETE SQL statement in Postgres using PHP was successfull?
===

Is there a **function** which would return true of false based on if the DELETE SQL statement succeded or not? For example something like this:

    <?php
        $sql = "DELETE FROM table WHERE id=123";
        $result = pg_query($sql);

        if **function**($result)
            return true;
        else
            return false;
    ?>

Further more, is there maybe a function which returns the number of successfully deleted rows?