[GENERAL] vacuum full taking much longer than dump + restore?

2006-03-20 Thread Dragan Matic
We have a few larger tables (~3,5 million rows largest, ~ 1 million rows smallest) on our production database which had at least one column defined as char(nn) (nn being larger or equal to 60). I did an alter table where I changed the definition of those columns to varchar(nn), and after that

[GENERAL] Difference between add column and add column with default

2006-03-20 Thread Guido Neitzer
Hi. What is the technical difference between adding a column to a table and then apply a set value = ... to all columns and adding a column with a default value = ...? I have seen that the first duplicates all rows, I had to vacuum and reindex the whole table. Okay so far, I have

Re: [GENERAL] vacuum full taking much longer than dump + restore?

2006-03-20 Thread Martijn van Oosterhout
On Mon, Mar 20, 2006 at 10:50:42AM +0100, Dragan Matic wrote: We have a few larger tables (~3,5 million rows largest, ~ 1 million rows smallest) on our production database which had at least one column defined as char(nn) (nn being larger or equal to 60). snip 15-20 minutes of vacuum

Re: [GENERAL] Slow trigger on identical DB but different machine

2006-03-20 Thread Etienne Labuschagne
Hi Tom, That was one of the first things I tried, to no avail . . . Regards Etienne Tom Lane wrote: Etienne Labuschagne [EMAIL PROTECTED] writes: The strange thing is that both databases are EXACTLY the same with EXACTLY the same SQL query executed (I restore both DBs from the same backup

Re: [GENERAL] Difference between add column and add column with default

2006-03-20 Thread Martijn van Oosterhout
On Mon, Mar 20, 2006 at 10:52:36AM +0100, Guido Neitzer wrote: Hi. What is the technical difference between adding a column to a table and then apply a set value = ... to all columns and adding a column with a default value = ...? What version are you using: # alter table a add column

Re: [GENERAL] Difference between add column and add column with default

2006-03-20 Thread Guido Neitzer
On 20.03.2006, at 11:41 Uhr, Martijn van Oosterhout wrote: What is the technical difference between adding a column to a table and then apply a set value = ... to all columns and adding a column with a default value = ...? What version are you using: # alter table a add column b int4 default

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-20 Thread Qingqing Zhou
Alex bahdushka [EMAIL PROTECTED] wrote After doing some more digging, it looks like that server was missing the appropriate Kpostgresql symlink in /etc/rc0.d/. So upon shutdown (shutdown -h now)... my guess is it got a sigterm (you know where it says Sending all processes a TERM signal or

Re: [GENERAL] Encountering NULLS in plpgsql

2006-03-20 Thread Richard Huxton
Randy Yates wrote: dev@archonet.com (Richard Huxton) writes: Randy Yates wrote: I wrote a simple pl to compute running sums, but when it encountered a null on a float4 value it caused pgadminIII to crash (exited abruptly). Is this intended behavior? No, but we'll need more information to

Re: [GENERAL] OpenSuse10.0 and postgresql

2006-03-20 Thread Richard Huxton
Hrishikesh Deshmukh wrote: The README doesn't talk about what next to do after installation from rpms, there is no file which talks about in the /usr/share/doc/packages/postgresql . It only says look at INSTALL file but there is no install with the rpms!! There should be a complete copy of the

Re: [GENERAL] Wal -long transaction

2006-03-20 Thread Ron Mayer
Greg Stark wrote: Well it's worse than that. If you have long-running transactions that would cause rollback-segment-overflow in Oracle then the equivalent price in Postgres would be table bloat *regardless* of how frequently you vacuum. Isn't that a bit pessimistic? In tables which mostly

Re: [GENERAL] Urgent !!! Please Help Me

2006-03-20 Thread Michelle Konzack
Am 2006-03-13 23:58:40, schrieb r irussel: Hello Every body: I have implemented psql version 7.4.2 on Debian linux version 3.2 Where does this PostgreSQL version come from? And there is NO version 3.2 of Debian GNU/Linux. Only 3.0 (Woody), 3.1 (Sarge) and maybe 4.0 (Etch). You should

[GENERAL] Updating in multiple tables

2006-03-20 Thread Luuk Jansen
I have a quick newbee question: Is is possible to update in multiple tables at the same time. I am working with PHP scripts and will use the following example to explain what I want to do: I have a generic_user tables, which forms a INNER JOIN with the logon_user table (with a join using id).

Re: [GENERAL] Updating in multiple tables

2006-03-20 Thread Tino Wildenhain
Luuk Jansen schrieb: I have a quick newbee question: Is is possible to update in multiple tables at the same time. I am working with PHP scripts and will use the following example to explain what I want to do: I have a generic_user tables, which forms a INNER JOIN with the logon_user table

Re: [GENERAL] question about postgresql time intervals

2006-03-20 Thread Linda
On Friday 17 March 2006 10:20 pm, Michael Glaesemann wrote: I've been having some email problems, so my apologies if this is a duplicate. On Mar 16, 2006, at 22:49 , Linda wrote: Thanks for your reply. I guess you missed the original email. I have an application that is

Re: [GENERAL] Updating in multiple tables

2006-03-20 Thread Luuk Jansen
Thanks for the quick reply, Using a view and rules seems to be the way to do it as it saves me from rewriting all classes in my application that save data. Is there any simple way to create a rule that on the update of the view 'detects' which field belongs to which table, and updates them

[GENERAL] Double checking my logic?

2006-03-20 Thread Ted Byers
I have to deal with the following situation. I get a daily feed of data for several tables. This data is retrieved from the supplier by ftp in the form of CSV textfiles. I know I can load the files using "load data". The relational structure between the files and tables is simple: one file

Re: [GENERAL] PANIC: heap_update_redo: no block

2006-03-20 Thread Alex bahdushka
On 3/20/06, Qingqing Zhou [EMAIL PROTECTED] wrote: Alex bahdushka [EMAIL PROTECTED] wrote After doing some more digging, it looks like that server was missing the appropriate Kpostgresql symlink in /etc/rc0.d/. So upon shutdown (shutdown -h now)... my guess is it got a sigterm (you

Re: [GENERAL] db sever seems to be dropping connections

2006-03-20 Thread Rushabh Doshi
Rushabh Doshi wrote: I'm facing an issue with PostgreSQL .. The server seems to drop the connection to my script after a couple of hours (sometimes, not always). DBD::Pg::db selectrow_array failed: could not receive data from server: :server closed the connection unexpectedly.

Re: [GENERAL] OpenSuse10.0 and postgresql

2006-03-20 Thread Brent Wood
On Sat, 18 Mar 2006, Adrian Klaver wrote: On Saturday 18 March 2006 09:15 am, Hrishikesh Deshmukh wrote: Hi All, Can somebody please tell me where i can find rpms for postgesql on OpenSuse 10.0? Sincerely, Hrishi Try this site and enter postgresql. I found rpm's for OpenSuSE .

Re: [GENERAL] Connecting

2006-03-20 Thread Ben Trewern
I'd try zeoslib (http://forum.zeoslib.net.ms/or http://sourceforge.net/projects/zeoslib/)instead of ODBC. The 6.1.5 version (with patches)works with Delphi 4 and always worked well for me. Regards, Ben "Bob Pawley" [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I'm

Re: [GENERAL] SSL or other libraries for Windows-to-Linux PostgreSQL connection?

2006-03-20 Thread Bart Golda
For future generations: It is solved. Do whatever http://developer.postgresql.org/docs/postgres/ssl-tcp.html says, than turn on ssl in postgresql.conf and restart PostgreSQL. Regards, Bart Golda ---(end of broadcast)--- TIP 9: In versions below

Re: [GENERAL] Wal -long transaction

2006-03-20 Thread Ian Harding
And it's been a while; but I thought transactions like that could overflow rollback segments in that other database. ORA-01555: snapshot too old: rollback segment number string with name string too small Cause: Rollback records needed by a reader for consistent read are overwritten by

[GENERAL] Licensing of .DLL files

2006-03-20 Thread Vladimira Nitrova
Hello, We'd like to distribute the following .DLL files within our software so as our users don't have to install these files separately: comerr32.dll, krb5_32.dll, libeay32.dll, libintl-2.dll, libiconv-2.dll and ssleay32.dll. However, the problem is that we don't know who we shall contact

Re: [GENERAL] Licensing of .DLL files

2006-03-20 Thread Dave Page
On 20/3/06 13:17, Vladimira Nitrova [EMAIL PROTECTED] wrote: Hello, We'd like to distribute the following .DLL files within our software so as our users don't have to install these files separately: comerr32.dll, krb5_32.dll, libeay32.dll, libintl-2.dll, libiconv-2.dll and ssleay32.dll.

Re: [GENERAL] Licensing of .DLL files

2006-03-20 Thread Josh Rovero
None of these licenses prohibit distribution, AFAIK. You may have to offer source, etc. We normally just bundle all source tar files for similar components that we distribute with our code. Dave Page wrote: On 20/3/06 13:17, Vladimira Nitrova [EMAIL PROTECTED] wrote: Hello, We'd like

Re: [GENERAL] Licensing of .DLL files

2006-03-20 Thread Magnus Hagander
None of these licenses prohibit distribution, AFAIK. You may have to offer source, etc. We normally just bundle all source tar files for similar components that we distribute with our code. If you do that, there's definitl no problem. We wouldn't bundle anything that doesn't uphold

Re: [GENERAL] Double checking my logic?

2006-03-20 Thread Adrian Klaver
On Monday 20 March 2006 08:25 am, Ted Byers wrote: I have to deal with the following situation. I get a daily feed of data for several tables. This data is retrieved from the supplier by ftp in the form of CSV text files. I know I can load the files using load data. The relational

Re: [GENERAL] Double checking my logic?

2006-03-20 Thread John D. Burger
Adrian Klaver wrote: I faced a similar problem where I was trying to keep track of changes to a FoxPro database that I only had indirect access to. My solution followed your proposal to a degree. I imported the new data on a daily basis to holding tables. I then ran a series of functions to

[GENERAL] question about pg_hba.conf

2006-03-20 Thread Tony Caduto
Does anyone know if the server would have problems reading pg_hba.conf if the number of spaces where changed between fields or tabs where added? thanks, Tony ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your

Re: [GENERAL] question about pg_hba.conf

2006-03-20 Thread mike
Never been a problem for me. On Mon, 2006-03-20 at 15:29 -0600, Tony Caduto wrote: Does anyone know if the server would have problems reading pg_hba.conf if the number of spaces where changed between fields or tabs where added? thanks, Tony ---(end of

Re: [GENERAL] How I can get the real data type result instead of

2006-03-20 Thread Sigurdur Gunnlaugsson
On Mon, 2006-03-20 at 21:10, Wei Wei wrote: In a query, there is something like order by count(id)/age where both id and age are the integer data type. From a query result, I believe the operation count(id)/age yields a integer. I need it in real data type. After searching the online

Re: [GENERAL] db sever seems to be dropping connections

2006-03-20 Thread Tom Lane
Chris [EMAIL PROTECTED] writes: Rushabh Doshi wrote: I'm facing an issue with PostgreSQL .. The server seems to drop the connection to my script after a couple of hours (sometimes, not always). Sounds more like a network issue. Yeah --- in particular, it sounds like a connection timeout

Re: [GENERAL] ambuild parameters

2006-03-20 Thread Tom Lane
[EMAIL PROTECTED] writes: Thanks for answering, it was a good guess, I really didn't mark it, but unfortunately it didn't solve my problem. It still falls down, when I try to access the argument. But it seems strange to me, that converting to Relation is OK: Relation index_rel = (Relation)

Re: [GENERAL] Difference between add column and add column with default

2006-03-20 Thread Tom Lane
Guido Neitzer [EMAIL PROTECTED] writes: What is the technical difference between adding a column to a table and then apply a set value = ... to all columns and adding a column with a default value = ...? ADD COLUMN DEFAULT ... is implemented via a full-table rewrite, so you end up with a

Re: [GENERAL] How I can get the real data type result instead of integer data type?

2006-03-20 Thread Bruno Wolff III
On Mon, Mar 20, 2006 at 13:10:51 -0800, Wei Wei [EMAIL PROTECTED] wrote: In a query, there is something like order by count(id)/age where both id and age are the integer data type. From a query result, I believe the operation count(id)/age yields a integer. I need it in real data

Re: [GENERAL] What's a good default encoding?

2006-03-20 Thread Vivek Khera
On Mar 16, 2006, at 3:36 AM, Martijn van Oosterhout wrote: Umm, you should choose an encoding supported by your platform and the locales you use. For example, UTF-8 is a bad choice on *BSD because there is no collation support for UTF-8 on those platforms. On Linux/Glibc UTF-8 is well

Re: [GENERAL] What's a good default encoding?

2006-03-20 Thread Peter Eisentraut
Vivek Khera wrote: Shouldn't postgres be providing the collating routines for UTF8 anyhow? Start typing ... -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 4: Have you searched our list archives?

Re: [GENERAL] What's a good default encoding?

2006-03-20 Thread Vivek Khera
On Mar 20, 2006, at 6:04 PM, Peter Eisentraut wrote: Vivek Khera wrote: Shouldn't postgres be providing the collating routines for UTF8 anyhow? Start typing ... So, if I use a UTF8 encoded DB on FreeBSD, all hell will break loose or what? Will things not compare correctly? Where from

Re: [GENERAL] What's a good default encoding?

2006-03-20 Thread Tom Lane
Vivek Khera [EMAIL PROTECTED] writes: Shouldn't postgres be providing the collating routines for UTF8 anyhow? How else can we guarantee identical behavior across platforms? We don't make any such guarantee. regards, tom lane ---(end of

Re: [GENERAL] About when we should setup index?

2006-03-20 Thread Francisco Reyes
Emi Lu writes: One more thing to consider. If you have a column with lots of repeated values and a handfull of selective values, you could use a partial index. http://www.postgresql.org/docs/8.0/interactive/indexes-partial.html For example imagine you have an accounts table like Accounts

[GENERAL] Long running transactions

2006-03-20 Thread Wayne Schroeder
I have a quite heavily accessed database that is vacuumed nightly. Attached to that database are processes, that at times, due to the way they are coded, stay idle in transaction for long periods of time (client lib implementation issues a BEGIN). I've been reading up on XIDs and the like and I'm

Re: [GENERAL] Long running transactions

2006-03-20 Thread Tom Lane
Wayne Schroeder [EMAIL PROTECTED] writes: I have a quite heavily accessed database that is vacuumed nightly. Attached to that database are processes, that at times, due to the way they are coded, stay idle in transaction for long periods of time (client lib implementation issues a BEGIN).

[GENERAL] xml output.

2006-03-20 Thread Murali K. Maddali
Hello Guys, I am trying to export the data out of the database directly to an xml file. Is there a way that I could do this in PostgreSQL. I am looking for a function or something like that. Does PostgreSQL support sqlxml. Thank you, Murali. ---(end of

Re: [GENERAL] xml output.

2006-03-20 Thread Chris
Murali K. Maddali wrote: Hello Guys, I am trying to export the data out of the database directly to an xml file. Is there a way that I could do this in PostgreSQL. I am looking for a function or something like that. Does PostgreSQL support sqlxml. Don't think so. A small script (perl,

Re: [GENERAL] xml output.

2006-03-20 Thread Murali K. Maddali
Can I use pl/pgsql or pl/tcl to write function to do that. Murali. Chris wrote: Murali K. Maddali wrote: Hello Guys, I am trying to export the data out of the database directly to an xml file. Is there a way that I could do this in PostgreSQL. I am looking for a function or something like

Re: [GENERAL] xml output.

2006-03-20 Thread Chris
Murali K. Maddali wrote: Can I use pl/pgsql or pl/tcl to write function to do that. Can't see why not (I'm sure others will chime in if it's not possible or not a good idea) but that's not going to help for a full database dump. Doing a set of results it should work ok though. Depends what

Re: [GENERAL] xml output.

2006-03-20 Thread Murali K. Maddali
I was trying to write out data from a table to an xml file, so that I could export out this file to another external application from another vendor. I got to export the data based on a predefined schema. I am able to do this through .NET using c#, but I was wondering if there is way if I can