Re: [GENERAL] Upgrading from 8.0 to 8.1 on Debian

2005-11-18 Thread Oliver Elphick
On Fri, 2005-11-18 at 13:49 -0700, Assad Jarrahian wrote: > Hi All, > I am a bit stumped. So I have a couple of Postgresql versions on my > server, namely 8.0 and 8.1 (using Debian package manager). I am trying > to get 8.1 to be the default database and delete 8.0 > > I used pg_dump to dump my

Re: [GENERAL] Postgres Disconnection problems

2005-11-18 Thread Tom Lane
"Otto Blomqvist" <[EMAIL PROTECTED]> writes: > So far so good. Problem is that the postmaster does not detect this > connection as dead and keeps it idle for an unknown amount of time. This is > a real problem for us because we use persistent connections to authorize > access to a custom built 6803

Re: [GENERAL] DISTINCT ON

2005-11-18 Thread Jeremy Palmer
Sorry I posted this to the wrong list. I have now reposted this is pgsql-sql. -Original Message- From: Jeremy Palmer [mailto:[EMAIL PROTECTED] Sent: Saturday, 19 November 2005 11:05 a.m. To: 'pgsql-general@postgresql.org' Subject: DISTINCT ON Hi, I have a table: observation ( id in

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-18 Thread Scott Ribe
>> sponsorship of community members and projects; This would be good. But frankly, if they never sponsor nor contribute a single line of code, the fact that *Sun* is now offering paid support for Postgres is a *huge* boost. From now on, when a company wants to know whether there are major firms su

Re: [GENERAL] Why CALL/PERFORM not part of core SQL?

2005-11-18 Thread Guy Rouillier
Jaime Casanova wrote: > On 11/18/05, Guy Rouillier <[EMAIL PROTECTED]> wrote: >> Short version of story: I'm converting some Java->Oracle code to PG. >> It uses the standard JDBC batch facility, which is simply a >> collection of statements sent to the server as a group. Because >> batches are exe

Re: [GENERAL] Anomalies with the now() function

2005-11-18 Thread Andreas Seltenreich
Byrne Kevin-kbyrne writes: > I have a trigger set up on a db - when a row is added to a certain > table (say Table A) in my db the trigger calls a function and then the > function enters another line in a related table (say Table B). Here's > the problem, the first addition to Table A may show the

Re: [GENERAL] plperlu Question

2005-11-18 Thread Douglas McNaught
[EMAIL PROTECTED] writes: > However, when I run the function within psql, still as the postgres superuser, > I get a 'permission denied' response to the perl 'open(DATA, "my_csv_file") > within my 'import()' function. > > The csv file is world readable as I have moved it to /tmp and given the worl

[GENERAL] Postgres Disconnection problems

2005-11-18 Thread Otto Blomqvist
Hi, We are using PostgresDAC 2.2.1 and PostgreSQL 8.0.2 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 4.0.0 20050412 (Red Hat 4.0.0-0.42). I perform a simple test as follows. 1. I connect to the database, which is located on a LAN. 2. I simulate Internet problems by unpl

[GENERAL] Createlang plpgsql

2005-11-18 Thread Jeremy Sellors
Hi, How can I 'createlang plpgsql database' on a shared server? on my ouwn machine I just used 'su postgres' and 'createlang plpgsql template1' but I need to have plpgsql available on a shared server.Kind Regards,Jeremy Sellors

Re: [GENERAL] Upgrading from 8.0 to 8.1 on Debian

2005-11-18 Thread Stephen Frost
* Assad Jarrahian ([EMAIL PROTECTED]) wrote: > [EMAIL PROTECTED]:/etc/postgresql-common$ sudo pg_upgradecluster 8.0 main > Error: target cluster 8.1/main already exists This is complaining that you already did an initdb on the 8.1 version, I believe. > What would be the step by step process in th

[GENERAL] DISTINCT ON

2005-11-18 Thread Jeremy Palmer
Hi, I have a table: observation ( id int4 NOT NULL [PRIMARY KEY], vector_id NOT NULL [FORGIEN KEY], obs_type VARCHAR(4) NOT NULL, date TIMESTAMP NULL ) I need to select the newest observation id, classify by type, for each vector (there can be multiple observation ids on each vector)

[GENERAL] implicit index created, do I need to also create an explicit index?

2005-11-18 Thread Mark Harrison
So I create a table with unique fields, and it creates an implicit index. 1. This is a general purpose index, correct? I.e. not used solely for ensuring uniqueness, so I don't need to create another index on the same field explicitly, right? 2. What are the implications of creating an

[GENERAL] Upgrading from 8.0 to 8.1 on Debian

2005-11-18 Thread Assad Jarrahian
Hi All, I am a bit stumped. So I have a couple of Postgresql versions on my server, namely 8.0 and 8.1 (using Debian package manager). I am trying to get 8.1 to be the default database and delete 8.0 I used pg_dump to dump my db's into a file (Question: Where do I dump the data of the tables in

Re: [GENERAL] trigger

2005-11-18 Thread Richard Huxton
Aftab Alam wrote: Hello, I want to create a trigger in PostgresSQL In trigger, Before inserting the record, if data is already in the table, the trigger fire the mesaage that data is already there, and after that trigger ckeck for next insert statement. Aftab - can you explain in some more de

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-18 Thread Vivek Khera
On Nov 17, 2005, at 4:44 PM, Robby Russell wrote: Sort of a meta-approach for Rails-based scaffolding generator. Not required, but it'll speed up the process and limit the number of chars that you can stick into a text field opposed to a text area. Yet again you see RoR compensating for lack

Re: [GENERAL] How to debug a locked backend ?

2005-11-18 Thread Csaba Nagy
> Well, I've had time to read your previous message too. > > The first time you seem to imply the machine slowed down across all > processes - ssh etc. Was that the case this time? OK, the slowdown/crash was a different problem, which might have been caused by a "too many files open" problem co

Re: [GENERAL] How to debug a locked backend ?

2005-11-18 Thread Csaba Nagy
Richar, Martijn, Thanks for answering, but I had to kill the process in the meantime. I tried kill -11 in the hope it will produce a core dump at least, but it either didn't dump core or I don't know where to look for it as I can't find it. In any case, this is the second time I experience such a

Re: [GENERAL] trigger

2005-11-18 Thread Stefan Balzter
Aftab Alam schrieb: I want to create a trigger in PostgresSQL In trigger, Before inserting the record, if data is already in the table, the trigger fire the mesaage that data is already there, and after that trigger ckeck for next insert statement. You write a function that returns the type

Re: [GENERAL] How to debug a locked backend ?

2005-11-18 Thread Tom Lane
Csaba Nagy <[EMAIL PROTECTED]> writes: > I have right now a locked backend, similar to what I had a few days ago. > It won't answer to pg_cancel_backend. > Is there a way to diagnoze what it is actually doing ? > If you answer, please do it quickly as in max 15 minutes I'll kill -9 > ... This pos

[GENERAL] shorter way to get new value of serial?

2005-11-18 Thread Harald Armin Massa
I have a table:CREATE TABLE rechner(  id_r int4 NOT NULL DEFAULT nextval('rechner_id_r_seq'::regclass),  name text,  CONSTRAINT rechner_pkey PRIMARY KEY (id_r)) CREATE UNIQUE INDEX rechner_name   ON rechner  USING btree  (name);and want to have the existing or new id of 'newobjekt'CREATE OR REPLACE

[GENERAL] Anomalies with the now() function

2005-11-18 Thread Byrne Kevin-kbyrne01
I have a trigger set up on a db - when a row is added to a certain table (say Table A) in my db the trigger calls a function and then the function enters another line in a related table (say Table B). Here's the problem, the first addition to Table A may show the time of the addition as, for exa

[GENERAL] plperlu Question

2005-11-18 Thread jbduffy
Hi I have a database 'testdatabase' which is owned by a non-superuser. I want to write a 'plperlu' function, 'import()', to process and import csv files into the database. I understand that as an un-trusted language 'plperlu' functions can only be created by a superuser, so my strategy has been a

Re: [GENERAL] Rebranding PostgreSQL

2005-11-18 Thread Richard_D_Levine
[EMAIL PROTECTED] wrote on 11/17/2005 12:33:11 PM: > On Wed, Nov 16, 2005 at 02:19:28PM -0500, Vivek Khera wrote: > > On Nov 16, 2005, at 1:09 PM, <[EMAIL PROTECTED]> > > <[EMAIL PROTECTED]> wrote: > > > > >There are a few obstinate anti-open source customers though, that > > >prevent my plan fr

Re: [GENERAL] How to debug a locked backend ?

2005-11-18 Thread Richard Huxton
Csaba Nagy wrote: Hi all, I have right now a locked backend, similar to what I had a few days ago. It won't answer to pg_cancel_backend. Is there a way to diagnoze what it is actually doing ? If you answer, please do it quickly as in max 15 minutes I'll kill -9 Have you tried "strace -p " to

Re: [GENERAL] How to debug a locked backend ?

2005-11-18 Thread A.j. Langereis
First of all: "TIP 2: Don't 'kill -9' the postmaster" On topic: What do you mean with "locked"? Is it using 100% CPU? Or does it give any error messages? If so, what are they? If there is a deadlock situation, Postmaster should detect it and will then cancel the query. Yours, Aarjan - Origin

Re: [GENERAL] How to debug a locked backend ?

2005-11-18 Thread Martijn van Oosterhout
Attach with gdb: gdb -p [pid] You may need to specify the the executable on some platforms. On Fri, Nov 18, 2005 at 12:13:00PM +0100, Csaba Nagy wrote: > Hi all, > > I have right now a locked backend, similar to what I had a few days ago. > It won't answer to pg_cancel_backend. > Is there a way

[GENERAL] to Jerry LeVan

2005-11-18 Thread David Rysdam
I got your email about pgbrowse and it has guided me well to using cursors from pgtcl. Thanks! I might have a question or two--do you have an email address that DNS can resolve? ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-18 Thread Neil Conway
On Fri, 2005-11-18 at 11:00 +0100, Wolfgang Keller wrote: > Given the focus of Sun on fault-tolerance etc., one of THE projects > that they should definitely sponsor is > http://gborg.postgresql.org/project/pgreplication/projdisplay.php AFAIK pgreplication is no longer active. However, the Slony

[GENERAL] trigger

2005-11-18 Thread Aftab Alam
Hello, I want to create a trigger in PostgresSQL In trigger, Before inserting the record, if data is already in the table, the trigger fire the mesaage that data is already there, and after that trigger ckeck for next insert statement. Pleae help me in this regard , kindly  reply. Regards

[GENERAL] How to debug a locked backend ?

2005-11-18 Thread Csaba Nagy
Hi all, I have right now a locked backend, similar to what I had a few days ago. It won't answer to pg_cancel_backend. Is there a way to diagnoze what it is actually doing ? If you answer, please do it quickly as in max 15 minutes I'll kill -9 ... Thanks, Csaba. ---(en

Re: [GENERAL] Sun supporting PostgreSQL

2005-11-18 Thread Wolfgang Keller
Sun's support for PostgreSQL will involve: *snip* sponsorship of community members and projects; Given the focus of Sun on fault-tolerance etc., one of THE projects that they should definitely sponsor is http://gborg.postgresql.org/project/pgreplication/projdisplay.php Sincerely, Wolfga

[GENERAL] Why CALL/PERFORM not part of core SQL?

2005-11-18 Thread Guy Rouillier
Short version of story: I'm converting some Java->Oracle code to PG. It uses the standard JDBC batch facility, which is simply a collection of statements sent to the server as a group. Because batches are executed as a group, the individual statements in them are forbidden from returning values.