[GENERAL] why so many error when I load the data to database from a script which generated by pg_dump.

2008-08-02 Thread Yi Zhao
hi, all: I have a database to store the information about the html source of the web page. I wan't to move the data to another database, so I pg_dump the data to a file: /usr/local/pgsql/bin/pg_dump htmldb -Upostgres -p 5433 /tmp/dump.sql now, I load the data into new database:

Re: [GENERAL] How to remove duplicate lines but save one of the lines?

2008-08-02 Thread Julio Cesar Sánchez González
A B wrote: I have a table with rows like this A 1 A 1 B 3 B 3 C 44 C 44 and so on. and I want it to be A 1 B 3 C 44 so how can I remove the all the duplicate lines but one? Try with: your table structure for example: create table yourtable(campo1 char, num integer); select * from

[GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
Hi all. I need to keep a numer of counters in my application; my counters are currently stored in a table: name | next_value | year The counters must be progressive numbers with no holes in between them, and they must restart from 1 every year. What I've done so far is to access them while in

Re: [GENERAL] Is there any reason why edit PostgreSQL.conf should be on my menu

2008-08-02 Thread Craig Ringer
John Meyer wrote: Especially when I haven't edited anything yet? You might want to tell the readers here just a *little* bit more about your problem. Start with what menu?!?. More seriously: - What is your operating system - What is the version of your operating system - What version of

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Craig Ringer
Marco Bizzarri wrote: Hi all. I need to keep a numer of counters in my application; my counters are currently stored in a table: name | next_value | year The counters must be progressive numbers with no holes in between them, and they must restart from 1 every year. What I've done so

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
Thanks for the advice, Craig. I'm on a number of different PostgreSQL versions, ranging from 7.4 to 8.3, so I've to retain, where possible, compatibility with older versions. Is this better on a transaction/serialization point of view? Regards Marco On Sat, Aug 2, 2008 at 10:19 AM, Craig

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Craig Ringer
Marco Bizzarri wrote: Thanks for the advice, Craig. I'm on a number of different PostgreSQL versions, ranging from 7.4 to 8.3, so I've to retain, where possible, compatibility with older versions. Is this better on a transaction/serialization point of view? As far as I know it's not

Re: [GENERAL] Is there any reason why edit PostgreSQL.conf should be on my menu

2008-08-02 Thread Karsten Hilbert
Especially when I haven't edited anything yet? Because you might want to. -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED] -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] why so many error when I load the data to database from a script which generated by pg_dump.

2008-08-02 Thread Raymond O'Donnell
On 02/08/2008 07:22, Yi Zhao wrote: CONTEXT: COPY htmlcontent, line 312807: 1207327 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN\nhtml\nhead\nmeta http-e... Would there perchance be tabs embedded in the HTML that might confuse COPY? Ray.

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Marco Bizzarri
On Sat, Aug 2, 2008 at 11:04 AM, Craig Ringer [EMAIL PROTECTED] wrote: Marco Bizzarri wrote: Thanks for the advice, Craig. I'm on a number of different PostgreSQL versions, ranging from 7.4 to 8.3, so I've to retain, where possible, compatibility with older versions. Is this better on a

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread David Fetter
On Sat, Aug 02, 2008 at 09:23:31AM +0200, Marco Bizzarri wrote: Hi all. I need to keep a numer of counters in my application; my counters are currently stored in a table: name | next_value | year The counters must be progressive numbers with no holes in between them, and they must

Re: [GENERAL] Is there any reason why edit PostgreSQL.conf should be on my menu

2008-08-02 Thread johnf
On Saturday 02 August 2008 01:12:35 am Craig Ringer wrote: John Meyer wrote: Especially when I haven't edited anything yet? You might want to tell the readers here just a *little* bit more about your problem. Start with what menu?!?. More seriously: - What is your operating system -

Re: [GENERAL] non-WAL btree?

2008-08-02 Thread Jaime Casanova
On Fri, Aug 1, 2008 at 4:49 PM, Alex Vinogradovs [EMAIL PROTECTED] wrote: It's all about number of repetions. If say I load my table with 50k every minute, and run reindex every minute, how long do you think it would take by end of the day, when my table (it's daily partition actually) is at

Re: [GENERAL] Initdb problem on debian mips cobalt: Bus error

2008-08-02 Thread Glyn Astill
Hi chaps, I'm still trying to get postgres working on my qube2 with debian. I've downgraded it to sarge, and it's a little better, however now when compiling I get functions.o: file not recognized: File truncated http://privatepaste.com/3f1j0tI0ow Any ideas? --- On Tue, 22/7/08, Glyn Astill

[GENERAL] issues with java driver setDate() on function call

2008-08-02 Thread Ismael ....
I have a function declared as follows CREATE OR REPLACE FUNCTION insertaegreso(usuario1 integer, importepago1 numeric, fechapago1 DATE, concepto1 character varying, tipopagonomina1 character varying, comentarios1 character varying) RETURNS integer ASimplementation notice the field

Re: [GENERAL] issues with java driver setDate() on function call

2008-08-02 Thread Ismael ....
sorry, just discovered the answer, only need to cast the value like this String sql = SELECT * FROM insertaEgreso(?, ?, ?::DATE, ?, ?, ?); pst.setDate(3, date); :) I have a function declared as follows CREATE OR REPLACE FUNCTION insertaegreso(usuario1 integer, importepago1

Re: [GENERAL] Advice on implementing counters in postgreSQL

2008-08-02 Thread Berend Tober
Marco Bizzarri wrote: Hi all. I need to keep a numer of counters in my application; my counters are currently stored in a table: name | next_value | year The counters must be progressive numbers with no holes in between them, and they must restart from 1 every year. What I've done so

Re: [GENERAL] Is there any reason why edit PostgreSQL.conf should be on my menu

2008-08-02 Thread Rodrigo E. De León Plicet
On Sat, Aug 2, 2008 at 9:14 AM, johnf [EMAIL PROTECTED] wrote: I wonder if he talking about pgadmin3? It's on the menu. Only J.M. knows for sure... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Fresh install on Mac OS 10.5.4

2008-08-02 Thread Manoj Patwardhan
I downloaded version 8.3.3 and after a successful build from source and an install, I tried to create a database cluster. I got the following error: bash-3.2$ initdb -D /usr/local/pgsql/data dyld: Library not loaded: /usr/local/pgsql/lib/libpq.4.dylib Referenced from:

Re: [GENERAL] Fresh install on Mac OS 10.5.4

2008-08-02 Thread John DeSoi
On Aug 2, 2008, at 7:13 PM, Manoj Patwardhan wrote: bash-3.2$ initdb -D /usr/local/pgsql/data dyld: Library not loaded: /usr/local/pgsql/lib/libpq.4.dylib Referenced from: /usr/local/bin/initdb Reason: image not found Trace/BPT trap Any ideas? This is on Mac OS 10.5.4. What I see in

Re: [GENERAL] Fresh install on Mac OS 10.5.4

2008-08-02 Thread Tom Lane
John DeSoi [EMAIL PROTECTED] writes: On Aug 2, 2008, at 7:13 PM, Manoj Patwardhan wrote: bash-3.2$ initdb -D /usr/local/pgsql/data dyld: Library not loaded: /usr/local/pgsql/lib/libpq.4.dylib Referenced from: /usr/local/bin/initdb Could be a path problem. Try Yeah ... the reference to libpq

Re: [GENERAL] issues with java driver setDate() on function call

2008-08-02 Thread Tom Lane
Ismael [EMAIL PROTECTED] writes: I have a function declared as follows CREATE OR REPLACE FUNCTION insertaegreso(usuario1 integer, importepago1 numeric, fechapago1 DATE, concepto1 character varying, tipopagonomina1 character varying, comentarios1 character varying) RETURNS integer

Re: [GENERAL] Fresh install on Mac OS 10.5.4

2008-08-02 Thread Manoj Patwardhan
Thanks guys! Yes, 8.3.3 binaries got installed in /usr/local/pgsql/bin and so the 7.3 version that I had previously didn't get overwritten. Binaries for 7.3 were in /usr/local/bin Works now. Regards, Manoj Patwardhan On Aug 3, 2008, at 12:17 AM, Tom Lane wrote: John DeSoi [EMAIL