Re: [GENERAL] [NOVICE] Recursive relationship - preventing cross-index entries.

2007-06-19 Thread Michael Glaesemann
[Removing pgsql-novice. Please don't cross-post. Choose one list or another at a time. ] On Jun 19, 2007, at 23:04 , Andrew Maclean wrote: I got no answer so I am trying again. In a nutshell, if I have a recrusive relationship as outlined below, how do I implement a rule for the adjustment

[GENERAL] Recursive relationship - preventing cross-index entries.

2007-06-19 Thread Andrew Maclean
I got no answer so I am trying again. In a nutshell, if I have a recrusive relationship as outlined below, how do I implement a rule for the adjustments table that prevents the entry of an Id into the Ref column if the id exists in the Id column and vice versa? If I have a payments table which h

Re: [GENERAL] Excell

2007-06-19 Thread David Gardner
It should work, but you could post your question on pgsql-odbc and get an answer from someone who has more experience with Excel and PostgreSQL via the ODBC driver. Bob Pawley wrote: Thanks Does one version of ODBC work for all versions of Excel and Postgresql. I am wanting to transfer one o

Re: [GENERAL] Excell

2007-06-19 Thread Bob Pawley
Thanks Does one version of ODBC work for all versions of Excel and Postgresql. I am wanting to transfer one or two tables from Excel and manipulate the information in Postgresql then transfer the results back to Excel as a single table. I am using Excel 2000 and PostgreSql 8.1. Bob -

Re: [GENERAL] Iterate over an array in stored procedure

2007-06-19 Thread Merlin Moncure
On 6/20/07, Henrik Zagerholm <[EMAIL PROTECTED]> wrote: Hello, I wonder how I can iterate over a sql array in a pl/perl function. I want to pass in an text[] to a function and then iterate through the values and run it through a perl sprintf but I can't seem to get it to work. Should I do a ge

[GENERAL] PostgreSQL Installer for Windows x64

2007-06-19 Thread EBIHARA, Yuichiro
Hi, Can I get a PostgreSQL Installer for Windows x64(EM64T)? That for 32bit Windows is available at http://www.postgresql.org/ftp/win32/ but I need x64 native version. Any information would be appreciated. Thanks, ebi ---(end of broadcast)---

Re: [GENERAL] Excell

2007-06-19 Thread David Gardner
Agreed ODBC is the way to go, depending on what you are doing, Access may be helpfull as an intermediate step. Joshua D. Drake wrote: Bob Pawley wrote: Hi All Is there a fast and easy method of transferring information between MS Excel and PostgreSQL?? odbc? Joshua D. Drake Bob Pawl

Re: [GENERAL] regexp searching in arrays not working?

2007-06-19 Thread Tom Lane
"Rhys Stewart" <[EMAIL PROTECTED]> writes: > Is regex searching not functioning (as i expect it to?) ~ expects the pattern on the right, not the left. So it's taking your array entries as patterns, which don't match the data 'Trans'. Since there's no "(array) ANY op scalar" syntax, the only way

[GENERAL] regexp searching in arrays not working?

2007-06-19 Thread Rhys Stewart
Hi all, have a column which is of type text[]. the following works: select * from table where 'Transformer' = ANY (thiscol) this also works select * from table where 'Transformer' ~ ANY (thiscol) however if i have a partial string like so select * from table where 'Trans'

[GENERAL] Iterate over an array in stored procedure

2007-06-19 Thread Henrik Zagerholm
Hello, I wonder how I can iterate over a sql array in a pl/perl function. I want to pass in an text[] to a function and then iterate through the values and run it through a perl sprintf but I can't seem to get it to work. Should I do a generate_series and make an internal perl array? If so

Re: [GENERAL] Excell

2007-06-19 Thread Joshua D. Drake
Bob Pawley wrote: Hi All Is there a fast and easy method of transferring information between MS Excel and PostgreSQL?? odbc? Joshua D. Drake Bob Pawley -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Pr

[GENERAL] Excell

2007-06-19 Thread Bob Pawley
Hi All Is there a fast and easy method of transferring information between MS Excel and PostgreSQL?? Bob Pawley

Re: [GENERAL] Historical Data Question

2007-06-19 Thread Rich Shepard
On Tue, 19 Jun 2007, Jeff Davis wrote: I have a table in my database that holds information on policies and this table is linked to a number of other tables. I need to be able to keep a history of all changes to a policy over time. The other tables that are linked to policy also need to store hi

[GENERAL] Problem compiling on CentOS

2007-06-19 Thread Robin Ericsson
Hi, I'm trying to recompile the SRPM with ldap support (maybe this should be added as an option to the spec?) but it fails to check for ldap_r due to problems finding my pthread flag in configure. Snip from configure: checking whether pthreads work with -pthread... no ... checking for ldap_simpl

Re: [GENERAL] Historical Data Question

2007-06-19 Thread Jeff Davis
On Thu, 2007-06-14 at 10:57 -0700, Lza wrote: > Can anyone help me with this problem? > > I have a table in my database that holds information on policies and > this table is linked to a number of other tables. I need to be able to > keep a history of all changes to a policy over time. The other t

Re: [GENERAL] [ADMIN] Postgres VS Oracle

2007-06-19 Thread Simon Riggs
On Mon, 2007-06-18 at 17:55 +0200, David Tokmatchi wrote: > I am DBA for Oracle and beginner on Postgres. For an company in > France, I must make a comparative study, between Postgres and Oracle. > Can you send any useful document which can help me. > Scalability ? Performance? Benchmark ? Availab

Re: [GENERAL] fsync error when restoring from archived xlogs

2007-06-19 Thread Simon Riggs
On Mon, 2007-06-18 at 16:06 +0930, Tom Lanyon wrote: > Trying to do a PITR on postgres 8.1.8; I've restored the last full > backup of the cluster dir and put the required WAL files into place. This problem is fixed in 8.1.9. Seems it was inadvertently introduced in 8.1.7 (Jan 2007) and was not

Re: [GENERAL] postgresql and solaris 10: pitch to sysadmins

2007-06-19 Thread Joshua D. Drake
John Smith wrote: couldn't be more timely- could someone elaborate on this ("managing a backup infrastructure")? is it for sysadmin types?? Yes it is explicitly for sysadmin types. The idea being, "Hey, I am a sysadmin and somebody just shoved PostgreSQL down my throat. How do I make sure eve

Re: [GENERAL] postgresql and solaris 10: pitch to sysadmins

2007-06-19 Thread John Smith
couldn't be more timely- could someone elaborate on this ("managing a backup infrastructure")? is it for sysadmin types?? http://www.commandprompt.com/blogs/joshua_drake/2007/06/training_hot_seat_style/ "... Most of our clients want short, specific classes on items such as managing a backup infra

Re: [GENERAL] Looking for Graphical people for PostgreSQL tradeshow signage

2007-06-19 Thread Joshua D. Drake
Joshua D. Drake wrote: Hello, We are looking to have new signage for the shows that PostgreSQL attends. The signage that we have decided on is here: http://www.displays2go.com/product.asp?ID=7371 We need artsy folk to help us design a sign that will make PostgreSQL look like the big bad pla

Re: [GENERAL] pg_restore out of memory

2007-06-19 Thread Francisco Reyes
Alvaro Herrera writes: Can you send the program along? And the table definition (including indexes, etc)? I put the table definition and a Python program that reproduces the problem at: http://public.natserv.net/table-schema.sql http://public.natserv.net/large_record.py The program uses t

Re: [GENERAL] initdb

2007-06-19 Thread John K Masters
On 10:06 Tue 19 Jun , Jeffrey Webster wrote: >On 6/17/07, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: > > >Hm. Why not just edit your .bash_profile, or .bashrc? (I won't go into >the details of which to use) > >Add: >export PGDATA=/usr/local/pgsql/data > >Add the

Re: [GENERAL] initdb

2007-06-19 Thread Jeffrey Webster
On 6/17/07, Andrej Ricnik-Bay <[EMAIL PROTECTED]> wrote: On 6/18/07, John K Masters <[EMAIL PROTECTED]> wrote: > I feel somewhat embarrassed to post this but I can't get past the first > post with Postgresql. I have installed onto a Debian testing system, > created a space for the database clust

Re: [GENERAL] problems selecting from altered table

2007-06-19 Thread Richard Huxton
Tom Lane wrote: Richard Huxton <[EMAIL PROTECTED]> writes: Any developers care to comment? plpgsql isn't very bright about tuple descriptors containing dropped columns. The immediate problem is that compatible_tupdesc() doesn't think a tupdesc containing one column matches one containing the

Re: [GENERAL] Dynamic Log tigger (plpgsql)

2007-06-19 Thread Noah Heusser
How can I do "OLD.columnName != NEW.columnName" if I don't know what the columnNames are at Compile Time? I have the columnName in a variable. Are you trying to do this from a plpgsql function? If so then I think you should try to do this from a C function. With C functions you will get more

Re: [GENERAL] problems selecting from altered table

2007-06-19 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Any developers care to comment? plpgsql isn't very bright about tuple descriptors containing dropped columns. The immediate problem is that compatible_tupdesc() doesn't think a tupdesc containing one column matches one containing the same column plus a

Re: [GENERAL] problems selecting from altered table

2007-06-19 Thread Rikard Pavelic
Bill Moran wrote: > Have you tried altering the table, then disconnect and reconnect, then run > your stored procedure? > > If that works, then the problem has to do with OID caching, which is known. > > Yes, I even tried restarting postgres, but nothing helped. Regards, Rikard ---

Re: [GENERAL] problems selecting from altered table

2007-06-19 Thread Richard Huxton
Rikard Pavelic wrote: create function sel_test() returns test as $$ declare red record; begin select * into red from test limit 1; return red; end $$ language plpgsql; alter table test drop column tekst; then select * from sel_test(); doesn't work anymore Even if I recreate th

Re: [GENERAL] Subquery problems

2007-06-19 Thread Merlin Moncure
On 6/19/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: > sure!. > > SELECTcast(((sum(A.qty_employees_total) >-(sum(A.qty_absence) >-sum(A.qty_vacation) >-sum(A.qty_diseased) >-sum(A.qty_indirect) >-sum(A.qty_transferred)) >

Re: [GENERAL] Apparent Wraparound?

2007-06-19 Thread Gerhard Hintermayer
> And when was the message logged? > after the server was running with version 8.1.8 for about 2 month (actually it was Jun 13 on one server and Apr 5 on the other) and no similar log entries since then. Gerhard ---(end of broadcast)--- TIP 2: Do

Re: [GENERAL] problems selecting from altered table

2007-06-19 Thread Bill Moran
In response to Rikard Pavelic <[EMAIL PROTECTED]>: > > I noticed that some of the functions I created don't work anymore. > So I tired to reproduce the problem and this is what I came up with. > > create table test( > id serial primary key, > tekst text); > > insert into test values(1,'1'),(2,'2

Re: [GENERAL] pg_restore out of memory

2007-06-19 Thread Francisco Reyes
Alvaro Herrera writes: The OS size is 1.6GB, but today I am going to try increasing kern.maxssiz. Vivek recommended increasing it kern.maxssiz is the maximum stack size. Increased to 512MB. Didn't help. The problem is probably the ulimit. I did a shell script which continuously did ps aux

Re: [GENERAL] Subquery problems

2007-06-19 Thread Ranieri Mazili
Original Message Subject: Re:[GENERAL] Subquery problems From: Merlin Moncure <[EMAIL PROTECTED]> To: Ranieri Mazili <[EMAIL PROTECTED]> Date: 19/6/2007 10:40 On 6/19/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: Hello, I'm having another "problem", I have a function that

Re: [GENERAL] Setting variable

2007-06-19 Thread Aleksis Petrov
On 6/18/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: Hello, I need to know why can't I do it? CREATE OR REPLACE FUNCTION lost_hours_temp(date) RETURNS text AS $BODY$ DECLARE START_DATE date; END_DATE date; QUERY text; BEGIN START_DATE := $1; END_DATE := START_DATE - interva

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-19 Thread Greg Smith
On Sun, 17 Jun 2007, Sergei Shelukhin wrote: Is there any way to speed up ANALYZE? Without it all the queries run so slow that I want to cry after a couple of hours of operation and with it system has to go down for hours per day and that is unacceptable. I've found I cry a lot less if I actua

Re: [GENERAL] Dynamic Log tigger (plpgsql)

2007-06-19 Thread Sibte Abbas
On 6/16/07, Noah Heusser <[EMAIL PROTECTED]> wrote: Hi I want to implement a trigger-function witch can fill the following table. Each data manipulation (INSERT, UPDATE or DELETE) gets logged. The function should work as trigger on diffrent tables. CREATE TABLE logtable ( operationCHA

[GENERAL] problems selecting from altered table

2007-06-19 Thread Rikard Pavelic
Hi! I noticed that some of the functions I created don't work anymore. So I tired to reproduce the problem and this is what I came up with. create table test( id serial primary key, tekst text); insert into test values(1,'1'),(2,'2'); create function sel_test() returns test as $$ declare red re

Re: [GENERAL] pg_restore out of memory

2007-06-19 Thread Alvaro Herrera
Francisco Reyes wrote: > Tom Lane writes: > > >What's more, because the line and field buffers are StringInfos that are > >intended for reuse across multiple lines/fields, they're not simply made > >equal to the exact size of the big field. They're rounded up to the > >next power-of-2, ie, if you

Re: [GENERAL] Subquery problems

2007-06-19 Thread Merlin Moncure
On 6/19/07, Ranieri Mazili <[EMAIL PROTECTED]> wrote: Hello, I'm having another "problem", I have a function that declares 12 variable, one per month and each them execute a select like bellow: DIV_MES01 := (select count(distinct production_date) from production where extract(month from prod

Re: [GENERAL] Apparent Wraparound?

2007-06-19 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > On Jun 18, 10:44 pm, [EMAIL PROTECTED] (Alvaro Herrera) > wrote: > > > > > Please check "MultiXact" id consumption. Do you mean that your server > > has crashed? > > > How do I check MilitXact id consumption ? Is it "Latest checkpoint's > NextXID:" in the output of pg_c

Re: [GENERAL] [pgsql-advocacy] [PERFORM] [ADMIN] Postgres VS Oracle

2007-06-19 Thread Jim Nasby
Can we please trim this down to just advocacy? On Jun 18, 2007, at 1:17 PM, Joshua D. Drake wrote: Jonah H. Harris wrote: On 6/18/07, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: As a cynic, I might ask, what Oracle is fearing? As a realist, I might ask, how many times do we have to answer th

Re: [GENERAL] [PERFORM] [ADMIN] Postgres VS Oracle

2007-06-19 Thread Geoffrey
Andrew Kelly wrote: On Mon, 2007-06-18 at 13:02 -0400, Jonah H. Harris wrote: On 6/18/07, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: As a cynic, I might ask, what Oracle is fearing? As a realist, I might ask, how many times do we have to answer this type of anti-commercial-database flamewar-s

Re: [GENERAL] [pgsql-advocacy] [PERFORM] [ADMIN] Postgres VS Oracle

2007-06-19 Thread Carol Walter
I don't want to add gas to the flamewar, but I gotta ask. What is in the the 90 to 95% referred to in this email. Carol On Jun 18, 2007, at 1:17 PM, Joshua D. Drake wrote: Jonah H. Harris wrote: On 6/18/07, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: As a cynic, I might ask, what Oracle is

Re: [GENERAL] How to prevent modifications in a tree of rows, based on a condition?

2007-06-19 Thread Kenneth Downs
Philippe Lang wrote: Hi, I have a database which can be simplified in the following way, with three tables: An "order" has multiple "order lines", and an "order line" has multiple "line steps". I'd like to prevent any kind of modification (insert, update, delete) in a order (and its lines, and

[GENERAL] Subquery problems

2007-06-19 Thread Ranieri Mazili
Hello, I'm having another "problem", I have a function that declares 12 variable, one per month and each them execute a select like bellow: *DIV_MES01 := (select count(distinct production_date) from production where extract(month from production_date) = '01' and extract(year from production_da

Re: [GENERAL] pg_restore out of memory

2007-06-19 Thread Francisco Reyes
Tom Lane writes: What's more, because the line and field buffers are StringInfos that are intended for reuse across multiple lines/fields, they're not simply made equal to the exact size of the big field. They're rounded up to the next power-of-2, ie, if you've read an 84MB field during the cur

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-19 Thread Bill Moran
In response to Sergei Shelukhin <[EMAIL PROTECTED]>: > This is my first (and, by the love of the God, last) project w/pgsql One has to ask, are you actually looking for help, or trolling? If you honestly want help, I would suggest you work on your communication skills first. If you're a troll,

Re: [GENERAL] How to prevent modifications in a tree of rows, based on a condition?

2007-06-19 Thread A. Kretschmer
am Tue, dem 19.06.2007, um 12:23:51 +0200 mailte Philippe Lang folgendes: > > I'd like to prevent any kind of modification (insert, update, delete) in > a order (and its lines, and steps) if all the steps in the lines of the > order are "checked". If that condition is not true, a modification is

[GENERAL] How to prevent modifications in a tree of rows, based on a condition?

2007-06-19 Thread Philippe Lang
Hi, I have a database which can be simplified in the following way, with three tables: An "order" has multiple "order lines", and an "order line" has multiple "line steps". I'd like to prevent any kind of modification (insert, update, delete) in a order (and its lines, and steps) if all the step

Re: [GENERAL] [PERFORM] [ADMIN] Postgres VS Oracle

2007-06-19 Thread Andrew Kelly
On Mon, 2007-06-18 at 13:02 -0400, Jonah H. Harris wrote: > On 6/18/07, Andreas Kostyrka <[EMAIL PROTECTED]> wrote: > > As a cynic, I might ask, what Oracle is fearing? > > As a realist, I might ask, how many times do we have to answer this > type of anti-commercial-database flamewar-starting ques

Re: [GENERAL] Server and Client configuration.

2007-06-19 Thread Albe Laurenz
Jayakumar_Mukundaraju wrote: > > I am new to Postgresql Database. My setup is backend is postgresql > database, frontend is Java(JDBC). I installed the postgres in windows > platform. Now I want to setup server and client configuration. Kindly > guide me how to set the configuration parameters, in