Обсуждение: psql wishes or even realized?
Hello, I am new here and want to give some informations about me: I'm using postgreSQL 7.2.1 on Linux and in future on Netware and I am developing with Delphi and administrate some servers. I am using postgreSQL since about 5 weeks, but I have used this time to design my database and since yesterday, I createit. I am not a friend of pgadmin, because something was wrong and so I couldn't add more tables. So I've decided to use psql. Everything is working fine with the creation of the tables, but I have two things, which could be better: 1) sql-logfile of psql after I have created some tables , I can't remember exactly the sql-code, if I have done everything correctly and so, I amsearching the possibility to get a file, where all SQL-code is beeing listed, I've written with psql (to make a TQuerywith Delphi to create the same database by clicking on a simple button) 2) better implementation of cursor-keys if I have done an error in a line, I can't go to this line and fix it, because I get letters like ^[[D. How is this bug tofix? I'm using the german keytable. Thank you very much Daniel Seichter
>1) sql-logfile of psql >after I have created some tables , I can't remember exactly the sql-code, >if I have done everything correctly and so, I am searching the possibility >to get a file, where all SQL-code is beeing listed, I've written with psql >(to make a TQuery with Delphi to create the same database by clicking on a >simple button) If you use pg_dump to dump the database, you will get an SQL listing of the database. $pg_dump database >file.dmp If you want, you can edit the dmp file and then recreate your database with the changes. 1. pg_dump database >file.dmp 2. vi file.dmp (make changes) 3. dropdb database 4. psql database -f file.dmp >2) better implementation of cursor-keys >if I have done an error in a line, I can't go to this line and fix it, >because I get letters like ^[[D. How is this bug to fix? I'm using the >german keytable. > When you build PostgreSQL it will pick up the GNU readline library if it is found. Make sure it is installed on your machine before you build. On SuSE 7.3, I helped this by specifying the following option to configure: configure --with-include=/usr/include/guile-readline Steve _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx