Re: [GENERAL] SQL query question

2006-06-18 Thread Bruno Wolff III
On Sat, Jun 17, 2006 at 16:50:59 -0700, Kevin Jenkins <[EMAIL PROTECTED]> wrote: > For example > > filename date revision > file110/05/06 1 > file110/05/07 2 > file210/05/08 1 > > I want to do a query that will return the greatest date for each > unique filename If the revisi

Re: [GENERAL] MySQL insert() and instr() equiv

2006-06-18 Thread Marco Bizzarri
Not sure this is the right answer: in older version you could enable it via the postgresql.conf file, modifing the variable log_statement and setting that to true. Also, you should check the syslog level variable in the same file. Regards Marco On 6/17/06, Mark Constable <[EMAIL PROTECTED]> wrot

[GENERAL] Tips for storing files in the database

2006-06-18 Thread Kevin Jenkins
Is there a way to send and read binary data directly from memory, without escaping characters, for SELECT and INSERT queries? This is for a file repository, such as in source control. I saw in the manual the section on bytea and binary data, but I don't want to go through hundreds of megabytes

Re: [GENERAL] Tips for storing files in the database

2006-06-18 Thread Tom Lane
Kevin Jenkins <[EMAIL PROTECTED]> writes: > Is there a way to send and read binary data directly from memory, > without escaping characters, for SELECT and INSERT queries? See PQexecParams --- an out-of-line bytea parameter, transmitted in binary format, seems to be what you want on the send side

Re: [GENERAL] Question about openSSL

2006-06-18 Thread Joshua D. Drake
Greg Quinn wrote: 1.) I went to the OpenSSL ste, and tried to download opnSSL, but I only saw Linux files. Is OpenSSL supported ni Windows? http://www.openssl.org/related/binaries.html 2.) I am using the Npgsql.NET data provider to connect, but it doesn’t support SSL yet, when will

[GENERAL] Changing array subscripting to zero-offset

2006-06-18 Thread Erin Sheldon
Hello everyone - Array columns are, by default, 1-offset in their subscripting. Since I usually call postgres from a language with zero-offset, I would prefer that postgres conform to that. The online documentation hints that this may be configurable but I haven't been able to find how this is

Re: [GENERAL] Changing array subscripting to zero-offset

2006-06-18 Thread Florian G. Pflug
Erin Sheldon wrote: Hello everyone - Array columns are, by default, 1-offset in their subscripting. Since I usually call postgres from a language with zero-offset, I would prefer that postgres conform to that. The online documentation hints that this may be configurable but I haven't been able

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-18 Thread Qingqing Zhou
"Qingqing Zhou" <[EMAIL PROTECTED]> wrote > > > ExecutorState: 550339936 total in 123 blocks; 195005920 free (740144 chunks); 355334016 used > ... > HashBatchContext: 293593176 total in 44 blocks; 3107384 free (80 chunks); 290485792 used > TIDBitmap: 2088960 total in 8 blocks; 1012120 free (27 ch

Re: [GENERAL] Question about openSSL

2006-06-18 Thread Tony Caduto
Greg Quinn wrote: 1.) I went to the OpenSSL ste, and tried to download opnSSL, but I only saw Linux files. Is OpenSSL supported ni Windows? 2.) I am using the Npgsql.NET data provider to connect, but it doesn’t support SSL yet, when will it support SSL? Thanks Yes, it works o

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-18 Thread Tom Lane
"Qingqing Zhou" <[EMAIL PROTECTED]> writes: >> ExecutorState: 550339936 total in 123 blocks; 195005920 free (740144 >> chunks); 355334016 used >> ... >> HashBatchContext: 293593176 total in 44 blocks; 3107384 free (80 chunks); >> 290485792 used > Er, looks like a huge hash-join but not sure if it

[GENERAL] Adding foreign key constraints without integrity check?

2006-06-18 Thread Wes
Is there a way to add a foreign key constraint without having to wait for it to check the consistency of all existing records? If a database is being reloaded (pg_dumpall then load), it really shouldn't be necessary to check the referential integrity - or at least I should be able to stipulate tha

Re: [GENERAL] How to optimize PostgreSQL database size

2006-06-18 Thread Qingqing Zhou
""Linux Portal"" <[EMAIL PROTECTED]> wrote > The article on the subject can be read here: > > http://linux.inet.hr/optimize_postgresql_database_size.html > After dump/restore the database size is 1685 MB and after vacuum-full/reindex is 1990 MB. Where we saved 305 MB? Regards, Qingqing

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-18 Thread Tom Lane
Wes <[EMAIL PROTECTED]> writes: > My database reload is currently taking about 6 hours to load the data, 42 > hours to reindex, and about another 40 hours or so to check the foreign key > constraints (about 1.2 billion rows). What PG version is this, and what have you got maintenance_work_mem set

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-18 Thread Wes
On 6/18/06 10:48 PM, "Tom Lane" <[EMAIL PROTECTED]> wrote: >> My database reload is currently taking about 6 hours to load the data, 42 >> hours to reindex, and about another 40 hours or so to check the foreign key >> constraints (about 1.2 billion rows). > > What PG version is this, and what hav