Re: Porting SQL Server 2000 database to PostgreSQL - Mailing list pgsql-general

From anony@dslextreme.com (anony)
Subject Re: Porting SQL Server 2000 database to PostgreSQL
Date
Msg-id b6eacd5.0405202249.2ef97502@posting.google.com
Whole thread Raw
In response to Porting SQL Server 2000 database to PostgreSQL  (REarly@jswcoinc.com (Rod Early))
Responses Re: Porting SQL Server 2000 database to PostgreSQL
List pgsql-general
1. stored procedures are now called functions

2. unlike ms tsql, in postgres query analyzer you can't test
conditional statements and variables outside of a function. this makes
debugging really hard.

3. inside the function single quotes must be escaped because your
function is entered in as a string literal.

4. to return recordsets you must create a custom return TYPE and use a
FOR loop with %ROWTYPE to interate thru the data.

5. you can overload functions. two function with the same name but
different input fn_foo(int) OR  fn_foo(int, varchar).

6. temp tables don't work well in functions unless you make them
dynamically with execute. instead use normal tables and your pid.

favorite editor: editplus w/ psql definitions

pgsql-general by date:

Previous
From: anony@dslextreme.com (anony)
Date:
Subject: feature idea – automatic update tracking using date fields – feedback pls
Next
From: Richard Huxton
Date:
Subject: Re: Web DB Management tool