PostgreSQL ����

ע��

Note:

Not all functions are supported by all builds. It depends on your libpq (The PostgreSQL C client library) version and how libpq is compiled. If PHP PostgreSQL extensions are missing, then it is because your libpq version does not support them.

Note:

Most PostgreSQL functions accept connection as the optional first parameter. If it is not provided, the last opened connection is used. If it doesn't exist, functions return FALSE.

Note:

PostgreSQL automatically folds all identifiers (e.g. table/column names) to lower-case values at object creation time and at query time. To force the use of mixed or upper case identifiers, you must escape the identifier using double quotes ("").

Note:

PostgreSQL does not have special commands for fetching database schema information (eg. all the tables in the current database). Instead, there is a standard schema named information_schema in PostgreSQL 7.4 and above containing system views with all the necessary information, in an easily queryable form. See the » PostgreSQL Documentation for full details.

Table of Contents

  • pg_affected_rows — ������Ӱ��ļ�¼��Ŀ
  • pg_cancel_query — ȡ���첽��ѯ
  • pg_client_encoding — ȡ�ÿͻ��˱��뷽ʽ
  • pg_close — �ر�һ�� PostgreSQL ����
  • pg_connect_poll — ���ڽ��г�����ѯ PostgreSQL ����״̬��
  • pg_connect — ��һ�� PostgreSQL ����
  • pg_connection_busy — ��֪�����Ƿ�Ϊæ
  • pg_connection_reset — �������ӣ��ٴ����ӣ�
  • pg_connection_status — �������״̬
  • pg_consume_input — Reads input on the connection
  • pg_convert — ������������ֵת��Ϊ�ʺ� SQL ���ĸ�ʽ��
  • pg_copy_from — �������齫��¼�������
  • pg_copy_to — ��һ��������������
  • pg_dbname — ������ݿ���
  • pg_delete — ɾ����¼
  • pg_end_copy — �� PostgreSQL ���ͬ��
  • pg_escape_bytea — ת�� bytea ���͵Ķ���������
  • pg_escape_identifier — Escape a identifier for insertion into a text field
  • pg_escape_literal — Escape a literal for insertion into a text field
  • pg_escape_string — ת�� text/char ���͵��ַ���
  • pg_execute — Sends a request to execute a prepared statement with given parameters, and waits for the result
  • pg_fetch_all_columns — Fetches all rows in a particular result column as an array
  • pg_fetch_all — �ӽ������ȡ��������Ϊһ������
  • pg_fetch_array — ��ȡһ����Ϊ����
  • pg_fetch_assoc — ��ȡһ����Ϊ��������
  • pg_fetch_object — ��ȡһ����Ϊ����
  • pg_fetch_result — �ӽ����Դ�з���ֵ
  • pg_fetch_row — ��ȡһ����Ϊö������
  • pg_field_is_null — �����ֶ��Ƿ�Ϊ NULL
  • pg_field_name — �����ֶε�����
  • pg_field_num — �����ֶεı��
  • pg_field_prtlen — ���ش�ӡ�����ij���
  • pg_field_size — ����ָ���ֶ�ռ���ڲ��洢�ռ�Ĵ�С
  • pg_field_table — Returns the name or oid of the tables field
  • pg_field_type_oid — Returns the type ID (OID) for the corresponding field number
  • pg_field_type — ������Ӧ�ֶε���������
  • pg_flush — ˢ���������Ѵ�������ݲ�ѯ
  • pg_free_result — �ͷŲ�ѯ���ռ�õ��ڴ�
  • pg_get_notify — Ping ���ݿ�����
  • pg_get_pid — Ping ���ݿ�����
  • pg_get_result — ȡ���첽��ѯ���
  • pg_host — ���غ�ij���ӹ�����������
  • pg_insert — ��������뵽����
  • pg_last_error — �õ�ij���ӵ����һ��������Ϣ
  • pg_last_notice — ���� PostgreSQL ����������һ��������Ϣ
  • pg_last_oid — ������һ������� oid
  • pg_lo_close — �ر�һ�����Ͷ���
  • pg_lo_create — �½�һ�����Ͷ���
  • pg_lo_export — �����Ͷ��󵼳����ļ�
  • pg_lo_import — ���ļ�����Ϊ���Ͷ���
  • pg_lo_open — ��һ�����Ͷ���
  • pg_lo_read_all — �����������Ͷ���ֱ�ӷ��͸������
  • pg_lo_read — �Ӵ��Ͷ����ж�������
  • pg_lo_seek — �ƶ����Ͷ����е�ָ��
  • pg_lo_tell — ���ش��Ͷ���ĵ�ǰָ��λ��
  • pg_lo_truncate — Truncates a large object
  • pg_lo_unlink — ɾ��һ�����Ͷ���
  • pg_lo_write — ����Ͷ���д������
  • pg_meta_data — ��ñ��Ԫ����
  • pg_num_fields — �����ֶε���Ŀ
  • pg_num_rows — �����е���Ŀ
  • pg_options — ��ú������йص�ѡ��
  • pg_parameter_status — Looks up a current parameter setting of the server
  • pg_pconnect — ��һ���־õ� PostgreSQL ����
  • pg_ping — Ping ���ݿ�����
  • pg_port — ���ظ����ӵĶ˿ں�
  • pg_prepare — Submits a request to create a prepared statement with the given parameters, and waits for completion
  • pg_put_line — �� PostgreSQL ��˷����� NULL ��β���ַ���
  • pg_query_params — Submits a command to the server and waits for the result, with the ability to pass parameters separately from the SQL command text
  • pg_query — ִ�в�ѯ
  • pg_result_error_field — Returns an individual field of an error report
  • pg_result_error — ��ò�ѯ����Ĵ�����Ϣ
  • pg_result_seek — �ڽ����Դ���趨�ڲ���ƫ����
  • pg_result_status — ��ò�ѯ�����״̬
  • pg_select — ѡ���¼
  • pg_send_execute — Sends a request to execute a prepared statement with given parameters, without waiting for the result(s)
  • pg_send_prepare — Sends a request to create a prepared statement with the given parameters, without waiting for completion
  • pg_send_query_params — Submits a command and separate parameters to the server without waiting for the result(s)
  • pg_send_query — �����첽��ѯ
  • pg_set_client_encoding — �趨�ͻ��˱���
  • pg_set_error_verbosity — Determines the verbosity of messages returned by pg_last_error and pg_result_error
  • pg_socket — Get a read only handle to the socket underlying a PostgreSQL connection
  • pg_trace — ����һ�� PostgreSQL ���ӵ�׷�ٹ���
  • pg_transaction_status — Returns the current in-transaction status of the server
  • pg_tty — ���ظ����ӵ� tty ��
  • pg_unescape_bytea — ȡ�� bytea �����е��ַ���ת��
  • pg_untrace — �ر� PostgreSQL ���ӵ�׷�ٹ���
  • pg_update — ���±�
  • pg_version — Returns an array with client, protocol and server version (when available)