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

2007-09-06 Thread Alban Hertroys
Ow Mun Heng wrote: > I found 2 new ways to do this. > > option 1 > --- > > create table foo as select unique_id, rtrim(number) as number from foo; > alter table add primary key... > create index... > drop org_table > alter table rename... > All this is ~10min This only works if you don't hav

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

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 01:13, Ow Mun Heng wrote: > I have a table in PG, Pulled from SQL Server using Perl DBI (w/o using > chopblanks) and have ended up with a column where the "space" is being > interpreted as a value. > > eg: > > "ABC " when it should be "A

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

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 04:07 -0500, Ron Johnson wrote: > On 09/06/07 01:13, Ow Mun Heng wrote: > > update org_column set number = foo.number where foo.unique_id = > > org_column=unique_id. > > Number? Where does "number" come from? Unless you've got weird > field names, that doesn't sound like

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

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 11:08 +0200, Alban Hertroys wrote: > Ow Mun Heng wrote: > > I found 2 new ways to do this. > > > > option 1 > > --- > > > > create table foo as select unique_id, rtrim(number) as number from foo; > > alter table add primary key... > > create index... > > drop org_table >

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

2007-09-06 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/06/07 04:20, Ow Mun Heng wrote: > On Thu, 2007-09-06 at 04:07 -0500, Ron Johnson wrote: > >> On 09/06/07 01:13, Ow Mun Heng wrote: > >>> update org_column set number = foo.number where foo.unique_id = >>> org_column=unique_id. >> Number? Where

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

2007-09-06 Thread Ow Mun Heng
On Thu, 2007-09-06 at 04:47 -0500, Ron Johnson wrote: > Maybe there's an English language "issue", or maybe I'm just > excessively picky, but using "number" in this context is confusing. My Bad.. hehe.. > Then I agree with Alban: > update table set number = trim(number); > or, if you need the

Re: [GENERAL] UTF8 frustrations

2007-09-06 Thread Albe Laurenz
[EMAIL PROTECTED] wrote: > > Here is the latest issue, to verify that the pg_dump works, I'm going > to do dump and restore on the same host/cluster. > > Source: > DB_source: > Red Hat Enterprise Linux AS release 4 (Nahant Update 4) > psql 8.2.4 > Destination: > same machine different db name

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

2007-09-06 Thread Richard Huxton
Ow Mun Heng wrote: On Thu, 2007-09-06 at 04:47 -0500, Ron Johnson wrote: Maybe there's an English language "issue", or maybe I'm just excessively picky, but using "number" in this context is confusing. My Bad.. hehe.. Then I agree with Alban: update table set number = trim(number); or, if

[GENERAL] Rankinf of Results?

2007-09-06 Thread Stefan Schwarzer
Hi there, I would like to achieve some kind of rating of the results of a query. As it searches in different fields of the (metadata) database, matching keywords of the field of the "data variable names" are more important than matching keywords in the "description" field... I have no ide

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 11:08:02AM +0200, Alban Hertroys wrote: > create index tmp_idx on table(number) where number != trim(number); > analyze table; > update table set number = trim(number) where number != trim(number); dont use !=. use <>. != does something different, and in fact it is not a re

Re: [GENERAL] SQL query with IFs (?) to "Eliminate" NULL Values

2007-09-06 Thread Nis Jørgensen
Stefan Schwarzer skrev: > Hi there, > > I want to calculate per Capita values on-the-fly, taking for example the > "Total GDP" data set and divide it by "Total Population". Now, each of > these data sets have a couple of "0" or "-" values (the latter being > the indicator for : "no data availa

Re: [GENERAL] Querying database for table pk - better way?

2007-09-06 Thread Merlin Moncure
On 9/5/07, Josh Trutwin <[EMAIL PROTECTED]> wrote: > On Wed, 5 Sep 2007 19:08:33 -0400 > "Merlin Moncure" <[EMAIL PROTECTED]> wrote: > > > On 9/5/07, Josh Trutwin <[EMAIL PROTECTED]> wrote: > > > I have a php application that needs to query the PK of a table - > > > I'm currently using this from th

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

2007-09-06 Thread Nis Jørgensen
hubert depesz lubaczewski skrev: > On Thu, Sep 06, 2007 at 11:08:02AM +0200, Alban Hertroys wrote: >> create index tmp_idx on table(number) where number != trim(number); >> analyze table; >> update table set number = trim(number) where number != trim(number); > > dont use !=. use <>. != does somet

[GENERAL] Alias "all fields"?

2007-09-06 Thread Stefan Schwarzer
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 have this: SELECT *

[GENERAL] Alias "all fields"?

2007-09-06 Thread Franz . Rasper
Hmm >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 1971 'NULL' 1971 ..

Re: [GENERAL] Alias "all fields"?

2007-09-06 Thread Stefan Schwarzer
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 1971 'NULL' 1971 whe

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:

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 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

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

[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

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

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] 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

[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

[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

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] 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] 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

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] 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] 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] 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] 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

[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('

[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] 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] 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

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

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] 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] 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] 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] 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] 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

[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] 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] 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] 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] 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] 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

[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] 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

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] 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] 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

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] 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 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] 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

[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] 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

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] 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] 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:/

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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
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] 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] 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] 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] 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] 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

[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

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] 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

  1   2   >