From 4ab7ea5ace04c51b35da90d5f5708a02303b90e8 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 16 Feb 2007 03:50:29 +0000 Subject: [PATCH] Remove tabs from SGML files to help tag alingment and improve detection of tabs are added in the future. --- doc/src/sgml/docguide.sgml | 4 +- doc/src/sgml/ecpg.sgml | 1746 ++++++++++++++++++------------------ doc/src/sgml/func.sgml | 20 +- doc/src/sgml/geqo.sgml | 4 +- doc/src/sgml/gin.sgml | 14 +- doc/src/sgml/libpq.sgml | 12 +- doc/src/sgml/mvcc.sgml | 48 +- doc/src/sgml/plperl.sgml | 26 +- doc/src/sgml/sql.sgml | 990 ++++++++++---------- 9 files changed, 1432 insertions(+), 1432 deletions(-) diff --git a/doc/src/sgml/docguide.sgml b/doc/src/sgml/docguide.sgml index 5a3e0a4f97..5aac838522 100644 --- a/doc/src/sgml/docguide.sgml +++ b/doc/src/sgml/docguide.sgml @@ -1,4 +1,4 @@ - + Documentation @@ -227,7 +227,7 @@ It's possible that the ports do not update the main catalog file in /usr/local/share/sgml/catalog.ports or order - isn't proper . Be sure to have the following lines in begining of file: + isn't proper . Be sure to have the following lines in begining of file: CATALOG "openjade/catalog" CATALOG "iso8879/catalog" diff --git a/doc/src/sgml/ecpg.sgml b/doc/src/sgml/ecpg.sgml index 91271311b8..445c7ece50 100644 --- a/doc/src/sgml/ecpg.sgml +++ b/doc/src/sgml/ecpg.sgml @@ -1,4 +1,4 @@ - +` <application>ECPG</application> - Embedded <acronym>SQL</acronym> in C @@ -1110,8 +1110,8 @@ int PGTYPESnumeric_from_decimal(decimal *src, numeric *dst); date PGTYPESdate_from_timestamp(timestamp dt); - The function receives a timestamp as its only argument and returns the - extracted date part from this timestamp. + The function receives a timestamp as its only argument and returns the + extracted date part from this timestamp. @@ -1124,96 +1124,96 @@ date PGTYPESdate_from_timestamp(timestamp dt); date PGTYPESdate_from_asc(char *str, char **endptr); - The function receives a C char* string str and a pointer to - a C char* string endptr. At the moment ecpg always parses - the complete string and so it currently does not support to store the - address of the first invalid character in *endptr. - You can safely set endptr to NULL. + The function receives a C char* string str and a pointer to + a C char* string endptr. At the moment ecpg always parses + the complete string and so it currently does not support to store the + address of the first invalid character in *endptr. + You can safely set endptr to NULL. - Note that the function always assumes MDY-formatted dates and there is - currently no variable to change that within ecpg. + Note that the function always assumes MDY-formatted dates and there is + currently no variable to change that within ecpg. The following input formats are allowed: - Valid input formats for <function>PGTYPESdate_from_asc</function> - - - - Input - Result - - - - - January 8, 1999 - January 8, 1999 - - - 1999-01-08 - January 8, 1999 - - - 1/8/1999 - January 8, 1999 - - - 1/18/1999 - January 18, 1999 - - - 01/02/03 - February 1, 2003 - - - 1999-Jan-08 - January 8, 1999 - - - Jan-08-1999 - January 8, 1999 - - - 08-Jan-1999 - January 8, 1999 - - - 99-Jan-08 - January 8, 1999 - - - 08-Jan-99 - January 8, 1999 - - - 08-Jan-06 - January 8, 2006 - - - Jan-08-99 - January 8, 1999 - - - 19990108 - ISO 8601; January 8, 1999 - - - 990108 - ISO 8601; January 8, 1999 - - - 1999.008 - year and day of year - - - J2451187 - Julian day - - - January 8, 99 BC - year 99 before the Common Era - + Valid input formats for <function>PGTYPESdate_from_asc</function> + + + + Input + Result + + + + + January 8, 1999 + January 8, 1999 + + + 1999-01-08 + January 8, 1999 + + + 1/8/1999 + January 8, 1999 + + + 1/18/1999 + January 18, 1999 + + + 01/02/03 + February 1, 2003 + + + 1999-Jan-08 + January 8, 1999 + + + Jan-08-1999 + January 8, 1999 + + + 08-Jan-1999 + January 8, 1999 + + + 99-Jan-08 + January 8, 1999 + + + 08-Jan-99 + January 8, 1999 + + + 08-Jan-06 + January 8, 2006 + + + Jan-08-99 + January 8, 1999 + + + 19990108 + ISO 8601; January 8, 1999 + + + 990108 + ISO 8601; January 8, 1999 + + + 1999.008 + year and day of year + + + J2451187 + Julian day + + + January 8, 99 BC + year 99 before the Common Era +
@@ -1229,9 +1229,9 @@ date PGTYPESdate_from_asc(char *str, char **endptr); char *PGTYPESdate_to_asc(date dDate); - The function receives the date dDate as its only parameter. - It will output the date in the form 1999-01-18, i.e. in the - YYYY-MM-DD format. + The function receives the date dDate as its only parameter. + It will output the date in the form 1999-01-18, i.e. in the + YYYY-MM-DD format.
@@ -1240,17 +1240,17 @@ char *PGTYPESdate_to_asc(date dDate); PGTYPESdate_julmdy - Extract the values for the day, the month and the year from a variable - of type date. + Extract the values for the day, the month and the year from a variable + of type date. void PGTYPESdate_julmdy(date d, int *mdy); - The function receives the date d and a pointer to an array - of 3 integer values mdy. The variable name indicates - the sequential order: mdy[0] will be set to contain the - number of the month, mdy[1] will be set to the value of the - day and mdy[2] will contain the year. + The function receives the date d and a pointer to an array + of 3 integer values mdy. The variable name indicates + the sequential order: mdy[0] will be set to contain the + number of the month, mdy[1] will be set to the value of the + day and mdy[2] will contain the year. @@ -1259,14 +1259,14 @@ void PGTYPESdate_julmdy(date d, int *mdy); PGTYPESdate_mdyjul - Create a date value from an array of 3 integers that specify the - day, the month and the year of the date. + Create a date value from an array of 3 integers that specify the + day, the month and the year of the date. void PGTYPESdate_mdyjul(int *mdy, date *jdate); - The function receives the array of the 3 integers (mdy) as - its first argument and as its second argument a pointer to a variable - of type date that should hold the result of the operation. + The function receives the array of the 3 integers (mdy) as + its first argument and as its second argument a pointer to a variable + of type date that should hold the result of the operation. @@ -1279,43 +1279,43 @@ void PGTYPESdate_mdyjul(int *mdy, date *jdate); int PGTYPESdate_dayofweek(date d); - The function receives the date variable d as its only - argument and returns an integer that indicates the day of the week for - this date. + The function receives the date variable d as its only + argument and returns an integer that indicates the day of the week for + this date. - 0 - Sunday + 0 - Sunday - 1 - Monday + 1 - Monday - 2 - Tuesday + 2 - Tuesday - 3 - Wednesday + 3 - Wednesday - 4 - Thursday + 4 - Thursday - 5 - Friday + 5 - Friday - 6 - Saturday + 6 - Saturday @@ -1331,8 +1331,8 @@ int PGTYPESdate_dayofweek(date d); void PGTYPESdate_today(date *d); - The function receives a pointer to a date variable (d) - that it sets to the current date. + The function receives a pointer to a date variable (d) + that it sets to the current date. @@ -1341,14 +1341,14 @@ void PGTYPESdate_today(date *d); PGTYPESdate_fmt_asc - Convert a variable of type date to its textual representation using a - format mask. + Convert a variable of type date to its textual representation using a + format mask. int PGTYPESdate_fmt_asc(date dDate, char *fmtstring, char *outbuf); - The function receives the date to convert (dDate), the - format mask (fmtstring) and the string that will hold the - textual representation of the date (outbuf). + The function receives the date to convert (dDate), the + format mask (fmtstring) and the string that will hold the + textual representation of the date (outbuf). On success, 0 is returned and a negative value if an error occurred. @@ -1387,70 +1387,70 @@ int PGTYPESdate_fmt_asc(date dDate, char *fmtstring, char *outbuf); - All other characters are copied 1:1 to the output string. + All other characters are copied 1:1 to the output string. - The following table indicates a few possible formats. This will give - you an idea of how to use this function. All output lines are based on - the same date: November, 23rd, 1959. + The following table indicates a few possible formats. This will give + you an idea of how to use this function. All output lines are based on + the same date: November, 23rd, 1959. - Valid input formats for <function>PGTYPESdate_fmt_asc</function> - - - - fmt - result - - - - - mmddyy - 112359 - - - ddmmyy - 231159 - - - yymmdd - 591123 - - - yy/mm/dd - 59/11/23 - - - yy mm dd - 59 11 23 - - - yy.mm.dd - 59.11.23 - - - .mm.yyyy.dd. - .11.1959.23. - - - mmm. dd, yyyy - Nov. 23, 1959 - - - mmm dd yyyy - Nov 23 1959 - - - yyyy dd mm - 1959 23 11 - - - ddd, mmm. dd, yyyy - Mon, Nov. 23, 1959 - - - (ddd) mmm. dd, yyyy - (Mon) Nov. 23, 1959 - + Valid input formats for <function>PGTYPESdate_fmt_asc</function> + + + + fmt + result + + + + + mmddyy + 112359 + + + ddmmyy + 231159 + + + yymmdd + 591123 + + + yy/mm/dd + 59/11/23 + + + yy mm dd + 59 11 23 + + + yy.mm.dd + 59.11.23 + + + .mm.yyyy.dd. + .11.1959.23. + + + mmm. dd, yyyy + Nov. 23, 1959 + + + mmm dd yyyy + Nov 23 1959 + + + yyyy dd mm + 1959 23 11 + + + ddd, mmm. dd, yyyy + Mon, Nov. 23, 1959 + + + (ddd) mmm. dd, yyyy + (Mon) Nov. 23, 1959 +
@@ -1462,103 +1462,103 @@ int PGTYPESdate_fmt_asc(date dDate, char *fmtstring, char *outbuf); PGTYPESdate_defmt_asc - Use a format mask to convert a C char* string to a value of type - date. + Use a format mask to convert a C char* string to a value of type + date. int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str); - - The function receives a pointer to the date value that should hold the - result of the operation (d), the format mask to use for - parsing the date (fmt) and the C char* string containing - the textual representation of the date (str). The textual - representation is expected to match the format mask. However you do not - need to have a 1:1 mapping of the string to the format mask. The - function only analyzes the sequential order and looks for the literals - yy or yyyy that indicate the - position of the year, mm to indicate the position of - the month and dd to indicate the position of the - day. - - - The following table indicates a few possible formats. This will give - you an idea of how to use this function. + + The function receives a pointer to the date value that should hold the + result of the operation (d), the format mask to use for + parsing the date (fmt) and the C char* string containing + the textual representation of the date (str). The textual + representation is expected to match the format mask. However you do not + need to have a 1:1 mapping of the string to the format mask. The + function only analyzes the sequential order and looks for the literals + yy or yyyy that indicate the + position of the year, mm to indicate the position of + the month and dd to indicate the position of the + day. + + + The following table indicates a few possible formats. This will give + you an idea of how to use this function. - Valid input formats for <function>rdefmtdate</function> - - - - fmt - str - result - - - - - ddmmyy - 21-2-54 - 1954-02-21 - - - ddmmyy - 2-12-54 - 1954-12-02 - - - ddmmyy - 20111954 - 1954-11-20 - - - ddmmyy - 130464 - 1964-04-13 - - - mmm.dd.yyyy - MAR-12-1967 - 1967-03-12 - - - yy/mm/dd - 1954, February 3rd - 1954-02-03 - - - mmm.dd.yyyy - 041269 - 1969-04-12 - - - yy/mm/dd - In the year 2525, in the month of July, mankind will be alive on the 28th day - 2525-07-28 - - - dd-mm-yy - I said on the 28th of July in the year 2525 - 2525-07-28 - - - mmm.dd.yyyy - 9/14/58 - 1958-09-14 - - - yy/mm/dd - 47/03/29 - 1947-03-29 - - - mmm.dd.yyyy - oct 28 1975 - 1975-10-28 - - - mmddyy - Nov 14th, 1985 - 1985-11-14 - + Valid input formats for <function>rdefmtdate</function> + + + + fmt + str + result + + + + + ddmmyy + 21-2-54 + 1954-02-21 + + + ddmmyy + 2-12-54 + 1954-12-02 + + + ddmmyy + 20111954 + 1954-11-20 + + + ddmmyy + 130464 + 1964-04-13 + + + mmm.dd.yyyy + MAR-12-1967 + 1967-03-12 + + + yy/mm/dd + 1954, February 3rd + 1954-02-03 + + + mmm.dd.yyyy + 041269 + 1969-04-12 + + + yy/mm/dd + In the year 2525, in the month of July, mankind will be alive on the 28th day + 2525-07-28 + + + dd-mm-yy + I said on the 28th of July in the year 2525 + 2525-07-28 + + + mmm.dd.yyyy + 9/14/58 + 1958-09-14 + + + yy/mm/dd + 47/03/29 + 1947-03-29 + + + mmm.dd.yyyy + oct 28 1975 + 1975-10-28 + + + mmddyy + Nov 14th, 1985 + 1985-11-14 +
@@ -1583,60 +1583,60 @@ int PGTYPESdate_defmt_asc(date *d, char *fmt, char *str); PGTYPEStimestamp_from_asc - Parse a timestamp from its textual representation into a timestamp - variable. + Parse a timestamp from its textual representation into a timestamp + variable. timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr); - The function receives the string to parse (str) and a - pointer to a C char* (endptr). - At the moment ecpg always parses - the complete string and so it currently does not support to store the - address of the first invalid character in *endptr. - You can safely set endptr to NULL. + The function receives the string to parse (str) and a + pointer to a C char* (endptr). + At the moment ecpg always parses + the complete string and so it currently does not support to store the + address of the first invalid character in *endptr. + You can safely set endptr to NULL. - The function returns the parsed timestamp on success. On error, - PGTYPESInvalidTimestamp is returned and errno is - set to PGTYPES_TS_BAD_TIMESTAMP. See for important notes on this value. - + The function returns the parsed timestamp on success. On error, + PGTYPESInvalidTimestamp is returned and errno is + set to PGTYPES_TS_BAD_TIMESTAMP. See for important notes on this value. + - In general, the input string can contain any combination of an allowed - date specification, a whitespace character and an allowed time - specification. Note that timezones are not supported by ecpg. It can - parse them but does not apply any calculation as the - PostgreSQL server does for example. Timezone - specifiers are silently discarded. + In general, the input string can contain any combination of an allowed + date specification, a whitespace character and an allowed time + specification. Note that timezones are not supported by ecpg. It can + parse them but does not apply any calculation as the + PostgreSQL server does for example. Timezone + specifiers are silently discarded. The following table contains a few examples for input strings: - Valid input formats for <function>PGTYPEStimestamp_from_asc</function> - - - - Input - Result - - - - - 1999-01-08 04:05:06 - 1999-01-08 04:05:06 - - - January 8 04:05:06 1999 PST - 1999-01-08 04:05:06 - - - 1999-Jan-08 04:05:06.789-8 - 1999-01-08 04:05:06.789 (time zone specifier ignored) - - - J2451187 04:05-08:00 - 1999-01-08 04:05:00 (time zone specifier ignored) - + Valid input formats for <function>PGTYPEStimestamp_from_asc</function> + + + + Input + Result + + + + + 1999-01-08 04:05:06 + 1999-01-08 04:05:06 + + + January 8 04:05:06 1999 PST + 1999-01-08 04:05:06 + + + 1999-Jan-08 04:05:06.789-8 + 1999-01-08 04:05:06.789 (time zone specifier ignored) + + + J2451187 04:05-08:00 + 1999-01-08 04:05:00 (time zone specifier ignored) +
@@ -1652,9 +1652,9 @@ timestamp PGTYPEStimestamp_from_asc(char *str, char **endptr); char *PGTYPEStimestamp_to_asc(timestamp tstamp); - The function receives the timestamp tstamp as - its only argument and returns an allocated string that contains the - textual representation of the timestamp. + The function receives the timestamp tstamp as + its only argument and returns an allocated string that contains the + textual representation of the timestamp.
@@ -1667,8 +1667,8 @@ char *PGTYPEStimestamp_to_asc(timestamp tstamp); void PGTYPEStimestamp_current(timestamp *ts); - The function retrieves the current timestamp and saves it into the - timestamp variable that ts points to. + The function retrieves the current timestamp and saves it into the + timestamp variable that ts points to.
@@ -1681,326 +1681,326 @@ void PGTYPEStimestamp_current(timestamp *ts); int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmtstr); - The function receives a pointer to the timestamp to convert as its - first argument (ts), a pointer to the output buffer - (output), the maximal length that has been allocated for - the output buffer (str_len) and the format mask to - use for the conversion (fmtstr). + The function receives a pointer to the timestamp to convert as its + first argument (ts), a pointer to the output buffer + (output), the maximal length that has been allocated for + the output buffer (str_len) and the format mask to + use for the conversion (fmtstr).
- Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. - You can use the following format specifiers for the format mask. The - format specifiers are the same ones that are used in the - strftime function in libc. Any - non-format specifier will be copied into the output buffer. - + You can use the following format specifiers for the format mask. The + format specifiers are the same ones that are used in the + strftime function in libc. Any + non-format specifier will be copied into the output buffer. + - %A - is replaced by national representation of - the full weekday name. + %A - is replaced by national representation of + the full weekday name. - %a - is replaced by national representation of - the abbreviated weekday name. + %a - is replaced by national representation of + the abbreviated weekday name. - %B - is replaced by national representation of - the full month name. + %B - is replaced by national representation of + the full month name. - %b - is replaced by national representation of - the abbreviated month name. + %b - is replaced by national representation of + the abbreviated month name. - %C - is replaced by (year / 100) as decimal - number; single digits are preceded by a zero. + %C - is replaced by (year / 100) as decimal + number; single digits are preceded by a zero. - %c - is replaced by national representation of - time and date. + %c - is replaced by national representation of + time and date. - %D - is equivalent to - %m/%d/%y. + %D - is equivalent to + %m/%d/%y. - %d - is replaced by the day of the month as a - decimal number (01-31). + %d - is replaced by the day of the month as a + decimal number (01-31). - %E* %O* - POSIX locale - extensions. The sequences - %Ec - %EC - %Ex - %EX - %Ey - %EY - %Od - %Oe - %OH - %OI - %Om - %OM - %OS - %Ou - %OU - %OV - %Ow - %OW - %Oy - are supposed to provide alternate representations. + %E* %O* - POSIX locale + extensions. The sequences + %Ec + %EC + %Ex + %EX + %Ey + %EY + %Od + %Oe + %OH + %OI + %Om + %OM + %OS + %Ou + %OU + %OV + %Ow + %OW + %Oy + are supposed to provide alternate representations. - Additionally %OB implemented to represent - alternative months names (used standalone, without day mentioned). + Additionally %OB implemented to represent + alternative months names (used standalone, without day mentioned). - %e - is replaced by the day of month as a decimal - number (1-31); single digits are preceded by a blank. + %e - is replaced by the day of month as a decimal + number (1-31); single digits are preceded by a blank. - %F - is equivalent to %Y-%m-%d. + %F - is equivalent to %Y-%m-%d. - %G - is replaced by a year as a decimal number - with century. This year is the one that contains the greater part of - the week (Monday as the first day of the week). + %G - is replaced by a year as a decimal number + with century. This year is the one that contains the greater part of + the week (Monday as the first day of the week). - %g - is replaced by the same year as in - %G, but as a decimal number without century - (00-99). + %g - is replaced by the same year as in + %G, but as a decimal number without century + (00-99). - %H - is replaced by the hour (24-hour clock) as a - decimal number (00-23). + %H - is replaced by the hour (24-hour clock) as a + decimal number (00-23). - %h - the same as %b. + %h - the same as %b. - %I - is replaced by the hour (12-hour clock) as a - decimal number (01-12). + %I - is replaced by the hour (12-hour clock) as a + decimal number (01-12). - %j - is replaced by the day of the year as a - decimal number (001-366). + %j - is replaced by the day of the year as a + decimal number (001-366). - %k - is replaced by the hour (24-hour clock) as a - decimal number (0-23); single digits are preceded by a blank. + %k - is replaced by the hour (24-hour clock) as a + decimal number (0-23); single digits are preceded by a blank. - %l - is replaced by the hour (12-hour clock) as a - decimal number (1-12); single digits are preceded by a blank. + %l - is replaced by the hour (12-hour clock) as a + decimal number (1-12); single digits are preceded by a blank. - %M - is replaced by the minute as a decimal - number (00-59). + %M - is replaced by the minute as a decimal + number (00-59). - %m - is replaced by the month as a decimal number - (01-12). + %m - is replaced by the month as a decimal number + (01-12). - %n - is replaced by a newline. + %n - is replaced by a newline. - %O* - the same as %E*. + %O* - the same as %E*. - %p - is replaced by national representation of - either "ante meridiem" or "post meridiem" as appropriate. + %p - is replaced by national representation of + either "ante meridiem" or "post meridiem" as appropriate. - %R - is equivalent to %H:%M. + %R - is equivalent to %H:%M. - %r - is equivalent to %I:%M:%S - %p. + %r - is equivalent to %I:%M:%S + %p. - %S - is replaced by the second as a decimal - number (00-60). + %S - is replaced by the second as a decimal + number (00-60). - %s - is replaced by the number of seconds since - the Epoch, UTC. + %s - is replaced by the number of seconds since + the Epoch, UTC. - %T - is equivalent to %H:%M:%S + %T - is equivalent to %H:%M:%S - %t - is replaced by a tab. + %t - is replaced by a tab. - %U - is replaced by the week number of the year - (Sunday as the first day of the week) as a decimal number (00-53). + %U - is replaced by the week number of the year + (Sunday as the first day of the week) as a decimal number (00-53). - %u - is replaced by the weekday (Monday as the - first day of the week) as a decimal number (1-7). + %u - is replaced by the weekday (Monday as the + first day of the week) as a decimal number (1-7). - %V - is replaced by the week number of the year - (Monday as the first day of the week) as a decimal number (01-53). - If the week containing January 1 has four or more days in the new - year, then it is week 1; otherwise it is the last week of the - previous year, and the next week is week 1. + %V - is replaced by the week number of the year + (Monday as the first day of the week) as a decimal number (01-53). + If the week containing January 1 has four or more days in the new + year, then it is week 1; otherwise it is the last week of the + previous year, and the next week is week 1. - %v - is equivalent to - %e-%b-%Y. + %v - is equivalent to + %e-%b-%Y. - %W - is replaced by the week number of the year - (Monday as the first day of the week) as a decimal number (00-53). + %W - is replaced by the week number of the year + (Monday as the first day of the week) as a decimal number (00-53). - %w - is replaced by the weekday (Sunday as the - first day of the week) as a decimal number (0-6). + %w - is replaced by the weekday (Sunday as the + first day of the week) as a decimal number (0-6). - %X - is replaced by national representation of - the time. + %X - is replaced by national representation of + the time. - %x - is replaced by national representation of - the date. + %x - is replaced by national representation of + the date. - %Y - is replaced by the year with century as a - decimal number. + %Y - is replaced by the year with century as a + decimal number. - %y - is replaced by the year without century as a - decimal number (00-99). + %y - is replaced by the year without century as a + decimal number (00-99). - %Z - is replaced by the time zone name. + %Z - is replaced by the time zone name. - %z - is replaced by the time zone offset from - UTC; a leading plus sign stands for east of UTC, a minus sign for - west of UTC, hours and minutes follow with two digits each and no - delimiter between them (common form for RFC 822 date headers). + %z - is replaced by the time zone offset from + UTC; a leading plus sign stands for east of UTC, a minus sign for + west of UTC, hours and minutes follow with two digits each and no + delimiter between them (common form for RFC 822 date headers). - %+ - is replaced by national representation of - the date and time. + %+ - is replaced by national representation of + the date and time. - %-* - GNU libc extension. Do not do any padding - when performing numerical outputs. + %-* - GNU libc extension. Do not do any padding + when performing numerical outputs. - $_* - GNU libc extension. Explicitly specify space for padding. + $_* - GNU libc extension. Explicitly specify space for padding. - %0* - GNU libc extension. Explicitly specify zero - for padding. + %0* - GNU libc extension. Explicitly specify zero + for padding. - %% - is replaced by %. + %% - is replaced by %. @@ -2012,19 +2012,19 @@ int PGTYPEStimestamp_fmt_asc(timestamp *ts, char *output, int str_len, char *fmt PGTYPEStimestamp_sub - Subtract one timestamp from another one and save the result in a - variable of type interval. + Subtract one timestamp from another one and save the result in a + variable of type interval. int PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv); - The function will subtract the timestamp variable that ts2 - points to from the timestamp variable that ts1 points to - and will store the result in the interval variable that iv - points to. + The function will subtract the timestamp variable that ts2 + points to from the timestamp variable that ts1 points to + and will store the result in the interval variable that iv + points to. - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. @@ -2033,25 +2033,25 @@ int PGTYPEStimestamp_sub(timestamp *ts1, timestamp *ts2, interval *iv); PGTYPEStimestamp_defmt_asc - Parse a timestamp value from its textual representation using a - formatting mask. + Parse a timestamp value from its textual representation using a + formatting mask. int PGTYPEStimestamp_defmt_asc(char *str, char *fmt, timestamp *d); - The function receives the textual representation of a timestamp in the - variable str as well as the formatting mask to use in the - variable fmt. The result will be stored in the variable - that d points to. + The function receives the textual representation of a timestamp in the + variable str as well as the formatting mask to use in the + variable fmt. The result will be stored in the variable + that d points to. - If the formatting mask fmt is NULL, the function will fall - back to the default formatting mask which is %Y-%m-%d - %H:%M:%S. + If the formatting mask fmt is NULL, the function will fall + back to the default formatting mask which is %Y-%m-%d + %H:%M:%S. - This is the reverse function to . See the documentation there in - order to find out about the possible formatting mask entries. + This is the reverse function to . See the documentation there in + order to find out about the possible formatting mask entries. @@ -2064,14 +2064,14 @@ int PGTYPEStimestamp_defmt_asc(char *str, char *fmt, timestamp *d); int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout); - The function receives a pointer to a timestamp variable tin - and a pointer to an interval variable span. It adds the - interval to the timestamp and saves the resulting timestamp in the - variable that tout points to. + The function receives a pointer to a timestamp variable tin + and a pointer to an interval variable span. It adds the + interval to the timestamp and saves the resulting timestamp in the + variable that tout points to. - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. @@ -2084,14 +2084,14 @@ int PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tou int PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tout); - The function subtracts the interval variable that span - points to from the timestamp variable that tin points to - and saves the result into the variable that tout points - to. + The function subtracts the interval variable that span + points to from the timestamp variable that tin points to + and saves the result into the variable that tout points + to. - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. @@ -2142,12 +2142,12 @@ void PGTYPESinterval_new(interval *intvl); interval *PGTYPESinterval_from_asc(char *str, char **endptr); - The function parses the input string str and returns a - pointer to an allocated interval variable. - At the moment ecpg always parses - the complete string and so it currently does not support to store the - address of the first invalid character in *endptr. - You can safely set endptr to NULL. + The function parses the input string str and returns a + pointer to an allocated interval variable. + At the moment ecpg always parses + the complete string and so it currently does not support to store the + address of the first invalid character in *endptr. + You can safely set endptr to NULL. @@ -2160,9 +2160,9 @@ interval *PGTYPESinterval_from_asc(char *str, char **endptr); char *PGTYPESinterval_to_asc(interval *span); - The function converts the interval variable that span - points to into a C char*. The output looks like this example: - @ 1 day 12 hours 59 mins 10 secs. + The function converts the interval variable that span + points to into a C char*. The output looks like this example: + @ 1 day 12 hours 59 mins 10 secs. @@ -2175,10 +2175,10 @@ char *PGTYPESinterval_to_asc(interval *span); int PGTYPESinterval_copy(interval *intvlsrc, interval *intvldest); - The function copies the interval variable that intvlsrc - points to into the variable that intvldest points to. Note - that you need to allocate the memory for the destination variable - before. + The function copies the interval variable that intvlsrc + points to into the variable that intvldest points to. Note + that you need to allocate the memory for the destination variable + before. @@ -2236,8 +2236,8 @@ void PGTYPESdecimal_free(decimal *var); PGTYPES_NUM_BAD_NUMERIC - An argument should contain a numeric variable (or point to a numeric - variable) but in fact its in-memory representation was invalid. + An argument should contain a numeric variable (or point to a numeric + variable) but in fact its in-memory representation was invalid. @@ -2246,9 +2246,9 @@ void PGTYPESdecimal_free(decimal *var); PGTYPES_NUM_OVERFLOW - An overflow occurred. Since the numeric type can deal with almost - arbitrary precision, converting a numeric variable into other types - might cause overflow. + An overflow occurred. Since the numeric type can deal with almost + arbitrary precision, converting a numeric variable into other types + might cause overflow. @@ -2257,9 +2257,9 @@ void PGTYPESdecimal_free(decimal *var); PGTYPES_NUM_OVERFLOW - An underflow occurred. Since the numeric type can deal with almost - arbitrary precision, converting a numeric variable into other types - might cause underflow. + An underflow occurred. Since the numeric type can deal with almost + arbitrary precision, converting a numeric variable into other types + might cause underflow. @@ -2356,16 +2356,16 @@ void PGTYPESdecimal_free(decimal *var); PGTYPESInvalidTimestamp - A value of type timestamp representing an invalid time stamp. This is - returned by the function PGTYPEStimestamp_from_asc on - parse error. - Note that due to the internal representation of the timestamp datatype, - PGTYPESInvalidTimestamp is also a valid timestamp at - the same time. It is set to 1899-12-31 23:59:59. In order - to detect errors, make sure that your application does not only test - for PGTYPESInvalidTimestamp but also for - errno != 0 after each call to - PGTYPEStimestamp_from_asc. + A value of type timestamp representing an invalid time stamp. This is + returned by the function PGTYPEStimestamp_from_asc on + parse error. + Note that due to the internal representation of the timestamp datatype, + PGTYPESInvalidTimestamp is also a valid timestamp at + the same time. It is set to 1899-12-31 23:59:59. In order + to detect errors, make sure that your application does not only test + for PGTYPESInvalidTimestamp but also for + errno != 0 after each call to + PGTYPEStimestamp_from_asc. @@ -2425,8 +2425,8 @@ void PGTYPESdecimal_free(decimal *var); CLOSE DATABASE - This statement closes the current connection. In fact, this is a - synonym for ecpg's DISCONNECT CURRENT.: + This statement closes the current connection. In fact, this is a + synonym for ecpg's DISCONNECT CURRENT.: $CLOSE DATABASE; /* close the current connection */ EXEC SQL CLOSE DATABASE; @@ -2450,14 +2450,14 @@ void PGTYPESdecimal_free(decimal *var); int decadd(decimal *arg1, decimal *arg2, decimal *sum); - The function receives a pointer to the first operand of type decimal - (arg1), a pointer to the second operand of type decimal - (arg2) and a pointer to a value of type decimal that will - contain the sum (sum). On success, the function returns 0. - ECPG_INFORMIX_NUM_OVERFLOW is returned in case of overflow and - ECPG_INFORMIX_NUM_UNDERFLOW in case of underflow. -1 is returned for - other failures and errno is set to the respective errno number of the - pgtypeslib. + The function receives a pointer to the first operand of type decimal + (arg1), a pointer to the second operand of type decimal + (arg2) and a pointer to a value of type decimal that will + contain the sum (sum). On success, the function returns 0. + ECPG_INFORMIX_NUM_OVERFLOW is returned in case of overflow and + ECPG_INFORMIX_NUM_UNDERFLOW in case of underflow. -1 is returned for + other failures and errno is set to the respective errno number of the + pgtypeslib. @@ -2470,26 +2470,26 @@ int decadd(decimal *arg1, decimal *arg2, decimal *sum); int deccmp(decimal *arg1, decimal *arg2); - The function receives a pointer to the first decimal value - (arg1), a pointer to the second decimal value - (arg2) and returns an integer value that indicates which is - the bigger value. + The function receives a pointer to the first decimal value + (arg1), a pointer to the second decimal value + (arg2) and returns an integer value that indicates which is + the bigger value. - 1, if the value that arg1 points to is bigger than the - value that var2 points to + 1, if the value that arg1 points to is bigger than the + value that var2 points to - -1, if the value that arg1 points to is smaller than the - value that arg2 points to + -1, if the value that arg1 points to is smaller than the + value that arg2 points to - 0, if the value that arg1 points to and the value that - arg2 points to are equal + 0, if the value that arg1 points to and the value that + arg2 points to are equal @@ -2505,10 +2505,10 @@ int deccmp(decimal *arg1, decimal *arg2); void deccopy(decimal *src, decimal *target); - The function receives a pointer to the decimal value that should be - copied as the first argument (src) and a pointer to the - target structure of type decimal (target) as the second - argument. + The function receives a pointer to the decimal value that should be + copied as the first argument (src) and a pointer to the + target structure of type decimal (target) as the second + argument. @@ -2521,10 +2521,10 @@ void deccopy(decimal *src, decimal *target); int deccvasc(char *cp, int len, decimal *np); - The function receives a pointer to string that contains the string - representation of the number to be converted (cp) as well - as its length len. np is a pointer to the - decimal value that saves the result of the operation. + The function receives a pointer to string that contains the string + representation of the number to be converted (cp) as well + as its length len. np is a pointer to the + decimal value that saves the result of the operation. Valid formats are for example: @@ -2535,13 +2535,13 @@ int deccvasc(char *cp, int len, decimal *np); -32.84e-4. - The function returns 0 on success. If overflow or underflow occurred, - ECPG_INFORMIX_NUM_OVERFLOW or - ECPG_INFORMIX_NUM_UNDERFLOW is returned. If the ASCII - representation could not be parsed, - ECPG_INFORMIX_BAD_NUMERIC is returned or - ECPG_INFORMIX_BAD_EXPONENT if this problem occurred while - parsing the exponent. + The function returns 0 on success. If overflow or underflow occurred, + ECPG_INFORMIX_NUM_OVERFLOW or + ECPG_INFORMIX_NUM_UNDERFLOW is returned. If the ASCII + representation could not be parsed, + ECPG_INFORMIX_BAD_NUMERIC is returned or + ECPG_INFORMIX_BAD_EXPONENT if this problem occurred while + parsing the exponent. @@ -2554,14 +2554,14 @@ int deccvasc(char *cp, int len, decimal *np); int deccvdbl(double dbl, decimal *np); - The function receives the variable of type double that should be - converted as its first argument (dbl). As the second - argument (np), the function receives a pointer to the - decimal variable that should hold the result of the operation. + The function receives the variable of type double that should be + converted as its first argument (dbl). As the second + argument (np), the function receives a pointer to the + decimal variable that should hold the result of the operation. - The function returns 0 on success and a negative value if the - conversion failed. + The function returns 0 on success and a negative value if the + conversion failed. @@ -2574,14 +2574,14 @@ int deccvdbl(double dbl, decimal *np); int deccvint(int in, decimal *np); - The function receives the variable of type int that should be - converted as its first argument (in). As the second - argument (np), the function receives a pointer to the - decimal variable that should hold the result of the operation. + The function receives the variable of type int that should be + converted as its first argument (in). As the second + argument (np), the function receives a pointer to the + decimal variable that should hold the result of the operation. - The function returns 0 on success and a negative value if the - conversion failed. + The function returns 0 on success and a negative value if the + conversion failed. @@ -2594,14 +2594,14 @@ int deccvint(int in, decimal *np); int deccvlong(long lng, decimal *np); - The function receives the variable of type long that should be - converted as its first argument (lng). As the second - argument (np), the function receives a pointer to the - decimal variable that should hold the result of the operation. + The function receives the variable of type long that should be + converted as its first argument (lng). As the second + argument (np), the function receives a pointer to the + decimal variable that should hold the result of the operation. - The function returns 0 on success and a negative value if the - conversion failed. + The function returns 0 on success and a negative value if the + conversion failed. @@ -2614,18 +2614,18 @@ int deccvlong(long lng, decimal *np); int decdiv(decimal *n1, decimal *n2, decimal *result); - The function receives pointers to the variables that are the first - (n1) and the second (n2) operands and - calculates n1/n2. result is a - pointer to the variable that should hold the result of the operation. + The function receives pointers to the variables that are the first + (n1) and the second (n2) operands and + calculates n1/n2. result is a + pointer to the variable that should hold the result of the operation. - On success, 0 is returned and a negative value if the division fails. - If overflow or underflow occurred, the function returns - ECPG_INFORMIX_NUM_OVERFLOW or - ECPG_INFORMIX_NUM_UNDERFLOW respectively. If an attempt to - divide by zero is observed, the function returns - ECPG_INFORMIX_DIVIDE_ZERO. + On success, 0 is returned and a negative value if the division fails. + If overflow or underflow occurred, the function returns + ECPG_INFORMIX_NUM_OVERFLOW or + ECPG_INFORMIX_NUM_UNDERFLOW respectively. If an attempt to + divide by zero is observed, the function returns + ECPG_INFORMIX_DIVIDE_ZERO. @@ -2638,16 +2638,16 @@ int decdiv(decimal *n1, decimal *n2, decimal *result); int decmul(decimal *n1, decimal *n2, decimal *result); - The function receives pointers to the variables that are the first - (n1) and the second (n2) operands and - calculates n1*n2. result is a - pointer to the variable that should hold the result of the operation. + The function receives pointers to the variables that are the first + (n1) and the second (n2) operands and + calculates n1*n2. result is a + pointer to the variable that should hold the result of the operation. - On success, 0 is returned and a negative value if the multiplication - fails. If overflow or underflow occurred, the function returns - ECPG_INFORMIX_NUM_OVERFLOW or - ECPG_INFORMIX_NUM_UNDERFLOW respectively. + On success, 0 is returned and a negative value if the multiplication + fails. If overflow or underflow occurred, the function returns + ECPG_INFORMIX_NUM_OVERFLOW or + ECPG_INFORMIX_NUM_UNDERFLOW respectively. @@ -2660,16 +2660,16 @@ int decmul(decimal *n1, decimal *n2, decimal *result); int decsub(decimal *n1, decimal *n2, decimal *result); - The function receives pointers to the variables that are the first - (n1) and the second (n2) operands and - calculates n1-n2. result is a - pointer to the variable that should hold the result of the operation. + The function receives pointers to the variables that are the first + (n1) and the second (n2) operands and + calculates n1-n2. result is a + pointer to the variable that should hold the result of the operation. - On success, 0 is returned and a negative value if the subtraction - fails. If overflow or underflow occurred, the function returns - ECPG_INFORMIX_NUM_OVERFLOW or - ECPG_INFORMIX_NUM_UNDERFLOW respectively. + On success, 0 is returned and a negative value if the subtraction + fails. If overflow or underflow occurred, the function returns + ECPG_INFORMIX_NUM_OVERFLOW or + ECPG_INFORMIX_NUM_UNDERFLOW respectively. @@ -2678,28 +2678,28 @@ int decsub(decimal *n1, decimal *n2, decimal *result); dectoasc - Convert a variable of type decimal to its ASCII representation in a C - char* string. + Convert a variable of type decimal to its ASCII representation in a C + char* string. int dectoasc(decimal *np, char *cp, int len, int right) - The function receives a pointer to a variable of type decimal - (np) that it converts to its textual representation. - cp is the buffer that should hold the result of the - operation. The parameter right specifies, how many digits - right of the decimal point should be included in the output. The result - will be rounded to this number of decimal digits. Setting - right to -1 indicates that all available decimal digits - should be included in the output. If the length of the output buffer, - which is indicated by len is not sufficient to hold the - textual representation including the trailing NUL character, only a - single * character is stored in the result and -1 is - returned. - - - The function returns either -1 if the buffer cp was too - small or ECPG_INFORMIX_OUT_OF_MEMORY if memory was - exhausted. + The function receives a pointer to a variable of type decimal + (np) that it converts to its textual representation. + cp is the buffer that should hold the result of the + operation. The parameter right specifies, how many digits + right of the decimal point should be included in the output. The result + will be rounded to this number of decimal digits. Setting + right to -1 indicates that all available decimal digits + should be included in the output. If the length of the output buffer, + which is indicated by len is not sufficient to hold the + textual representation including the trailing NUL character, only a + single * character is stored in the result and -1 is + returned. + + + The function returns either -1 if the buffer cp was too + small or ECPG_INFORMIX_OUT_OF_MEMORY if memory was + exhausted. @@ -2712,13 +2712,13 @@ int dectoasc(decimal *np, char *cp, int len, int right) int dectodbl(decimal *np, double *dblp); - The function receives a pointer to the decimal value to convert - (np) and a pointer to the double variable that - should hold the result of the operation (dblp). + The function receives a pointer to the decimal value to convert + (np) and a pointer to the double variable that + should hold the result of the operation (dblp). - On success, 0 is returned and a negative value if the conversion - failed. + On success, 0 is returned and a negative value if the conversion + failed. @@ -2731,20 +2731,20 @@ int dectodbl(decimal *np, double *dblp); int dectoint(decimal *np, int *ip); - The function receives a pointer to the decimal value to convert - (np) and a pointer to the integer variable that - should hold the result of the operation (ip). + The function receives a pointer to the decimal value to convert + (np) and a pointer to the integer variable that + should hold the result of the operation (ip). - On success, 0 is returned and a negative value if the conversion - failed. If an overflow occurred, ECPG_INFORMIX_NUM_OVERFLOW - is returned. + On success, 0 is returned and a negative value if the conversion + failed. If an overflow occurred, ECPG_INFORMIX_NUM_OVERFLOW + is returned. - Note that the ecpg implementation differs from the Informix - implementation. Informix limits an integer to the range from -32767 to - 32767, while the limits in the ecpg implementation depend on the - architecture (-INT_MAX .. INT_MAX). + Note that the ecpg implementation differs from the Informix + implementation. Informix limits an integer to the range from -32767 to + 32767, while the limits in the ecpg implementation depend on the + architecture (-INT_MAX .. INT_MAX). @@ -2757,21 +2757,21 @@ int dectoint(decimal *np, int *ip); int dectolong(decimal *np, long *lngp); - The function receives a pointer to the decimal value to convert - (np) and a pointer to the long variable that - should hold the result of the operation (lngp). + The function receives a pointer to the decimal value to convert + (np) and a pointer to the long variable that + should hold the result of the operation (lngp). - On success, 0 is returned and a negative value if the conversion - failed. If an overflow occurred, ECPG_INFORMIX_NUM_OVERFLOW - is returned. + On success, 0 is returned and a negative value if the conversion + failed. If an overflow occurred, ECPG_INFORMIX_NUM_OVERFLOW + is returned. - Note that the ecpg implementation differs from the Informix - implementation. Informix limits a long integer to the range from - -2,147,483,647 to 2,147,483,647, while the limits in the ecpg - implementation depend on the architecture (-LONG_MAX .. - LONG_MAX). + Note that the ecpg implementation differs from the Informix + implementation. Informix limits a long integer to the range from + -2,147,483,647 to 2,147,483,647, while the limits in the ecpg + implementation depend on the architecture (-LONG_MAX .. + LONG_MAX). @@ -2784,21 +2784,21 @@ int dectolong(decimal *np, long *lngp); int rdatestr(date d, char *str); - The function receives two arguments, the first one is the date to - convert (d and the second one is a pointer to the target - string. The output format is always yyyy-mm-dd, so you need - to allocate at least 11 bytes (including the NUL-terminator) for the - string. + The function receives two arguments, the first one is the date to + convert (d and the second one is a pointer to the target + string. The output format is always yyyy-mm-dd, so you need + to allocate at least 11 bytes (including the NUL-terminator) for the + string. - The function returns 0 on success and a negative value in case of - error. + The function returns 0 on success and a negative value in case of + error. - Note that ecpg's implementation differs from the Informix - implementation. In Informix the format can be influenced by setting - environment variables. In ecpg however, you cannot change the output - format. + Note that ecpg's implementation differs from the Informix + implementation. In Informix the format can be influenced by setting + environment variables. In ecpg however, you cannot change the output + format. @@ -2811,15 +2811,15 @@ int rdatestr(date d, char *str); int rstrdate(char *str, date *d); - The function receives the textual representation of the date to convert - (str) and a pointer to a variable of type date - (d). This function does not allow you to specify a format - mask. It uses the default format mask of Informix which is - mm/dd/yyyy. Internally, this function is implemented by - means of rdefmtdate. Therefore, rstrdate is - not faster and if you have the choice you should opt for - rdefmtdate which allows you to specify the format mask - explicitly. + The function receives the textual representation of the date to convert + (str) and a pointer to a variable of type date + (d). This function does not allow you to specify a format + mask. It uses the default format mask of Informix which is + mm/dd/yyyy. Internally, this function is implemented by + means of rdefmtdate. Therefore, rstrdate is + not faster and if you have the choice you should opt for + rdefmtdate which allows you to specify the format mask + explicitly. The function returns the same values as rdefmtdate. @@ -2835,12 +2835,12 @@ int rstrdate(char *str, date *d); void rtoday(date *d); - The function receives a pointer to a date variable (d) - that it sets to the current date. + The function receives a pointer to a date variable (d) + that it sets to the current date. - Internally this function uses the - function. + Internally this function uses the + function. @@ -2849,23 +2849,23 @@ void rtoday(date *d); rjulmdy - Extract the values for the day, the month and the year from a variable - of type date. + Extract the values for the day, the month and the year from a variable + of type date. int rjulmdy(date d, short mdy[3]); - The function receives the date d and a pointer to an array - of 3 short integer values mdy. The variable name indicates - the sequential order: mdy[0] will be set to contain the - number of the month, mdy[1] will be set to the value of the - day and mdy[2] will contain the year. + The function receives the date d and a pointer to an array + of 3 short integer values mdy. The variable name indicates + the sequential order: mdy[0] will be set to contain the + number of the month, mdy[1] will be set to the value of the + day and mdy[2] will contain the year. The function always returns 0 at the moment. - Internally the function uses the - function. + Internally the function uses the + function. @@ -2874,22 +2874,22 @@ int rjulmdy(date d, short mdy[3]); rdefmtdate - Use a format mask to convert a character string to a value of type - date. + Use a format mask to convert a character string to a value of type + date. int rdefmtdate(date *d, char *fmt, char *str); - The function receives a pointer to the date value that should hold the - result of the operation (d), the format mask to use for - parsing the date (fmt) and the C char* string containing - the textual representation of the date (str). The textual - representation is expected to match the format mask. However you do not - need to have a 1:1 mapping of the string to the format mask. The - function only analyzes the sequential order and looks for the literals - yy or yyyy that indicate the - position of the year, mm to indicate the position of - the month and dd to indicate the position of the - day. + The function receives a pointer to the date value that should hold the + result of the operation (d), the format mask to use for + parsing the date (fmt) and the C char* string containing + the textual representation of the date (str). The textual + representation is expected to match the format mask. However you do not + need to have a 1:1 mapping of the string to the format mask. The + function only analyzes the sequential order and looks for the literals + yy or yyyy that indicate the + position of the year, mm to indicate the position of + the month and dd to indicate the position of the + day. The function returns the following values: @@ -2901,41 +2901,41 @@ int rdefmtdate(date *d, char *fmt, char *str); - ECPG_INFORMIX_ENOSHORTDATE - The date does not contain - delimiters between day, month and year. In this case the input - string must be exactly 6 or 8 bytes long but isn't. + ECPG_INFORMIX_ENOSHORTDATE - The date does not contain + delimiters between day, month and year. In this case the input + string must be exactly 6 or 8 bytes long but isn't. - ECPG_INFORMIX_ENOTDMY - The format string did not - correctly indicate the sequential order of year, month and day. + ECPG_INFORMIX_ENOTDMY - The format string did not + correctly indicate the sequential order of year, month and day. - ECPG_INFORMIX_BAD_DAY - The input string does not - contain a valid day. + ECPG_INFORMIX_BAD_DAY - The input string does not + contain a valid day. - ECPG_INFORMIX_BAD_MONTH - The input string does not - contain a valid month. + ECPG_INFORMIX_BAD_MONTH - The input string does not + contain a valid month. - ECPG_INFORMIX_BAD_YEAR - The input string does not - contain a valid year. + ECPG_INFORMIX_BAD_YEAR - The input string does not + contain a valid year. - + - Internally this function is implemented to use the function. See the reference there for a - table of example input. + Internally this function is implemented to use the function. See the reference there for a + table of example input. @@ -2944,21 +2944,21 @@ int rdefmtdate(date *d, char *fmt, char *str); rfmtdate - Convert a variable of type date to its textual representation using a - format mask. + Convert a variable of type date to its textual representation using a + format mask. int rfmtdate(date d, char *fmt, char *str); - The function receives the date to convert (d), the format - mask (fmt) and the string that will hold the textual - representation of the date (str). + The function receives the date to convert (d), the format + mask (fmt) and the string that will hold the textual + representation of the date (str). On success, 0 is returned and a negative value if an error occurred. - Internally this function uses the - function, see the reference there for examples. + Internally this function uses the + function, see the reference there for examples. @@ -2967,21 +2967,21 @@ int rfmtdate(date d, char *fmt, char *str); rmdyjul - Create a date value from an array of 3 short integers that specify the - day, the month and the year of the date. + Create a date value from an array of 3 short integers that specify the + day, the month and the year of the date. int rmdyjul(short mdy[3], date *d); - The function receives the array of the 3 short integers - (mdy) and a pointer to a variable of type date that should - hold the result of the operation. + The function receives the array of the 3 short integers + (mdy) and a pointer to a variable of type date that should + hold the result of the operation. Currently the function returns always 0. - Internally the function is implemented to use the function . + Internally the function is implemented to use the function . @@ -2994,50 +2994,50 @@ int rmdyjul(short mdy[3], date *d); int rdayofweek(date d); - The function receives the date variable d as its only - argument and returns an integer that indicates the day of the week for - this date. + The function receives the date variable d as its only + argument and returns an integer that indicates the day of the week for + this date. - 0 - Sunday + 0 - Sunday - 1 - Monday + 1 - Monday - 2 - Tuesday + 2 - Tuesday - 3 - Wednesday + 3 - Wednesday - 4 - Thursday + 4 - Thursday - 5 - Friday + 5 - Friday - 6 - Saturday + 6 - Saturday - Internally the function is implemented to use the function . + Internally the function is implemented to use the function . @@ -3050,8 +3050,8 @@ int rdayofweek(date d); void dtcurrent(timestamp *ts); - The function retrieves the current timestamp and saves it into the - timestamp variable that ts points to. + The function retrieves the current timestamp and saves it into the + timestamp variable that ts points to. @@ -3060,23 +3060,23 @@ void dtcurrent(timestamp *ts); dtcvasc - Parses a timestamp from its textual representation in ANSI standard - into a timestamp variable. + Parses a timestamp from its textual representation in ANSI standard + into a timestamp variable. int dtcvasc(char *str, timestamp *ts); - The function receives the string to parse (str) and a - pointer to the timestamp variable that should hold the result of the - operation (ts). + The function receives the string to parse (str) and a + pointer to the timestamp variable that should hold the result of the + operation (ts). - The function returns 0 on success and a negative value in case of - error. + The function returns 0 on success and a negative value in case of + error. - Internally this function uses the function. See the reference there - for a table with example inputs. + Internally this function uses the function. See the reference there + for a table with example inputs. @@ -3085,23 +3085,23 @@ int dtcvasc(char *str, timestamp *ts); dtcvfmtasc - Parses a timestamp from its textual representation in ANSI standard - using a format mask into a timestamp variable. + Parses a timestamp from its textual representation in ANSI standard + using a format mask into a timestamp variable. dtcvfmtasc(char *inbuf, char *fmtstr, timestamp *dtvalue) - The function receives the string to parse (inbuf), the - format mask to use (fmtstr) and a pointer to the timestamp - variable that should hold the result of the operation (ts). + The function receives the string to parse (inbuf), the + format mask to use (fmtstr) and a pointer to the timestamp + variable that should hold the result of the operation (ts). - This functions is implemented by means of the . See the documentation - there for a list of format specifiers that can be used. + This functions is implemented by means of the . See the documentation + there for a list of format specifiers that can be used. - The function returns 0 on success and a negative value in case of - error. + The function returns 0 on success and a negative value in case of + error. @@ -3110,19 +3110,19 @@ dtcvfmtasc(char *inbuf, char *fmtstr, timestamp *dtvalue) dtsub - Subtract one timestamp from another and return a variable of type - interval. + Subtract one timestamp from another and return a variable of type + interval. int dtsub(timestamp *ts1, timestamp *ts2, interval *iv); - The function will subtract the timestamp variable that ts2 - points to from the timestamp variable that ts1 points to - and will store the result in the interval variable that iv - points to. + The function will subtract the timestamp variable that ts2 + points to from the timestamp variable that ts1 points to + and will store the result in the interval variable that iv + points to. - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. @@ -3135,15 +3135,15 @@ int dtsub(timestamp *ts1, timestamp *ts2, interval *iv); int dttoasc(timestamp *ts, char *output); - The function receives a pointer to the timestamp variable to convert - (ts) and the string that should hold the result of the - operation output). It converts ts to its - textual representation in the ANSI SQL standard which is defined to - be YYYY-MM-DD HH:MM:SS. + The function receives a pointer to the timestamp variable to convert + (ts) and the string that should hold the result of the + operation output). It converts ts to its + textual representation in the ANSI SQL standard which is defined to + be YYYY-MM-DD HH:MM:SS. - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. @@ -3156,20 +3156,20 @@ int dttoasc(timestamp *ts, char *output); int dttofmtasc(timestamp *ts, char *output, int str_len, char *fmtstr); - The function receives a pointer to the timestamp to convert as its - first argument (ts), a pointer to the output buffer - (output), the maximal length that has been allocated for - the output buffer (str_len) and the format mask to - use for the conversion (fmtstr). + The function receives a pointer to the timestamp to convert as its + first argument (ts), a pointer to the output buffer + (output), the maximal length that has been allocated for + the output buffer (str_len) and the format mask to + use for the conversion (fmtstr). - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. - Internally, this function uses the function. See the reference there for - information on what format mask specifiers can be used. + Internally, this function uses the function. See the reference there for + information on what format mask specifiers can be used. @@ -3182,15 +3182,15 @@ int dttofmtasc(timestamp *ts, char *output, int str_len, char *fmtstr); int intoasc(interval *i, char *str); - The function receives a pointer to the interval variable to convert - (i) and the string that should hold the result of the - operation str). It converts i to its - textual representation in the ANSI SQL standard which is defined to - be YYYY-MM-DD HH:MM:SS. + The function receives a pointer to the interval variable to convert + (i) and the string that should hold the result of the + operation str). It converts i to its + textual representation in the ANSI SQL standard which is defined to + be YYYY-MM-DD HH:MM:SS. - Upon success, the function returns 0 and a negative value if an - error occurred. + Upon success, the function returns 0 and a negative value if an + error occurred. @@ -3199,84 +3199,84 @@ int intoasc(interval *i, char *str); rfmtlong - Convert a long integer value to its textual representation using a - format mask. + Convert a long integer value to its textual representation using a + format mask. int rfmtlong(long lng_val, char *fmt, char *outbuf); - The function receives the long value lng_val, the format - mask fmt and a pointer to the output buffer - outbuf. It converts the long value according to the format - mask to its textual representation. + The function receives the long value lng_val, the format + mask fmt and a pointer to the output buffer + outbuf. It converts the long value according to the format + mask to its textual representation. - The format mask can be composed of the following format specifying - characters: + The format mask can be composed of the following format specifying + characters: - * (asterisk) - if this position would be blank - otherwise, fill it with an asterisk. + * (asterisk) - if this position would be blank + otherwise, fill it with an asterisk. - & (ampersand) - if this position would be - blank otherwise, fill it with a zero. + & (ampersand) - if this position would be + blank otherwise, fill it with a zero. - # - turn leading zeroes into blanks. + # - turn leading zeroes into blanks. - < - left-justify the number in the string. + < - left-justify the number in the string. - , (comma) - group numbers of four or more digits - into groups of three digits separated by a comma. + , (comma) - group numbers of four or more digits + into groups of three digits separated by a comma. - . (period) - this character separates the - whole-number part of the number from the fractional part. + . (period) - this character separates the + whole-number part of the number from the fractional part. - - (minus) - the minus sign appears if the number - is a negative value. + - (minus) - the minus sign appears if the number + is a negative value. - + (plus) - the plus sign appears if the number is - a positive value. + + (plus) - the plus sign appears if the number is + a positive value. - ( - this replaces the minus sign in front of the - negative number. The minus sign will not appear. + ( - this replaces the minus sign in front of the + negative number. The minus sign will not appear. - ) - this character replaces the minus and is - printed behind the negative value. + ) - this character replaces the minus and is + printed behind the negative value. - $ - the currency symbol. + $ - the currency symbol. - + @@ -3289,8 +3289,8 @@ int rfmtlong(long lng_val, char *fmt, char *outbuf); void rupshift(char *str); - The function receives a pointer to the string and transforms every - lower case character to upper case. + The function receives a pointer to the string and transforms every + lower case character to upper case. @@ -3299,15 +3299,15 @@ void rupshift(char *str); byleng - Return the number of characters in a string without counting trailing - blanks. + Return the number of characters in a string without counting trailing + blanks. int byleng(char *str, int len); - The function expects a fixed-length string as its first argument - (str) and its length as its second argument - (len). It returns the number of significant characters, - that is the length of the string without trailing blanks. + The function expects a fixed-length string as its first argument + (str) and its length as its second argument + (len). It returns the number of significant characters, + that is the length of the string without trailing blanks. @@ -3320,13 +3320,13 @@ int byleng(char *str, int len); void ldchar(char *src, int len, char *dest); - The function receives the fixed-length string to copy - (src), its length (len) and a pointer to the - destination memory (dest). Note that you need to reserve at - least len+1 bytes for the string that dest - points to. The function copies at most len bytes to the new - location (less if the source string has trailing blanks) and adds the - null-terminator. + The function receives the fixed-length string to copy + (src), its length (len) and a pointer to the + destination memory (dest). Note that you need to reserve at + least len+1 bytes for the string that dest + points to. The function copies at most len bytes to the new + location (less if the source string has trailing blanks) and adds the + null-terminator. @@ -3387,61 +3387,61 @@ int rtypwidth(int sqltype, int sqllen); int rsetnull(int t, char *ptr); - The function receives an integer that indicates the type of the - variable and a pointer to the variable itself that is casted to a C - char* pointer. + The function receives an integer that indicates the type of the + variable and a pointer to the variable itself that is casted to a C + char* pointer. The following types exist: - CCHARTYPE - For a variable of type char or char* + CCHARTYPE - For a variable of type char or char* - CSHORTTYPE - For a variable of type short int + CSHORTTYPE - For a variable of type short int - CINTTYPE - For a variable of type int + CINTTYPE - For a variable of type int - CBOOLTYPE - For a variable of type boolean + CBOOLTYPE - For a variable of type boolean - CFLOATTYPE - For a variable of type float + CFLOATTYPE - For a variable of type float - CLONGTYPE - For a variable of type long + CLONGTYPE - For a variable of type long - CDOUBLETYPE - For a variable of type double + CDOUBLETYPE - For a variable of type double - CDECIMALTYPE - For a variable of type decimal + CDECIMALTYPE - For a variable of type decimal - CDATETYPE - For a variable of type date + CDATETYPE - For a variable of type date - CDTIMETYPE - For a variable of type timestamp + CDTIMETYPE - For a variable of type timestamp @@ -3470,10 +3470,10 @@ rsetnull(CINTTYPE, (char *) &i); int risnull(int t, char *ptr); - The function receives the type of the variable to test (t) - as well a pointer to this variable (ptr). Note that the - latter needs to be casted to a char*. See the function for a list of possible variable types. + The function receives the type of the variable to test (t) + as well a pointer to this variable (ptr). Note that the + latter needs to be casted to a char*. See the function for a list of possible variable types. Here is an example of how to use this function: @@ -3507,9 +3507,9 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_NUM_OVERFLOW - Functions return this value if an overflow occurred in a - calculation. Internally it is defined to -1200 (the Informix - definition). + Functions return this value if an overflow occurred in a + calculation. Internally it is defined to -1200 (the Informix + definition). @@ -3518,8 +3518,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_NUM_UNDERFLOW - Functions return this value if an underflow occurred in a calculation. - Internally it is defined to -1201 (the Informix definition). + Functions return this value if an underflow occurred in a calculation. + Internally it is defined to -1201 (the Informix definition). @@ -3528,8 +3528,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_DIVIDE_ZERO - Functions return this value if an attempt to divide by zero is - observed. Internally it is defined to -1202 (the Informix definition). + Functions return this value if an attempt to divide by zero is + observed. Internally it is defined to -1202 (the Informix definition). @@ -3538,9 +3538,9 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_BAD_YEAR - Functions return this value if a bad value for a year was found while - parsing a date. Internally it is defined to -1204 (the Informix - definition). + Functions return this value if a bad value for a year was found while + parsing a date. Internally it is defined to -1204 (the Informix + definition). @@ -3549,9 +3549,9 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_BAD_MONTH - Functions return this value if a bad value for a month was found while - parsing a date. Internally it is defined to -1205 (the Informix - definition). + Functions return this value if a bad value for a month was found while + parsing a date. Internally it is defined to -1205 (the Informix + definition). @@ -3560,9 +3560,9 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_BAD_DAY - Functions return this value if a bad value for a day was found while - parsing a date. Internally it is defined to -1206 (the Informix - definition). + Functions return this value if a bad value for a day was found while + parsing a date. Internally it is defined to -1206 (the Informix + definition). @@ -3571,9 +3571,9 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_ENOSHORTDATE - Functions return this value if a parsing routine needs a short date - representation but did not get the date string in the right length. - Internally it is defined to -1209 (the Informix definition). + Functions return this value if a parsing routine needs a short date + representation but did not get the date string in the right length. + Internally it is defined to -1209 (the Informix definition). @@ -3582,8 +3582,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_DATE_CONVERT - Functions return this value if Internally it is defined to -1210 (the - Informix definition). + Functions return this value if Internally it is defined to -1210 (the + Informix definition). @@ -3592,8 +3592,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_OUT_OF_MEMORY - Functions return this value if Internally it is defined to -1211 (the - Informix definition). + Functions return this value if Internally it is defined to -1211 (the + Informix definition). @@ -3602,9 +3602,9 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_ENOTDMY - Functions return this value if a parsing routine was supposed to get a - format mask (like mmddyy) but not all fields were listed - correctly. Internally it is defined to -1212 (the Informix definition). + Functions return this value if a parsing routine was supposed to get a + format mask (like mmddyy) but not all fields were listed + correctly. Internally it is defined to -1212 (the Informix definition). @@ -3613,11 +3613,11 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_BAD_NUMERIC - Functions return this value either if a parsing routine cannot parse - the textual representation for a numeric value because it contains - errors or if a routine cannot complete a calculation involving numeric - variables because at least one of the numeric variables is invalid. - Internally it is defined to -1213 (the Informix definition). + Functions return this value either if a parsing routine cannot parse + the textual representation for a numeric value because it contains + errors or if a routine cannot complete a calculation involving numeric + variables because at least one of the numeric variables is invalid. + Internally it is defined to -1213 (the Informix definition). @@ -3626,8 +3626,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_BAD_EXPONENT - Functions return this value if Internally it is defined to -1216 (the - Informix definition). + Functions return this value if Internally it is defined to -1216 (the + Informix definition). @@ -3636,8 +3636,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_BAD_DATE - Functions return this value if Internally it is defined to -1218 (the - Informix definition). + Functions return this value if Internally it is defined to -1218 (the + Informix definition). @@ -3646,8 +3646,8 @@ risnull(CINTTYPE, (char *) &i); ECPG_INFORMIX_EXTRA_CHARS - Functions return this value if Internally it is defined to -1264 (the - Informix definition). + Functions return this value if Internally it is defined to -1264 (the + Informix definition). diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 76b150a9d2..207d836eaf 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -4804,15 +4804,15 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); An ISO week date (as distinct from a Gregorian date) can be specified to to_timestamp and to_date in one of two ways: - - Year, week and weekday, for example to_date('2006-42-4', 'IYYY-IW-ID') returns the date 2006-10-19. If you omit the weekday it is assumed to be 1 (Monday). - - - - - Year and day of year, for example to_date('2006-291', 'IYYY-IDDD') also returns 2006-10-19. - - + + Year, week and weekday, for example to_date('2006-42-4', 'IYYY-IW-ID') returns the date 2006-10-19. If you omit the weekday it is assumed to be 1 (Monday). + + + + + Year and day of year, for example to_date('2006-291', 'IYYY-IDDD') also returns 2006-10-19. + + diff --git a/doc/src/sgml/geqo.sgml b/doc/src/sgml/geqo.sgml index f81ef41548..6225dc4c32 100644 --- a/doc/src/sgml/geqo.sgml +++ b/doc/src/sgml/geqo.sgml @@ -1,4 +1,4 @@ - + @@ -50,7 +50,7 @@ PostgreSQL) to process individual joins and a diversity of indexes (e.g., B-tree, hash, GiST and GIN in PostgreSQL) as - access paths for relations. + access paths for relations. diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml index 4c5f585566..842ce0167d 100644 --- a/doc/src/sgml/gin.sgml +++ b/doc/src/sgml/gin.sgml @@ -1,4 +1,4 @@ - + GIN Indexes @@ -100,12 +100,12 @@ to consult n to determine the data type of query and the key values that need to be extracted. The number of returned keys must be stored into *nkeys. - If number of keys is equal to zero then extractQuery - should store 0 or -1 into *nkeys. 0 means that any - row matches the query and sequence scan should be - produced. -1 means nothing can satisfy query. - Choice of value should be based on semantics meaning of operation with - given strategy number. + If number of keys is equal to zero then extractQuery + should store 0 or -1 into *nkeys. 0 means that any + row matches the query and sequence scan should be + produced. -1 means nothing can satisfy query. + Choice of value should be based on semantics meaning of operation with + given strategy number. diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index dd8ab08fe2..4dbf47ac50 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,4 +1,4 @@ - + <application>libpq</application> - C Library @@ -334,9 +334,9 @@ PGconn *PQsetdbLogin(const char *pghost, If the dbName contains an = sign, it - is taken as a conninfo string in exactly the same way as - if it had been passed to PQconnectdb, and the remaining - parameters are then applied as above. + is taken as a conninfo string in exactly the same way as + if it had been passed to PQconnectdb, and the remaining + parameters are then applied as above. @@ -4486,8 +4486,8 @@ ldap://ldap.mycompany.com/dc=mycompany,dc=com?uniqueMember?one?(cn=mydatabase) do not reveal secret keys to the application. Instead, applications delegate all cryptography operations which require the secret key to the hardware token. - - + + If the file ~/.postgresql/root.crt is present in the user's home directory, diff --git a/doc/src/sgml/mvcc.sgml b/doc/src/sgml/mvcc.sgml index 0fcc984cd6..19e068e4ff 100644 --- a/doc/src/sgml/mvcc.sgml +++ b/doc/src/sgml/mvcc.sgml @@ -1,4 +1,4 @@ - + Concurrency Control @@ -754,7 +754,7 @@ SELECT SUM(value) FROM mytab WHERE class = 2; - + Modes AS RS @@ -764,10 +764,10 @@ SELECT SUM(value) FROM mytab WHERE class = 2; SRE E AE - - - - + + + + AS Y Y @@ -777,8 +777,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; Y Y N - - + + RS Y Y @@ -788,8 +788,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; Y N N - - + + RE Y Y @@ -799,8 +799,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; N N N - - + + SUE Y Y @@ -810,8 +810,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; N N N - - + + S Y Y @@ -821,8 +821,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; N N N - - + + SRE Y Y @@ -832,8 +832,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; N N N - - + + E Y N @@ -843,8 +843,8 @@ SELECT SUM(value) FROM mytab WHERE class = 2; N N N - - + + AE N N @@ -854,10 +854,10 @@ SELECT SUM(value) FROM mytab WHERE class = 2; N N N - - - - + + + + diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml index 1983f89f28..8ba9362e4c 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,4 +1,4 @@ - + PL/Perl - Perl Procedural Language @@ -649,19 +649,19 @@ $$ LANGUAGE plperl; - For security reasons, to stop a leak of privileged operations from + For security reasons, to stop a leak of privileged operations from PL/PerlU to PL/Perl, these two languages - have to run in separate instances of the Perl interpreter. If your - Perl installation has been appropriately compiled, this is not a problem. - However, not all installations are compiled with the requisite flags. - If PostgreSQL detects that this is the case then it will - not start a second interpreter, but instead create an error. In - consequence, in such an installation, you cannot use both - PL/PerlU and PL/Perl in the same backend - process. The remedy for this is to obtain a Perl installation created - with the appropriate flags, namely either usemultiplicity or - both usethreads and useithreads. - For more details,see the perlembed manual page. + have to run in separate instances of the Perl interpreter. If your + Perl installation has been appropriately compiled, this is not a problem. + However, not all installations are compiled with the requisite flags. + If PostgreSQL detects that this is the case then it will + not start a second interpreter, but instead create an error. In + consequence, in such an installation, you cannot use both + PL/PerlU and PL/Perl in the same backend + process. The remedy for this is to obtain a Perl installation created + with the appropriate flags, namely either usemultiplicity or + both usethreads and useithreads. + For more details,see the perlembed manual page. diff --git a/doc/src/sgml/sql.sgml b/doc/src/sgml/sql.sgml index 02d9f2c0ff..98ed6e1331 100644 --- a/doc/src/sgml/sql.sgml +++ b/doc/src/sgml/sql.sgml @@ -1,4 +1,4 @@ - + SQL @@ -414,139 +414,139 @@ attributes are taken from. We often write a relation scheme as - SELECT (σ): extracts tuples from - a relation that - satisfy a given restriction. Let R be a - table that contains an attribute - A. + SELECT (σ): extracts tuples from + a relation that + satisfy a given restriction. Let R be a + table that contains an attribute + A. σA=a(R) = {t ∈ R ∣ t(A) = a} - where t denotes a - tuple of R and t(A) - denotes the value of attribute A of - tuple t. + where t denotes a + tuple of R and t(A) + denotes the value of attribute A of + tuple t. - PROJECT (π): extracts specified - attributes (columns) from a - relation. Let R be a relation - that contains an attribute X. - πX(R) = {t(X) ∣ t ∈ R}, - where t(X) denotes the value of - attribute X of tuple t. + PROJECT (π): extracts specified + attributes (columns) from a + relation. Let R be a relation + that contains an attribute X. + πX(R) = {t(X) ∣ t ∈ R}, + where t(X) denotes the value of + attribute X of tuple t. - PRODUCT (×): builds the Cartesian product of two - relations. Let R be a table with arity - k1 and let - S be a table with - arity k2. - R × S - is the set of all - k1 - + k2-tuples - whose first k1 - components form a tuple in R and whose last - k2 components form a - tuple in S. + PRODUCT (×): builds the Cartesian product of two + relations. Let R be a table with arity + k1 and let + S be a table with + arity k2. + R × S + is the set of all + k1 + + k2-tuples + whose first k1 + components form a tuple in R and whose last + k2 components form a + tuple in S. - UNION (∪): builds the set-theoretic union of two - tables. Given the tables R and - S (both must have the same arity), - the union RS - is the set of tuples that are in R - or S or both. + UNION (∪): builds the set-theoretic union of two + tables. Given the tables R and + S (both must have the same arity), + the union RS + is the set of tuples that are in R + or S or both. - INTERSECT (∩): builds the set-theoretic intersection of two - tables. Given the tables R and - S, - RS is the - set of tuples - that are in R and in - S. - We again require that R and - S have the - same arity. + INTERSECT (∩): builds the set-theoretic intersection of two + tables. Given the tables R and + S, + RS is the + set of tuples + that are in R and in + S. + We again require that R and + S have the + same arity. - DIFFERENCE (− or ∖): builds the set difference of - two tables. Let R and S - again be two tables with the same - arity. R - S - is the set of tuples in R but not in - S. + DIFFERENCE (− or ∖): builds the set difference of + two tables. Let R and S + again be two tables with the same + arity. R - S + is the set of tuples in R but not in + S. - JOIN (∏): connects two tables by their common - attributes. Let R be a table with the - attributes A,B - and C and - let S be a table with the attributes - C,D - and E. There is one - attribute common to both relations, - the attribute C. + JOIN (∏): connects two tables by their common + attributes. Let R be a table with the + attributes A,B + and C and + let S be a table with the attributes + C,D + and E. There is one + attribute common to both relations, + the attribute C. - R ∏ S = πR.A,R.B,R.C,S.D,S.ER.C=S.C(R × S)). - What are we doing here? We first calculate the Cartesian - product - R × S. - Then we select those tuples whose values for the common - attribute C are equal - (σR.C = S.C). - Now we have a table - that contains the attribute C - two times and we correct this by - projecting out the duplicate column. + R ∏ S = πR.A,R.B,R.C,S.D,S.ER.C=S.C(R × S)). + What are we doing here? We first calculate the Cartesian + product + R × S. + Then we select those tuples whose values for the common + attribute C are equal + (σR.C = S.C). + Now we have a table + that contains the attribute C + two times and we correct this by + projecting out the duplicate column. - An Inner Join + An Inner Join - - Let's have a look at the tables that are produced by evaluating the steps - necessary for a join. - Let the following two tables be given: + + Let's have a look at the tables that are produced by evaluating the steps + necessary for a join. + Let the following two tables be given: - + R: S: A | B | C C | D | E ---+---+--- ---+---+--- 1 | 2 | 3 3 | a | b 4 | 5 | 6 6 | c | d 7 | 8 | 9 - - + + - First we calculate the Cartesian product - R × S and - get: + First we calculate the Cartesian product + R × S and + get: - + R x S: A | B | R.C | S.C | D | E ---+---+-----+-----+---+--- @@ -556,66 +556,66 @@ R x S: 4 | 5 | 6 | 6 | c | d 7 | 8 | 9 | 3 | a | b 7 | 8 | 9 | 6 | c | d - + - After the selection - σR.C=S.C(R × S) - we get: + After the selection + σR.C=S.C(R × S) + we get: - + A | B | R.C | S.C | D | E ---+---+-----+-----+---+--- 1 | 2 | 3 | 3 | a | b 4 | 5 | 6 | 6 | c | d - + - To remove the duplicate column - S.C - we project it out by the following operation: - πR.A,R.B,R.C,S.D,S.ER.C=S.C(R × S)) - and get: + To remove the duplicate column + S.C + we project it out by the following operation: + πR.A,R.B,R.C,S.D,S.ER.C=S.C(R × S)) + and get: - + A | B | C | D | E ---+---+---+---+--- 1 | 2 | 3 | a | b 4 | 5 | 6 | c | d - + - DIVIDE (÷): Let R be a table - with the attributes A, B, C, and D and let - S be a table with the attributes - C and D. - Then we define the division as: + DIVIDE (÷): Let R be a table + with the attributes A, B, C, and D and let + S be a table with the attributes + C and D. + Then we define the division as: - + R ÷ S = {t ∣ ∀ ts ∈ S ∃ tr ∈ R - + - such that + such that tr(A,B)=t∧tr(C,D)=ts} - where - tr(x,y) - denotes a - tuple of table R that consists only of - the components x and y. - Note that the tuple t only consists of the - components A and - B of relation R. + where + tr(x,y) + denotes a + tuple of table R that consists only of + the components x and y. + Note that the tuple t only consists of the + components A and + B of relation R. - Given the following tables + Given the following tables - + R: S: A | B | C | D C | D ---+---+---+--- ---+--- @@ -625,17 +625,17 @@ R: S: e | d | c | d e | d | e | f a | b | d | e - + - R ÷ S - is derived as + R ÷ S + is derived as - + A | B ---+--- a | b e | d - + @@ -691,16 +691,16 @@ R: S: - The Domain Relational Calculus - (DRC), where variables - stand for components (attributes) of the tuples. + The Domain Relational Calculus + (DRC), where variables + stand for components (attributes) of the tuples. - The Tuple Relational Calculus - (TRC), where variables stand for tuples. + The Tuple Relational Calculus + (TRC), where variables stand for tuples. @@ -883,98 +883,98 @@ SELECT [ ALL | DISTINCT [ ON ( expression Simple Query with Qualification - To retrieve all tuples from table PART where the attribute PRICE is - greater than 10 we formulate the following query: + To retrieve all tuples from table PART where the attribute PRICE is + greater than 10 we formulate the following query: - + SELECT * FROM PART WHERE PRICE > 10; - + - and get the table: + and get the table: - + PNO | PNAME | PRICE -----+---------+-------- 3 | Bolt | 15 4 | Cam | 25 - + - Using * in the SELECT statement - will deliver all attributes from the table. If we want to retrieve - only the attributes PNAME and PRICE from table PART we use the - statement: + Using * in the SELECT statement + will deliver all attributes from the table. If we want to retrieve + only the attributes PNAME and PRICE from table PART we use the + statement: - + SELECT PNAME, PRICE FROM PART WHERE PRICE > 10; - + - In this case the result is: + In this case the result is: - + PNAME | PRICE --------+-------- Bolt | 15 Cam | 25 - + - Note that the SQL SELECT - corresponds to the projection in relational algebra - not to the selection (see for more details). + Note that the SQL SELECT + corresponds to the projection in relational algebra + not to the selection (see for more details). - The qualifications in the WHERE clause can also be logically connected - using the keywords OR, AND, and NOT: + The qualifications in the WHERE clause can also be logically connected + using the keywords OR, AND, and NOT: - + SELECT PNAME, PRICE FROM PART WHERE PNAME = 'Bolt' AND (PRICE = 0 OR PRICE <= 15); - + - will lead to the result: + will lead to the result: - + PNAME | PRICE --------+-------- Bolt | 15 - + - Arithmetic operations can be used in the target list and in the WHERE - clause. For example if we want to know how much it would cost if we - take two pieces of a part we could use the following query: + Arithmetic operations can be used in the target list and in the WHERE + clause. For example if we want to know how much it would cost if we + take two pieces of a part we could use the following query: - + SELECT PNAME, PRICE * 2 AS DOUBLE FROM PART WHERE PRICE * 2 < 50; - + - and we get: + and we get: - + PNAME | DOUBLE --------+--------- Screw | 20 Nut | 16 Bolt | 30 - - - Note that the word DOUBLE after the keyword AS is the new title of the - second column. This technique can be used for every element of the - target list to assign a new title to the resulting - column. This new title - is often referred to as alias. The alias cannot be used throughout the - rest of the query. + + + Note that the word DOUBLE after the keyword AS is the new title of the + second column. This technique can be used for every element of the + target list to assign a new title to the resulting + column. This new title + is often referred to as alias. The alias cannot be used throughout the + rest of the query. @@ -1032,15 +1032,15 @@ SELECT S.SNAME, P.PNAME columns but S.SNAME and P.PNAME. - - Another way to perform joins is to use the SQL JOIN syntax as follows: - + + Another way to perform joins is to use the SQL JOIN syntax as follows: + select sname, pname from supplier - JOIN sells USING (sno) - JOIN part USING (pno); - - giving again: - + JOIN sells USING (sno) + JOIN part USING (pno); + + giving again: + sname | pname -------+------- Smith | Screw @@ -1052,197 +1052,197 @@ select sname, pname from supplier Jones | Cam Blake | Cam (8 rows) - - - - - A joined table, created using JOIN syntax, is a table reference list - item that occurs in a FROM clause and before any WHERE, GROUP BY, - or HAVING clause. Other table references, including table names or - other JOIN clauses, can be included in the FROM clause if separated - by commas. JOINed tables are logically like any other - table listed in the FROM clause. - - - - SQL JOINs come in two main types, CROSS JOINs (unqualified joins) - and qualified JOINs. Qualified joins can be further - subdivided based on the way in which the join condition - is specified (ON, USING, or NATURAL) and the way in which it is - applied (INNER or OUTER join). - + + + + + A joined table, created using JOIN syntax, is a table reference list + item that occurs in a FROM clause and before any WHERE, GROUP BY, + or HAVING clause. Other table references, including table names or + other JOIN clauses, can be included in the FROM clause if separated + by commas. JOINed tables are logically like any other + table listed in the FROM clause. + + + + SQL JOINs come in two main types, CROSS JOINs (unqualified joins) + and qualified JOINs. Qualified joins can be further + subdivided based on the way in which the join condition + is specified (ON, USING, or NATURAL) and the way in which it is + applied (INNER or OUTER join). + Join Types CROSS JOIN - - - T1 - CROSS JOIN - T2 + + + T1 + CROSS JOIN + T2 + + + + A cross join takes two tables T1 and T2 having N and M rows + respectively, and returns a joined table containing all + N*M possible joined rows. For each row R1 of T1, each row + R2 of T2 is joined with R1 to yield a joined table row JR + consisting of all fields in R1 and R2. A CROSS JOIN is + equivalent to an INNER JOIN ON TRUE. + + + + + + Qualified JOINs + + + + T1 + NATURAL + + INNER + + + LEFT + RIGHT + FULL + + OUTER + + + JOIN + T2 + + ON search condition + USING ( join column list ) + - - A cross join takes two tables T1 and T2 having N and M rows - respectively, and returns a joined table containing all - N*M possible joined rows. For each row R1 of T1, each row - R2 of T2 is joined with R1 to yield a joined table row JR - consisting of all fields in R1 and R2. A CROSS JOIN is - equivalent to an INNER JOIN ON TRUE. - - - - - - Qualified JOINs - - - - T1 - NATURAL - - INNER - - - LEFT - RIGHT - FULL - - OUTER - - - JOIN - T2 - - ON search condition - USING ( join column list ) - - - - - A qualified JOIN must specify its join condition - by providing one (and only one) of NATURAL, ON, or - USING. The ON clause - takes a search condition, - which is the same as in a WHERE clause. The USING - clause takes a comma-separated list of column names, - which the joined tables must have in common, and joins - the tables on equality of those columns. NATURAL is - shorthand for a USING clause that lists all the common - column names of the two tables. A side-effect of both - USING and NATURAL is that only one copy of each joined - column is emitted into the result table (compare the - relational-algebra definition of JOIN, shown earlier). - - - - - - - - INNER - JOIN - - - - - For each row R1 of T1, the joined table has a row for each row - in T2 that satisfies the join condition with R1. - - - - The words INNER and OUTER are optional for all JOINs. - INNER is the default. LEFT, RIGHT, and FULL imply an - OUTER JOIN. - - - - - - - - LEFT - OUTER - JOIN - - - - + + A qualified JOIN must specify its join condition + by providing one (and only one) of NATURAL, ON, or + USING. The ON clause + takes a search condition, + which is the same as in a WHERE clause. The USING + clause takes a comma-separated list of column names, + which the joined tables must have in common, and joins + the tables on equality of those columns. NATURAL is + shorthand for a USING clause that lists all the common + column names of the two tables. A side-effect of both + USING and NATURAL is that only one copy of each joined + column is emitted into the result table (compare the + relational-algebra definition of JOIN, shown earlier). + + + + + + + + INNER + JOIN + + + + + For each row R1 of T1, the joined table has a row for each row + in T2 that satisfies the join condition with R1. + + + + The words INNER and OUTER are optional for all JOINs. + INNER is the default. LEFT, RIGHT, and FULL imply an + OUTER JOIN. + + + + + + + + LEFT + OUTER + JOIN + + + + First, an INNER JOIN is performed. Then, for each row in T1 that does not satisfy the join - condition with any row in T2, an additional joined row is - returned with null fields in the columns from T2. - - - - The joined table unconditionally has a row for each row in T1. - - - - - - - - RIGHT - OUTER - JOIN - - - - + condition with any row in T2, an additional joined row is + returned with null fields in the columns from T2. + + + + The joined table unconditionally has a row for each row in T1. + + + + + + + + RIGHT + OUTER + JOIN + + + + First, an INNER JOIN is performed. Then, for each row in T2 that does not satisfy the join - condition with any row in T1, an additional joined row is - returned with null fields in the columns from T1. - - - - The joined table unconditionally has a row for each row in T2. - - - - - - - - FULL - OUTER - JOIN - - - - + condition with any row in T1, an additional joined row is + returned with null fields in the columns from T1. + + + + The joined table unconditionally has a row for each row in T2. + + + + + + + + FULL + OUTER + JOIN + + + + First, an INNER JOIN is performed. Then, for each row in T1 that does not satisfy the join - condition with any row in T2, an additional joined row is - returned with null fields in the columns from T2. + condition with any row in T2, an additional joined row is + returned with null fields in the columns from T2. Also, for each row in T2 that does not satisfy the join - condition with any row in T1, an additional joined row is - returned with null fields in the columns from T1. - - - - The joined table unconditionally has a row for every row of T1 - and a row for every row of T2. - - - - - - - - + condition with any row in T1, an additional joined row is + returned with null fields in the columns from T1. + + + + The joined table unconditionally has a row for every row of T1 + and a row for every row of T2. + + + + + + + + - + - - JOINs of all types can be chained together or nested where either or both of - T1 and - T2 can be JOINed tables. - Parenthesis can be used around JOIN clauses to control the order - of JOINs which are otherwise processed left to right. - + + JOINs of all types can be chained together or nested where either or both of + T1 and + T2 can be JOINed tables. + Parenthesis can be used around JOIN clauses to control the order + of JOINs which are otherwise processed left to right. + @@ -1264,41 +1264,41 @@ select sname, pname from supplier Aggregates - If we want to know the average cost of all parts in table PART we use - the following query: + If we want to know the average cost of all parts in table PART we use + the following query: - + SELECT AVG(PRICE) AS AVG_PRICE FROM PART; - + - The result is: + The result is: - + AVG_PRICE ----------- 14.5 - + - If we want to know how many parts are defined in table PART we use - the statement: + If we want to know how many parts are defined in table PART we use + the statement: - + SELECT COUNT(PNO) FROM PART; - + - and get: + and get: - + COUNT ------- 4 - + @@ -1332,34 +1332,34 @@ SELECT COUNT(PNO) Aggregates - If we want to know how many parts are sold by every supplier we - formulate the query: + If we want to know how many parts are sold by every supplier we + formulate the query: - + SELECT S.SNO, S.SNAME, COUNT(SE.PNO) FROM SUPPLIER S, SELLS SE WHERE S.SNO = SE.SNO GROUP BY S.SNO, S.SNAME; - + - and get: + and get: - + SNO | SNAME | COUNT -----+-------+------- 1 | Smith | 2 2 | Jones | 1 3 | Adams | 2 4 | Blake | 3 - + - Now let's have a look of what is happening here. - First the join of the - tables SUPPLIER and SELLS is derived: + Now let's have a look of what is happening here. + First the join of the + tables SUPPLIER and SELLS is derived: - + S.SNO | S.SNAME | SE.PNO -------+---------+-------- 1 | Smith | 1 @@ -1370,14 +1370,14 @@ SELECT S.SNO, S.SNAME, COUNT(SE.PNO) 4 | Blake | 2 4 | Blake | 3 4 | Blake | 4 - + - Next we partition the tuples into groups by putting all tuples - together that agree on both attributes S.SNO and S.SNAME: + Next we partition the tuples into groups by putting all tuples + together that agree on both attributes S.SNO and S.SNAME: - + S.SNO | S.SNAME | SE.PNO -------+---------+-------- 1 | Smith | 1 @@ -1391,13 +1391,13 @@ SELECT S.SNO, S.SNAME, COUNT(SE.PNO) 4 | Blake | 2 | 3 | 4 - + - In our example we got four groups and now we can apply the aggregate - function COUNT to every group leading to the final result of the query - given above. + In our example we got four groups and now we can apply the aggregate + function COUNT to every group leading to the final result of the query + given above. @@ -1439,26 +1439,26 @@ SELECT S.SNO, S.SNAME, COUNT(SE.PNO) Having - If we want only those suppliers selling more than one part we use the - query: + If we want only those suppliers selling more than one part we use the + query: - + SELECT S.SNO, S.SNAME, COUNT(SE.PNO) FROM SUPPLIER S, SELLS SE WHERE S.SNO = SE.SNO GROUP BY S.SNO, S.SNAME HAVING COUNT(SE.PNO) > 1; - + - and get: + and get: - + SNO | SNAME | COUNT -----+-------+------- 1 | Smith | 2 3 | Adams | 2 4 | Blake | 3 - + @@ -1478,64 +1478,64 @@ SELECT S.SNO, S.SNAME, COUNT(SE.PNO) Subselect - If we want to know all parts having a greater price than the part - named 'Screw' we use the query: + If we want to know all parts having a greater price than the part + named 'Screw' we use the query: - + SELECT * FROM PART WHERE PRICE > (SELECT PRICE FROM PART WHERE PNAME='Screw'); - + - The result is: + The result is: - + PNO | PNAME | PRICE -----+---------+-------- 3 | Bolt | 15 4 | Cam | 25 - + - When we look at the above query we can see the keyword - SELECT two times. The first one at the - beginning of the query - we will refer to it as outer - SELECT - and the one in the WHERE clause which - begins a nested query - we will refer to it as inner - SELECT. For every tuple of the outer - SELECT the inner SELECT has - to be evaluated. After every evaluation we know the price of the - tuple named 'Screw' and we can check if the price of the actual - tuple is greater. (Actually, in this example the inner query need - only be evaluated once, since it does not depend on the state of - the outer query.) + When we look at the above query we can see the keyword + SELECT two times. The first one at the + beginning of the query - we will refer to it as outer + SELECT - and the one in the WHERE clause which + begins a nested query - we will refer to it as inner + SELECT. For every tuple of the outer + SELECT the inner SELECT has + to be evaluated. After every evaluation we know the price of the + tuple named 'Screw' and we can check if the price of the actual + tuple is greater. (Actually, in this example the inner query need + only be evaluated once, since it does not depend on the state of + the outer query.) - If we want to know all suppliers that do not sell any part - (e.g. to be able to remove these suppliers from the database) we use: + If we want to know all suppliers that do not sell any part + (e.g. to be able to remove these suppliers from the database) we use: - + SELECT * FROM SUPPLIER S WHERE NOT EXISTS (SELECT * FROM SELLS SE WHERE SE.SNO = S.SNO); - + - In our example the result will be empty because every supplier - sells at least one part. Note that we use S.SNO from the outer - SELECT within the WHERE clause of the inner - SELECT. Here the subquery must be evaluated - afresh for each tuple from the outer query, i.e. the value for - S.SNO is always taken from the current tuple of the outer - SELECT. + In our example the result will be empty because every supplier + sells at least one part. Note that we use S.SNO from the outer + SELECT within the WHERE clause of the inner + SELECT. Here the subquery must be evaluated + afresh for each tuple from the outer query, i.e. the value for + S.SNO is always taken from the current tuple of the outer + SELECT. @@ -1557,19 +1557,19 @@ SELECT * If we want to know the highest average part price among all our - suppliers, we cannot write MAX(AVG(PRICE)), but we can write: + suppliers, we cannot write MAX(AVG(PRICE)), but we can write: - + SELECT MAX(subtable.avgprice) FROM (SELECT AVG(P.PRICE) AS avgprice FROM SUPPLIER S, PART P, SELLS SE WHERE S.SNO = SE.SNO AND P.PNO = SE.PNO GROUP BY S.SNO) subtable; - + - The subquery returns one row per supplier (because of its GROUP BY) - and then we aggregate over those rows in the outer query. + The subquery returns one row per supplier (because of its GROUP BY) + and then we aggregate over those rows in the outer query. @@ -1586,9 +1586,9 @@ SELECT MAX(subtable.avgprice) Union, Intersect, Except - The following query is an example for UNION: + The following query is an example for UNION: - + SELECT S.SNO, S.SNAME, S.CITY FROM SUPPLIER S WHERE S.SNAME = 'Jones' @@ -1596,22 +1596,22 @@ UNION SELECT S.SNO, S.SNAME, S.CITY FROM SUPPLIER S WHERE S.SNAME = 'Adams'; - + gives the result: - + SNO | SNAME | CITY -----+-------+-------- 2 | Jones | Paris 3 | Adams | Vienna - + - Here is an example for INTERSECT: + Here is an example for INTERSECT: - + SELECT S.SNO, S.SNAME, S.CITY FROM SUPPLIER S WHERE S.SNO > 1 @@ -1619,23 +1619,23 @@ INTERSECT SELECT S.SNO, S.SNAME, S.CITY FROM SUPPLIER S WHERE S.SNO < 3; - + - gives the result: + gives the result: - + SNO | SNAME | CITY -----+-------+-------- 2 | Jones | Paris - + - The only tuple returned by both parts of the query is the one having SNO=2. + The only tuple returned by both parts of the query is the one having SNO=2. - Finally an example for EXCEPT: + Finally an example for EXCEPT: - + SELECT S.SNO, S.SNAME, S.CITY FROM SUPPLIER S WHERE S.SNO > 1 @@ -1643,16 +1643,16 @@ EXCEPT SELECT S.SNO, S.SNAME, S.CITY FROM SUPPLIER S WHERE S.SNO > 3; - + - gives the result: + gives the result: - + SNO | SNAME | CITY -----+-------+-------- 2 | Jones | Paris 3 | Adams | Vienna - + @@ -1686,11 +1686,11 @@ CREATE TABLE table_name Table Creation - To create the tables defined in - the - following SQL statements are used: + To create the tables defined in + the + following SQL statements are used: - + CREATE TABLE SUPPLIER (SNO INTEGER, SNAME VARCHAR(20), @@ -1708,7 +1708,7 @@ CREATE TABLE PART CREATE TABLE SELLS (SNO INTEGER, PNO INTEGER); - + @@ -1723,50 +1723,50 @@ CREATE TABLE SELLS - - INTEGER: signed fullword binary integer (31 bits precision). - + + INTEGER: signed fullword binary integer (31 bits precision). + - - SMALLINT: signed halfword binary integer (15 bits precision). - + + SMALLINT: signed halfword binary integer (15 bits precision). + - - DECIMAL (p[,q]): - signed packed decimal number of up to - p - digits, with - q - digits to the right of the decimal point. - If q - is omitted it is assumed to be 0. - + + DECIMAL (p[,q]): + signed packed decimal number of up to + p + digits, with + q + digits to the right of the decimal point. + If q + is omitted it is assumed to be 0. + - - FLOAT: signed doubleword floating point number. - + + FLOAT: signed doubleword floating point number. + - - VARCHAR(n): - varying length character string of maximum length - n. - + + VARCHAR(n): + varying length character string of maximum length + n. + - - CHAR(n): - fixed length character string of length - n. - + + CHAR(n): + fixed length character string of length + n. + @@ -1802,8 +1802,8 @@ CREATE INDEX index_name Create Index - To create an index named I on attribute SNAME of relation SUPPLIER - we use the following statement: + To create an index named I on attribute SNAME of relation SUPPLIER + we use the following statement: CREATE INDEX I ON SUPPLIER (SNAME); @@ -1811,11 +1811,11 @@ CREATE INDEX I ON SUPPLIER (SNAME); - The created index is maintained automatically, i.e. whenever a new - tuple is inserted into the relation SUPPLIER the index I is - adapted. Note that the only changes a user can perceive when an - index is present are increased speed for SELECT - and decreases in speed of updates. + The created index is maintained automatically, i.e. whenever a new + tuple is inserted into the relation SUPPLIER the index I is + adapted. Note that the only changes a user can perceive when an + index is present are increased speed for SELECT + and decreases in speed of updates. @@ -2089,20 +2089,20 @@ DELETE FROM SUPPLIER - There are queries that cannot be formulated using pure SQL - (i.e. recursive queries). To be able to perform such queries we need a - host language with a greater expressive power than - SQL. + There are queries that cannot be formulated using pure SQL + (i.e. recursive queries). To be able to perform such queries we need a + host language with a greater expressive power than + SQL. - We simply want to access a database from some application that - is written in the host language (e.g. a ticket reservation system - with a graphical user interface is written in C and the information - about which tickets are still left is stored in a database that can be - accessed using embedded SQL). + We simply want to access a database from some application that + is written in the host language (e.g. a ticket reservation system + with a graphical user interface is written in C and the information + about which tickets are still left is stored in a database that can be + accessed using embedded SQL). -- 2.40.0