Re: [GENERAL] Pgsql errors, DBI and CGI::Carp

2009-05-12 Thread Toomas Vendelin
My mistake was using DBD::PgPP (as suggested in Beginning Databases with PostgreSQL by Neil Matthew and Richard stones, Apress) instead of DBD::Pg. Thanks for help! On May 1, 2009, at 4:07 PM, Daniel Verite wrote: Toomas Vendelin wrote: I'm writing CGI scripts in Perl using

Re: [GENERAL] Btree indizes, FILLFACTOR, vacuum_freeze_min_age and CLUSTER

2009-05-12 Thread Philipp Marek
Hello Alvaro, On Montag, 11. Mai 2009, Alvaro Herrera wrote: Philipp Marek wrote: A few days before we found the machine much slower, because of the autovacuum processes that were started automatically [autovacuum: VACUUM ... (to prevent wraparound)]. After several days we killed that,

[GENERAL] Luhn algorithm (credit card verify / check) implementation - FIX

2009-05-12 Thread Craig Ringer
The Luhn algorithm implemention I posted earlier (upthread) is internally consistent and will verify checksums it created, but it is actually not a correct implementation of the Luhn algorithm. The earlier code added the doubled digits directly to the checksum, rather than adding each digit

Re: [GENERAL] Compiler versions on different platforms

2009-05-12 Thread Peter Eisentraut
On Tuesday 12 May 2009 02:30:56 Vikram Patil wrote: I was able to compile on all of the platforms but I want to know about minimum and recommended version requirements for these systems. I am concerned about performance of these binaries and looking to achieve performance of these binary as

[GENERAL] Unable to access table named user

2009-05-12 Thread Joe Kramer
Hi, I have table named user (lower case) in public schema. I can access it using Pgadmin as SELECT * from user; SELECT * from public.user; SELECT * FROM public.user; I can't find any way to access this table from Jdbc. Tried to access as public.user, user in single and double quotes, nothing

Re: [GENERAL] Unable to access table named user

2009-05-12 Thread Scott Marlowe
On Tue, May 12, 2009 at 1:26 AM, Joe Kramer cckra...@gmail.com wrote: Hi, I have table named user (lower case) in public schema. I can access it using Pgadmin as SELECT * from user; SELECT * from public.user; SELECT * FROM public.user; Try public.user -- Sent via pgsql-general mailing list

[GENERAL] Selecting data from bytea field in 8.3

2009-05-12 Thread Tomasz Rejman
Hi there. Few days ago I have changed my postgreSQL to 8.3 version and I have problem with bytea fields. Let me show you an example: CREATE TABLE testtable ( test bytea ); insert into testTable (test) VALUES (E'\304\205\304\207\305\274\303\263\305\202wjfdsafdsa'); select encode(test,

Re: [GENERAL] Difference between in (...) and = any(...) queries when using arrays

2009-05-12 Thread Richard Huxton
Francisco Figueiredo Jr. wrote: Hi all! I was playing with in (...) and = any (...) queries and found a difference between them and I wonder: why this works: select * from table_of_integers where integer_column = any (array[5,6]); This checks if integer_column matches any value in the

Re: [GENERAL] Unable to access table named user

2009-05-12 Thread Joe Kramer
Don't help either. Jdbc statement: SELECT * from public.user ; Exception: ERROR: relation public.user does not exist On Tue, May 12, 2009 at 5:55 PM, Scott Marlowe scott.marl...@gmail.com wrote: On Tue, May 12, 2009 at 1:26 AM, Joe Kramer cckra...@gmail.com wrote: Hi, I have table named

[GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Markus Wollny
Hello! Recently one of my PostgreSQL servers has started throwing error messages like these: ERROR: could not access status of transaction 3489956864 DETAIL: Could not open file pg_clog/0D00: Datei oder Verzeichnis nicht gefunden. (file not found) The machine in question doesn't show any

Re: [GENERAL] Putting many related fields as an array

2009-05-12 Thread Sam Mason
On Tue, May 12, 2009 at 01:23:14PM +0800, Ow Mun Heng wrote: | sum of count | sum_of_count_squared | qty | qty 100 | qty 500 | I'm thinking of lumping them into 1 column via an array instead of into 5 different columns. Not sure how to go about this, hence the email to the list. The

Re: [GENERAL] Unable to access table named user

2009-05-12 Thread Sam Mason
On Tue, May 12, 2009 at 06:57:07PM +1000, Joe Kramer wrote: Don't help either. Jdbc statement: SELECT * from public.user ; Exception: ERROR: relation public.user does not exist Are you sure the table exists or you're connecting to the correct database then? If you connect with psql and

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Glyn Astill
--- On Tue, 12/5/09, Markus Wollny markus.wol...@computec.de wrote: From: Markus Wollny markus.wol...@computec.de Subject: [GENERAL] Could not open file pg_clog/ To: pgsql-general@postgresql.org Date: Tuesday, 12 May, 2009, 11:04 AM Hello! Recently one of my PostgreSQL servers has

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Markus Wollny
Hi! -Ursprüngliche Nachricht- Von: Glyn Astill [mailto:glynast...@yahoo.co.uk] Gesendet: Dienstag, 12. Mai 2009 12:33 An: pgsql-general@postgresql.org; Markus Wollny The first thing I would have done if I've been forced to do that (if there was no other option?) would be a dump

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Glyn Astill
--- On Tue, 12/5/09, Markus Wollny markus.wol...@computec.de wrote: From: Markus Wollny markus.wol...@computec.de Subject: AW: [GENERAL] Could not open file pg_clog/ To: glynast...@yahoo.co.uk, pgsql-general@postgresql.org Date: Tuesday, 12 May, 2009, 11:52 AM Hi!

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Markus Wollny
Hi! It appears to be failing on the pcaction.article table. Could you get away without that? Perhaps, and it'd be a longshot, you'd be able to dump the rest of the data with it gone? I'm going to duck out of this now though, and I think you should probably wait until someone a little

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Glyn Astill
--- On Tue, 12/5/09, Glyn Astill glynast...@yahoo.co.uk wrote: I'm going to duck out of this now though, and I think you should probably wait until someone a little more knowlegable replies. Also see here: http://archives.postgresql.org/pgsql-general/2006-07/msg01147.php -- Sent

Re: [GENERAL] Selecting data from bytea field in 8.3

2009-05-12 Thread Albe Laurenz
Tomasz Rejman wrote: Few days ago I have changed my postgreSQL to 8.3 version and I have problem with bytea fields. Let me show you an example: CREATE TABLE testtable ( test bytea ); insert into testTable (test) VALUES (E'\304\205\304\207\305\274\303\263\305\202wjfdsafdsa'); select

[GENERAL] regexp_matches problem

2009-05-12 Thread WP Perquin
(postgresql 8.3.7, linux centos) I made the following regexp_matches SELECT regexp_matches( ( SELECT content FROM page WHERE idpage = 2 ) ,','img\\s+((title=[^]+)|(alt=[^]+)|([^]))*' , 'ig' ) AS result The result looks like: {\,NULL,NULL,\} in

[GENERAL] Postgres BackUp and Restore: ERROR: duplicate key violates unique constraint pg_largeobject_loid_pn_index

2009-05-12 Thread CM J
Hi, I backup my database using the following command: pg_dump.exe -f Backup.sql -U username -p port MYDB Now,before restoring, i drop all my tables,indexes,foreign key constraints.Then, i restore using the cmd below: psql.exe -U username -p port-d MYDB -f Backup.sql The

Re: [GENERAL] Putting many related fields as an array

2009-05-12 Thread Ow Mun Heng
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- On Tue, May 12, 2009 at 01:23:14PM +0800, Ow Mun Heng wrote: | sum of count | sum_of_count_squared | qty | qty 100 | qty 500 | I'm thinking of lumping them into 1 column via an array instead of into

[GENERAL] Cannot login for short period of time

2009-05-12 Thread Henry
Greets, Pg: 8.3.7 I'm trying to diagnose why I cannot login to Pg on occasion. The psql command will just hang (so I cannot get in to see what it's doing) and a telnet into 5432 will give the usual: Connected to localhost (127.0.0.1). Escape character is '^]'. indicating the backend

Re: [GENERAL] Luhn algorithm (credit card verify / check) implementation - FIX

2009-05-12 Thread David Fetter
On Tue, May 12, 2009 at 02:54:29PM +0800, Craig Ringer wrote: The Luhn algorithm implemention I posted earlier (upthread) is internally consistent and will verify checksums it created, but it is actually not a correct implementation of the Luhn algorithm. This looks like a great candidate

Re: [GENERAL] Putting many related fields as an array

2009-05-12 Thread Sam Mason
On Tue, May 12, 2009 at 08:06:25PM +0800, Ow Mun Heng wrote: From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- On Tue, May 12, 2009 at 01:23:14PM +0800, Ow Mun Heng wrote: Not sure why this is better than using separate columns though. Maybe a new datatype and a custom aggregate

Re: [GENERAL] Cannot login for short period of time

2009-05-12 Thread Thomas Markus
Hi, check your hardware (especially harddrive) for errors. regards Thomas Henry schrieb: Greets, Pg: 8.3.7 I'm trying to diagnose why I cannot login to Pg on occasion. The psql command will just hang (so I cannot get in to see what it's doing) and a telnet into 5432 will give the

Re: [GENERAL] Putting many related fields as an array

2009-05-12 Thread Andrew Gould
On Tue, May 12, 2009 at 7:06 AM, Ow Mun Heng ow.mun.h...@wdc.com wrote: -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- On Tue, May 12, 2009 at 01:23:14PM +0800, Ow Mun Heng wrote: | sum of count | sum_of_count_squared | qty | qty 100 | qty 500 |

Re: [GENERAL] Unable to access table named user

2009-05-12 Thread Adrian Klaver
On Tuesday 12 May 2009 3:16:34 am Sam Mason wrote: On Tue, May 12, 2009 at 06:57:07PM +1000, Joe Kramer wrote: Don't help either. Jdbc statement: SELECT * from public.user ; Exception: ERROR: relation public.user does not exist Are you sure the table exists or you're connecting to

Re: [GENERAL] Difference between in (...) and = any(...) queries when using arrays

2009-05-12 Thread Francisco Figueiredo Jr.
On Tue, May 12, 2009 at 05:02, Richard Huxton d...@archonet.com wrote: Francisco Figueiredo Jr. wrote: Hi all! I was playing with in (...)  and = any (...) queries and found a difference between them and I wonder: why this works: select * from table_of_integers where integer_column = any

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Alvaro Herrera
Markus Wollny wrote: magazine=# vacuum analyze pcaction.article; PANIC: corrupted item pointer: 5 server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost.

Re: [GENERAL] regexp_matches problem

2009-05-12 Thread WP Perquin
When I make the following simplified example: SELECT regexp_matches('img src= title=dit is een title tekst class=class12' ,'((title\s*=\s*\([^]*))+)|((src\s*=\s*\([^]*))+)','ig') My result are 2 rows: {NULL,NULL,NULL,src=\\,src=\\,} {title=\dit is een title

Re: [GENERAL] Could not open file pg_clog/....

2009-05-12 Thread Alvaro Herrera
Alvaro Herrera wrote: Markus Wollny wrote: magazine=# vacuum analyze pcaction.article; PANIC: corrupted item pointer: 5 server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The

[GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Vasiliy Vasin
I have database on production server that backups every day. Database is not big ~ 10mb. But I added several tables that takes big capacity and I don't want to backup data from them. So, I backup my database in two files: schema and data: pg_dump -s -E utf-8 -f ${filename.schema} -F custom -n

Re: [GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Adrian Klaver
- Vasiliy Vasin vasi3...@yandex.ru wrote: I have database on production server that backups every day. Database is not big ~ 10mb. But I added several tables that takes big capacity and I don't want to backup data from them. So, I backup my database in two files: schema and data:

Re: [GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Alan Hodgson
On Tuesday 12 May 2009, Vasiliy Vasin vasi3...@yandex.ru wrote: I have database on production server that backups every day. Database is not big ~ 10mb. But I added several tables that takes big capacity and I don't want to backup data from them. So, I backup my database in two files: schema

Re: [GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Vasiliy Vasin
In the end, decided to make easier: make a complete dump except tables that I don't want to backup, then just dump schema of these tables. So I have 2 files: schema+data for all except table1 and table2, schema only for table1 and table2. It's a strangely that pg_restore is still no option to

Re: [GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Dragan Zubac
Vasiliy Vasin wrote: I have database on production server that backups every day. Database is not big ~ 10mb. But I added several tables that takes big capacity and I don't want to backup data from them. So, I backup my database in two files: schema and data: pg_dump -s -E utf-8 -f

Re: [GENERAL] pg_dump/pg_restore schema and data separately and foreign key constraints

2009-05-12 Thread Adrian Klaver
On Tuesday 12 May 2009 2:35:10 pm Vasiliy Vasin wrote: In the end, decided to make easier: make a complete dump except tables that I don't want to backup, then just dump schema of these tables. So I have 2 files: schema+data for all except table1 and table2, schema only for table1 and table2.

[GENERAL] Best way to monitor, control, or rewrite data definition commands?

2009-05-12 Thread Turner, Ian
Hello list, I am trying to implement automatic audit log tracking for newly created tables. When a user creates a table, I would like to create a second table for the audit log, along with the relevant rules. So for example, if a user does CREATE TABLE foo (fooid integer); Then I would also

Re: [GENERAL] Best way to monitor, control, or rewrite data definition commands?

2009-05-12 Thread Greg Smith
On Tue, 12 May 2009, Turner, Ian wrote: Is there any way to be notified when a user executes data definition commands such as CREATE TABLE? It doesn't appear possible to apply triggers or rules to the system tables, and the query rewrite engine only seems to apply to SELECT, INSERT, and UPDATE.

Re: [GENERAL] Best way to monitor, control, or rewrite data definition commands?

2009-05-12 Thread John DeSoi
On May 12, 2009, at 7:59 PM, Turner, Ian wrote: CREATE TABLE foo (fooid integer); Then I would also like to do CREATE TABLE foo_audit (fooid integer, other columns); along with the creation of some other triggers, rules, etc. Is there any way to be notified when a user executes data