ODBC Patch
This patch fixes resource.h which is generated automatically by MS VC++ and
broken by pgindent :-(
Regards,
Dave.
Helps if I actually attach it!
Show quoted text
-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: 12 February 2001 08:00
To: pgsql-patches@postgresql.org
Subject: [PATCHES] ODBC PatchThis patch fixes resource.h which is generated automatically
by MS VC++ and
broken by pgindent :-(Regards,
Dave.
Attachments:
odbc.diffapplication/octet-stream; name=odbc.diffDownload+113-113
Import Notes
Resolved by subject fallback
Dave, can you test the attached patch? I assume the problem was that
pgindent does not recognize // as comments, and in fact, we don't want
to use them.
This should fix the problem.
[ Charset ISO-8859-1 unsupported, converting... ]
Helps if I actually attach it!
-----Original Message-----
From: Dave Page [mailto:dpage@vale-housing.co.uk]
Sent: 12 February 2001 08:00
To: pgsql-patches@postgresql.org
Subject: [PATCHES] ODBC PatchThis patch fixes resource.h which is generated automatically
by MS VC++ and
broken by pgindent :-(Regards,
Dave.
[ Attachment, skipping... ]
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Attachments:
/bjm/difftext/plainDownload+11-14
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 February 2001 12:59
To: Dave Page
Cc: 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] ODBC PatchDave, can you test the attached patch? I assume the problem was that
pgindent does not recognize // as comments, and in fact, we don't want
to use them.This should fix the problem.
I've not tested it (I'm just configuring my new laptop :-) ) but that should
work (and has done - if you look back in CVS I made that mod before). The
problem is that MS VC++ autogenerates resource.h whenever psqlodbc.rc is
updated in the IDE. Is it possible to get pgindent to ignore that file or
would that cause more problems?
Regards, Dave.
Import Notes
Resolved by subject fallback
Dave, can you test the attached patch? I assume the problem was that
pgindent does not recognize // as comments, and in fact, we don't want
to use them.This should fix the problem.
I've not tested it (I'm just configuring my new laptop :-) ) but that should
work (and has done - if you look back in CVS I made that mod before). The
problem is that MS VC++ autogenerates resource.h whenever psqlodbc.rc is
updated in the IDE. Is it possible to get pgindent to ignore that file or
would that cause more problems?
Sure, we can ignore it, but do we want an MS-generated file to be
tracked in our CVS, and especially one with // comments?
If resource.h was included only by MS compilers, that would be better,
but I see every platform including the file.
Can you send me that resource.h file again, and I will merge in any
change made by *.rc, but keep the /* */ comments, OK?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Bruce Momjian <pgman@candle.pha.pa.us> writes:
problem is that MS VC++ autogenerates resource.h whenever psqlodbc.rc is
updated in the IDE. Is it possible to get pgindent to ignore that file or
would that cause more problems?
Sure, we can ignore it, but do we want an MS-generated file to be
tracked in our CVS, and especially one with // comments?
If resource.h was included only by MS compilers, that would be better,
but I see every platform including the file.
Good point. This will not be buildable on machines whose compilers do
not like //.
Can you send me that resource.h file again, and I will merge in any
change made by *.rc, but keep the /* */ comments, OK?
I don't think that's a feasible long-term maintenance approach either.
Will you or Dave remember to do this any time psqlodbc.rc changes?
Seems like the correct answer is for pgindent to automatically transform
"// comment" to "/* comment */".
regards, tom lane
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 12 February 2001 15:19
To: Bruce Momjian
Cc: Dave Page; 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] ODBC PatchBruce Momjian <pgman@candle.pha.pa.us> writes:
problem is that MS VC++ autogenerates resource.h whenever
psqlodbc.rc is
updated in the IDE. Is it possible to get pgindent to
ignore that file or
would that cause more problems?
Sure, we can ignore it, but do we want an MS-generated file to be
tracked in our CVS, and especially one with // comments?
If resource.h was included only by MS compilers, that wouldbe better,
but I see every platform including the file.
Good point. This will not be buildable on machines whose compilers do
not like //.Can you send me that resource.h file again, and I will merge in any
change made by *.rc, but keep the /* */ comments, OK?I don't think that's a feasible long-term maintenance approach either.
Will you or Dave remember to do this any time psqlodbc.rc changes?
I can certainly do this anytime I update the driver, but I obviously can't
keep track of other people who change it. IMHO it (psqlodbc.rc) should be
updated for every patch submitted as it (along with psqlodbc.h) contain the
revision number which is essential for the ODBC driver which is often
updated outside of the main PostgreSQL releases.
Seems like the correct answer is for pgindent to
automatically transform
"// comment" to "/* comment */".
This sounds much more sensible.
Regards,
Dave.
Import Notes
Resolved by subject fallback
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 February 2001 14:12
To: Dave Page
Cc: 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] ODBC PatchDave, can you test the attached patch? I assume the
problem was that
pgindent does not recognize // as comments, and in fact,
we don't want
to use them.
This should fix the problem.
I've not tested it (I'm just configuring my new laptop :-)
) but that should
work (and has done - if you look back in CVS I made that
mod before). The
problem is that MS VC++ autogenerates resource.h whenever
psqlodbc.rc is
updated in the IDE. Is it possible to get pgindent to
ignore that file or
would that cause more problems?
Sure, we can ignore it, but do we want an MS-generated file to be
tracked in our CVS, and especially one with // comments?If resource.h was included only by MS compilers, that would be better,
but I see every platform including the file.Can you send me that resource.h file again, and I will merge in any
change made by *.rc, but keep the /* */ comments, OK?
Here's the (working) file with C style comments.
I've made comments on the subject in a reply to Tom's message...
Regards, Dave.
Attachments:
Import Notes
Resolved by subject fallback
Applied. Thanks.
[ Charset ISO-8859-1 unsupported, converting... ]
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 February 2001 14:12
To: Dave Page
Cc: 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] ODBC PatchDave, can you test the attached patch? I assume the
problem was that
pgindent does not recognize // as comments, and in fact,
we don't want
to use them.
This should fix the problem.
I've not tested it (I'm just configuring my new laptop :-)
) but that should
work (and has done - if you look back in CVS I made that
mod before). The
problem is that MS VC++ autogenerates resource.h whenever
psqlodbc.rc is
updated in the IDE. Is it possible to get pgindent to
ignore that file or
would that cause more problems?
Sure, we can ignore it, but do we want an MS-generated file to be
tracked in our CVS, and especially one with // comments?If resource.h was included only by MS compilers, that would be better,
but I see every platform including the file.Can you send me that resource.h file again, and I will merge in any
change made by *.rc, but keep the /* */ comments, OK?Here's the (working) file with C style comments.
I've made comments on the subject in a reply to Tom's message...
Regards, Dave.
[ Attachment, skipping... ]
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Can you send me that resource.h file again, and I will merge in any
change made by *.rc, but keep the /* */ comments, OK?I don't think that's a feasible long-term maintenance approach either.
Will you or Dave remember to do this any time psqlodbc.rc changes?I can certainly do this anytime I update the driver, but I obviously can't
keep track of other people who change it. IMHO it (psqlodbc.rc) should be
updated for every patch submitted as it (along with psqlodbc.h) contain the
revision number which is essential for the ODBC driver which is often
updated outside of the main PostgreSQL releases.
It is my understanding that resource.h is changed only when a new
option is added t psqlodbc.rc. It does not change with a version number
change because resource.h doesn't contain a version number.
Seems like the correct answer is for pgindent to
automatically transform
"// comment" to "/* comment */".This sounds much more sensible.
Sure, I can do that. I can have pgindent convert:
// comment
to
/* comment */
Dave, can you send me the MS-generated resource.h for me to test with
and cvs commit? Thanks.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 February 2001 18:32
To: Dave Page
Cc: 'Tom Lane'; 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] ODBC PatchIt is my understanding that resource.h is changed only when a new
option is added t psqlodbc.rc. It does not change with a
version number
change because resource.h doesn't contain a version number.
I've just tested with MS VC++ SP4 and it will not update psqlodbc.rc without
rewriting resource.h even if you only change the version number. If you say
No when prompted to update resource.h, it then doesn't update psqlodbc.rc
either.
Dave, can you send me the MS-generated resource.h for me to test with
and cvs commit? Thanks.
Attached.
Regards, Dave.
Attachments:
Import Notes
Resolved by subject fallback
OK, attached is the resource.h file, run through pgindent. Looks good.
Committed.
[ Charset ISO-8859-1 unsupported, converting... ]
-----Original Message-----
From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
Sent: 12 February 2001 18:32
To: Dave Page
Cc: 'Tom Lane'; 'pgsql-patches@postgresql.org'
Subject: Re: [PATCHES] ODBC PatchIt is my understanding that resource.h is changed only when a new
option is added t psqlodbc.rc. It does not change with a
version number
change because resource.h doesn't contain a version number.I've just tested with MS VC++ SP4 and it will not update psqlodbc.rc without
rewriting resource.h even if you only change the version number. If you say
No when prompted to update resource.h, it then doesn't update psqlodbc.rc
either.Dave, can you send me the MS-generated resource.h for me to test with
and cvs commit? Thanks.Attached.
Regards, Dave.
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026