From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Mitch Vincent" <mitch(at)venux(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Trigger programming.. |
Date: | 2000-06-30 22:39:09 |
Message-ID: | 20981.962404749@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Mitch Vincent" <mitch(at)venux(dot)net> writes:
> I have this code...
> tupdesc = rel->rd_att; /* what the tuple looks like (?) */
> app_id_colnum = SPI_fnumber(tupdesc, app_id_fieldname);
> if (app_id_colnum == SPI_ERROR_NOATTRIBUTE)
> elog(ERROR, "app_id_colnum - SPI_ERROR_NOATTRIBUTE error ");
> char_app_id = SPI_getvalue(rettuple, tupdesc, app_id_colnum);
Looks OK to me, as far as it goes. I'd wonder whether the tuple
actually matches the tupdesc you're using.
Looking at SPI_getvalue itself (in src/backend/executor/spi.c),
I can see that SPI_result might offer a clue about why it's failing.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2000-07-01 00:25:14 | Re: pg_dumpall and check constraints |
Previous Message | Steve Wolfe | 2000-06-30 22:36:14 | Re: Performance of Postgres via network connections |