Re: [GENERAL] When an index and a constraint have the same name...

2007-01-30 Thread Jason L. Buberel
Thanks for taking a look Tom: I am running postgres 8.1.4 on RedHet (CentOS) v4.0. Here is the description of the purchase_record table (somewhat abbreviated with uninvolved columns omitted): # \d purchase_record Table "public.purchase_record" Column

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Scott Marlowe
On Tue, 2007-01-30 at 23:45 -0600, Tony Caduto wrote: > David Fetter wrote: > >> That being said, I think it is a dumb feature. If you have data in > >> one database, that requires access to another database within the > >> same cluster. You designed your database incorrectly and should be > >> usi

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Tom Lane
Jeff Davis <[EMAIL PROTECTED]> writes: > Updatable views provide a subset of the functionality of rules, but they > do it automatically without much effort on the part of the DBA. That's > great, but it won't replace rules. Exactly --- but there is also a place for a low-effort, "do the right thin

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Paul Lambert
Richard Troy wrote: [snip] My observation is that we have a real shortage of quality operating systems today, and what few exist/remain don't enjoy much market share because they're not based on Unix, so they're largely missing out on the Open Source activity. What may be worse, young people

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tony Caduto
David Fetter wrote: That being said, I think it is a dumb feature. If you have data in one database, that requires access to another database within the same cluster. You designed your database incorrectly and should be using schemas. I would have to disagree, it's a feature that has been

Re: [GENERAL] When an index and a constraint have the same name...

2007-01-30 Thread Tom Lane
[EMAIL PROTECTED] writes: > Seems as though I've gotten myself into something of a pickle: > I wound up with a fkey constraint and an index on the same table having the > same name ('rs_fkey'). That shouldn't be a problem particularly. > The result is an error message when I try to drop the tabl

Re: [GENERAL] PostgreSQL data loss

2007-01-30 Thread Scott Ribe
In addition to the other good suggestions, modify you program to record a plain old text log of dangerous actions confirmed by users. These kinds of people usually shut up pretty quickly when you tell them the date, time, IP address of the machine, and login name of the user who did it. -- Scott

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tom Lane
David Fetter <[EMAIL PROTECTED]> writes: > On Tue, Jan 30, 2007 at 04:43:14PM -0800, Richard Troy wrote: >> ... different in my opinion if only Unix didn't have this asenine view >> that the choice between a memory management strategy that kills >> random processes and turning that off and acceptin

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Bruno Wolff III
On Tue, Jan 30, 2007 at 16:43:14 -0800, Richard Troy <[EMAIL PROTECTED]> wrote: > > be better - and once were. (Example, anyone who thinks "man pages" are > great has obviously got a very limited experience from which to base their > opinion!) ... As a practical matter today we mostly have a cho

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread David Fetter
On Tue, Jan 30, 2007 at 04:43:14PM -0800, Richard Troy wrote: > On Tue, 30 Jan 2007, Mark Walker wrote: > > > > I don't know. My customers expect 24/7 reliability. They expect > > to be able to access their info anywhere in the world over a > > variety of different devices. I can remember times

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread David Fetter
On Tue, Jan 30, 2007 at 06:15:01PM -0800, Joshua D. Drake wrote: > Peter Eisentraut wrote: > >This has been discussed about ten thousand times, and the answer is > >still no. > > > Actually the answer is: Check the TODO list. It is listed under > Exotic features, so the answer is, no we can't yes

Re: [GENERAL] Index bloat of 4x

2007-01-30 Thread Bruce Momjian
Tom Lane wrote: > Bill Moran <[EMAIL PROTECTED]> writes: > > The entire database was around 28M prior to the upgrades, etc. Immediately > > after the upgrades, it was ~270M. Following a vacuum full, it dropped to > > 165M. Following a database-wide reindex, it dropped to 30M. > > As Alvaro said

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tom Lane
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: > Actually the answer is: Check the TODO list. It is listed under Exotic > features, so the answer is, no we can't yes we would like to. > That being said, I think it is a dumb feature. FWIW, the SQL committee thinks it's a fine idea --- the SQL-MED

Re: [GENERAL] Index bloat of 4x

2007-01-30 Thread Bruce Momjian
I found this thread quite depressing because I had forgotten the VACUUM FULL only reclaims totally empty pages. I have applied the following documentation patch to recommend periodic REINDEX, and backpatched to 8.2.X docs. I also added some TODO items so hopefully at least we will keep track of

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: >>> Right. This is expected. VACUUM cannot remove them because the >>> serializable transaction might still want to see those rows. > Joseph S wrote: >> The serializable transaction *can't* see those rows, they were created >> and obsoleted after the

Re: [GENERAL] Index bloat of 4x

2007-01-30 Thread Bruce Momjian
Added to TODO: * Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY This is difficult because you must upgrade to an exclusive table lock to replace the existing index file. CREATE INDEX CONCURRENTLY does not have this complication. This wou

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Joshua D. Drake
Gregory S. Williamson wrote: I actually disagree, mildly. Keep in mind that I was speaking generally and to that note, I generally agree with what you suggest below. The point I was trying to make and wasn't be clear enough about is most people that want the feature, want it for the wrong re

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Gregory S. Williamson
I actually disagree, mildly. Our system uses two variants of two types of data. Client data has a presence in the billing database, but has an incarnation in our runtime servers to allow for authentication. Not the same databases, since we can't afford the extra time for the hop, which might be

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Alvaro Herrera
> Alvaro Herrera wrote: > >Joseph S wrote: > >>I realize this thread is old, but I just conducted an experiment with pg > >>8.0.10 and a transaction with a SERIALIZABLE isolation level does > >>prevent VACUUM from reclaiming rows that were created and then obsoleted > >> in a subsequent transact

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Joseph S
The serializable transaction *can't* see those rows, they were created and obsoleted after the start of the transaction. The point of make the transaction serializable in the first place was to allow VACUUM to reclaim those rows. Alvaro Herrera wrote: Joseph S wrote: I realize this thread i

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Joshua D. Drake
Peter Eisentraut wrote: This has been discussed about ten thousand times, and the answer is still no. Actually the answer is: Check the TODO list. It is listed under Exotic features, so the answer is, no we can't yes we would like to. That being said, I think it is a dumb feature. If you

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Alvaro Herrera
Joseph S wrote: > I realize this thread is old, but I just conducted an experiment with pg > 8.0.10 and a transaction with a SERIALIZABLE isolation level does > prevent VACUUM from reclaiming rows that were created and then obsoleted > in a subsequent transaction. Right. This is expected. VA

Re: [GENERAL] VACUUM and open transactions

2007-01-30 Thread Joseph S
I realize this thread is old, but I just conducted an experiment with pg 8.0.10 and a transaction with a SERIALIZABLE isolation level does prevent VACUUM from reclaiming rows that were created and then obsoleted in a subsequent transaction. Martijn van Oosterhout wrote: On Thu, Oct 19, 2006

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tom Lane
Mark Walker <[EMAIL PROTECTED]> writes: > Maybe that's just my experience with my customers. I have seen signs of > dysfunctional computer systems lately. I was in a fast food restaurant > in San Francisco a few months back and they were manually taking > orders. I think the only reason they

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Richard Troy
On Tue, 30 Jan 2007, Mark Walker wrote: > > I don't know. My customers expect 24/7 reliability. They expect to be > able to access their info anywhere in the world over a variety of > different devices. I can remember times when people would just go home > because computer networks were down.

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Mark Walker
I don't know. My customers expect 24/7 reliability. They expect to be able to access their info anywhere in the world over a variety of different devices. I can remember times when people would just go home because computer networks were down. I haven't seen that happen in a long time. Ma

[GENERAL] 8.2.1 Compiling Error

2007-01-30 Thread elein
Debian Linux. Have always built from scratch with no problem. This is 8.2.1 from postgresql.org. Conf line is: --prefix=/local/pgsql82 --enable-depend --enable-cassert --enable-debug --with-tcl --with-python --with-perl --with-pgport=5432 Build error is: gcc -O2 -Wall -Wmissing-prototypes -W

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Jeffrey Webster
On 1/30/07, Peter Eisentraut <[EMAIL PROTECTED]> wrote: This has been discussed about ten thousand times, and the answer is still no. How did we go from this? To this: It's already in the TODO list. regards, tom lane Perhaps we should be more diplomatic in our appr

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Richard Troy
On Tue, 30 Jan 2007, Mark Walker wrote: > > LOL, I remember those days. "Uh, can you hold on? My computer just > went down." or "you need to fill out form 1203-B, send us $25 and we'll > get you the information you need in six weeks." Just kidding, but > certainly reliability standards and info

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/07 16:35, Mark Walker wrote: > LOL, I remember those days. "Uh, can you hold on? My computer just > went down." or "you need to fill out form 1203-B, send us $25 and we'll > get you the information you need in six weeks." Just kidding, but

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Mark Walker
LOL, I remember those days. "Uh, can you hold on? My computer just went down." or "you need to fill out form 1203-B, send us $25 and we'll get you the information you need in six weeks." Just kidding, but certainly reliability standards and information demands are much higher these days, are

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Tom Lane
"Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > My point is, its not about throwing money at a problem. PostgreSQL > seems to be having right people at the right place and benefits from > it. They do the hard work, they do it well, hence 8.0, 8.1, 8.2 and > upcoming 8.3 release. If you buy these p

Re: [GENERAL] How to allow users to log on only from my application not from pgadmin

2007-01-30 Thread Raymond O'Donnell
However user can login directly to database using pgAdmin. This bypasses the security. If only certain privileged users are supposed to use pgAdmin, can you arrange so that only they have access to it in the first place? - such as granting execute permissions on pgAdmin only to the privileged

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Rich Shepard
On Tue, 30 Jan 2007, Ron Johnson wrote: The company might not have the resources to maintain 2 backends, or modify the whole system so that it is backend neutral. Maybe they use lots of MySQL-specific features that would make re-engineering it an arduous/imposible/expensive task, and thus not f

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/07 15:55, Richard Troy wrote: >> On 01/30/07 14:41, Tony Caduto wrote: >>> Mark Walker wrote: [snip] > These days with good open source choices, things are a bit > different, but that doesn't mean it's always good to go hog wild > with any par

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Richard Troy
> On 01/30/07 14:41, Tony Caduto wrote: > > Mark Walker wrote: > >> It's sort of a matter of taste, but there are lots of people who like > >> to keep there logic on the server or at least within sql statements, > >> so there's probably a good sized market that your not reaching if you > >> ignor

Re: [GENERAL] Can a function be parameter in PL/PGSQL function?

2007-01-30 Thread Jeff Davis
On Tue, 2007-01-30 at 12:32 -0800, Karen Hill wrote: > Is it possible to have a pl/pgsql function take another pl/pgsql > function as one of the parameters? > Not directly, but it could take a text string as a parameter and then EXECUTE the text string after passing it to quote_ident(). Regards

Re: [pgsql-advocacy] [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Bruce Momjian
Dawid Kuroczko wrote: > On 1/30/07, Ron Mayer <[EMAIL PROTECTED]> wrote: > > Ron Johnson wrote: > > >> Who would they target anyways? > > >> There's no one company > > > > > > They could buy out CommandPrompt and EnterpriseDB... > > > > > > The buyouts wouldn't *kill* pg, but they would wound i

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Dawid Kuroczko
On 1/30/07, Ron Mayer <[EMAIL PROTECTED]> wrote: Ron Johnson wrote: >> Who would they target anyways? >> There's no one company > > They could buy out CommandPrompt and EnterpriseDB... > > The buyouts wouldn't *kill* pg, but they would wound it mightily. I don't think so. High-profile and

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Dawid Kuroczko
On 30 Jan 2007 12:15:17 -0800, Karen Hill <[EMAIL PROTECTED]> wrote: On Jan 29, 11:06 pm, [EMAIL PROTECTED] ("Dawid Kuroczko") wrote: > * updatable views [ or am I missing something? ] -- it seems to me > they were close to be completed, but I don't remember if they were > completed and committed

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Bill Moran
In response to Ron Johnson <[EMAIL PROTECTED]>: > > On 01/30/07 14:50, Rich Shepard wrote: > > On Tue, 30 Jan 2007, Mark Walker wrote: > > > [snip] > > At last year's at O'Reilly's OSCON here in Portland I had this discussion > > with the booth babes sales droids from Sugar-CRM. They said that

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Ron Mayer
Ron Johnson wrote: >> Who would they target anyways? >> There's no one company > > They could buy out CommandPrompt and EnterpriseDB... > > The buyouts wouldn't *kill* pg, but they would wound it mightily. I don't think so. High-profile and high priced buyouts of CommandPrompt and Enterpri

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/07 14:50, Rich Shepard wrote: > On Tue, 30 Jan 2007, Mark Walker wrote: > [snip] > At last year's at O'Reilly's OSCON here in Portland I had this discussion > with the booth babes sales droids from Sugar-CRM. They said that they heard > num

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/07 14:41, Tony Caduto wrote: > Mark Walker wrote: >> It's sort of a matter of taste, but there are lots of people who like >> to keep there logic on the server or at least within sql statements, >> so there's probably a good sized market that

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Rich Shepard
On Tue, 30 Jan 2007, Rich Shepard wrote: business sense. However, this seems to be what every CRM/SFA[1] Oops! [1] Customer Relations Management/Sales Force Automation. Rich -- Richard B. Shepard, Ph.D. |The Environmental Permitting Applied Ecosystem Services, Inc.

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Rich Shepard
On Tue, 30 Jan 2007, Mark Walker wrote: Does the developer offer any hard evidence for his statement? I mean like benchmark tests and a side by side list of features? Mark, No. And I've read this excuse from them before when I asked about a port. The application is written in php and they

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Rich Shepard
On Tue, 30 Jan 2007, Bill Moran wrote: Consider the source. If he chose to write for MySQL instead of PostgreSQL, he probably isn't up to speed on what's going on with PostgreSQL. Bill, It's 'they' rather than 'he,' but your point is still valid. PostgreSQL is anything but behind on both

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tony Caduto
Mark Walker wrote: It's sort of a matter of taste, but there are lots of people who like to keep there logic on the server or at least within sql statements, so there's probably a good sized market that your not reaching if you ignore it. That is a good point, I and many developers I know li

[GENERAL] Can a function be parameter in PL/PGSQL function?

2007-01-30 Thread Karen Hill
Is it possible to have a pl/pgsql function take another pl/pgsql function as one of the parameters? regards, karen ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your jo

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Mark Walker
It's interesting that this is yet another issue of where exactly you want to place your business logic. Do you do it as much as you can on your sql server or do you bias it towards your client application. It's obvious that you can do cross database linking in your application layer, but if y

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tom Lane
Tony Caduto <[EMAIL PROTECTED]> writes: > Considering all these other DBs can do it, doesn't it make sense to at > least put it on the radar for Postgresql? It's already in the TODO list. regards, tom lane ---(end of broadcast)

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Karen Hill
On Jan 29, 11:06 pm, [EMAIL PROTECTED] ("Dawid Kuroczko") wrote: > * updatable views [ or am I missing something? ] -- it seems to me > they were close to be completed, but I don't remember if they were > completed and committed or not. > PostgreSQL has updatable views via the rules system. I us

Re: [GENERAL] DBI support for pg native arrays?

2007-01-30 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 > For a "select array(...) as col1, col2, col3 from table" I'd like the DBI > driver to output col1 as a perl array instead of a scalar > "{res1,res2,etc.}" representation of it. > > Is that somehow possible? I looked at the docs without finding

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tony Caduto
Ron Johnson wrote: be separate databases because they're clearly related data. Just because they are related, doesn't mean that it's always wise to lump it all in the same database. Mainly for scalability and performance reasons. I would tend to agree, there are numerous times being

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/07 13:33, Brandon Aiken wrote: > I always assumed the general argument is if you need to query different > databases on the same server with the same application, they ought not > to be separate databases because they're clearly related data.

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Mark Walker
Does the developer offer any hard evidence for his statement? I mean like benchmark tests and a side by side list of features? My impression is that Mysql is set up very narrowly for a typical ISP offering LAMP and not much else. Once you start going into corporate installations on private s

Re: [GENERAL] DBMS Engines and Performance

2007-01-30 Thread Bill Moran
In response to Rich Shepard <[EMAIL PROTECTED]>: >I received a response from the development coordinator of an OSS business > application I'd really like to use, but it works only with MySQL. The > two reasons the one interested developer isn't devoting more time to the > port are a lack of pr

Re: [GENERAL] SELECT FOR UPDATE with ORDER BY to avoid row-level deadlock?

2007-01-30 Thread Joris Dobbelsteen
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Panther >Sent: dinsdag 30 januari 2007 7:07 >To: pgsql-general@postgresql.org >Subject: [GENERAL] SELECT FOR UPDATE with ORDER BY to avoid >row-level deadlock? > >Hi, > >My problem is that if I try to updat

[GENERAL] DBMS Engines and Performance

2007-01-30 Thread Rich Shepard
I received a response from the development coordinator of an OSS business application I'd really like to use, but it works only with MySQL. The two reasons the one interested developer isn't devoting more time to the port are a lack of priority and paying sponsor. However, what puzzles me is

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Brandon Aiken
I always assumed the general argument is if you need to query different databases on the same server with the same application, they ought not to be separate databases because they're clearly related data. It's kinda like "why isn't there a way to do an exactly one to exactly one relationship betw

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Guido Neitzer
Am 30.01.2007 um 12:11 schrieb Tony Caduto: Why? Seems to me if it was discussed that much it must be a very sought after feature. How come it's not on the TO Do list for the future at least? Is it because of some limitation of the core engine or something? http://www.postgresql.org/docs/fa

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tony Caduto
Peter Eisentraut wrote: This has been discussed about ten thousand times, and the answer is still no. Why? Seems to me if it was discussed that much it must be a very sought after feature. How come it's not on the TO Do list for the future at least? Is it because of some limitation of the

Re: [GENERAL] How to allow users to log on only from my application not from pgadmin

2007-01-30 Thread Bruno Wolff III
On Sun, Jan 28, 2007 at 23:46:27 +0200, Andrus <[EMAIL PROTECTED]> wrote: > My application implements field and row level security. > I have custom table of users where user privileges are described. > > However user can login directly to database using pgAdmin. This bypasses > the security. >

Re: [GENERAL] Problem loading pg_dump file

2007-01-30 Thread Mark Walker
What is the delimiter between id and created_at? I believe they're supposed to be tabs with \t used for tabs inside a field. The data you give here is all whitespaces. Mason Hale wrote: I've done a bit more digging into this, here's what I've found -- The text db dump file is much too big

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Peter Eisentraut
This has been discussed about ten thousand times, and the answer is still no. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Jeff Davis
On Tue, 2007-01-30 at 02:35 -0800, Joshua D. Drake wrote: > > Something different than rules? > > (http://www.postgresql.org/docs/8.2/interactive/rules.html) (They exist for > > a > > while, I've just linked the latest released docs...) > > > Quite. Rules are not updateable views. Rules are a h

Re: [GENERAL] pg migrator

2007-01-30 Thread Erik Jones
Rich Shepard wrote: On Mon, 29 Jan 2007, Denis Lussier wrote: Korry Douglas has an EDB sponsored project called pg_migrator on pgfoundry. I believe it works for upgrading from 8.1 to 8.2 except for tables that use the ip address datatype. It works by just replacing the 8.1 system catalogs wit

Re: [GENERAL] Problem loading pg_dump file

2007-01-30 Thread Mason Hale
I've done a bit more digging into this, here's what I've found -- The text db dump file is much too big to edit by hand (~37GB), so I ran the import in single-step mode: psql -U bdu -s bdu_01_21_07 < bduprod_2-01-21-07 Here's the first error I run across: ***(Single step mode: verify command)*

Re: [GENERAL] How to allow users to log on only from my application

2007-01-30 Thread Andrus
>> My application implements field and row level security. >> I have custom table of users where user privileges are described. >> >> However user can login directly to database using pgAdmin. This bypasses >> the security. >> >> How to allow users to login only from my application ? >> I think I m

Re: [GENERAL] How to allow users to log on only from my application

2007-01-30 Thread Andrus
> Doesn't pg_hba.conf just deal with user connections? If you denied via > pg_hba.conf, wouldn't you also deny access for the application? Can > pg_hba.conf authenticate based on a per application basis? I wasn't aware > of anything like that. I'm not an expert on this, so I could be wrong.

[GENERAL] SELECT FOR UPDATE with ORDER BY to avoid row-level deadlock?

2007-01-30 Thread Panther
Hi, My problem is that if I try to update more than one row in a table like > UPDATE mytable SET something = 84 WHERE not_unique_col = 41; in two concurrent transactions, it can result in a deadlock if the two UPDATEs visit the rows in a different order. The same applies, if I try to > SELECT * F

Re: [GENERAL] pg migrator

2007-01-30 Thread Rich Shepard
On Tue, 30 Jan 2007, Erik Jones wrote: I had the same problem: searching for 'pg_migrator' found nothing. However, searching for 'migrator' got it. A-ha! I didn't try that, just fell back to Google. :-) Thanks, Erik, Rich -- Richard B. Shepard, Ph.D. |The Environmental

[GENERAL] Any Plans for cross database queries on the same server?

2007-01-30 Thread Tony Caduto
Dblink is nice, but should it really be needed for databases on the same physical server? What would be cool is to allow a double dot notation i.e. database1..schema1.table1 Just a idea. Comments? -- Tony ---(end of broadcast)--- TIP 9: In v

[GENERAL] When an index and a constraint have the same name...

2007-01-30 Thread jason
Seems as though I've gotten myself into something of a pickle: I wound up with a fkey constraint and an index on the same table having the same name ('rs_fkey'). The result is an error message when I try to drop the table (cascade) or even drop the constraint: # alter table report_specifica

Re: [GENERAL] SELECT FOR UPDATE with ORDER BY to avoid row-level deadlock?

2007-01-30 Thread Dániel Dénes
Tom Lane <[EMAIL PROTECTED]> wrote: > Daniel Denes <[EMAIL PROTECTED]> writes: > > > But what if I try like > >> SELECT * FROM mytable > >> WHERE not_unique_col = 41 ORDER BY pri_key ASC FOR UPDATE; > > and do the UPDATE after this? It should never lead to a deadlock, > > assuming the rows sel

Re: [GENERAL] SELECT FOR UPDATE with ORDER BY to avoid row-level deadlock?

2007-01-30 Thread Tom Lane
=?ISO-8859-2?Q?D=E1niel_D=E9nes?= <[EMAIL PROTECTED]> writes: > But what if I try like >> SELECT * FROM mytable >> WHERE not_unique_col = 41 ORDER BY pri_key ASC FOR UPDATE; > and do the UPDATE after this? It should never lead to a deadlock, > assuming the rows selected FOR UPDATE are locked in th

[GENERAL] SELECT FOR UPDATE with ORDER BY to avoid row-level deadlock?

2007-01-30 Thread Dániel Dénes
Hi, My problem is that if I try to update more than one row in a table like > UPDATE mytable SET something = 84 WHERE not_unique_col = 41; in two concurrent transactions, it can result in a deadlock if the two UPDATEs visit the rows in a different order. The same applies, if I try to > SELECT * F

Re: [GENERAL] pg migrator

2007-01-30 Thread Rich Shepard
On Mon, 29 Jan 2007, Denis Lussier wrote: Korry Douglas has an EDB sponsored project called pg_migrator on pgfoundry. I believe it works for upgrading from 8.1 to 8.2 except for tables that use the ip address datatype. It works by just replacing the 8.1 system catalogs with the 8.2 system cata

Re: [GENERAL] Retrieving PK of inserted row

2007-01-30 Thread Tom Lane
"woger151" <[EMAIL PROTECTED]> writes: > Reading around, I've seen the following methods discussed: > (1) Within a transation, do the INSERT, and then do a SELECT CURVAL > (2) Not necessarily within a transaction, get a candidate for the pk using > SELECT NEXTVAL, then INSERT the row. > (3) Use LA

Re: [GENERAL] Foreign keys, table inheritance, and TRUNCATE

2007-01-30 Thread Alvaro Herrera
Florian Weimer wrote: > Here's something I've just noticed: > > CREATE TABLE foo (f INTEGER PRIMARY KEY); > INSERT INTO foo VALUES (1); > CREATE TABLE bar (b INTEGER REFERENCES foo); > CREATE TABLE bar1 () INHERITS (bar); > INSERT INTO bar1 VALUES (1); > > This is quite correct: No, it isn't; tr

Re: [GENERAL] PG Email Client

2007-01-30 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/30/07 00:32, Hakan Kocaman wrote: > Hi, > > you can find a nice virtual folder implementation in the > Opera-Mailclient M2. Not sure if this also works with IMAP (don't > use IMAP yet). > > Virtual folders are based on regexes over various fiel

[GENERAL] Foreign keys, table inheritance, and TRUNCATE

2007-01-30 Thread Florian Weimer
Here's something I've just noticed: CREATE TABLE foo (f INTEGER PRIMARY KEY); INSERT INTO foo VALUES (1); CREATE TABLE bar (b INTEGER REFERENCES foo); CREATE TABLE bar1 () INHERITS (bar); INSERT INTO bar1 VALUES (1); This is quite correct: TRUNCATE foo; ERROR: cannot truncate a table referenced

Re: [GENERAL] Retrieving PK of inserted row

2007-01-30 Thread cedric
Le mardi 30 janvier 2007 12:19, woger151 a écrit : > (3) Use LASTVAL for this one : look at http://people.planetpostgresql.org/xzilla/index.php?/archives/169-Is-lastval-evil.html > > My questions: > * Are any of these methods flawed? > * Is there any reason to prefer (1) to (2)? > * I'm not sure w

Re: [GENERAL] Unauthorized users can see db schema and read functions

2007-01-30 Thread Willy-Bas Loos
In 8.2 the "CONNECT" priviledge was introducted on the database Wow it works! :D However, you can use pg_hba.conf to restrict access to a database entirely. That works too! You can even allow all databases for all, and reject some databases to some, as long as the "reject" lines are above the

[GENERAL] Retrieving PK of inserted row

2007-01-30 Thread woger151
I want to retrieve the primary key, which is a SERIAL, of a row I just inserted. In 8.2, I could use RETURNING, but I'm using 8.1. Reading around, I've seen the following methods discussed: (1) Within a transation, do the INSERT, and then do a SELECT CURVAL (2) Not necessarily within a transact

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Peter Eisentraut
Jorge Godoy wrote: > "Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > > * updatable views [ or am I missing something? ] -- it seems to me > > they were close to be completed, but I don't remember if they were > > completed and committed or not. > > Something different than rules? > (http://www.postg

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Joshua D. Drake
Jorge Godoy wrote: "Dawid Kuroczko" <[EMAIL PROTECTED]> writes: * updatable views [ or am I missing something? ] -- it seems to me they were close to be completed, but I don't remember if they were completed and committed or not. Something different than rules? (http://www.postgresql.

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Jorge Godoy
"Dawid Kuroczko" <[EMAIL PROTECTED]> writes: > * updatable views [ or am I missing something? ] -- it seems to me > they were close to be completed, but I don't remember if they were > completed and committed or not. Something different than rules? (http://www.postgresql.org/docs/8.2/interactive/

Re: [GENERAL] Unauthorized users can see db schema and read functions

2007-01-30 Thread Richard Huxton
Willy-Bas Loos wrote: Hi, I've noticed that any user who can logon to a db cluster can read the schema of all databases in it, including the code of all plpgsql functions. Even in schema's he/she doesn't have access to. [snip] o Why is schema information not restricted? o Is there any way

Re: [GENERAL] Unauthorized users can see db schema and read functions

2007-01-30 Thread Joris Dobbelsteen
_ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Willy-Bas Loos Sent: dinsdag 30 januari 2007 9:41 To: pgsql-general@postgresql.org Subject: [GENERAL] Unauthorized users can see db schema and read functions Hi, I've noticed that any user who can logon to a db cluste

[GENERAL] Unauthorized users can see db schema and read functions

2007-01-30 Thread Willy-Bas Loos
Hi, I've noticed that any user who can logon to a db cluster can read the schema of all databases in it, including the code of all plpgsql functions. Even in schema's he/she doesn't have access to. For tables it just says 'access denied for schema bla', after which the structure is still shown to

Re: [GENERAL] PostgreSQL 9.0

2007-01-30 Thread Peter
Personally I'm missing two things, which were discussed in the past, but would be nice to have: * more efficient storage of varlen data -- some time ago there were ideas to get rid of constant 4-bytes for length and use more elastic approach. Smaller tables, bigger performance. * updatable views