Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-15 Thread Craig Ringer
On 04/15/2014 10:17 PM, Tom Lane wrote: >> > I actually think we should *add* a LIBPQEXPORT that handles this for >> > libpq, much like PGDLLEXPORT does for postgres(.exe). And in the >> > process, rename PGDLLEXPORT to POSTGRESEXPORT or PGSERVEREXPORT or >> > something. > My reaction to that is "n

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-15 Thread Tom Lane
Peter Eisentraut writes: > Let me point out again that my patch doesn't actually do anything about > PGDLLEXPORT or the like. It just adds automatic prototypes into > PG_FUNCTION_INFO_V1, to reduce compiler warnings in extensions and > reduce some boilerplate in general. Hmm ... for some reason

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-15 Thread Peter Eisentraut
On 4/14/14, 3:28 PM, Peter Eisentraut wrote: > On 4/4/14, 10:07 AM, Andres Freund wrote: >> If >> somebody previously tried to do the correct thing and attached >> PGDLLEXPORT to their own *function* prototoype, it would cause problems >> now. > > What is the difference (on affected platforms) bet

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-15 Thread Tom Lane
Craig Ringer writes: > On 04/15/2014 03:39 AM, Tom Lane wrote: >> I still wish we could get rid of this problem by fixing the Windows build >> recipes so that the PGDLLEXPORT marking wasn't needed. We proved to >> ourselves recently that getting rid of PGDLLIMPORT on global variables >> wouldn't

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-15 Thread Craig Ringer
On 04/15/2014 03:39 AM, Tom Lane wrote: > I still wish we could get rid of this problem by fixing the Windows build > recipes so that the PGDLLEXPORT marking wasn't needed. We proved to > ourselves recently that getting rid of PGDLLIMPORT on global variables > wouldn't work, but I'm not sure that

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-14 Thread Tom Lane
Peter Eisentraut writes: > What is the difference (on affected platforms) between > Datum funcname(PG_FUNCTION_ARGS); > and writing (effectively) > PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS); > Datum funcname(PG_FUNCTION_ARGS); > or for that matter > Datum funcname(PG_FUNCTION_ARGS); > PGDL

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-14 Thread Peter Eisentraut
On 4/4/14, 10:07 AM, Andres Freund wrote: > If > somebody previously tried to do the correct thing and attached > PGDLLEXPORT to their own *function* prototoype, it would cause problems > now. What is the difference (on affected platforms) between Datum funcname(PG_FUNCTION_ARGS); and writing (e

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-04-04 Thread Andres Freund
On 2014-02-17 10:30:16 -0300, Alvaro Herrera wrote: > Tom Lane wrote: > > Peter Eisentraut writes: > > > On 2/15/14, 10:22 AM, Tom Lane wrote: > > >> Yes it does; people who fail to remove their manual externs will get > > >> Windows-only build failures (or at least warnings; it's not very clear >

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-17 Thread Alvaro Herrera
Tom Lane wrote: > Peter Eisentraut writes: > > On 2/15/14, 10:22 AM, Tom Lane wrote: > >> Yes it does; people who fail to remove their manual externs will get > >> Windows-only build failures (or at least warnings; it's not very clear > >> which declaration will win). > > > The manual externs and

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-15 Thread Tom Lane
Peter Eisentraut writes: > On 2/15/14, 10:22 AM, Tom Lane wrote: >> Yes it does; people who fail to remove their manual externs will get >> Windows-only build failures (or at least warnings; it's not very clear >> which declaration will win). > The manual externs and the automatically provided on

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-15 Thread Peter Eisentraut
On 2/15/14, 10:22 AM, Tom Lane wrote: > Peter Eisentraut writes: >> On 1/15/14, 12:41 AM, Tom Lane wrote: >>> Meh. I don't think that extension authors are really going to appreciate >>> changing from "thou shalt declare all thy functions" to "thou shalt >>> declare none of them". > >> This patc

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-15 Thread Tom Lane
Peter Eisentraut writes: > On 1/15/14, 12:41 AM, Tom Lane wrote: >> Meh. I don't think that extension authors are really going to appreciate >> changing from "thou shalt declare all thy functions" to "thou shalt >> declare none of them". > This patch does no such thing. Yes it does; people who

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-15 Thread Peter Eisentraut
On 1/15/14, 12:41 AM, Tom Lane wrote: > Meh. I don't think that extension authors are really going to appreciate > changing from "thou shalt declare all thy functions" to "thou shalt > declare none of them". This patch does no such thing. > If the code were such that it wouldn't matter > whether

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-15 Thread Peter Eisentraut
On 2/15/14, 8:51 AM, Andres Freund wrote: > Based on those comments and the lack of counter arguments after a month > I am going to mark the patch as rejected. Actually, I was waiting for that PGDLLIMPORT thread to sort itself out before tackling this. -- Sent via pgsql-hackers mailing list (p

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-02-15 Thread Andres Freund
Hi, On 2014-01-15 00:41:41 -0500, Tom Lane wrote: > Peter Eisentraut writes: > > This idea has appeared at least twice now, in > > http://www.postgresql.org/message-id/1386301050.2743.17.ca...@vanquo.pezone.net > > and http://www.postgresql.org/message-id/52d25aa2.50...@2ndquadrant.com . > > E

Re: [HACKERS] Create function prototype as part of PG_FUNCTION_INFO_V1

2014-01-14 Thread Tom Lane
Peter Eisentraut writes: > This idea has appeared at least twice now, in > http://www.postgresql.org/message-id/1386301050.2743.17.ca...@vanquo.pezone.net > and http://www.postgresql.org/message-id/52d25aa2.50...@2ndquadrant.com . > Even if it doesn't help with Windows issues, as discussed in t