Thread: applications needed for client port?
Hi I am porting just the front end part of PostgreSQL to the Amiga OS4. I have managed to get psql to work. I intended to get pg_dump and pg_dumpall going next. I was wondering what else is needed to enable the PostgreSQL client to work fully, I am only interested in the front end (i.e. client) stuff at the moment. Also I am interested in what would be needed to intergrate (if possible) the changes I have made into the main CVS of PostgeSQL. There are some difficultes with this, 1) I can't run the configure script 2) I have created my own 'pg_config.h' file, and make files (2 so far). 3) I had to remove the definitions of the 'struct Node' and 'struct List' leaving only the typedefs, as these conflicted with a lot of standard include files. Another question I have is how much the fronted changes from version to version? Regards Neil
Neil Dugan wrote: > I am porting just the front end part of PostgreSQL to the Amiga OS4. > I have managed to get psql to work. I intended to get pg_dump and > pg_dumpall going next. I was wondering what else is needed to enable > the PostgreSQL client to work fully, I am only interested in the > front end (i.e. client) stuff at the moment. That depends entirely on what you define as a "full client". Certainly, psql and pg_dump would be good candidates, but some might consider a reasonable client to include a GUI, say. > Also I am interested in what would be needed to intergrate (if > possible) the changes I have made into the main CVS of PostgeSQL. > > There are some difficultes with this, > 1) I can't run the configure script Why? > 2) I have created my own 'pg_config.h' file, and make files (2 so > far). 3) I had to remove the definitions of the 'struct Node' > and 'struct List' leaving only the typedefs, as these > conflicted with a lot of standard include files. Details please. > Another question I have is how much the fronted changes from version > to version? By 37% on average. No seriously, what do you want to know? -- Peter Eisentraut http://developer.postgresql.org/~petere/
On Tue, 2005-02-01 at 11:06 +0100, Peter Eisentraut wrote: > Neil Dugan wrote: > > I am porting just the front end part of PostgreSQL to the Amiga OS4. > > I have managed to get psql to work. I intended to get pg_dump and > > pg_dumpall going next. I was wondering what else is needed to enable > > the PostgreSQL client to work fully, I am only interested in the > > front end (i.e. client) stuff at the moment. > > That depends entirely on what you define as a "full client". Certainly, > psql and pg_dump would be good candidates, but some might consider a > reasonable client to include a GUI, say. I'm not porting any GUI (too many differences). I was just wondering what shell commands might be wanted by users that only use libpq to connect to the server. > > > Also I am interested in what would be needed to intergrate (if > > possible) the changes I have made into the main CVS of PostgeSQL. > > > > There are some difficultes with this, > > 1) I can't run the configure script > > Why? No bash compatible shell, no 'sed' or 'chmod' or many others. > > > 2) I have created my own 'pg_config.h' file, and make files (2 so > > far). 3) I had to remove the definitions of the 'struct Node' > > and 'struct List' leaving only the typedefs, as these > > conflicted with a lot of standard include files. > > Details please. > This is the changes I think has the most chance of affecting anyone else. -------------------------------------- in src/include/nodes/nodes.h #ifdef __AMIGAOS4__ typedef struct { NodeTag type; } Node; #else typedef struct Node { NodeTag type; } Node; #endif -------------------------------------- in src/include/nodes/pg_list.h #ifdef __AMIGAOS4__ typedef struct { NodeTag type; union { void *ptr_value; int int_value; Oid oid_value; } elem; void *next; } List; #else typedef struct List { NodeTag type; union { void *ptr_value; int int_value; Oid oid_value; } elem; struct List *next; } List; #endif -------------------------------------- Most of the other changes where to do with which code to compile, WIN32 code or Linux code. All under compile defines. > > Another question I have is how much the fronted changes from version > > to version? > > By 37% on average. > > No seriously, what do you want to know? > How often does the code for libpq change, making older revision of libpq not work with newer version of the database server? Currently I an using a libpq compiled from 7.4.2 code with the database server version 7.4.6. I expect that the communication protocol between libpq and the database server would be quite stable. Regards Neil.
Neil Dugan wrote: > I'm not porting any GUI (too many differences). I was just wondering > what shell commands might be wanted by users that only use libpq to > connect to the server. I would say everything that the documentation lists under Client Applications would be good targets. http://www.postgresql.org/docs/8.0/static/reference-client.html > No bash compatible shell, no 'sed' or 'chmod' or many others. That was the initial impression on Windows as well, but we found mingw and msys, which provide all that and made the porting much easier. Perhaps something of that kind exists for your system as well? It's not a requirement, but it would help. > This is the changes I think has the most chance of affecting anyone > else. > -------------------------------------- > in src/include/nodes/nodes.h > #ifdef __AMIGAOS4__ > typedef struct { > NodeTag type; > } Node; > #else > typedef struct Node { > NodeTag type; > } Node; > #endif > -------------------------------------- [etc.] But why is that necessary? I trust that you can read compiler error messages, but the public might like to see them so we can form a balanced opinion. > How often does the code for libpq change, making older revision of > libpq not work with newer version of the database server? The most recent libpq that no longer works with the current server was released around 1998. I don't think you need to worry about that. We keep protocol compatibility for a long time. -- Peter Eisentraut http://developer.postgresql.org/~petere/
On Wed, 2005-02-02 at 10:09 +0100, Peter Eisentraut wrote: > Neil Dugan wrote: > > I'm not porting any GUI (too many differences). I was just wondering > > what shell commands might be wanted by users that only use libpq to > > connect to the server. > > I would say everything that the documentation lists under Client > Applications would be good targets. > > http://www.postgresql.org/docs/8.0/static/reference-client.html I will have a close look at that list! > > > No bash compatible shell, no 'sed' or 'chmod' or many others. > > That was the initial impression on Windows as well, but we found mingw > and msys, which provide all that and made the porting much easier. > Perhaps something of that kind exists for your system as well? It's > not a requirement, but it would help. > > > This is the changes I think has the most chance of affecting anyone > > else. > > -------------------------------------- > > in src/include/nodes/nodes.h > > #ifdef __AMIGAOS4__ > > typedef struct { > > NodeTag type; > > } Node; > > #else > > typedef struct Node { > > NodeTag type; > > } Node; > > #endif > > -------------------------------------- > [etc.] > > But why is that necessary? I trust that you can read compiler error > messages, but the public might like to see them so we can form a > balanced opinion. Because the standard header files for the Amiga OS use 'struct List' and 'struct Node' all though them. Which causes gcc to complain that these have been redefined. Fortunately these aren't typedef as well. Here is the error message: In file included from ../include/nodes/pg_list.h:17, from ../include/libpq/hba.h:18, from ../include/libpq/libpq-be.h:21, from ../include/libpq/crypt.h:16, from ../src/interfaces/libpq/fe-auth.c:61: ../include/nodes/nodes.h:306: error: redefinition of `struct Node' > > How often does the code for libpq change, making older revision of > > libpq not work with newer version of the database server? > > The most recent libpq that no longer works with the current server was > released around 1998. I don't think you need to worry about that. We > keep protocol compatibility for a long time. Thats good to hear.
Peter Eisentraut <peter_e@gmx.net> writes: > Neil Dugan wrote: >> How often does the code for libpq change, making older revision of >> libpq not work with newer version of the database server? > The most recent libpq that no longer works with the current server was > released around 1998. I don't think you need to worry about that. We > keep protocol compatibility for a long time. However, while you might be able to sit on an old libpq for awhile, I don't think you could get away with not updating pg_dump for every new server release. It would be better not to try to port pg_dump at all than to distribute an obsolete one. psql is better, but not all that much better :-( as both describe.c and tab-complete.c are pretty dependent on the server version. regards, tom lane