Re: [GENERAL] the future of pljava development

2007-05-24 Thread Marek Lewczuk
Thomas Kellerer pisze: Marek Lewczuk wrote on 23.05.2007 21:37: I would like to know your opinion about pljava and its future I have never used Java-in-the-database with any of the DBMS I have used and I have never understood the reasoning behind it. My personal opinion is, that it's not nee

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Thomas Hallgren
Hi, This sounds great. Sorry for not being responsive on the pgsql-general. I'll read up on this thread during the weekend. Short term, this is what I think needs to be done: 1. Create a PL/Java 1.4 from current CVS. It compiles and runs with PostgreSQL 8.2. 2. Do whatever it takes to make P

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-24 Thread Purusothaman A
Richard Huxton, In my system also its 2048 bytes chunk. The below output shows clearly that the last chunk differs in its length. You might have noticed in my previous mail that the string "\015\012\015\012" is missing some characters in SFRS2, SFRS1 and FASP_AVT database outputs. Have a look a

[GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Jasbinder Singh Bali
Hi I was wondering, apart from extensive procedural language support and being free, what are other major advantages of Postgresql over other major RDBMS like oracle and sql server. Any pointers would be highly appreciated. Thanks, ~Jas

Re: [GENERAL] Get the exeption error description

2007-05-24 Thread Albe Laurenz
> Is there a way to know the error description / message in a > BEGIN END block in a plpgsql functioin as in the 'Appendix A. > PostgreSQL Error Codes' ? The variable SQLERRM as described in http://www.postgresql.org/docs/current/static/plpgsql-control-structures .html#PLPGSQL-ERROR-TRAPPING Y

Re: [GENERAL] OIDs - file objects, are damaged by PostgreSQL.

2007-05-24 Thread Richard Huxton
Purusothaman A wrote: Richard Huxton, In my system also its 2048 bytes chunk. The below output shows clearly that the last chunk differs in its length. You might have noticed in my previous mail that the string "\015\012\015\012" is missing some characters in SFRS2, SFRS1 and FASP_AVT database

Re: [GENERAL] Delete with subquery deleting all records

2007-05-24 Thread Alban Hertroys
Francisco Reyes wrote: > When I try to run: > delete from export_messages where export_id in > (SELECT distinct export_messages.export_id as id > FROM export_messages > LEFT OUTER JOIN exports ON (export_messages.export_id = exports.export_id) > ); Why not use EXISTS? DELETE FROM export_messages

Re: [GENERAL] Tsearch2: upgrading from postgres 8.1.x to 8.2.x

2007-05-24 Thread Philippe Amelant
Le mercredi 23 mai 2007 à 11:08 -0400, Rick Schumeyer a écrit : > I have a database running under pg 8.1.4 that uses tsearch2. I am > upgrading to pg 8.2.4. I dumped the pg 8.1.x database and tried to > install it in pg 8.2.4. This does not seem to work. > Are you using snowball stemmer ? >

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Marek Lewczuk
Thomas Hallgren pisze: Hi, This sounds great. Sorry for not being responsive on the pgsql-general. I'll read up on this thread during the weekend. Short term, this is what I think needs to be done: 1. Create a PL/Java 1.4 from current CVS. It compiles and runs with PostgreSQL 8.2. 2. Do wha

[GENERAL] composite type array and index

2007-05-24 Thread Marek Lewczuk
Hello everyone, it's great to have in next release (8.3) great feature: composite type array. I'm waiting to see how it works, however I wonder whether it will be possible to create an index on a column of composite type array just like we have an index on integer[] column (using gin or intarra

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Tom Allison
You've addressed cost and performance. Not much left. Try it out for yourself and see if it works for you. On May 24, 2007, at 4:06 AM, Jasbinder Singh Bali wrote: Hi I was wondering, apart from extensive procedural language support and being free, what are other major advantages of Postgres

[GENERAL] using bytea vartype non-prepared statements

2007-05-24 Thread Tom Allison
I would like to build a sql statement in perl and execute it without binding parameters if possible. But I also need to use bytea variable type because I'm storing two byte characters (Big5, utf8...) In case of using a varchar and ASCII I would simply write a sql statement like this: INSE

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Richard Huxton
Tom Allison wrote: You've addressed cost and performance. Not much left. Try it out for yourself and see if it works for you. + elephant in logo - unpronounceable name + excellent mailing lists + excellent developer community - you can download as many copies as you like and a salesman still w

Re: [GENERAL] using bytea vartype non-prepared statements

2007-05-24 Thread Richard Huxton
Tom Allison wrote: In order to address this I was using a SQL statement previously where I knew that the number of parameters was only two and I could write the perl to handle this: my $sth = $dbh->prepare("insert into quarantine values (?,?)"); $sth->bind_param(1, $idx); $sth->bind

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-24 Thread Tilmann Singer
* Chuck D. <[EMAIL PROTECTED]> [20070524 01:26]: > 2) I've spent an accumulated total of around a month and a half trying to > consolidate geographic name data from several free sources on the net and > realize this isn't the best use of my time and errors will be had.

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Magnus Hagander
Marek Lewczuk wrote: > I understand that most of PostgreSQL core team aren't fans of Java, > however ignoring this language (most popular programing language) and > developers that uses Java in everyday work is not advisable if we want > to make PostgreSQL more popular. Look at competing RDBMS - Or

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Wiebe Cazemier
On Thursday 24 May 2007 10:06, Jasbinder Singh Bali wrote: > Hi > I was wondering, apart from extensive procedural language support and being > free, > what are other major advantages of Postgresql over other major RDBMS like > oracle and sql server. > > Any pointers would be highly appreciated.

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Marek Lewczuk
Magnus Hagander pisze: Being a fan or not of the language really isn't the issue, and nobody is *ignoring* the language and platform. We all know "the others" have it. And we want it. But the core team (or more importantly in this case, the people doing backend development, which is partially a

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Magnus Hagander
Marek Lewczuk wrote: > Magnus Hagander pisze: >> Being a fan or not of the language really isn't the issue, and nobody is >> *ignoring* the language and platform. We all know "the others" have it. >> And we want it. But the core team (or more importantly in this case, the >> people doing backend de

Re: [GENERAL] Timestamp with time zone: why not?

2007-05-24 Thread Rich Shepard
On Wed, 23 May 2007, [EMAIL PROTECTED] wrote: Would I be right in thinking that, in general, a column to hold timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? If the application's users are in different time zones, o

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Marek Lewczuk
Magnus Hagander pisze: C and the backend you can certainly get help with from the -hackers crowd. You'll have a harder time with the JNI stuff, I assume. Great to hear that - what we need to do now is to sit down (I mean Thomas Hallgren and others) on the pljava code and see where help is need

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-24 Thread btober
> > > > > I don't believe this is good design. You'll have to have a trigger or > > something to verify that the country_id+state_id on the city table are > > exactly equal to the country_id+state_id on the state table. If you > > don't, you might have something like (using US city names...) "cou

Re: [GENERAL] composite type array and index

2007-05-24 Thread Merlin Moncure
On 5/24/07, Marek Lewczuk <[EMAIL PROTECTED]> wrote: Hello everyone, it's great to have in next release (8.3) great feature: composite type array. I'm waiting to see how it works, however I wonder whether it will be possible to create an index on a column of composite type array just like we have

[GENERAL] Very big transaction in a stored procedure : how can i commit in the middle of it ?

2007-05-24 Thread Célestin HELLEU
Hi, I already know that transaction is impossible inside a function, but I think I really need a way to counter this I have a stored procedure in pl/sql that makes about 2 000 000 insert. With the way it works, PostGreSQL il making a unique transaction with all this, resulting so bad perfor

[GENERAL] Very big transaction in a stored procedure : how can i commit in the middle of it ?

2007-05-24 Thread Célestin HELLEU
Hi, I already know that transaction is impossible inside a function, but I think I really need a way to counter this I have a stored procedure in pl/sql that makes about 2 000 000 insert. With the way it works, PostGreSQL il making a unique transaction with all this, resulting so bad perfor

Re: [GENERAL] Very big transaction in a stored procedure : how can i commit in the middle of it ?

2007-05-24 Thread Martijn van Oosterhout
On Thu, May 24, 2007 at 03:59:15PM +0200, Célestin HELLEU wrote: > Hi, > > I already know that transaction is impossible inside a function, but I think > I really need a way to counter this > > I have a stored procedure in pl/sql that makes about 2 000 000 > insert. With the way it works, PostGr

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Ben Trewern
Better support! Where else can you get feedback from the actual programmers (sometimes within minutes of writing a message) than here? Ben > Hi > I was wondering, apart from extensive procedural language support > and being free, > what are other major advantages of Postgresql over other major

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Guy Rouillier
Thomas Hallgren wrote: Hi, This sounds great. Sorry for not being responsive on the pgsql-general. I'll read up on this thread during the weekend. Short term, this is what I think needs to be done: 1. Create a PL/Java 1.4 from current CVS. It compiles and runs with PostgreSQL 8.2. 2. Do wha

Re: [GENERAL] Database Security

2007-05-24 Thread Ben Trewern
Look at changing your pg_hba.conf file If you have a line in the file like: hostall all 127.0.0.1/32 trust change it to: hostall all 127.0.0.1/32 md5 then run: pg_ctl reload should get you whare you want to be. Ben "Danilo Freitas da Co

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Alexander Staubo
On 5/24/07, Richard Huxton <[EMAIL PROTECTED]> wrote: Tom Allison wrote: > You've addressed cost and performance. > Not much left. > > Try it out for yourself and see if it works for you. + elephant in logo - unpronounceable name + excellent mailing lists + excellent developer community - you ca

Re: [GENERAL] Very big transaction in a stored procedure : how can i commit in the middle of it ?

2007-05-24 Thread Célestin HELLEU
Well, with any database, if I had to insert 20 000 000 record in a table, I wouldntt do it in one transaction, it makes very big intermediate file, and the commit at the end is really heavy. I would cut the transaction in midi-transaction, of let's say 1000 records. There is either not really mo

Re: [GENERAL] Very big transaction in a stored procedure : how can i commit in the middle of it ?

2007-05-24 Thread Tom Lane
=?iso-8859-1?Q?C=E9lestin_HELLEU?= <[EMAIL PROTECTED]> writes: > Well, with any database, if I had to insert 20 000 000 record in a table, I= > wouldntt do it in one transaction, it makes very big intermediate file, an= > d the commit at the end is really heavy. There may be some databases where

Re: [GENERAL] Very big transaction in a stored procedure : how can i commit in the middle of it ?

2007-05-24 Thread Martijn van Oosterhout
On Thu, May 24, 2007 at 05:34:00PM +0200, Célestin HELLEU wrote: > Well, with any database, if I had to insert 20 000 000 record in a table, I > wouldntt do it in one transaction, it makes very big intermediate file, and > the commit at the end is really heavy. > I would cut the transaction in mi

Re: [GENERAL] Integrity on large sites

2007-05-24 Thread Joshua D. Drake
Dave Page wrote: problem with your setup. Granted, MySQL is a pretty bad database, but it's not *that* bad -- your example implies that heavily MyISAM-based (you don't say whether this is MyISAM or InnoDB) sites such as Slashdot and Flickr should be falling over every hour. I'm not going to co

Re: [GENERAL] Postgresql 8.2.4 crash with tsearch2

2007-05-24 Thread Teodor Sigaev
Pls, check your steps or say me where I'm wrong :) If you still have a problems, I can solve it if I'll have access to your developer server... % cd PGSQL_SRC % zcat ~/tmp/tsearch_snowball_82-20070504.gz| patch -p0 % cd contrib/tsearch2 % gmake && su -c 'gmake install' && gmake installcheck % c

Re: [GENERAL] Integrity on large sites

2007-05-24 Thread PFC
Flickr uses InnoDB, by the way. On Thu, 24 May 2007 18:07:21 +0200, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Dave Page wrote: problem with your setup. Granted, MySQL is a pretty bad database, but it's not *that* bad -- your example implies that heavily MyISAM-based (you don't

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/24/07 10:30, Alexander Staubo wrote: > On 5/24/07, Richard Huxton <[EMAIL PROTECTED]> wrote: >> Tom Allison wrote: >> > You've addressed cost and performance. >> > Not much left. >> > >> > Try it out for yourself and see if it works for you. >> >

Re: [GENERAL] bytea & perl

2007-05-24 Thread SCassidy
Hi, First, I would advise never using " insert into xx values (y,x)" without explicitly naming the columns; same for select statements - never use select * (a table change can mess things up). By the way, I just noticed in the release notes for the very latest couple of versions of DBD:Pg tha

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Ericson Smith
For us? Stability. Pure and simple. It ended up that the site was faster too. One issue with postgresql is that connection time is slower than mysql. Otherwise most everything else is just as fast or faster. So with Ruby on Rails, there is a persistent connections from the container, and that di

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Alexander Staubo
On 5/24/07, Ron Johnson <[EMAIL PROTECTED]> wrote: > [2] Nobody else has this, I believe, except possibly Ingres and > NonStop SQL. This means you can do a "begin transaction", then issue > "create table", "alter table", etc. ad nauseum, and in the mean time > concurrent transactions will just wo

[GENERAL] postgres - oid question

2007-05-24 Thread bruce
Hi... In looking over a few sites via google, I'm trying to figure out what has to be added to the sql I have for creating TBLs that use OIDs. I'd rather have the cmds added to the sql file, than the postgres conf file... I can't find out what I have to add! I understand that OIDs are depricated

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Erik Jones
On May 24, 2007, at 4:39 AM, Richard Huxton wrote: - unpronounceable name post-gres-queue-el Erik Jones Software Developer | Emma® [EMAIL PROTECTED] 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/24/07 12:48, Alexander Staubo wrote: > On 5/24/07, Ron Johnson <[EMAIL PROTECTED]> wrote: >> > [2] Nobody else has this, I believe, except possibly Ingres and >> > NonStop SQL. This means you can do a "begin transaction", then issue >> > "create

Re: [GENERAL] Integrity on large sites

2007-05-24 Thread Dave Page
Joshua D. Drake wrote: > Dave Page wrote: > >>> problem with your setup. Granted, MySQL is a pretty bad database, but >>> it's not *that* bad -- your example implies that heavily MyISAM-based >>> (you don't say whether this is MyISAM or InnoDB) sites such as >>> Slashdot and Flickr should be falli

Re: [GENERAL] Timestamp with time zone: why not?

2007-05-24 Thread Scott Marlowe
[EMAIL PROTECTED] wrote: Would I be right in thinking that, in general, a column to hold timestamp values is best created with type 'TIMESTAMP WITH TIME ZONE' and not 'TIMESTAMP' nor 'TIMESTAMP WITHOUT TIME ZONE'? To put it another way, for what reasons might the 'TIMESTAMP' type be preferred to

Re: [GENERAL] postgres - oid question

2007-05-24 Thread bruce
Hi Oliver. Thanks for the reply. I was hoping that there was/is a single cmd that I could use at the beginning of the sql file, that would allow all the tables that are created to be created using the OID. Kind of a use OID create tbl Foo1 create tbl Foo2 create tbl Foo3 create tbl Foo4 cre

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Leif B. Kristensen
On Thursday 24. May 2007 19:57, Erik Jones wrote: >On May 24, 2007, at 4:39 AM, Richard Huxton wrote: >> - unpronounceable name > >post-gres-queue-el Somebody probably wants to put that pot-grass-kewl thing in his pipe and smoke it. -- Leif Biberg Kristensen | Registered Linux User #338009 http:

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Wiebe Cazemier
On Thursday 24 May 2007 17:30, Alexander Staubo wrote: > [2] Nobody else has this, I believe, except possibly Ingres and > NonStop SQL. This means you can do a "begin transaction", then issue > "create table", "alter table", etc. ad nauseum, and in the mean time > concurrent transactions will just

Re: [GENERAL] postgres - oid question

2007-05-24 Thread Oliver Elphick
On Thu, 2007-05-24 at 10:58 -0700, bruce wrote: > Hi... > > In looking over a few sites via google, I'm trying to figure out what has to > be added to the sql I have for creating TBLs that use OIDs. I'd rather have > the cmds added to the sql file, than the postgres conf file... > > I can't find

Re: [GENERAL] postgres - oid question

2007-05-24 Thread Alan Hodgson
On Thursday 24 May 2007 11:31, "bruce" <[EMAIL PROTECTED]> wrote: > Hi Oliver. > > Thanks for the reply. > > I was hoping that there was/is a single cmd that I could use at the > beginning of the sql file, that would allow all the tables that are > created to be created using the OID. Kind of a >

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-24 Thread John D. Burger
Tilmann Singer wrote: We are using this data which seems to be fairly extensive and accurate, and is free: http://earth-info.nga.mil/gns/html/gis_countryfiles.htm We use that, but it is only non-US, so we combine it with this: http://geonames.usgs.gov/domestic/download_data.htm We also ha

Re: [GENERAL] bytea & perl

2007-05-24 Thread tom
On 5/24/2007, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >Hi, > >First, I would advise never using " insert into xx values (y,x)" without >explicitly naming the columns; same for select statements - never use >select * (a table change can mess things up). > >By the way, I just noticed in the

[GENERAL] Corrupted index file after restoring WAL on warm spare server

2007-05-24 Thread Michael Nolan
Recently I went through the steps to refresh the database (8.3.4) on my development server (running Fedora Core 5 Linux), making a tarball of the live database, then restoring it on the development server, and running all the archived WAL files. Everything worked fine as far as I can tell, I don'

Re: [GENERAL] Corrupted index file after restoring WAL on warm spare server

2007-05-24 Thread Michael Nolan
Sorry, I meant 8.2.4 (darn typo virus) On 5/24/07, Michael Nolan <[EMAIL PROTECTED]> wrote: Recently I went through the steps to refresh the database (8.3.4) on my development server (running Fedora Core 5 Linux), making a tarball of the live database, then restoring it on the development serve

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread A.M.
On May 24, 2007, at 14:29 , Wiebe Cazemier wrote: On Thursday 24 May 2007 17:30, Alexander Staubo wrote: [2] Nobody else has this, I believe, except possibly Ingres and NonStop SQL. This means you can do a "begin transaction", then issue "create table", "alter table", etc. ad nauseum, and in

Re: [GENERAL] Corrupted index file after restoring WAL on warm spare server

2007-05-24 Thread Tom Lane
"Michael Nolan" <[EMAIL PROTECTED]> writes: > Howevever, when I go to access one table, the index appears to be corrupted > because the record I get for one query doesn't match the record key I give. > Reindexing that table on the warm spare system fixes the problem. > I redid setting up the warm

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Alvaro Herrera
A.M. wrote: > > On May 24, 2007, at 14:29 , Wiebe Cazemier wrote: > > >On Thursday 24 May 2007 17:30, Alexander Staubo wrote: > > > >>[2] Nobody else has this, I believe, except possibly Ingres and > >>NonStop SQL. This means you can do a "begin transaction", then issue > >>"create table", "alter

Re: [GENERAL] Integrity on large sites

2007-05-24 Thread Alexander Staubo
On 5/24/07, PFC <[EMAIL PROTECTED]> wrote: Flickr uses InnoDB, by the way. The master does. The slaves use MyISAM, according to Cal Henderson: http://www.slideshare.net/coolpics/flickr-44054 Alexander. ---(end of broadcast)--- TIP 6: e

Re: [GENERAL] the future of pljava development

2007-05-24 Thread Andrej Ricnik-Bay
On 5/25/07, Marek Lewczuk <[EMAIL PROTECTED]> wrote: Good point, but from the other hand there are plenty of programing languages but Java is the most popular :-) (source: http://www.tiobe.com/tpci.htm). Guess it depends on what survey you read ... there java is "also ran" ... http://www.deda

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread A.M.
On May 24, 2007, at 15:57 , Alvaro Herrera wrote: A.M. wrote: Indeed. Wouldn't it be a cool feature to persists transaction states across connections so that a new connection could get access to a sub- transaction state? That way, you could make your schema changes and test them with any n

[GENERAL] Large Database \d: ERROR: cache lookup failed for relation ...

2007-05-24 Thread Thomas F. O'Connell
I'm dealing with a database where there are ~150,000 rows in information_schema.tables. I just tried to do a \d, and it came back with this: ERROR: cache lookup failed for relation [oid] Is this indicative of corruption, or is it possibly a resource issue? I don't see a lot of evidence of

[Re] Re: [Re] Re: [Re] Re: [GENERAL] Winsock error 10035 while trying to upgrade from 8.0 to 8.2

2007-05-24 Thread Cyril VELTER
> Cyril VELTER wrote: > >> Cyril VELTER wrote: > >>> No I'm not. It's not even complied in the server nor in the pg_dump > > binary. > >>> The server is built on windows using MSYS simply with ./configure && make > > all > >>> && make install > >>> > >>> > >>> I've been able to reprodu

Re: [GENERAL] Large Database \d: ERROR: cache lookup failed for relation ...

2007-05-24 Thread Tom Lane
"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: > I'm dealing with a database where there are ~150,000 rows in > information_schema.tables. I just tried to do a \d, and it came back > with this: > ERROR: cache lookup failed for relation [oid] > Is this indicative of corruption, or is it po

Re: [GENERAL] postgres - oid question

2007-05-24 Thread Raymond O'Donnell
On 24/05/2007 18:58, bruce wrote: In looking over a few sites via google, I'm trying to figure out what has to be added to the sql I have for creating TBLs that use OIDs. I'd rather have Something like - create table (...) with oids; - but check the docs (under CREATE TABLE) to be sure.

[GENERAL] Return rows from function with expressions

2007-05-24 Thread novnov
I've written many stored procedures in ms sql and a good many functions in postgres, but I'm rather unsure of how to get a list back from a postgres function which is not based on a table. Example from sql server: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[procPatient]

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Alexander Staubo
We're derailing the thread, but... On 5/24/07, A.M. <[EMAIL PROTECTED]> wrote: 2PC requires that the modifications already be in concrete. What I suggest is a method for a new connection to insert itself into an existing (sub-)transaction SQL stream, make changes, and commit to the root or paren

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread PFC
Indeed. Wouldn't it be a cool feature to persists transaction states across connections so that a new connection could get access to a sub- transaction state? That way, you could make your schema changes and test them with any number of test clients (which designate the state to connect with) an

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread A.M.
On May 24, 2007, at 18:12 , PFC wrote: Indeed. Wouldn't it be a cool feature to persists transaction states across connections so that a new connection could get access to a sub- transaction state? That way, you could make your schema changes and test them with any number of test clients (

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Chris Browne
[EMAIL PROTECTED] ("A.M.") writes: > On May 24, 2007, at 14:29 , Wiebe Cazemier wrote: > >> On Thursday 24 May 2007 17:30, Alexander Staubo wrote: >> >>> [2] Nobody else has this, I believe, except possibly Ingres and >>> NonStop SQL. This means you can do a "begin transaction", then issue >>> "cre

Re: [GENERAL] Return rows from function with expressions

2007-05-24 Thread Ragnar
On fim, 2007-05-24 at 13:59 -0700, novnov wrote: > I've written many stored procedures in ms sql and a good many functions in > postgres, but I'm rather unsure of how to get a list back from a postgres > function which is not based on a table. Example from sql server: > > set ANSI_NULLS ON > set Q

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Thomas Kellerer
Alexander Staubo wrote on 24.05.2007 17:30: [2] Nobody else has this, I believe, except possibly Ingres and NonStop SQL. This means you can do a "begin transaction", then issue "create table", "alter table", etc. ad nauseum, and in the mean time concurrent transactions will just work. Beautiful f

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Alvaro Herrera
Chris Browne wrote: > [EMAIL PROTECTED] ("A.M.") writes: > Jan Wieck had a proposal to a similar effect, namely to give some way > to get one connection to duplicate the state of another one. > > This would permit doing a neat parallel decomposition of pg_dump: you > could do a 4-way parallelizat

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread A.M.
On May 24, 2007, at 18:21 , Chris Browne wrote: Jan Wieck had a proposal to a similar effect, namely to give some way to get one connection to duplicate the state of another one. This would permit doing a neat parallel decomposition of pg_dump: you could do a 4-way parallelization of it that w

Re: [GENERAL] Corrupted index file after restoring WAL on warm spare server

2007-05-24 Thread Michael Nolan
On 5/24/07, Tom Lane <[EMAIL PROTECTED]> wrote: It sounds like you have a reproducible test case --- can you make it available to someone else? Not very easily, Tom. The tarball files are around 35 GB (uncompressed) and I assume they'd only work on a fairly similar system anyway. I assume s

[GENERAL] index vs. seq scan choice?

2007-05-24 Thread George Pavlov
I am trying to figure out how the distribution of data affects index usage by the query because I am seeing some behavior that does not seem optimal to my uneducated eye. I am on PG 8.1.8. I have two tables foo and foo_detail, both have been vacuum analyzed recently. Both have a property_id colum

Parallel backups (was Re: [GENERAL] why postgresql over other RDBMS)

2007-05-24 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/24/07 17:21, Chris Browne wrote: [snip] > > This would permit doing a neat parallel decomposition of pg_dump: you > could do a 4-way parallelization of it that would function something > like the following: > > - connection 1 opens, establishes

Re: [GENERAL] Limiting number of rows returned at a time in select query

2007-05-24 Thread Rodrigo De León
Jon Clements ha escrito: > Hi All. > > Is there a way inside a query (or connection) to limit the amount of > records returned each chunk by the server? At the moment, I have 22 > million records trying to be returned in one-go as the result set. I > have a .NET driver that has a FetchSize option w

Re: [GENERAL] Delete with subquery deleting all records

2007-05-24 Thread Francisco Reyes
Alban Hertroys writes: Why not use EXISTS? DELETE FROM export_messages WHERE NOT EXISTS ( SELECT 1 FROM exports WHERE exports.export_id = export_messages.export_id ) Didn't think of it. Thanks for the code. I suppose you run those queries in a transaction block, r

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread Andrew Sullivan
On Thu, May 24, 2007 at 03:25:52PM -0400, A.M. wrote: > Wouldn't it be a cool feature to persists transaction states > across connections so that a new connection could get access to a sub- > transaction state? You could do this using an incredibly evil, carefully implemented hack in a connect

[GENERAL] Inheritance question

2007-05-24 Thread Raymond C. Rodgers
First, I want to confess that I am not an SQL expert or even remotely close. :-) Second, I believe I pretty much know the answer to my question, but I would like to have some confirmation if you fine people don't mind. My situation is this: I have a PHP script that some what dynamically generates

Re: [GENERAL] index vs. seq scan choice?

2007-05-24 Thread Tom Lane
"George Pavlov" <[EMAIL PROTECTED]> writes: > I am curious what could make the PA query to ignore the index. What are > the specific stats that are being used to make this decision? The frequency of the specific value being searched for, and the overall order-correlation of the column. Since the

[GENERAL] Uhm, so, yeah, speaking of /.

2007-05-24 Thread Scott Ribe
Just trying to post, and getting this error message: > Invalid form key: c3pVklZBr9 > > Chances are, you're behind a firewall or proxy, or clicked the Back button to > accidentally reuse a form. Please try again. If the problem persists, and all > other options have been tried, contact the site a

Re: [GENERAL] why postgresql over other RDBMS

2007-05-24 Thread A.M.
On May 24, 2007, at 20:39 , Andrew Sullivan wrote: On Thu, May 24, 2007 at 03:25:52PM -0400, A.M. wrote: Wouldn't it be a cool feature to persists transaction states across connections so that a new connection could get access to a sub- transaction state? You could do this using an incred

[GENERAL] Cannot get autovacuum configured

2007-05-24 Thread Walter Vaughan
Configuring autovacuum shouldn't be so hard. :( I had a similar problem to this months ago, and I can't seem to fix it again opentaps=# SELECT name, setting from pg_settings where name like '%stats_%'; name | setting -+- stats_block_

Re: [GENERAL] index vs. seq scan choice?

2007-05-24 Thread Alvaro Herrera
Tom Lane wrote: > (The default statistics target is 10, which is widely considered too > low --- you might find 100 more suitable.) Does this mean that we should look into raising the default a bit? -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Co

Re: [GENERAL] index vs. seq scan choice?

2007-05-24 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> (The default statistics target is 10, which is widely considered too >> low --- you might find 100 more suitable.) > Does this mean that we should look into raising the default a bit? Probably ... the question is to what. The defaul

Re: [GENERAL] index vs. seq scan choice?

2007-05-24 Thread Joshua D. Drake
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: Tom Lane wrote: (The default statistics target is 10, which is widely considered too low --- you might find 100 more suitable.) Does this mean that we should look into raising the default a bit? Probably ... the question is to what

Re: [GENERAL] index vs. seq scan choice?

2007-05-24 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> I'm not sure I want to vote for another 10x increase by >> default, though. > Outside of longer analyze times, and slightly more space taken up by the > statistics, what is the downside? Longer plan times --- several of the selfu

Re: [GENERAL] index vs. seq scan choice?

2007-05-24 Thread Steve Atkins
On May 24, 2007, at 8:26 PM, Tom Lane wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: Tom Lane wrote: I'm not sure I want to vote for another 10x increase by default, though. Outside of longer analyze times, and slightly more space taken up by the statistics, what is the downside?

[GENERAL] ERROR: cache lookup failed for type 0

2007-05-24 Thread Michael Harris \(BR/EPA\)
Hi, Am not sure if this is something we've done wrong or maybe a bug. Whenever any kind of query is done on the table below, this is the result: ispdb_vxe=> select * from pm.carrier_on_13642; ERROR: cache lookup failed for type 0 I first noticed it when I noticed that the regular backups were