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

Re: too many variants of relation_open

From: Neil Conway <neilc(at)samurai(dot)com>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: Jaime Casanova <systemguards(at)gmail(dot)com>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: too many variants of relation_open
Date: 2007-09-29 02:52:46
Message-ID: 1191034366.13940.1.camel@goldbach (view raw or flat)
Thread:
Lists: pgsql-patches
On Fri, 2007-09-28 at 10:02 +0100, Heikki Linnakangas wrote:
> Well, yes it could, but why? Keeping them separate looks slightly more
> readable to me, and the change could break a lot of external modules for
> no good reason.

I agree: it also complicates the common case (calling relation_open()
and waiting to acquire for a lock).

If anything, you could perhaps refactor relation_open_nowait() to be
implemented in terms of relation_open() (first try to get the lock, then
do a relation_open(rel, NoLock)), but since you'd only be saving a
handful of duplicated lines, it hardly seems worth it.

-Neil



In response to

pgsql-patches by date

Next:From: Brendan JurdDate: 2007-09-29 03:02:10
Subject: Re: [HACKERS] Add function for quote_qualified_identifier?
Previous:From: Tom LaneDate: 2007-09-29 02:21:35
Subject: Re: pgcrypto: fix for broken solaris openssl, v03

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