Re: How to extract a value from a record using attnum or attname?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Kevin Grittner <kevin(dot)grittner(at)wicourts(dot)gov>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to extract a value from a record using attnum or attname?
Date: 2011-02-23 18:42:45
Message-ID: 1298486418-sup-3515@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Excerpts from Kevin Grittner's message of mié feb 23 13:43:19 -0300 2011:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
>
> > I think it'd be better to use RelationGetIndexList (which gets the
> > index list from relcache) and fetch the index tuples from
> > syscache; see relationHasPrimaryKey for sample code.
>
> Thanks. Patch done that way attached. Will get it into tomorrow's
> system testing here.

Why not use quote_identifier and quote_literal_cstr instead of this new
strcpy thing? Also, you don't really need spi.h do you?

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-02-23 18:49:33 Re: Data types for IP address.
Previous Message Gary Fu 2011-02-23 18:31:58 slow building index and reference after Sybase to Pg

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-02-23 18:56:29 Re: disposition of remaining patches
Previous Message Alvaro Herrera 2011-02-23 18:34:32 Re: disposition of remaining patches