Re: [GENERAL] Trigger function that works with both updates and deletes?

2007-06-18 Thread novnov
Perfect, thanks Michael Fuhr wrote: > > On Mon, Jun 18, 2007 at 06:07:37PM -0700, novnov wrote: >> First, when a record is being deleted, OLD refers to the rec just deleted >> (or about to be deleted)? > > Correct. > >> Second, while I could write two trigger functions, one dealing with >> ad

Re: [GENERAL] Apparent Wraparound?

2007-06-18 Thread g . hintermayer
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_controldata ? transaction id consumption is

[GENERAL] Regression - Query requires full scan, GIN doesn't support it

2007-06-18 Thread Stuart Bishop
Hi. I recently converted a load of GIST indexes used by tsearch2 to GIN, as my app is read heavy. We now occasionally get the exception: Query requires full scan, GIN doesn't support it Thankfully it is happening very rarely, but as the querys are generated from user input we can't stop this

Re: [GENERAL] help with libpq program

2007-06-18 Thread marcelo Cortez
DAnn My c code is one layer for wrap libpq.dll functions i'm using function like start with PGresult *PQexec(PGconn *conn, const char *command); command like 'copy foo from stdin '; int PQputCopyData(PGconn *conn, const char *buffer, int nbytes); (ma

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-18 Thread David Wall
On Jun 17, 2007, at 2:15 PM, Sergei Shelukhin wrote: This is my first (and, by the love of the God, last) project w/pgsql and everything but the simplest selects is so slow I want to cry. This is especially bad with vacuum analyze - it takes several hours for a database of mere 15 Gb on a fast do

[GENERAL] Server and Client configuration.

2007-06-18 Thread Jayakumar_Mukundaraju
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 server and client machines. Waiting for

Re: [GENERAL] Core reported from vaccum function.

2007-06-18 Thread Alvaro Herrera
Mavinakuli, Prasanna (STSD) wrote: > Hello All, > > We are getting the following core more oftenly.But We don't have a test > case where it is guaranteed to dump this core.We are using 7.4.2 version > postgres and if any one of you aware about some bug fixes happened > around this problem.Please l

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-18 Thread Alvaro Herrera
Sergei Shelukhin escribió: > The same database running on mysql on basically the same server used > to run optimize table on every table every half an hour without any > problem, I am actually pondering scraping half the work on the > conversion and stuff and going back to mysql but I wonder if th

Re: [GENERAL] VACUUM ANALYZE extremely slow

2007-06-18 Thread Steve Atkins
On Jun 17, 2007, at 2:15 PM, Sergei Shelukhin wrote: This is my first (and, by the love of the God, last) project w/pgsql and everything but the simplest selects is so slow I want to cry. This is especially bad with vacuum analyze - it takes several hours for a database of mere 15 Gb on a fast

Re: [GENERAL] Trigger function that works with both updates and deletes?

2007-06-18 Thread Harvey, Allan AC
> Second, while I could write two trigger functions, one dealing with > add/update, the other with deletes, it's probably neater to > have a single > trigger function and have it discriminate "am I being called > for a delete, > or an add/update?" I don't know how to determine the type > record

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > Also the error is about running out of memory when trying to allocate 84MB. > The default FreeBSD limit is 512MB so 84MB is well below that. Well, no, it's not. I traced through a test case involving loading a multi-megabyte text value, and what I fin

Re: [GENERAL] help with libpq program

2007-06-18 Thread Dann Corbit
Where is your actual copy statement? What is your field delimiter? Why not post the actual C code for your program, if it is not too long? I guess from what you have posted that the delimiter you supplied does not match the delimiter from your copy statement. > -Original Message- > From

Re: [GENERAL] Trigger function that works with both updates and deletes?

2007-06-18 Thread Michael Fuhr
On Mon, Jun 18, 2007 at 06:07:37PM -0700, novnov wrote: > First, when a record is being deleted, OLD refers to the rec just deleted > (or about to be deleted)? Correct. > Second, while I could write two trigger functions, one dealing with > add/update, the other with deletes, it's probably neater

[GENERAL] VACUUM ANALYZE extremely slow

2007-06-18 Thread Sergei Shelukhin
This is my first (and, by the love of the God, last) project w/pgsql and everything but the simplest selects is so slow I want to cry. This is especially bad with vacuum analyze - it takes several hours for a database of mere 15 Gb on a fast double-core server w/2Gb of RAM and virtually no workload

[GENERAL] Dynamic Log tigger (plpgsql)

2007-06-18 Thread Noah Heusser
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 ( operationCHAR(6) CHECK (change_type IN ('DELETE', 'INSERT', 'UPDAT

[GENERAL] fsync error when restoring from archived xlogs

2007-06-18 Thread Tom Lanyon
Hi All, 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. Yet when I attempt the recovery I see the following: Jun 18 15:44:11 postgres[29730]: [3-1] LOG: starting archive recovery Jun 18 15:44:11 postgres

Re: [GENERAL] persistent db connections in PHP

2007-06-18 Thread lawpoop
This seems to be a problem with PHP, or at least my set up. I'm writing pages in basically the same way. Each page has an include at the top that gets you a database session. The function, either pg_connect() or mysql_connect(), is supposed to either create a new connection, or return your existin

[GENERAL] help with libpq program

2007-06-18 Thread marcelo Cortez
folks i need help with libpq program ,i made on C program for wrapper libpq.dll program , the routine failing is copy from stdin interface. PQputCopyData return 1 (AKA ok) PQputCopyEnd return 1 (AKA ok) but nothing is append to database. tailing log file invalid input syntax for integer:

[GENERAL] Setting variable

2007-06-18 Thread Ranieri Mazili
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 - interval '3 year'; The last line (END_DATE := START_DATE - interval

Re: [GENERAL] how to speed up query

2007-06-18 Thread Andrus
CREATE TEMP TABLE mydel AS SELECT r.dokumnr FROM rid r LEFT JOIN dok d USING (dokumnr) WHERE d.dokumnr IS NULL; DELETE FROM rid USING mydel WHERE rid.dokumnr =mydel.dokumnr; drop table mydel; As I mentioned when I proposed it, the temp table may not even be necessary. The important part is t

[GENERAL] Core reported from vaccum function.

2007-06-18 Thread Mavinakuli, Prasanna (STSD)
Hello All, We are getting the following core more oftenly.But We don't have a test case where it is guaranteed to dump this core.We are using 7.4.2 version postgres and if any one of you aware about some bug fixes happened around this problem.Please let us know. Thanks, Prasanna. Core was genera

[GENERAL] Trigger function that works with both updates and deletes?

2007-06-18 Thread novnov
Most of the trigger fuctions I've written work on new and updated records referencing NEW. etc. I will need some of the trigger functions to work with record deletions too. First, when a record is being deleted, OLD refers to the rec just deleted (or about to be deleted)? Second, while I could

Re: [GENERAL] statistics monitoring performance improvment -- 8.1 as well as 8.2 ?

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 16:23 , [EMAIL PROTECTED] wrote: Did those improvements ever get applied to postgres 8.1.y ? perhaps in 8.1.8 or 8.1.9 ? Check the release notes for those versions, or possibly CVS. Most likely not, as usually only bug fixes are back patched. Michael Glaesemann grzm s

[GENERAL] statistics monitoring performance improvment -- 8.1 as well as 8.2 ?

2007-06-18 Thread scottb
Last year, there was a problem involving stats_command_string in early 8.1.x http://archives.postgresql.org/pgsql-bugs/2006-01/msg00151.php I see mentions of performance improvements in the statistics collector for 8.2.x http://www.postgresql.org/docs/8.2/static/release-8-2.html "I

Re: [GENERAL] time without time zone

2007-06-18 Thread Garry Saddington
On Monday 18 June 2007 21:15, Tom Lane wrote: > Garry Saddington <[EMAIL PROTECTED]> writes: > > Can anyone explain why time has todays date and time zone? > > Works for me: > > regression=# insert into periods values(1,1,'now','now'); > INSERT 0 1 > regression=# select * from periods; > periodid

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread developer
> [EMAIL PROTECTED] writes: >> My database has shutdown several times in the last couple days. I have >> no >> idea why. I am running centos and I have not rebooted the server or >> made >> any configuration changes. > > So in particular, you didn't disable memory overcommit? > >> LOG: server pr

Re: [GENERAL] Apparent Wraparound?

2007-06-18 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > Aha, google thinks it's wise to make the last postings (probably if > more than n ?) show only the poster name and make the name clickable. > Not very userfriendly :-( but now i know it ;-) I don't very much understand what you mean. I do see that you said "I noticed t

Re: [GENERAL] Pg_standby and shutting down the warm standby

2007-06-18 Thread Simon Riggs
On Mon, 2007-06-18 at 13:26 -0400, Woody Woodring wrote: > I am wondering if there is a proper procedure for shutting down the > warm_standby server (8.2.4)? I am using pg_standby as my restore script in > my testing: > > [EMAIL PROTECTED] cat recovery.conf > restore_command = 'pg_standby -m -d -

Re: [GENERAL] Apparent Wraparound?

2007-06-18 Thread g . hintermayer
Aha, google thinks it's wise to make the last postings (probably if more than n ?) show only the poster name and make the name clickable. Not very userfriendly :-( but now i know it ;-) Sorry if that wasn't clear. I'm getting the same log entry as the original poster, i.e.: LOG: could not trunca

[GENERAL] postgresql and solaris 10: pitch to sysadmins

2007-06-18 Thread John Smith
guys need to pitch postgresql to some hard-to-budge solaris sysadmins- they don't even know about the postgresql-solaris 10 package, just used to oracle and don't want to break their backs over postgresql. plus i don't know enough slony yet. can someone point me to some standard backup/restore et

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread Alexander Staubo
On 6/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: My database has shutdown several times in the last couple days. I have no idea why. [...] LOG: server process (PID 501) was terminated by signal 9 If this is Linux, check the kernel log (typically /var/log/kern.log, or run dmesg) and

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > The issue I am trying to figure is which limit.. the OS limit is set to > 1.6GB. I am now trying to increase my shared_buffers. So far have them at > 450MB and it is still failing. For this problem, increasing shared_buffers is either useless or down

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread Tom Lane
[EMAIL PROTECTED] writes: > My database has shutdown several times in the last couple days. I have no > idea why. I am running centos and I have not rebooted the server or made > any configuration changes. So in particular, you didn't disable memory overcommit? > LOG: server process (PID 501)

Re: [GENERAL] time without time zone

2007-06-18 Thread Tom Lane
Garry Saddington <[EMAIL PROTECTED]> writes: > Can anyone explain why time has todays date and time zone? Works for me: regression=# insert into periods values(1,1,'now','now'); INSERT 0 1 regression=# select * from periods; periodid | periodnumber | periodstart | periodend --+-

Re: [GENERAL] time without time zone

2007-06-18 Thread Richard Huxton
Garry Saddington wrote: This is a select on table periods defined as such: CREATE TABLE periods ( periodid serial NOT NULL, periodnumber integer NOT NULL, periodstart time without time zone, periodend time without time zone, PRIMARY KEY (periodid) ) PeriodidPeriodnumberPeri

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread Francisco Reyes
[EMAIL PROTECTED] writes: could do logging wise on the postgres side to get a better indication of what is happening? You can increase the levels of loggin and redirect std_error to a file. Something along the lines of log_destination = 'stderr' log_filename = 'postgresql-%Y-%m-%d.log' log_er

[GENERAL] time without time zone

2007-06-18 Thread Garry Saddington
This is a select on table periods defined as such: CREATE TABLE periods ( periodid serial NOT NULL, periodnumber integer NOT NULL, periodstart time without time zone, periodend time without time zone, PRIMARY KEY (periodid) ) PeriodidPeriodnumberPeriodstart Periodend 6

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread developer
> <[EMAIL PROTECTED]> writes: > >> My database has shutdown several times in the last couple days. I have >> no >> idea why. I am running centos and I have not rebooted the server or >> made >> any configuration changes. I am running postgres 8.2 and it has been >> stable since I installed it ab

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > My database has shutdown several times in the last couple days. I have no > idea why. I am running centos and I have not rebooted the server or made > any configuration changes. I am running postgres 8.2 and it has been > stable since I installed it about 5 months

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Francisco Reyes
Tom Lane writes: Keep in mind though that the COPY process is going to involve several working copies of that data (at least four that I can think of --- line input buffer, field input buffer, constructed text object, and constructed tuple). Will this be for the shared_buffers memory? I'm al

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread Chris Hoover
On 6/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: My database has shutdown several times in the last couple days. I have no idea why. I am running centos and I have not rebooted the server or made any configuration changes. I am running postgres 8.2 and it has been stable since I insta

[GENERAL] unexpected shutdown

2007-06-18 Thread developer
My database has shutdown several times in the last couple days. I have no idea why. I am running centos and I have not rebooted the server or made any configuration changes. I am running postgres 8.2 and it has been stable since I installed it about 5 months ago. The databases crashes and so my

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > Also the error is about running out of memory when trying to allocate 84MB. > The default FreeBSD limit is 512MB so 84MB is well below that. Keep in mind though that the COPY process is going to involve several working copies of that data (at least fou

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

2007-06-18 Thread Andrew Sullivan
On Mon, Jun 18, 2007 at 02:38:32PM -0400, Andrew Sullivan wrote: > I've picked -advocacy. Actually, I _had_ picked advocacy, but had an itchy trigger finger. Apologies, all. A -- Andrew Sullivan | [EMAIL PROTECTED] A certain description of men are for getting out of debt, yet are against all

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

2007-06-18 Thread Andrew Sullivan
On Mon, Jun 18, 2007 at 02:16:56PM -0400, Jonah H. Harris wrote: > pgsql-advocacy... your thoughts? I've picked -advocacy. > > I think the Oracle discussion is over, David T. just needs URL references > IMHO. I don't think we can speak about Oracle; if we were licenced, we'd be violating it, a

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

2007-06-18 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonah H. Harris wrote: > Certainly, but can one expect to get a realistic answer to an, "is > Oracle fearing something" question on he PostgreSQL list? Or was it > just a backhanded attempt at pushing the topic again? My vote is for > the latter; i

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Vivek Khera
On Jun 18, 2007, at 2:10 PM, Francisco Reyes wrote: Also the error is about running out of memory when trying to allocate 84MB. The default FreeBSD limit is 512MB so 84MB is well below that. Try being less stingy than 128Mb for your stack. The default stack is 512Mb. --

Re: [SQL] [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 12:11 , Ranieri Mazili wrote: Look, I did a UNION, exist other way to do it better? Considering your aggregates are different, you shouldn't really union them. In the upper query of the union, you've got production_period (which is actually a date that represents the b

Re: [GENERAL] pg_resetxlog command not found

2007-06-18 Thread Tom Lane
"Matt Bartolome" <[EMAIL PROTECTED]> writes: > I am doing some experimentation with a WAL archiving HA setup. I tried > turning to the pg_resetxlog command after removing some corrupted > files and it is not installed using the ubuntu dapper 8.1 package. Maybe they put it in some subpackage you d

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

2007-06-18 Thread Jonah H. Harris
On 6/18/07, Andrew Sullivan <[EMAIL PROTECTED]> wrote: It would appear that this was the flame-fest that was predicted. Particularly as this has been copied to five lists. If you all want to have an argument about what Oracle should or should not do, could you at least limit it to one list? Ye

Re: [GENERAL] pg_resetxlog command not found

2007-06-18 Thread Matt Bartolome
After poking around some more the command is located in /usr/lib/postgresql/8.1/bin/pg_resetxlog on ubuntu. On 6/18/07, Matt Bartolome <[EMAIL PROTECTED]> wrote: I am doing some experimentation with a WAL archiving HA setup. I tried turning to the pg_resetxlog command after removing some corrup

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Francisco Reyes
Vivek Khera writes: But that is a false assertion that the limit is 512Mb. On a random system of mine running FreeBSD/i386 it shows the default data limit as 1Gb, and on a random FreeBSD/amd64 box I see it at about 32Gb. I do no global tweaking of the size limits. Understood. I only sho

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

2007-06-18 Thread Andrew Sullivan
All, On Mon, Jun 18, 2007 at 07:50:22PM +0200, Andreas Kostyrka wrote: [something] It would appear that this was the flame-fest that was predicted. Particularly as this has been copied to five lists. If you all want to have an argument about what Oracle should or should not do, could you at le

[GENERAL] pg_resetxlog command not found

2007-06-18 Thread Matt Bartolome
I am doing some experimentation with a WAL archiving HA setup. I tried turning to the pg_resetxlog command after removing some corrupted files and it is not installed using the ubuntu dapper 8.1 package. How do I get this command installed, or is there some other way to repair a database that is

Re: [GENERAL] Using the query INTERSECTion

2007-06-18 Thread Tom Lane
Vincenzo Romano <[EMAIL PROTECTED]> writes: > But now I have one more thing. The following command will fail with > a syntax error: > SELECT * FROM (SELECT 1 ) a INTERSECT (SELECT 2 ) b; > Because of the second (harmless) table alias. > In my mind it should work. Or not? Not. INTERSECT is not l

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

2007-06-18 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jonah H. Harris wrote: > > All of us have noticed the anti-MySQL bashing based on problems with > MySQL 3.23... Berkus and others (including yourself, if I am correct), > have corrected people on not making invalid comparisons against > ancient vers

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Vivek Khera
On Jun 15, 2007, at 8:24 AM, Francisco Reyes wrote: Understood. But at least it shows that the program was already above the default of 512MB limit of the operating system. But that is a false assertion that the limit is 512Mb. On a random system of mine running FreeBSD/i386 it shows the

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

2007-06-18 Thread Jonah H. Harris
On 6/18/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Yeah funny how you didn't do that ;) (of course neither did I). I agree, an oops on my part :) It is amazing how completely misguided you are in this response. I haven't said anything closed minded. I only responded to your rather antagon

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Francisco Reyes
Tom Lane writes: If that actually is the length of the line, the only answer is to raise the memory ulimit setting the postmaster runs under. Did another test to try to see if the problem is that row or the size of the row. Another record of greater size also failed. Any ideas what this 84

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

2007-06-18 Thread Joshua D. Drake
Jonah H. Harris wrote: On 6/18/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Depends? How many times are you going to antagonize the people that ask? As many times as necessary. Funny how the anti-proprietary-database arguments can continue forever and no one brings up the traditional RTFM-l

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

2007-06-18 Thread Guy Rouillier
Joshua D. Drake wrote: 2. Oracle, Microsoft, and IBM have a "lot" to fear in the sense of a database like PostgreSQL. We can compete in 90-95% of cases where people would traditionally purchase a proprietary system for many, many thousands (if not hundreds of thousands) of dollars. Well, I'm

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

2007-06-18 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 PFC wrote: > >> 2. Oracle, Microsoft, and IBM have a "lot" to fear in the sense of a >> database like PostgreSQL. We can compete in 90-95% of cases where >> people would traditionally purchase a proprietary system for many, >> many thousands (if not

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

2007-06-18 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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-

Re: [GENERAL] Using the query INTERSECTion

2007-06-18 Thread Vincenzo Romano
On Monday 18 June 2007 19:27:35 Martijn van Oosterhout wrote: > On Mon, Jun 18, 2007 at 04:10:41PM +0200, Vincenzo Romano wrote: > > Hello everyone. > > > > In order to build some dynamic queries (EXECUTE under PL/PgSQL) > > I'm taking in consideration to use the INTERSECT operator in > > order to

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

2007-06-18 Thread Jonah H. Harris
On 6/18/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote: Depends? How many times are you going to antagonize the people that ask? As many times as necessary. Funny how the anti-proprietary-database arguments can continue forever and no one brings up the traditional RTFM-like response of, "hey, t

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

2007-06-18 Thread Joshua D. Drake
PFC wrote: 2. Oracle, Microsoft, and IBM have a "lot" to fear in the sense of a database like PostgreSQL. We can compete in 90-95% of cases where people would traditionally purchase a proprietary system for many, many thousands (if not hundreds of thousands) of dollars. Oracle also fear

Re: [GENERAL] Using the query INTERSECTion

2007-06-18 Thread Martijn van Oosterhout
On Mon, Jun 18, 2007 at 04:10:41PM +0200, Vincenzo Romano wrote: > Hello everyone. > > In order to build some dynamic queries (EXECUTE under PL/PgSQL) > I'm taking in consideration to use the INTERSECT operator in order > to split a WHERE-condition in a static one and a dynamic one to be > built a

[GENERAL] Pg_standby and shutting down the warm standby

2007-06-18 Thread Woody Woodring
I am wondering if there is a proper procedure for shutting down the warm_standby server (8.2.4)? I am using pg_standby as my restore script in my testing: [EMAIL PROTECTED] cat recovery.conf restore_command = 'pg_standby -m -d -s 5 -w 0 -t /tmp/pgsql.trigger.5432 /usr/local2/pg_archive %f %p 2>>

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

2007-06-18 Thread PFC
2. Oracle, Microsoft, and IBM have a "lot" to fear in the sense of a database like PostgreSQL. We can compete in 90-95% of cases where people would traditionally purchase a proprietary system for many, many thousands (if not hundreds of thousands) of dollars. Oracle also fears benchmarks

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

2007-06-18 Thread Joshua D. Drake
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 question? Depends? How many times are you goi

Re: [SQL] [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Ranieri Mazili
Original Message Subject: Re:[SQL] [GENERAL] Setting Variable - (Correct) From: Michael Glaesemann <[EMAIL PROTECTED]> To: Ranieri Mazili <[EMAIL PROTECTED]> Date: 18/6/2007 13:50 [Please reply to the list so that others may benefit from and participate in the discussion.] On

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

2007-06-18 Thread Jonah H. Harris
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 question? -- Jonah H. Harris, Software Architect | phone: 732.331.1324

Re: [SQL] [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Michael Glaesemann
[Please reply to the list so that others may benefit from and participate in the discussion.] On Jun 18, 2007, at 11:32 , Ranieri Mazili wrote: Thanks a lot for your prompt reply. You query is perfect for my problem, but I need another thing with it, I need to return the sum of production_h

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

2007-06-18 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It's even harder, as Oracle disallows publishing benchmark figures in their license. As a cynic, I might ask, what Oracle is fearing? Andreas Jonah H. Harris wrote: > On 6/18/07, David Tokmatchi <[EMAIL PROTECTED]> wrote: >> Scalability ? Performance

Re: [SQL] [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Ranieri Mazili
Original Message Subject: Re:[SQL] [GENERAL] Setting Variable - (Correct) From: Michael Glaesemann <[EMAIL PROTECTED]> To: Michael Glaesemann <[EMAIL PROTECTED]> Date: 18/6/2007 13:15 On Jun 18, 2007, at 10:17 , Michael Glaesemann wrote: Looking over your function, I'm a litt

Re: [GENERAL] [ADMIN] Postgres VS Oracle

2007-06-18 Thread Igor Neyman
This document: http://www-css.fnal.gov/dsg/external/freeware/mysql-vs-pgsql.html could answer some of your questions. Igor From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Tokmatchi Sent: Monday, June 18, 2007 11:55 AM To: [EMAIL PROTECTE

Re: [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 10:17 , Michael Glaesemann wrote: Looking over your function, I'm a little confused about what you're trying to do. I'm guessing the (final) result you're trying to get is the number of hours lost for each product per area per month for the three years prior to the prov

Re: [GENERAL] [ADMIN] Postgres VS Oracle

2007-06-18 Thread Jonah H. Harris
On 6/18/07, David Tokmatchi <[EMAIL PROTECTED]> wrote: Scalability ? Performance? Benchmark ? Availability ? Architecture ? Limitation : users, volumes ? Resouces needed ? Support ? Aside from the Wikipedia database comparison, I'm not aware of any direct PostgreSQL-to-Oracle comparison. -- Jo

Re: [GENERAL] Atomicity in DB transactions (Rollback related)

2007-06-18 Thread Alvaro Herrera
Jasbinder Singh Bali escribió: > Could you please give me some quick and helpful pointers for SPI programing > in pl/perl? http://www.postgresql.org/docs/8.2/static/plperl-database.html -- Alvaro Herrera http://www.flickr.com/photos/alvherre/ "Puedes vivir solo una vez, p

Re: [GENERAL] Atomicity in DB transactions (Rollback related)

2007-06-18 Thread Jasbinder Singh Bali
Could you please give me some quick and helpful pointers for SPI programing in pl/perl? Thanks, Jas On 6/18/07, Alvaro Herrera <[EMAIL PROTECTED]> wrote: Jasbinder Singh Bali escribió: > Hi, > I have a Pl/Perlu function in which I have a statement like this: > > *** > my $query

[GENERAL] Postgres VS Oracle

2007-06-18 Thread David Tokmatchi
Hello from Paris 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 ? Availability ? Architecture ? Limitation : users, volume

Re: [GENERAL] Atomicity in DB transactions (Rollback related)

2007-06-18 Thread Alvaro Herrera
Jasbinder Singh Bali escribió: > Hi, > I have a Pl/Perlu function in which I have a statement like this: > > *** > my $query_tbl_l_header = $dbh->prepare("SELECT > sp_insert_tbl_l_header(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); > > my $exec_l_from > =$query_tbl_l_header->execute($u

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Francisco Reyes
Tom Lane writes: Looked at the record in question and the length of the long column in that row is 5753 (84MB). If that actually is the length of the line, the only answer is to raise the memory ulimit setting the postmaster runs under. The memory limit is 1.6GB. /boot/loader.conf kern.

[GENERAL] Atomicity in DB transactions (Rollback related)

2007-06-18 Thread Jasbinder Singh Bali
Hi, I have a Pl/Perlu function in which I have a statement like this: *** my $query_tbl_l_header = $dbh->prepare("SELECT sp_insert_tbl_l_header(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"); my $exec_l_from =$query_tbl_l_header->execute($unmask_id,$from,$to,$sender,$subject,$replyto,$cc

Re: [GENERAL] Apparent Wraparound?

2007-06-18 Thread Alvaro Herrera
[EMAIL PROTECTED] wrote: > On Jun 18, 11:08 am, [EMAIL PROTECTED] wrote: > > On Jun 13, 2:35 pm, [EMAIL PROTECTED] wrote: > > > > Can someone tell me if I should be concerned about this log entry ? My > > database is quite large (~ 2G in PGDATA) > > BTW, I do not use autovacuum, and run vacuumdb o

Re: Intervals (was: [GENERAL] DeadLocks..., DeadLocks...)

2007-06-18 Thread Alban Hertroys
Tom Allison wrote: > I have a question though. > I noticed a particular format for identifying dates like: > now()-'3 days'::interval; > > What's '::interval' and why should I use it? Intervals are convenient, simply said. They are a special type dealing with date calculations relative to a given

Re: [GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 9:34 , Ranieri Mazili wrote: Hello, I'm trying do the following function: 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 - interval '3

Re: [GENERAL] Apparent Wraparound?

2007-06-18 Thread g . hintermayer
On Jun 18, 11:08 am, [EMAIL PROTECTED] wrote: > On Jun 13, 2:35 pm, [EMAIL PROTECTED] wrote: > > Can someone tell me if I should be concerned about this log entry ? My > database is quite large (~ 2G in PGDATA) > > regards > Gerhard BTW, I do not use autovacuum, and run vacuumdb on a weekly basis.

Re: [GENERAL] [SQL] Setting variable

2007-06-18 Thread Michael Glaesemann
On Jun 18, 2007, at 9:29 , Ranieri Mazili wrote: 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 - interval '3 year'; The last line (END_DATE := START_DATE

Re: [GENERAL] pg_restore out of memory

2007-06-18 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > Tried a pg_dump without -Fc to see if I could get that one table loaded. > Still failed. > psql:message-attachments-2007-06-15.sql:2840177: ERROR: out of memory > DETAIL: Failed on request of size 5765. > CONTEXT: COPY message_attachments, line

[GENERAL] Setting Variable - (Correct)

2007-06-18 Thread Ranieri Mazili
Hello, I'm trying do the following function: 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 - interval '3 year'; WHILE EXTRACT(YEAR FROM START_DATE) = E

[GENERAL] Setting variable

2007-06-18 Thread Ranieri Mazili
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 - interval '3 year'; The last line (END_DATE := START_DATE - interval

Re: [GENERAL] Command line export or copy utility?

2007-06-18 Thread Francisco Reyes
Reece Hart writes: On Tue, 2007-05-22 at 18:07 -0400, Francisco Reyes wrote: Does anyone know of any export or copy utility that runs on FreeBSD? I basically need a program that will connect to one database, do a select and copy the result to a second database. Two options: 1) if you want a

[GENERAL] Using the query INTERSECTion

2007-06-18 Thread Vincenzo Romano
Hello everyone. In order to build some dynamic queries (EXECUTE under PL/PgSQL) I'm taking in consideration to use the INTERSECT operator in order to split a WHERE-condition in a static one and a dynamic one to be built at runtime. Instead of SELECT * FROM joinedtables WHERE static_cond AND dyna

Re: [GENERAL] Loop through all views with PHP

2007-06-18 Thread A. Kretschmer
am Mon, dem 18.06.2007, um 14:59:34 +0200 mailte Stefan Schwarzer folgendes: > Hi there, > > my app is creating views for a certain task; now, I would like to run > on a regular basis a script which deletes these views. As they are > named with the date/hour/min/sec-appendix to make each view

Re: [GENERAL] Loop through all views with PHP

2007-06-18 Thread Francisco Reyes
Stefan Schwarzer writes: Is there any way via PHP to loop through the whole set of views to delete those with a specific name? See pg_views. In particular the viewname column. ---(end of broadcast)--- TIP 5: don't forget to increase your free

[GENERAL] Loop through all views with PHP

2007-06-18 Thread Stefan Schwarzer
Hi there, my app is creating views for a certain task; now, I would like to run on a regular basis a script which deletes these views. As they are named with the date/hour/min/sec-appendix to make each view unique, I don't know the names myself (Ok, I could stock the names in a separate t

Re: [GENERAL] Exec a text variable as select

2007-06-18 Thread A. Kretschmer
am Mon, dem 18.06.2007, um 10:14:32 -0300 mailte Ranieri Mazili folgendes: > Hello, > > I'm creating a function that will create a select statement into a > while, this select will be stored into a text variable, after while ends > I need to execute this query stored into variable, on SQLSERVER

[GENERAL] Exec a text variable as select

2007-06-18 Thread Ranieri Mazili
Hello, I'm creating a function that will create a select statement into a while, this select will be stored into a text variable, after while ends I need to execute this query stored into variable, on SQLSERVER I can do: EXEC(text_variable) How can I do this on Postgres? I appreciate any help

Re: [GENERAL] What O/S or hardware feature would be useful for databases?

2007-06-18 Thread Merlin Moncure
On 6/17/07, Greg Smith <[EMAIL PROTECTED]> wrote: On Sat, 16 Jun 2007, Ron Johnson wrote: > Anyway... databases are always(?) IO bound. I'd try to figure out how to > make a bigger hose (or more hoses) between the spindles and the mobo. What I keep waiting for is the drives with flash memory b

  1   2   >