Re: [GENERAL] Anything I can do to speed up this query?

2006-12-07 Thread Ragnar
[ Marcus, you should folow up to the lists, so that other people can benefit from the discussion ] On fim, 2006-12-07 at 09:25 +0100, Marcus Engene wrote: > Ragnar skrev: > > On mið, 2006-12-06 at 17:34 -0500, Wei Weng wrote: > >> On Tue, 2006-12-05 at 15:56 -0500, Wei Weng wrote: > >>> I have a

Re: [GENERAL] how to install 8.2 with yum on centos 4?

2006-12-07 Thread Devrim GUNDUZ
Hi, On Wed, 2006-12-06 at 23:32 -0800, [EMAIL PROTECTED] wrote: > I got installed on my windows box and my debian box. But is there a way > to install 8.2 on centos 4 using yum? I am about to create a yum repo for PGDG RPM sets. Clodoaldo Pinto Neto sent me the instructions on how to create

Re: [GENERAL] From Clause

2006-12-07 Thread Alban Hertroys
Bob Pawley wrote: > I am receiving an error message about a missing "From Clause" in an > insert statement. > > I've tried a number of variations of adding a from clause with no success. > > Could someone help with the following statement?? > > Insert Into p_id.loop_sequence (monitor) value

[GENERAL] Cast boolean to text

2006-12-07 Thread Willy-Bas Loos
Hi, I've noticed that postgresql 8.1.0 can cast a boolean to text, but version 8.1.5 CAN'T. Is this a bug or a feature? as proof, try to run this query: select 't'::bool::text On version 8.1.5 one will recieve the error message "can't convert boolean to text".

Re: [GENERAL] dynamic SQL - variable substitution in plpgsql

2006-12-07 Thread Alban Hertroys
km wrote: > Hi all, > > i could not do variable substitution in plpgsql procedure. > The variable names are taken as it is but not substituted in the SQL query. > what could be the problem ? Does this example even compile? I doubt that... > code looks like this: > --

[GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, I need to call date_part() from a C function. How to do that? Thanks in advance, Zoltán Böszörményi ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] Uninstall pg_trgm

2006-12-07 Thread Henrik Zagerholm
Simple question: How do I uninstall pg_trgm? I can't seem to find a uninstall sql script for it like uninstall_tsearch2.sql. Regards, Henrik ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.po

Re: [GENERAL] Problems connecting to server

2006-12-07 Thread Shoaib Mir
Make sure the database server machine is up and running, if it is then check for the firewall setting that if the IP table entries are good or not Hope this helps... Thank you, Shoaib On 12/7/06, Scott Marlowe <[EMAIL PROTECTED]> wrote: On Wed, 2006-12-06 at 14:48, Curtis Braly wrote: > I re

Re: SOLVED [GENERAL] Uninstall pg_trgm

2006-12-07 Thread Henrik Zagerholm
I found an uninstall script in the svn repos... cheers, 7 dec 2006 kl. 10:21 skrev Henrik Zagerholm: Simple question: How do I uninstall pg_trgm? I can't seem to find a uninstall sql script for it like uninstall_tsearch2.sql. Regards, Henrik ---(end of broadcast

[GENERAL] pg_dump/pg_Restore 8.1.5 db -> 8.2 tsearch2 problem

2006-12-07 Thread Henrik Zagerholm
Hi list, I've downloaded and compiled the new 8.2 to a new debian box. I also compile and installed tsearch2 support. Now I have a db on a 8.1.5 box with tsearch2 support. How do a dump and restore my database to the new 8.2 box? I get all kinds of errors when trying to restore the db. Should

Re: [GENERAL] Cast boolean to text

2006-12-07 Thread Shoaib Mir
You can create a custome cast for this purpose that can convert bool to text... Regards, Shoaib On 12/7/06, Willy-Bas Loos <[EMAIL PROTECTED]> wrote: Hi, I've noticed that postgresql 8.1.0 can cast a boolean to text, but version 8.1.5 CAN'T. Is this a bug or a feature? as proof, try to run

[GENERAL] Asynchronous replication of a PostgreSQL DB to a MySQL target

2006-12-07 Thread Markus Wollny
Hi! I'd like to export schema and data from a PostgreSQL database to a remote MySQL database; any changes to the PG-master should be reflected on the MySQL target in a matter of a few minutes to one hour max. Has anybody done something like this before? Here's some more background: We've got an

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Martijn van Oosterhout
On Thu, Dec 07, 2006 at 09:48:25AM +0100, Zoltan Boszormenyi wrote: > Hi, > > I need to call date_part() from a C function. > How to do that? Look in fmgr.h for the functions {Oid,Direct,}FunctionCall* which provide various ways to call other functions. There's also FunctionCallInvoke() which is

Re: [GENERAL] pg_dump/pg_Restore 8.1.5 db -> 8.2 tsearch2 problem

2006-12-07 Thread Gregory S. Williamson
Henrik -- I have only dabbled in tsearch2 so I can'toffer direct advise, but this looks like the problem when upgrading the postGIS stuff ... tsearch2 might have an upgrade functionality (postGIS does), but you can also do a more lbaorious method that strips out the unwanted tsearch2 definition

Re: [GENERAL] pg_dump/pg_Restore 8.1.5 db -> 8.2 tsearch2 problem

2006-12-07 Thread Henrik Zagerholm
Thanks for the info! So its that easy, huh? =) I found a solution that worked but I don't know the effects yet. =) I noticed that it complained a lot about snb_ru_init function which apparently is not present in the new tsearch2.so file. So I removed the SP snb_ru_init() from my old database

Re: [GENERAL] DBI module for postgres 1.4.3

2006-12-07 Thread Albe Laurenz
Jasbinder Singh Bali wrote: >>> Trying to connect to it throught perl code. >>> Just wondering if DBI would be the best tool to use to >>> accomplish this task. >>> Which version of DBI should I be using. >>> I mean if any one of you could give me exact pointers to it, >>> would be highly apprecia

[GENERAL] Tsearch2 / PG 8.2 Which stemmer files?

2006-12-07 Thread Hannes Dorbath
Which stemmer files is one supposed to use with 8.2 Tsearch2? Trying to compile the output from Gendict with: stem_UTF_8_german.c stem_UTF_8_german.h from: http://snowball.tartarus.org/dist/libstemmer_c.tgz gives: http://hannes.imos.net/make.txt Thanks! -- Regards, Hannes Dorbath --

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 09:48:25AM +0100, Zoltan Boszormenyi wrote: Hi, I need to call date_part() from a C function. How to do that? Look in fmgr.h for the functions {Oid,Direct,}FunctionCall* which provide various ways to call other functions. Ther

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Martijn van Oosterhout
On Thu, Dec 07, 2006 at 12:55:47PM +0100, Zoltan Boszormenyi wrote: > However, I have another problem. I have this in the code: >yeardatum = CStringGetDatum("year"); >elog(NOTICE, "CStringGetDatum() 1 OK"); >returndatum = DirectFunctionCall2(timestamp_part, yeardatum,

Re: [GENERAL] Tsearch2 / PG 8.2 Which stemmer files?

2006-12-07 Thread Hannes Dorbath
On 07.12.2006 12:42, Hannes Dorbath wrote: Which stemmer files is one supposed to use with 8.2 Tsearch2? Found an answer myself. Seems I need: http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/tsearch_snowball_82.gz -- Regards, Hannes Dorbath ---(end of broadcas

Re: [GENERAL] Online index builds

2006-12-07 Thread Ragnar
On mið, 2006-12-06 at 18:22 -0800, Jeff Davis wrote: > On Wed, 2006-12-06 at 15:00 -0500, Chris Browne wrote: > > Let me add another question to this; this might possibly be worthy of > > a TODO for 8.3 or so... > > > > What if I wanted to: > > ALTER TABLE distributors ADD PRIMARY KEY CONCURRE

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 12:55:47PM +0100, Zoltan Boszormenyi wrote: However, I have another problem. I have this in the code: yeardatum = CStringGetDatum("year"); elog(NOTICE, "CStringGetDatum() 1 OK"); returndatum = DirectFuncti

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Martijn van Oosterhout
On Thu, Dec 07, 2006 at 01:40:22PM +0100, Zoltan Boszormenyi wrote: > text_in() doesn't exists, it's textin() but I have to call it through > DirectFunctionCall1(), like this: > > yeardatum = DirectFunctionCall1(textin, CStringGetDatum("year")); > > However, the session crashes on the subsequent

Re: [GENERAL] Tsearch2 / PG 8.2 Which stemmer files?

2006-12-07 Thread Oleg Bartunov
Hannes, please download patch tsearch_snowball_82.gz http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ which updates API to snowball. Oleg On Thu, 7 Dec 2006, Hannes Dorbath wrote: Which stemmer files is one supposed to use with 8.2 Tsearch2? Trying to compile the output from Gendict wi

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Bill Moran
In response to Christopher Browne <[EMAIL PROTECTED]>: > Oops! [EMAIL PROTECTED] (Cornelia Boenigk) was seen spray-painting on a wall: > > Hi all > > > > If I have a running transaction in database1 and try to vacuum > > database2 but the dead tuples in database2 cannot be removed. > > > > INFO: v

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Alvaro Herrera
Bill Moran wrote: > In response to Christopher Browne <[EMAIL PROTECTED]>: > > Oops! [EMAIL PROTECTED] (Cornelia Boenigk) was seen spray-painting on a > > wall: > > > Hi all > > > > > > If I have a running transaction in database1 and try to vacuum > > > database2 but the dead tuples in database2

Re: [GENERAL] Tsearch2 / PG 8.2 Which stemmer files?

2006-12-07 Thread Hannes Dorbath
Thank you Oleg. I have a bit more trouble migrating from 8.1.5 TSearch2 + Gin/UTF-8 to PG 8.2. First I tried to use existing dict and affix files, which triggered that oldFormat condition. So I tried to start from scratch. The thing I can't get to work is compound word support for German aga

Re: [GENERAL] Why does explain differ from explan analyze?

2006-12-07 Thread Joost Kraaijeveld
Hi Tom, On Wed, 2006-12-06 at 14:48 -0500, Tom Lane wrote: > Joost Kraaijeveld <[EMAIL PROTECTED]> writes: > > I have a query that if I do "explain" shows an other plan than if I do > > "explain analyze" with that same query (immediately after the explain). > > Really? What PG version is this?

[GENERAL] partition insert question

2006-12-07 Thread Marc Evans
Hello - I find myself trying to find a way to have the table name used with the insert command be generated on the fly in a rule. For example, consider the following: create table foobars ( id bigserial, created_at timestamp not null, name ); create table foobars_200612 ( check (crea

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Bill Moran
In response to Alvaro Herrera <[EMAIL PROTECTED]>: > Bill Moran wrote: > > In response to Christopher Browne <[EMAIL PROTECTED]>: > > > Oops! [EMAIL PROTECTED] (Cornelia Boenigk) was seen spray-painting on a > > > wall: > > > > Hi all > > > > > > > > If I have a running transaction in database1 a

[GENERAL] pg_controldata output documentation

2006-12-07 Thread andy rost
Is there any documentation on the output from pg_controldata? Most of it seems intuitive but I would like something definitive on the following lines: Latest checkpoint location: 2F9/B38DE758 Prior checkpoint location:2F9/A3F688F8 Latest checkpoint's REDO location:2F9/

[GENERAL] PostgreSQL 8.2 on IA-64 : 2 regression tests FAILED

2006-12-07 Thread DANTE Alexandra
Hello List, I work on an IA-64 server with Red Hat Enterprise Linux 4 AS, and as the 8.2 release is now available, I try to generate RPM for IA-64. To do that, I downloaded the "postgresql-8.2.0-2PGDG.src.rpm", extracted the ".spec" file and these files : -bash-3.00$ cd SOURCES/ -bash-3.00$ ls

Re: [GENERAL] Why does explain differ from explan analyze?

2006-12-07 Thread Tom Lane
Joost Kraaijeveld <[EMAIL PROTECTED]> writes: > On Wed, 2006-12-06 at 14:48 -0500, Tom Lane wrote: >> Joost Kraaijeveld <[EMAIL PROTECTED]> writes: >>> I have a query that if I do "explain" shows an other plan than if I do >>> "explain analyze" with that same query (immediately after the explain).

Re: [GENERAL] partition insert question

2006-12-07 Thread Marc Evans
On Thu, 7 Dec 2006, Marc Evans wrote: Hello - I find myself trying to find a way to have the table name used with the insert command be generated on the fly in a rule. For example, consider the following: create table foobars ( id bigserial, created_at timestamp not null, name ); creat

Re: [GENERAL] how to install 8.2 with yum on centos 4?

2006-12-07 Thread Matthew O'Connor
Devrim GUNDUZ wrote: On Wed, 2006-12-06 at 23:32 -0800, [EMAIL PROTECTED] wrote: I got installed on my windows box and my debian box. But is there a way to install 8.2 on centos 4 using yum? I am about to create a yum repo for PGDG RPM sets. Clodoaldo Pinto Neto sent me the instructions o

Re: [GENERAL] DBI module for postgres 1.4.3

2006-12-07 Thread AgentM
On Dec 7, 2006, at 6:00 , Albe Laurenz wrote: Jasbinder Singh Bali wrote: Whats the difference between a module and a bundle as i can see while downloading DBI from CPAN website. What exactly needs to be downloaded . I'm kind of not sure about it. I have never heard of a 'bundle' in context

Re: [GENERAL] Cast boolean to text

2006-12-07 Thread Tom Lane
"Willy-Bas Loos" <[EMAIL PROTECTED]> writes: > I've noticed that postgresql 8.1.0 can cast a boolean to text, but version > 8.1.5 CAN'T. Better check again --- there has never been a standard cast from bool to text. Sure you didn't install a custom one in your 8.1.0 database?

[GENERAL] Performance figures from DbMail list

2006-12-07 Thread David Goodenough
The following appeared this afternoon on the DbMail list. As someone replied the MySql used is old, and the newer one is faster, but then 8.2 is faster than the older Postgresql versions. This was posted by:- "Justin McAleer" <[EMAIL PROTECTED]> I figured I would go ahead and toss this out for a

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 01:40:22PM +0100, Zoltan Boszormenyi wrote: text_in() doesn't exists, it's textin() but I have to call it through DirectFunctionCall1(), like this: yeardatum = DirectFunctionCall1(textin, CStringGetDatum("year")); However, the sessio

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Tom Lane
Bill Moran <[EMAIL PROTECTED]> writes: > In response to Alvaro Herrera <[EMAIL PROTECTED]>: >> Of course they are able to complete, but the point is that they would >> not remove the tuples that would be visible to that idle open >> transaction. > I would expect that, but the OP claimed that vacuu

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Ragnar
On fim, 2006-12-07 at 11:28 -0500, Tom Lane wrote: > Bill Moran <[EMAIL PROTECTED]> writes: > > In response to Alvaro Herrera <[EMAIL PROTECTED]>: > >> Of course they are able to complete, but the point is that they would > >> not remove the tuples that would be visible to that idle open > >> trans

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Bill Moran
In response to Tom Lane <[EMAIL PROTECTED]>: > Bill Moran <[EMAIL PROTECTED]> writes: > > In response to Alvaro Herrera <[EMAIL PROTECTED]>: > >> Of course they are able to complete, but the point is that they would > >> not remove the tuples that would be visible to that idle open > >> transactio

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Tom Lane
Bill Moran <[EMAIL PROTECTED]> writes: >> [EMAIL PROTECTED] ~]# ps axw|grep postgres >> 1746 ?S 0:00 postgres: writer process >> 1747 ?S 0:00 postgres: stats buffer process >> 1748 ?S 0:00 postgres: stats collector process >> 2106 pts/1S 0:00 su postg

Re: [GENERAL] Internal function call from C-language function

2006-12-07 Thread Zoltan Boszormenyi
Hi, Zoltan Boszormenyi írta: Hi, Martijn van Oosterhout írta: On Thu, Dec 07, 2006 at 01:40:22PM +0100, Zoltan Boszormenyi wrote: text_in() doesn't exists, it's textin() but I have to call it through DirectFunctionCall1(), like this: yeardatum = DirectFunctionCall1(textin, CStringGetDatum(

Re: [GENERAL] pg_controldata output documentation

2006-12-07 Thread Stephen Harris
On Thu, Dec 07, 2006 at 08:54:22AM -0600, andy rost wrote: > Is there any documentation on the output from pg_controldata? Most of it > seems intuitive but I would like something definitive on the following > lines: > > Latest checkpoint location: 2F9/B38DE758 > Prior checkpoint location:

Re: [GENERAL] Online index builds

2006-12-07 Thread Jeff Davis
On Thu, 2006-12-07 at 12:26 +, Ragnar wrote: > On mið, 2006-12-06 at 18:22 -0800, Jeff Davis wrote: > > On Wed, 2006-12-06 at 15:00 -0500, Chris Browne wrote: > > > Let me add another question to this; this might possibly be worthy of > > > a TODO for 8.3 or so... > > > > > > What if I wanted

Re: [GENERAL] how to install 8.2 with yum on centos 4?

2006-12-07 Thread developer
Excellent, thanks > Hi, > > On Wed, 2006-12-06 at 23:32 -0800, [EMAIL PROTECTED] wrote: >> I got installed on my windows box and my debian box. But is there a >> way >> to install 8.2 on centos 4 using yum? > > I am about to create a yum repo for PGDG RPM sets. Clodoaldo Pinto Neto > sent me th

[GENERAL] Vote for your favorite database

2006-12-07 Thread Tony Caduto
http://linux.inet.hr/poll_favorite_database.html So far Firebird is in the lead :-( -- Tony Caduto AM Software Design http://www.amsoftwaredesign.com Home of PG Lightning Admin for Postgresql Your best bet for Postgresql Administration ---(end of broadcast)---

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Scott Marlowe
On Thu, 2006-12-07 at 11:59, Tony Caduto wrote: > http://linux.inet.hr/poll_favorite_database.html > > So far Firebird is in the lead :-( Somebody just told their list earlier than anyone told us... or mysql's list. And Ingress has... 3 votes. Man, that's gotta hurt. Firebird is a great litt

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Bricklen Anderson
Scott Marlowe wrote: On Thu, 2006-12-07 at 11:59, Tony Caduto wrote: http://linux.inet.hr/poll_favorite_database.html So far Firebird is in the lead :-( Somebody just told their list earlier than anyone told us... or mysql's list. http://archives.postgresql.org/pgsql-general/2006-11/msg000

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Scott Marlowe
On Thu, 2006-12-07 at 12:05, Bricklen Anderson wrote: > Scott Marlowe wrote: > > On Thu, 2006-12-07 at 11:59, Tony Caduto wrote: > >> http://linux.inet.hr/poll_favorite_database.html > >> > >> So far Firebird is in the lead :-( > > > > Somebody just told their list earlier than anyone told us...

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Joshua D. Drake
On Thu, 2006-12-07 at 12:24 -0600, Scott Marlowe wrote: > On Thu, 2006-12-07 at 12:05, Bricklen Anderson wrote: > > Scott Marlowe wrote: > > > On Thu, 2006-12-07 at 11:59, Tony Caduto wrote: > > >> http://linux.inet.hr/poll_favorite_database.html > > >> > > >> So far Firebird is in the lead :-( > >

Re: [GENERAL] Why does explain differ from explan analyze?

2006-12-07 Thread Joost Kraaijeveld
On Thu, 2006-12-07 at 10:20 -0500, Tom Lane wrote: > Well, the answer is that these aren't the same query. For instance You are right. I did not check the report thorough wnought. Sorry. -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Cornelia Boenigk
Hi Sorry, i was out The first try was: create database dummy1; create table dummy ... and filled with 500 records create database dummy2; create table dummy ... and filled with 500 records connecting to dummy1, opening a transaction and issued an update begin; update dummy set f1='achterbah

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Thomas H.
Are there more firebird users in hungary (.hr right?) than postgresql maybe? I wonder. Well it looks like they have a following in Europe in general: Dateline Prague 12-NOV-2006 18:00 GMT The Firebird Project today officially released the much-anticipated version 2.0 of its open source Firebi

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Zoltan Boszormenyi
Scott Marlowe írta: ouch! I stand corrected. Of course, I didn't register to vote either. Are there more firebird users in hungary (.hr right?) than postgresql maybe? I wonder. Then stand a bit longer. :-) Hungary is .hu, .hr is for Hrvatska which is Croatia for English speakers. Best r

Re: [GENERAL] Online index builds

2006-12-07 Thread Ragnar
On fim, 2006-12-07 at 09:27 -0800, Jeff Davis wrote: > On Thu, 2006-12-07 at 12:26 +, Ragnar wrote: > > On mið, 2006-12-06 at 18:22 -0800, Jeff Davis wrote: > > > > > Interesting, I was just thinking about this today as well. I am thinking > > > it would be nice if we could: > > > > > > ALTER

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Ragnar
On fim, 2006-12-07 at 20:04 +0100, Cornelia Boenigk wrote: > Sorry, i was out > > [ snip demonstration of blocked vacuum full] > running on pg 8.1.4 on Fedora 5 could not duplicate this. can you show us the contents of pg_locks and pg_stat_activity while the VACUUM is blocked? gnari ---

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Cornelia Boenigk
Hi Ragnar could not duplicate this. I also cannot reproduce the hanging VACUUM FULL. The problem remains thet the dead tuples cannot be vemoved. dummy1=# vacuum full; VACUUM dummy1=# SELECT relpages, reltuples FROM pg_class WHERE relname ='dummy1'; -[ RECORD 1 ]- relpages | 997 reltupl

[GENERAL] Indexes and Inheritance

2006-12-07 Thread Keary Suska
Thanks to Erik, Jeff, & Richard for their help. I have a further inheritance question: do child tables inherit the indexes created on parent columns, or do they need to be specified separately for each child table? I.e., created via CREATE INDEX. I assume at least that the implicit index created

[GENERAL] tsearch2: pg8.1 to pg8.2

2006-12-07 Thread Rick Schumeyer
I am trying to copy a database that uses tsearch2 from pg8.1 to pg8.2. All I did to install tsearch2 was cd to the contrib/tsearch2 directory, then make, make install. I then dumped the database from pg8.1 and used psql -f filename db to load in into pg8.2. Attempting a query gives an error

Re: [GENERAL] Vote for your favorite database

2006-12-07 Thread Scott Marlowe
On Thu, 2006-12-07 at 13:04, Zoltan Boszormenyi wrote: > Scott Marlowe írta: > > ouch! I stand corrected. Of course, I didn't register to vote either. > > > > Are there more firebird users in hungary (.hr right?) than postgresql > > maybe? I wonder. > > > > Then stand a bit longer. :-) > Hun

Re: [GENERAL] Indexes and Inheritance

2006-12-07 Thread Erik Jones
Keary Suska wrote: Thanks to Erik, Jeff, & Richard for their help. I have a further inheritance question: do child tables inherit the indexes created on parent columns, or do they need to be specified separately for each child table? I.e., created via CREATE INDEX. I assume at least that the im

Re: [GENERAL] Online index builds

2006-12-07 Thread Jeff Davis
On Thu, 2006-12-07 at 20:07 +, Ragnar wrote: > On fim, 2006-12-07 at 09:27 -0800, Jeff Davis wrote: > > On Thu, 2006-12-07 at 12:26 +, Ragnar wrote: > > > On mið, 2006-12-06 at 18:22 -0800, Jeff Davis wrote: > > > > > > > Interesting, I was just thinking about this today as well. I am thin

[GENERAL] The relative stability of different procedural languages

2006-12-07 Thread BigSmoke
I'm facing a particular task for which I need any procedural language but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use local variables such as new and old from a dynamic command. However, I've been unable to find any useful information on the stability of each particular proce

Re: [GENERAL] concatenation operator || with "null" array

2006-12-07 Thread stroncococcus
Ok, solved the problem with COALESCE. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

[GENERAL] concatenation operator || with "null" array

2006-12-07 Thread stroncococcus
Hello! When I try to fill an array with the concatenation operator, like UPDATE test SET myint = myint || ARRAY[123] WHERE id = 1 that before that statement was null, then it is also null after that statement. But if there is already something in that array and I execute that statement, then every

Re: [GENERAL] concatenation operator || with "null" array

2006-12-07 Thread stroncococcus
stroncococcus wrote: > Ok, solved the problem with COALESCE. Hm, I not really solved it ... just solved it for text columns, but not for integer arrays. I can use this for text COALESCE(textcol, '') || 'str ' but how do I use this for integers? Is there a way to create an empty integer array and

[GENERAL] can this be done in one SQL selcet statement?!

2006-12-07 Thread [EMAIL PROTECTED]
I have two table: -Table1: one column of type TEXT containing label for nodes in a graph -Table 2: two columns of type TEXT. first column contains node labels in a graph. second a list of node labels that the node label in column one is connected to. Example: Table1: "NODE1"

[GENERAL] SET statement_timeout

2006-12-07 Thread andy rost
We run VACUUM ANALYZE as a cron job on PostgreSQL v8.1.3 on an Opteron box running FreeBSD 6.0-RELEASE #10. We set statement_timeout to 720 in postgresql.conf. Since this task often takes longer than two hours we encounter the following messages in our log files: 2006-11-30 00:03:31 CST ER

Re: [GENERAL] Restore database from files (not dump files)?

2006-12-07 Thread wheel
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > On Wed, Dec 06, 2006 at 12:16:35PM -0800, wheel wrote: > > re Bruce Momjian > > Wow, what an unfriendly dude! > Well, he's one of the very guys who make all this > (PostgreSQL, that is) happen for us. > > Karsten > Yes I know he's a ma

Re: [GENERAL] The relative stability of different procedural languages

2006-12-07 Thread Merlin Moncure
On 7 Dec 2006 14:02:53 -0800, BigSmoke <[EMAIL PROTECTED]> wrote: I'm facing a particular task for which I need any procedural language but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use local variables such as new and old from a dynamic command. could you clarify what you ar

Re: [GENERAL] The relative stability of different procedural

2006-12-07 Thread Joshua D. Drake
On Thu, 2006-12-07 at 14:02 -0800, BigSmoke wrote: > I'm facing a particular task for which I need any procedural language > but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use > local variables such as new and old from a dynamic command. PLPerl. And I say this as someone who doe

[GENERAL] How to use outer join in update

2006-12-07 Thread Andrus
In my current DBMS I can use create table t1 ( f1 int, f2 int ); create table t2 ( f3 int, f4 int ); update t1 set f1=t2.f3 from t1 left join t2 on t1.f2=t2.f4 This does not work in Postgres. How to convert this statement to Postgres 8.1 ? Andrus. ---(end of broadc

[GENERAL] Help with Update Rule on View - 2nd Attempt

2006-12-07 Thread Lenorovitz, Joel
I tried to post this the other day, but didn't get any responses and never saw it show up in the digest. Here it is again if anyone can offer any insight: I'm trying to create a schema in which there will be simple a view for each table that will have the same columns and can be acted on in the

[GENERAL] loading data, creating indexes, clustering, vacuum...

2006-12-07 Thread Angva
Hi everyone, Looking for a small bit of advice... I have a script that updates several tables with large amounts of data. Before running the updates, it drops all indexes for optimal performance. When the updates have finished, I run the following procedure: recreate the indexes cluster the tabl

Re: [GENERAL] tsearch2: pg8.1 to pg8.2

2006-12-07 Thread Oleg Bartunov
Rick, did you load tsearch2 itself into your database ? Oleg On Thu, 7 Dec 2006, Rick Schumeyer wrote: I am trying to copy a database that uses tsearch2 from pg8.1 to pg8.2. All I did to install tsearch2 was cd to the contrib/tsearch2 directory, then make, make install. I then dumped the d

Re: [GENERAL] The relative stability of different procedural languages

2006-12-07 Thread BigSmoke
On Dec 7, 11:07 pm, [EMAIL PROTECTED] ("Merlin Moncure") wrote: > On 7 Dec 2006 14:02:53 -0800, BigSmoke <[EMAIL PROTECTED]> wrote: > > > I'm facing a particular task for which I need any procedural language > > but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use > > local variabl

Re: [GENERAL] The relative stability of different procedural

2006-12-07 Thread BigSmoke
On Dec 7, 11:11 pm, [EMAIL PROTECTED] ("Joshua D. Drake") wrote: > On Thu, 2006-12-07 at 14:02 -0800, BigSmoke wrote: > > I'm facing a particular task for which I need any procedural language > > but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use > > local variables such as new a

Re: [GENERAL] The relative stability of different procedural languages

2006-12-07 Thread Tony Caduto
BigSmoke wrote: On Dec 7, 11:07 pm, [EMAIL PROTECTED] ("Merlin Moncure") wrote: On 7 Dec 2006 14:02:53 -0800, BigSmoke <[EMAIL PROTECTED]> wrote: I'm facing a particular task for which I need any procedural language but PL/PgSQL. I can't use PL/PgSQL because it doesn't allow me to use

Re: [GENERAL] loading data, creating indexes, clustering, vacuum...

2006-12-07 Thread Alan Hodgson
On Thursday 07 December 2006 08:38, "Angva" <[EMAIL PROTECTED]> wrote: > three commands. For instance I have a hunch that creating the indexes > first (as I do now) could slow down the clustering - perhaps the row > locations in the indexes all have to be updated as the cluster command > shifts the

Re: [GENERAL] VACUUM and transactions in different databases

2006-12-07 Thread Russell Smith
Cornelia Boenigk wrote: Hi Ragnar could not duplicate this. I also cannot reproduce the hanging VACUUM FULL. The problem remains thet the dead tuples cannot be vemoved. [snip] I am interested in this. As one database cannot talk to another database in a transactional way a long running

Re: [GENERAL] Restore database from files (not dump files)?

2006-12-07 Thread Scott Marlowe
On Thu, 2006-12-07 at 02:41, wheel wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] says... > > On Wed, Dec 06, 2006 at 12:16:35PM -0800, wheel wrote: > > > > re Bruce Momjian > > > Wow, what an unfriendly dude! > > Well, he's one of the very guys who make all this > > (PostgreSQL, th

Re: [GENERAL] Indexes and Inheritance

2006-12-07 Thread Tom Lane
Erik Jones <[EMAIL PROTECTED]> writes: > No. In addition, child tables do not inherit primary keys. Think of it > like this: if you did a \d to describe a table that you were going to > use as a parent table in an inheritance chain, the child table would get > everything in the table listing t

Re: [GENERAL] Online index builds

2006-12-07 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > I think all you need to do what you want is something like: > ALTER TABLE foo DROP CONSTRAINT foo_pkey KEEP INDEX; > Because then you could drop the primary key status on a column without > affecting the column or the index, then use my suggested syntax to

Re: [GENERAL] tsearch2: pg8.1 to pg8.2

2006-12-07 Thread Rick Schumeyer
It was my understanding that running pgdump creates a file that contains all the necessary commands to use tsearch2. That approach has worked for me to transfer my database from one pg8.1 server to another. I now see that is does *not* work from pg8.1 to pg8.2. At your suggestion I loaded tsea

Re: [GENERAL] SET statement_timeout

2006-12-07 Thread Tom Lane
andy rost <[EMAIL PROTECTED]> writes: > No big deal. We simply modified the cron job to: > set statement_timeout=0; VACUUM ANALYZE VERBOSE; > Should work, right? > Now we get the following entries in our log files: > 2006-11-30 00:03:31 CST ERROR: canceling statement due to statement timeout > 2

Re: [GENERAL] Online index builds

2006-12-07 Thread Jeff Davis
On Thu, 2006-12-07 at 18:11 -0500, Tom Lane wrote: > Jeff Davis <[EMAIL PROTECTED]> writes: > > I think all you need to do what you want is something like: > > ALTER TABLE foo DROP CONSTRAINT foo_pkey KEEP INDEX; > > > Because then you could drop the primary key status on a column without > > affe

[GENERAL] porting time calcs to PG

2006-12-07 Thread greg
I'm trying to port an MS statement that's a bit involved with timestamps, and I don't see anything in the docs to lead me forward. It's basically a select statement, looking for records with a timestamp within a certain range, where that range is calculated with one of the fields. The WHERE cla

Re: [GENERAL] Online index builds

2006-12-07 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > After reading through the archives, it looks like Gregory Stark > suggested a REINDEX CONCURRENTLY, which would certainly solve the > awkwardness of maintenance on a primary key. I didn't see much > objection, maybe it's worth consideration for 8.3? That id

Re: [GENERAL] Online index builds

2006-12-07 Thread Ragnar
On fim, 2006-12-07 at 13:57 -0800, Jeff Davis wrote: > On Thu, 2006-12-07 at 20:07 +, Ragnar wrote: > > On fim, 2006-12-07 at 09:27 -0800, Jeff Davis wrote: > > > On Thu, 2006-12-07 at 12:26 +, Ragnar wrote: > > > > On mið, 2006-12-06 at 18:22 -0800, Jeff Davis wrote: > > > > > > > > > Int

Re: [GENERAL] porting time calcs to PG

2006-12-07 Thread Bricklen Anderson
[EMAIL PROTECTED] wrote: I'm trying to port an MS statement that's a bit involved with timestamps, and I don't see anything in the docs to lead me forward. It's basically a select statement, looking for records with a timestamp within a certain range, where that range is calculated with one of

Re: [GENERAL] Asynchronous replication of a PostgreSQL DB to a

2006-12-07 Thread Jeff Davis
On Thu, 2006-12-07 at 09:56 +0100, Markus Wollny wrote: > My first problem is that the PostgreSQLs schema is not stable, so if I > simply write a couple of jobs to transport the data, I need to alter > these jobs and the MySQL schema whenever there are changes to the PG > schema. The second problem

Re: [GENERAL] Online index builds

2006-12-07 Thread Jeff Davis
On Thu, 2006-12-07 at 18:51 -0500, Tom Lane wrote: > Jeff Davis <[EMAIL PROTECTED]> writes: > > After reading through the archives, it looks like Gregory Stark > > suggested a REINDEX CONCURRENTLY, which would certainly solve the > > awkwardness of maintenance on a primary key. I didn't see much >

Re: [GENERAL] Online index builds

2006-12-07 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > I don't understand. CREATE INDEX CONCURRENTLY can't be run in a > transaction block anyway, so a REINDEX CONCURRENTLY wouldn't either. So > how (or when) would you deadlock? The problem is you need to upgrade from a nonexclusive table lock to an exclusive o

Re: [GENERAL] Online index builds

2006-12-07 Thread Jeff Davis
On Thu, 2006-12-07 at 19:44 -0500, Tom Lane wrote: > Jeff Davis <[EMAIL PROTECTED]> writes: > > I don't understand. CREATE INDEX CONCURRENTLY can't be run in a > > transaction block anyway, so a REINDEX CONCURRENTLY wouldn't either. So > > how (or when) would you deadlock? > > The problem is you n

Re: [GENERAL] Restore database from files (not dump files)?

2006-12-07 Thread Scott Ribe
Uh, do you have the entier /data directory tree? If so, just restore the directory start it up a binary. >>> >>> Yes I have the entire dir/file set. But what does "If so, just restore >>> the directory start it up a binary" mean? Restore the dir, you mean copy >>> it to it's

Re: [GENERAL] Cast boolean to text

2006-12-07 Thread Shoaib Mir
You can create a cast like this: *create or replace function bool_to_text (boolean) returns char strict language sql as ' select case when $1 then \'t\' else \'f\' end; '; create cast (boolean as char(1)) with function bool_to_text(boolean) as implicit;

[GENERAL] pg_log missing

2006-12-07 Thread Ashish Karalkar
Hello all, I have build 8.2 version from source code on redhat linux 4.0 but i am not able to figure out why directory pg_log is missing... and as it is missing then where are the log file.' can anybody help.. Thanks & Regards Ashish Karalkar

Re: [GENERAL] pg_log missing

2006-12-07 Thread Tom Lane
Ashish Karalkar <[EMAIL PROTECTED]> writes: > I have build 8.2 version from source code on redhat linux 4.0 but i am > not able to figure out why directory pg_log is missing... It sounds like you are expecting the source distribution to have the same default logging setup that the RPMs use. T'ain

  1   2   >