Thread: GetExistingLocalJoinPath() vs. the docs
Greetings, While getting back into the thread Re: Optimization for updating foreign tables in Postgres FDW, I noticed some issues with the docs and GetExistingLocalJoinPath(): GetExistingLocalJoinPath() exists in src/backend/foreign/foreign.c, but the docs include discussion of it under 54.2 - Foreign Data Wrapper Callback Routines. Shouldn't this be under 54.3. Foreign Data Wrapper Helper Functions? Also, the prototype is incorrect in the docs (it doesn't return a void) and the paragraph about what it's for could do with some wordsmithing. A link from 54.2 to 54.3 which mentions it would be fine, of course. Thanks! Stephen
On Mon, Feb 15, 2016 at 9:11 PM, Stephen Frost <sfrost@snowman.net> wrote:
PFA patch fixing those things.
Greetings,
While getting back into the thread Re: Optimization for updating foreign
tables in Postgres FDW, I noticed some issues with the docs and
GetExistingLocalJoinPath():
GetExistingLocalJoinPath() exists in src/backend/foreign/foreign.c, but
the docs include discussion of it under 54.2 - Foreign Data Wrapper
Callback Routines. Shouldn't this be under 54.3. Foreign Data Wrapper
Helper Functions?
Yes
Also, the prototype is incorrect in the docs (it
doesn't return a void)
Thanks for pointing that out.
and the paragraph about what it's for could do
with some wordsmithing.
Any specific suggestions?
A link from 54.2 to 54.3 which mentions it would be fine, of course.
Ok
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Attachment
On Tue, Feb 16, 2016 at 7:53 AM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote: > PFA patch fixing those things. I think that you need to take a little broader look at this section. At the top, it says "To use any of these functions, you need to include the header file foreign/foreign.h in your source file", but this function is defined in foreign/fdwapi.h. It's not clear to me whether we should consider moving the prototype, or just document that this function is someplace else. The other functions prototyped in fdwapi.h aren't documented at all, except for IsImportableForeignTable, which is mentioned in passing. Further down, the section says "Some object types have name-based lookup functions in addition to the OID-based ones:" and you propose to put the documentation for this function after that. But this comment doesn't actually describe this particular function. Actually, this function just doesn't seem to fit into this section at all. It's really quite different from the others listed there. How about something like the attached instead? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Attachment
I think that you need to take a little broader look at this section.
At the top, it says "To use any of these functions, you need to
include the header file foreign/foreign.h in your source file", but
this function is defined in foreign/fdwapi.h. It's not clear to me
whether we should consider moving the prototype, or just document that
this function is someplace else. The other functions prototyped in
fdwapi.h aren't documented at all, except for
IsImportableForeignTable, which is mentioned in passing.
Further down, the section says "Some object types have name-based
lookup functions in addition to the OID-based ones:" and you propose
to put the documentation for this function after that. But this
comment doesn't actually describe this particular function.
Actually, this function just doesn't seem to fit into this section at
all. It's really quite different from the others listed there. How
about something like the attached instead?
Right. Mentioning the function in the description of relevant function looks better and avoids some duplication.
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
On Wed, Mar 2, 2016 at 1:12 AM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote: >> I think that you need to take a little broader look at this section. >> At the top, it says "To use any of these functions, you need to >> include the header file foreign/foreign.h in your source file", but >> this function is defined in foreign/fdwapi.h. It's not clear to me >> whether we should consider moving the prototype, or just document that >> this function is someplace else. The other functions prototyped in >> fdwapi.h aren't documented at all, except for >> IsImportableForeignTable, which is mentioned in passing. >> >> Further down, the section says "Some object types have name-based >> lookup functions in addition to the OID-based ones:" and you propose >> to put the documentation for this function after that. But this >> comment doesn't actually describe this particular function. >> >> >> Actually, this function just doesn't seem to fit into this section at >> all. It's really quite different from the others listed there. How >> about something like the attached instead? > > Right. Mentioning the function in the description of relevant function looks > better and avoids some duplication. Cool, committed that way. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company