Обсуждение: Working between Windows and Unix
Hello: I am working on Windows and Unix with Postgresql (newbie, so please be kind). I use phppgadmin on both platforms. Windows is my local machine. Linux (CentOS as usual) is the cpanel thing that my hosting provider offers. Basically this setup works well and I am learning the ropes. But the problem is with exporting data and structure. Phppgadmin does not allow exporting to SQL of the database on Windows platform. I see this error: --------------QUOTE-------------------- <br /> <b>Notice</b>: Undefined offset: 1 in <b>D:\Code\phppg\dbexport.php</b> on line <b>75</b><br /> <br /> <b>Notice</b>: Undefined offset: 1 in <b>D:\Code\phppg\dbexport.php</b> on line <b>78</b><br /> Dumping of complex table and schema names on Windows is not supported. --------------END QUOTE-------------------- Failing this, what else can I do? How can I simply take all my data and structure from here and put it up? I also want this method to be fast because I have a table with about 2.5 million rows (I know it is nothing compared to other discussions that people post here, but it is a lot for my machine). Many thanks!
Why dont you use the pg_dump (http://www.postgresql.org/docs/8.2/static/backup-dump.html) utility of PostgreSQL. Use the -s switch for taking just the schema and -a for taking the data dumps. Try that and let us know if you face a problem doing so.
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
--
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 4/2/07, Erick Papadakis < erick.papa@gmail.com> wrote:
Hello:
I am working on Windows and Unix with Postgresql (newbie, so please be
kind). I use phppgadmin on both platforms. Windows is my local
machine. Linux (CentOS as usual) is the cpanel thing that my hosting
provider offers.
Basically this setup works well and I am learning the ropes. But the
problem is with exporting data and structure. Phppgadmin does not
allow exporting to SQL of the database on Windows platform. I see this
error:
--------------QUOTE--------------------
<br />
<b>Notice</b>: Undefined offset: 1 in
<b>D:\Code\phppg\dbexport.php</b> on line <b>75</b><br />
<br />
<b>Notice</b>: Undefined offset: 1 in
<b>D:\Code\phppg\dbexport.php</b> on line <b>78</b><br />
Dumping of complex table and schema names on Windows is not supported.
--------------END QUOTE--------------------
Failing this, what else can I do? How can I simply take all my data
and structure from here and put it up?
I also want this method to be fast because I have a table with about
2.5 million rows (I know it is nothing compared to other discussions
that people post here, but it is a lot for my machine).
Many thanks!
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Erick Papadakis wrote: > Hello: > > I am working on Windows and Unix with Postgresql (newbie, so please be > kind). I use phppgadmin on both platforms. Windows is my local > machine. Linux (CentOS as usual) is the cpanel thing that my hosting > provider offers. > > Basically this setup works well and I am learning the ropes. But the > problem is with exporting data and structure. Phppgadmin does not > allow exporting to SQL of the database on Windows platform. I see this > error: > > > --------------QUOTE-------------------- > <br /> > <b>Notice</b>: Undefined offset: 1 in > <b>D:\Code\phppg\dbexport.php</b> on line <b>75</b><br /> > <br /> > <b>Notice</b>: Undefined offset: 1 in > <b>D:\Code\phppg\dbexport.php</b> on line <b>78</b><br /> > Dumping of complex table and schema names on Windows is not supported. > --------------END QUOTE-------------------- This usually means the output of pg_dump -i is not working correctly. Have you got the correct path for pg_dump on your server? Is pg_dump available on your server (where phpPgAdmin is running)? You will need to edit conf/config.inc.php and set the correct path for pg_dump, once you've done that, you should get the correct output. > > > Failing this, what else can I do? How can I simply take all my data > and structure from here and put it up? > > I also want this method to be fast because I have a table with about > 2.5 million rows (I know it is nothing compared to other discussions > that people post here, but it is a lot for my machine). > > Many thanks! > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings >
On 4/2/07, Russell Smith <mr-russ@pws.com.au> wrote: > Erick Papadakis wrote: > > Hello: > > > > I am working on Windows and Unix with Postgresql (newbie, so please be > > kind). I use phppgadmin on both platforms. Windows is my local > > machine. Linux (CentOS as usual) is the cpanel thing that my hosting > > provider offers. > > > > Basically this setup works well and I am learning the ropes. But the > > problem is with exporting data and structure. Phppgadmin does not > > allow exporting to SQL of the database on Windows platform. I see this > > error: > > > > > > --------------QUOTE-------------------- > > <br /> > > <b>Notice</b>: Undefined offset: 1 in > > <b>D:\Code\phppg\dbexport.php</b> on line <b>75</b><br /> > > <br /> > > <b>Notice</b>: Undefined offset: 1 in > > <b>D:\Code\phppg\dbexport.php</b> on line <b>78</b><br /> > > Dumping of complex table and schema names on Windows is not supported. > > --------------END QUOTE-------------------- > This usually means the output of pg_dump -i is not working correctly. > Have you got the correct path for pg_dump on your server? > Is pg_dump available on your server (where phpPgAdmin is running)? > > You will need to edit conf/config.inc.php and set the correct path for > pg_dump, once you've done that, you should get the correct output. How can I find the path for pg_dump? You mean on Windows or on Linux? I am unable to make the "dump" or SQL backup from my Windows machine to begin with! If I were to use pg_dump without phppgadmin, how can I do it? When I use pgadmin III to do "backup" of the database, it takes me to a dialog box with some options, but I just cannot get the OK button to go active in this dialog box. So I cannot do backup that way. Next, I tried to use pgsql and tried this: postgres=# pg_dump MYDB > d:\mydb.sql history is not supported by this installation What does this mean? History not supported? The manual on pgsql website about pg_dump gives very little info about where to execute the command. Thanks!
On 02/04/2007 19:51, Erick Papadakis wrote: > How can I find the path for pg_dump? You mean on Windows or on Linux? > I am unable to make the "dump" or SQL backup from my Windows machine > to begin with! On my laptop (WinXP) it's in c:\program files\postgresql\8.2\bin. I've added this to my system PATH so that I don't have to type it every time.... > postgres=# pg_dump MYDB > d:\mydb.sql It's a command-line program: you don't run it from within psql, but directly at the shell prompt. For example, on my machine: C:\Documents and Settings\rod>psql dbname > dumpfile.sql You might have to specify the database user as which to connect, using the -U option - see the docs for all options. > The manual on pgsql website about pg_dump gives very little info about > where to execute the command. The examples in the docs all begin with the shell prompt '$'. Ray. --------------------------------------------------------------- Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland rod@iol.ie ---------------------------------------------------------------