[GENERAL] version number between pgdump and server

2009-01-08 Thread Laurent ROCHE
Hello, I am trying to backup a single table using pgdump. However the command fails because pgdump considers there's a mismatch between the server version (8.3.3) and the pgdump version (8.3.0) version. I get the following message: pg_dump.exe -h my_server -p 5432 -U postgres -F p -v -f "C:\Proje

[GENERAL] sequences and dependences

2008-05-24 Thread Laurent ROCHE
Hi, I would like to write a request where I would get the table name and column name of a sequence. In fact I want the opposite of pg_get_serial_sequence ! I have been looking at the sytem table and could not link the sequence from pg_class to a table (and even less to a table). And I have not

[GENERAL] generating UPDATE SET ... WHERE PK = ...

2007-10-30 Thread Laurent ROCHE
Hi, I would like to generate with a request a SQL order like UPDATE tab1 SET col_a = ?, col_b = ? ... WHERE pk = ? for each table of a given schema (in fact what I want is slightly more complicated but if I can write the above, I will be able to get the rest). Will anyone be kind enough to sh

Re : [GENERAL] pg_dump auto login

2007-10-24 Thread Laurent ROCHE
Warren, make sure that the pgpass.conf contains the correct entries (server name, user name, password). If you are prompted for a password, it's because pg_dump could not find a matching entry to what is specified in your pg_dump command. You can make a test with pgAdmin and if it prompts your f

Re : Re : Re : [GENERAL] Resetting SEQUENCEs

2007-10-19 Thread Laurent ROCHE
age d'origine De : Alvaro Herrera <[EMAIL PROTECTED]> À : Laurent ROCHE <[EMAIL PROTECTED]> Cc : Martijn van Oosterhout <[EMAIL PROTECTED]>; pgsql-general@postgresql.org Envoyé le : Jeudi, 18 Octobre 2007, 23h54mn 16s Objet : Re: Re : Re : [GENERAL] Resetting SEQUENCEs L

Re : Re : [GENERAL] Resetting SEQUENCEs

2007-10-18 Thread Laurent ROCHE
Hi, So nobody can help me to write the SELECT that will return the SEQUENCE names, and their linked columns and their linked tables ? Are the system tables documented somewhere ? Cheers, [EMAIL PROTECTED] The Computing Froggy - Message d'origine De : Laurent ROCHE <[EMAIL P

Re : [GENERAL] Abbreviation list

2007-10-18 Thread Laurent ROCHE
Yep, having a list would be good ! To answer your question, DDL is not a PG (here is another one) abbreviation but a database abbreviation. It stands for Data Definition Language ... and basically that means SQL orders to manage objects (CREATE, DROP, ALTER) see Wikipedia for more info. No idea

Re : Re : [GENERAL] pg_dump SERIAL and SEQUENCE

2007-10-18 Thread Laurent ROCHE
Not good because in that case pg_dump will generate code that can not run in 8.1 ... like : ALTER SEQUENCE ... OWNED BY Have fun, [EMAIL PROTECTED] The Computing Froggy - Message d'origine De : Alvaro Herrera <[EMAIL PROTECTED]> À : Laurent ROCHE <[EMAIL PROTECTED]

Re : [GENERAL] pg_dump SERIAL and SEQUENCE

2007-10-18 Thread Laurent ROCHE
é le : Jeudi, 18 Octobre 2007, 20h02mn 47s Objet : Re: [GENERAL] pg_dump SERIAL and SEQUENCE Laurent ROCHE <[EMAIL PROTECTED]> schrieb: > Then when I drop tab_b, the SEQUENCE tab_b_colb1_seq is not dropped, however > when I drop tab_a, the SEQUENCE tab_a_cola1_seq is dropped too ! &

Re : [GENERAL] Resetting SEQUENCEs

2007-10-18 Thread Laurent ROCHE
MAIL PROTECTED]> À : Laurent ROCHE <[EMAIL PROTECTED]> Cc : pgsql-general@postgresql.org Envoyé le : Jeudi, 18 Octobre 2007, 19h33mn 50s Objet : Re: [GENERAL] Resetting SEQUENCEs 2007/10/18, Laurent ROCHE <[EMAIL PROTECTED]>: > > Hi, > > I am quite surprised I could not

Re : [GENERAL] Am I overseen ?

2007-10-18 Thread Laurent ROCHE
Hi, You might want to have a look at DdlUtils that does similar things that you want to do: compare databases schemas using XML files and synchronising the schemas. Interesting tool ! ! http://db.apache.org/ddlutils/ Have fun, [EMAIL PROTECTED] The Computing Froggy - Message d'origine

[GENERAL] pg_dump SERIAL and SEQUENCE

2007-10-18 Thread Laurent ROCHE
Hi, I have a problem with pg_dump generating a code with no SERIALs id but with SEQUENCEs instead: if I write in a SERIAL I want to see a SERIAL, even when I reload the database. We had this conversation before on this mailing list and I was told that's because SERIAL is just a kind of macro ge

[GENERAL] Resetting SEQUENCEs

2007-10-18 Thread Laurent ROCHE
Hi, I am quite surprised I could not find a way to automatically reset the value of a sequence for all my tables. Of course, I can write: SELECT setval('serial', max(id)) FROM distributorsBut if I reload data into all my tables, it's a real pain to have to write something like this for every s

Re : [GENERAL] pg_dump - schema diff compatibility

2007-10-18 Thread Laurent ROCHE
Hi, May be a solution will be to make a diff fo the XML file produced by another tool: DdlUtils (http://db.apache.org/ddlutils/) ! However, DdlUtils won't produce a file with all PG elements (no user types, views, triggers, ...). Have fun, [EMAIL PROTECTED] The Computing Froggy - Message

Re : [GENERAL] pg_dump - schema diff compatibility

2007-10-15 Thread Laurent ROCHE
Hi, I have complained before on this list that the latest pg_dump version will not have SERIAL declaration in the generated script but the equivalent SEQUENCE code (because I wanted to read the script and compare-diff it). I was replied that the aim of pg_dump is to produce a script to be able

Re : [GENERAL] Very asynchrnous replication system

2007-10-15 Thread Laurent ROCHE
Hi, Bucardo is an interesting project (they've just released a new version) but id does not look like they are able to perform delayed (or very asynchronous) replication: from the information I could gathered Bucardo replicates between databases always connected to each other. When I want to re

Re : [GENERAL] Very asynchrnous replication system

2007-10-08 Thread Laurent ROCHE
Computing Froggy - Message d'origine De : Ben <[EMAIL PROTECTED]> À : Laurent ROCHE <[EMAIL PROTECTED]> Cc : pgsql-general@postgresql.org Envoyé le : Samedi, 6 Octobre 2007, 2h49mn 59s Objet : Re: [GENERAL] Very asynchrnous replication system The MusicBrainz project re

[GENERAL] Very asynchrnous replication system

2007-10-05 Thread Laurent ROCHE
Hello, I must replicate (or synchronise) data between disconnected postgreSQL databases ... hence a replication "very asynchronous"! Application description This an application to manage sales forces with a central application (and postgreSQL server) where everybody in the office can connect (t

[GENERAL] Generating TRUNCATE orders

2007-10-03 Thread Laurent ROCHE
Hi, I wanted to write a SELECT that generates a TRUNCATE TABLE for all the tables in a given schema. So I wrote: SELECT 'TRUNCATE TABLE ' UNION SELECT 'my_schema.' || c.relname ||', ' FROM pg_namespace nc, pg_class c WHERE c.relnamespace = nc.oid AND c.relkind IN ('r' ) AND nc.nspname = '

Re : [GENERAL] reporting tools

2007-08-23 Thread Laurent ROCHE
Hi, For my projet (J2EE application), I have been using Jasper and iReport. That works quite well although so far we have not done stuff really complicated. I am hoping that the "Power" end users will be able to write the reports themselves. "Power" users because although iReports is wysiwyg too

Re : [GENERAL] Postgres 8.2 binary for ubuntu 6.10?

2007-07-10 Thread Laurent ROCHE
Hi, I am not moving from 6.10 to anything else for now. Ubuntu 6.10 LTS is Long Term Support. So for a server that's what I want: everyhting working better and better (via updates) and no major changes ! Getting always the latest version is definitely asking for troubles. I don't need the latest

Re : [GENERAL] Design Tool

2007-07-09 Thread Laurent ROCHE
Hi, Gabriele I had the same problem when I switched from MySQL to PostgreSQL (although I was not so pleased with DB-Designer no support, not open source, bugs with average size models, ...). I had a look around and I could not find anything satisfying (with the same criteria as you). Eventual

Re : [GENERAL] Dumping part (not all) of the data in a database...methods?

2007-04-12 Thread Laurent ROCHE
Hi, AFAIK, you can not do that with pg_dump ... but as you are working on only one table you can write the COPY command your self, and since version 8.2, you can write a SELECT query instead of a table name, like COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO '/usr1/proj/bray/sql/

Re : [GENERAL] Importing *huge* mysql database into pgsql

2007-03-06 Thread Laurent ROCHE
In addtion to mysql2pgsql (which we used and worked fine for us), you might want to have a look DDL-Utils http://db.apache.org/ddlutils/ It can convert a schema and data from one RDBMs to another. It is supposed to work from MySQL to PG, although I haven't used it this way (I use it from PG to

Re : Re : [GENERAL] COPY form stdin and file

2007-03-05 Thread Laurent ROCHE
COPY FROM stdin works only from a console ... and PGAdmin is not a console but a window environment, so that does not work ! I had the PG Admin explaining the very same things, before. Cheers, [EMAIL PROTECTED] The Computing Froggy - Message d'origine De : Tom Lane <[EMAIL PROTECTED]>

Re : [GENERAL] US Highschool database in postgres

2007-03-05 Thread Laurent ROCHE
You can get some lists from here: http://www.iso.org/iso/en/prods-services/iso3166ma/index.html and there http://www.unece.org/cefact/locode/service/main.htm No high schools though, but countries, currencies, cities, states, ... Not sure whether this will help you ... but you can have a look. If

[GENERAL] PG Dump 8.2

2007-03-02 Thread Laurent ROCHE
Hi, Does anyone know if Ubuntu 6.10 (LTS) has packages for PostgreSQL 8.2, from a recommandable place ? I can not recommend my clients to use 8.2 if there's nobody supporting the packages (so just compiling from the source code is not an option). Have fun, [EMAIL PROTECTED] The Computing Fro

Re : Re : [GENERAL] pg_dump, serial

2007-03-02 Thread Laurent ROCHE
PROTECTED]> À : Laurent ROCHE <[EMAIL PROTECTED]> Cc : pgsql-general@postgresql.org Envoyé le : Vendredi, 2 Mars 2007, 19h18mn 17s Objet : Re: Re : [GENERAL] pg_dump, serial Laurent ROCHE <[EMAIL PROTECTED]> writes: > I have read the given links, and I understand the reasons. > Sti

Re : [GENERAL] pg_dump, serial

2007-03-02 Thread Laurent ROCHE
uting Froggy - Message d'origine De : Tom Lane <[EMAIL PROTECTED]> À : Laurent ROCHE <[EMAIL PROTECTED]> Cc : pgsql-general@postgresql.org Envoyé le : Vendredi, 2 Mars 2007, 17h03mn 18s Objet : Re: [GENERAL] pg_dump, serial Laurent ROCHE <[EMAIL PROTECTED]> writes: >

[GENERAL] pg_dump, serial

2007-03-02 Thread Laurent ROCHE
Hi, I understand (and I have read) that there have been changes and discussions about the way, pg_dump treats SERIAL columns in the latest versions(8.x). However, I have not been able to get a document explaining exactly what the changes are and what's the reasoning behind it, not even in the do