[GENERAL] pg_dump and 2gb limit on windows and version 8.1.3

2009-05-18 Thread jub4
Hello, I have problem with 2gb limit for pg_dump on windows that was fixed in version 8.2.4. I have a server with postgresql version 8.1.3, which unfortunately cannot be upgraded. Is there some way how to use safely pg_dump (and if needed pg_restore) version 8.2.4 or newer with the server (8.

Re: [GENERAL] Need help

2009-05-18 Thread Albe Laurenz
Zico wrote: > our server suddenly went down and after searching, i found > out that, the OS crashed. So, i had to re-install my OS > again. But, the problem is, I couldnot take the dump file for > my postgresql database. Now, i have the raw data, that means, > my datas are in a disk. Is it possible

Re: [GENERAL] Excel and pg

2009-05-18 Thread Ivan Sergio Borgonovo
On Mon, 18 May 2009 09:14:41 +0800 Craig Ringer wrote: > Ivan Sergio Borgonovo wrote: > > > I'd like to know if: > > - it is possible to "load" in an Excel sheet a table (view, query > > result) coming from postgresql and to use those data to do > > further computation/presentation work on Exc

Re: [GENERAL] Need help

2009-05-18 Thread Zico
On Mon, May 18, 2009 at 1:24 PM, Albe Laurenz wrote: > > Copy all the files that belong to the PostgreSQL server (everything > under the data directory) to a working machine with PostgreSQL > installed, and you should be able to start the server there. > the problem is, i don`t have files of prev

Re: [GENERAL] Need help

2009-05-18 Thread Albe Laurenz
Zico wrote: [wants to restore a database without a backup] >> Copy all the files that belong to the PostgreSQL server (everything >> under the data directory) to a working machine with PostgreSQL >> installed, and you should be able to start the server there. > > the problem is, i don`t have files

Re: [GENERAL] Need help

2009-05-18 Thread Zico
On Mon, May 18, 2009 at 4:00 PM, Albe Laurenz wrote: > > Could you explain that in more detail? > What is a pds or docs? > PDF ==> Portable Document Format files Docs ==> Documents Means, i have the backup of my files only which was in that database. -- Best, Zico

[GENERAL] preforked processes

2009-05-18 Thread Developer
Hello, I can not find configuration option to set init_children_process. Where I can do it? -- -- -- Publicidad y Servicios http://www.pas-world.com Directorio http://www.precioventa.com Tienda http://informatica.precioventa.com/es/ Autoridad certificadora http://ca.precioventa.co

Re: [GENERAL] preforked processes

2009-05-18 Thread hubert depesz lubaczewski
On Mon, May 18, 2009 at 02:04:46PM +0200, Developer wrote: > Hello, > I can not find configuration option to set init_children_process. > Where I can do it? postgresql doesn't have this option. Best regards, depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/

Re: [GENERAL] Need help

2009-05-18 Thread Albe Laurenz
Zico wrote: [wants to restore a database without a backup] >> Could you explain that in more detail? >> What is a pds or docs? > > PDF ==> Portable Document Format files > Docs ==> Documents > > Means, i have the backup of my files only which was in that database. I'm still not sure what that me

[GENERAL] referring to calculated column in sub select

2009-05-18 Thread Scara Maccai
Hi, why column "acoltest" is not found by the subselect in this select: SELECT acol + 100 as acoltest, (select max(t) from mytab where anothercol=acoltest) as col2 FROM mytab2 group by somet ??? Only columns belonging to a table can be used in a subselect??? What about "calculated"

Re: [GENERAL] Is this a bug or a feature? Column visibility in subquery from outer query

2009-05-18 Thread Tom Lane
Paolo Saul writes: > I just want to point out that the sub-query is using a column from the outer > query (eg. x1) without an alias from the table in the outer query. This behavior is required by the SQL standard. It's called an outer reference. regards, tom lane -- S

Re: [GENERAL] pg_dump and 2gb limit on windows and version 8.1.3

2009-05-18 Thread Alvaro Herrera
j...@email.cz wrote: > Hello, > > I have problem with 2gb limit for pg_dump on windows that was fixed in > version 8.2.4. I have a server with postgresql version 8.1.3, which > unfortunately cannot be upgraded. Is there some way how to use safely pg_dump > (and if needed pg_restore) version 8

Re: [GENERAL] pg_dump and 2gb limit on windows and version 8.1.3

2009-05-18 Thread Tom Lane
Alvaro Herrera writes: > I think you should upgrade to 8.1.17 which likely contains the fix as > well. If you are thinking of this fix: 2007-02-19 10:05 mha * src/bin/pg_dump/: pg_backup_archiver.c, pg_backup_archiver.h, pg_backup_custom.c, pg_backup_files.c, pg_backup_tar.c, p

Re: [GENERAL] Excel and pg

2009-05-18 Thread Sam Mason
On Mon, May 18, 2009 at 11:01:15AM +0200, Ivan Sergio Borgonovo wrote: > On Mon, 18 May 2009 09:14:41 +0800 Craig Ringer > wrote: > > Ivan Sergio Borgonovo wrote: > > > I'd like to know if: > > > - it is possible to "load" in an Excel sheet a table (view, query > > > result) coming from postgre

Re: [GENERAL] Need help

2009-05-18 Thread Zico
On Mon, May 18, 2009 at 6:11 PM, Albe Laurenz wrote: > I'm still not sure what that means, but if you have the contents of > the database, but the database itself is gone without a trace, > > then what else can you do but create a new database and fill it anew? > That`s what i am asking about.

Re: [GENERAL] referring to calculated column in sub select

2009-05-18 Thread Sam Mason
On Mon, May 18, 2009 at 06:49:30AM -0700, Scara Maccai wrote: > why column "acoltest" is not found by the subselect in this select: The "acoltest" identifier is only visible from outside the query, not within its defining query or any of its sub-queries. If you're trying to solve a problem like t

Re: [GENERAL] Need help

2009-05-18 Thread Sam Mason
On Mon, May 18, 2009 at 09:21:41PM +0430, Zico wrote: > On Mon, May 18, 2009 at 6:11 PM, Albe Laurenz wrote: > > then what else can you do but create a new database and fill it anew? > > > > That`s what i am asking about. :) Fill it anew? That means, i have to > insert all 2000 data again?? Is th

Re: [GENERAL] Daylight saving time question

2009-05-18 Thread Bayless Kirtley
- Original Message - From: "John R Pierce" To: "Bayless Kirtley" ; "PostgreSQL" Sent: Sunday, May 17, 2009 10:19 PM Subject: Re: [GENERAL] Daylight saving time question Bayless Kirtley wrote: How can I tell PostgreSQL to use daylight saving time when applicable? Times returned by

Re: [GENERAL] Need help

2009-05-18 Thread John R Pierce
Zico wrote: On Mon, May 18, 2009 at 6:11 PM, Albe Laurenz > wrote: I'm still not sure what that means, but if you have the contents of the database, but the database itself is gone without a trace, then what else can you do but create a new datab

Re: [GENERAL] Need help

2009-05-18 Thread Sam Mason
On Mon, May 18, 2009 at 06:15:28PM +0100, Sam Mason wrote: > You need to get the contents of the database from somewhere; the obvious > choices seem to be an existing copy of the PG database directory, a > backup of the database, or the original data. Your previous messages > seem to indicate that

Re: [GENERAL] Daylight saving time question

2009-05-18 Thread Tom Lane
"Bayless Kirtley" writes: > For some reason I can't seem to make it work. I have tried setting the > timezone > in postgresql.conf as "timezone = 'America/Chicago'" and "timezone = > 'CST6CDT'" > both of which still returned one hour behind. I also tried both of your > suggestions > as SQL stat

Re: [GENERAL] Daylight saving time question

2009-05-18 Thread Scott Marlowe
On Mon, May 18, 2009 at 11:16 AM, Bayless Kirtley wrote: > - Original Message - From: "John R Pierce" >> Bayless Kirtley wrote: >>> >>> How can I tell PostgreSQL to use daylight saving time when applicable? >>> Times returned by the database are one hour behind. >> >> it uses your client'

Re: [GENERAL] Daylight saving time question

2009-05-18 Thread Bayless Kirtley
Thanks Tom and Scott. You got me looking in the right direction. In this case the client and server are on the same machine (testing/development) and psql does return the right result. I tried all the possibilities from the java program, "show timezone", "select current_time" and "select curren

Re: [GENERAL] Need help

2009-05-18 Thread Zico
On Mon, May 18, 2009 at 9:48 PM, John R Pierce wrote: > we still don't understand exactly what you have to work from > Do you have a backup of the Postgres "data" directory, No, I don`t have any data of Postgres "data" directory. > which typically is something like "C:\Program Files\Postg

[GENERAL] Providing an alternative result when there is no result

2009-05-18 Thread Joshua Berry
Hello all, Is there an easy and efficient way to return a boolean false for a query that returns no result, and true for one that does return a result? Currently we select the result into a temp table. SELECT INTO temp_table id FROM ... ; IF temp_table IS NULL THEN resp:= 'NO'; ELSE resp:=

Re: [GENERAL] Providing an alternative result when there is no result

2009-05-18 Thread Pavel Stehule
Hello look on GET DIAGNOSTIC statement or FOUND variable CREATE OR REPLACE FUNCTION foo() RETURNS boolean AS $$ BEGIN SELECT INTO temp_table ... RETURN found; END; $$ language plpgsql; regards Pavel Stehule 2009/5/18 Joshua Berry : > Hello all, > > Is there an easy and efficient way to retu

Re: [GENERAL] Providing an alternative result when there is no result

2009-05-18 Thread Martijn van Oosterhout
On Mon, May 18, 2009 at 03:13:56PM -0400, Joshua Berry wrote: > Hello all, > > Is there an easy and efficient way to return a boolean false for a query > that returns no result, and true for one that does return a result? > > Currently we select the result into a temp table. > > SELECT INTO temp_t

Re: [GENERAL] Providing an alternative result when there is no result

2009-05-18 Thread David Wilson
On Mon, May 18, 2009 at 3:13 PM, Joshua Berry wrote: > Any hints/tips? Is our original solution okay, or is there something we can > do to improve things? It seems as if you don't really care about the results of the query- just whether or not it returns any rows. In that case, why not something

Re: [GENERAL] Providing an alternative result when there is no result

2009-05-18 Thread Reece Hart
On Mon, 2009-05-18 at 15:13 -0400, Joshua Berry wrote: > Is there an easy and efficient way to return a boolean false for a > query that returns no result, and true for one that does return a > result? Presuming that you're not using the values in temp_table, I think you should be using PERFORM

Re: [GENERAL] Daylight saving time question

2009-05-18 Thread Tom Lane
"Bayless Kirtley" writes: > Is this a flaw in the JDBC driver or is that the expected behavior? You'd be more likely to get the correct answer on pgsql-jdbc. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Need help

2009-05-18 Thread Karsten Hilbert
On Mon, May 18, 2009 at 11:33:03PM +0430, Zico wrote: > > we still don't understand exactly what you have to work from > > Do you have a backup of the Postgres "data" directory, > > No, I don`t have any data of Postgres "data" directory. Well, in that case I would suggest to IMMEDIATELY STOP

[GENERAL] Data in a table to a csv file

2009-05-18 Thread aravind chandu
Hello, I have a small problem,I need to export data from a table into a csv file.For this i am using pqxx library to work on it.I can able to retrieve the data from the database but the only problem is I am unable to store it in a csv file.Can you guys please help me how to do that.

Re: [GENERAL] Data in a table to a csv file

2009-05-18 Thread Joshua Berry
I have a small problem,I need to export data from a table into a csv file.For this i am using pqxx library to work on it.I can able to retrieve the data from the database but the only problem is I am unable to store it in a csv file.Can you guys please help me how to do that. I

[GENERAL] Commit visibility guarantees

2009-05-18 Thread Marsh Ray
Hello Everyone, I'm looking at an easy real-time application using PostgreSQL. Looking at the pg docs, I see lots of discussion about cases where MVCC may reflect different versions of the data to different connections. For example: http://www.postgresql.org/docs/8.1/static/mvcc.html "while quer

[GENERAL] array/function question

2009-05-18 Thread Joshua Berry
Hello All, I'm trying to optimize a few slow queries and helper functions, and have found a poor performing function. To improve performance, I'd like to create a function that does the following: Inputs: A: an array of integers. for example: { 1, 2, 3, 4, 7 } B: an array of integers. for

Re: [GENERAL] Data in a table to a csv file

2009-05-18 Thread Steve Crawford
Joshua Berry wrote: I have a small problem,I need to export data from a table into a csv file.For this i am using pqxx library to work on it.I can able to retrieve the data from the database but the only problem is I am unable to store it in a csv file.Can you guys please help me how

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Sam Mason
On Mon, May 18, 2009 at 04:38:36PM -0500, Marsh Ray wrote: > The central question: So if I successfully commit an update > transaction on one connection, then instantaneously issue a select on > another previously-opened connection, under what circumstances am I > guaranteed that the select will se

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Marsh Ray
On Mon, May 18, 2009 at 4:53 PM, Ben Chobot wrote: > On Mon, 18 May 2009, Marsh Ray wrote: >> Hello Everyone, >> I'm looking at an easy real-time application using PostgreSQL. > As I understand real-time applications, PostgreSQL is inherintly unsuited > for the task. There is absolutely no timing

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Sam Mason
On Mon, May 18, 2009 at 05:18:06PM -0500, Marsh Ray wrote: > On Mon, May 18, 2009 at 4:53 PM, Ben Chobot wrote: > > On Mon, 18 May 2009, Marsh Ray wrote: > >> Hello Everyone, > >> I'm looking at an easy real-time application using PostgreSQL. > > As I understand real-time applications, PostgreSQL

[GENERAL] Where is tsearch2.sql

2009-05-18 Thread Howard Cole
Hi, Just installed 8.3.7 on a W2K3 machine using the pginstaller. I cannot find contrib/tsearch2.sql - I need to import an 8.2 backup with the old tsearch2 but cannot find the new compatibility layer sql file. Where is it??? Thanks, Howard Cole www.selestial.com -- Sent via pgsql-general m

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Marsh Ray
On Mon, May 18, 2009 at 5:24 PM, Sam Mason wrote: > Even then it's not useful to class it as real-time; nothing "bad" > happens if you don't get a response before timeout the user just gets an > error message.  Real-time applies when if you don't get a response the > plane crashes or a heart stops

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Marsh Ray
On Mon, May 18, 2009 at 5:14 PM, Sam Mason wrote: > On Mon, May 18, 2009 at 04:38:36PM -0500, Marsh Ray wrote: >> The central question: So if I successfully commit an update >> transaction on one connection, then instantaneously issue a select on >> another previously-opened connection, under what

[GENERAL] need to do force uninstall of postgres on windows vista 64

2009-05-18 Thread Steve Howell
Hi, I'm having some pain getting Postgres 8.3 installed on windows vista 64. The first time I tried to install it, I was using the .msi version, which eventually hit permissions problems, and when I aborted the install, the uninstall did not seem to take. Then I tried the .exe version of 8.3,

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Tom Lane
Marsh Ray writes: > The central question: So if I successfully commit an update > transaction on one connection, then instantaneously issue a select on > another previously-opened connection, under what circumstances am I > guaranteed that the select will see the effects of the update? If the sel

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Marsh Ray
On Mon, May 18, 2009 at 6:20 PM, Tom Lane wrote: > Marsh Ray writes: >> The central question: So if I successfully commit an update >> transaction on one connection, then instantaneously issue a select on >> another previously-opened connection, under what circumstances am I >> guaranteed that th

Re: [GENERAL] array/function question

2009-05-18 Thread Alvaro Herrera
Joshua Berry escribió: > Inputs: > A: an array of integers. for example: { 1, 2, 3, 4, 7 } > B: an array of integers. for example: { 1, 4, 8, 9 } > > Returns > C: an array of bools the same dimensions as Array A. In this example: { > true, false, false, false, true, false } > > Effectively, this

Re: [GENERAL] Commit visibility guarantees

2009-05-18 Thread Alvaro Herrera
Marsh Ray escribió: > On Mon, May 18, 2009 at 6:20 PM, Tom Lane wrote: > > Marsh Ray writes: > >> The central question: So if I successfully commit an update > >> transaction on one connection, then instantaneously issue a select on > >> another previously-opened connection, under what circumstan

Re: [GENERAL] array/function question

2009-05-18 Thread Nagy Zoltan
hi, you should use something similar to 'merge sort' but only if your input is sorted (m_bx expects this) if your subjects (numbers) are not going beyond a certain limit eg(65535) take up an array and filter you can generate a poly for array B's roots, and calculate A's points -where it's 0,

Re: [GENERAL] Is this a bug or a feature? Column visibility in subquery from outer query

2009-05-18 Thread Paolo Saul
Thank you for clearing that up. Regards, Paolo Saul > This behavior is required by the SQL standard. It's called an outer > reference. > >regards, tom lane >

Re: [GENERAL] array/function question

2009-05-18 Thread Pavel Stehule
2009/5/18 Joshua Berry : > Hello All, > > I'm trying to optimize a few slow queries and helper functions, and have > found a poor performing function. To improve performance, I'd like to create > a function that does the following: > > > Inputs: > A: an array of integers. for example: { 1, 2, 3, 4,