Re: [GENERAL] Clustering with minimal locking

2008-06-17 Thread Decibel!
On Jun 17, 2008, at 11:37 AM, Scott Ribe wrote: BOOM! Deadlock. No more likely than with the current cluster command. Acquiring the lock is the same risk; but it is held for much less time. Actually, no (at least in 8.2). CLUSTER grabs an exclusive lock before it does any work meaning t

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Giorgio Valoti
On 18/giu/08, at 03:04, Michael Fuhr wrote: On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. What's the exact error message? I have set lc_monetary to "lc_monetary = 'en_GB.UTF-8'" in postgresq

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Garry Saddington
On Wednesday 18 June 2008 02:04, Michael Fuhr wrote: > On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: > > I am getting illegal UTF8 encoding errors and I have traced it to the £ > > sign. > > What's the exact error message? > > > I have set lc_monetary to "lc_monetary = 'en_GB.UT

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Craig Ringer
Klint Gore wrote: > Rich Shepard wrote: >>Despite trying to be careful, I managed to mess up the upgrade from >> -8.1.4 >> to -8.3.3 on my Slackware-11.0 server/workstation. I expect that someone >> here will see my error and point me in the right direction to recover a >> working dbms. >> >>

Re: [GENERAL] postgres-devel for 8.3.3

2008-06-17 Thread Tom Lane
Graeme Gemmill <[EMAIL PROTECTED]> writes: > I've downloaded v8.3.3 and successfully installed it. I now have to > configure/make/install an application that will use PostgreSQL, and > think I need the postgresql-devel that corresponds to 8.3.3. Can someone > point me to where it is please? Er

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Klint Gore
Rich Shepard wrote: On Wed, 18 Jun 2008, Klint Gore wrote: >>5.) Built postgresql-8.3.3 using the SlackBuild script, then ran >> 'upgradepkg postgresql-8.3.3*tgz'; other than reporting not finding an >> expected pid file, that went smoothly. >> > Is there an initdb in here somewhere? Or is

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Adrian Klaver
On Tuesday 17 June 2008 7:18 pm, Rich Shepard wrote: > On Wed, 18 Jun 2008, Klint Gore wrote: > >>5.) Built postgresql-8.3.3 using the SlackBuild script, then ran > >> 'upgradepkg postgresql-8.3.3*tgz'; other than reporting not finding an > >> expected pid file, that went smoothly. > > > > Is t

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Rich Shepard
On Wed, 18 Jun 2008, Klint Gore wrote: 5.) Built postgresql-8.3.3 using the SlackBuild script, then ran 'upgradepkg postgresql-8.3.3*tgz'; other than reporting not finding an expected pid file, that went smoothly. Is there an initdb in here somewhere? Or is the 8.3 server trying to start w

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Rich Shepard
On Wed, 18 Jun 2008, Klint Gore wrote: You copied the files without stopping the database? move 4 to 2. Klint, Yes, actually. There was no activity on any of the databases. Is there an initdb in here somewhere? Or is the 8.3 server trying to start with an 8.1 file structure? Ah, yes

[GENERAL] Forcibly vacating locks

2008-06-17 Thread Laurent Birtz
Hello, I am using Postgres in a high-availability environment and I'd like to know whether Postgres has provisions to kick off a misbehaving client that has obtained an advisory lock on the database and won't release it in a timely fashion. I am not worried about malicious clients, however I am c

Re: [GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Klint Gore
Rich Shepard wrote: Despite trying to be careful, I managed to mess up the upgrade from -8.1.4 to -8.3.3 on my Slackware-11.0 server/workstation. I expect that someone here will see my error and point me in the right direction to recover a working dbms. Here's what I did: 1.) As a user

Re: [GENERAL] UTF8 encoding problem

2008-06-17 Thread Michael Fuhr
On Tue, Jun 17, 2008 at 10:48:34PM +0100, Garry Saddington wrote: > I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. What's the exact error message? > I have set lc_monetary to "lc_monetary = 'en_GB.UTF-8'" in postgresql.conf > but > this has no effect. How can I so

[GENERAL] Need Help Recovering from Botched Upgrade Attempt

2008-06-17 Thread Rich Shepard
Despite trying to be careful, I managed to mess up the upgrade from -8.1.4 to -8.3.3 on my Slackware-11.0 server/workstation. I expect that someone here will see my error and point me in the right direction to recover a working dbms. Here's what I did: 1.) As a user, I ran pg_dumpall on ve

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Klint Gore
Michael Shulman wrote: On Tue, Jun 17, 2008 at 3:46 AM, Klint Gore <[EMAIL PROTECTED]> wrote: The only way I could find to make this work is to use a rule and wrap the inner "insert returning" in a function. Thanks, this works! Although it feels like something of a hack; shouldn't the

[GENERAL] postgres-devel for 8.3.3

2008-06-17 Thread Graeme Gemmill
I've downloaded v8.3.3 and successfully installed it. I now have to configure/make/install an application that will use PostgreSQL, and think I need the postgresql-devel that corresponds to 8.3.3. Can someone point me to where it is please? Running Mandriva 2008.0, I've found I could have insta

Re: [GENERAL] PostgreSQL and AMD?

2008-06-17 Thread Chris Browne
[EMAIL PROTECTED] ("John Tregea") writes: > I have been asked to specify a pair of HP PC's to set up a > PostGreSQL server (and backup) for a client. The HP model we are > looking at has an AMD Phenomâ,,¢ Quad Core Processor (9600B). The > machines would be running Windows XP Pro (our clients > req

[GENERAL] UTF8 encoding problem

2008-06-17 Thread Garry Saddington
I am getting illegal UTF8 encoding errors and I have traced it to the £ sign. I have set lc_monetary to "lc_monetary = 'en_GB.UTF-8'" in postgresql.conf but this has no effect. How can I sort this problem? Client_encoding =UTF8. Regards Garry -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Richard Broersma
On Tue, Jun 17, 2008 at 12:34 PM, Michael Shulman <[EMAIL PROTECTED]> wrote: > Would it be possible to actually do something like this in an update > rule? You couldn't write the "begin/commit", but it seems that you > wouldn't need to either, since the UPDATE command invoking the rule > will be w

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Michael Shulman
On Tue, Jun 17, 2008 at 11:50 AM, Richard Broersma <[EMAIL PROTECTED]> wrote: > While your individual update rules are firing for each of your tables > from T1 thru T[n] to change your OLD row to NEW. Another client could > also at the same time be updating any of the other tables before and > aft

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Richard Broersma
On Tue, Jun 17, 2008 at 8:34 AM, Michael Shulman <[EMAIL PROTECTED]> wrote: > Thank you very much for pointing this out! I am somewhat disturbed by > the example in that thread of a "partially executed update" resulting > from the obvious way to write an update rule for a view. I guess I > need

Re: [GENERAL] Clustering with minimal locking

2008-06-17 Thread Scott Ribe
> BOOM! Deadlock. No more likely than with the current cluster command. Acquiring the lock is the same risk; but it is held for much less time. > ...I think what makes a lot > more sense is to have a form of clustering that puts effort into > placing tuples in the correct location. Agreed that w

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Michael Shulman
On Tue, Jun 17, 2008 at 12:24 AM, Richard Broersma <[EMAIL PROTECTED]> wrote: > Anyway, here is a link discussing a generalized vertical partitioned > view. Perhaps it can give you some idea to get yourself rolling. > http://archives.postgresql.org/pgsql-general/2006-12/msg01119.php Thank you ver

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Michael Shulman
On Tue, Jun 17, 2008 at 7:56 AM, Philippe Grégoire <[EMAIL PROTECTED]> wrote: > CREATE RULE studentinro_insert AS ON INSERT TO studentinfo > DO INSTEAD > ( > INSERT INTO person ...; > INSERT INTO student(person_id,...) VALUES > (currval('person_person_id_seq'),...); > ); I initially thought of thi

Re: [GENERAL] problem with to_ascii() function in version 8.3.3

2008-06-17 Thread Pavel Arnošt
> What answer do you get to the following two SQL statements: > > SHOW server_encoding; > SHOW client_encoding; > > Maybe that will help to understand. Hi, both commands shows "UTF8". Changing client encoding with "\encoding LATIN9" does not have any effect on to_ascii command (I don't know if it

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Michael Shulman
On Tue, Jun 17, 2008 at 3:46 AM, Klint Gore <[EMAIL PROTECTED]> wrote: > The only way I could find to make this work is to use a rule and wrap the > inner "insert returning" in a function. Thanks, this works! Although it feels like something of a hack; shouldn't there be a more elegant solution?

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-17 Thread Albe Laurenz
Cyril SCETBON wrote: >>> I get the following error : >>> >>> postgres=# DROP TABLESPACE IF EXISTS my_tbs; >>> ERROR: tablespace "my_tbs" is not empty >>> >>> I've searched in pg_class and I'm not able to find a relation which >>> refers to my_tbs with : >>> >>> postgres=# select * from pg_class w

Re: [GENERAL] [PERFORM] Migration Articles.. ???

2008-06-17 Thread Matthew Wakeling
On Tue, 17 Jun 2008, sathiya psql wrote: I have a database in postgres X.Y which has around 90 tables, and lot of data in it. In the next version of that product, i had some more tables, so how to migrate that,. there may be 150 tables., in that 90 tables, 70 may be the same, 20 got deleted, and

[GENERAL] Migration Articles.. ???

2008-06-17 Thread sathiya psql
Dear All, Am going to do migration of database from one version to another., is there any article or any other document explaining the possibilities and other things. Further Explanation: I have a database in postgres X.Y which has around 90 tables, and lot of data in it. In the next version of

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Philippe Grégoire
Michael, You can try the following: CREATE RULE studentinro_insert AS ON INSERT TO studentinfo DO INSTEAD ( INSERT INTO person ...; INSERT INTO student(person_id,...) VALUES (currval('person_person_id_seq'),...); ); The currval() function gives you the value of the sequence associated to you

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-17 Thread Tom Lane
Cyril SCETBON <[EMAIL PROTECTED]> writes: > I get the following error : > postgres=# DROP TABLESPACE IF EXISTS my_tbs; > ERROR: tablespace "my_tbs" is not empty > I've searched in pg_class and I'm not able to find a relation which > refers to my_tbs with : Maybe there's something in a differen

Re: [GENERAL] Slony-I configuration problem, probably due to custom casts in 8.3

2008-06-17 Thread Markus Wollny
Hi, Sorry for the bother - found this: http://archives.postgresql.org/pgsql-general/2008-03/msg01159.php That seems to solve the problem. Thank you! Kind regards Markus Computec Media AG Sitz der Gesellschaft und Registergericht: Fürth (HRB 8818) Vorstandsmitglieder: Johannes S. Gözalan (

Re: [GENERAL] ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join

2008-06-17 Thread Richard Broersma
On Tue, Jun 17, 2008 at 5:03 AM, m laks <[EMAIL PROTECTED]> wrote: > --- On Tue, 6/17/08, Tommy Gildseth <[EMAIL PROTECTED]> wrote: > 1. Where is this documented, and > 2. where can I read more about what changed > between the 7 series and 8 series that caused this? http://www.postgresql.org/docs

[GENERAL] Slony-I configuration problem, probably due to custom casts in 8.3

2008-06-17 Thread Markus Wollny
Hi I'm trying to get Slony-I up and running; master-db is PostgreSQL 8.3.1, slave is PostgreSQL 8.2.4, Slony-I is 1.2.14 on both machines. This is the DDL for the table I wish to replicate: CREATE TABLE stats.article_impressions_day ( site_id integer NOT NULL, article_id integer NOT NULL, date

Re: [GENERAL] ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join

2008-06-17 Thread Tommy Gildseth
m laks wrote: --- On *Tue, 6/17/08, Tommy Gildseth /<[EMAIL PROTECTED]>/* wrote: F How about something along these lines: delete from instancetable USING imagelevel WHERE ( (imagelevel.serparent= '1.2.840.113704.1.111.4640.1185891989.4') and (instancetable.

Re: [GENERAL] problem with to_ascii() function in version 8.3.3

2008-06-17 Thread Albe Laurenz
Pavel Arnošt wrote: > i have a problem with to_ascii() function in version 8.3.3. I have read Mr. > Gonzales's post at > http://groups.google.com/group/pgsql.general/browse_thread/thread/f74650e3b3248ff0/9f36fb072ea1dc98?lnk=gst&q=to_ascii#9f36fb072ea1dc98 > and he managed to use to_ascii function

Re: [GENERAL] ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join

2008-06-17 Thread m laks
--- On Tue, 6/17/08, Jaime Casanova <[EMAIL PROTECTED]> wrote: maybe the add_missing_from parameter in postgresql.conf is what you need to get some sleep :) it's there for older application like yours Dear Jaime, Tommy's suggestion worked right away. I wanted to understand more of the philiosp

Re: [GENERAL] ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join

2008-06-17 Thread m laks
--- On Tue, 6/17/08, Tommy Gildseth <[EMAIL PROTECTED]> wrote: F How about something along these lines: delete from instancetable USING imagelevel WHERE ( (imagelevel.serparent= '1.2.840.113704.1.111.4640.1185891989.4') and (instancetable.imageuid= imagelevel.sopinsuid) ) Thank You so muc

Re: [GENERAL] Error when trying to drop a tablespace

2008-06-17 Thread Albe Laurenz
Cyril SCETBON wrote: > I get the following error : > > postgres=# DROP TABLESPACE IF EXISTS my_tbs; > ERROR: tablespace "my_tbs" is not empty > > I've searched in pg_class and I'm not able to find a relation which > refers to my_tbs with : > > postgres=# select * from pg_class where reltablesp

Re: [GENERAL] PostgreSQL and AMD?

2008-06-17 Thread John Tregea
Dear Greg, Thanks for your valuable and extensive reply. You were right that it is the HP machine the client is wanting, I did also find a configuration that has a Quad Core Intel processor and they will probably go with that for continuity with their current hardware. The PostgreSQL database

Re: [GENERAL] inserting to a multi-table view

2008-06-17 Thread Klint Gore
Michael Shulman wrote: On Mon, Jun 16, 2008 at 10:03 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote: I can write a trigger function that does the right thing, with 'INSERT ... RETURNING person_id INTO ...', but Postgres will not let me add an INSERT trigger to a view; it says 'ERROR: "studentinf

[GENERAL] Sequences

2008-06-17 Thread Oscar Uribe
Hi, I need to do something with a sequence. This is the example: CREATE TABLE TABLE1( PRIMARY1 INTEGER NOT NULL, OTHER1 VARCHAR (20) NOT NULL, CONSTRAINT "MYPK1" PRIMARY KEY (PRIMARY1) ); CREATE SEQUENCE "SEQ_1" INCREMENT BY 1 MINVALUE 1 NO MAXVALUE START WITH 1 CACHE 1 NO CYCLE

[GENERAL] Error when trying to drop a tablespace

2008-06-17 Thread Cyril SCETBON
Hi guys, I get the following error : postgres=# DROP TABLESPACE IF EXISTS my_tbs; ERROR: tablespace "my_tbs" is not empty I've searched in pg_class and I'm not able to find a relation which refers to my_tbs with : postgres=# select * from pg_class where reltablespace=100456; relname | relna

[GENERAL] problem with to_ascii() function in version 8.3.3

2008-06-17 Thread Pavel Arnošt
Hi, i have a problem with to_ascii() function in version 8.3.3. I have read Mr. Gonzales's post at http://groups.google.com/group/pgsql.general/browse_thread/thread/f74650e3b3248ff0/9f36fb072ea1dc98?lnk=gst&q=to_ascii#9f36fb072ea1dc98 and he managed to use to_ascii function with following command

Re: [GENERAL] Win32 8.3.3 install fail (sufficient privileges to install system services).

2008-06-17 Thread Michael Orechoff
I have the same problem. I use postgres83 as the login for the service. The way I get around it is I delete the "InstallServices" row from the MSI file using ORCA. This has always worked. I made the assumption the service is just fine and needs no changes. I am not sure if deleting the service wo