Update of /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17868

Modified Files:
        fblangref25-commons.xml fblangref25-datatypes.xml 
        fblangref25-ddl.xml fblangref25-functions-vars.xml 
        fblangref25-structure.xml fblangref25.xml 
Log Message:
Corrections and additions from reviewers Feb/Mar 2016. Translators please pick 
up details of changes in firebird-docs.

Index: fblangref25-functions-vars.xml
===================================================================
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-functions-vars.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fblangref25-functions-vars.xml      26 Jan 2016 21:01:21 -0000      1.4
+++ fblangref25-functions-vars.xml      27 Mar 2016 21:20:48 -0000      1.5
@@ -2,7 +2,7 @@
 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "../../../../../tools/docbook-dtd/docbookx.dtd">
 <chapter id="fblangref25-functions">
-  <title>Built-in functions and variables</title>
+  <title>Built-in functions and Variables</title>
   
   <!-- Review status notice -->
   <important>

Index: fblangref25-commons.xml
===================================================================
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-commons.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fblangref25-commons.xml     2 Feb 2016 21:10:21 -0000       1.5
+++ fblangref25-commons.xml     27 Mar 2016 21:20:47 -0000      1.6
@@ -5,7 +5,8 @@
   <title>Common Language Elements</title>
   <para>    This chapter covers the elements that are common throughout the 
implementation of the
     SQL language&mdash;the <firstterm>expressions</firstterm> that are used to 
extract and operate 
-    on facts from data and the <firstterm>predicates</firstterm> that test the 
truth of those facts.</para>
+    on assertions about data and the <firstterm>predicates</firstterm> that 
test the truth of those 
+    assertions.</para>
   <section id="fblangref25-commons-expressions">
     <title>Expressions</title>
     <para>SQL expressions provide formal methods for evaluating, transforming 
and comparing
@@ -34,7 +35,10 @@
           </row>
           <row valign="middle">
             <entry align="left">Array element</entry>
-            <entry align="left">An expression may contain a reference to an 
array element</entry>
+            <entry align="left">An expression may contain a reference to an 
array member
+            i.e., <replaceable>&lt;array_name&gt;[s]</replaceable>,
+            where <replaceable>s</replaceable> is the subscript of the member 
in the array
+            <replaceable>&lt;array_name&gt;</replaceable></entry>
           </row>
           <row valign="middle">
             <entry align="left">Arithmetic operators</entry>
@@ -81,7 +85,8 @@
           </row>
           <row valign="middle">
             <entry align="left">Context variable</entry>
-            <entry align="left">An internally-defined context variable</entry>
+            <entry align="left">An internally-defined <link 
linkend="fblangref25-functions-contextvars">context 
+            variable</link></entry>
           </row>
           <row valign="middle">
             <entry align="left">Local variable</entry>
@@ -118,13 +123,13 @@
             <entry align="left">Parentheses</entry>
             <entry align="left">Bracket pairs (&hellip;) used to group 
expressions.
             Operations inside the parentheses are performed before operations 
outside them. When
-            embedded parentheses are used, the most deeply embedded 
expressions are evaluated
-            first and then the evaluations move outward through the levels of 
embedding</entry>
+            nested parentheses are used, the most deeply nested expressions 
are evaluated
+            first and then the evaluations move outward through the levels of 
nesting.</entry>
           </row>
           <row valign="middle">
             <entry align="left">COLLATE clause</entry>
-            <entry align="left">Clause applied to CHAR and VARCHAR types to 
specify the collation
-            sequence to use in string comparisons</entry>
+            <entry align="left">Clause applied to CHAR and VARCHAR types to 
specify the 
+            character-set-specific collation sequence to use in string 
comparisons</entry>
           </row>
           <row valign="middle">
             <entry align="left"><database>NEXT VALUE FOR</database> 
<replaceable>sequence</replaceable></entry>
@@ -161,6 +166,54 @@
         <para>The character set of a string constant is assumed to be the same 
as the character set of
         its destined storage.</para>
 
+
+        <section id="fblangref25-commons-hexstrings">
+          <title>String Constants in Hexadecimal Notation</title>
+          <para>From Firebird 2.5 forward, string literals can be entered in 
hexadecimal notation, 
+          so-called <quote>binary strings</quote>.  Each pair of hex digits 
defines one byte in 
+          the string. Strings entered this way will have character set 
<database>OCTETS</database> 
+          by default but the <link 
linkend="fblangref25-commons-introducer-syntax"><firstterm>introducer 
+          syntax</firstterm></link> can be used to force a string to be 
interpreted as another character set.</para>
+          <formalpara>
+            <title>Syntax</title>
+            <blockquote>
+              <literallayout class="monospaced">
+{x|X}'<replaceable>&lt;hexstring&gt;</replaceable>'
+
+  <replaceable>&lt;hexstring>&gt;</replaceable>  ::=  an even number of 
<replaceable>&lt;hexdigit&gt;</replaceable>
+  <replaceable>&lt;hexdigit&gt;</replaceable>   ::=  one of 0..9, A..F, a..f
+              </literallayout>
+            </blockquote>
+          </formalpara>
+          
+          <formalpara>
+            <title>Examples</title>
+            <programlisting>
+    select x'4E657276656E' from rdb$database
+      -- returns 4E657276656E, a 6-byte 'binary' string
+
+    select _ascii x'4E657276656E' from rdb$database
+      -- returns 'Nerven' (same string, now interpreted as ASCII text)
+
+    select _iso8859_1 x'53E46765' from rdb$database
+      -- returns 'S&auml;ge' (4 chars, 4 bytes)
+
+    select _utf8 x'53C3A46765' from rdb$database
+      -- returns 'S&auml;ge' (4 chars, 5 bytes)
+            </programlisting>
+          </formalpara>
+          <note>
+            <title>Notes</title>
+            <para>The client interface determines how binary strings are 
displayed to the user. 
+            The <emphasis>isql</emphasis> utility, for example, uses upper 
case letters A-F, while FlameRobin 
+            uses lower case letters. Other client programs may use other 
conventions, such as displaying spaces 
+            between the byte pairs: '4E 65 72 76 65 6E'.</para>
+            <para>The hexadecimal notation allows any byte value (including 
00) to be inserted at any position 
+            in the string. However, if you want to coerce it to anything other 
than OCTETS, it is your 
+            responsibility to supply the bytes in a sequence that is valid for 
the target character set.</para>
+          </note>
+        </section>
+
         <section id="fblangref25-commons-introducer-syntax">
           <title>Introducer Syntax for String Literals</title>
           <para>If necessary, a string literal may be preceded by a character 
set
@@ -178,20 +231,83 @@
 
       <section id="fblangref25-commons-number-constant">
         <title>Number Constants</title>
-        <para>A number constant is any valid number in a supported notation: 
+        <para>A number constant is any valid number in a supported notation:
           <itemizedlist>
-            <listitem>In SQL, for numbers in the standard decimal notation, 
the decimal point is 
-            always represented by period (full-stop, dot) character and 
thousands are not 
+            <listitem>In SQL, for numbers in the standard decimal notation, 
the decimal point is
+            always represented by period (full-stop, dot) character and 
thousands are not
             separated.  Inclusion of commas, blanks, etc. will cause 
errors.</listitem>
             <listitem>Exponential notation is supported.  For example, 
0.0000234 can be expressed
             as <filename>2.34e-5</filename>.</listitem>
-            <listitem>For <database>BIGINT</database> numbers, hexadecimal 
notation is supported 
-            by Firebird 2.5 and higher versions,
-            e.g., 0X080000000 as the hex representation of decimal 
2147483648.</listitem>
+            <listitem>Hexadecimal notation is supported by Firebird 2.5 and 
higher versions&mdash;see below.</listitem>
           </itemizedlist>
         </para>
-      </section>
-    </section>
+        <section id="fblangref25-commons-hexnumbers">
+          <title>Hexadecimal Notation for Numerals</title>
+          <para>From Firebird 2.5 forward, integer values can be entered in 
hexadecimal notation.
+          Numbers with 1-8 hex digits will be interpreted as type INTEGER; 
numbers with 9-16 hex digits as
+          type BIGINT.
+          <formalpara>
+            <title>Syntax</title>
+            <blockquote><literallayout class="monospaced">
+0{x|X}<replaceable>&lt;hexdigits&gt;</replaceable>
+
+  <replaceable>&lt;hexdigits&gt;</replaceable>  ::=  1-16 of 
<replaceable>&lt;hexdigit&gt;</replaceable>
+  <replaceable>&lt;hexdigit&gt;</replaceable>   ::=  one of 0..9, A..F, a..f
+            </literallayout></blockquote>
+          </formalpara>
+          <formalpara>
+            <title>Examples</title>
+            <blockquote><programlisting>
+select 0x6FAA0D3 from rdb$database           -- returns 117088467
+select 0x4F9 from rdb$database               -- returns 1273
+select 0x6E44F9A8 from rdb$database          -- returns 1850014120
+select 0x9E44F9A8 from rdb$database          -- returns -1639646808 (an 
INTEGER)
+select 0x09E44F9A8 from rdb$database         -- returns 2655320488 (a BIGINT)
+select 0x28ED678A4C987 from rdb$database     -- returns 720001751632263
+select 0xFFFFFFFFFFFFFFFF from rdb$database  -- returns -1
+            </programlisting></blockquote>
+          </formalpara>
+          </para>
+          <section id="fblangref25-commons-hexranges">
+            <title>Hexadecimal Value Ranges</title>
+            <itemizedlist>
+              <listitem>
+              Hex numbers in the range 0 .. 7FFF FFFF are positive INTEGERs 
with values between
+              0 .. 2147483647 decimal. To coerce a number to BIGINT,  prepend 
enough zeroes to bring the
+              total number of hex digits to nine or above.  That changes the 
type but not the value.</listitem>
+
+              <listitem>
+              <para>Hex numbers between 8000 0000 .. FFFF FFFF require some 
attention:
+                <itemizedlist type="circle">
+                  <listitem>When written with eight hex digits, as in 
0x9E44F9A8, a value is interpreted as
+                  32-bit INTEGER. Since the leftmost bit (sign bit) is set, it 
maps to the negative range
+                  -2147483648 .. -1 decimal.</listitem>
+                  <listitem>With one or more zeroes prepended, as in 
0x09E44F9A8, a value is interpreted
+                  as 64-bit BIGINT in the range 0000 0000 8000 0000 .. 0000 
0000 FFFF FFFF. The sign bit
+                  is not set now, so they map to the positive range 2147483648 
.. 4294967295 decimal.
+                  </listitem>
+                </itemizedlist>
+              Thus, in this range&mdash;and only in this 
range&mdash;prepending a mathematically
+              insignificant 0 results in a totally different value. This is 
something to be aware of.
+              </para>
+              </listitem>
+              <listitem>Hex numbers between 1 0000 0000 .. 7FFF FFFF FFFF FFFF 
are all positive
+              BIGINT.</listitem>
+              <listitem>Hex numbers between 8000 0000 0000 0000 .. FFFF FFFF 
FFFF FFFF are all
+              negative BIGINT.</listitem>
+              <listitem>
+                <para>A SMALLINT cannot be written in hex, strictly speaking, 
since even 0x1 is evaluated
+                as INTEGER.  However, if you write a positive integer within 
the 16-bit range 0x0000
+                (decimal zero) to 0x7FFF (decimal 32767) it will be converted 
to SMALLINT transparently.</para>
+
+                <para>It is possible to write to a negative SMALLINT in hex, 
using a 4-byte hex number within the
+                range 0xFFFF8000 (decimal -32768) to 0xFFFFFFFF (decimal 
-1).</para>
+              </listitem>
+            </itemizedlist>
+          </section><!-- hexranges -->
+        </section><!-- hexnumbers -->
+      </section><!-- number constant -->
+    </section><!-- constants -->
 
     <section id="fblangref25-commons-sqloperators">
       <title>SQL Operators</title>
@@ -516,10 +632,8 @@
           <para>The matching works identically to the &quot;=&quot; operator.  
That is,
           if &lt;test-expr&gt; is <database>NULL</database>, it does not match 
any
           &lt;expr&gt;, not even an expression that resolves to 
<database>NULL</database>.</para>
-          <para>The returned result does do not have to be a literal value: it 
might be a field
+          <para>The returned result does not have to be a literal value: it 
might be a field
           or variable name, compound expression or <database>NULL</database> 
literal.</para>
-          <para>A short form of the simple <database>CASE</database> construct 
is used in
-          the <link 
linkend="fblangref25-functions-scalarfuncs-decode"><database>DECODE</database></link>
 function.
             <formalpara>
               <title>Example</title>
               <programlisting>
@@ -535,7 +649,9 @@
       FROM PEOPLE
               </programlisting>
             </formalpara>
-          </para>
+          <para>A short form of the simple <database>CASE</database> construct 
is used in
+          the <link 
linkend="fblangref25-functions-scalarfuncs-decode"><database>DECODE</database></link>
 
+          function.</para>
         </section> <!-- Simple CASE -->
 
         <section id="fblangref25-commons-conditional-case-srched">
@@ -557,7 +673,7 @@
           clause is returned as the result. If no expressions return 
<database>TRUE</database>
           and there is no <database>ELSE</database> clause, the result will
           be <database>NULL</database>.</para>
-          <para>As with the simple <database>CASE</database> construct, the 
result must not
+          <para>As with the simple <database>CASE</database> construct, the 
result need not
           be a literal value: it might be a field or variable name, a compound 
expression, or
           be <database>NULL</database>.</para>
           <formalpara>
@@ -997,7 +1113,8 @@
           <para>The <database>CONTAINING</database> predicate searches for a 
string or a string-like
           type looking for the sequence of characters that matches its 
argument. It can be used for
           an alphanumeric (string-like) search on numbers and dates. A 
<database>CONTAINING</database>
-          search is not case-sensitive.</para>
+          search is not case-sensitive.  However, if an accent-sensitive 
collation is in use then 
+          the search will be accent-sensitive.</para>
           <para>When <database>CONTAINING</database> is used in the search 
conditions of DML queries,
           the Firebird optimizer can use an index on the searched column, if a 
suitable one exists.</para>
           <formalpara><title>Examples</title>
@@ -1108,7 +1225,7 @@
               <para>Within regular expressions, most characters represent 
themselves.
               The only exceptions are the special characters below:
                 <literallayout><command>
-       [ ] ( ) | ^ - + * % _ ? {
+       [ ] ( ) | ^ - + * % _ ? { }
                 </command></literallayout>
               ...and the escape character, if it is defined.</para>
               <para>A regular expression that contains no special or escape 
characters matches only
@@ -1163,7 +1280,7 @@
                 <title>Predefined Character Classes</title>
                 <para>The following predefined character classes can also be 
used in a class definition:
                   <formalpara><title>[:ALPHA:]</title>
-                    <para>Latin letters a..z and A..z. With an 
accent-insensitive collation, this class
+                    <para>Latin letters a..z and A..Z. With an 
accent-insensitive collation, this class
                     also matches accented forms of these characters.</para>
                   </formalpara>
 
@@ -1378,8 +1495,9 @@
       <title>Existential Predicates</title>
       <para>This group of predicates includes those that use subqueries to 
submit values for all
       kinds of assertions in search conditions. Existential predicates are so 
called because they
-      use various methods to test the existence of the value on the left side 
of the predicate in
-      the output results of subqueries on the right.</para>
+      use various methods to test for the <firstterm>existence</firstterm> or 
<firstterm>non-existence</firstterm>
+      of some assertion, returning <database>TRUE</database> if the existence 
or non-existence is
+      confirmed or <database>FALSE</database> otherwise.</para>
 
       <section id="fblangref25-commons-exists">
         <title><database>EXISTS</database></title>
@@ -1392,10 +1510,14 @@
           </programlisting>
         </formalpara>
         <para>The <database>EXISTS</database> predicate uses a subquery 
expression as its argument.
-        It evaluates it as True if the subquery result contains one or more 
rows of data; otherwise
-        it is evaluated as False. The subquery result may contain several 
columns because the values
-        are not tested: the predicate tests the fact of the existence of any 
number of matching rows
-        that is greater than none.</para>
+        It returns <database>TRUE</database> if the subquery result would 
contain at least one row; otherwise
+        it returns <database>FALSE</database>.</para>
+        <para><database>NOT EXISTS</database> returns 
<database>FALSE</database> if the subquery result would
+        contain at least one row; it returns <database>TRUE</database> 
otherwise.</para>
+        <note>
+          <para>The subquery can specify multiple columns, or <database>SELECT 
*</database>, because the
+          evaluation is made on the number of rows that match its criteria, 
not on the data. </para>
+        </note>
         <formalpara><title>Examples</title>
           <orderedlist>
             <listitem>Find those employees who have projects.

Index: fblangref25-structure.xml
===================================================================
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-structure.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fblangref25-structure.xml   2 Feb 2016 21:10:21 -0000       1.3
+++ fblangref25-structure.xml   27 Mar 2016 21:20:48 -0000      1.4
@@ -241,7 +241,7 @@
         <listitem>It may contain characters from any Latin character set, 
including a
         accented characters, spaces and special characters</listitem>
         <listitem>An identifier can be a reserved word</listitem>
-        <listitem>Delimited identifiers are always case-sensitive</listitem>
+        <listitem>Delimited identifiers are case-sensitive in all 
contexts</listitem>
         <listitem>Trailing spaces in delimited names are removed, as with any 
string constant</listitem>
         <listitem>Delimited identifiers are available in Dialect 3 only.
         For more details on dialects, see <link 
linkend="fblangref25-structure-dialects">SQL Dialect</link></listitem>
@@ -257,8 +257,9 @@
       as the regular identifiers <command>FULLNAME, fullname, 
FullName</command>, and so on.  The reason
       is that Firebird stores all regular names in upper case, regardless of 
how they were
       defined or declared. Delimited identifiers are always stored according 
to the exact case of
-      their definition or declaration.  Thus, 
<command>&quot;FullName&quot;</command> is different
-      from <command>FULLNAME</command> and, for example, 
<command>FullName</command>.</para>
+      their definition or declaration.  Thus, 
<command>&quot;FullName&quot;</command> (quoted)
+      is different from <command>FullName</command> (unquoted, i.e., regular) 
which is stored as 
+      <command>FULLNAME</command> in the metadata.</para>
     </note>
 
   </section>

Index: fblangref25-datatypes.xml
===================================================================
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-datatypes.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fblangref25-datatypes.xml   10 Sep 2015 01:37:12 -0000      1.5
+++ fblangref25-datatypes.xml   27 Mar 2016 21:20:47 -0000      1.6
@@ -172,7 +172,7 @@
     Firebird does not support an unsigned integer data type.</para>
     <section id="fblangref25-datatypes-smallint">
       <title><database>SMALLINT</database></title>
-      <para>The SMALLINT data type is for compact data storage of integer data 
for which only a narrow
+      <para>The 16-bit SMALLINT data type is for compact data storage of 
integer data for which only a narrow
       range of possible values is required for storing them.  Numbers of the 
<database>SMALLINT</database>
       type are within the range from -2<superscript>16</superscript> to 
2<superscript>16</superscript> - 1,
       that is, from -32,768 to 32,767.</para>
@@ -189,7 +189,7 @@
 
     <section id="fblangref25-datatypes-int">
       <title><database>INTEGER</database></title>
-      <para>The INTEGER data type is a 4-byte integer.  The shorthand name of 
the data type is INT.
+      <para>The INTEGER data type is a 32-bit integer.  The shorthand name of 
the data type is INT.
       Numbers of the <database>INTEGER</database>
       type are within the range from -2<superscript>32</superscript> to 
2<superscript>32</superscript> - 1,
       that is, from -2,147,483,648 to 2,147,483,647.</para>
@@ -201,7 +201,6 @@
   CUSTOMER VARCHAR(25) NOT NULL, 
   CONTACT_FIRST VARCHAR(15), 
   CONTACT_LAST VARCHAR(20),
-  CONSTRAINT INTEG_60,
   ...
     PRIMARY KEY (CUST_NO) )
         </programlisting></blockquote>
@@ -216,14 +215,22 @@
       type BIGINT.</para>
       <para>Numbers of the BIGINT type are within the range from 
-2<superscript>63</superscript>
       to 2<superscript>63</superscript> - 1, or from 
-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.</para>
-      <formalpara>
-        <title>Hexadecimal Format for BIGINT Numbers</title>
-        <para>Starting from Firebird 2.5, numbers of the BIGINT type can be 
specified in hexadecimal format
-        by means of 9 to 16 hexadecimal digits. Shorter hexadecimal numbers 
are interpreted as the
-        INTEGER data type.</para>
-       </formalpara>
+    </section>
+
+    <section>
+      <title>Hexadecimal Format for Integer Numbers</title>
+        <para>Starting from Firebird 2.5, constants of the three integer types 
can be specified in
+        hexadecimal format by means of 9 to 16 hexadecimal digits for BIGINT 
or 1 to 8 digits for
+        INTEGER. Hex representation for writing to SMALLINT is not explicitly 
supported but Firebird 
+        will transparently convert a hex number to SMALLINT if necessary, 
provided it falls within 
+        the ranges of negative and positive SMALLINT.</para>
+        
+        <para>The usage and numerical value ranges of hexadecimal notation are 
described in more detail
+        in the discussion of <link 
linkend="fblangref25-commons-number-constant">number constants</link> 
+        in the chapter entitled <citetitle>Common Language 
Elements</citetitle>.</para>
+
        <formalpara>
-         <title>BIGINT Examples</title>
+         <title>Examples Using Integer Types</title>
         <programlisting>
        CREATE TABLE WHOLELOTTARECORDS (
          ID BIGINT NOT NULL PRIMARY KEY,
@@ -245,7 +252,7 @@
         );
         </programlisting>
         <para>The hexadecimal INTEGERs in the above example are automatically 
cast to BIGINT before
-        being inserted into the table. However, this happens 
<emphasis>after</emphasis> 
+        being inserted into the table. However, this happens 
<emphasis>after</emphasis>
         the numerical value is determined, so 0x80000000 (8 digits) and 
0x080000000 (9 digits) will
         be saved as different BIGINT values.</para>
       </formalpara>
@@ -476,13 +483,16 @@
       <para>If you need to get the time-part from <database>DATE</database> in 
Dialect 1, you can
       use the <database>EXTRACT</database> function.</para>
       <formalpara>
-        <title>Examples Using <database>EXTRACT</database></title>
+        <title>Examples Using <database>EXTRACT()</database></title>
         <programlisting>
        EXTRACT (HOUR FROM DATE_FIELD)
        EXTRACT (MINUTE FROM DATE_FIELD)
        EXTRACT (SECOND FROM DATE_FIELD)
         </programlisting>
       </formalpara>
+      <para>See also the
+      <link 
linkend="fblangref25-functions-scalarfuncs-extract"><database>EXTRACT()</database>
 function</link>
+      in the chapter entitled <citetitle>Built-in Functions and 
Variables</citetitle>.</para>
     </section>
 
     <section id="fblangref25-datatypes-timestamp">
@@ -826,8 +836,7 @@
           <thead>
             <row valign="middle">
               <entry align="center" morerows="1">Page Size</entry>
-              <entry align="center" nameend="col6B" namest="col1B">Maximum 
length
-              of an indexed string for a character set, bytes/character</entry>
+              <entry align="center" nameend="col6B" namest="col1B">Bytes per 
character</entry>
             </row>
             <row>
               <entry align="center">1</entry>
@@ -1561,8 +1570,8 @@
       <section id="fblangref25-datatypes-convert-shortcasts">
         <title>Shorthand Casts for Date and Time Data Types</title>
         <para>Firebird allows the use of a shorthand <quote>C-style</quote> 
type syntax
-        for casts from string to the <database>DATE</database>, 
<database>TIME</database>
-        and <database>TIMESTAMP</database> types.</para>
+        for casts from string to the types <database>DATE</database>, 
<database>TIME</database>
+        and <database>TIMESTAMP</database>.</para>
         <formalpara>
           <title>Syntax</title>
           <literallayout class="monospaced">
@@ -1606,12 +1615,26 @@
       function is almost always required to avoid data type clashes.</para>
 
       <para>In Dialect 1, in many expressions, one type is implicitly cast to 
another without the need
-      to use the CAST function.  For instance, the following clause in a 
Dialect 1 <database>SELECT</database>
-      statement is valid:
+      to use the CAST function.  For instance, the following statement in 
Dialect 1 is valid:
         <programlisting>
-       WHERE DOC_DATE &lt; '31.08.2014'
+UPDATE ATABLE
+  SET ADATE = '25.12.2016' + 1
         </programlisting>
-      and the string type will be cast to the date type implicitly.</para>
+      and the date literal  will be cast to the date type implicitly.</para>
+      <para>In Dialect 3, this statement will throw error 35544569, 
&quot;Dynamic SQL Error:
+expression evaluation not supported, Strings cannot be added or subtracted in 
dialect 3&quot;&mdash;a cast 
+will be needed:
+        <programlisting>
+UPDATE ATABLE
+  SET ADATE = CAST ('25.12.2016' AS DATE) + 1
+        </programlisting>
+      or, with the short cast:
+        <programlisting>
+UPDATE ATABLE
+  SET ADATE = DATE '25.12.2016' + 1
+        </programlisting>
+      </para>
+
       <para>In Dialect 1, mixing integer data and numeric strings is usually 
possible because the parser will
       try to cast the string implicitly.  For example,
         <programlisting>

Index: fblangref25-ddl.xml
===================================================================
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-ddl.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- fblangref25-ddl.xml 28 Jan 2016 03:40:45 -0000      1.9
+++ fblangref25-ddl.xml 27 Mar 2016 21:20:47 -0000      1.10
@@ -4674,8 +4674,13 @@
       <para>For the full detail of the syntax,
       see <link linkend="fblangref25-ddl-trgr-create"><database>CREATE 
TRIGGER</database></link>.</para>
       <para>The <database>RECREATE TRIGGER</database> statement creates a new 
trigger if no trigger
-      with the specified name exists; Otherwise the <database>RECREATE 
TRIGGER</database> statement 
-      tries to delete the existing trigger and create a new one.</para>
+      with the specified name exists; otherwise the <database>RECREATE 
TRIGGER</database> statement 
+      tries to delete the existing trigger and create a new one.  The 
operation will fail on
+      <database>COMMIT</database> if the trigger dependencies.</para>
+      <warning>
+        <para>Be aware that dependency errors are not detected until the 
<database>COMMIT</database> phase
+        of this operation.</para>
+      </warning>
       <formalpara>
         <title>Example using RECREATE TRIGGER</title>
         <para> Creating or recreating the set_cust_no trigger.
@@ -5414,8 +5419,12 @@
       </formalpara>
       <para>The <database>RECREATE PROCEDURE</database> statement creates a 
new stored procedure 
       or recreates an existing one. If there is a procedure with this name 
already, the engine will 
-      try to delete it and create a new one. Recreating an existing procedure 
will fail if the procedure has
-      dependencies.</para>
+      try to delete it and create a new one. Recreating an existing procedure 
will fail at the
+      <database>COMMIT</database> request if the procedure has 
dependencies.</para>
+      <warning>
+        <para>Be aware that dependency errors are not detected until the 
<database>COMMIT</database> phase
+        of this operation.</para>
+      </warning>
       <para>After a procedure is successfully recreated, privileges to execute 
the stored
       procedure and the privileges of the stored procedure itself are 
dropped.</para>
       <formalpara>

Index: fblangref25.xml
===================================================================
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- fblangref25.xml     2 Feb 2016 21:10:21 -0000       1.18
+++ fblangref25.xml     27 Mar 2016 21:20:48 -0000      1.19
@@ -5,7 +5,7 @@
   <bookinfo>
     <title>Firebird 2.5 Language Reference</title>
     <subtitle>Beta Release 1</subtitle>
-    <edition>2 February 2016, document version 0.901</edition>
+    <edition>26 March 2016, document version 0.902</edition>
     <authorgroup>
       <author>
         <firstname>Dmitry</firstname>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Firebird-checkins mailing list
firebird-check...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-checkins


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs

Reply via email to