array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.pg-lo-import.php', 1 => 'pg_lo_import', ), 'up' => array ( 0 => 'ref.pgsql.php', 1 => 'PostgreSQL İşlevleri', ), 'prev' => array ( 0 => 'function.pg-lo-export.php', 1 => 'pg_lo_export', ), 'next' => array ( 0 => 'function.pg-lo-open.php', 1 => 'pg_lo_open', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/pgsql/functions/pg-lo-import.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)
pg_lo_import — Import a large object from file
pg_lo_import() creates a new large object in the database using a file on the filesystem as its data source.
To use the large object interface, it is necessary to enclose it within a transaction block.
Bilginize:
This function used to be called pg_loimport().
connection
PgSql\Connection
nesnesi. bağlantı
belirtilmemişse öntanımlı bağlantı
kullanılır. Öntanımlı bağlantı pg_connect()
veya pg_pconnect() işleviyle kurulmuş son bağlantıdır.
PHP 8.1.0 ve sonrasında, öntanımlı bağlantının kullanımı önerilmemektedir.
pathname
The full path and file name of the file on the client filesystem from which to read the large object data.
object_id
If an object_id
is given the function
will try to create a large object with this id, else a free
object id is assigned by the server. The parameter
relies on functionality that first
appeared in PostgreSQL 8.1.
The OID of the newly created large object, başarısızlık durumunda false
döner.
Sürüm: | Açıklama |
---|---|
8.1.0 |
bağlantı bağımsız değişkeni artık
PgSql\Connection nesnesi kabul ediyor, evvelce bir
özkaynak kabul ederdi.
|
Örnek 1 pg_lo_import() example
<?php
$database = pg_connect("dbname=jacarta");
pg_query($database, "begin");
$oid = pg_lo_import($database, '/tmp/lob.dat');
pg_query($database, "commit");
?>