in reply to deleting using DBI from a PostgreSQL table

I see that your SQL is incorrect, you are using the syntax for INSERT to do DELETE. The SQL for DELETE should be:

"DELETE FROM $dtable WHERE pubmed_ui = ?"


Just a piece of information that Oracle has an excellent online SQL reference on the OTN (oracle tech network) site. You need to sign up as a member to access the reference, but the sign up is free (and you get two free CD's of the latest Oracle database release).

I know you are not using Oracle, but its SQL reference is really good.


Update: Crossed-out comment on the choice of online SQL reference.

Replies are listed 'Best First'.
Re: Re: deleting using DBI from PostgresSQL table
by iburrell (Chaplain) on Nov 08, 2003 at 00:53 UTC
    PostgreSQL has online documentaion at http://www.postgresql.org/docs/.
      Thanks for the reponses. I should have RTFM a little more closely because indeed my sql syntax was for an insert, not a delte.
      Ummm, I had a look at the documentation of postgresSQL you mentioned, the quality of the SQL documentation doesn't even come close to the Oracle SQL documentation though. I was merely giving a good doco site for SQL language. Postgres, Oracle or not. :-)

        I would definitely recommend against using Oracle documentation when your RDBMS is PostgreSQL. I have a book that covers both (as well as MySQL and a fourth option), and even though I primarily use MySQL, I've noticed just from a casual perusal of the book that there are significant differences between the Oracle and PostgreSQL implementations, neither of which seems to adhere to the SQL99 standard at all closely. (Not that the other alternatives adhere to it any better... standardised SQL seems to be a chimera.) My advice is to use documentation intended for the specific RDBMS that you are using. The book that I have (SQL in a Nutshell) is pretty decent IMO, if you're looking for dead-tree documentation. You can see my review of it on Amazon. Or you can use online documentation, or a different book, or whatever, but use documentation that's intended to be used with PostgreSQL, if you're using PostgreSQL. Oracle has differences in many places. For example, in such a commonly used query as INSERT, Oracle has some features that PostgreSQL does not (e.g., partition names), but it also lacks an option (DEFAULT VALUES). Don't confuse yourself: stick with documentation for the RDBMS you are actually using.


        $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
        I wouldn't call oracle's docs really "quality". Sure, there's a LOT of info, but it's presented in a rather disorganized manner. I've found that to get any real info, I have to use the PG docs and Oracle's docs together. I really should just buy a book.