diff --git a/reference/pgsql/functions/pg-connection-busy.xml b/reference/pgsql/functions/pg-connection-busy.xml index 9a32e810ee..d18a61ef3f 100644 --- a/reference/pgsql/functions/pg-connection-busy.xml +++ b/reference/pgsql/functions/pg-connection-busy.xml @@ -1,5 +1,5 @@ - + @@ -19,6 +19,28 @@ connection is busy. If it is busy, a previous query is still executing. If pg_get_result is called, it will be blocked. + + + pg_connection_busy + + +]]> + + + + + + See also pg_connection_status and pg_get_result diff --git a/reference/pgsql/functions/pg-connection-status.xml b/reference/pgsql/functions/pg-connection-status.xml index a8282ac193..4b4cc32ce5 100644 --- a/reference/pgsql/functions/pg-connection-status.xml +++ b/reference/pgsql/functions/pg-connection-status.xml @@ -1,5 +1,5 @@ - + @@ -19,6 +19,23 @@ status. Possible statuses are PGSQL_CONNECTION_OK and PGSQL_CONNECTION_BAD. + + + pg_connection_status + + +]]> + + + + + + See also pg_connection_busy. diff --git a/reference/pgsql/functions/pg-field-is-null.xml b/reference/pgsql/functions/pg-field-is-null.xml index 7ef7a951b4..5cbd8c5406 100644 --- a/reference/pgsql/functions/pg-field-is-null.xml +++ b/reference/pgsql/functions/pg-field-is-null.xml @@ -1,5 +1,5 @@ - + @@ -15,12 +15,35 @@ mixedfield - pg_field_is_null test if a field is &null; or + pg_field_is_null tests if a field is &null; or not. It returns 1 if the field in the given row is &null;. It returns 0 if the field in the given row is NOT &null;. Field can be specified as column index (number) or fieldname (string). Row numbering starts at 0. + + + pg_field_is_null + + +]]> + + + + + This function used to be called pg_fieldisnull(). diff --git a/reference/pgsql/functions/pg-field-name.xml b/reference/pgsql/functions/pg-field-name.xml index f828853945..3894635957 100644 --- a/reference/pgsql/functions/pg-field-name.xml +++ b/reference/pgsql/functions/pg-field-name.xml @@ -1,5 +1,5 @@ - + @@ -19,6 +19,53 @@ given PostgreSQL result resource. Field numbering starts from 0. + + + Getting informations about fields + + +]]> + + + The above example would produce the following output: + + + + + + This function used to be called pg_fieldname(). diff --git a/reference/pgsql/functions/pg-field-num.xml b/reference/pgsql/functions/pg-field-num.xml index 8b0dc19f8e..d1769c1694 100644 --- a/reference/pgsql/functions/pg-field-num.xml +++ b/reference/pgsql/functions/pg-field-num.xml @@ -1,5 +1,5 @@ - + @@ -18,7 +18,10 @@ column (field) slot that corresponds to the field_name in the given PostgreSQL result resource. Field numbering starts - at 0. This function will return -1 on error. + at 0. This function will return -1 on error. + + + See the example given at the pg_field_name page. diff --git a/reference/pgsql/functions/pg-field-prtlen.xml b/reference/pgsql/functions/pg-field-prtlen.xml index 846f526c4e..f7f979923b 100644 --- a/reference/pgsql/functions/pg-field-prtlen.xml +++ b/reference/pgsql/functions/pg-field-prtlen.xml @@ -1,5 +1,5 @@ - + @@ -20,9 +20,12 @@ result. Row numbering starts at 0. This function will return -1 on an error. + + See the example given at the pg_field_name page. + - This function used to be called pg_field_prtlen(). + This function used to be called pg_fieldprtlen(). diff --git a/reference/pgsql/functions/pg-field-size.xml b/reference/pgsql/functions/pg-field-size.xml index 5ab92d2d45..ac3dbb2a3c 100644 --- a/reference/pgsql/functions/pg-field-size.xml +++ b/reference/pgsql/functions/pg-field-size.xml @@ -1,5 +1,5 @@ - + @@ -22,6 +22,9 @@ field size of -1 indicates a variable length field. This function will return &false; on error. + + See the example given at the pg_field_name page. + This function used to be called pg_fieldsize(). diff --git a/reference/pgsql/functions/pg-field-type.xml b/reference/pgsql/functions/pg-field-type.xml index 5fd32f4b42..d72cd24b5e 100644 --- a/reference/pgsql/functions/pg-field-type.xml +++ b/reference/pgsql/functions/pg-field-type.xml @@ -1,5 +1,5 @@ - + @@ -21,6 +21,9 @@ given PostgreSQL result resource. Field numbering starts at 0. + + See the example given at the pg_field_name page. + This function used to be called pg_fieldtype(). diff --git a/reference/pgsql/functions/pg-meta-data.xml b/reference/pgsql/functions/pg-meta-data.xml index f8c8ae5695..a90fcc6d79 100644 --- a/reference/pgsql/functions/pg-meta-data.xml +++ b/reference/pgsql/functions/pg-meta-data.xml @@ -1,5 +1,5 @@ - + @@ -20,6 +20,74 @@ table_name as array. If there is error, it returns &false; + + + Getting table metadata + +'; + var_dump ($meta); + echo ''; + } +?> +]]> + + + The above example would produce the following output: + + + + array(5) { + ["num"]=> + int(1) + ["type"]=> + string(7) "varchar" + ["len"]=> + int(-1) + ["not null"]=> + bool(false) + ["has default"]=> + bool(false) + } + ["year"]=> + array(5) { + ["num"]=> + int(2) + ["type"]=> + string(4) "int2" + ["len"]=> + int(2) + ["not null"]=> + bool(false) + ["has default"]=> + bool(false) + } + ["title"]=> + array(5) { + ["num"]=> + int(3) + ["type"]=> + string(7) "varchar" + ["len"]=> + int(-1) + ["not null"]=> + bool(false) + ["has default"]=> + bool(false) + } +} +]]> + + + + This function is experimental. diff --git a/reference/pgsql/functions/pg-send-query.xml b/reference/pgsql/functions/pg-send-query.xml index a12c9cc127..4c92e06a53 100644 --- a/reference/pgsql/functions/pg-send-query.xml +++ b/reference/pgsql/functions/pg-send-query.xml @@ -1,5 +1,5 @@ - + @@ -27,7 +27,7 @@ pg_get_result. Script execution is not blocked while query is executing. Use pg_connection_busy to check connection is - busy (i.e. query is executing). Query may be canceled by calling + busy (i.e. query is executing). Query may be cancelled by calling pg_cancel_query. @@ -36,6 +36,43 @@ connection is busy, it waits until last query is finished and discards all result. + + + Asynchronous Queries + +'; + $rows1 = pg_num_rows($res1); + echo $res1.' has '.$rows1.' records

'; + + $res2 = pg_get_result($dbconn); + echo 'second call to pg_get_result(): '.$res2.'
'; + $rows2 = pg_num_rows($res2); + echo $res2.' has '.$rows2.' records
'; +?> +]]> +
+ + The above example would produce the following output: + + + + +
+
See also pg_query, pg_cancel_query,