Chapter 18. pgtcl

Table of Contents
���ޥ��
��
pgtcl ���ޥ�ɥ�ե���󥹾���

pgtcl is a tcl package for front-end programs to interface with Postgres backends. It makes most of the functionality of libpq available to tcl scripts.

pgtcl �ϡ�Postgres �Х� ������ɤȥ��󥿥ե���������ĥե���ȥ���ɥץ�������Ѥ� tcl �ѥå� �����Ǥ�������ˤ�� libpq �ΤۤȤ�ɤε�ǽ�� tcl ������ץȤ�����ѤǤ���褦�ˤʤ�ޤ���

This package was originally written by Jolly Chen.

���Υѥå������ϸ��� Jolly Chen ��ˤ�äƺ������줿��ΤǤ���

���ޥ��

Table 18-1. pgtcl ���ޥ��

���ޥ������
pg_connect�Хå�����ɥ����ФȤ���³�򳫤�
pg_disconnect��³���Ĥ���
pg_conndefaults��³���ץ����Ȥ��Υǥե�����ͤ�����
pg_exec�Хå�����ɤ��䤤��碌����������
pg_result�䤤��碌�η�̤�����
pg_selectSELECT ʸ�η�̤򷫤��֤���������
pg_listenNOTIFY ��å������ѤΥ�����Хå����Ω����
pg_lo_creat�顼�����֥������Ȥ��������
pg_lo_open�顼�����֥������Ȥ򳫤�
pg_lo_close�顼�����֥������Ȥ��Ĥ���
pg_lo_read�顼�����֥������Ȥ��ɤ�
pg_lo_write�顼�����֥������Ȥ˽񤭹���
pg_lo_lseek�顼�����֥������Ȥΰ��֤򥷡�������
pg_lo_tell�顼�����֥������Ȥθ��ߤΥ��������֤��֤�
pg_lo_unlink�顼�����֥������Ȥ�������
pg_lo_importUnix �ե������顼�����֥������Ȥ˥���ݡ��Ȥ���
pg_lo_export �顼�����֥������Ȥ� Unix �ե�����˥������ݡ��Ȥ���

These commands are described further on subsequent pages.

�����Υ��ޥ�ɤξܺ٤ϲ��ǵ��Ҥ��ޤ���

The pg_lo* routines are interfaces to the Large Object features of Postgres. The functions are designed to mimic the analogous file system functions in the standard Unix file system interface. The pg_lo* routines should be used within a BEGIN/END transaction block because the file descriptor returned by pg_lo_open is only valid for the current transaction. pg_lo_import and pg_lo_export MUST be used in a BEGIN/END transaction block.

pg_lo* ������ Postgres �Υ顼�����֥����� �ȵ�ǽ�ؤΥ��󥿥ե������Ǥ��������δؿ���ɸ��Ū�� Unix �ե����륷 ���ƥ।�󥿥ե������ѤΥե����륷���ƥ�ؿ��򿿻������߷פ���Ƥ��� ����pg_lo_open���֤����ե����뵭�һҤ��������Υȥ�󥶥��������� ���ƤΤ߸��Ϥ���äƤ��ޤ��Τǡ�pg_lo* ������ BEGIN/END �ȥ�󥶥��� ���֥��å�����ǻ��Ѥ���ʤ���Фʤ�ޤ����äˡ�pg_lo_import �� pg_lo_export ��ɬ�� BEGIN/END �ȥ�󥶥������֥��å���ǻȤ�ʤ��� �Ф����ޤ���