Re: set_config() documentation clarification - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: set_config() documentation clarification
Date
Msg-id 5FF4E320.5020407@anastigmatix.net
Whole thread Raw
In response to Re: set_config() documentation clarification  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers
On 01/05/21 16:14, Joel Jacobson wrote:
> or maybe even WITH like this:
> 
> WITH
>   year % 19 AS g ,
>   year / 100 AS c,
>   (c - c/4 - (8*c + 13)/25 + 19*g + 15) % 30 AS h,
>   h - (h/28)*(1 - (h/28)*(29/(h + 1))*((21 - g)/11)) AS i,
>   year + year/4 + i + 2 - c + c/4) % 7 AS j,
>   i - j AS p,
>   3 + (p + 26)/30 AS easter_month,
>   1 + (p + 27 + (p + 6)/40) % 31 AS easter_day
> SELECT make_date(year, easter_month, easter_day)

The standard indeed has such a syntax ... not for entirely arbitrary
variables like that (at least not that I've seen) but definitely for
lexically-scoped settings of things like XMLOPTION or XMLBINARY.

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Deleting older versions in unique indexes to avoid page splits
Next
From: Andrew Dunstan
Date:
Subject: Re: Context diffs