Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

pg_parameter_status

(PHP 5)

pg_parameter_status -- Looks up a current parameter setting of the server.

Описание

string pg_parameter_status ( resource connection, string param_name )

string pg_parameter_status ( string param_name )

Looks up a current parameter setting of the server.

Certain parameter values are reported by the server automatically at connection startup or whenever their values change. pg_parameter_status() can be used to interrogate these settings. It returns the current value of a parameter if known, or FALSE if the parameter is not known.

Parameters reported as of PostgreSQL 8.0 include server_version, server_encoding, client_encoding, is_superuser, session_authorization, DateStyle, TimeZone, and integer_datetimes. (server_encoding, TimeZone, and integer_datetimes were not reported by releases before 8.0.) Note that server_version, server_encoding and integer_datetimes cannot change after PostgreSQL startup.

PostgreSQL 7.3 or lower servers do not report parameter settings, pg_parameter_status() includes logic to obtain values for server_version and client_encoding anyway. Applications are encouraged to use pg_parameter_status() rather than ad hoc code to determine these values.

Предостережение

On a pre-7.4 PostgreSQL server, changing client_encoding via SET after connection startup will not be reflected by pg_parameter_status().

Список параметров

connection

PostgreSQL database connection resource. When connection is not present, the default connection is used. The default connection is the last connection made by pg_connect() or pg_pconnect().

param_name

Possible param_name values include server_version, server_encoding, client_encoding, is_superuser, session_authorization, DateStyle, TimeZone, and integer_datetimes.

Возвращаемые значения

A string containing the value of the parameter, FALSE on failure or invalid param_name.

Примеры

Пример 1. pg_parameter_status() example

<?php
  $dbconn
= pg_connect("dbname=publisher") or die("Could not connect");

  echo
"Server encoding: ", pg_parameter_status($dbconn, "server_encoding");
?>

Результат выполнения данного примера:

Server encoding: SQL_ASCII



add a note add a note User Contributed Notes
pg_parameter_status
There are no user contributed notes for this page.

pg_pconnect> <pg_options
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571