Update of /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25 In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27364
Modified Files: fblangref25-commons.xml fblangref25-dml.xml fblangref25-structure.xml fblangref25.xml Log Message: A few additions and corrections in response to reports in firebird-docs. Translators, please refresh the files fblangref25-commons, fblangref25-dml, fblangref25-structure and fblangref25. New build no. is 0.901. Index: fblangref25-dml.xml =================================================================== RCS file: /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-dml.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fblangref25-dml.xml 26 Jan 2016 21:01:21 -0000 1.4 +++ fblangref25-dml.xml 2 Feb 2016 21:10:21 -0000 1.5 @@ -4261,17 +4261,13 @@ if the column list is absent, the engine requires a value for every column in the table or view (computed columns excluded).</para> - <section id="fblangref25-dml-insert-values-character"> - <title>Introducer Syntax for String Literals</title> - <para>String literals may optionally be preceded by a character set - name, itself prefixed with an underscore <quote>_</quote>. This is known - as <firstterm>introducer syntax</firstterm>. Its purpose is to inform - the engine as to how it is to interpret and store the incoming string.</para> <note> - <para>Introducer syntax works only with literal strings. It cannot be - applied directly to string variables, parameters or function expressions.</para> + <para><link linkend="fblangref25-commons-introducer-syntax">Introducer syntax</link> + provides a way to identify the character set of a value that is a string + constant (literal). Introducer syntax works only with literal strings: it cannot + be applied to string variables, parameters, column references or values that + are expressions.</para> </note> - </section> <formalpara> <title>Examples</title> @@ -4283,7 +4279,7 @@ INSERT INTO cars VALUES ('Ford', 'T', 1908, 'USA', 850); --- notice the '_' prefix +-- notice the '_' prefix (introducer syntax) INSERT INTO People VALUES (_ISO8859_1 'Hans-Jörg Schäfer') </programlisting></blockquote> @@ -4728,7 +4724,7 @@ </para> <!-- introducer syntax --> <para>For string literals with which the parser needs help to interpret the character - set of the data, the <link linkend="fblangref25-dml-insert-values-character">introducer + set of the data, the <link linkend="fblangref25-commons-introducer-syntax">introducer syntax</link> may be used. The string literal is preceded by the character set name, prefixed with an underscore character: <blockquote><programlisting> Index: fblangref25-commons.xml =================================================================== RCS file: /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-commons.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fblangref25-commons.xml 12 Sep 2015 20:55:07 -0000 1.4 +++ fblangref25-commons.xml 2 Feb 2016 21:10:21 -0000 1.5 @@ -135,6 +135,64 @@ </tgroup> </table> + <section id="fblangref25-commons-constants"> + <title>Constants</title> + <para>A constant is a value that is supplied directly in an SQL statement, not derived from an expression, + a parameter, a column reference nor a variable. It can be a string or a number.</para> + + <section id="fblangref25-commons-string-constant"> + <title>String Constants (Literals)</title> + <para>A string constant is a series of characters enclosed between a pair of apostrophes + (<quote>single quotes</quote>). The maximum length of a string is 32,767 bytes; the + maximum character count will be determined by the number of bytes used to encode each + character.</para> + <note> + <itemizedlist> + <listitem>Double quotes are <emphasis>NOT VALID</emphasis> for quoting strings. + SQL reserves a different purpose for them.</listitem> + <listitem>If a literal apostrophe is required within a string constant, it is + <quote>escaped</quote> by prefixing it with another apostrophe. For example, + <filename>'Mother O''Reilly's home-made hooch'</filename>.</listitem> + <listitem>Care should be taken with the string length if the value is to be + written to a <database>VARCHAR</database> column. The maximum length for a + <database>VARCHAR</database> is 32,765 bytes.</listitem> + </itemizedlist> + </note> + <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-introducer-syntax"> + <title>Introducer Syntax for String Literals</title> + <para>If necessary, a string literal may be preceded by a character set + name, itself prefixed with an underscore <quote>_</quote>. This is known + as <firstterm>introducer syntax</firstterm>. Its purpose is to inform + the engine about how to interpret and store the incoming string.</para> + <para>Example + <blockquote><programlisting> +INSERT INTO People +VALUES (_ISO8859_1 'Hans-Jörg Schäfer') + </programlisting></blockquote> + </para> + </section> + </section> + + <section id="fblangref25-commons-number-constant"> + <title>Number Constants</title> + <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 + 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> + </itemizedlist> + </para> + </section> + </section> + <section id="fblangref25-commons-sqloperators"> <title>SQL Operators</title> <para>SQL operators comprise operators for comparing, calculating, evaluating and concatenating values.</para> @@ -939,7 +997,7 @@ <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 case-sensitive.</para> + search is not case-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> Index: fblangref25-structure.xml =================================================================== RCS file: /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-structure.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fblangref25-structure.xml 8 Sep 2015 02:48:52 -0000 1.2 +++ fblangref25-structure.xml 2 Feb 2016 21:10:21 -0000 1.3 @@ -269,7 +269,7 @@ <para>Literals are used to represent data in a direct format. Examples of standard types of literals are:</para> <literallayout class="monospaced"> - integer - 0, -34, 45; + integer - 0, -34, 45, 0X080000000; real - 0.0, -3.14, 3.23e-23; string - 'text', 'don''t!'; date - DATE '10.01.2014'; Index: fblangref25.xml =================================================================== RCS file: /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- fblangref25.xml 29 Jan 2016 22:23:08 -0000 1.17 +++ fblangref25.xml 2 Feb 2016 21:10:21 -0000 1.18 @@ -5,7 +5,7 @@ <bookinfo> <title>Firebird 2.5 Language Reference</title> <subtitle>Beta Release 1</subtitle> - <edition>26 January 2016, document version 0.900</edition> + <edition>2 February 2016, document version 0.901</edition> <authorgroup> <author> <firstname>Dmitry</firstname> @@ -42,19 +42,13 @@ <contrib>The source of much copied reference material</contrib> </othercredit> - <othercredit> - <firstname>Thomas</firstname> - <surname>Woinke</surname> - <contrib>Another source of copied - reference material</contrib> - </othercredit> <publisher> <publishername>Firebird Project</publishername> </publisher> <copyright> - <year>2015</year> - <holder>Firebird Project and all contributing authors, under the + <year>2016</year> + <holder>Firebird Project and all contributing authors, under the <ulink url="http://www.firebirdsql.org/manual/pdl.html">Public Documentation License Version 1.0</ulink>. Please refer to the <link linkend="fblangref25-license">License Notice in the Appendix</link>. ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Firebird-docs mailing list Firebird-docs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-docs