[GENERAL] pg_dump fails with socket_not_open

2005-03-19 Thread Sarah Ewen
Hi there folks, I've just had pg_dump fail on me for the first time ever, and I'm not sure why. It generates 24MB of dump before bombing out with: pg_dump: socket not open pg_dump: SQL command to dump the contents of table activity_log failed: PQendcopy() failed. pg_dump: Error message from

[GENERAL] pseudo-serial values in dual primary key?

2005-03-19 Thread Benjamin Smith
Is it possible to have the equivalent of a serial data type in a table, sub-categorized? Assume the following: create table categories (id serial, title varchar); Now, I want to create an entries table, and by default, count serially by category, so that category 1 has entries.sequence of

Re: [GENERAL] pg_dump fails with socket_not_open

2005-03-19 Thread Tom Lane
Sarah Ewen [EMAIL PROTECTED] writes: I've just had pg_dump fail on me for the first time ever, and I'm not sure why. It generates 24MB of dump before bombing out with: pg_dump: socket not open pg_dump: SQL command to dump the contents of table activity_log failed: PQendcopy() failed.

Re: [GENERAL] pseudo-serial values in dual primary key?

2005-03-19 Thread Greg Stark
Benjamin Smith [EMAIL PROTECTED] writes: Is it possible to have the equivalent of a serial data type in a table, sub-categorized? Assume the following: create table categories (id serial, title varchar); Now, I want to create an entries table, and by default, count serially by

Re: [GENERAL] pseudo-serial values in dual primary key?

2005-03-19 Thread Bruno Wolff III
On Sat, Mar 19, 2005 at 01:43:07 -0800, Benjamin Smith [EMAIL PROTECTED] wrote: Is it possible to have the equivalent of a serial data type in a table, sub-categorized? [snip] Now, I want to create an entries table, and by default, count serially by category, so that category 1 has

[GENERAL] Question insert data

2005-03-19 Thread perico
Hi There, I've a problem with inserting data and I can't figure out what the problem is: what did I do: 1. I've a master table containing about 4 records. A count(*) provides me the exact number. 2. I've create a table based on from the master. I copied a fraction from the master into

Re: [GENERAL] Question insert data

2005-03-19 Thread Ragnar HafstaĆ°
On Sat, 2005-03-19 at 18:36 +0100, [EMAIL PROTECTED] wrote: 2. I've create a table based on from the master. I copied a fraction from the master into the new table using a where clause (insert into ... select * from ... where a = b . The number of records copied is about 2553. Issueing the

[GENERAL] How to get concecutive id values

2005-03-19 Thread Andrus Moor
I need to allocate some number of sequential values for primary keys. Postgres nextval() function does not allow to allocate more than one number. So it is not possible to get a range of sequential numbers from sequence using nextval() To solve this, I created table containing id current

Betr: Re: [GENERAL] Question insert data

2005-03-19 Thread perico
insert into master_nl select * from master where substr(loc,1,2) = 'NL' -- Oorspronkelijk bericht -- Subject: Re: [GENERAL] Question insert data From: Ragnar HafstaĆ° [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: pgsql-general@postgresql.org Date: Sat, 19 Mar 2005 17:56:52 + On Sat,

Betr: Re: [GENERAL] Question insert data

2005-03-19 Thread perico
Some more info select count(*) from master_bart where substr(locode_c5,1,2) = 'NL' gives me the result: 5106 delete from masterplts_nl; insert into masterplts_nl select * from master_bart where substr(locode_c5,1,2) = 'NL'; Query returned successfully: 2553 rows affected, 5127 ms execution

Re: [GENERAL] Using sequence name depending on other column

2005-03-19 Thread Andrus Moor
I have table containing different types of documents (type A, B and C). Each document type must have separate sequential ID starting at 1 ID of first inserted record of type A must be set to 1 ID of first inserted record of type B must be also set to 1 ID of second record of type A must be

[GENERAL] TIME TO VOTE - comp.databases.pgsql ballot

2005-03-19 Thread Vern
[reposted from news.groups] Subject: CFV: comp.databases.postgresql From: [EMAIL PROTECTED] (Bill Aten) Newsgroups: news.announce.newgroups,news.groups,comp.databases,comp.os.linux.misc, comp.unix.bsd.freebsd.misc Followup-To: poster Reply-To: [EMAIL PROTECTED] FIRST CALL

Re: [GENERAL] Query performance problem

2005-03-19 Thread Paul Tillotson
Phil, Just about any query will usually take a few milliseconds (try SELECT 1; to see the absolute lowest), and so 12 ms is probably about as good as you can get. For my own part, I consider 50 ms good enough for any query that is not run inside of a loop. If you want to write suitably

[GENERAL] Encoding-related errors when moving from 7.3 to 8.0.1

2005-03-19 Thread Carlos Moreno
Hello, I'm trying to upgrade a system that is currently running version 7.4.5 to the new 8.0.1 I create a backup, using pg_dump, and I expect it to work when restoring it to 8.0.1. However, when I run: psql -U user -f backup.sql Whenever there is a field value that contains characters with accents

Re: [GENERAL] Query performance problem

2005-03-19 Thread Greg Stark
Paul Tillotson [EMAIL PROTECTED] writes: Total runtime: 12.241 ms Still this is a third of the time of the sub-query route but 4 times longer than mysql - this must be an install issue? Just about any query will usually take a few milliseconds (try SELECT 1; to see the absolute

Re: [GENERAL] Question insert data

2005-03-19 Thread Stephan Szabo
On Sat, 19 Mar 2005 [EMAIL PROTECTED] wrote: Hi There, I've a problem with inserting data and I can't figure out what the problem is: what did I do: 1. I've a master table containing about 4 records. A count(*) provides me the exact number. 2. I've create a table based on from

Re: [GENERAL] TIME TO VOTE - comp.databases.pgsql ballot

2005-03-19 Thread Stephan Szabo
On Sat, 19 Mar 2005, Vern wrote: The 1st CFV will also appear on the following mailing list: pgsql.general Submission address: pgsql-general@postgresql.org NOTE- It never appeared in pgsql.general as it should have. My first guess would be that the official one is

Re: [GENERAL] plpython function problem workaround

2005-03-19 Thread Marco Colombo
On Fri, 18 Mar 2005, Tom Lane wrote: Marco Colombo [EMAIL PROTECTED] writes: Right now I'm parsing the string first, changing the resulting parse tree adding missing nodes (def, INDENT, DEINDENT) and then compiling it. Hmmm ... is this really going to be simpler or more robust than lexing the

Re: [GENERAL] MS Access to PostgreSQL

2005-03-19 Thread Edward Macnaghten
William Shatner wrote: I have recently migrated from MS Access to PostgreSQL.Previously I had a SQL command ResultSet aGroupResultSet = aGroupPathStmt.executeQuery( SELECT \groupID\,\fullpath\ FROM \groups\ WHERE \fullpath\ Like ' + aPath + '); where aPath was equal to

Re: [GENERAL] Encoding-related errors when moving from 7.3 to 8.0.1

2005-03-19 Thread Alvaro Herrera
On Sat, Mar 19, 2005 at 05:25:46PM -0500, Carlos Moreno wrote: Carlos, The error reads like: psql:db_backup.sql:1548: ERROR: invalid byte sequence for encoding UNICODE: 0xe12020 CONTEXT: COPY country, line 5, column namespanish: Canad? Hmm. The sequence looks

Re: [GENERAL] Using sequence name depending on other column

2005-03-19 Thread Bruno Wolff III
On Sat, Mar 19, 2005 at 22:37:55 +0200, Andrus Moor [EMAIL PROTECTED] wrote: I have table containing different types of documents (type A, B and C). Each document type must have separate sequential ID starting at 1 ID of first inserted record of type A must be set to 1 ID of first

[GENERAL] question about 8.1 and stored procedures

2005-03-19 Thread Tony Caduto
Hi, I read in a article/interview on http://madpenguin.org/cms/html/62/3677.html that work was being done on improving/adding support for sql standard compliant stored procs/functions Does anyone know exactly what that means? Does it mean that Postgres will have stored procs that can have input

Re: [GENERAL] Installing PostgreSQL in Debian

2005-03-19 Thread Michael Ben-Nes
I recomend you to compile PG from source so you can use the new 8.0.1 Cheers S Ram wrote: Hello, PostgreSQL is distributed as .RPM files. How do I install this in Debian? Thanks __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site!