Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computed by columns and position function [CORE4074] #4402

Closed
firebird-automations opened this issue Apr 5, 2013 · 4 comments
Closed

Computed by columns and position function [CORE4074] #4402

firebird-automations opened this issue Apr 5, 2013 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Fabio Schunig (fschunig)

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.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

This seems to be caused by absense of yyReducePosn, as the problem does not reproduce in trunk.

Unfortunately, the change is not something which seems doable for 2.5.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment