Skip to content

Commit e8d9443

Browse files
committed
Expression indexes can be used for computed columns
1 parent 8b77fee commit e8d9443

12 files changed

+35
-12
lines changed

src/docs/asciidoc/en/refdocs/fblangref25/_fblangref25-ddl.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,7 @@ The expression in a computed index may involve several columns in the table.
25042504

25052505
[NOTE]
25062506
====
2507-
You can actually create a computed index on a computed field, but the index will never be used.
2507+
Expression indexes can also be used as a workaround for indexing computed columns: use the name of the computed column as the expression.
25082508
====
25092509

25102510
[[fblangref25-ddl-idx-limits]]

src/docs/asciidoc/en/refdocs/fblangref25/_fblangref25-dochist.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ The exact file history is recorded in our _git_ repository; see https://github.c
1010
|===
1111
4+|Revision History
1212

13+
|1.14
14+
|TBD
15+
|MR
16+
a|* Computed columns can be indexed with expression indexes
17+
* ...
18+
1319
|1.13
1420
|26 May 2023
1521
|MR

src/docs/asciidoc/en/refdocs/fblangref25/firebird-25-language-reference.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[fblangref25]]
22
= Firebird 2.5 Language Reference
33
Dmitry Filippov; Alexander Karpeykin; Alexey Kovyazin; Dmitry Kuzmenko; Denis Simonov; Paul Vinkenoog; Dmitry Yemanov
4-
1.13, 26 May 2023
4+
1.14, TBD 2023
55
:doctype: book
66
:sectnums:
77
:sectanchors:

src/docs/asciidoc/en/refdocs/fblangref30/_fblangref30-dochist.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ The exact file history is recorded in our _git_ repository; see https://github.c
1010
|===
1111
4+|Revision History
1212

13+
|1.16
14+
|TBD
15+
|MR
16+
a|* Computed columns can be indexed with expression indexes
17+
* ...
18+
1319
|1.15
1420
|26 May 2023
1521
|MR

src/docs/asciidoc/en/refdocs/fblangref30/ddl/_fblangref30-ddl-index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ The expression in a computed index may involve several columns in the table.
113113

114114
[NOTE]
115115
====
116-
You can actually create a computed index on a computed field, but such an index will never be used.
116+
Expression indexes can also be used as a workaround for indexing computed columns: use the name of the computed column as the expression.
117117
====
118118

119119
[[fblangref30-ddl-idx-limits]]

src/docs/asciidoc/en/refdocs/fblangref30/firebird-30-language-reference.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[fblangref30]]
22
= Firebird 3.0 Language Reference
33
Dmitry Filippov; Alexander Karpeykin; Alexey Kovyazin; Dmitry Kuzmenko; Denis Simonov; Paul Vinkenoog; Dmitry Yemanov; Mark Rotteveel
4-
1.15, 26 May 2023
4+
1.16, TBD 2023
55
:doctype: book
66
:sectnums:
77
:sectanchors:

src/docs/asciidoc/en/refdocs/fblangref40/_fblangref40-dochist.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ The exact file history is recorded in our _git_ repository; see https://github.c
1010
|===
1111
4+|Revision History
1212

13+
|2.6
14+
|TBD
15+
|MR
16+
a|* Computed columns can be indexed with expression indexes
17+
* ...
18+
1319
|2.5
1420
|26 May 2023
1521
|MR

src/docs/asciidoc/en/refdocs/fblangref40/ddl/_fblangref40-ddl-index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ The expression in a computed index may involve several columns in the table.
113113

114114
[NOTE]
115115
====
116-
You can actually create a computed index on a computed field, but such an index will never be used.
116+
Expression indexes can also be used as a workaround for indexing computed columns: use the name of the computed column as the expression.
117117
====
118118

119119
[[fblangref40-ddl-idx-limits]]

src/docs/asciidoc/en/refdocs/fblangref40/firebird-40-language-reference.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[fblangref40]]
22
= Firebird 4.0 Language Reference
33
Dmitry Filippov; Alexander Karpeykin; Alexey Kovyazin; Dmitry Kuzmenko; Denis Simonov; Paul Vinkenoog; Dmitry Yemanov; Mark Rotteveel
4-
2.5, 26 May 2023
4+
2.6, TBD 2023
55
:doctype: book
66
:sectnums:
77
:sectanchors:

src/docs/asciidoc/en/refdocs/fblangref50/_fblangref50-dochist.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ The exact file history is recorded in our _git_ repository; see https://github.c
1010
|===
1111
4+|Revision History
1212

13+
|0.4
14+
|TBD
15+
|MR
16+
a|* Computed columns can be indexed with expression indexes
17+
* ...
18+
1319
|0.3
1420
|26 May 2023
1521
|MR

src/docs/asciidoc/en/refdocs/fblangref50/ddl/_fblangref50-ddl-index.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The maximum length is 63 characters
3939

4040
|col
4141
|Name of a column in the table.
42-
Columns of the types `BLOB` and `ARRAY` and computed fields cannot be used in an index
42+
Columns of the types `BLOB` and `ARRAY` and computed fields cannot be used in an index.
4343

4444
|expression
4545
|The expression that will compute the values for a computed index, also known as an "`expression index`"
@@ -55,8 +55,7 @@ An index can be built on the content of columns of any data type except for `BLO
5555
The name (identifier) of an index must be unique among all index names.
5656

5757
.Key Indexes
58-
[NOTE]
59-
====
58+
****
6059
When a primary key, foreign key or unique constraint is added to a table or column, an index with the same name is created automatically, without an explicit directive from the designer.
6160
For example, the `PK_COUNTRY` index will be created automatically when you execute and commit the following statement:
6261
@@ -65,7 +64,7 @@ For example, the `PK_COUNTRY` index will be created automatically when you execu
6564
ALTER TABLE COUNTRY ADD CONSTRAINT PK_COUNTRY
6665
PRIMARY KEY (ID);
6766
----
68-
====
67+
****
6968

7069
[[fblangref50-ddl-idx-createidx-who]]
7170
=== Who Can Create an Index?
@@ -133,7 +132,7 @@ The expression in a computed index may involve several columns in the table.
133132

134133
[NOTE]
135134
====
136-
You can create a computed index on a computed field, but such an index will never be used.
135+
Expression indexes can also be used as a workaround for indexing computed columns: use the name of the computed column as the expression.
137136
====
138137

139138
[[fblangref50-ddl-idx-limits]]

src/docs/asciidoc/en/refdocs/fblangref50/firebird-50-language-reference.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[fblangref50]]
22
= Firebird 5.0 Language Reference
33
Dmitry Filippov; Alexander Karpeykin; Alexey Kovyazin; Dmitry Kuzmenko; Denis Simonov; Paul Vinkenoog; Dmitry Yemanov; Mark Rotteveel
4-
0.3, 26 May 2023
4+
0.4, TBD 2023
55
:doctype: book
66
:sectnums:
77
:sectanchors:

0 commit comments

Comments
 (0)