Re: [GENERAL] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-30 Thread Dave Page
Laurent Duperval wrote: Does this allow creating more connections? At some point, the discussion became too technical for me, and I no longer could tell if the answer was for developers of for users. Yeah, it did become something of an investigation into the problem which probably should have

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Jeff Davis
On Fri, 2007-11-30 at 21:42 +0800, Lincoln Yeoh wrote: > --- post follows --- > by Anonymous Coward on Wed Nov 28, '07 03:23 PM (#21509173) > > Speak for your database -- postgresql does. > > Postgresql's "table inheritance" is a flawed concept and has nothing to do > with the *type system*. Rela

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Postgres User
Sure, I'd be glad to provide any additional code or info that I can. This issue took me quite awhile to track down from the 200-line function that was breaking. When I execute the function defined above, here's what I see returned: select divide() ?column? 0 Hop

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Alvaro Herrera
Pavel Stehule escribió: > On 30/11/2007, Cultural Sublimation <[EMAIL PROTECTED]> wrote: > > But still on that subject: is my version of get_items2 the simplest > > that is possible in PL/pgSQL? It seems awfully verbose compared to > > the SQL version... > > no. Your simplest version is histori

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-30 Thread Greg Smith
On Fri, 30 Nov 2007, Lincoln Yeoh wrote: Anecdotal - I have found "smart" raid controllers to fail more often than dumb scsi controllers (or even SATA/PATA controllers), and some seem more failure prone than semi-decent operating systems. You'd need to name some names here for this to mean to

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-30 Thread Greg Smith
On Fri, 30 Nov 2007, Guido Neitzer wrote: Actually - In our test if just used with a similar load as pgbench (e.g. typical web applications) Mac OS X 10.4.7 performed better then Yellow Dog Linux (I was testing with G5 hardware) on the same hardware as soon as more than about 90 concurrent cl

[GENERAL] power failure....

2007-11-30 Thread Tom Allison
How do I restart the following with some level of sanity? 2007-11-30 19:35:20 EST LOG: could not load root certificate file "root.crt": no SSL error reported 2007-11-30 19:35:20 EST DETAIL: Will not verify client certificates. 2007-11-30 19:35:20 EST LOG: database system was interrupted at

Re: [GENERAL] power failure....

2007-11-30 Thread Tom Lane
Tom Allison <[EMAIL PROTECTED]> writes: > 2007-11-30 19:35:20 EST PANIC: could not locate a valid checkpoint > record Ugh :-(. pg_resetxlog should get you back into the database, but it's anybody's guess whether and how badly the contents will be corrupted. I would recommend trying a dump/relo

[GENERAL] libeay32.dll and libpq.dll

2007-11-30 Thread seijin
I'm working on a Windows application that will connect to a Postgresql database without having through ODBC. I'm using libpq and testing with a simple PQconnectdb/PQfinish call but the application fails as soon as PQconnectdb is called. The error I get says that libeay32.dll is missing. I have n

Re: [GENERAL] Will PG use composite index to enforce foreign keys?

2007-11-30 Thread Scott Marlowe
On Nov 29, 2007 10:51 AM, John Burger <[EMAIL PROTECTED]> wrote: > Hi - > > I know that the foreign key machinery will use an index on the > referring column if one exists. My question is whether it will use a > composite index? For instance: > > create table allLemmaSenseMap ( >wordID in

Re: [GENERAL] Postgres shutting down by itself...why?

2007-11-30 Thread Tom Lane
"Dave Horn" <[EMAIL PROTECTED]> writes: > I've recently installed Postgres 8.2.x on a RedHat Linux system. Everything > seems fine and normal. I can start and stop the server without errors. > When the server is running, everything appears normal. The problem is that > about every 2 to 3 hours I

[GENERAL] Postgres shutting down by itself...why?

2007-11-30 Thread Dave Horn
I've recently installed Postgres 8.2.x on a RedHat Linux system. Everything seems fine and normal. I can start and stop the server without errors. When the server is running, everything appears normal. The problem is that about every 2 to 3 hours I find the server is just not running anymore. I'

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 12:34:57PM -0800, Postgres User wrote: > Sorry, here's the code: The code you posted won't work on a blank database, I needed to delete the test prefix to table2. I've adjusted it to be hopefully what you did. My output is: --- CREATE TABLE CREATE FUNCTION

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Pavel Stehule
On 30/11/2007, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Pavel Stehule escribió: > > On 30/11/2007, Cultural Sublimation <[EMAIL PROTECTED]> wrote: > > > > But still on that subject: is my version of get_items2 the simplest > > > that is possible in PL/pgSQL? It seems awfully verbose compared to

[GENERAL] HA and Replication - how to choose among all the available solutions

2007-11-30 Thread Pascal Cohen
Hello I am facing a probably very common problem. I made a search in the recent archives and could find many posts related to my issue. But I did not get exactly "the answer" to my question. How can I chose among the different existing tools to enable High Availability and Load-balancing/Repli

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Pavel Stehule
On 30/11/2007, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Pavel Stehule escribió: > > On 30/11/2007, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > > Pavel Stehule escribió: > > > > On 30/11/2007, Cultural Sublimation <[EMAIL PROTECTED]> wrote: > > > > > > > > But still on that subject: is my vers

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Alvaro Herrera
Pavel Stehule escribió: > On 30/11/2007, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > Pavel Stehule escribió: > > > On 30/11/2007, Cultural Sublimation <[EMAIL PROTECTED]> wrote: > > > > > > But still on that subject: is my version of get_items2 the simplest > > > > that is possible in PL/pgSQL?

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Jeff Davis
On Fri, 2007-11-30 at 14:33 +, Peter Childs wrote: > Table Inheritance is table structure ie a child table has all the same > columns as the old one with some added columns that sore specialist > items. This feature is used heavily used in Table Partitioning. > Perhaps it should be renamed. I

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Jeff Davis
On Fri, 2007-11-30 at 16:06 +, Gregory Stark wrote: > "Lincoln Yeoh" <[EMAIL PROTECTED]> writes: > > > The correct way to store types and subtypes in the database is to store them > > in the columns. In other words, choose attribute VALUES from a TYPE SYSTEM. > > Nothing else in the relational

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Pavel Stehule
On 30/11/2007, Cultural Sublimation <[EMAIL PROTECTED]> wrote: > > I would guess you're calling it like: > > > > SELECT get_items2(); > > > > whereas, you should call set returning functions like: > > > > SELECT * FROM get_items2(); > > Hi, > > Yeah, that was the problem -- thanks! > > But stil

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Pavel Stehule
Hello > Unfortunately it doesn't work! Postgresql complains that "set-valued > function called in context that cannot accept a set". Anyway, what am > I doing wrong, and what is the simplest way of translating get_items > in PL/pgSQL? > > Thanks in advance! > C.S. try select * from get_items2

[GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Cultural Sublimation
Hi, I am having trouble getting a really simple PL/pgSQL function to work. I am beginning to wonder if there is not a bug somewhere, or if Postgresql's type system is not broken. Anyway, suppose I have the following table and type defined: CREATE TABLE items (

Re: [GENERAL] Postgres High Availablity Solution needed for hot-standby and load balancing

2007-11-30 Thread Guido Neitzer
On 30.11.2007, at 02:34, Usama Dar wrote: Have you looked at pgCluster I project where the "latest news" page shows the newest entry from March 2005 and the install talks only about PostgreSQL 8.0 isn't really inspiring confidence ... Continuent is very active, but it limits the servers

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 08:20:30AM -0800, Postgres User wrote: > tom- did you test this on wndows? you can ignore the namespace- i'm > using it consistently but removed from the test code to simplify > > this problem occurs repeatedly in my code. my guess is that it's a > bug in the windows buil

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Postgres User
tom- did you test this on wndows? you can ignore the namespace- i'm using it consistently but removed from the test code to simplify this problem occurs repeatedly in my code. my guess is that it's a bug in the windows build. On Nov 30, 2007 8:13 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > Martij

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Tom Lane
Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > On Fri, Nov 30, 2007 at 12:23:31AM -0800, Postgres User wrote: >> However, I have found that my record variable is not assigned proper >> field-level datatypes. As a result, I'm unable to write basic math >> calcs in pg/sql without a lot of type

Re: [GENERAL] Postgres High Availablity Solution needed for hot-standby and load balancing

2007-11-30 Thread Guido Neitzer
On 30.11.2007, at 12:50, Shane Ambler wrote: I project where the "latest news" page shows the newest entry from March 2005 and the install talks only about PostgreSQL 8.0 isn't really inspiring confidence ... Although they aren't the fastest with releases, they really aren't as bad as tha

[GENERAL] Fault Tolerance & Master-master-Replication Solution needed

2007-11-30 Thread Ragnar Heil
Hi, I am searching for a Fault Tolerance & Master-master-Replication Solution which fulfills these requirements Req1) Master master replication supported, not only master / slave replication with only the master being writable. If you do have multiple slave systems they are only useful from a b

Re: [GENERAL] FK index q'n

2007-11-30 Thread Tom Lane
rihad <[EMAIL PROTECTED]> writes: > Given this table: > CREATE TABLE foo ( > id integer primary key, > bar_id integer references bar (id) > ); > and provided that bar.id is itself a PK, do I still need to create an > index on bar_id if often doing queries like: > SELECT MIN(id) FROM foo

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Tom Lane
Ow Mun Heng <[EMAIL PROTECTED]> writes: > Being Corporate owned is not a bad thing(tm) for they present themselves > with these differences. > ... > --> It provides a feel-good feeling knowing that a big company, after > having paid XXX amount on it, the solution will not die in X number of > years

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Ivan Sergio Borgonovo
On Fri, 30 Nov 2007 21:42:53 +0800 Lincoln Yeoh <[EMAIL PROTECTED]> wrote: > Hi, > > Found this post on Slashdot which I found interesting, any comments? I wrote a memo about inheritance at the bottom of which there are 2 links to good use of the feature: http://www.webthatworks.it/d1/page/post

Re: [GENERAL] psql lo_export documentation

2007-11-30 Thread Jorgen Austvik - Sun Norway
Albe Laurenz wrote: With experiments I find that lo_export on 8.3 stores the files on the database server file system. I also think it would be good if the documentation said that you need to be database superuser to use this I think you are confusing lo_export(), the server function, and \lo_

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Ivan Sergio Borgonovo
On Fri, 30 Nov 2007 13:22:31 - "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > > --> It provides a feel-good feeling knowing that a big company, > > after having paid XXX amount on it, the solution will not die in > > X number of years leaving the customer stranded. > > That's a valid conc

Re: [GENERAL] scrollable cursor in functions

2007-11-30 Thread Pavel Stehule
Hello 8.1.x doesn't support scrollable cursors in plpgsql. Its supported only in 8.3. Regards Pavel Stehule On 30/11/2007, Cedric Boudin <[EMAIL PROTECTED]> wrote: > Dear members of the list, > > on a server 8.1.9 I try to do this: > ++ > create or replace function dummy() returns void >

Re: [GENERAL] Recheck condition

2007-11-30 Thread Josh Harrison
> > > > > > *Query1* > > > > SELECT person_id FROM person WHERE (column1=1 AND column2='62') > > > > INTERSECT > > > > SELECT person_id FROM person WHERE (column1=1 AND column2='189') > > > I get the same plan(see below) with 'sort' for 'intersect all' > operation > > too. Why is intersect n

Re: [GENERAL] Recheck condition

2007-11-30 Thread Josh Harrison
> > > Or using an IN or EXISTS query: > > SELECT person_id > FROM person > WHERE column1=1 > AND column2='62' > AND person_id IN ( > SELECT person_id > FROM person > WHERE column1=1 >AND column2='189' > ) > > or > > SELECT person_id > FROM person

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Andrew Sullivan
On Fri, Nov 30, 2007 at 01:22:31PM -, Greg Sabino Mullane wrote: > or a scapegoat. Please don't perpetuate this urban myth. No companies are > suing Oracle and Microsoft because of their products, and companies have > no expectation of doing so. It might be nice if they did, and some theorize

Re: [GENERAL] psql lo_export documentation

2007-11-30 Thread Albe Laurenz
Jorgen Austvik wrote: > > The 8.3 psql documentation says this about lo_export: > [...] > \lo_export Note that this is subtly different from the server function > lo_export, which acts with the permissions > of the user that the database server runs as and on

[GENERAL] scrollable cursor in functions

2007-11-30 Thread Cedric Boudin
Dear members of the list, on a server 8.1.9 I try to do this: ++ create or replace function dummy() returns void as $$ DECLARE liahona SCROLL CURSOR with hold FOR SELECT * FROM album ; BEGIN --DECLARE liahona SCROLL CURSOR with hold FOR SELECT * FROM album ; -- Set up a cursor: -- Fetch

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-30 Thread Lincoln Yeoh
At 09:09 PM 11/30/2007, Trevor Talbot wrote: The controller always exists, so it's not moving a point of failure; if a controller goes you've lost the disk anyway. Anecdotal - I have found "smart" raid controllers to fail more often than dumb scsi controllers (or even SATA/PATA controllers),

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Peter Childs
On 30/11/2007, Lincoln Yeoh <[EMAIL PROTECTED]> wrote: > > Hi, > > Found this post on Slashdot which I found interesting, any comments? --- post follows --- > by Anonymous Coward on Wed Nov 28, '07 03:23 PM (#21509173) > > Speak for your database -- postgresql does. > > Postgresql's "table inheri

[GENERAL] postgresql table inheritance

2007-11-30 Thread Lincoln Yeoh
Hi, Found this post on Slashdot which I found interesting, any comments? --- post follows --- by Anonymous Coward on Wed Nov 28, '07 03:23 PM (#21509173) Speak for your database -- postgresql does. Postgresql's "table inheritance" is a flawed concept and has nothing to do with the *type system

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Thomas Kellerer
Peter Childs, 30.11.2007 14:25: I found ingres website but no mention of a database system so I though they were something else that had taken on the name... http://www.ingres.com/downloads/prod-comm-download.php Found this using Google ;) Thomas ---(end of broad

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Peter Childs
On 30/11/2007, Alexander Staubo <[EMAIL PROTECTED]> wrote: > > On 11/30/07, Peter Childs <[EMAIL PROTECTED]> wrote: > > Now We used somthing called Ingres at University (I graduated in 2000) > but > > I've not heard anything about it since and google does not return > anything. > > So we might be

Re: [GENERAL] Recheck condition

2007-11-30 Thread Josh Harrison
On Nov 30, 2007 7:55 AM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Josh Harrison escribió: > > > Thanks... > > I have 1 more question in the same line... > > > > *Query1* > > SELECT person_id FROM person WHERE (column1=1 AND column2='62') > > INTERSECT > > SELECT person_id FROM person WHERE

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > --> It provides a feel-good feeling knowing that a big company, after > having paid XXX amount on it, the solution will not die in X number of > years leaving the customer stranded. That's a valid concern. Not sure having a roadmap really cor

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Albe Laurenz
Glyn Astill wrote: > I've setup a postgres 8.2 server and have a database setup with UTF8 > encoding. I intend to read some of our legacy data into the table, > this legacy data is in ASCII format, and as far as I know is 8 bit > ASCII. > > We have a migration tool from mertechdata.com to convert

Re: [GENERAL] Recheck condition

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 08:21:18AM -0500, Josh Harrison wrote: > > > *Query1* > > > SELECT person_id FROM person WHERE (column1=1 AND column2='62') > > > INTERSECT > > > SELECT person_id FROM person WHERE (column1=1 AND column2='189') > I get the same plan(see below) with 'sort' for 'inters

[GENERAL] FK index q'n

2007-11-30 Thread rihad
Given this table: CREATE TABLE foo ( id integer primary key, bar_id integer references bar (id) ); and provided that bar.id is itself a PK, do I still need to create an index on bar_id if often doing queries like: SELECT MIN(id) FROM foo WHERE bar_id IS NULL; Table foo will contain a s

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Alexander Staubo
On 11/30/07, Peter Childs <[EMAIL PROTECTED]> wrote: > Now We used somthing called Ingres at University (I graduated in 2000) but > I've not heard anything about it since and google does not return anything. > So we might be talking about different products? http://en.wikipedia.org/wiki/Ingres A

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Peter Childs
On 30/11/2007, Ow Mun Heng <[EMAIL PROTECTED]> wrote: > > I was browsing the net yesterday after reading through the thread on PG > vs Informix and I was curious as to Ingress. > > Ingress is also an open source RDBM (and DataWarehouseing) and I'm > wondering if anyone here has anything to say abou

Re: [GENERAL] Recheck condition

2007-11-30 Thread Alvaro Herrera
Josh Harrison escribió: > Thanks... > I have 1 more question in the same line... > > *Query1* > SELECT person_id FROM person WHERE (column1=1 AND column2='62') > INTERSECT > SELECT person_id FROM person WHERE (column1=1 AND column2='189') Hmm, I think INTERSECT (and EXCEPT) is pretty stupid

Re: [GENERAL] Recheck condition

2007-11-30 Thread Josh Harrison
On Nov 29, 2007 8:15 AM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Josh Harrison escribió: > > > > > > > For example if I have a table Person with 3 fields > (name,city_id,age). > > > And > > > > the table contains 1000 rows. The table has 2 indexes city_id and > age > > > > If I have a query :

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-30 Thread Wolfgang Keller
Anyway, how does MacOS X (both 10.4 and 10.5) compare to Windows (2000, XP, Vista etc.) on the same hardware? And Linux to (Free-/Net-/whatever) BSD? Apple hardware gets so expensive for some types of database configurations that such a comparision doesn't even make a lot of sense. So far my

[GENERAL] Moving lock file (/tmp/.s.PGSQL.)

2007-11-30 Thread Madison Kelly
Hi all, If there a ./configure switch (or config file/command line switch) to tell postgresql to put the lock file '.s.PGSQL..lock' and socket '.s.PGSQL.' in a different directory? Thanks all! Madi ---(end of broadcast)--- TIP 9: In versions

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Usama Dar
On 11/30/07, Glyn Astill <[EMAIL PROTECTED]> wrote: > > Hi People, > > I've setup a postgres 8.2 server and have a database setup with UTF8 > encoding. I intend to read some of our legacy data into the table, > this legacy data is in ASCII format, and as far as I know is 8 bit > ASCII. > > We have

Re: [GENERAL] pgcrypto functions fail for asymmetric encryption/decryption

2007-11-30 Thread Marko Kreen
On 11/29/07, Stefan Niantschur <[EMAIL PROTECTED]> wrote: > I have a table with userids and public keys. I want to write a function > which does a select and returns the result pgp encrypted. > > However, I have some problems: Could you send the keys you have problems with? If actual keys then of

[GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Glyn Astill
Hi People, I've setup a postgres 8.2 server and have a database setup with UTF8 encoding. I intend to read some of our legacy data into the table, this legacy data is in ASCII format, and as far as I know is 8 bit ASCII. We have a migration tool from mertechdata.com to convert these files that ar

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 09:44:36AM +, Glyn Astill wrote: > I've setup a postgres 8.2 server and have a database setup with UTF8 > encoding. I intend to read some of our legacy data into the table, > this legacy data is in ASCII format, and as far as I know is 8 bit > ASCII. Your problem is tha

Re: [GENERAL] Threads limit for postmaster

2007-11-30 Thread Magnus Hagander
> > > Hi, > > > I have a problem when a lot of connexions are opened on postgresql. > > > > > > When 243 threads have been created by postmaster, the next CreateThread > > > fails and the following error is written in pglogs : "FATAL: could not > > > create sigchld waiter thread: error code 8". >

Re: [GENERAL] Threads limit for postmaster

2007-11-30 Thread Usama Dar
On 11/30/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > > Guillaume Pungeot wrote: > > Hi, > > I have a problem when a lot of connexions are opened on postgresql. > > > > When 243 threads have been created by postmaster, the next CreateThread > > fails and the following error is written in pglogs

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 12:23:31AM -0800, Postgres User wrote: > However, I have found that my record variable is not assigned proper > field-level datatypes. As a result, I'm unable to write basic math > calcs in pg/sql without a lot of typecasting. What version are you running. On my 8.1.9 test

[GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Postgres User
According to the docs, record variables "take on the actual row structure of the row they are assigned during a SELECT or FOR command." However, I have found that my record variable is not assigned proper field-level datatypes. As a result, I'm unable to write basic math calcs in pg/sql without a

Re: [GENERAL] Simple math statement - problem

2007-11-30 Thread Postgres User
The problem turned out to be related to my function.. Given this table: CREATE TABLE "table2" ( "s_val" numeric(6,2), "e_val" numeric(6,2) ) WITH OIDS; The following functions of code will set retval = NULL; declare retval numeric(6,2); rec record; begin SELECT * INTO rec FROM tabl

Re: [GENERAL] Porting from FrontBase

2007-11-30 Thread Martin
In article <[EMAIL PROTECTED]>, David Fetter <[EMAIL PROTECTED]> wrote: >FrontBase has a Perl DBI driver >, so you may be >able to use DBI-Link . > >If you try that approach, let me know how it works ou

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Jeff Davis
On Sat, 2007-12-01 at 04:16 +0800, Lincoln Yeoh wrote: > The people who try to make a database that maps so well with the > objects in a single particular program are solving a very different > problem from those of us who use a database partly as a "lingua > franca" (or "vehicular language") fo

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Postgres User
Sorry, here's the code: CREATE TABLE table2 ( "s_val" NUMERIC(6,2), "e_val" NUMERIC(6,2) ); CREATE FUNCTION divide () RETURNS numeric AS $body$ declare retval numeric(6,2); rec record; begin SELECT * INTO rec FROM test.table2 LIMIT 0; rec.s_val = 100.0; rec.e_val = 101.0; -- return

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Sam Mason
On Fri, Nov 30, 2007 at 09:09:28AM -0800, Cultural Sublimation wrote: > Postgresql complains that "set-valued > function called in context that cannot accept a set". Anyway, what am > I doing wrong, and what is the simplest way of translating get_items > in PL/pgSQL? I would guess you're calling

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Ivan Sergio Borgonovo
On Fri, 30 Nov 2007 13:22:31 - "Greg Sabino Mullane" <[EMAIL PROTECTED]> wrote: > > --> It provides a feel-good feeling knowing that a big company, > > after having paid XXX amount on it, the solution will not die in > > X number of years leaving the customer stranded. > > That's a valid conc

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-30 Thread Trevor Talbot
On 11/30/07, Wolfgang Keller <[EMAIL PROTECTED]> wrote: > > For example, if you have an application that needs high > > database write throughput, to make that work well with PostgreSQL you > > must have a controller with a battery backed cache. > Hmm, what would be the difference compared to ple

Re: [GENERAL] can't createdb with my new user

2007-11-30 Thread Usama Dar
On 11/28/07, della <[EMAIL PROTECTED]> wrote: > > hi, I describe my steps: > > 1. installed postgresql 8.2 via apt-get (ubuntu gutsy) > 2. # sudo -u postgres psql template1 > 3. template1=# CREATE ROLE kokomo WITH LOGIN CREATEDB PASSWORD > 'kokomo'; > 4. template1=# \q > 5. # createdb kokomo_dev -U

[GENERAL] psql lo_export documentation

2007-11-30 Thread Jorgen Austvik - Sun Norway
Hi, The 8.3 psql documentation says this about lo_export: --8<8<8<8<8<8<-- \lo_export class="parameter">loid class="parameter">filename Reads the large object with OID loid from the dat

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Gregory Stark
[Generally it's not a good idea to start a new thread by responding to an existing one, it confuses people and makes it more likely for your question to be missed.] "Glyn Astill" <[EMAIL PROTECTED]> writes: > Hi People, > > I've setup a postgres 8.2 server and have a database setup with UTF8 >

Re: [GENERAL] Postgres High Availablity Solution needed for hot-standby and load balancing

2007-11-30 Thread Usama Dar
On 11/29/07, Ragnar Heil <[EMAIL PROTECTED]> wrote: > > Hi > > our customer has got the following requirements: > > Req1) Master master replication supported, not only master / slave > replication with only the master being writable. If you do have multiple > slave systems they are only useful from

Re: [GENERAL] Moving lock file (/tmp/.s.PGSQL.)

2007-11-30 Thread A. Kretschmer
am Fri, dem 30.11.2007, um 5:22:34 -0500 mailte Madison Kelly folgendes: > Hi all, > > If there a ./configure switch (or config file/command line switch) to > tell postgresql to put the lock file '.s.PGSQL..lock' and socket > '.s.PGSQL.' in a different directory? > > Thanks all! Option uni

Re: [GENERAL] Moving lock file (/tmp/.s.PGSQL.)

2007-11-30 Thread Tomasz Ostrowski
On Fri, 30 Nov 2007, Madison Kelly wrote: > If there a ./configure switch (or config file/command line switch) to > tell postgresql to put the lock file '.s.PGSQL..lock' and socket > '.s.PGSQL.' in a different directory? There's no ./configure option, so you should change DEFAULT_PGSO

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Postgres User
8.2 / Windows (a development-only pc) On Nov 30, 2007 12:50 AM, Martijn van Oosterhout <[EMAIL PROTECTED]> wrote: > On Fri, Nov 30, 2007 at 12:23:31AM -0800, Postgres User wrote: > > However, I have found that my record variable is not assigned proper > > field-level datatypes. As a result, I

Re: [GENERAL] 1 cluster on several servers

2007-11-30 Thread Shane Ambler
Willy-Bas Loos wrote: I'll take that as a "no". What i mean is to actually run exactly one cluster (no replicated copy) on more than one server. Of course, if that were possible, why would people bother with replication.. What you may be thinking of is having several machines running postgres

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 09:42:53PM +0800, Lincoln Yeoh wrote: > Found this post on Slashdot which I found interesting, any comments? I think this person is slightly confused. > Table inheritence doesn't even make sense. Tables are analogous to > relations. > All relations are the same type, the

Re: [GENERAL] PostgresSQL vs Ingress

2007-11-30 Thread Andrew Sullivan
On Fri, Nov 30, 2007 at 01:25:46PM +, Peter Childs wrote: > > In short the current Ingres is related to Postgresql like Xorg is related to > XFree86 or Ubuntu to Debian but much much much older. Not quite, according to the programmers who worked on Postgres at UC Berkeley. While X.org and Ub

Re: [GENERAL] Recheck condition

2007-11-30 Thread Gregory Stark
"Martijn van Oosterhout" <[EMAIL PROTECTED]> writes: > On Fri, Nov 30, 2007 at 08:21:18AM -0500, Josh Harrison wrote: >> > > *Query1* >> > > SELECT person_id FROM person WHERE (column1=1 AND column2='62') >> > > INTERSECT >> > > SELECT person_id FROM person WHERE (column1=1 AND column2='189')

Re: [GENERAL] FK index q'n

2007-11-30 Thread Alvaro Herrera
Tom Lane wrote: > rihad <[EMAIL PROTECTED]> writes: > > Given this table: > > CREATE TABLE foo ( > > id integer primary key, > > bar_id integer references bar (id) > > ); > > and provided that bar.id is itself a PK, do I still need to create an > > index on bar_id if often doing queries

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Gregory Stark
"Lincoln Yeoh" <[EMAIL PROTECTED]> writes: > The correct way to store types and subtypes in the database is to store them > in the columns. In other words, choose attribute VALUES from a TYPE SYSTEM. > Nothing else in the relational model needs to be changed. Something like > this, in hypothetica

Re: [GENERAL] Recheck condition

2007-11-30 Thread Martijn van Oosterhout
On Fri, Nov 30, 2007 at 11:27:24AM -0500, Josh Harrison wrote: > Thanks for your reply > Is there a way to get them not to use the > heap for intermediate result and go to heap only for final data? This will > drastically improve the performance but Im not sure if postgres can do that? > Will creat

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-30 Thread Guido Neitzer
On 30.11.2007, at 04:48, Wolfgang Keller wrote: LSI drivers are not available for MacOS X on PowerMacs? Ouch. The problem is that they suck as they can't to channel bundling for higher trough-put to a single disk array. [not your comment, but referred there] and Mac OS X, PostgreSQL has e

Re: [GENERAL] PL/pgSQL and SETOF

2007-11-30 Thread Cultural Sublimation
> I would guess you're calling it like: > > SELECT get_items2(); > > whereas, you should call set returning functions like: > > SELECT * FROM get_items2(); Hi, Yeah, that was the problem -- thanks! But still on that subject: is my version of get_items2 the simplest that is possible in PL/

Re: [GENERAL] Postgres High Availablity Solution needed for hot-standby and load balancing

2007-11-30 Thread Shane Ambler
Guido Neitzer wrote: On 30.11.2007, at 02:34, Usama Dar wrote: Have you looked at pgCluster I project where the "latest news" page shows the newest entry from March 2005 and the install talks only about PostgreSQL 8.0 isn't really inspiring confidence ... Although they aren't the fastest

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Lincoln Yeoh
At 03:17 AM 12/1/2007, Jeff Davis wrote: The impedance mismatch has more to do with the fact that the meaning of an application's internal data structures changes frequently (through revisions of the code), while data in a database needs to be consistent across long periods of time. So, a well-de