+++ erd.trabant +++

+++ erd.trabant +++



php-pgblob - save files as large objects (blobs) to postgresql

//** 2002-2004
//** lo blob test by volker augustin
//** version 0.001
//** contact me at kalle at
//** this script demonstrates the use of large objects (blobs) with postgres
//** tested with pgsql 7.1
//** only a test and a personal study, not well documented
//** feel free to copy and use where you want

//** 15/04/2004:
//** edited to use with safe_mode=on and register_globals=off

//** Installation:
//1. create a directory e.g. lo somewhere in your webservers vhost-root-directory
//2. edit config section below
//2b. !!! dont forget , you have to set dbname, user, password, port , and host also in the Class below or you cant connect to your database !!!! //
//3. create database-user and database
//4. create table to store filenames and details
// --if you use other tablenames and fieldnames, dont forget to change them below in config section
//remember: postres does not store blobs in this table, but in a global large object table, only oids are stored in our table
CREATE SEQUENCE \"media_id_seq\" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
CREATE TABLE \"media\" (
\"id\" integer DEFAULT nextval('\"media_id_seq\"'::text) NOT NULL,
\"media_oid\" oid NOT NULL,
\"name\" character varying NOT NULL,
\"created\" text NOT NULL,
\"mimetype\" character varying NOT NULL,
\"size\" bigint,
Constraint \"media_pkey\" Primary Key (\"id\")

if you run into trouble, let me now. use on own risk!!!! kalle at

Download Script: Files/devel/php-pgblob-0.001.tgz


>>PopUP / Drucken / Print<<