Re: pseudo-type record arguments for PL-functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Hallgren <thomas(at)tada(dot)se>
Cc: David Fetter <david(at)fetter(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pseudo-type record arguments for PL-functions
Date: 2006-05-06 15:54:59
Message-ID: 5756.1146930899@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Hallgren <thomas(at)tada(dot)se> writes:
> The thing that makes me a bit confused is the
> ArrayMetaState. The functions obtain it using:

> my_extra = (ArrayMetaState *) fcinfo->flinfo->fn_extra;

> which is fine if there's only one array parameter. What happens if I
> have two?

Make a struct that can hold two ArrayMetaStates. Or whatever else you
need. What a C function keeps in fn_extra is its own affair.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-05-06 16:15:44 Re: InsertXLogFile in pg_resetxlog
Previous Message Martijn van Oosterhout 2006-05-06 15:52:08 Re: pseudo-type record arguments for PL-functions