Re: How to extract a value from a record using attnum or attname? - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: How to extract a value from a record using attnum or attname?
Date
Msg-id 4D650990020000250003AF1E@gw.wicourts.gov
Whole thread Raw
In response to Re: How to extract a value from a record using attnum or attname?  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: How to extract a value from a record using attnum or attname?  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> wrote:
> Why not use quote_identifier and quote_literal_cstr instead of
> this new strcpy thing?
We've got various types of software that will be parsing these
payloads, and it's a little easier to parse if the quoting is
unconditional.  If that's a barrier to acceptance we could use
the functions which quote conditionally and adjust our regular
expressions.
Probably one reason we had a bias toward quoting is that every
single application table name we use has at least on uppercase
letter and about 95% of our column names do.
> Also, you don't really need spi.h do you?
It's using these functions:
SPI_getrelname
SPI_fname
SPI_getvalue
If there's a better way to get the info, I'm game. 
-Kevin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: disposition of remaining patches
Next
From: Alvaro Herrera
Date:
Subject: Re: How to extract a value from a record using attnum or attname?