Re: about heap_insert() function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: about heap_insert() function
Date
Msg-id 1640.1008029098@sss.pgh.pa.us
Whole thread Raw
In response to about heap_insert() function  (Seung-Hyun Jeong <jeongs@cs.man.ac.uk>)
List pgsql-hackers
Seung-Hyun Jeong <jeongs@cs.man.ac.uk> writes:
> I'm trying to insert tuples into a existing table by using intenal
> functions bypassing the query executor.

> Now, what I don't know is how to set values to HeapTuple tup.
> The following data structure shows the fields that I need to fill in.  

You shouldn't be touching any of that directly.  You want to use
heap_formtuple to build the tuple.  All you need for that is a tuple
descriptor (which you get from the open relation), and two arrays of
Datum values and null flags.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Doug Royer
Date:
Subject: Re: Help Building PostgreSQL on Solaris
Next
From: Thomas Lockhart
Date:
Subject: Re: Intermediate report for AIX 5L port