Re: [GENERAL] an other provokative question??

2007-09-06 Thread Greg Smith
On Fri, 7 Sep 2007, Ron Johnson wrote: Definitely a niche product. Stonebraker's commentary was unfortunately spun by the ComputerWorld columnist. I hope people followed the link to his actual blog entry at http://www.databasecolumn.com/2007/09/one-size-fits-all.html where his arguement is

[GENERAL] Security Advances in Postgresql over other RDBMS

2007-09-06 Thread Jasbinder Singh Bali
Hi, The way postgres has the concept of host base authentication, is this a step forward over other RDBMS like sql server and oracle? I was wondering, what are some novel security features in postgres as compared to other RDBMS. Thanks, Jas

[GENERAL] What's the difference between SET STORAGE MAIN and EXTENDED?

2007-09-06 Thread Zoltan Boszormenyi
Hi, according to http://www.postgresql.org/docs/8.2/interactive/storage-toast.html: EXTENDED allows both compression and out-of-line storage. This is the default for most TOAST-able data types. Compression will be attempted first, then out-of-line storage if the row is still too big. MAIN a

[GENERAL] dblink vs dbi-link (and errors compiling)

2007-09-06 Thread Ow Mun Heng
I'm confused as to the difference between dblink and dbi-link. dblink is included in the contrib directory and dbi-link is available from pgfoundry. dblink seems like it creates a view of a remote DB and is static, which means that it needs to be refreshed each time. dbi-link seems like it uses

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Tom Lane
Erik Jones <[EMAIL PROTECTED]> writes: > I'm curious, given that Postgres wasn't even an SQL-centric database > when the original project ended, how much of the current Postgres > code base still contains code from the original project before the > incorporation of SQl rename to PostgreSQL?

Re: [GENERAL] dblink vs dbi-link (and errors compiling)

2007-09-06 Thread Ow Mun Heng
On Fri, 2007-09-07 at 00:17 -0500, Erik Jones wrote: > On Sep 6, 2007, at 10:54 PM, Ow Mun Heng wrote: > > > In either of the above, I would like to know which one is able to help > > me to like connect to a remote DB, use the table there and join to a > > local table in PG so that I don't have to

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 22:54, Tom Lane wrote: > "Dann Corbit" <[EMAIL PROTECTED]> writes: >>> Relational database pioneer says technology is obsolete >>> http://www.computerworld.com/action/article.do?command=3DviewArticleBasic&articleId=3D9034619 > >> This bit

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 20:53, Merlin Moncure wrote: [snip] > > arrays are interesting and have some useful problems. however, we > must first discuss the problems...first and foremost if you need to > read any particular item off the array you must read the ent

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 21:26, Ow Mun Heng wrote: > On Thu, 2007-09-06 at 20:57 -0500, Michael Glaesemann wrote: >> On Sep 6, 2007, at 20:46 , Ow Mun Heng wrote: > >>> I would believe performance would be better it being denormalised. (in >>> this case) >> I assu

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Erik Jones
On Sep 6, 2007, at 10:54 PM, Tom Lane wrote: "Dann Corbit" <[EMAIL PROTECTED]> writes: Relational database pioneer says technology is obsolete http://www.computerworld.com/action/article.do? command=3DviewArticleBasic&articleId=3D9034619 This bit is a hint: "Column-oriented databases -- su

Re: [GENERAL] dblink vs dbi-link (and errors compiling)

2007-09-06 Thread Erik Jones
On Sep 6, 2007, at 10:54 PM, Ow Mun Heng wrote: I'm confused as to the difference between dblink and dbi-link. dblink is included in the contrib directory and dbi-link is available from pgfoundry. dblink seems like it creates a view of a remote DB and is static, which means that it needs t

Re: [GENERAL] a provocative question?

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 20:45, Chris Browne wrote: > [EMAIL PROTECTED] ("Trevor Talbot") writes: >> There's also a point in regard to how modifications are made to your >> data store. In general, things working with text files don't go to >> much effort to mainta

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 20:19 -0700, Joe Conway wrote: > Ow Mun Heng wrote: > > => select code, round(avg(case when subset = '0' then value else null > > end),0) as v0, > > round(avg(case when subset = '1' then value else null end),0) as v1, > > round(avg(case when subset = '2' then value else null

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Tom Lane
"Dann Corbit" <[EMAIL PROTECTED]> writes: >> Relational database pioneer says technology is obsolete >> http://www.computerworld.com/action/article.do?command=3DviewArticleBasic&articleId=3D9034619 > This bit is a hint: > "Column-oriented databases -- such as the one built by Stonebraker's > lates

Re: [GENERAL] Call for Speakers PostgreSQL Conference Fall 2007

2007-09-06 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A.M. wrote: > > On Sep 6, 2007, at 21:10 , Joshua D. Drake wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Hello, >> >> The PostgreSQL Conference Fall 2007 is shaping up nicely. We are now >> seeking more speakers. Here is the curr

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Joe Conway
Ow Mun Heng wrote: => select code, subset, avg(value) from foo group by subset, code; code | subset | avg --++- A| 3 | 98. A| 1 | 20. A| 4 | 98. A| 0 | 98.000

Re: [GENERAL] Call for Speakers PostgreSQL Conference Fall 2007

2007-09-06 Thread A.M.
On Sep 6, 2007, at 21:10 , Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, The PostgreSQL Conference Fall 2007 is shaping up nicely. We are now seeking more speakers. Here is the current lineup: What's the difference between the conference groups at http:// www.

Re: [GENERAL] Adapter update.

2007-09-06 Thread Ow Mun Heng
On Wed, 2007-08-22 at 20:41 +0100, Richard Huxton wrote: > Murali Maddali wrote: > > This is what I am doing, I am reading the data from SQL Server 2005 and > > dumping to out to Postgresql 8.2 database. My 2 cents.. I'm doing roughly the same thing, but I'm using perl and DBI to do it. > Fastest

Re: [GENERAL] array_to_records function

2007-09-06 Thread Merlin Moncure
On 9/6/07, Yudie Pg <[EMAIL PROTECTED]> wrote: > Here I'm posting a function to convert array to records. > any other suggestions are welcome http://archives.postgresql.org/pgsql-general/2007-07/msg01240.php http://people.planetpostgresql.org/merlin/index.php?/archives/4-fun-with-arrays.html merl

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: That was understood. What i meant is that the only time i see anything *related to* the prepared statement i think should be there is when the EXECUTE fails for some reason because the context of the error is logged. That particular EXECUTE wa

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread Tom Lane
brian <[EMAIL PROTECTED]> writes: > That was understood. What i meant is that the only time i see anything > *related to* the prepared statement i think should be there is when the > EXECUTE fails for some reason because the context of the error is > logged. That particular EXECUTE was preceeded

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: The only hint of a prepared statement being logged is when there's an error. eg: <2007-09-05 17:35:22 EDT>ERROR: duplicate key violates unique constraint "auth_member_id_key" <2007-09-05 17:35:22 EDT>STATEMENT: EXECUTE mdb2_statement_pgsq

[GENERAL] array_to_records function

2007-09-06 Thread Yudie Pg
Here I'm posting a function to convert array to records. any other suggestions are welcome create or replace function array_to_records(int[]) RETURNS SETOF record AS $$ DECLARE ret_rec record; a int; b int; BEGIN b = length(array_dims($1)); a = substr(array_dims($1),4, (b-4) ); FOR

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 20:57 -0500, Michael Glaesemann wrote: > On Sep 6, 2007, at 20:46 , Ow Mun Heng wrote: > > I would believe performance would be better it being denormalised. (in > > this case) > > I assume you've arrived at the conclusion because you have > (a) shown > that the performan

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread Tom Lane
brian <[EMAIL PROTECTED]> writes: > The only hint of a prepared statement being logged is when there's an > error. eg: > <2007-09-05 17:35:22 EDT>ERROR: duplicate key violates unique > constraint "auth_member_id_key" > <2007-09-05 17:35:22 EDT>STATEMENT: EXECUTE > mdb2_statement_pgsqla0e8d351

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 21:53 -0400, Merlin Moncure wrote: > On 9/6/07, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > > Table is like > > > > create table foo ( > > number int, > > subset int, > > value int > > ) > > > > select * from foo; > > number | subset | value > > 111 > > 1

Re: [GENERAL] Compiling Pl/Perl on Mac OSX

2007-09-06 Thread Tom Lane
Logan Bowers <[EMAIL PROTECTED]> writes: > Has anyone had any luck compiling the Pl/Perl language on Mac OSX > (10.4)? I get the following error: Worksforme ... which Postgres version are you using exactly? > gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith - > Winline -Wdec

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: But that should mean that my prepared statement that contains an INSERT should be logged, yes? (8.1 issues notwithstanding) I ask because i've set log_statement to 'mod' but am not seeing any of my prepared statements in the log. INSERT, UPDATE

Re: [GENERAL] a provocative question?

2007-09-06 Thread Chris Browne
[EMAIL PROTECTED] ("Trevor Talbot") writes: > There's also a point in regard to how modifications are made to your > data store. In general, things working with text files don't go to > much effort to maintain durability like a real database would. The > most direct way of editing a text file is

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Michael Glaesemann
On Sep 6, 2007, at 20:46 , Ow Mun Heng wrote: On Thu, 2007-09-06 at 20:20 -0500, Michael Glaesemann wrote: On Sep 6, 2007, at 19:58 , Ow Mun Heng wrote: Don't denormalise the table? Yes. Don't denormalize the tables. I would believe performance would be better it being denormalised. (in

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Merlin Moncure
On 9/6/07, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > Table is like > > create table foo ( > number int, > subset int, > value int > ) > > select * from foo; > number | subset | value > 111 > 122 > 1310 > 143 > > current query is like >

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 20:20 -0500, Michael Glaesemann wrote: > On Sep 6, 2007, at 19:58 , Ow Mun Heng wrote: > > > Don't denormalise the table? > > Yes. Don't denormalize the tables. I would believe performance would be better it being denormalised. (in this case) > > > don't put them into arra

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Michael Glaesemann
On Sep 6, 2007, at 19:58 , Ow Mun Heng wrote: Don't denormalise the table? Yes. Don't denormalize the tables. don't put them into arrays? Yes. Don't use arrays. Caveat: if the data is *naturally* an array and you will not be doing any relational operations on individual elements of th

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread Tom Lane
brian <[EMAIL PROTECTED]> writes: > But that should mean that my prepared statement that contains an INSERT > should be logged, yes? (8.1 issues notwithstanding) > I ask because i've set log_statement to 'mod' but am not seeing any > of my prepared statements in the log. INSERT, UPDATE, and friend

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael Glaesemann wrote: > > On Sep 6, 2007, at 19:37 , Ow Mun Heng wrote: > >> Nobody has any comments on this?? > > Don't do it. HAHAHAHAHAHAHA Joshua D. Drake > > Michael Glaesemann > grzm seespotcode net > > > > -

[GENERAL] Call for Speakers PostgreSQL Conference Fall 2007

2007-09-06 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, The PostgreSQL Conference Fall 2007 is shaping up nicely. We are now seeking more speakers. Here is the current lineup: 8:00 - 9:00 - Coffee / Social / Wake up / Go back to hotel for socks 9:00 - 9:30 - JoshB - Welcome to 8.3 10:00 - 11:00 -

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 19:52 -0500, Michael Glaesemann wrote: > On Sep 6, 2007, at 19:37 , Ow Mun Heng wrote: > > > Nobody has any comments on this?? > > Don't do it. don't do what? Don't denormalise the table? don't put them into arrays? Thing is, end-result is always for them to be in 1 row a

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Michael Glaesemann
On Sep 6, 2007, at 19:37 , Ow Mun Heng wrote: Nobody has any comments on this?? Don't do it. Michael Glaesemann grzm seespotcode net ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Column as arrays.. more efficient than columns?

2007-09-06 Thread Ow Mun Heng
Nobody has any comments on this?? On Thu, 2007-09-06 at 12:22 +0800, Ow Mun Heng wrote: > Table is like > > create table foo ( > number int, > subset int, > value int > ) > > select * from foo; > number | subset | value > 111 > 122 > 1310 > 1

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread brian
Tom Lane wrote: brian <[EMAIL PROTECTED]> writes: The docs (8.1) say the following about log_statement: -- snip -- ... mod logs all ddl statements, plus INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM. PREPARE and EXPLAIN ANALYZE statements are also logged if their contained command is of an a

Re: [GENERAL] tsearch2 anomoly?

2007-09-06 Thread RC Gobeille
Thanks and I didn't know about ts_debug, so thanks for that also. For the record, I see how to use my own processing function (e.g. dropatsymbol) to get what I need: http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V2-intro .html However, can you explain the logic behind the pa

Re: [GENERAL] log_statement and PREPARE

2007-09-06 Thread Tom Lane
brian <[EMAIL PROTECTED]> writes: > The docs (8.1) say the following about log_statement: > -- snip -- > ... mod logs all ddl statements, plus INSERT, UPDATE, DELETE, TRUNCATE, > and COPY FROM. PREPARE and EXPLAIN ANALYZE statements are also logged if > their contained command is of an appropriat

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Gregory Stark
"Chris Browne" <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Gregory Stark) writes: > >> You can even do this with GROUP BY as long as the leading columns of >> the ORDER BY inside the subquery exactly matches the GROUP BY >> columns. ... > Is there not some risk that the query planner might c

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Chris Browne
[EMAIL PROTECTED] writes: > Relational database pioneer says technology is obsolete > http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9034619 > kindlt explain how?? There are several spins relevant to this: 1. He's trying to sell His New Thing, and it certainl

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Tom Lane
Chris Browne <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Gregory Stark) writes: >> In theory we can't promise anything about future versions of >> Postgres but there are lots of people doing this already so if ever >> this was lost there would probably be some new explicit way to >> achieve th

[GENERAL] log_statement and PREPARE

2007-09-06 Thread brian
The docs (8.1) say the following about log_statement: -- snip -- ... mod logs all ddl statements, plus INSERT, UPDATE, DELETE, TRUNCATE, and COPY FROM. PREPARE and EXPLAIN ANALYZE statements are also logged if their contained command is of an appropriate type. -- snip -- Can someone please ex

Re: [GENERAL] Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

2007-09-06 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > On 9/6/07, Tom Lane <[EMAIL PROTECTED]> wrote: >> What changes would those be? If your app works on 7.3.4 it should work >> with 7.3.17. > Actually, from what he wrote, I take it that 7.3.17 works fine, but > some insane policy where he works demands

Re: [GENERAL] Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

2007-09-06 Thread Scott Marlowe
On 9/6/07, Tom Lane <[EMAIL PROTECTED]> wrote: > Darek Czarkowski <[EMAIL PROTECTED]> writes: > > It can not be the resource limit, it has to be something else. I assume thi= > > s version of postgres is incompatible with RedHat ES 5. Changing to a newer= > > version of postgres is not an option f

Re: [GENERAL] Reporting services for PostgreSQL

2007-09-06 Thread Ned Lilly
Hi Andrus, There are some pretty good PDF docs that would be a good starting point for all of your questions - see http://www.xtuple.org/?q=node/2177. (They're also in the downloads area of the Sourceforge site, but a little hard to find). Speaking of the downloads, if you check there (http:/

Re: [GENERAL] a provocative question?

2007-09-06 Thread Trevor Talbot
There's also a point in regard to how modifications are made to your data store. In general, things working with text files don't go to much effort to maintain durability like a real database would. The most direct way of editing a text file is to make all the changes in memory, then write the wh

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Ron Mayer
Dann Corbit wrote: > All of the database systems > that I know of that use this column-oriented scheme are in-memory > database systems. I don't know if Mr. Stonebraker's is also. KDB+ (http://kx.com/) is column-oriented and has both on-disk and in-memory capabilities http://kx.com/faq/#6 . It's

Re: [GENERAL] an other provokative question??

2007-09-06 Thread Dann Corbit
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > Sent: Thursday, September 06, 2007 12:33 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] an other provokative question?? > > Relational database pioneer say

Re: [GENERAL] a provocative question?

2007-09-06 Thread Chris Browne
[EMAIL PROTECTED] ("TJ O'Donnell") writes: > I am getting in the habit of storing much of my day-to-day > information in postgres, rather than "flat" files. > I have not had any problems of data corruption or loss, > but others have warned me against abandoning files. > I like the benefits of enfor

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Chris Browne
[EMAIL PROTECTED] (Gregory Stark) writes: > "Webb Sprague" <[EMAIL PROTECTED]> writes: > >> I can always count on (note the order name): >> >> \a >> oregon_2007_08_20=# select array_accum(name) from (select name from >> placenames where desig='crater' order by name desc) a; >> array_accum >> {"Yapo

[GENERAL] an other provokative question??

2007-09-06 Thread volunteer
Relational database pioneer says technology is obsolete http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9034619 kindlt explain how?? sincerely siva ---(end of broadcast)--- TIP 4: Have you searched our list archiv

Re: [GENERAL] Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

2007-09-06 Thread Tom Lane
Darek Czarkowski <[EMAIL PROTECTED]> writes: > It can not be the resource limit, it has to be something else. I assume thi= > s version of postgres is incompatible with RedHat ES 5. Changing to a newer= > version of postgres is not an option for now. It would take too much time = > to rewrite the

Re: [GENERAL] a provocative question?

2007-09-06 Thread Kenneth Downs
Tom Lane wrote: "TJ O'Donnell" <[EMAIL PROTECTED]> writes: I ran across this quote on Wikipedia at http://en.wikipedia.org/wiki/Eudora_%28e-mail_client%29 "Text files are also much safer than databases, in that should disk corruption occur, most of the mail is likely to be unaffected, and an

Re: [GENERAL] Need suggestion on how best to update 3 million rows

2007-09-06 Thread Alvaro Herrera
Alvaro Herrera wrote: > Lincoln Yeoh wrote: > > At 06:32 PM 9/6/2007, Richard Huxton wrote: > > > >> Two other tips for bulk-updates like this: > >> 1. Do as many columns in one go as you can > >> 2. Only update rows that need updating > >> > >> When you've finished, a CLUSTER/VACUUM FULL can be us

Re: [GENERAL] a provocative question?

2007-09-06 Thread Tom Lane
"TJ O'Donnell" <[EMAIL PROTECTED]> writes: > I ran across this quote on Wikipedia at > http://en.wikipedia.org/wiki/Eudora_%28e-mail_client%29 > "Text files are also much safer than databases, in that should disk > corruption occur, most of the mail is likely to be unaffected, and any > that is d

Re: [GENERAL] ANY

2007-09-06 Thread Tom Lane
Alban Hertroys <[EMAIL PROTECTED]> writes: > Richard Huxton wrote: >> AFAIK there are two variants of ANY() >> 1. sets >> 2. arrays >> >> So you should be able to do: >> ... WHERE x = ANY( ARRAY[a, b, c] ) > But then the documentation isn't entirely correct. It suggests that it > works similar to

Re: [GENERAL] Need suggestion on how best to update 3 million rows

2007-09-06 Thread Alvaro Herrera
Lincoln Yeoh wrote: > At 06:32 PM 9/6/2007, Richard Huxton wrote: > >> Two other tips for bulk-updates like this: >> 1. Do as many columns in one go as you can >> 2. Only update rows that need updating >> >> When you've finished, a CLUSTER/VACUUM FULL can be useful too. > > How about: make sure you

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > > > Make the table: > > > id | year | value > > ---+--+-- > > 1 | 1970 |23 > > 1 | 1971 |25 > > 1 | 1972 |28 > > ... > > 2 | 1972 | 5 > > 3 | 1971 |94 > > 3 | 1972 | 102 > > > primary key: (id,year) > > value not null > > and be rea

[GENERAL] Is the ole db provider broken?

2007-09-06 Thread PSiegmann
Hi newsgroup. I am trying to access postgresql with the ole db driver, but it just doesn't seem to work. OUTOFMEMORY messages etc. (I am trying to convert a MSSQL DB to Postgres with the integration services from MSSQL) Is this a known problem? ---(end of broadcast)-

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Webb Sprague
order/aggregate thing is a general question. > > Yes. > > You can even do this with GROUP BY as long as the leading columns of the ORDER > BY inside the subquery exactly matches the GROUP BY columns. > > In theory we can't promise anything about future versions of Postgres but > there are lots of p

Re: [GENERAL] Reporting services for PostgreSQL

2007-09-06 Thread Andrus
Thank you. How server-side reporting works ? Will it use some C stored proceure in server ? In which format rendered report is sent back ? I need to call it in C# Where to find example calling OpenRpt in MONO / .NET ? Is OpenRpt now in LGPL, I havent found any announcment about licence change

Re: [GENERAL] Controlling locale and impact on LIKE statements

2007-09-06 Thread Martin Langhoff
On 9/5/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Martin Langhoff escribió: > > > As I have a Pg install where the locale is already en_US.UTF-8, and > > the database already exists, is there a DB-scoped way of controlling > > the locale? > > Not really. Ah well. But I do have to wonder why..

Re: [GENERAL] Postgresql 7.3 on Red Hat Enterprise 5 (Problem with SEMMNI, SEMMNS)

2007-09-06 Thread Darek Czarkowski
Thank you for comments, did I mention the system is a beast? # cat /proc/sys/kernel/shmmax 68719476736 It can not be the resource limit, it has to be something else. I assume this version of postgres is incompatible with RedHat ES 5. Changing to a newer version of postgres is not an option for

[GENERAL] how to find the number of rows inserted into the master table?

2007-09-06 Thread SHARMILA JOTHIRAJAH
Hi, I have a master table 'Master' with 3 partition tables 'child1', 'child2',' child3' which inherits the master table 'Master'. I have check constraints in the child tables to insert the appropriate values and also there are functions and triggers defined to do this. My question is, if I inser

Re: [GENERAL] Reporting services for PostgreSQL

2007-09-06 Thread Andrus
> "Render" as in "run the report program on the host"? Yes. Many reports shows only summary data in reports. If such report is created in server, it runs fast. If such report is created in client, it need to retrieve a lot of data and is very slow. Andrus. ---(end of b

[GENERAL] fillfactor Question

2007-09-06 Thread Siah
Hi, fillfactor affects 'update' statements or also has affects for 'insert' and 'delete'? Thanks, Sia ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED

Re: [GENERAL] How to 'register' functions, so they can be called (plpythonu)

2007-09-06 Thread blay bloo
> I believe the python embedder mangles the function names when it loads > them into PG, so you can't call them directly. do you think it possible to use the internal system catalogs to lookup the 'mangled' names? ---(end of broadcast)--- TIP 5: do

Re: [GENERAL] work hour calculations

2007-09-06 Thread Raj A
correction: > The result I'm expecting for the above to be > >notification_time| finished_time | actual > ++- > 2007-07-06 15:50:00+10 | 2007-07-09 07:10:00+10 | 01:20:00 > 2007-07-07 12:30:00+10 | 2007-07-09 07

Re: [GENERAL] a provocative question?

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 10:43, TJ O'Donnell wrote: > I am getting in the habit of storing much of my day-to-day > information in postgres, rather than "flat" files. > I have not had any problems of data corruption or loss, > but others have warned me against aband

Re: [GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Gregory Stark
"Webb Sprague" <[EMAIL PROTECTED]> writes: > I can always count on (note the order name): > > \a > oregon_2007_08_20=# select array_accum(name) from (select name from > placenames where desig='crater' order by name desc) a; > array_accum > {"Yapoah Crater","West Crater","Twin Craters","Timber Cra

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Franz . Rasper
> Make the table: > id | year | value > ---+--+-- > 1 | 1970 |23 > 1 | 1971 |25 > 1 | 1972 |28 > ... > 2 | 1972 | 5 > 3 | 1971 |94 > 3 | 1972 | 102 > primary key: (id,year) > value not null > and be ready. >the import/update reasons are pretty easily solved >

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread George Pavlov
as everyone has pointed out it does not seem like the best table design and querying for these fields as normal course of business does not seem that great, but if you wanted to audit tables like these once in a while you could easily do it using your favorite scripting language or SQL itself. here

Re: [GENERAL] tsearch2 anomoly?

2007-09-06 Thread Oleg Bartunov
This is how default parser works. See output from select * from ts_debug('gallery2-httpd-conf'); and select * from ts_debug('httpd-2.2.3-5.src.rpm'); All token type: select * from token_type(); On Thu, 6 Sep 2007, RC Gobeille wrote: I'm having trouble understanding to_tsvector. (PostreSQ

[GENERAL] Do AGGREGATES consistently use sort order?

2007-09-06 Thread Webb Sprague
I have the following query: select array_accum(name) from (select name from placenames where desig='crater' order by name desc) a; with array_accum defined as: CREATE AGGREGATE array_accum ( BASETYPE = anyelement, SFUNC = array_append, STYPE = anyarray, INITCOND = '{}' ); Can I coun

[GENERAL] a provocative question?

2007-09-06 Thread TJ O'Donnell
I am getting in the habit of storing much of my day-to-day information in postgres, rather than "flat" files. I have not had any problems of data corruption or loss, but others have warned me against abandoning files. I like the benefits of enforced data types, powerful searching, data integrity,

[GENERAL] Connection pooling

2007-09-06 Thread Max Zorloff
Hello. I'm using Apache + PHP + Postgres for my project. I've tried the two poolers people usually recommend here - pgbouncer and pgpool. I have a problem with pgbouncer - under the load the query execution becomes ~10 times slower than it should be - basically to test it, I connect with psql

[GENERAL] tsearch2 anomoly?

2007-09-06 Thread RC Gobeille
I'm having trouble understanding to_tsvector. (PostreSQL 8.1.9 contrib) In this first case converting 'gallery2-httpd-conf' makes sense to me and is exactly what I want. It looks like the entire string is indexed plus the substrings broken by '-' are indexed. ossdb=# select to_tsvector('

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Tom Lane
Stefan Schwarzer <[EMAIL PROTECTED]> writes: > Instead of this: > SELECT * FROM gdp WHERE y1970 NOT NULL AND y1971 NOT NULL > AND y2005 NOT NULL > I would like to have this: >SELECT * FROM gdp WHERE all-fields NOT NULL This idea seems rather pointless for any operation other

Re: [GENERAL] ANY

2007-09-06 Thread Alban Hertroys
Richard Huxton wrote: > Alban Hertroys wrote: >> >> SELECT * FROM gdp WHERE NULL IS NOT ANY(y1970, y1971, y1972); > AFAIK there are two variants of ANY() > 1. sets > 2. arrays > > So you should be able to do: > ... WHERE x = ANY( ARRAY[a, b, c] ) But then the documentation isn't entirely c

Re: [GENERAL] Wrong dynamic link ../../../src/interfaces/libpq/libpq.sl.3

2007-09-06 Thread Tom Lane
"Rajaram J" <[EMAIL PROTECTED]> writes: > shmlgarlica# chatr psql > psql: > shared executable > shared library dynamic path search: > SHLIB_PATH disabled second > embedded path disabled first Not Defined > shared library list: >

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Tino Wildenhain
[EMAIL PROTECTED] schrieb: Make the table: id | year | value ---+--+-- 1 | 1970 |23 1 | 1971 |25 1 | 1972 |28 ... 2 | 1972 | 5 3 | 1971 |94 3 | 1972 | 102 primary key: (id,year) value not null and be ready. the import/update reasons are pretty easily sol

Re: [GENERAL] PostgreSQL with Kerberos and Active Directory

2007-09-06 Thread Magnus Hagander
Not really - it's always worked that way for me :-( Have you managed to make any other kerberised applications work on this machine? There are sample programs in the kerberos package - try those to see if the problem is in postgresql or int he kerberos libs/setup. //Magnus On Sun, Sep 02, 2007 a

Re: [GENERAL] foreign key violation error with partitioned table

2007-09-06 Thread SHARMILA JOTHIRAJAH
The postgresql partitions is done using inheritance . So basically your master table is empty and the child tables(partitions) contains all the records...right. You can check if your master table contains any records by using this query SELECT * FROM ONLY This will return zero if your master t

[GENERAL] foreign key violation error with partitioned table

2007-09-06 Thread gunce orman
hello, i have a partitioned table t_kayit with 6 partitions and kayit_id is primary key on this table. My other t_vto_sonuclari table use that kayit_id as foreign key. I'm trying to insert values which contains kayit_id to t_vto_sonuclari and i'm sure those kayit_ids are in t_kayit table but

Re: [GENERAL] ANY

2007-09-06 Thread Richard Huxton
Alban Hertroys wrote: SELECT * FROM gdp WHERE NULL IS NOT ANY(y1970, y1971, y1972); I get nothing but syntax errors... I remember trying to use ANY in the past and never got it to work... So, how do you use ANY with a fixed set of values (the way IN can)? And can this be used to solve the OP's

[GENERAL] Wrong dynamic link ../../../src/interfaces/libpq/libpq.sl.3

2007-09-06 Thread Rajaram J
Hi I was not getting this message befor, But now when I compile postgresql 7.4.2 on a HPUX PA m/c there is a shared dynamic library ../../../src/interfaces/libpq/libpq.sl.3. This linking was not there before. Due to this when i run the psql binary i get the below message can someone please h

[GENERAL] foreign key violation error with partitioned table

2007-09-06 Thread gunce orman
hello, i have a partitioned table t_kayit with 6 partitions and kayit_id is primary key on this table. My other t_vto_sonuclari table use that kayit_id as foreign key. I'm trying to insert values which contains kayit_id to t_vto_sonuclari and i'm sure those kayit_ids are in t_kayit table too

Re: [GENERAL] Need suggestion on how best to update 3 million rows

2007-09-06 Thread Lincoln Yeoh
At 06:32 PM 9/6/2007, Richard Huxton wrote: Two other tips for bulk-updates like this: 1. Do as many columns in one go as you can 2. Only update rows that need updating When you've finished, a CLUSTER/VACUUM FULL can be useful too. How about: make sure you have enough free space because the t

Re: [GENERAL] Controlling locale and impact on LIKE statements

2007-09-06 Thread Alvaro Herrera
Martin Langhoff escribió: > On 9/5/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Martin Langhoff escribió: > > > > > As I have a Pg install where the locale is already en_US.UTF-8, and > > > the database already exists, is there a DB-scoped way of controlling > > > the locale? > > > > Not reall

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Tino Wildenhain
Stefan Schwarzer schrieb: SELECT * FROM gdp WHERE y1970 NOT NULL AND y1971 NOT NULL AND y2005 NOT NULL It sounds like a bad table design, because i think you need an field "f_year" and "value_of_f_year" then there would be entries like f_year;value_of_f_year 1970 'NULL' 1970 dfgsd

[GENERAL] Version 8.2.4 ecpg - function not found

2007-09-06 Thread Paul Tilles
We are upgrading from Version 7.4.8 to 8.2.4. In 7.4, there were functions called ECPGis_informix_null ECPGset_informix_null In 8.2.4, I do not see these functions. Instead, I see functions ECPGis_noind_null ECPGset_noind_null Are they functionally the same? Also, the 8.2.4 doc (Section 3

ANY (was: Re: [GENERAL] Alias "all fields"?)

2007-09-06 Thread Alban Hertroys
Richard Huxton wrote: > Well you can get closer: > > SELECT * FROM gdp WHERE (y1970+y1971+...+y2005) IS NOT NULL; > > This makes use of the fact that X+NULL = NULL I was going to suggest SELECT * FROM gdp WHERE NULL NOT IN (y1970, y1971, y1972); But that doesn't work. So I tried using ANY with

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Franz . Rasper
>My table design is - due to some import/update reasons - surely not >the best one, but pretty simple: > >idy1970y1971y1972 .. >1 23 25 28 >2 NULLNULL 5 >3 NULL 94 102 > >What do you think? Normally i use perl with DBD/D

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Tino Wildenhain
Stefan Schwarzer schrieb: Hi there, I guess I am demanding too much But it would be cool to have some kind of alias for "all fields". What I mean is this here: Instead of this: SELECT * FROM gdp WHERE y1970 NOT NULL AND y1971 NOT NULL AND y2005 NOT NULL I would like to ha

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Richard Huxton
Stefan Schwarzer wrote: SELECT * FROM gdp WHERE y1970 NOT NULL AND y1971 NOT NULL AND y2005 NOT NULL I would like to have this: SELECT * FROM gdp WHERE all-fields NOT NULL Well you can get closer: SELECT * FROM gdp WHERE (y1970+y1971+...+y2005) IS NOT NULL; This makes use

Re: [GENERAL] Need suggestion on how best to update 3 million rows

2007-09-06 Thread hubert depesz lubaczewski
On Thu, Sep 06, 2007 at 01:39:51PM +0200, Nis Jørgensen wrote: > Rubbish. From the documentation: hmm .. i'm sorry - i was *sure* about it because we were bitten by something like this lately - apparently it was similiar but not the same. sorry again for misinformation. depesz -- quicksil1er:

  1   2   >