Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Text <-> C string

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [PATCHES] Text <-> C string
Date: 2008-03-25 22:48:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
"Brendan Jurd" <direvus(at)gmail(dot)com> writes:
> As discussed on -hackers, I'm trying to get rid of some redundant code
> by creating a widely useful set of functions to convert between text
> and C string in the backend.

Applied with revisions --- the functions were modified as per recent
discussion, and I fixed a lot more potential call sites.

There are no textout/textin calls left, but I may have missed some
places that were doing it the hard way with direct palloc/memcpy
manipulations.  It might be worth trolling all the VARDATA() references
to see if any more are easily replaceable.

I notice in particular that xfunc.sgml contains sample C functions to
copy and concatenate text.  While these aren't directly replaceable
with the new functions, I wonder whether we ought to change the examples
to make them less certain to break if we ever change text's

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Keaton AdamsDate: 2008-03-25 23:53:09
Subject: Re: PostgreSQL Replication with read-only access to standby DB
Previous:From: Neil ConwayDate: 2008-03-25 22:40:13
Subject: Re: advancing snapshot's xmin

pgsql-patches by date

Next:From: Neil ConwayDate: 2008-03-25 22:50:42
Subject: Re: Doc patch for DTrace
Previous:From: Neil ConwayDate: 2008-03-25 22:28:15
Subject: Re: Moving snapshot code around

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group