Re: Postgres for SQL Server users - Mailing list pgsql-general

From Michel Pelletier
Subject Re: Postgres for SQL Server users
Date
Msg-id CACxu=vJO+i4NJky3UoGwK75KZ1LF24O_nfiPzdWMHojpYouQuw@mail.gmail.com
Whole thread Raw
In response to Re: Postgres for SQL Server users  (Adam Brusselback <adambrusselback@gmail.com>)
Responses Re: Postgres for SQL Server users
List pgsql-general
On Mon, May 6, 2019 at 2:49 PM Adam Brusselback <adambrusselback@gmail.com> wrote:
I think the main "gotcha" when I moved from SQL Server to Postgres was I didn't even realize the amount of in-line t-sql I would use to just get stuff done for ad-hoc analysis. Postgres doesn't have a good way to emulate this. DO blocks cannot return resultsets, so short of creating a function and dropping it, it's not possible to get the same workflow.

Just ruminating here, and this has probably already been discussed in the past, but I've always wanted something like a 'SELECT DO [LANGUAGE ...] RETURNS rettype | TABLE (...) $$ RETURN [NEXT | QUERY] ... $$; but haven't had any serious problem with creating/dropping functions like you mentioned.

-Michel
 
The lack of GUI tooling was also a huge "whoa" moment for me, which I still grapple with.

pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Postgres for SQL Server users
Next
From: Sathish Kumar
Date:
Subject: Re: Import Database