Search Postgresql Archives

Re: Porting SQL Server 2000 database to PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux