[GENERAL] default_index_tablespace?

2005-11-30 Thread Alexander M. Pravking
PostgreSQL 8.0 brought a great tablespaces feature. However, it's still a real pain for one who wants to separate tables and indices to different tablespaces: he has to do it manually, explicitely specifying tablespace for each index. Thus, I think it would be handy to have "default_index_tablespa

Re: [GENERAL] SELECT Generating Row Exclusive Locks?

2005-11-30 Thread Thomas F. O'Connell
On Nov 30, 2005, at 11:24 PM, Tom Lane wrote: "Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: I guess I'm still somewhat puzzled by the original statement of the question, then. Why does that particular view of locks occasionally tie a SELECT to a granted Row Exclusive lock? You sure it's

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Bruno Wolff III
On Wed, Nov 30, 2005 at 20:44:30 -0500, "John D. Burger" <[EMAIL PROTECTED]> wrote: > > That changes the semantics of what I want. If I group by personID > above, then every FOUR-way combo is of course unique. What I'd like to > do is group by the three attributes, and select for personID as

Re: [GENERAL] SELECT Generating Row Exclusive Locks?

2005-11-30 Thread Tom Lane
"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: > I guess I'm still somewhat puzzled by the original statement of the > question, then. Why does that particular view of locks occasionally > tie a SELECT to a granted Row Exclusive lock? You sure it's not left over from an update command earli

Re: [GENERAL] postgres log file

2005-11-30 Thread surabhi.ahuja
Title: Re: [GENERAL] postgres log file  the postgreslog has permission - 777, so anyone is able to write in it. that s why it is atleast showing   > LOG:  logger shutting down but i want more logging to be done ..how can it be done ..   thanks, regards Surabhi   From: Richard Huxton [mai

Re: [GENERAL] SELECT Generating Row Exclusive Locks?

2005-11-30 Thread Thomas F. O'Connell
On Nov 30, 2005, at 10:52 PM, Tom Lane wrote: "Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: For instance, if a long SELECT were running against table_foo and an UPDATE arrived wanting to update table_foo, I would expect to see in pg_locks an entry corresponding to the SELECT with granted =

Re: [GENERAL] SELECT Generating Row Exclusive Locks?

2005-11-30 Thread Tom Lane
"Thomas F. O'Connell" <[EMAIL PROTECTED]> writes: > For instance, if a long SELECT were running against table_foo and an > UPDATE arrived wanting to update table_foo, I would expect to see in > pg_locks an entry corresponding to the SELECT with granted = true and > an entry corresponding to t

Re: [GENERAL] How to run a stored PL/pgSQL function?

2005-11-30 Thread Joshua D. Drake
Somewhere in that script, I want to call or invoke (or whatever the right verb is) foo and provide its argument, so that when the script is being executed, at that point foo is executed and has its desired effect on the database. (I don’t need any return from foo.) But I don’t know what to pu

Re: [GENERAL] How to run a stored PL/pgSQL function?

2005-11-30 Thread Michael Glaesemann
On Dec 1, 2005, at 12:38 , Ken Winter wrote: How can I cause a PL/pgSQL function to be executed from a SQL script? I have a PL/pgSQL “foo (varchar)”. select foo(bar); -- where bar is of type varchar Michael Glaesemann grzm myrealbox com ---(end of broadcast)---

[GENERAL] How to run a stored PL/pgSQL function?

2005-11-30 Thread Ken Winter
How can I cause a PL/pgSQL function to be executed from a SQL script?   I know how to invoke a function using a trigger, but I don’t know any other way.   I’m looking at the SQL Command Reference at http://www.postgresql.org/docs/7.4/static/sql-commands.html, but the only command that l

Re: [GENERAL] SELECT Generating Row Exclusive Locks?

2005-11-30 Thread Thomas F. O'Connell
On Nov 30, 2005, at 9:22 PM, Thomas F. O'Connell wrote: I'm monitoring locks using this query: SELECT pgsa.procpid, pgsa.current_query, pgsa.query_start, pgc.relname, pgl.mode, pgl.granted FROM pg_catalog.pg_class pgc, pg_locks AS pgl, pg_stat_activity AS pgsa WHERE pgl.pid = pgsa.procpid

[GENERAL] SELECT Generating Row Exclusive Locks?

2005-11-30 Thread Thomas F. O'Connell
I'm monitoring locks using this query: SELECT pgsa.procpid, pgsa.current_query, pgsa.query_start, pgc.relname, pgl.mode, pgl.granted FROM pg_catalog.pg_class pgc, pg_locks AS pgl, pg_stat_activity AS pgsa WHERE pgl.pid = pgsa.procpid AND current_query <> '' AND pgl.relation = pgc.oid ORDER BY

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread John D. Burger
Scott Marlowe wrote: Won't this be a massive cross product of all pkey pairs that have the same field values? Yes, assuming there are a lot of them. OTOH, if there are only a few duplicates you're looking for... I'm not looking for duplicates, I'm looking for uniques - note the Subject lin

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Jim C. Nasby
On Wed, Nov 30, 2005 at 01:29:17PM -0500, John D. Burger wrote: > Jim C. Nasby wrote: > > >It will probably be a win to come up with a list of potential records > >from each table, instead of after doing the 3-way join. so something > >like: > > > >(SELECT gazPlaceID FROM gazPlaces GROUP BY featur

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Scott Marlowe
On Wed, 2005-11-30 at 16:27, John D. Burger wrote: > Scott Marlowe wrote: > > > select > > v1.pkey1, > > v1.field2, > > v1.field3, > > v1.field4, > > v2.pkey1, > > v2.field2, > > v2.field3, > > v2.field4, > > from > > view v1 > > join > > view v2 > > on ( >

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Tyler MacDonald
Jaime Casanova <[EMAIL PROTECTED]> wrote: > >Either way the end result is that some database drivers poison a > > transaction if there's any error, others are selective about which errors > > are fatal and which are not, and still others just don't care at all. > that is a mis-conception...

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread John D. Burger
Scott Marlowe wrote: OK, let's assume that the basic part of it, before the group by, has been put into a view, so we can then do: select pkey1, field2, field3, field4 from view; And we know that pkey1 is unique, but we want the records where pkey1 is the only thing different between them, r

Re: [GENERAL] How to check options PostgreSQL was started with

2005-11-30 Thread Jerry Sievers
frank church <[EMAIL PROTECTED]> writes: > How do you check the options a PosgreSQL service was started with? If you're wanting to know if postmaster was started with any command line args, such as an admin might do on a ad hoc basis from pg_ctl etc; cat $PGDATA/postmaster.opts If you do a simp

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Michael Fuhr
On Wed, Nov 30, 2005 at 04:19:18PM -0500, Andrew Sullivan wrote: > But it's worth knowing that in Pg 8.1 and later, you can wrap such > things in a subtransaction and get out of it that way. Shouldn't that be 8.0 and later? That's when savepoints were introduced. Or are you referring to somethin

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Jaime Casanova
On 11/30/05, Tyler MacDonald <[EMAIL PROTECTED]> wrote: > Andrew Sullivan <[EMAIL PROTECTED]> wrote: > > The inconvenience I'll grant, but the non-standard claim I think > > needs some justification. When the database encounters an error in a > > transaction, it is supposed to report an error. An

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Tyler MacDonald
Andrew Sullivan <[EMAIL PROTECTED]> wrote: > The inconvenience I'll grant, but the non-standard claim I think > needs some justification. When the database encounters an error in a > transaction, it is supposed to report an error. An error in a > transaction causes the whole transaction to fail:

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Andrew Sullivan
On Tue, Nov 29, 2005 at 07:44:05PM +, Tim Bunce wrote: > On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote: > > PostgreSQL, doing a SELECT on a table that doesn't exist poisons the rest of > > the transaction, whereas under MySQL and SQLite2 the transaction is allowed > > to conti

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Scott Marlowe
On Tue, 2005-11-29 at 20:58, John D. Burger wrote: > I could use some help with the following: > > I have a database of geographic entities with attributes spread across > several tables. I need to determine which entities are unique with > respect to some of those attributes. I'm using the fo

Re: [GENERAL] How to change database owner in 7.4

2005-11-30 Thread Scott Marlowe
On Wed, 2005-11-30 at 12:08, frank church wrote: > Hi guys, > > What is the command change database owner in PostgreSQL 7.4? > > I think the 'ALTER DATABASE foo OWNER TO blob;' is not implemented in 7.4 > update pg_database set datdba=(select usesysid from pg_user where usename='newowner');

Re: [GENERAL] Why pgAdmin III guru suggests VACUUM in 8.1

2005-11-30 Thread Andrus
>> I need to create installation for dumb users to ship DBMS with my >> application. >> So manual initial tuning is not possible. >> > > Some tuning is... for instance during installation you should run vacuum > analyze after loading your data in. My application runs ANALYZE command programmatical

Re: [GENERAL] What is the deal with mailing lists?

2005-11-30 Thread Joshua D. Drake
On Wed, 2005-11-30 at 14:12 -0500, Tom Lane wrote: > Joshua Drake <[EMAIL PROTECTED]> writes: > >> Anyway, next time you're seeing a delay take a look at the headers and > >> see if you can pin down what the bottleneck is. > > > Thank you for that... except that, I was talking about HOUR[n] delays

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Martijn van Oosterhout
On Wed, Nov 30, 2005 at 01:20:19PM -0500, John D. Burger wrote: > >select p1.gazPlaceID > > from gazPlaces as p1 > > join gazNamings as n1 using (gazPlaceID) > > join gazContainers as c1 using (gazPlaceID) > > group by p1.gazPlaceID, p1.featureType, n1.placeNameID, > >c1.contai

Re: [GENERAL] What is the deal with mailing lists?

2005-11-30 Thread Tom Lane
Joshua Drake <[EMAIL PROTECTED]> writes: >> Anyway, next time you're seeing a delay take a look at the headers and >> see if you can pin down what the bottleneck is. > Thank you for that... except that, I was talking about HOUR[n] delays not 13 > minutes. Yeah, so ... where's the blockage accordi

Re: [GENERAL] What is the deal with mailing lists?

2005-11-30 Thread Joshua Drake
It looks like it took a total of 7:20 for that email to make it to me.In a case of pot calling kettle black ;P, it took your machine 5:58 to get it to postgresql.org. Of course that's assuming everyone's clock isin sync, and the clock on the machine you sent the email from appears tobe 13 minutes f

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread John D. Burger
Jim C. Nasby wrote: It will probably be a win to come up with a list of potential records from each table, instead of after doing the 3-way join. so something like: (SELECT gazPlaceID FROM gazPlaces GROUP BY featureType HAVING count(*)=1) JOIN (SELECT ...) Hmm, not sure I understand. Joini

Re: [GENERAL] Why pgAdmin III guru suggests VACUUM in 8.1

2005-11-30 Thread Robert Treat
On Wednesday 30 November 2005 12:12, Andrus wrote: > >> No. autovacuum is turned ON by default in 8.1 XP > > > > Hrm, interesting that it's different than on Unix. > > Why major functionality is configured differently in different platforms ? > This increases the cost of initial tuning when mixed p

Re: [GENERAL] Question

2005-11-30 Thread Uwe C. Schroeder
How about reading the docs? http://www.postgresql.org/docs/8.1/interactive/server-programming.html is the chapter about stored procs On Tuesday 29 November 2005 09:12, Brandon E Hofmann wrote: > Does PostgreSQL include Stored Procedures supporting the CREATE PROCEDURE > syntax. I notice pgAdmin

Re: [GENERAL] How to check options PostgreSQL was started with

2005-11-30 Thread Jim C. Nasby
On Wed, Nov 30, 2005 at 06:18:01PM +, frank church wrote: > > How do you check the options a PosgreSQL service was started with? > > Frank Easiest way is to do show all; from psql. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.

Re: [GENERAL] What is the deal with mailing lists?

2005-11-30 Thread Jim C. Nasby
On Wed, Nov 30, 2005 at 09:26:18AM -0800, Joshua D. Drake wrote: > Hello, > > Is it me or are we regularly seeing HOURS between posts. It is pretty > ridiculous that the archives which are rsynced are regularly ahead of > actual mail delivery. > > Even worse that we can go hours between deliver

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread John D. Burger
On Nov 30, 2005, at 01:55, Martijn van Oosterhout wrote: On Tue, Nov 29, 2005 at 09:58:49PM -0500, John D. Burger wrote: I could use some help with the following: I have a database of geographic entities with attributes spread across several tables. I need to determine which entities are uni

[GENERAL] How to check options PostgreSQL was started with

2005-11-30 Thread frank church
How do you check the options a PosgreSQL service was started with? Frank This message was sent using IMP, the Internet Messaging Program. ---(end of broadcast)--- TIP 3: Have you c

Re: [GENERAL] Limits

2005-11-30 Thread Chris Browne
[EMAIL PROTECTED] (Bob Pawley) writes: > Are there any practical limits to the number of functions and > triggers that can be applied to any particular table?? I'd expect it to be rather like Perlis' assertion about procedures with lots of parameters... -- let name="cbbrowne" and tld="ntlug.org"

Re: [GENERAL] Finding uniques across a big join

2005-11-30 Thread Jim C. Nasby
It will probably be a win to come up with a list of potential records from each table, instead of after doing the 3-way join. so something like: (SELECT gazPlaceID FROM gazPlaces GROUP BY featureType HAVING count(*)=1) JOIN (SELECT ...) If you post the output of explain (or explain analyze is eve

[GENERAL] How to change database owner in 7.4

2005-11-30 Thread frank church
Hi guys, What is the command change database owner in PostgreSQL 7.4? I think the 'ALTER DATABASE foo OWNER TO blob;' is not implemented in 7.4 R Church This message was sent using IMP, the Internet Messaging Program. -

Re: [GENERAL] Why pgAdmin III guru suggests VACUUM in 8.1

2005-11-30 Thread Andrus
>> No. autovacuum is turned ON by default in 8.1 XP > Hrm, interesting that it's different than on Unix. Why major functionality is configured differently in different platforms ? This increases the cost of initial tuning when mixed platforms are used. > Initial tuning != maintenance. Many of Pos

Re: [GENERAL] memory leak under heavy load?

2005-11-30 Thread Jim C. Nasby
Probably best to open up a bug... On Wed, Nov 30, 2005 at 03:38:06PM +0530, surabhi.ahuja wrote: > even i have observed memory leaks ... is it happening in postgres side > > i can send the valgrind logs > > > > From: [EMAIL PROTECTED] on behalf of hubert depes

Re: [GENERAL] undefined behaviour for sub-transactions?

2005-11-30 Thread Tim Bunce
On Tue, Nov 29, 2005 at 10:50:01AM -0800, Tyler MacDonald wrote: > Tim Bunce <[EMAIL PROTECTED]> wrote: > > I'll guess that what you're really after is to be able to call begin_work > > again whilst an earlier begin_work is in effect and have the DBI keep a > > counter of how deeply nested the begi

[GENERAL] Question

2005-11-30 Thread Brandon E Hofmann
Does PostgreSQL include Stored Procedures supporting the CREATE PROCEDURE syntax. I notice pgAdmin III has a procedure section in addition to functions. I thought PostgreSQL implemented Stored Procedures before MySQL 5.0. I have a Sybase implementation with Stored Procedures that I want to conv

[GENERAL] What is the deal with mailing lists?

2005-11-30 Thread Joshua D. Drake
Hello, Is it me or are we regularly seeing HOURS between posts. It is pretty ridiculous that the archives which are rsynced are regularly ahead of actual mail delivery. Even worse that we can go hours between delivery. At the time of this writing, my last post from hackers is 5:54 AM PST. I

Re: [GENERAL] Tablespaces with Windows 2000

2005-11-30 Thread Stefan Balzter
Hi Magnus, Magnus Hagander schrieb: I'm having a hard time trying to create a tablespace with Windows 2000 and PostgreSQL 8. In general, it's the service account that has to have permissions. When you say client/service, do you mean you want to create a tablespace on a network drive? If so,

[GENERAL] Limits

2005-11-30 Thread Bob Pawley
Are there any practical limits to the number of functions and triggers that can be applied to any particular table??   Bob

Re: [GENERAL] Tablespaces with Windows 2000

2005-11-30 Thread Magnus Hagander
> I'm having a hard time trying to create a tablespace with > Windows 2000 and PostgreSQL 8. Is there a How-To somewhere on > the Net? I only find tablespace issues with Linux. One > article even claimed it was impossible with Windows, but > since I've tried it successfully in a localhost insta

Re: [GENERAL] [SQL] Archives site down?

2005-11-30 Thread Alvaro Herrera
Cc: changed to pgsql-general Neil Saunders wrote: > Apologies if this has been mentioned on announce (I'm not subscribed), > but the mailing list archive site appears to have a problem (403 > Forbidden): > > http://archives.postgresql.org/ Huh, also there seems to be something fishy with the arc

Re: [GENERAL] regarding Solaris 10

2005-11-30 Thread Bruce Momjian
surabhi.ahuja wrote: > i was using Postgre8.0 on linux. > > and was using the libpq libraries. > > i have to port the existing code now, to solaris 10, X86 architecture. > > are the libpq libraries still the same and the other api called to libpq, or > they have to be changed? All are the same

[GENERAL] regarding Solaris 10

2005-11-30 Thread surabhi.ahuja
Title: Re: [GENERAL] errors with 8.1 make on Solaris i was using Postgre8.0 on linux. and was using the libpq libraries. i have to port the existing code now, to solaris 10, X86 architecture. are the libpq libraries still the same and the other api called to libpq, or they have to be changed?

Re: [GENERAL] I can't build the 8.1.0 source rpm from postgresql.org

2005-11-30 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Wed, 30 Nov 2005, Devrim GUNDUZ wrote: + %aconfver /var/tmp/rpm-tmp.58757: line 79: fg: no job control error: Bad exit status from /var/tmp/rpm-tmp.58757 (%prep) I can reproduce this in tcl-enabled builds. Working on it and will send a p

Re: [GENERAL] I can't build the 8.1.0 source rpm from postgresql.org

2005-11-30 Thread Devrim GUNDUZ
Hi, On Mon, 28 Nov 2005, Jerry LeVan wrote: I downloaded the postgresql-8.1.0 source rpm for Fedora Core 4 from the rpm repository at postgresql.org. I installed the rpm with " rpm -i postgresql-8.1.0-2PGDG.src.rpm" I then attempted to rebuild the packages with rpmbuild --rebuild --define '

Re: [GENERAL] I can't build the 8.1.0 source rpm from postgresql.org

2005-11-30 Thread han . holl
On Tuesday 29 November 2005 00:42, Jerry LeVan wrote: > /var/tmp/rpm-tmp.58757: line 79: fg: no job control > error: Bad exit status from /var/tmp/rpm-tmp.58757 (%prep) [ cut ] > Any suggestions? > Well, I would look at what line 79 of /var/tmp/rpm-tmp.58757 has to say. Cheers, Han Holl --

Re: [GENERAL] memory leak under heavy load?

2005-11-30 Thread surabhi.ahuja
even i have observed memory leaks ... is it happening in postgres side   i can send the valgrind logs  From: [EMAIL PROTECTED] on behalf of hubert depesz lubaczewskiSent: Wed 11/30/2005 12:59 PMTo: Jim C. NasbyCc: PostgreSQL GeneralSubject: Re: [GENERAL] memory leak under heavy load?

Re: [GENERAL] Writing output to a file

2005-11-30 Thread Richard Huxton
Chris Gordon wrote: I have used \o foo.txt and it seems to write significantly less than what I see on the screen. Has anyone had experience with this? That's by design - it just shows results by default. I think you want to capture STDOUT/ERR rather like this: $ psql --echo-all -Urichardh

Re: [GENERAL] Login limitation?

2005-11-30 Thread Együd Csaba
I see. Thank you very much. -- csaba -Original Message- From: Jim C. Nasby [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 10:48 PM To: Egy?d Csaba Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Login limitation? Yes, that's probably true. Depending on your pain you