Re: [HACKERS] Speedup idea: avoid using SQL procedures as aliases

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Speedup idea: avoid using SQL procedures as aliases
Date: 1999-03-29 17:28:34
Message-ID: 36FFB842.16B4BBD1@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I noticed just now that there are a lot of SQL-language procedures in
> pg_proc whose only purpose is to provide alternative names for
> built-in functions.

Yeah. Neat hack, eh? Edmund Mergl found this, and allowed us to use
generic names for functions for the first time. But...

> It strikes me that this is pretty inefficient.
> I am thinking about fixing this by decoupling the user-level name of
> an internal function from its C-language name. The simplest way seems
> to be to modify pg_proc.h and Gen_fmgrtab.sh.in so that the C-language
> name of an internal function is stored in pg_proc's "prosrc" field
> (which is currently unused for internal functions) rather than being
> taken from "proname". Then, all of the SQL functions that are simply
> aliases for internal functions could be converted to plain internal
> function entries that have proname different from prosrc.
> Anyone have an objection to this? I suppose we'd need to check that
> the regression tests still exercise SQL functions ;-)

No objection; I've toyed with the idea of doing this, but didn't have
the guts to touch the layout of system tables. You seem to have no
such qualms ;)

I'd be happy to help with the conversion, though I'd suggest that this
would perhaps be a great topic for v6.6 since it does involve some
fundamental (hopefully isolated) changes. Also, for my participation
(certainly not required) I'd have more time during the next cycle...

- Tom

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-03-29 17:31:53 Re: [HACKERS] Parser doesn't grok unqualified array element
Previous Message D'Arcy J.M. Cain 1999-03-29 17:27:05 Re: [HACKERS] NULL handling question