Re: Press Release Draft - 2016-02-09 Cumulative Update

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Subject: Re: Press Release Draft - 2016-02-09 Cumulative Update
Date: 2017-02-08 22:16:02
Message-ID: 891336d3-cb33-eab4-0de6-140edd4f8b47@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/8/17 2:51 PM, Alvaro Herrera wrote:
>> I always have a bit of mixed feelings with these kind of string
>> manipulations on dynamic SQL.
> It may look a bit nasty, but locking tables for long periods (or being
> without an important index for a period) is much worse in production
> scenarios.

I think posting a recipe in the wiki is a great idea (especially if it
handles corner cases like constraints). I'm not so keen on trying to
code it entirely in psql though. I think it'd be a lot cleaner to have a
plpgsql function that uses format() to construct the appropriate
commands to run and then spit that out as text. Users can either cut and
paste that, or they can \gset it to a variable that they then execute,
or they can capture the output to a file which they execute.

The big advantage to this is by default you see what commands would be
run, but you can still fully automate if you want to without much extra
effort.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2017-02-08 22:21:23 Re: contrib modules and relkind check
Previous Message Jim Nasby 2017-02-08 22:07:40 Improve OR conditions on joined columns.