Re: [HACKERS] merging some features from plpgsql2 project - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] merging some features from plpgsql2 project
Date
Msg-id f1b3ee01-35e5-1773-962d-5da4782a24c2@BlueTreble.com
Whole thread Raw
In response to Re: [HACKERS] merging some features from plpgsql2 project  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] merging some features from plpgsql2 project  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 1/7/17 2:06 AM, Pavel Stehule wrote:
>
>     SELECT t1 := c1, t2 := c2, ...
>
> - it can be PostgreSQL specific syntax - full control over design
> - maximally robust against typo
> - long syntax, but for short syntax can be used SELECT c1,c2,c3, .. INTO
> STRICT recvar

I don't think overloading a SQL command is a good idea. We'd be in 
trouble if ANSI ever introduced :=. I think that could also conflict 
with existing operators.

> - what should be no_data_found behave?

Considering where we're at today, I don't think there should be a 
default behavior; make the user specify somehow whether missing data is 
allowed or not.

> I have nothing about a cost of "new syntax" implementation - but for  me
> - it looks like good solution for us - it can be win/win solution. It
> breaks nothing - it introduce nice to have typo robust syntax.

Related to that, I suspect we could add better support to existing 
commands for at least some of these things. For example, SELECT ... INTO 
NOMULTI (instead of STRICT) to indicate that multiple rows are an error 
but missing data is OK.
-- 
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)



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [HACKERS] merging some features from plpgsql2 project
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] merging some features from plpgsql2 project