Re: problem w/plpgsql proc - Mailing list pgsql-sql

From Josh Berkus
Subject Re: problem w/plpgsql proc
Date
Msg-id web-147888@davinci.ethosmedia.com
Whole thread Raw
In response to problem w/plpgsql proc  (leo <lmendoza@garbersoft.net>)
List pgsql-sql
Leo,

You're gonna feel like a dork when I point it out ...

> -- if the emailaddr was found, then update the record.
> -- if it wasn't, then insert the new record.
              ^^^ SINGLE QUOTE HERE!! BAD!

You can't have single quotes inside a function, especially in comments.
They will be treated as the end of the function definition string.

If you write the T-SQL Procedure ---> PostgreSQL function porting guide,
I volunteer to edit (certifiable MS SQL DBA).  You might wanna wait for
7.2, where Jan says that cursor support in PL/pgSQL functions will be
added.

-Josh




______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Attachment

pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: SQL reference card
Next
From: "Michael Richards"
Date:
Subject: When will vacuum go away?