471,066 Members | 1,287 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Variable record fetching


I am working on converting Informix database to Postgre. I have one
question for fetching records using PostgreSQL. The record I am fetching
is a variable size text string. Before fetching the record, a
preallocated static buffer size will have to be declared beforehand in
the declaration section. Since the record sizes vary a lot, instead of
using the static buffer, is there a dynamic way to fetch these records?
Informix (Oracle has the similar feature) has the locator variable and
the server will allocate the buffer if you initiate the locator to
accommodate the record. The application then checks the locator size
(record.loc_bufsize) to dynamically allocate a buffer to fetch it out
and free the locator buffer. Does Postgre have any way to pre-tell the
size of returning record? Thanks.

Shujun Huang
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #1
0 1578

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Shapper | last post: by
6 posts views Thread by kevinold | last post: by
2 posts views Thread by Pramod Kadur | last post: by
9 posts views Thread by =?Utf-8?B?UHJhdmlu?= | last post: by
35 posts views Thread by erik gartz | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.