Re: patch (for 9.1) string functions - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: patch (for 9.1) string functions
Date
Msg-id AANLkTi=h2wGYM1y6D8_7HX=tugtKaFasg6=gDnWBKpaZ@mail.gmail.com
Whole thread Raw
In response to Re: patch (for 9.1) string functions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: patch (for 9.1) string functions
Re: patch (for 9.1) string functions
List pgsql-hackers
On Mon, Jul 26, 2010 at 8:02 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> Regardless of where this function ends up, the concat_ws documentation
> should contain some mention of the fact that "ws" is intended to mean
> "with separator",

big +1 on that -- I've been loosely following the thread and I had
assumed 'ws' meant 'wide string' all this time :-).

> Come to think of it, have we checked that the behavior of LEFT, RIGHT,
> REVERSE, etc. is the same on other DBs, especially as far as nulls,
> empty strings, too-large or negative subscripts, etc is concerned?

Probably 'standard' behavior wrt null would be to be strict; return
null if any argument is null.  The proposed behavior seems ok though.

> CONCAT('foo', NULL) => 'foo' really the behavior that everyone else
> implements here?  And why does CONCAT() take a variadic "ANY"
> argument?  Shouldn't that be variadic TEXT?

What does that accomplish, besides forcing you to sprinkle every
concat call with text casts (maybe that's not a bad thing?)?

merlin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: dynamically allocating chunks from shared memory
Next
From: Pavel Stehule
Date:
Subject: Re: patch (for 9.1) string functions