-
- Downloads
In the spirit of TODO item
* Add use of 'const' for varibles in source tree (which is misspelled, btw.) I went through the front-end libpq code and did so. This affects in particular the various accessor functions (such as PQdb() and PQgetvalue()) as well as, by necessity, the internal helpers they use. I have been really thorough in that regard, perhaps some people will find it annoying that things like char * foo = PQgetvalue(res, 0, 0) will generate a warning. On the other hand it _should_ generate one. This is no real compatibility break, although a few clients will have to be fixed to suppress warnings. (Which again would be in the spirit of the above TODO.) In addition I replaced some int's by size_t's and removed some warnings (and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so it actually honors the const!) and supplied a new function PQoidValue that returns a proper Oid type. This is only front-end stuff, none of the communicaton stuff was touched. The psql patch also adds some new consts to honor the new libpq situation, as well as fixes a fatal condition that resulted when using the -V (--version) option and there is no database listening. So, to summarize, the psql you should definitely put in (with or without the libpq). If you think I went too far with the const-mania in libpq, let me know and I'll make adjustments. If you approve it, I will also update the docs. -Peter -- Peter Eisentraut Sernanders vaeg 10:115
Showing
- src/bin/psql/command.c 1 addition, 1 deletionsrc/bin/psql/command.c
- src/bin/psql/describe.c 7 additions, 8 deletionssrc/bin/psql/describe.c
- src/bin/psql/print.c 43 additions, 31 deletionssrc/bin/psql/print.c
- src/bin/psql/print.h 3 additions, 2 deletionssrc/bin/psql/print.h
- src/bin/psql/startup.c 16 additions, 24 deletionssrc/bin/psql/startup.c
- src/interfaces/libpq/fe-connect.c 21 additions, 21 deletionssrc/interfaces/libpq/fe-connect.c
- src/interfaces/libpq/fe-exec.c 60 additions, 59 deletionssrc/interfaces/libpq/fe-exec.c
- src/interfaces/libpq/fe-lobj.c 6 additions, 6 deletionssrc/interfaces/libpq/fe-lobj.c
- src/interfaces/libpq/fe-misc.c 9 additions, 9 deletionssrc/interfaces/libpq/fe-misc.c
- src/interfaces/libpq/fe-print.c 36 additions, 36 deletionssrc/interfaces/libpq/fe-print.c
- src/interfaces/libpq/libpq-fe.h 59 additions, 58 deletionssrc/interfaces/libpq/libpq-fe.h
- src/interfaces/libpq/libpq-int.h 6 additions, 6 deletionssrc/interfaces/libpq/libpq-int.h
Loading
Please register or sign in to comment