On 23-12-2014 18:25, Hugo Eyng [email protected] [firebird-support] wrote:
> In FB 3.0.0 I received the error message: Name longer than database
> column size.
>
> SELECT I.CD_TIPO_MOVIMENTO_ESTOQUE *AS* CD_TIPO_MOVIMENTO_ESTOQUE_COMPRA
> FROM MyTable
>
> CD_TIPO_MOVIMENTO_ESTOQUE_COMPRA (31 characters large)

32 characters

> Ok. I Understood the message. My column has more than 30 characters.

More than 31

> But, in FB 2.5 , a column larger than 30 characters was truncated or
> replaced by a number
> at the end of the column name.
> CD_TIPO_MOVIMENTO_ESTOQUE_COMPRA ->CD_TIPO_MOVIMENTO_ESTOQUE_COMPR
> or
> CD_TIPO_MOVIMENTO_ESTOQUE_COMPRA -> CD_TIPO_MOVIMENTO_ESTOQUE_COMP1
> to avoid duplication field.

Firebird 2.5 silently **truncates** the column name to the first 31 
characters (tested with 2.5.3 Update 1). It doesn't apply a numbered 
alias if there are multiple columns that truncate to the same name: you 
simply get multiple columns with the same alias.

I would consider that a really big bug. A lot of applications expect 
that the alias that is used in the query is also the alias that is to be 
used for obtaining the value from the result set. Renaming columns 
breaks those applications (either hard because of errors, or worse 
silently because you get the wrong value (from the wrong column)).

> Is there some kind of setting that cause FB 3.0.0 acting like FB 2.5 in
> this situation?

Not that I know of.

Mark
-- 
Mark Rotteveel


------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to