Re: [GENERAL] Error restoring bytea from dump

2004-10-26 Thread Együd Csaba (Freemail)
Hi Michael, I've got it now. The problem was that PgAdminIII doesn't handle well the escaped characters; and perhaps the long lines makes it unsure. Trying to restore from the terminal window it works well. Thank you for your answer, it turned me to the right direction (new lines). Bye, -- Csab

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Gregory S. Williamson
-Original Message- From: Robby Russell [mailto:[EMAIL PROTECTED] Sent: Tue 10/26/2004 9:08 PM To: Kevin Barnard Cc: [EMAIL PROTECTED] Subject:Re: [GENERAL] primary key and existing unique fields On Tue, 2004-10-26 at 22:03 -0500, Kevin Barnard wrote: > On Tue, 26 Oct 200

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Robby Russell
On Tue, 2004-10-26 at 22:03 -0500, Kevin Barnard wrote: > On Tue, 26 Oct 2004 17:05:27 -0700, Robby Russell <[EMAIL PROTECTED]> wrote: > > On Tue, 2004-10-26 at 17:26 -0400, Mike Mascari wrote: > > > > > > > > > Apparently gamma functions and string theory have little to do with > > > understandin

Re: [GENERAL] Newbie question about casting literals - oracle/postgres

2004-10-26 Thread Joshua D. Drake
The only way this works in postgres is by casting ‘GREEN’ to text using ‘GREEN’::text   The problem is then this does not work with oracle. Since my software has to support both databases, I am left in a bit of a bind. Any ideas on how to make postgres accept ‘GREEN’ as text without

[GENERAL] Theory

2004-10-26 Thread mayra
 hi, I need info on the caracteristics of objectrelational databases and their advantages as well as disdvantages in comparison to relational databases and OO Databases!  Please explain these chacteristics with respect to what Postgresql can and cannot do.   Thanks for your assistance. 

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Kevin Barnard
On Tue, 26 Oct 2004 17:05:27 -0700, Robby Russell <[EMAIL PROTECTED]> wrote: > On Tue, 2004-10-26 at 17:26 -0400, Mike Mascari wrote: > > > > > > Apparently gamma functions and string theory have little to do with > > understanding the relational model of data. > > > > > > m.. string theory.

Re: [GENERAL] list fieldnames in table? (from PHP)

2004-10-26 Thread Joshua D. Drake
Scott Marlowe wrote: On Mon, 2004-10-25 at 20:36, Miles Keaton wrote: Is there a simple way to list fieldnames in a table, from PHP? When on the command-line, I just do \d tablename But how to get the fieldnames from PHP commands? Hello, This PHP function will give you

Re: [GENERAL] [Fwd: Abrupt close of pgsql backend]

2004-10-26 Thread Scott Marlowe
On Mon, 2004-10-25 at 23:00, Deepa K wrote: > Hi, > I am running postgresql 7.1.3 in RedHat Linux 7.2. From an external C > application, three connections are established with postmaster (it is > started with -i option) through unix sockets. Two times I received EPIPE > error when trying to

[GENERAL] Newbie question about casting literals - oracle/postgres

2004-10-26 Thread Naeem Bari
Ok,   I have a query that runs fine in oracle:      select driver_id, 'GREEN' as color, pos_date, pos_lat, pos_lon    from driver_pos    where driver_id = 1    order by pos_date   The only way this works in postgres is by casting ‘GREEN’ to text using ‘GREEN’::text   The problem

Re: [GENERAL] list fieldnames in table? (from PHP)

2004-10-26 Thread Scott Marlowe
On Mon, 2004-10-25 at 20:36, Miles Keaton wrote: > Is there a simple way to list fieldnames in a table, from PHP? > > When on the command-line, I just do \d tablename > > But how to get the fieldnames from PHP commands? In addition to the other ideas given here, you also have the SQL spec standa

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Robby Russell
On Tue, 2004-10-26 at 17:26 -0400, Mike Mascari wrote: > > > Apparently gamma functions and string theory have little to do with > understanding the relational model of data. > > m.. string theory. :-) -- /*** * Robby Russell | Owner.Developer.Geek

Re: [GENERAL] [SECURITY] New set of PostgreSQL RPMS are available for download

2004-10-26 Thread Gaetano Mendola
Devrim GUNDUZ wrote: * Updated PyGreSQL from 3.4 to 3.5 (only for 7.4.6-2PGDG) Given the fact that PyGreSQL is still affected by the unfamous "idle in transaction" behaviour: def __init__(self, cnx): self.__cnx = cnx self.__cache = pgdbTypeCache(cnx) try: src

[GENERAL] pg_autovacuum in 8beta-dev3 small bug

2004-10-26 Thread Leen Besselink
Hi folks, 8.0beta3 has pg_autovacuum included, when I want to run this as a Windows service, it says you can use the -I and -R options. When I do that and I specify a password with '-P' (uppercase) then in the registry it's saved as '-p' (lowercase) in the service-commandline (ImagePath). Also i

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Jeff Davis
> That article makes me want to vomit uncontrollably! ;-) > > "Business data might also simply be bad -- glitches in the Social > Security Administration's system may lead to different persons having > the same Social Security Number. A surrogate key helps to isolate the > system from such pro

Re: [GENERAL] Newbie question about escaping in a function

2004-10-26 Thread Naeem Bari
Thanks! Now I get it... naeem -Original Message- From: Oliver Elphick [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 3:05 PM To: Naeem Bari Cc: [EMAIL PROTECTED] Subject: Re: [GENERAL] Newbie question about escaping in a function On Tue, 2004-10-26 at 11:57 -0500, Naeem Bari

Re: [GENERAL] Bug or stupidity

2004-10-26 Thread Thomas Hallgren
Martijn, > Do you have a better suggestion, other than forbidding the currently allowed syntax? Yes I do. We agree that my second example should be disallowed since the semantics of the FROM clause is different for a DELETE so the "add_missing_from" is actually not adding to a FROM clause, it is

Re: [GENERAL] (S)RPMs for PostgreSQL 7.2.6, 7.3.8 and 7.4.6 are

2004-10-26 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Mon, 25 Oct 2004, Gaetano Mendola wrote: (S)RPMs for new point releases (per http://archives.postgresql.org/pgsql-announce/2004-10/msg00010.php) have been built for Fedora Core 1&2, Red Hat Linux 9 and Red Hat Enterprise Linux 3. If you want in

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Duane Lee - EGOVX
Title: RE: [GENERAL] primary key and existing unique fields Look at the database design in terms of data retrieval.  If I add a sequence number as my primary key, when I get ready to retrieve that record "directly" how do I know what that sequence number is.  For instance, my employee number i

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Dawid Kuroczko
On Tue, 26 Oct 2004 16:24:44 +, Sally Sally <[EMAIL PROTECTED]> wrote: > Hi all, > I am wandering about the pros and cons of creating a separate serial field > for a primary key when I already have a single unique field. This existing > unique field will have to be a character of fixed length (

Re: [GENERAL] what could cause inserts getting queued up and db locking??

2004-10-26 Thread Tom Lane
Brian Maguire <[EMAIL PROTECTED]> wrote: >> We though there might be locking, but noticed that there were not any >> queries in wait mode indicating that no statements were blocked by >> another statement's lock. In that case it's not a locking problem, but just a resource-saturation problem. I'm

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Mike Mascari
Joshua D. Drake wrote: Here is a good article on the topic: http://www.devx.com/ibm/Article/20702 The surrogate key isn't solving the underlying logical inconsistency problem. It is being used as a work-around to cover one up. I suspect the author of being a MySQL user. Actually he is a softwar

Re: [GENERAL] basic debugging question

2004-10-26 Thread Scott Frankel
I should have *myself* committed. Thanks for the suggestions (and OID tip)! It turned out that my script was not committing the transaction, so the insert was getting rolled-back. Thanks Scott On Oct 26, 2004, at 12:39 PM, Scott Frankel wrote: I'm attempting to debug a script that should perfor

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Joshua D. Drake
Here is a good article on the topic: http://www.devx.com/ibm/Article/20702 The surrogate key isn't solving the underlying logical inconsistency problem. It is being used as a work-around to cover one up. I suspect the author of being a MySQL user. Actually he is a software project consultant for

Re: [GENERAL] basic debugging question

2004-10-26 Thread Oliver Elphick
On Tue, 2004-10-26 at 12:39 -0700, Scott Frankel wrote: > I'm attempting to debug a script that should perform a simple INSERT of > values, > but for some reason doesn't. The insert appears to occur without > error, printing > "INSERT 18015 1 upon completion." Nonetheless, no data values appear

Re: [GENERAL] basic debugging question

2004-10-26 Thread Martijn van Oosterhout
On Tue, Oct 26, 2004 at 12:39:46PM -0700, Scott Frankel wrote: > > I'm attempting to debug a script that should perform a simple INSERT of > values, > but for some reason doesn't. The insert appears to occur without > error, printing > "INSERT 18015 1 upon completion." Nonetheless, no data val

Re: [GENERAL] basic debugging question

2004-10-26 Thread Tino Wildenhain
Am Di, den 26.10.2004 schrieb Scott Frankel um 21:39: > I'm attempting to debug a script that should perform a simple INSERT of > values, > but for some reason doesn't. The insert appears to occur without > error, printing > "INSERT 18015 1 upon completion." Nonetheless, no data values appear

Re: [GENERAL] Bug or stupidity

2004-10-26 Thread Martijn van Oosterhout
On Tue, Oct 26, 2004 at 06:21:23PM +0200, Thomas Hallgren wrote: > Do you consider this overly complex? Compare: > > DELETE FROM x WHERE EXISTS (SELECT * FROM table WHERE x.a = table.a and > x.b > table.b and table.c = 4) > > to: > > DELETE FROM x, table WHERE x.a = table.a and x.b > table.b an

Re: [GENERAL] Newbie question about escaping in a function

2004-10-26 Thread Oliver Elphick
On Tue, 2004-10-26 at 11:57 -0500, Naeem Bari wrote: > I have a simple function defined thusly: > > > > CREATE OR REPLACE FUNCTION datemath(timestamp with time zone, int4, > varchar) > > RETURNS timestamp AS > > ' > > DECLARE > > tdat timestamp; > > rdat timestamp; > > BEGIN > >

Re: [GENERAL] Error restoring bytea from dump

2004-10-26 Thread Michael Fuhr
On Tue, Oct 26, 2004 at 08:51:31PM +0200, Együd Csaba wrote: > > the restoration of a dump stops at the line above. What line above? Are you referring to "Error restoring bytea" in the subject header? Is that the *exact* error message? > The dump was created with pgsql 7.3.2 and I need to pump

Re: [GENERAL] Base type OIDs

2004-10-26 Thread Dan Sugalski
At 3:41 PM -0400 10/26/04, Tom Lane wrote: Dan Sugalski <[EMAIL PROTECTED]> writes: DB error is: ERROR: unsupported format code: 1043 You're putting it in the format parameter, not the datatype parameter D'oh! Darned reused array pointers... Thanks. -- Dan -

Re: [GENERAL] Complex query need help with OR condition.

2004-10-26 Thread Jaime Casanova
--- Ken Tozier <[EMAIL PROTECTED]> escribió: > I'm working on a query which works as expected when > I leave out one of > the "OR" tests but when the "OR" is included, I get > hundreds of > duplicate hits from a table that only contains 39 > items. Is there a way > to write the following so th

Re: [GENERAL] Base type OIDs

2004-10-26 Thread Tom Lane
Dan Sugalski <[EMAIL PROTECTED]> writes: >DB error is: ERROR: unsupported format code: 1043 You're putting it in the format parameter, not the datatype parameter ... regards, tom lane ---(end of broadcast)--- TIP 5: Hav

[GENERAL] basic debugging question

2004-10-26 Thread Scott Frankel
I'm attempting to debug a script that should perform a simple INSERT of values, but for some reason doesn't. The insert appears to occur without error, printing "INSERT 18015 1 upon completion." Nonetheless, no data values appear to be added to the table when queried in psql. Questions: - Wha

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Mike Mascari
Joshua D. Drake wrote: Sally Sally wrote: Can you please elaborate on the point you just made as to why the primary key should not relate to the data (even for a case when there is an existing unique field that can be used to identify the record) Here is a good article on the topic: http://www.d

Re: [GENERAL] what could cause inserts getting queued up and db locking??

2004-10-26 Thread Brian Maguire
Thanks. We do have it set to 15 mb. I would think that 16 mb would not make a big difference. Do you have any other ideas? -Original Message- From: Kevin Barnard [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 26, 2004 2:32 PM To: Brian Maguire Cc: [EMAIL PROTECTED] Subject: Re:

Re: [GENERAL] Error restoring bytea from dump

2004-10-26 Thread Együd Csaba (Freemail)
Hi there, isn't there any idea? :((( -- Csaba Együd -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Együd Csaba Sent: Monday, October 25, 2004 10:44 PM To: '[EMAIL PROTECTED]' Subject: [GENERAL] Error restoring bytea from dump Hi, the restoration of a

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Joshua D. Drake
Sally Sally wrote: Can you please elaborate on the point you just made as to why the primary key should not relate to the data (even for a case when there is an existing unique field that can be used to identify the record) Here is a good article on the topic: http://www.devx.com/ibm/Article/207

Re: [GENERAL] what could cause inserts getting queued up and db locking??

2004-10-26 Thread Kevin Barnard
This sounds like a WAL segment recycling issue. I believe 8.0 should relieve some of the stress. I've had this problem before and found that increasing the number of check point segments has helped a little. You still get the a wallop when this happens, increasing the size should make that happ

[GENERAL] Base type OIDs

2004-10-26 Thread Dan Sugalski
I'm trying to properly tag the types of the parameters I'm passing into PQexecParams, as it seems to be the right thing to do, and it's not that big a deal given my existing code base. Unfortunately I'm running into a problem figuring out what I should be using for the tag numbers. I originall

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Sally Sally
Can you please elaborate on the point you just made as to why the primary key should not relate to the data (even for a case when there is an existing unique field that can be used to identify the record) From: "Joshua D. Drake" <[EMAIL PROTECTED]> To: Sally Sally <[EMAIL PROTECTED]> CC: [EMAIL

Re: [GENERAL] what could cause inserts getting queued up and db locking??

2004-10-26 Thread Brian Maguire
One observation that we made was right when the statements pile up there is a large increase in the number of disk reads. The entire issue lasts approx. 20 secs and then everything recovers. There will be a backlog of 300+ statements and then all a sudden it seems to get resolved. We though th

[GENERAL] [SECURITY] New set of PostgreSQL RPMS are available for download

2004-10-26 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 - - PostgreSQL RPM Set Update 2004-10-26 Version(s): 7.3.8, 7.4.6 New set labels: 7.3.8-2PGDG, 7.4.6-2PGDG - - - --

[GENERAL] Newbie question about escaping in a function

2004-10-26 Thread Naeem Bari
I have a simple function defined thusly:   CREATE OR REPLACE FUNCTION datemath(timestamp with time zone, int4, varchar)   RETURNS timestamp AS ' DECLARE   tdat timestamp;   rdat timestamp; BEGIN   IF ($1 IS NULL) THEN     TDAT := NOW();   ELSE     TDAT := $1;   END IF;     se

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Joshua D. Drake
Sally Sally wrote: Hi all, I am wandering about the pros and cons of creating a separate serial field for a primary key when I already have a single unique field. This existing unique field will have to be a character of fixed length (VARCHAR(12)) because although it's a numeric value there will

Re: [GENERAL] primary key and existing unique fields

2004-10-26 Thread Duane Lee - EGOVX
Title: RE: [GENERAL] primary key and existing unique fields Since you already have the unique field I see no point in adding a sequence to the table, unless of course the sequence of the data inserts is of importance at some point. Duane -Original Message- From: Sally Sally [mailto:

[GENERAL] primary key and existing unique fields

2004-10-26 Thread Sally Sally
Hi all, I am wandering about the pros and cons of creating a separate serial field for a primary key when I already have a single unique field. This existing unique field will have to be a character of fixed length (VARCHAR(12)) because although it's a numeric value there will be leading zeroes.

Re: [GENERAL] PgSQL MVCC vs MySQL InnoDB

2004-10-26 Thread Andrew Sullivan
On Mon, Oct 25, 2004 at 03:45:40PM -0400, Jan Wieck wrote: > That is a (mis)feature of MySQL itself, not of the InnoDB storage engine > if used in a mixed table type query by MySQL. Sure, but I think this difference is very far from plain in the marketing literature promoting MySQL with InnoDB.

Re: [GENERAL] Bug or stupidity

2004-10-26 Thread Martijn van Oosterhout
On Tue, Oct 26, 2004 at 05:25:57PM +0200, Thomas Hallgren wrote: > If the WHERE clause that defines the criteria for deletion involves more > than one table, then you'd use a sub select and that has a FROM clause > of its own. Sure, that's what you could do, but it makes the query rather more co

[GENERAL] page locking? too many btree indexes...

2004-10-26 Thread Brian Maguire
Can too many btree indexes cause page level locking?    I read this…   http://www.postgresql.org/docs/7.4/static/locking-indexes.html   The concern is the exclusive page-level locking that occurs on inserts to the index.   I am experiencing locking related on two tables.  Each has

Re: [GENERAL] Question about ltree....

2004-10-26 Thread Net Virtual Mailing Lists
Somehow I missed the ltree[] array stuff - this solves fairly nicely at least the second part of my problem, but I'm still not sure how to optimize the query which contains the union... My optimized table looks like this: CREATE TABLE sometable ( id SERIAL, category LTREE[] );

Re: [GENERAL] Bug or stupidity

2004-10-26 Thread Thomas Hallgren
Stephan, Perhaps the 8.0 would be a perfect time since it's a change of the major number. Maybe, but I think it'll be a hard sell without a replacement for the delete form that works when it's off. I'm not sure I understand this. Apparently you want tables to be added to the FROM clause of

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Henk Ernst Blok
Hi Alvaro, I used to do some research in extensibility of query optimizers to match the extensibility of the operators. However, it's not really in the focus of my research anymore so I can't spend much time on it, unfortunately. I'll keep it in mind in case a student of the group where I'm wo

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Henk Ernst Blok
Tino, Thanks for the sugestion about exploiting the rules system. I hadn't thought about that option yet. Currently I'm trying to pre-compute as much as possible. Regards, Henk Ernst Tino Wildenhain wrote: Hi, On Tue, 2004-10-26 at 15:25, Henk Ernst Blok wrote: ... the TPC-

Re: [GENERAL] Any plans on allowing user-defined triggers to be

2004-10-26 Thread Stephan Szabo
On Tue, 26 Oct 2004, Mike Mascari wrote: > Stephan Szabo wrote: > > On Tue, 26 Oct 2004, Mike Mascari wrote: > > > > > >>I'd like to ensure that the creation of a department also implies the > >>creation of two to eight projects; no more, no less: > > >>Is there no way to achieve the above stated

Re: [GENERAL] Any plans on allowing user-defined triggers to be

2004-10-26 Thread Stephan Szabo
On Tue, 26 Oct 2004, Mike Mascari wrote: > Stephan Szabo wrote: > > On Tue, 26 Oct 2004, Mike Mascari wrote: > > > > > >>I'd like to ensure that the creation of a department also implies the > >>creation of two to eight projects; no more, no less: > > >>Is there no way to achieve the above stated

Re: [GENERAL] Bug: 8.0 beta1 either view optimization or pgdump/pgrestore

2004-10-26 Thread Tom Lane
Sim Zacks <[EMAIL PROTECTED]> writes: > I just did a dump and restore of my database and one of my views did > not recreate. > The error received was : > pg_restore.exe: [archiver (db)] could not execute query: ERROR: column reference > "pricinggroupid" is ambiguous > I checked the function in

[GENERAL] Out of memory error

2004-10-26 Thread Taber, Mark
Title: Out of memory error We are running Postgres 8.0 beta (ver 3), and are running into the following message while accessing the table through ODBC from PC-SAS: CLI describe error:  Out of memory while reading tuples.  We've followed the ODBC documentation and changed (well, actually, didn'

Re: [GENERAL] Any plans on allowing user-defined triggers to be deferrable?

2004-10-26 Thread Mike Mascari
Stephan Szabo wrote: On Tue, 26 Oct 2004, Mike Mascari wrote: I'd like to ensure that the creation of a department also implies the creation of two to eight projects; no more, no less: Is there no way to achieve the above stated goal in the server? Must I rely on the application to enforce consis

Re: [GENERAL] Bug or stupidity

2004-10-26 Thread Stephan Szabo
On Mon, 25 Oct 2004, Thomas Hallgren wrote: > Stephan, > > > In general, when we add a backwards compatibility option, we give > > a couple of versions before the default is changed. > > > Perhaps the 8.0 would be a perfect time since it's a change of the major > number. Maybe, but I think it'

Re: [GENERAL] Any plans on allowing user-defined triggers to be

2004-10-26 Thread Stephan Szabo
On Tue, 26 Oct 2004, Mike Mascari wrote: > I'd like to ensure that the creation of a department also implies the > creation of two to eight projects; no more, no less: > > CREATE TABLE departments ( > department text primary key not null > ); > > CREATE TABLE projects ( > project text primary k

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Tino Wildenhain
Hi, On Tue, 2004-10-26 at 15:25, Henk Ernst Blok wrote: ... > the TPC-H query set in particular). So decision support and datamining > are in that area for instance. My topic of interest is IR (information > retrieval) in a database context. My experiments behave like an OLAP > load at the moment

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Henk Ernst Blok
Hi Tino, Tino Wildenhain wrote: I assume(d) the more expensive statistics (e.g., value distribution info) are updated only when outdated too much or on request (manual vacuum). Usually, other/cheap statistics can easily be maintained incrementally and thus reflect actual table state af

Re: [GENERAL] Any plans on allowing user-defined triggers to be deferrable?

2004-10-26 Thread Mike Mascari
Valentin Militaru wrote: You can do that. But first you have to do some optimisations, like: add a column id(bigserial) to the departamens table, after which you will replace the column department with id_department in the projects table. It is an optimisation, as you are dealing with integer

Re: [GENERAL] ON DELETE trigger blocks delete from my table

2004-10-26 Thread Richard_D_Levine
Interesting about the meta DDL. I wrote a very small language called QDL for Query Description Language that uses the same idea. You feed QDL and the SQL schema into the compiler and it writes C modules with embedded SQL. Makes porting my application from one database to another a snap from the

[GENERAL] Any plans on allowing user-defined triggers to be deferrable?

2004-10-26 Thread Mike Mascari
I'd like to ensure that the creation of a department also implies the creation of two to eight projects; no more, no less: CREATE TABLE departments ( department text primary key not null ); CREATE TABLE projects ( project text primary key not null, department text not null references department

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Tino Wildenhain
On Tue, 2004-10-26 at 13:56, Henk Ernst Blok wrote: > Hi, > > My question was more of a fundamental nature as this count by scan > seemed to contradict the theory about how to optimize it. It is hard or next to impossible to optimize count() or more generally aggregates in a MVCC environment. Not

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Alvaro Herrera
On Tue, Oct 26, 2004 at 01:56:41PM +0200, Henk Ernst Blok wrote: Hi, > I assume(d) the more expensive statistics (e.g., value distribution > info) are updated only when outdated too much or on request (manual > vacuum). Usually, other/cheap statistics can easily be maintained > incrementally a

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Neil Conway
Henk Ernst Blok wrote: I assume(d) the more expensive statistics (e.g., value distribution info) are updated only when outdated too much or on request (manual vacuum). They are only updated on request -- i.e. when an ANALYZE is issued. So if explain can get the most recent count, why not use it

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Henk Ernst Blok
Hi, My question was more of a fundamental nature as this count by scan seemed to contradict the theory about how to optimize it. I assume(d) the more expensive statistics (e.g., value distribution info) are updated only when outdated too much or on request (manual vacuum). Usually, other/chea

Re: [GENERAL] compatibilityissues from 7.1 to 7.4

2004-10-26 Thread Ian Barwick
On Tue, 26 Oct 2004 18:22:55 +0900, Joel <[EMAIL PROTECTED]> wrote: > I seem to remember reading a post on this, but searching marc does not > seem to bring it up immediately. > > Company BBS is on postgresql, but it's still at 7.1. The guy in charge > of it wants some ballpark estimates and warni

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Tino Wildenhain
hi, On Tue, 2004-10-26 at 10:16, Henk Ernst Blok wrote: > Hi Posgres users/developers, > > Can anyone explain why PosgreSQL (version 7.4.5 on Linux) does a full > table scan to compute a count(*) on a base table after a vacuum analyze > has been done with no following updates that might have ou

[GENERAL] Bug: 8.0 beta1 either view optimization or pgdump/pgrestore

2004-10-26 Thread Sim Zacks
I just did a dump and restore of my database and one of my views did not recreate. The error received was : pg_restore.exe: [archiver (db)] could not execute query: ERROR: column reference "pricinggroupid" is ambiguous I checked the function in the original database, using PGAdmin, and the syst

Re: [GENERAL] Theory!!

2004-10-26 Thread Jeff Davis
> can anyone give me some info on the caracteristics of object > relational databases and their advantages as well as disdvantages! First, it's best to understand the real concepts behind relational databases. I read two great books that taught me a lot about the theory of RDBMSs, and why they wer

[GENERAL] compatibilityissues from 7.1 to 7.4

2004-10-26 Thread Joel
I seem to remember reading a post on this, but searching marc does not seem to bring it up immediately. Company BBS is on postgresql, but it's still at 7.1. The guy in charge of it wants some ballpark estimates and warnings about upgrading to 7.4 so he doesn't have to worry about the recent vulner

Re: [GENERAL] Strange count(*) implementation?

2004-10-26 Thread Richard Huxton
Henk Ernst Blok wrote: Hi Posgres users/developers, Can anyone explain why PosgreSQL (version 7.4.5 on Linux) does a full table scan to compute a count(*) on a base table after a vacuum analyze has been done with no following updates that might have outdated any statistics. Strangly the explain

Re: [GENERAL] what could cause inserts getting queued up and db locking??

2004-10-26 Thread Richard Huxton
Brian Maguire wrote: What could cause the database to lock up and queue up all the queries? You'll want to check the lock details (pg_locks: see "Monitoring Database Activity" in the reference manuals) and also what the system as a whole is doing (vmstat/iostat). I seem to recall some configurat

Re: [GENERAL] Theory!!

2004-10-26 Thread Richard Huxton
Mayra wrote: hi, can anyone give me some info on the caracteristics of object relational databases and their advantages as well as disdvantages! I'm not sure that there is any standard definition of "object relational databases". You also don't say what you want to compare them to. Could you prov

Re: [GENERAL] [Fwd: Abrupt close of pgsql backend]

2004-10-26 Thread Richard Huxton
Deepa K wrote: Hi, I am running postgresql 7.1.3 in RedHat Linux 7.2. From an external C application, three connections are established with postmaster (it is started with -i option) through unix sockets. Two times I received EPIPE error when trying to send a query to postmaster. This is be

[GENERAL] Strange count(*) implementation?

2004-10-26 Thread Henk Ernst Blok
Hi Posgres users/developers, Can anyone explain why PosgreSQL (version 7.4.5 on Linux) does a full table scan to compute a count(*) on a base table after a vacuum analyze has been done with no following updates that might have outdated any statistics. Strangly the explain command does give the c