From a55eab89219dde7a98ee75da4cad56ff19d84582 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Fri, 31 Aug 2007 21:33:48 +0000 Subject: [PATCH] Only use SGML indexterm "zone" when we want to get the entire section. Some alignment cleanups. --- doc/src/sgml/extend.sgml | 8 +- doc/src/sgml/func.sgml | 298 +++++++++++++++++++-------------------- doc/src/sgml/libpq.sgml | 33 +++-- 3 files changed, 175 insertions(+), 164 deletions(-) diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index 28bdfb8532..e2805b4191 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -1,11 +1,11 @@ - + Extending <acronym>SQL</acronym> - - extending SQL - + + extending SQL + In the sections that follow, we will discuss how you diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d3f831e81b..d83135ba03 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ - + Functions and Operators @@ -2986,76 +2986,76 @@ cast(-44 as bit(12)) 111111010100 string NOT SIMILAR TO pattern ESCAPE escape-character - - The SIMILAR TO operator returns true or - false depending on whether its pattern matches the given string. - It is much like LIKE, except that it - interprets the pattern using the SQL standard's definition of a - regular expression. SQL regular expressions are a curious cross - between LIKE notation and common regular - expression notation. - + + The SIMILAR TO operator returns true or + false depending on whether its pattern matches the given string. + It is much like LIKE, except that it + interprets the pattern using the SQL standard's definition of a + regular expression. SQL regular expressions are a curious cross + between LIKE notation and common regular + expression notation. + - - Like LIKE, the SIMILAR TO - operator succeeds only if its pattern matches the entire string; - this is unlike common regular expression practice, wherein the pattern - can match any part of the string. - Also like - LIKE, SIMILAR TO uses - _ and % as wildcard characters denoting - any single character and any string, respectively (these are - comparable to . and .* in POSIX regular - expressions). - + + Like LIKE, the SIMILAR TO + operator succeeds only if its pattern matches the entire string; + this is unlike common regular expression practice, wherein the pattern + can match any part of the string. + Also like + LIKE, SIMILAR TO uses + _ and % as wildcard characters denoting + any single character and any string, respectively (these are + comparable to . and .* in POSIX regular + expressions). + - - In addition to these facilities borrowed from LIKE, - SIMILAR TO supports these pattern-matching - metacharacters borrowed from POSIX regular expressions: + + In addition to these facilities borrowed from LIKE, + SIMILAR TO supports these pattern-matching + metacharacters borrowed from POSIX regular expressions: - - - - | denotes alternation (either of two alternatives). - - - - - * denotes repetition of the previous item zero - or more times. - - - - - + denotes repetition of the previous item one - or more times. - - - - - Parentheses () can be used to group items into - a single logical item. - - - - - A bracket expression [...] specifies a character - class, just as in POSIX regular expressions. - - - + + + + | denotes alternation (either of two alternatives). + + + + + * denotes repetition of the previous item zero + or more times. + + + + + + denotes repetition of the previous item one + or more times. + + + + + Parentheses () can be used to group items into + a single logical item. + + + + + A bracket expression [...] specifies a character + class, just as in POSIX regular expressions. + + + - Notice that bounded repetition (? and {...}) - are not provided, though they exist in POSIX. Also, the dot (.) - is not a metacharacter. - + Notice that bounded repetition (? and {...}) + are not provided, though they exist in POSIX. Also, the dot (.) + is not a metacharacter. + - - As with LIKE, a backslash disables the special meaning - of any of these metacharacters; or a different escape character can - be specified with ESCAPE. - + + As with LIKE, a backslash disables the special meaning + of any of these metacharacters; or a different escape character can + be specified with ESCAPE. + Some examples: @@ -3067,20 +3067,20 @@ cast(-44 as bit(12)) 111111010100 - - The substring function with three parameters, - substring(string from - pattern for - escape-character), provides - extraction of a substring that matches an SQL - regular expression pattern. As with SIMILAR TO, the - specified pattern must match to the entire data string, else the - function fails and returns null. To indicate the part of the - pattern that should be returned on success, the pattern must contain - two occurrences of the escape character followed by a double quote - ("). The text matching the portion of the pattern - between these markers is returned. - + + The substring function with three parameters, + substring(string from + pattern for + escape-character), provides + extraction of a substring that matches an SQL + regular expression pattern. As with SIMILAR TO, the + specified pattern must match to the entire data string, else the + function fails and returns null. To indicate the part of the + pattern that should be returned on success, the pattern must contain + two occurrences of the escape character followed by a double quote + ("). The text matching the portion of the pattern + between these markers is returned. + Some examples: @@ -11241,17 +11241,17 @@ select current_date + s.a as dates from generate_series(0,14,7) as s(a); - + user current - + schema current - + search path current @@ -11298,19 +11298,19 @@ SET search_path TO schema , schema, .. - + inet_client_addr - + inet_client_port - + inet_server_addr - + inet_server_port @@ -11325,11 +11325,11 @@ SET search_path TO schema , schema, .. Unix-domain socket. - + pg_my_temp_schema - + pg_is_other_temp_schema @@ -11343,7 +11343,7 @@ SET search_path TO schema , schema, .. tables from a catalog display.) - + pg_postmaster_start_time @@ -11353,7 +11353,7 @@ SET search_path TO schema , schema, .. server started. - + version @@ -11491,25 +11491,25 @@ SET search_path TO schema , schema, .. - + has_database_privilege - + has_function_privilege - + has_language_privilege - + has_schema_privilege - + has_table_privilege - + has_tablespace_privilege - + pg_has_role @@ -11669,22 +11669,22 @@ SELECT relname FROM pg_class WHERE pg_table_is_visible(oid); - + pg_conversion_is_visible - + pg_function_is_visible - + pg_operator_is_visible - + pg_opclass_is_visible - + pg_table_is_visible - + pg_type_is_visible @@ -11718,43 +11718,43 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); this way — if the name can be recognized at all, it must be visible. - + format_type - + pg_get_viewdef - + pg_get_ruledef - + pg_get_indexdef - + pg_get_triggerdef - + pg_get_constraintdef - + pg_get_expr - + pg_get_userbyid - + pg_get_serial_sequence - + pg_tablespace_databases @@ -11923,19 +11923,19 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); pg_class catalogs. - + col_description - + obj_description - + shobj_description - + comment about database objects @@ -12043,15 +12043,15 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); - + SET - + SHOW - + configuration of the server functions @@ -12091,17 +12091,17 @@ SELECT set_config('log_statement_stats', 'off', false); - + pg_cancel_backend - + pg_reload_conf - + pg_rotate_logfile - + signal backend processes @@ -12175,28 +12175,28 @@ SELECT set_config('log_statement_stats', 'off', false); subprocess. - + pg_start_backup - + pg_stop_backup - + pg_switch_xlog - + pg_current_xlog_location - + pg_current_xlog_insert_location - + pg_xlogfile_name_offset - + pg_xlogfile_name - + backup @@ -12350,22 +12350,22 @@ postgres=# select * from pg_xlogfile_name_offset(pg_stop_backup()); the actual disk space usage of database objects. - + pg_column_size - + pg_database_size - + pg_relation_size - + pg_size_pretty - + pg_tablespace_size - + pg_total_relation_size @@ -12532,7 +12532,7 @@ postgres=# select * from pg_xlogfile_name_offset(pg_stop_backup()); - + pg_ls_dir @@ -12541,7 +12541,7 @@ postgres=# select * from pg_xlogfile_name_offset(pg_stop_backup()); ... - + pg_read_file @@ -12551,7 +12551,7 @@ postgres=# select * from pg_xlogfile_name_offset(pg_stop_backup()); is negative, it is relative to the end of the file. - + pg_stat_file @@ -12683,7 +12683,7 @@ SELECT (pg_stat_file('filename')).modification; - + pg_advisory_lock @@ -12697,7 +12697,7 @@ SELECT (pg_stat_file('filename')).modification; released for other sessions' use. - + pg_advisory_lock_shared @@ -12707,7 +12707,7 @@ SELECT (pg_stat_file('filename')).modification; Only would-be exclusive lockers are locked out. - + pg_try_advisory_lock @@ -12718,7 +12718,7 @@ SELECT (pg_stat_file('filename')).modification; acquired now. - + pg_try_advisory_lock_shared @@ -12727,7 +12727,7 @@ SELECT (pg_stat_file('filename')).modification; shared rather than exclusive lock. - + pg_advisory_unlock @@ -12738,7 +12738,7 @@ SELECT (pg_stat_file('filename')).modification; and in addition, an SQL warning will be raised by the server. - + pg_advisory_unlock_shared @@ -12747,7 +12747,7 @@ SELECT (pg_stat_file('filename')).modification; except to release a shared advisory lock. - + pg_advisory_unlock_all diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 117bc5f350..f9d73829e7 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,4 +1,4 @@ - + <application>libpq</application> - C Library @@ -2399,12 +2399,16 @@ It is not thread-safe. Escaping Strings for Inclusion in SQL Commands - PQescapeStringConn - PQescapeString - escaping strings - in libpq - + PQescapeStringConn + + + PQescapeString + + + escaping strings + in libpq + PQescapeStringConn escapes a string for use within an SQL @@ -2499,8 +2503,8 @@ in favor of PQescapeStringConn. Escaping Binary Strings for Inclusion in SQL Commands - bytea - in libpq + bytea + in libpq @@ -2666,7 +2670,9 @@ void PQfreemem(void *ptr); Asynchronous Command Processing - nonblocking connection + + nonblocking connection + The PQexec function is adequate for submitting commands in @@ -3075,7 +3081,10 @@ and then read the response as described above. Cancelling Queries in Progress -cancelingSQL command + + canceling + SQL command + A client application can request cancellation of @@ -3194,7 +3203,9 @@ in progress on the connection. The Fast-Path Interface -fast path + + fast path + PostgreSQL provides a fast-path interface to send