I can't get row type from tuple (SPI)

From: "Pavel Stehule" <pavel(dot)stehule(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: I can't get row type from tuple (SPI)
Date: 2005-11-05 17:34:33
Message-ID: BAY20-F5EA78637DC0E29C45E7F0F9630@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

I execute "select anyrowfce(..)" in plpgsql via exec_run_select

I need to get inner row, but I can't find good way for it

retval = SPI_getbinval(estate->eval_tuptable->vals[0],
estate->eval_tuptable->tupdesc,1);

rettype = SPI_gettypeid(estate->eval_tuptable->tupdesc,1);
rettupdesc = lookup_rowtype_tupdesc(rettype,0);

rettupdesc is ok, but when I try SPI_getbinval(retval, rettupdesc, ...) I
kill backend.

What I do wrong? What is optimal process to get first field in row, when
this first field is row too.

for example I need to way for value 1 in select

select row(row(1,2,3)); => "("(1,2,3)")"

Can I get inner tupdesc without lookup_rowtype_tupdesc?

Thank you very much

Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com.
http://www.msn.cz/

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-05 21:47:41 Last chance to defend RTREE index access method
Previous Message Harald Fuchs 2005-11-05 15:34:56 Re: Reducing the overhead of NUMERIC data