Re: [GENERAL] Stripping empty space from all fields in a table?

2006-10-27 Thread David Fetter
On Fri, Oct 27, 2006 at 03:39:21PM -0400, J B wrote: > Guys, > I have a table that has various fields that have whitespace in the > values. I'd like to roll through and strip the left and right > whitespace out of all fields that contain strings. Is there any > easy way to do this? If you're rea

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, October 27, 2006 19:05:01 -0300 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > http://archives.postgresql.org/pgsql-es-ayuda/2006-10/msg00565.php The one you sent me is from ~2 hours after the original post: Date: Fri, 27 Oct 2006 11:

Re: [GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Sandro Dentella
On Fri, Oct 27, 2006 at 04:22:36PM -0500, Russ Brown wrote: > Sandro Dentella wrote: > > On Fri, Oct 27, 2006 at 02:42:06PM -0500, Russ Brown wrote: > >> Looks to me like it is because you're referencing vota_punteggio in the > >> WHERE clause. > >> > >> Try something like this: > >> > >>SE

Re: [GENERAL] CREATE TABLE initial value for PRIMARY KEY

2006-10-27 Thread Maurice Yarrow
Hello Richard Thanks for the tip. So it turned out to be possible to do it like this: CREATE SEQUENCE id_seq; SELECT setval('id_seq',100111); CREATE TABLE customer( id INTEGER DEFAULT nextval('id_seq'), name VARCHAR(30) ); INSERT INTO customer (name) VALUES ('SomeName'); INSERT INTO customer

Re: [GENERAL] Wrong record type - caused by SELECT order ???

2006-10-27 Thread Stephan Szabo
On Fri, 27 Oct 2006, John Cobo wrote: > I am trying to create some functions which return many rows using > plpgsql. This example could be done with SQL, but later I will need > plpglsql. I was constantly getting the wrong record type error with a > couple different functions. Finally I found t

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Alvaro Herrera
Marc G. Fournier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > 'k, the message you sent had: > > > was executed with status: > > 0 (failure) > > which indicates it failed ... do you have a corresponding URL @ archives that > shows that it did go through that I can check agai

Re: [GENERAL] plpython.so

2006-10-27 Thread Devrim GUNDUZ
Hi, On Fri, 2006-10-27 at 22:37 +0300, Devrim GUNDUZ wrote: > Anyway... I have uploaded new sets. SRPMs and FC5 RPMs will be in main > FTP site in an hour. They are labeled as 8.1.5-4PGDG It is really a nightmare... David Fetter has just found a problem that breaks 64 bit builds. I have updated

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 'k, the message you sent had: > was executed with status: > 0 (failure) which indicates it failed ... do you have a corresponding URL @ archives that shows that it did go through that I can check against? - --On Friday, October 27, 2006 18:44:5

Re: [GENERAL] Stripping empty space from all fields in a table?

2006-10-27 Thread Bricklen Anderson
J B wrote: Guys, I have a table that has various fields that have whitespace in the values. I'd like to roll through and strip the left and right whitespace out of all fields that contain strings. Is there any easy way to do this? Thanks! JB "trim" will strip the whitespace from both sid

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Alvaro Herrera
Marc G. Fournier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > - --On Friday, October 27, 2006 15:54:41 -0300 Alvaro Herrera > <[EMAIL PROTECTED]> wrote: > > > > Anyway I wonder why it does report "failure", when the messages do make > > it through the list to all subscribe

[GENERAL] Wrong record type - caused by SELECT order ???

2006-10-27 Thread John Cobo
Hello, I am trying to create some functions which return many rows using plpgsql. This example could be done with SQL, but later I will need plpglsql. I was constantly getting the wrong record type error with a couple different functions. Finally I found that if I changed the order of columns

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Richard Broersma Jr
> Richard Broersma Jr <[EMAIL PROTECTED]> writes: > >> Are you interested in dumping out the page of pg_index that > >> contains this record, using pg_filedump? > > > I've attached the results.log to the email. > > Well, there's our smoking gun: > 1bfc: 74746e6f 1c00 ttno

Re: [GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Russ Brown
Sandro Dentella wrote: > On Fri, Oct 27, 2006 at 02:42:06PM -0500, Russ Brown wrote: >> Looks to me like it is because you're referencing vota_punteggio in the >> WHERE clause. >> >> Try something like this: >> >>SELECT f.id, f.titolo, p.voto >>FROM film_film f >>LEFT OUTER

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: >> Are you interested in dumping out the page of pg_index that >> contains this record, using pg_filedump? > I've attached the results.log to the email. Well, there's our smoking gun: Item 11 -- Length: 398 Offset: 6844 (0x1abc) Flags: USED

Re: [GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Tom Lane
Sandro Dentella <[EMAIL PROTECTED]> writes: > this works in fact, and it's simpler. But I don't really understard why I > should put it in this way. The other way seems to work for me: regression=# create table film_film (id int, titolo text); CREATE TABLE regression=# create table vota_punteggio

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Richard Broersma Jr
> >> Are you interested in dumping out the page of pg_index that > >> contains this record, using pg_filedump? > > > Sure, only how do I use pg_filedump? > > Find out the ctid of the busted pg_index record; the first part of it is > the page number. Then > > pg_filedump -i -f -R page_numb

Re: [GENERAL] plpython

2006-10-27 Thread Clodoaldo Pinto Neto
2006/10/27, km <[EMAIL PROTECTED]>: i am stuck at createlang for plpythonu! with postgres user error reads: $createlang plpythonu template1; createlang: language installation failed: ERROR: could not load library "/usr/local/pgsql/lib/plpython.so": /usr/local/pgsql/lib/plpython.so: undefined

Re: [GENERAL] plpython.so

2006-10-27 Thread Clodoaldo Pinto Neto
2006/10/27, Devrim GUNDUZ <[EMAIL PROTECTED]>: Hi, Anyway... I have uploaded new sets. SRPMs and FC5 RPMs will be in main FTP site in an hour. They are labeled as 8.1.5-4PGDG . Thanks! Clodoaldo ---(end of broadcast)--- TIP 1: if posting/read

Re: [GENERAL] Problems running PostGreSQL silent install

2006-10-27 Thread Magnus Hagander
> Thank you for the reply. > But then are you saying I don't even really need to use the > MSI in the first place? > I can just copy the files to a folder. Then run initdb and pg_ctl? Sure. The MSI is just a convenient way to get everything into place, and to set icons and stuff. > I am bundlin

Re: [GENERAL] CREATE TABLE initial value for PRIMARY KEY

2006-10-27 Thread Richard Broersma Jr
> I thought about using a DEFAULT value, but I had presumed > that this was only for repeated intializations. So then is it the > case that a > CREATE TABLE mytable ( id INTEGER PRIMARY KEY DEFAULT 10, ... > only applies this default to the very first row of such a table, and then > sensibly,

Re: [GENERAL] Problems running PostGreSQL silent install

2006-10-27 Thread Greg Quinn
Thank you for the reply. But then are you saying I don't even really need to use the MSI in the first place? I can just copy the files to a folder. Then run initdb and pg_ctl? I am bundling PostGreSQL with my software package. And will be using Installshield to copy my program files to the client

Re: [GENERAL] Problems running PostGreSQL silent install

2006-10-27 Thread Magnus Hagander
> initdb: directory "C:/Program Files/PostgreSQL/8.1/data" > exists but is not empty If you want to create a new database > system, either remove or empty the directory "C:/Program > Files/PostgreSQL/8.1/data" or run initdb with an argument > other than "C:/Program Files/PostgreSQL/8.1/data". >

[GENERAL] Problems running PostGreSQL silent install

2006-10-27 Thread Greg Quinn
I have seen many problems like this in the forum, but cannot see a solution for mine... I have created an account with restricted privileges for the service. Everything works fine until I get an error running the silent install. Failed to run initdb: 1! I then check the logfile, and it says The

Re: [GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Sandro Dentella
On Fri, Oct 27, 2006 at 02:42:06PM -0500, Russ Brown wrote: > Looks to me like it is because you're referencing vota_punteggio in the > WHERE clause. > > Try something like this: > >SELECT f.id, f.titolo, p.voto >FROM film_film f >LEFT OUTER JOIN vota_punteggio p >

Re: [GENERAL] plpython

2006-10-27 Thread km
> Sure. But it depends a lot on what you're willing to do. The docs have the > details. This one I did just to learn it: > > CREATE FUNCTION f_v_fechamento(p_cliente_id integer, p_data date, p_pago > boolean, OUT retorno record) RETURNS record > AS $$ > p_cliente_id = args[0] > p_data = ar

Re: [GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Tom Lane
Sandro Dentella <[EMAIL PROTECTED]> writes: > I only get films for which a vote was expressed. My query: >SELECT f.id, f.titolo, p.voto >FROM film_film f >LEFT OUTER JOIN vota_punteggio p >ON (f.id = p.film_id) >WHERE >(p.user_id = 2 OR p.user_id IS

Re: [GENERAL] Stripping empty space from all fields in a table?

2006-10-27 Thread Steve Atkins
On Oct 27, 2006, at 12:39 PM, J B wrote: Guys, I have a table that has various fields that have whitespace in the values. I'd like to roll through and strip the left and right whitespace out of all fields that contain strings. Is there any easy way to do this? UPDATE foo SET bar = btri

Re: [GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Russ Brown
Sandro Dentella wrote: > I've a very simple task. I thought I knew how to solve it but there's > something I'm surely missing. > > I got film and scores for the film. In table "film" and "punteggio" > (score). I want a join returning all the films and the votes > expressed by the user(s). If the

Re: [GENERAL] Stripping empty space from all fields in a table?

2006-10-27 Thread Shoaib Mir
You can use something likeselect ltrim(string, ' ');andselect rtrim(string, ' ');Thanks,Shoaib MirEnterpriseDB (www.enterprisedb.com )On 10/28/06, J B <[EMAIL PROTECTED]> wrote: Guys,I have a table that has various fields that have whitespace in the values. I'd like to roll through and stri

[GENERAL] Stripping empty space from all fields in a table?

2006-10-27 Thread J B
Guys,I have a table that has various fields that have whitespace in the values. I'd like to roll through and strip the left and right whitespace out of all fields that contain strings.Is there any easy way to do this? Thanks!JB

Re: [GENERAL] plpython.so

2006-10-27 Thread Devrim GUNDUZ
Hi, On Fri, 2006-10-27 at 13:55 -0300, Clodoaldo Pinto Neto wrote: > Is it a problem if i use plpython.so from 8.1.4? I don't know. We need to check commit logs for plpython. Anyway... I have uploaded new sets. SRPMs and FC5 RPMs will be in main FTP site in an hour. They are labeled as 8.1.5-4PG

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - --On Friday, October 27, 2006 15:54:41 -0300 Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Anyway I wonder why it does report "failure", when the messages do make > it through the list to all subscribers and the archives. Shouldn't it > report "s

Re: [GENERAL] CREATE TABLE initial value for PRIMARY KEY

2006-10-27 Thread Richard Broersma Jr
> Is there a formal way to set an initial value for a PRIMARY KEY > when CREATE TABLE ? (This would be some large number, > typically.) I am not sure exact what you are looking for, but have you already looked at the default clause of the create table statement? http://www.postgresql.org/docs/8

[GENERAL] Simple OUTER JOIN doubt

2006-10-27 Thread Sandro Dentella
I've a very simple task. I thought I knew how to solve it but there's something I'm surely missing. I got film and scores for the film. In table "film" and "punteggio" (score). I want a join returning all the films and the votes expressed by the user(s). If the user did not vote I want a NULL. I

Re: [GENERAL] CREATE TABLE initial value for PRIMARY KEY

2006-10-27 Thread Tom Lane
Maurice Yarrow <[EMAIL PROTECTED]> writes: > Is there a formal way to set an initial value for a PRIMARY KEY > when CREATE TABLE ? If it's a SERIAL column, you use setval() on the underlying sequence before you start inserting data. regards, tom lane -

Re: [GENERAL] CREATE TABLE initial value for PRIMARY KEY

2006-10-27 Thread Dann Corbit
Use a sequence and set the initial value of the sequence. > -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of Maurice Yarrow > Sent: Friday, October 27, 2006 11:51 AM > To: pgsql-general@postgresql.org > Subject: [GENERAL] CREATE TABLE ini

[GENERAL] CREATE TABLE initial value for PRIMARY KEY

2006-10-27 Thread Maurice Yarrow
Hello Postgres community Is there a formal way to set an initial value for a PRIMARY KEY when CREATE TABLE ? (This would be some large number, typically.) Or is it only possible to do this by first creating the table, and then inserting a bogus record forcing the initial value by specification

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Alvaro Herrera
Marc G. Fournier wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > In order to debug issues that both Josh and I have noticed, where some > postings > aren't getting to the list by some ppl, Ihave enabled 'inform post' on the > lists which will send you, as moderator for pgsql-es-

Re: [GENERAL] DBI-Link, Oracle, database encoding

2006-10-27 Thread David Fetter
On Fri, Oct 27, 2006 at 09:05:44AM +0200, Albe Laurenz wrote: > David Fetter wrote: > >> I know about Oracle, but have not yet managed to setup DBI-Link. > > > > Try it again :) > > http://pgfoundry.org/projects/dbi-link/ > > I will try again when the need arises and/or when I find time :^) Grea

Re: [GENERAL] [SQL] Can we convert from Postgres to Oracle !!???

2006-10-27 Thread Richard Troy
On Thu, 26 Oct 2006, Jim C. Nasby wrote: > Date: Thu, 26 Oct 2006 22:06:30 -0500 > From: Jim C. Nasby <[EMAIL PROTECTED]> > To: Devrim GUNDUZ <[EMAIL PROTECTED]> > Cc: Sandeep Kumar Jakkaraju <[EMAIL PROTECTED]>, > pgsql-general@postgresql.org, [EMAIL PROTECTED], > pgsql-sql@postgresql

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Marc G. Fournier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 In order to debug issues that both Josh and I have noticed, where some postings aren't getting to the list by some ppl, Ihave enabled 'inform post' on the lists which will send you, as moderator for pgsql-es-ayuda, an email letting you know that a

Re: [GENERAL] pg_autovacuum / pg_class

2006-10-27 Thread Tomas Vondra
I feel very ashamed, as I've found the reason - the pg_autovacuum was not running at all :( About month ago we've upgraded to PG 8.1, since then the database was running without a restart but noone noticed the warning about enabling stats_start_collector/stats_row_level. I've noticed that only for

Re: [GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread Joshua D. Drake
Tony Caduto wrote: > >> Typically this is bad idea. Better save the email info on a table and >> fire a NOTIFY. An external daemon would be listening to that >> notification, and send the email from the data in the table, which it >> can subsequently delete or mark as used. >> >> This is also be

Re: [GENERAL] Function returning setof more than 1 table

2006-10-27 Thread Merlin Moncure
On 10/27/06, J S B <[EMAIL PROTECTED]> wrote: Can I have a function (language sql) returning SETOF more than one table? Thanks, Jas no, but you can return a record of refcursors. note this is plpgsql. if you are willing to bend on the language, you will find refcursors to be pretty cool, you

Re: [GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread Tony Caduto
Typically this is bad idea. Better save the email info on a table and fire a NOTIFY. An external daemon would be listening to that notification, and send the email from the data in the table, which it can subsequently delete or mark as used. This is also better because you have a chance to re

Re: [GENERAL] plpython.so

2006-10-27 Thread Clodoaldo Pinto Neto
2006/10/27, Devrim GUNDUZ <[EMAIL PROTECTED]>: Hi, On Fri, 2006-10-27 at 11:46 -0400, Tom Lane wrote: > Also, the .so is probably in the postgresql-pl RPM not > postgresql-python, unless Devrim has moved things around when I wasn't > looking. Yeah, it is my mistake :-( I had removed plpython.so

Re: [GENERAL] plpython.so

2006-10-27 Thread Devrim GUNDUZ
Hi, On Fri, 2006-10-27 at 11:46 -0400, Tom Lane wrote: > Also, the .so is probably in the postgresql-pl RPM not > postgresql-python, unless Devrim has moved things around when I wasn't > looking. Yeah, it is my mistake :-( I had removed plpython.so from installed files :( Sorry Cladoaldo and oth

Re: [GENERAL] plpython.so

2006-10-27 Thread Clodoaldo Pinto Neto
2006/10/27, Tom Lane <[EMAIL PROTECTED]>: "Clodoaldo Pinto Neto" <[EMAIL PROTECTED]> writes: > But I'm still with no /usr/lib/plpython.so. What am i missing? That's not where we keep it. Try /usr/lib/pgsql/plpython.so (or wherever "pg_config --pkglibdir" points to). My mistake, I was looking

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: >> Are you interested in dumping out the page of pg_index that >> contains this record, using pg_filedump? > Sure, only how do I use pg_filedump? Find out the ctid of the busted pg_index record; the first part of it is the page number. Then

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Richard Broersma Jr
> Are you interested in dumping out the page of pg_index that > contains this record, using pg_filedump? Sure, only how do I use pg_filedump? > In any case, my advice for recovering from the problem once you get > tired of investigating is to drop and recreate this index. (If you're > not sure

Re: [GENERAL] plpython.so

2006-10-27 Thread Tom Lane
"Clodoaldo Pinto Neto" <[EMAIL PROTECTED]> writes: > But I'm still with no /usr/lib/plpython.so. What am i missing? That's not where we keep it. Try /usr/lib/pgsql/plpython.so (or wherever "pg_config --pkglibdir" points to). Also, the .so is probably in the postgresql-pl RPM not postgresql-pytho

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: > -[ RECORD 2 ]--+-- > indexrelid | 604251 > indrelid | 16737 > indnatts | 1 > indisunique| f > indisprimary | f > indisclustered | f > indkey | 0 > indclass | 2039 > indexprs | ({FUNCE

Re: [GENERAL] Mailing list problem?

2006-10-27 Thread Richard Broersma Jr
--- Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Hi, > > Is there a problem on the mail lists? I know I noticed ~18 hrs delays for my emails to post on the PG-sql list. Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 9: In versions be

[GENERAL] Mailing list problem?

2006-10-27 Thread Alvaro Herrera
Hi, Is there a problem on the mail lists? I've been getting these messages for a couple of days, one for each and every message that is posted to the pgsql-es-ayuda list. It says "executed with failure", but the mail is certainly delivered. The archives also appear to be working, so I'm not sur

[GENERAL] plpython.so

2006-10-27 Thread Clodoaldo Pinto Neto
I had 8.1.4 i386 installed from the FC5 repository. To upgrade to 8.1.5 I downloaded the srpm from pgsql mirrors and rebuilt it for i686. Then installed the 8 resulting rpms with yum update from a local repo. When I ran the application I had this error: psql:/fahstats/scripts/sql/fahstats.sql:1

Re: [GENERAL] Replicating changes

2006-10-27 Thread Taras Kopets
Hi!I think you should try to use triggers with dbi-link to achieve this.AFAIK there is no such replication with other RDBMS as you need.Taras Kopets On 10/27/06, Alban Hertroys <[EMAIL PROTECTED]> wrote: Hello list,We're investigating a ways to replicate changes to the database toseveral "outside"

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Richard Broersma Jr
> >> So what do you get from 'select * from pg_index where indrelid = 16737' ? > >> If that crashes, which individual columns can you select from the row? > > > I found the exact row and column that causes the server to crash. > > http://archives.postgresql.org/pgsql-general/2006-10/msg01320.php >

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/06 08:41, Alexander Staubo wrote: > On Oct 27, 2006, at 14:56 , Ron Johnson wrote: > >>> I think you completely missed that I am recommending using '\set >>> ON_ERROR_ROLLBACK on' in psql. >>> >>> Please refer to my previous post and see the

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: >> So what do you get from 'select * from pg_index where indrelid = 16737' ? >> If that crashes, which individual columns can you select from the row? > I found the exact row and column that causes the server to crash. > http://archives.postgresql.or

Re: [GENERAL] plpython

2006-10-27 Thread Harald Armin Massa
KM,Can someone hint on resources for using plpython for writing stored procedures ? I have gone thru official docs for  8.1.5 for plpythonu but its not in detail/with examples.CREATE OR REPLACE FUNCTION myfunc(text)  RETURNS text AS$BODY$eingabe=args[0]hello = "Good Morning %s" % (eingabe,) return

Re: [GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread Taras Kopets
Hi! Gerson Machado wrote:I need send email directly from PG with on function, where locate this ? Alvaro Herrera wrote: Typically this is bad idea.  Better save the email info on a table andfire a NOTIFY.  An external daemon would be listening to that notification, and send the email from the data

[GENERAL] Replicating changes

2006-10-27 Thread Alban Hertroys
Hello list, We're investigating a ways to replicate changes to the database to several "outside" systems. Some filtering will need to take place, as not all changes are allowed to go to all systems. Whether the system receiving the changes stores them in a database or not isn't particularly

Re: [GENERAL] plpython

2006-10-27 Thread Jorge Godoy
km <[EMAIL PROTECTED]> writes: > Can someone hint on resources for using plpython for writing stored > procedures ? Sure. But it depends a lot on what you're willing to do. The docs have the details. This one I did just to learn it: CREATE FUNCTION f_v_fechamento(p_cliente_id integer, p_data

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Alexander Staubo
On Oct 27, 2006, at 14:56 , Ron Johnson wrote: I think you completely missed that I am recommending using '\set ON_ERROR_ROLLBACK on' in psql. Please refer to my previous post and see the effect of the following line: postgres=# \set ON_ERROR_ROLLBACK on But I do *not* want my whole trans

Re: [GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread Alvaro Herrera
Gerson Machado wrote: > I need send email directly from PG with on function, where locate this ? Typically this is bad idea. Better save the email info on a table and fire a NOTIFY. An external daemon would be listening to that notification, and send the email from the data in the table, which i

Re: [GENERAL] database not enforcing unqiue constriant

2006-10-27 Thread Merlin Moncure
On 10/27/06, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Do they vacuum enough? I have seen problems with PostgreSQL (albeit not > since 7.3) where a unique constraint would not enforce because of index > bloat. Huh?? This would qualify as a serious bug. Failure to vacuum should bring performa

Re: [GENERAL] pg_dumpall failing from possible corrupted shared memory

2006-10-27 Thread Richard Broersma Jr
> > mydb=# select pg_get_indexdef(indexrelid) from pg_index where indrelid = > > '16737'; > > server closed the connection unexpectedly > > So what do you get from 'select * from pg_index where indrelid = 16737' ? > If that crashes, which individual columns can you select from the row? I found t

[GENERAL] plpython

2006-10-27 Thread km
Hi all, Can someone hint on resources for using plpython for writing stored procedures ? I have gone thru official docs for 8.1.5 for plpythonu but its not in detail/with examples. When is plpython going to be considered safe ? any targeted version ? regards, KM ---

Re: [GENERAL] database not enforcing unqiue constriant

2006-10-27 Thread Alvaro Herrera
Joshua D. Drake wrote: > Merlin Moncure wrote: > > My previous employer contacted me today. Apparently they are having > > an increasing frequency of occurances where they disocover violations > > of the primary key constraint not being caught by the database. This > > system is an ISAM emulation

Re: [GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread Devrim GUNDUZ
Hi, On Fri, 2006-10-27 at 11:11 +, Gerson Machado wrote: > I need send email directly from PG with on function, where locate > this ? You can send e-mails via pltclu or plperlu, more is also possible. http://sourceforge.net/projects/pgmail/ <- This is tcl one. plperlu one is attached. I don'

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/06 06:48, Gurjeet Singh wrote: > On 10/27/06, Ron Johnson <[EMAIL PROTECTED]> wrote: >> >> Dueling examples. Attached are two examples of errors. > > > I think you completely missed that I am recommending using '\set > ON_ERROR_ROLLBACK on'

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Gurjeet Singh
On 10/27/06, Ron Johnson <[EMAIL PROTECTED]> wrote: Dueling examples.  Attached are two examples of errors.I think you completely missed that I am recommending using '\set ON_ERROR_ROLLBACK on' in psql. Please refer to my previous post and see the effect of the following line:postgres=# \set ON_ERR

Re: [GENERAL] UK Hosting Providers

2006-10-27 Thread Edward Macnaghten
[EMAIL PROTECTED] wrote: I have a client who has had some software developed that requires a website element and the site uses postgres for the back end database (of course, its the best after all!) You might like to look at Bytemark (http://www.bytemark.co.uk), or one of the other virtua

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread Purusothaman A
Hi all,Now I changed postgresql database administrator login password and then modified pg_hba.conf file with authentication mathod to md5 for all (roles + database).Now can use the folowing syntax from any login. psql  -Uusername  -h192.168.2.2  -dusername(database name).Hence I solved my pro

Re: [GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread A. Kretschmer
am Fri, dem 27.10.2006, um 11:11:01 + mailte Gerson Machado folgendes: > I need send email directly from PG with on function, where locate this ? There isn't such a function. But you can use untrusted languages to do this. I'm using plsh for this and send emails with my favorite MUA mutt. A

Re: [GENERAL] what is the default username password for PostgreSQL,

2006-10-27 Thread Shane Ambler
Purusothaman A wrote: Thanks for all of your valuable replies. Please tell me, what should i do to login with syntax psql -Uusername -h192.168.2.2 -dusername(database name). Because I should be able to login from any login and also from any system. In your data directory you wil

[GENERAL] Send email from PostgreSQL, may I ?

2006-10-27 Thread Gerson Machado
I need send email directly from PG with on function, where locate this ?   Tks   Yahoo! Search Música para ver e ouvir: You're Beautiful, do James Blunt

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread chris smith
On 10/27/06, Purusothaman A <[EMAIL PROTECTED]> wrote: Thanks for all of your valuable replies. Please tell me, what should i do to login with syntax psql -Uusername -h192.168.2.2 -dusername(database name). Because I should be able to login from any login and also from any system

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
On 10/27/06 05:10, Gurjeet Singh wrote: > On 10/27/06, Ron Johnson <[EMAIL PROTECTED]> wrote: > > That doesn't help at all during multi-table transactions > > > What problem do you think you would face in multi-table scenario? I tried > the following and it worked for me; hope this is what you m

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Gurjeet Singh
On 10/27/06, Ron Johnson <[EMAIL PROTECTED]> wrote: That doesn't help at all during multi-table transactionsWhat problem do you think you would face in multi-table scenario? I tried the following and it worked for me; hope this is what you meant by multi-table transactions: postgres=# begin;BEGIN p

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread Purusothaman A
Thanks for all of your valuable replies.Please tell me, what should i do to login with syntax  psql  -Uusername  -h192.168.2.2  -dusername(database name).Because I should be able to login from any login and also from any  system. :)Purusothaman AOn 10/27/06, Martijn van Oosterhout

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 That doesn't help at all during multi-table transactions or bulk-loads where you want the loader to kick duplicates out to an exception file. On 10/27/06 04:41, Gurjeet Singh wrote: >> If you are using psql, I'd recommend using '\set ON_ERROR_ROLLBAC

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread Martijn van Oosterhout
On Fri, Oct 27, 2006 at 11:43:26AM +0200, A. Kretschmer wrote: > am Fri, dem 27.10.2006, um 15:01:09 +0530 mailte Purusothaman A folgendes: > > Thanks for your immediate reply. > > > > I created new role "db1" and database "db1". > > > > but I cannot login using > > psql -Udb1 -ddb1 -hl

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread A. Kretschmer
am Fri, dem 27.10.2006, um 15:01:09 +0530 mailte Purusothaman A folgendes: > Thanks for your immediate reply. > > I created new role "db1" and database "db1". > > but I cannot login using > psql -Udb1 -ddb1 -hlocalhost > results > Fatal Error : Ident authentication failed for user "db1"

Re: [GENERAL] skip duplicate key error during inserts

2006-10-27 Thread Gurjeet Singh
If you are using psql, I'd recommend using '\set ON_ERROR_ROLLBACK on'.HTH-- [EMAIL PROTECTED][EMAIL PROTECTED] gmail | hotmail | yahoo }.com On 10/22/06, Ron Johnson <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE-Hash: SHA1On 10/22/06 04:39, Jeffrey Webster wrote:> On 10/20/06, Jean-

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread Purusothaman A
Thanks for your immediate reply.I created new role "db1" and database "db1".but I cannot login using psql -Udb1 -ddb1 -hlocalhostresultsFatal Error : Ident authentication failed for user "db1". Waiting for your valuable suggestion.Thanks in advance.:)Purusothaman AOn 10/27/06, Martijn van

Re: [GENERAL] Reducing pg_dump & pg_restore times

2006-10-27 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/06 02:26, Coder At Heart wrote: > Hi! > > Thanks so much for the responses. The system configuration is something > like > this- That's a start... > Linux, Presumably a 2.6 kernel? Which, and which distro version? PG 8.1, OK ext3, OK

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread A. Kretschmer
am Fri, dem 27.10.2006, um 14:45:57 +0530 mailte Purusothaman A folgendes: > Hi all, > > I am using a Fedora Core 5 system. > I want to know what is the default username password for PostgreSQL, which was > installed with FC5. The postgres-User isn't a login-user. Become root (su ), and then 's

[GENERAL] Swing JTable and ResultSet TableModel (with big resultsets)

2006-10-27 Thread Stefano B.
Hi, I don't know if this is the right list for this question but I don't know where to ask...   I have a question about JTable and a ResultSet TableModel (using JDBC postgresql driver).   I have to develop a swing JTable application that gets the data from a ResultSetTableModel where the use

[GENERAL] Is postgres installed by default in Fedora Core 5 ??

2006-10-27 Thread Sandeep Kumar Jakkaraju
Is postgres installed by default in Fedora Core 5 ??   - Sandeep Kumar Jakkaraju  

Re: [GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread Martijn van Oosterhout
On Fri, Oct 27, 2006 at 02:45:57PM +0530, Purusothaman A wrote: > Hi all, > > I am using a Fedora Core 5 system. > I want to know what is the default username password for PostgreSQL, which > was installed with FC5. I'm not sure if there is one. However, usually you su to the postgres user which

[GENERAL] what is the default username password for PostgreSQL, which was installed with FC5.

2006-10-27 Thread Purusothaman A
Hi all,I am using a Fedora Core 5 system.I want to know what is the default username password for PostgreSQL, which was installed with FC5.:)Purusothaman A

Re: [GENERAL] Function returning setof more than 1 table

2006-10-27 Thread A. Kretschmer
am Fri, dem 27.10.2006, um 4:30:47 -0400 mailte J S B folgendes: > Can I have a function (language sql) returning SETOF more than one table? You can create some tables within the function... Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header) Gn

[GENERAL] Function returning setof more than 1 table

2006-10-27 Thread J S B
Can I have a function (language sql) returning SETOF more than one table?Thanks,Jas

Re: [GENERAL] Reducing pg_dump & pg_restore times

2006-10-27 Thread Coder At Heart
Hi!   Thanks so much for the responses. The system configuration is something like this-   Linux, PG 8.1, ext3, RAID 1 setup with two controllers   The machine has 4 processors with 32 Gig of RAM.   Thanks!Shivkumar   On 10/27/06, Stefan Kaltenbrunner <[EMAIL PROTECTED]> wrote: Ron Johnson wrote:>

Re: [GENERAL] DBI-Link, Oracle, database encoding

2006-10-27 Thread Albe Laurenz
David Fetter wrote: >> I know about Oracle, but have not yet managed to setup DBI-Link. > > Try it again :) > http://pgfoundry.org/projects/dbi-link/ I will try again when the need arises and/or when I find time :^) >> NLS_LANG need to be set in the environment of the process using >> the Oracle

Re: [GENERAL] password cookie

2006-10-27 Thread Willy-Bas Loos
I just learned to read, sorry.You mean not to do the second thing, which i do want to do (where each frontend user equals a database user).Thank you for your advise.I´m not sure if i can get around it, but i´ll use extra caution anayway. WBLOn 10/27/06, Willy-Bas Loos <[EMAIL PROTECTED]> wrote: > M