Re: [GENERAL] pg_dump large-file support 16GB

2005-03-21 Thread Rafael Martinez Guerrero
On Fri, 2005-03-18 at 15:58, Tom Lane wrote: Rafael Martinez [EMAIL PROTECTED] writes: On Thu, 2005-03-17 at 10:17 -0500, Tom Lane wrote: Is that a plain text, tar, or custom dump (-Ft or -Fc)? Is the behavior different if you just write to stdout instead of using --file? - In this

Re: [GENERAL] no IF - am I missing something ?

2005-03-21 Thread Harald Fuchs
In article [EMAIL PROTECTED], Michael Fuhr [EMAIL PROTECTED] writes: On Mon, Mar 21, 2005 at 12:35:22AM -0600, Thomas F.O'Connell wrote: The number of lines depends merely on where you place your line breaks. IF(days_complete = 120, job_price, 0)AS Days_120 could be written as: CASE

Re: [GENERAL] Installing PostgreSQL in Debian

2005-03-21 Thread Michael Ben-Nes
Yep :) but that Expermental Peter Eisentraut wrote: Michael Ben-Nes wrote: I recomend you to compile PG from source so you can use the new 8.0.1 PostgreSQL 8.0.1 is available in the Debian experimental suite, package name postgresql-8.0. -- -- Canaan Surfing

Re: [GENERAL] pg_dump large-file support 16GB

2005-03-21 Thread Tom Lane
Rafael Martinez Guerrero [EMAIL PROTECTED] writes: Do you use any spesial option when you compile pg_dump, or in the program that could influence how the program behaves and can help me to reproduce the problem? In a Linux system we'll add -D_GNU_SOURCE to the compile command line. Also,

[GENERAL] pl/perl problem

2005-03-21 Thread FERREIRA William (COFRAMI)
Title: RE: [GENERAL] Convert Cursor to array hi i wrote a store procedure using the pl/perlU language, and the comportment is strange. my procedure do a select on my database and some traitments too and write the result in a file; when i run the procedure a first time, it works fine, the

[GENERAL] Time Stamp

2005-03-21 Thread Hrishikesh Deshmukh
Hi All, I want to get a timestamp of the queries that i run! Is there a builtin command to do this/ does one need to write a function/stored procedure! Any pointers will help. Thanks, Hrishi ---(end of broadcast)--- TIP 5: Have you checked our

Re: [GENERAL] psql variables

2005-03-21 Thread George Essig
On Mon, 14 Mar 2005 11:06:32 -0500, Paul Cunningham [EMAIL PROTECTED] wrote: I use a bash script (similar to following example) to update tables. psql -v passed_in_var=\'some_value\' -f script_name Is it possible to pass a value back from psql to the bash script? You can use '\! [

Re: [GENERAL] Time Stamp

2005-03-21 Thread Richard Huxton
Hrishikesh Deshmukh wrote: Hi All, I want to get a timestamp of the queries that i run! Is there a builtin command to do this/ does one need to write a function/stored procedure! Any pointers will help. You don't say where you want this timestamp. In psql look into \timing (see the man page) To

Re: [GENERAL] Help with transactions

2005-03-21 Thread Stephen Howie
Thanks for the reply. I've notice a couple things. I ran a couple test and at first I couldn't duplicate my error on some test tables. But I then added inheritance to one of the tables and thats when I got the error again. It looks like there is an error when obtaining the seq id (nextval)

Re: [GENERAL] Time Stamp

2005-03-21 Thread Scott Marlowe
On Mon, 2005-03-21 at 09:29, Hrishikesh Deshmukh wrote: Hi All, I want to get a timestamp of the queries that i run! Is there a builtin command to do this/ does one need to write a function/stored procedure! Any pointers will help. This is actually a pretty wide open question. Do you want

Re: [GENERAL] Time Stamp

2005-03-21 Thread Hrishikesh Deshmukh
Hi, I want to know how long did it take for my query to run! Thanks, Hrishi On Mon, 21 Mar 2005 15:57:38 +, Richard Huxton dev@archonet.com wrote: Hrishikesh Deshmukh wrote: Hi All, I want to get a timestamp of the queries that i run! Is there a builtin command to do this/ does

[GENERAL] PostgreSQL users, tell your tale on Slashdot

2005-03-21 Thread Miles Keaton
Slashdot story just posted a few minutes ago: http://slashdot.org/article.pl?sid=05/03/21/1635210 I've been using PostgreSQL for years on small projects, and I have an opportunity to migrate my company's websites from Oracle to an open-source alternative. It would be good to be able to show the

Re: [GENERAL] Copression

2005-03-21 Thread Greg Stark
Bruce Momjian pgman@candle.pha.pa.us writes: Bruce Momjian pgman@candle.pha.pa.us writes: Stanislaw Tristan wrote: It's a possible to compress traffic between server and client while server returns query result? It's a very actually for dial-up users. What is solution? No, unless

Re: [GENERAL] Tracking row updates - race condition

2005-03-21 Thread Alex Adriaanse
I think that would greatly decrease the chances of a race condition occurring, but I don't think it'd solve it. What if 150 other revisions occur between a row update and its corresponding commit? Alex Vincent Hikida wrote: To fetch all updates since the last synchronization, the client would

[GENERAL] how do I clear a page, or set an item in a page to 'free'?

2005-03-21 Thread Eric Parusel
I've got a mucked up page in my db, and I can't complete a database dump until a particular page is fixed/removed from the table. :( Could someone let me know the proper way to go about making a change such as this?: 1) Clear the page or 2) Set the bad items in the page to 'free' I can see the

Re: [GENERAL] Tracking row updates

2005-03-21 Thread Alex Adriaanse
Qingqing Zhou wrote: Alex Adriaanse [EMAIL PROTECTED] writes This seems to work, except there exists a race condition. Consider the following series of events (in chronological order): 1. Initially, in the codes table there's a row with id=1, revision=1, and a row with id=2, revision=2

Re: [GENERAL] how do I clear a page, or set an item in a page to 'free'?

2005-03-21 Thread Tom Lane
Eric Parusel [EMAIL PROTECTED] writes: I've got a mucked up page in my db, and I can't complete a database dump until a particular page is fixed/removed from the table. :( Could someone let me know the proper way to go about making a change such as this?: 1) Clear the page or 2) Set the

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Eric Parusel
Tom Lane wrote: Eric Parusel [EMAIL PROTECTED] writes: I've got a mucked up page in my db, and I can't complete a database dump until a particular page is fixed/removed from the table. :( Zeroing the page is the most painless way. dd from /dev/zero will get it done --- but note that you have to

Re: [GENERAL] Copression

2005-03-21 Thread Jay Guerette
FWIW: If you use an stunnel or ssh connection of some sort, merely for compression and not security, the ARCFOUR encryption algorithm appears to have the lowest overhead fastest throughput. Benchmarked it once for exactly this purpose. It's a possible to compress traffic between server and

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Scott Marlowe
Wouldn't zero_damaged_pages help here? http://www.postgresql.org/docs/7.4/static/runtime-config.html#RUNTIME-CONFIG-DEVELOPER On Mon, 2005-03-21 at 13:28, Eric Parusel wrote: Tom Lane wrote: Eric Parusel [EMAIL PROTECTED] writes: I've got a mucked up page in my db, and I can't complete a

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Tom Lane
Eric Parusel [EMAIL PROTECTED] writes: ok, I can dd, if=/dev/zero of=base/dbnum/tablenum, but how do I figure how where and how much to write over? Is there an easy to see or calculate offset value for a particular page number? (28393) dd bs=8k seek=28393 count=1

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Scott Marlowe
ahh, ok. I just know I'm much more nervous about zeroing stuff by hand than letting the backend do it for me. On Mon, 2005-03-21 at 13:54, Tom Lane wrote: Scott Marlowe [EMAIL PROTECTED] writes: Wouldn't zero_damaged_pages help here? Only if there's detectable corruption in the page

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: ahh, ok. I just know I'm much more nervous about zeroing stuff by hand than letting the backend do it for me. Well, I certainly hope Eric is gonna save aside a copy of the file (if not the whole database) before he hacks it ;-) BTW, I missed the point

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: Wouldn't zero_damaged_pages help here? Only if there's detectable corruption in the page header, which there seems not to be. regards, tom lane ---(end of broadcast)--- TIP 1:

Re: [GENERAL] Copression

2005-03-21 Thread Michael Fuhr
On Mon, Mar 21, 2005 at 12:45:21PM -0500, Greg Stark wrote: Bruce Momjian pgman@candle.pha.pa.us writes: No, unless SSL compresses automatically. Without checking the source, I'll bet it does. Any good encryption system should compress first. I just ran some tests and it doesn't look

Re: [GENERAL] how do I clear a page, or set an item in a page to

2005-03-21 Thread Eric Parusel
Tom Lane wrote: Eric Parusel [EMAIL PROTECTED] writes: ok, I can dd, if=/dev/zero of=base/dbnum/tablenum, but how do I figure how where and how much to write over? Is there an easy to see or calculate offset value for a particular page number? (28393) dd bs=8k seek=28393 count=1 shutdown

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

2005-03-21 Thread Alvaro Herrera
On Sun, Mar 20, 2005 at 10:02:24AM -0500, Carlos Moreno wrote: Carlos, So, our system (CGI's written in C++ running on a Linux server) simply takes whatever the user gives (properly validated and escaped) and throws it in the database. We've never encountered any problem (well, or perhaps

[GENERAL] bit varying(512) vs bytea(64)

2005-03-21 Thread TJ O'Donnell
I have N-bit data pairs. I want to write a c-language function which compares bits set in each. N is typically 512, but could be other. I can store this as bit varying(512) or bytea(64). I can't decide which. Here are the questions that concern me. 1) will each take the same storage? 2) can I

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

2005-03-21 Thread Alvaro Herrera
On Sun, Mar 20, 2005 at 10:02:24AM -0500, Carlos Moreno wrote: Carlos, Carlos -- PS: I have a strict white-list anti-spam filter in place, which is why a direct e-mail would be rejected -- let me know if you want to write directly through e-mail, so that I can add you to the

Re: [GENERAL] Copression

2005-03-21 Thread Jan Wieck
On 3/20/2005 10:50 PM, Bruce Momjian wrote: Stanislaw Tristan wrote: It's a possible to compress traffic between server and client while server returns query result? It's a very actually for dial-up users. What is solution? No, unless SSL compresses automatically. You can use ssh port forwarding

Re: [GENERAL] New user: Windows, Postgresql, Python

2005-03-21 Thread Paul Moore
[EMAIL PROTECTED] (Marco Colombo) writes: It seems python documentation is plain wrong, or I'm not able to read it at all: http://docs.python.org/ref/physical.html A physical line ends in whatever the current platform's convention is for terminating lines. On Unix, this is the ASCII LF

Re: [GENERAL] Tracking row updates - race condition

2005-03-21 Thread Harald Fuchs
In article [EMAIL PROTECTED], Alex Adriaanse [EMAIL PROTECTED] writes: I think that would greatly decrease the chances of a race condition occurring, but I don't think it'd solve it. What if 150 other revisions occur between a row update and its corresponding commit? How about the following:

Re: [GENERAL] Tsearch vector not stored by update/set

2005-03-21 Thread Andrew J. Kopciuch
It seems to be selective of only numbers, words with numbers in them, words with '.' or '/' characters. It completely ignores any other words or text in any of the 3 fields. This is a very big hint to your problem. You requested the pg_ts_* tables: On the Linux-redhat, pg7.3.2

Re: [GENERAL] Time Stamp

2005-03-21 Thread Sean Davis
Hrishi, Depending on what you are using the information for, you might want to think about using EXPLAIN ANALYZE like: EXPLAIN ANALYZE SELECT * FROM TEST_TABLE; This will give you the output of the explain command (describing what the query planner decided was the best plan) and the results of

[GENERAL] Problem connecting to postmaster

2005-03-21 Thread Glenn Sullivan
Hi, I have installed native postgresql8.0.1 on a PC running Windows XP professional. I am having trouble connecting to it from my application. The application is a combination of java and C++ which was developed on Sun Solaris (Unix). Thus on the PC, I have installed Microsoft Interix (Service

Re: [GENERAL] Problem connecting to postmaster

2005-03-21 Thread Dann Corbit
What happens when you connect using the same user/password using PSQL? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Sullivan Sent: Monday, March 21, 2005 4:41 PM To: pgsql-general Subject: [GENERAL] Problem connecting to postmaster Hi, I have

Re: [GENERAL] Tsearch vector not stored by update/set

2005-03-21 Thread Justin L. Kennedy
On Sun, 20 Mar 2005, Andrew J. Kopciuch wrote: On Thursday 17 March 2005 17:55, you wrote: The short question is why does this: select to_tsvector('default', coalesce(name, '') ||' '|| coalesce(description, '') ||' '|| coalesce(keywords,'')) from link_items; give different results

Re: [GENERAL] Problem connecting to postmaster

2005-03-21 Thread Doug McNaught
Glenn Sullivan [EMAIL PROTECTED] writes: Hi, I have installed native postgresql8.0.1 on a PC running Windows XP professional. I am having trouble connecting to it from my application. The application is a combination of java and C++ which was developed on Sun Solaris (Unix). Thus on the

Re: [GENERAL] Tracking row updates

2005-03-21 Thread Qingqing Zhou
Alex Adriaanse [EMAIL PROTECTED] writes Applying this analogy to our database, wouldn't that require a table-level lock during a CVS-like commit (which would mean locking the table, getting the revision number, updating the row(s), and committing the transaction)? You may have a look at how

[GENERAL] Measuring Query Performance

2005-03-21 Thread Ed L.
I'm attempting to measure database query performance across a large number of high-volume clusters. I'd like to share a couple of ideas and hear what other ideas folks know of for this problem. I suppose there are existing solutions, I just haven't found them. The idea here is to

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

2005-03-21 Thread Carlos Moreno
Thanks again, Alvaro! Alvaro Herrera wrote: So, our system (CGI's written in C++ running on a Linux server) simply takes whatever the user gives (properly validated and escaped) and throws it in the database. We've never encountered any problem (well, or perhaps it's the opposite? Perhaps we've

[GENERAL] Clearing locks

2005-03-21 Thread Edwin New
I am using postgreSQL version 8 on Solaris 9. I have encountered a situation where a java process is dying but leaving locks active. When I restart the process, it gets a new connection, but can't proceed as the previous lock is still active. How can I, as DBA, clear a lock / roll

Re: [GENERAL] Clearing locks

2005-03-21 Thread Neil Conway
Edwin New wrote: I have encountered a situation where a java process is dying but leaving locks active. If the connection to PostgreSQL is severed (e.g. the client actually disconnects), the current transaction will be rolled back and any held locks will be released. So it seems that the

[GENERAL] multi line text data/query ?bug?

2005-03-21 Thread Sim Zacks
While I was testing an issue in python I discovered a general *nix/windows/mac issue with newlines. The same query will give different results depending on what client executes it. create table test1(f1 text); insert into test1 values('this is a long string. it will have new lines in it. I want

Re: [GENERAL] pl/perl problem

2005-03-21 Thread Sean Davis
Title: RE: [GENERAL] Convert Cursor to array - Original Message - From: FERREIRA William (COFRAMI) To: 'pgsql-general@postgresql.org' Sent: Monday, March 21, 2005 9:22 AM Subject: [GENERAL] pl/perl problem hi i wrote a store procedure using the