Re: SQL SERVER migration to PostgreSql

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: SQL SERVER migration to PostgreSql
Date: 2019-11-07 15:17:22
Message-ID: 53157133-cdcd-08f4-cd04-6b94ac74ab57@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

İlyas Derse schrieb am 07.11.2019 um 14:28:
> I'm trying to migration to PostgreSql from SQL Server. I have Stored
> Procedures what have output parameters and returning tables.But you
> know what, we can not returning tables in stored procedures in
> PostgreSql and we can not use output parameters in functions in
> PostgreSql.

The correct migration path is to rewrite them to set-returning functions and use them in the FROM clause:

so instead of

sp_foobar 42;

use

select *
from fn_foobar(42);

Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jehan-Guillaume de Rorthais 2019-11-07 15:18:25 Re: logical replication - negative bitmapset member not allowed
Previous Message Adrian Klaver 2019-11-07 15:04:58 Re: broken backup trail in case of quickly patroni switchback and forth