Thread: 2 newbie questions
1. I'm porting a clients database over from access(!). In order not to have to tamper with the code, I need to rid myself of the oid column. I have a workaround which involves editing the code, but I was just interested if the "getting rid of the oid column" was a possibility? 2. I have a date/time column in access... should this datatype be datetime in postgres... and how do i format the text to import it into the postgres file using copy? All replies humbly appreciated! :) Helen
"Helen M Hudson" <helen@rttc.co.za> writes: > 1. I'm porting a clients database over from access(!). In order not > to have to tamper with the code, I need to rid myself of the oid > column. I have a workaround which involves editing the code, but I > was just interested if the "getting rid of the oid column" was a > possibility? Well, you are in luck, the 7.2 release allows you to create tables without the oid column. However, I am curious as to why you would want to get rid of the oid column. It seems to me that if you didn't want to see the oid column then you shouldn't select it when querying :). The oid column doesn't show up in any of the clients I use unless I ask for it specifically. I also believe that their is a tab in the ODBC driver that hides that column. It's been a while since I played with the odbc driver, so I am not positive. > 2. I have a date/time column in access... should this datatype be > datetime in postgres... and how do i format the text to import it > into the postgres file using copy? I am not really all that familiar with access, but my guess is that you want the timestamp type. The preferred format for import is ISO format: YYYY-MM-DD HH:MM:SS.mm TZ but PostgreSQL is pretty flexible when it comes to date time input. I regularly import from SQL Server and I haven't ever had any problems with timestamp fields. > All replies humbly appreciated! :) > > Helen Take Care, Jason
Helen, First, go to TechDocs (http://techdocs.postgresql.org/). There you will find several articles and scripts for porting Access to PsotgreSQL. Second, join pgsql-odbc mailing list, where you will find other users running postgres with MS Access and VB front-ends. > 1. I'm porting a clients database over from access(!). In order not > to have > to tamper with the code, I need to rid myself of the oid column. I > have a > workaround which involves editing the code, but I was just interested > if the > "getting rid of the oid column" was a possibility? OID-less tables will become available in 7.2 (currently in beta). However, as a developer who has one Access client app running on a PostgreSQL back-end, I don't understand the problem that you are having with OIDs. They have not been a concern for me. > 2. I have a date/time column in access... should this datatype be > datetime > in postgres... and how do i format the text to import it into the > postgres > file using copy? Several valid date/time formats should work. You'll have best luck with the standard Unix format, that is "YYYY-MM-DD HH:MM:SS" (i.e. "2001-07-10 14:23:57"). -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco
1) I believe there is an ODBC option to hide the OID column. Also, I think I read that 7.2 will have an option to create tables without OID's. 2) 2001-11-20 2:00:00PM (yyyy-mm-dd hh:ss:mmAM) --rob ----- Original Message ----- From: "Helen M Hudson" <helen@rttc.co.za> To: <pgsql-novice@postgresql.org> Sent: Monday, November 19, 2001 1:51 PM Subject: 2 newbie questions > 1. I'm porting a clients database over from access(!). In order not to have > to tamper with the code, I need to rid myself of the oid column. I have a > workaround which involves editing the code, but I was just interested if the > "getting rid of the oid column" was a possibility? > > 2. I have a date/time column in access... should this datatype be datetime > in postgres... and how do i format the text to import it into the postgres > file using copy? > > All replies humbly appreciated! :) > > Helen > >
When I try to build PostgreSQL configured using the --with-python flag, the build ends with the statement: *** Cannot build PL/Python because libpython is not a shared library. *** You might have to rebuild your Python installation. Refer to *** the documentation for details. Unfortunately, I can't find the documentation it is refering to. I've tried rebuilding Python a couple of different ways, but I never seem to get a libpython*.so (I do get libpython*.a's). I can find any reference to libpython in the PostgreSQL docs. I expect I'm in a weird case since I'm trying to get all of this working under MacOSX. Any suggestions? Thanks, -Nathan