dynamobi/dynamobi — Issue #793: [FRG-77] Incorrect Type Derivation for String Functions
Author: dynamobi-build
Created: 2011-12-30 03:49:11+00:00
State: open
Labels: FRG, SQL Validator

[reporter="jvs", created="Fri, 17 Mar 2006 15:04:39 -0500 (GMT-05:00)"]
The following operators do not derive types correctly.

TRIM

OVERLAY

|| (concat)

In SqlValidatorTest,

trim('mustache' from 'beard') returns CHAR(5), but it should return VARCHAR(5);

see SQL99 Part 2 Section 6.18 Syntax Rule 9.c.

overlay('ABCdef' placing 'abc' from 1 for 3) returns CHAR(9) but it should

return VARCHAR(9); ibid, Syntax Rule 10.c and 4.a

'a'||'b' returns VARCHAR(2) but should return CHAR(2); see SQL99 Part 2 Section

6.27 Syntax Rule 3.a.ii

I didn't check all the other functions, but the pattern here makes me think you

might want to cross-check the standard.

------- Comment #1 From John Sichi 2005-01-26 03:04 [reply] -------

forgot to set priority/severity

------- Comment #2 From Stephan Zuercher 2005-06-01 08:49 [reply] -------

Reassign from Wael to component owner.

------- Comment #3 From John Sichi 2005-10-11 16:16 [reply] -------

These are fixed by eigenchange 4220. However, I didn't add tests, so I'm

leaving the bug open for now.