Re: [HACKERS] Keeping CURRENT_DATE and similar constructs in original format

2016-08-16 Thread Tom Lane
Peter Eisentraut writes: > On 5/12/16 6:14 PM, Tom Lane wrote: >> So what I've wanted to do for some time is invent a new expression node >> type that represents any one of these functions and can be reverse-listed >> in the same format that the input had. The

Re: [HACKERS] Keeping CURRENT_DATE and similar constructs in original format

2016-08-04 Thread Peter Eisentraut
On 5/12/16 6:14 PM, Tom Lane wrote: > So what I've wanted to do for some time is invent a new expression node > type that represents any one of these functions and can be reverse-listed > in the same format that the input had. The attached proposed patch does > that. I was experimenting with

Re: [HACKERS] Keeping CURRENT_DATE and similar constructs in original format

2016-05-12 Thread David G. Johnston
On Thursday, May 12, 2016, Tom Lane wrote: > "David G. Johnston" > writes: > > On Thursday, May 12, 2016, Tom Lane > > ');>> > wrote: >

Re: [HACKERS] Keeping CURRENT_DATE and similar constructs in original format

2016-05-12 Thread Tom Lane
"David G. Johnston" writes: > On Thursday, May 12, 2016, Tom Lane > wrote: >> (I'm not particularly in love with the node type name >> ValueFunction; anybody got a better idea?) >

[HACKERS] Keeping CURRENT_DATE and similar constructs in original format

2016-05-12 Thread David G. Johnston
On Thursday, May 12, 2016, Tom Lane > wrote: > > So what I've wanted to do for some time is invent a new expression node > type that represents any one of these functions and can be reverse-listed > in the same format that

[HACKERS] Keeping CURRENT_DATE and similar constructs in original format

2016-05-12 Thread Tom Lane
I got annoyed again about a minor issue I've complained about before, and this time decided to do something about it. The issue is that gram.y translates a number of argument-less SQL constructs, such as CURRENT_DATE, into very implementation-specific things such as 'now'::text::date. There are