Re: [GENERAL] Restricting access to rows?

2006-05-25 Thread Rafal Pietrak
Hi, Are there any plans to make CREATE USER local to a database? (as opposed to CLUSTER scope, as it is today) So that in such cases as Benjamin's, the ISP could satisfy customer requests by createing and handing over the new database instance within the managed cluster? Even with the unrestricte

Re: [GENERAL] Restricting access to rows?

2006-05-25 Thread Greg Stark
Benjamin Smith <[EMAIL PROTECTED]> writes: > How can I set up a user so that Bob can update his records, without letting > Bob update Jane's records? Is it possible, say with a view or some other > intermediate data type? It's not hard to give them access to *view* their records using a view.

Re: [GENERAL] Restricting access to rows?

2006-05-25 Thread Andreas Kretschmer
Benjamin Smith <[EMAIL PROTECTED]> schrieb: > How can I set up a user so that Bob can update his records, without letting > Bob update Jane's records? Is it possible, say with a view or some other > intermediate data type? You can use a VIEW to select all rows for CURRENT_USER, and then create

[GENERAL] Restricting access to rows?

2006-05-25 Thread Benjamin Smith
We have a growing ASP-hosted application built on PHP/Postgres 8.1, and are getting requests from clients to manipulate the databases more directly. However, the structure of our databases prevents this from happening readily. Assume I have two tables configured thusly: create table customers

Re: [GENERAL] Toronto PostgreSQL Gathering - June 1st

2006-05-25 Thread Christopher Browne
Martha Stewart called it a Good Thing when Christopher Browne <[EMAIL PROTECTED]> wrote: > A number of groups gather at different times at Toronto's Linux Caffe; > the first Thursday of the month seems an opportune time for this, and > the next incidence of that is next Thursday, June 1st. And oo

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread Tom Lane
David Wall <[EMAIL PROTECTED]> writes: > Thanks, Robert. Actually, I noted that each time I ran my backup > script, the OID mentioned in the error was bigger than previous number. That's fairly interesting, but can you provide a self-contained test case? The reindexdb script really doesn't do a

[GENERAL] Toronto PostgreSQL Gathering - June 1st

2006-05-25 Thread Christopher Browne
I had intended to try to "organize" some form of Toronto PostgreSQL 'user group'; some challenges have gotten in the way of having that be at all "large scale," but it certainly makes sense to try to get local people interested in PostgreSQL together every so often. A number of groups gather at di

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread David Wall
It really isn't neccessary. That said, there is *something* going on with your db, so it might be prudent to figure out what it is. Thanks, Robert. Actually, I noted that each time I ran my backup script, the OID mentioned in the error was bigger than previous number. Before I run the re

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread Robert Treat
On Thursday 25 May 2006 19:34, David Wall wrote: > Rats! I found nothing But just for grins, I ran the reindexdb > program a second time, and this time it reported a different OID, higher > than the previous. I know we didn't change the template1 database other > than using it when creating

Re: [GENERAL] 8.1.4: Who says "PHP deprecated addslashes since 4.0"?

2006-05-25 Thread ljb
[EMAIL PROTECTED] wrote: > ljb <[EMAIL PROTECTED]> writes: >> | addslashes() or magic_quotes. We note that these tools have been >> deprecated >> | by the PHP group since version 4.0. > >> Can anyone provide a source for the statement? > > I'm not going to put words in Josh's mouth about where h

Re: [GENERAL] Status of gist locking in 8.1.3?

2006-05-25 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > As I write this I am creating an index with gist and trying to do a select > on the table froze. Using Postgresql 8.1.3 CREATE INDEX shouldn't block any concurrent SELECT, regardless of which index AM is involved. Can you provide a reproducible test

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread David Wall
Rats!  I found nothing  But just for grins, I ran the reindexdb program a second time, and this time it reported a different OID, higher than the previous.  I know we didn't change the template1 database other than using it when creating new databases, creating users, tablespaces, etc. My

[GENERAL] Status of gist locking in 8.1.3?

2006-05-25 Thread Francisco Reyes
The release notes for 8.1, http://www.postgresql.org/docs/whatsnew, states about GIST indexing mechanism has improved to support the high-speed concurrency, recoverability and update performance As I write this I am creating an index with gist and trying to do a select on the table froze. Us

Re: [GENERAL] move from 1 database to another

2006-05-25 Thread Ragnar
On fim, 2006-05-25 at 11:52 -0700, P.M wrote: > I would like to know how can i move from 1 database to another one ? > > basically i want to run a *.sql script in which i connect under a > particular database (for example : template1 or postgres) and my *.sql > script should create a new database

Re: [GENERAL] move from 1 database to another

2006-05-25 Thread Michael Fuhr
On Thu, May 25, 2006 at 05:41:34PM -0500, Jim Nasby wrote: > On May 25, 2006, at 1:52 PM, P.M wrote: > >I would like to know how can i move from 1 database to another one ? > > > >basically i want to run a *.sql script in which i connect under a > >particular database (for example : template1 or

Re: [GENERAL] Best practice to grant all privileges on all bjects in database?

2006-05-25 Thread Jorge Godoy
Em Quinta 25 Maio 2006 19:33, Jim Nasby escreveu: > > Only helps if the OP is willing to run on HEAD; grant on sequence is > not in 8.1 (at least not according to the docs). > > As for triggers, I don't really see how that would make any sense. A trigger could start some modification in a table wh

Re: [GENERAL] What to expect when mixing inherited tables and different schemas while dealing with functions and views?

2006-05-25 Thread Jorge Godoy
Em Quinta 25 Maio 2006 19:27, Jim Nasby escreveu: > > Yes. Views essentially end up with schemas hard-coded into them. If > that doesn't work you should be able to create views on set returning > functions, though that's obviously more work. > > I don't know how hard it would be to allow views to b

Re: [GENERAL] move from 1 database to another

2006-05-25 Thread Jim Nasby
On May 25, 2006, at 1:52 PM, P.M wrote: I would like to know how can i move from 1 database to another one ? basically i want to run a *.sql script in which i connect under a particular database (for example : template1 or postgres) and my *.sql script should create a new database (for examp

Re: [GENERAL] Best practice to grant all privileges on all bjects in database?

2006-05-25 Thread Jim Nasby
On May 24, 2006, at 10:50 AM, Bruno Wolff III wrote: On Mon, May 22, 2006 at 12:59:06 +0300, Joe Kramer <[EMAIL PROTECTED]> wrote: On a related note, which objects need to be GRANTed specifically? There is a saying that following objects can have permissions GRANTed: 1. TABLE 2. DATABASE 3.

Re: [GENERAL] What to expect when mixing inherited tables and different schemas while dealing with functions and views?

2006-05-25 Thread Jim Nasby
On May 23, 2006, at 9:20 PM, Jorge Godoy wrote: a) We are with some restricted search_path set (e.g. after "SET search_path TO schema_1") and we make a "SELECT * FROM base.view". What we're seeing is that views are tied to the schema where they were created, no matter if they are o

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread Joachim Wieland
David, On Thu, May 25, 2006 at 02:07:27PM -0700, David Wall wrote: > >object. Look in template1 and see if you see a table with that OID. > Thanks, but I clearly lack that expertise. How do I find "a table with > that OID"? Do a normal select against pg_class. Something like: select oid, rel

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread David Wall
(repost to newsgroup since the other went directly to Mr. Lane's email address) I think you've done something to template1, even though you say you haven't.  Out-of-the-box, an 8.1.3 database won't have any OIDs assigned above about 11000, so OID 41675 would have to belong to a user-crea

Re: [GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread Tom Lane
David Wall <[EMAIL PROTECTED]> writes: > When I create a brand new database and then run the reindexdb program > under PG 8.1.3, I get the follow error: > reindexdb: reindexing of database "" failed: ERROR: could not open > relation with OID 41675 > I'm not sure what this error is since we

[GENERAL] reindexdb program error under PG 8.1.3

2006-05-25 Thread David Wall
When I create a brand new database and then run the reindexdb program under PG 8.1.3, I get the follow error: reindexdb: reindexing of database "" failed: ERROR: could not open relation with OID 41675 I'm not sure what this error is since we have not even added any data yet. Is this so

Re: [GENERAL] background triggers?

2006-05-25 Thread Rafal Pietrak
On Thu, 2006-05-25 at 20:27 +0200, Dawid Kuroczko wrote: > On 5/25/06, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > > Here I'm just not interested in that procedure outcome: if it eventually > > COMMITED or ROLLED-BACK. But obviously I am interested in consistancy of > > database, when the detached p

Re: [GENERAL] background triggers?

2006-05-25 Thread Florian G. Pflug
Dawid Kuroczko wrote: On 5/25/06, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > Well, exactly "not being interested in the outcome" is IMHO the reason > why your demands clash with archtecture of a RDBMS. Most RDBMS go a long > way to ensure consistency and safety of your data, once they promised

[GENERAL] move from 1 database to another

2006-05-25 Thread P.M
Hi,I would like to know how can i move from 1 database to another one ?basically i want to run a *.sql script in which i connect under a particular database (for example : template1 or postgres) and my *.sql script should create a new database (for example : test) and after execute several SQL comm

Re: [GENERAL] background triggers?

2006-05-25 Thread Dawid Kuroczko
On 5/25/06, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > Well, exactly "not being interested in the outcome" is IMHO the reason > why your demands clash with archtecture of a RDBMS. Most RDBMS go a long > way to ensure consistency and safety of your data, once they promised > (usually by not raisin

Re: [GENERAL] background triggers?

2006-05-25 Thread Rafal Pietrak
On Thu, 2006-05-25 at 18:49 +0200, Florian G. Pflug wrote: > Rafal Pietrak wrote: > > 'technical' need for him/her to create the server side proces *provided* > > hi/she can setup a job *within* the database server itself, and just go > > away. > Well, exactly "not being interested in the outcome"

Re: [GENERAL] Postmaster crashes after upgrade to 8.1.4!

2006-05-25 Thread CG
Okay, there was no core dump to be found. I had to revert back to 8.1.3 which seems to be running fine. I am /extremely/ thankful that there was no data corruption. I took a 24 hour old dumpfile of the database it was crashing on and I restored it to a similar AMD64 box (SunFire x2100 instead of

[GENERAL] gentoo and 8.x

2006-05-25 Thread Michael Dean
Does anybody know when postgresql 8.1 will be considered stable on gentoo for x86? Gentoo, as a community-based distro with a unique perspective, usually seems to lag behind even important upgrades as 8.14. On 86 platform, it should be ok, although I would bring in code from postgresql and just

Re: [GENERAL] background triggers?

2006-05-25 Thread Florian G. Pflug
Rafal Pietrak wrote: On Wed, 2006-05-24 at 13:36 +0200, Sim Zacks wrote: My understanding of Listen/Notify is that it is a completely disconnected process running on the database server. Yes. But In my particular case (and I presume, the intention of 'bacground triggers' is that) a programmer

Re: [GENERAL] Postmaster crashes after upgrade to 8.1.4!

2006-05-25 Thread Bill Moran
CG <[EMAIL PROTECTED]> wrote: > I didn't find a core dump. > > Perhaps I'm looking in the wrong spot or for the wrong file. The file should > be > called "core.32140", correct? ... I did a "find / -name core*" ... that found > nothing useful. find / -name '*core*' would be more reliable. Free

Re: [GENERAL] Postmaster crashes after upgrade to 8.1.4!

2006-05-25 Thread CG
I didn't find a core dump. Perhaps I'm looking in the wrong spot or for the wrong file. The file should be called "core.32140", correct? ... I did a "find / -name core*" ... that found nothing useful. --- Tom Lane <[EMAIL PROTECTED]> wrote: > CG <[EMAIL PROTECTED]> writes: > > 2006-05-25 08:3

Re: [GENERAL] Postmaster crashes after upgrade to 8.1.4!

2006-05-25 Thread Tom Lane
CG <[EMAIL PROTECTED]> writes: > 2006-05-25 08:30:50.076 EDT LOG: server process (PID 32140) was terminated > by signal 11 That should be leaving a core dump file (if not, restart the postmaster under "ulimit -c unlimited"). Get a stack trace with gdb to get some more info about what's going o

Re: [GENERAL] postgreslog - panic message

2006-05-25 Thread Tom Lane
"surabhi.ahuja" <[EMAIL PROTECTED]> writes: > <2006-05-24 16:21:28 CDT%>LOG: database system was shut down at = > 2006-05-24 16:01:00 CDT > <2006-05-24 16:21:28 CDT%>LOG: record with zero length at 0/AC92BC > <2006-05-24 16:21:28 CDT%>LOG: invalid primary checkpoint record > <2006-05-24 16:21:28

Re: [GENERAL] postgreslog - panic message

2006-05-25 Thread Volkan YAZICI
On May 25 11:04, Richard Huxton wrote: > surabhi.ahuja wrote: > >hi, > >i am getting the following error messages: > > > ><2006-05-24 15:28:08 CDT%>LOG: could not bind IPv4 socket: Address > >already in use > ><2006-05-24 15:28:08 CDT%>HINT: Is another postmaster already running on > >port 543

[GENERAL] Postmaster crashes after upgrade to 8.1.4!

2006-05-25 Thread CG
Upgrading from 8.1.3 to 8.1.4, I compiled with the same configure flags, installed to a separate directory, shut down 8.1.3, copied the "data" directory over to the new 8.1.4 directory (cp -Rp), set my symlinks so that /usr/local/pgsql points to the new 8.1.4 directory, and fired it up. I ran some

Re: [GENERAL] Postgresql with Hibernate issues

2006-05-25 Thread Bjørn T Johansen
How does your hibernate mapping look like? Especially your generator tag... BTJ On Thu, 25 May 2006 16:09:22 - "xuemei" <[EMAIL PROTECTED]> wrote: > Hello: > > > > I have a java application that starts several processes to retrieve data and > store them into the database tables; > > Whe

Re: [GENERAL] 8.1 on gentoo

2006-05-25 Thread Kenneth Downs
Tim Allen wrote: Holger Hoffstaette wrote: On Thu, 25 May 2006 08:55:51 +0200, Sim Zacks wrote: Does anybody know when postgresql 8.1 will be considered stable on gentoo for x86? No, maybe ask in gentoo-users or -dev? Anyway just because it's not marked "stable" does not mean it isn't.

[GENERAL] Postgresql with Hibernate issues

2006-05-25 Thread xuemei
Hello:   I have a java application that starts several processes to retrieve data and store them into the database tables; When I run this on winXP and with Hibernate/Mysql, everything looks ok. Now I need to use postgresql, so I change the hibernate configuration file. When I run the

[GENERAL] PROBLEMAS CON POSTGRES EN MAQUINAS MULTIPROCESADORES

2006-05-25 Thread Jimmy Salazar
--- Begin Message --- lists Saludos, Resulta que el tiempo de ejecución obtenido en una maquina HP DL380 con 2 procesadores Xeon de 3.6 Gh y 4G de memoria con el siguiente comando "cat nombrearchivo.gz | gunzip | psql nombrebd -f -" es de 4 horas... este mismo Proceso en una maquina de DL580 c

Re: [GENERAL] Insert into partition table hangs

2006-05-25 Thread Nik
Ok, that's a good point. I overlooked the possibility of this considering that I didn't think the timestamp resolution was that high. I changed my rules and constraints on tables to take care of this case. Thanks. However, how does this affect the problem I having considering that inserts that wer

Re: [GENERAL] column order

2006-05-25 Thread nuno
hi, all. thanks for the replies. yes, i meant 'columns' not 'rows'. sorry if i made you a bit confused. my explanation should've been more descriptive than that i suppose. anyway, it's good to know that postgresql guarantees the column order. i was just trying to be double-safe before i mess up w

Re: [GENERAL] psql \echo strangeness with :variables

2006-05-25 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Jerry Sievers <[EMAIL PROTECTED]> wrote: % [EMAIL PROTECTED] % = \set date `date '+%Y%m%d'` % % [EMAIL PROTECTED] % = \echo :date % 20060524 % % [EMAIL PROTECTED] % = \echo foo_:date % foo_:date <-- Was expecting this to expand... see below variables need to b

[GENERAL] Attn: Richard Huxton

2006-05-25 Thread Dave Page
Your mailserver seems to be borked Richard: dev@archonet.com on 25/05/2006 11:49 The message cannot be delivered due to a configuration error on the server. Please contact your Administrator. < s1.uklinux.net #5.3.0 X-Unix; 73> Regards, Dave ---(end of broadcast)-

Re: [GENERAL] background triggers?

2006-05-25 Thread Rafal Pietrak
On Thu, 2006-05-25 at 11:29 +0200, Thomas Hallgren wrote: > Rafal Pietrak wrote: > > consuming housekeeping. Like a cleanup - always succeeds, even if > > sometimes is not really necesary (like in case of main rolling-back). > > > A somewhat limited use-case to form generic database functionality

Re: [GENERAL] postgreslog - panic message

2006-05-25 Thread Richard Huxton
surabhi.ahuja wrote: hi, i am getting the following error messages: <2006-05-24 15:28:08 CDT%>LOG: could not bind IPv4 socket: Address already in use <2006-05-24 15:28:08 CDT%>HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. <2006-05-24 15:28:0

Re: [GENERAL] background triggers?

2006-05-25 Thread Thomas Hallgren
Rafal Pietrak wrote: On Thu, 2006-05-25 at 10:33 +0200, Thomas Hallgren wrote: Rafal Pietrak wrote: I'd like to propose a 'syntax/semantics' of such trigger: Triggers normally execute inside of a transaction. A COMMIT within a trigger could mean: "do a fork: fork-1) return to the main and s

Re: [GENERAL] 8.1 on gentoo

2006-05-25 Thread Tim Allen
Holger Hoffstaette wrote: On Thu, 25 May 2006 08:55:51 +0200, Sim Zacks wrote: Does anybody know when postgresql 8.1 will be considered stable on gentoo for x86? No, maybe ask in gentoo-users or -dev? Anyway just because it's not marked "stable" does not mean it isn't. It's very unfortunate t

Re: [GENERAL] New DBs from existing schemas

2006-05-25 Thread Karsten Hilbert
On Wed, May 24, 2006 at 04:14:46PM -0700, Nishad Prakash wrote: > I want to create a new database with the exact schema of an existing one, > but a different name. After some reading, it seems > > pg_dump -s old_db > old_schema > createdb -t old_schema new_db Now new_db is a 1:1 copy of old_sche

Re: [GENERAL] background triggers?

2006-05-25 Thread Rafal Pietrak
On Thu, 2006-05-25 at 10:21 +0200, Dawid Kuroczko wrote: > On 5/25/06, Rafal Pietrak <[EMAIL PROTECTED]> wrote: > > I'd like to propose a 'syntax/semantics' of such trigger: > > > > Triggers normally execute inside of a transaction. > > > > A COMMIT within a trigger could mean: "do a fork: fork-1)

Re: [GENERAL] 8.1 on gentoo

2006-05-25 Thread Holger Hoffstaette
On Thu, 25 May 2006 08:55:51 +0200, Sim Zacks wrote: > Does anybody know when postgresql 8.1 will be considered stable on gentoo > for x86? No, maybe ask in gentoo-users or -dev? Anyway just because it's not marked "stable" does not mean it isn't. It's very unfortunate that distributions have ado

Re: [GENERAL] background triggers?

2006-05-25 Thread Rafal Pietrak
On Thu, 2006-05-25 at 10:33 +0200, Thomas Hallgren wrote: > Rafal Pietrak wrote: > > I'd like to propose a 'syntax/semantics' of such trigger: > > > > Triggers normally execute inside of a transaction. > > > > A COMMIT within a trigger could mean: "do a fork: fork-1) return to the > > main and s

Re: [GENERAL] background triggers?

2006-05-25 Thread Thomas Hallgren
Rafal Pietrak wrote: I'd like to propose a 'syntax/semantics' of such trigger: Triggers normally execute inside of a transaction. A COMMIT within a trigger could mean: "do a fork: fork-1) return to the main and schedule COMMIT there, fork-2) continue in bacground". And what if fork-1) return

Re: [GENERAL] background triggers?

2006-05-25 Thread Dawid Kuroczko
On 5/25/06, Rafal Pietrak <[EMAIL PROTECTED]> wrote: I'd like to propose a 'syntax/semantics' of such trigger: Triggers normally execute inside of a transaction. A COMMIT within a trigger could mean: "do a fork: fork-1) return to the main and schedule COMMIT there, fork-2) continue in bacground

[GENERAL] postgreslog - panic message

2006-05-25 Thread surabhi.ahuja
hi, i am getting the following error messages:   <2006-05-24 15:28:08 CDT%>LOG:  could not bind IPv4 socket: Address already in use<2006-05-24 15:28:08 CDT%>HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.<2006-05-24 15:28:08 CDT%>WARNING:  could