Skip site navigation (1) Skip section navigation (2)

BLOB support

From: Radosław Smogura <rsmogura(at)softperience(dot)eu>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: BLOB support
Date: 2011-06-01 20:00:31
Message-ID: 201106012200.31805.rsmogura@softperience.eu (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello,

I partialy implemented following missing LOBs types. Requirement for this was 
to give ability to create (B/C)LOB columns and add casting functionality e.g. 
SET my_clob = 'My long text'.

Idea is as follow:
0. Blob is two state object: 1st in memory contains just bytea, serialized 
contains Oid of large object.
1. Each type has additional boolean haslobs, which is set recursivly.
2. Relation has same bool haslobs (used to speed up tables without LOBs)
3. When data are inserted/updated then "special" function is called and tuple 
is modified in this way all LOBs are serialized to (old) LOB table and just 
Oid is stored.
4. When removed LOB is removed from (old) LOB table.

I have implemented:
- 0.
- 1. and 2. without altering relations and types.
- 3. Inserts only, Updates need polishing. No recursion (no support for BLOBs 
in composites or arrays).

Current patch is here (many changes to pg_types.h - new column haslobs added), 
it's in _early_ stage for those who wants to look inside it.

Any ideas or suggestions?

Regards,
Radek

P. S. 
I'm during removal, and I have limited access to Internet.

Attachment: blob_20110601.patch.bz2
Description: application/x-bzip (15.1 KB)

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-06-01 20:25:56
Subject: Re: [PERFORM] Hash Anti Join performance degradation
Previous:From: Florian PflugDate: 2011-06-01 19:56:25
Subject: Re: [BUGS] BUG #6034: pg_upgrade fails when it should not.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group