Re: Porting SQL Server 2000 database to PostgreSQL

From: anony(at)dslextreme(dot)com (anony)
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Porting SQL Server 2000 database to PostgreSQL
Date: 2004-05-21 06:49:33
Message-ID: b6eacd5.0405202249.2ef97502@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2004-05-21 06:50:27 Re: Am I locking more than I need to?
Previous Message Mike Nolan 2004-05-21 06:14:25 Re: Data change logs