Re: about heap_insert() function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seung-Hyun Jeong <jeongs(at)cs(dot)man(dot)ac(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: about heap_insert() function
Date: 2001-12-11 00:04:58
Message-ID: 1640.1008029098@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Seung-Hyun Jeong <jeongs(at)cs(dot)man(dot)ac(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-12-11 00:53:40 Re: Intermediate report for AIX 5L port
Previous Message Tom Lane 2001-12-10 23:53:05 Re: Using Cursor in PostgreSQL 7.2