Computed by columns and position function -----------------------------------------
Key: CORE-4074 URL: http://tracker.firebirdsql.org/browse/CORE-4074 Project: Firebird Core Issue Type: Bug Components: API / Client Library, Engine, Scripts Affects Versions: 2.5.1 Environment: Tested on MS Windows Reporter: Fabio Schunig Priority: Minor It seems a bug on columns "computed by" and "generated always as". When I use the function POSITION in these columns, Firebird includes the next columns inside the expression. And, if the next field has a default value, it changes to a parenthesis. Example to clarify: CREATE TABLE TABELA1 ( NOME_COMPLETO COMPUTED BY ('Fabio ' || POSITION('X','Schunig')), TESTE NUMERIC(8,2) DEFAULT 0 ); With this command, the default value of "TESTE" changes from "0" to ")". Besides, the column "NOME_COMPLETO" includes the following text in its expression. - Example of show table in iSQL: SQL> SHOW TABLE TABELA1; NOME_COMPLETO Computed by: ('Fabio ' || POSITION('X','Schunig')), TESTE NUMERIC(8,2) DEFAULT 0 ) TESTE NUMERIC(8, 2) Nullable ) - Example of DDL extraction in IBExpert: CREATE TABLE TABELA1 ( NOME_COMPLETO COMPUTED BY ('Fabio ' || POSITION('X','Schunig')), TESTE NUMERIC(8,2) DEFAULT 0 ), TESTE NUMERIC(8,2) ) ); In my tests, this doesn't occurs if I didn't use the POSITION function. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel