pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedlarge object support in PostGres 7.4
2+ messages / 2 participants
[nested] [flat]
* large object support in PostGres 7.4
@ 2005-06-07 06:20 Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com>
0 siblings, 1 reply; 2+ messages in thread
From: Vadivel Subramaniam @ 2005-06-07 06:20 UTC (permalink / raw)
To: pgsql-sql
Hi,
We have API's in /usr/local/pgsql/include/libpq-fe.h which support large
objects in PostGres
extern int lo_open(PGconn *conn, Oid lobjId, int mode);
extern int lo_close(PGconn *conn, int fd);
extern int lo_read(PGconn *conn, int fd, char *buf, size_t len);
extern int lo_write(PGconn *conn, int fd, char *buf, size_t len);
extern int lo_lseek(PGconn *conn, int fd, int offset, int whence);
extern Oid lo_creat(PGconn *conn, int mode);
extern int lo_tell(PGconn *conn, int fd);
extern int lo_unlink(PGconn *conn, Oid lobjId);
extern Oid lo_import(PGconn *conn, const char *filename);
extern int lo_export(PGconn *conn, Oid lobjId, const char
*filename);
My doubt is, do these API's operate on character data? i.e., My table
schema is like this
table (name varchar, script varchar). I have to store a large data(in
character form) in the script column (upto 3 MB).
As of my understanding the above mentioned API's work on the OID field.
i.e,. table(name varchar, script oid). Is that correct?
Please clarify this if anyone has already used this large object APIs and
specify if this has any limitation on the size?
thanks,
-Vadivel
*********************** FSS-Private ***********************
"DISCLAIMER: This message is proprietary to Flextronics Software Systems
Limited (FSS) and is intended solely for the use of the
individual to whom it is addressed. It may contain privileged or
confidential information and should not be circulated or used for
any purpose other than for what it is intended. If you have received this
message in error, please notify the originator immediately.
If you are not the intended recipient, you are notified that you are
strictly prohibited from using, copying, altering, or disclosing
the contents of this message. FSS accepts no responsibility for loss or
damage arising from the use of the information transmitted
by this email including damage from virus."
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: large object support in PostGres 7.4
@ 2005-06-07 06:41 Volkan YAZICI <volkan.yazici@gmail.com>
parent: Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com>
0 siblings, 0 replies; 2+ messages in thread
From: Volkan YAZICI @ 2005-06-07 06:41 UTC (permalink / raw)
To: Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com>; +Cc: pgsql-sql
Hi,
On 6/7/05, Vadivel Subramaniam
<vadivel.subramaniam@flextronicssoftware.com> wrote:
> My doubt is, do these API's operate on character data? i.e., My table
> schema is like this
>
> table (name varchar, script varchar). I have to store a large data(in
> character form) in the script column (upto 3 MB).
>
> As of my understanding the above mentioned API's work on the OID field.
> i.e,. table(name varchar, script oid). Is that correct?
Yep. Large Objects are stored (and distributed between rows) in a
specific table: `pg_largeobject'. You can use these lo records by
referencing to their OIDs. Furthermore, you cannot (also shouldn't)
reach data on pg_largeobject with another function/routine out of
supplied lo_... functions by libpq.
> Please clarify this if anyone has already used this large object APIs and
> specify if this has any limitation on the size?
Yes, there's a limitation about 'em. (2GB) For more information please see:
http://www.postgresql.org/docs/7.4/interactive/largeobjects.html
Regards.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-06-07 06:41 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-07 06:20 large object support in PostGres 7.4 Vadivel Subramaniam <vadivel.subramaniam@flextronicssoftware.com>
2005-06-07 06:41 ` Volkan YAZICI <volkan.yazici@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox