COPY ���ޥ�ɤ˴�Ϣ�����ؿ�

85) The copy command in Postgres has options to read from or write to the network connection used by libpq++. Therefore, functions are necessary to access this network connection directly so applications may take full advantage of this capability.

Postgres �� COPY ���ޥ�ɤϡ� libpq++ ���ȤäƤ���ͥåȥ����³���Ф����ɤ߹��ߡ� ���뤤�Ͻ񤭹��ߤ����֤��Ȥ��Ǥ���褦�ˤʤäƤ��ޤ��� �����Ǥ��Υͥåȥ����³��ľ�ܥ����������뤿��δؿ���ɬ�פˤʤ�ޤ��� ������󥢥ץꥱ�������⤳�ε�ǽ�ˤ�äƽ�ʬ�ʲ��ä������Ǥ��礦��

95) As an example:

����Ǥ���


96)
        PgDatabase data;
        data.Exec("create table foo (a int4, b char16, d float8)");
        data.Exec("copy foo from stdin");
        data.putline("3\etHello World\et4.5\en");
        data.putline("4\etGoodbye World\et7.11\en");
        &...
        data.putline(".\en");
        data.endcopy();
������ ...'\et','\en' �Ȥϡ���
        PgDatabase.data;
        data.Exec("create table foo (a int4, b char(16), d float8)");
        data.Exec("copy foo from stdin");
        data.PutLine("3\tHello World\t4.5\n");
        data.PutLine("4\tGoodbye World\t7.11\n");
        &...
        data.PutLine(".\n");
        data.EndCopy();

    

Notes

[1]

������ 6.5.3 �Ǥ� libpq ��Ʊ�� "\." �Ǽºݤˤϴ�λ����褦�Ǥ��� example �ǥ��쥯�ȥ�� testlibpq6.cc ���ȡ�