Re: [GENERAL] Superuser lost access to particular database

2006-09-11 Thread Francisco Reyes
[EMAIL PROTECTED] writes: This may sound a bit weird, but have you tried logging in as user1 and then granting the permission's to the superuser? Found that superuser could not see them because I had the tables in two schemas which the superuser did not have path to. Doing \dt .* I was able

Re: [GENERAL] Superuser lost access to particular database

2006-09-11 Thread Francisco Reyes
Tom Lane writes: Francisco Reyes <[EMAIL PROTECTED]> writes: I have one database owned by "user1" which as of 4 days ago the superuser, pgsql, can't see any tables. After furhter researching found that I could not see the tables because I have them in diferent schemas.. and the superuser di

Re: [GENERAL] Superuser lost access to particular database

2006-09-11 Thread Tom Lane
Francisco Reyes <[EMAIL PROTECTED]> writes: > I have one database owned by "user1" which as of 4 days ago the superuser, > pgsql, can't see any tables. Transaction ID wraparound ... I take it this is not PG 8.1? As long as it's at least 7.4, vacuuming the system catalogs should help.

[GENERAL] Superuser lost access to particular database

2006-09-11 Thread Francisco Reyes
I have one database owned by "user1" which as of 4 days ago the superuser, pgsql, can't see any tables. I noticed I had pg_dumpalls from 4 days ago.. stuck.. upon research I discovered that if I login as the superuser to the problem database that it can not see any of the tables owned by the r

Re: [GENERAL] Need Help w/ Timestamps

2006-09-11 Thread Scott Marlowe
On Mon, 2006-09-11 at 10:05, Enrico Riedel wrote: > Hi! > > I moved all of our PostGRE DBs from Windows to Linux last weekend. > Everything went well, performance is great, BUT there is one issue that I > need to solve. > > My problem is, that the precision for timestamps in Linux is greater than

Re: [GENERAL] Need Help w/ Timestamps

2006-09-11 Thread Ivan Sergio Borgonovo
On Mon, 11 Sep 2006 10:05:14 -0500 Enrico Riedel <[EMAIL PROTECTED]> wrote: > My problem is, that the precision for timestamps in Linux is > greater than in Windows. That seems to be fine, but MS Access > cannot handle it. E.g.: > >Windows Timestamp: 2006-09-08 15:25:42.332 >Linux Timesta

Re: [GENERAL] Database design and triggers...

2006-09-11 Thread romantercero
Hello Again, Yes, you're right. What I am talking about is a material view. Since I'm not sure yet which would be best (Material View Vs. Normal View) I will first try a normal view and if it turns out to be too slow I can always switch to a Material View. Thanks! ---(en

Re: [GENERAL] pg_dump and cluster

2006-09-11 Thread Angva
Thanks Alvaro! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

[GENERAL] off topic - web shop

2006-09-11 Thread stig erikson
Hi. We are looking to open a small web shop. I looked around to see if there are any open source web shops. Can anyone recommend any web shop system (free or non-free)? thanks stig ---(end of broadcast)--- TIP 4: Have you searched our list archive

[GENERAL] Need Help w/ Timestamps

2006-09-11 Thread Enrico Riedel
Hi! I moved all of our PostGRE DBs from Windows to Linux last weekend. Everything went well, performance is great, BUT there is one issue that I need to solve. My problem is, that the precision for timestamps in Linux is greater than in Windows. That seems to be fine, but MS Access cannot handle

Re: [GENERAL] plz unsubscribe me

2006-09-11 Thread Csaba Nagy
> You can eliminate such things by checking > the Subject line for Re: AW: SV: and such. > > :0 > * ! ^Subject:.*Re: > * ^Subject:.*(subscribe|subscribel|suscribe) > /dev/null ... which still doesn't cover "RE" translated in most of the world's languages, which I'm sure occasionally pop up from p

Re: [GENERAL] Database migration and redesign

2006-09-11 Thread Brandon Aiken
Excellent, I managed to find one of the major sticking points all by myself! This is exactly what I was looking for. Thanks! There seems to be a lot of that in the DB world. Practical vs theoretical. Or pragmatic vs strict. It seems to be whether you came from a math background -- in which ca

Re: [GENERAL] Database migration and redesign

2006-09-11 Thread Merlin Moncure
On 9/11/06, Brandon Aiken <[EMAIL PROTECTED]> wrote: My question relates to primary keys. The vast majority of tables have a primary key on a single char or varchar field. Is it considered better practice to create a serial type id key to use as the primary key for the table, and then create a

Re: [GENERAL] Database migration and redesign

2006-09-11 Thread Marco Bizzarri
Since you're in the process of modifying a database, you could find this useful: Agile Databases Techniques, by Scott Ambler. Regards Marco On 9/11/06, Brandon Aiken <[EMAIL PROTECTED]> wrote: I've been tasked with the unenviable job or migrating a MySQL 4.0 database to something more us

[GENERAL] Database migration and redesign

2006-09-11 Thread Brandon Aiken
I’ve been tasked with the unenviable job or migrating a MySQL 4.0 database to something more usable (namely, PostgreSQL 8).  MySQL 4.0 doesn’t even support basic things like subqueries, and in order to emulate the effects that RULEs, TRIGGERs and VIEWs bring, they had been using PHP scripts

[GENERAL] Groups, permissions and visibility

2006-09-11 Thread jonathan . lister
Suppose I have two groups of users and want to keep some sensitive information "hidden" from one group as described in the simple example below. When connecting as user 'visitor' via pgAdmin I am surprised that I can easily browse the structure of tables and the code of functions owned by 't

Re: [GENERAL] references/tutorial/tricks on dynamic generation of

2006-09-11 Thread Ivan Sergio Borgonovo
On Mon, 11 Sep 2006 09:36:28 -0400 John DeSoi <[EMAIL PROTECTED]> wrote: No matter how many $$ I put in my sql code it won't work in 7.4 ;) And I bet (ooh not seriously, since it's not the most proficient way to invest my $$) pgsql 8.X has been backported in sarge and it should already be in etch

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Marco Bizzarri
On 9/11/06, Purusothaman A <[EMAIL PROTECTED]> wrote: Hi Marco Bizzarri and Martijn van Oosterhout, Thanks for your valuable reply. I am trying to execute all query from VC++ through CDatabase::ExecuteSQL(sQueryString) function call. ie, via programming, not by manual entering query statement

Re: [GENERAL] Certificate, login & php question ? krb / sso

2006-09-11 Thread Michael Fuhr
On Mon, Sep 11, 2006 at 10:44:18AM +0200, Jean-Gerard Pailloncy wrote: > Le 11 sept. 06 à 05:57, Michael Fuhr a écrit : > > If such a capability existed then it could arguably be considered > > a flaw in SSL because it would allow a server to impersonate one > > of its clients to another server or

Re: [GENERAL] references/tutorial/tricks on dynamic generation of sql (& plpgsql functions) editing/coding

2006-09-11 Thread John DeSoi
On Sep 11, 2006, at 8:34 AM, Ivan Sergio Borgonovo wrote: Since the code inside the function is getting a bit longer than what I was used I'm getting crazy about double quotes, syntax highlight and such. I'm using pg 7.4 so $$ trick shouldn't work. If you can't update to 8.0 or later, you

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Purusothaman A
Hi Marco Bizzarri and Martijn van Oosterhout,Thanks for your valuable reply.I am trying to execute all query from VC++ through CDatabase::ExecuteSQL(sQueryString) function call.ie, via programming, not by manual entering query statements. so, in my situation I can construct a string and pass on to

Re: [GENERAL] references/tutorial/tricks on dynamic generation of sql (& plpgsql functions) editing/coding

2006-09-11 Thread Marcin Mank
> I'm using pg 7.4 so $$ trick shouldn't work. Should work. if you put enugh $$, somebody might backport this for you ;) how about: create or replace function SP_GarbageCollectionGenerate() returns bool as ' declare v_query text; begin v_qyery=''create or replace blah blah :para1 blah b

Re: [GENERAL] [ANNOUNCE] == PostgreSQL Weekly News - September 10 2006 ==

2006-09-11 Thread Tatsuo Ishii
> == PostgreSQL Product News == > > pgpool-II-1.0.0 is out, now supporting more than two servers and with > the new pgpoolAdmin tool written in PHP. > http://pgfoundry.org/projects/pgpool/ You dropped the most important feature in pgpool-II: parallel query. -- Tatsuo Ishii SRA OSS, Inc. Japan --

Re: [GENERAL] references/tutorial/tricks on dynamic generation of sql (& plpgsql functions) editing/coding

2006-09-11 Thread Merlin Moncure
On 9/11/06, Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote: I'd write a trigger that generate a function. This is done for performance reasons. The function will be called several times and it is a list of delete statement according to the content of a table. The content of the table will seldo

[GENERAL] references/tutorial/tricks on dynamic generation of sql (& plpgsql functions) editing/coding

2006-09-11 Thread Ivan Sergio Borgonovo
I'd write a trigger that generate a function. This is done for performance reasons. The function will be called several times and it is a list of delete statement according to the content of a table. The content of the table will seldom change and it is linked to the creation of other tables (met

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Martijn van Oosterhout
On Mon, Sep 11, 2006 at 12:56:11PM +0200, Marco Bizzarri wrote: > I will try to explain it with a sample session: this is for creating > and writing a blob. Oh, I was looking for lo_read/lo_write, which don't exist. It's loread/lowrite. Inconsonistant naming is irritating. It doesn't help the OPs

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Marco Bizzarri
I will try to explain it with a sample session: this is for creating and writing a blob. From the psql prompt (> are the commands, the other are the results). begin ; BEGIN; SELECT lo_creat(131072) ; lo_creat -- 198705 (1 row) (this is the OID number of the newly created large o

Re: [GENERAL] Plan for outer joins

2006-09-11 Thread Alban Hertroys
Martijn van Oosterhout wrote: On Mon, Sep 11, 2006 at 11:58:56AM +0200, Alban Hertroys wrote: Hi, I was tuning a join on a few tables for a SELECT COUNT(*) query, when I realized that the content of the second table didn't actually matter to the count. So, I figured a LEFT OUTER JOIN would be

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Purusothaman A
Thanks Martijn van Oosterhout and Marco Bizzarri.But, according to syntax of client side lo_import and lo_export, we should have 2 variable PGconn (for esatablished connection) and lobjld (imported file ID in PostgreSQL). I don't know how to do this in SQL statements.pls give me sample client side

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Marco Bizzarri
Actually, you can use direclty the lo_create, lo_open, lo_read and lo_write directly into your SQL code, instead of having to write a wrapper function. It is not simple, but it can be done. I don't have a general example: we have done this in a couple of our projects, one being public availabe (w

Re: [GENERAL] Plan for outer joins

2006-09-11 Thread Martijn van Oosterhout
On Mon, Sep 11, 2006 at 11:58:56AM +0200, Alban Hertroys wrote: > Hi, > > I was tuning a join on a few tables for a SELECT COUNT(*) query, when I > realized that the content of the second table didn't actually matter to > the count. So, I figured a LEFT OUTER JOIN would be faster, but... > appa

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Martijn van Oosterhout
On Mon, Sep 11, 2006 at 03:27:09PM +0530, Purusothaman A wrote: > Thanks Martijn van Oosterhout, > > So, I have to write my own wrapper function upon the functions below. > 1. Oid lo_import(PGconn *conn, const char *filename); > 2. int lo_export(PGconn *conn, Oid lobjId, const char *filename);

Re: [GENERAL] Child program using parent program's transaction?

2006-09-11 Thread Martijn van Oosterhout
On Wed, Sep 06, 2006 at 03:21:04PM -0700, Wayne Conrad wrote: > I work with a system designed as lots of little cooperating worker > programs, with boss programs that... well, boss the worker programs > around. > > Boss and workers all use the same database. > Today, it would once again be conven

[GENERAL] Plan for outer joins

2006-09-11 Thread Alban Hertroys
Hi, I was tuning a join on a few tables for a SELECT COUNT(*) query, when I realized that the content of the second table didn't actually matter to the count. So, I figured a LEFT OUTER JOIN would be faster, but... apparently it's not. Shouldn't the planner notice that the right part of SELE

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Purusothaman A
Thanks Martijn van Oosterhout,So, I have to write my own wrapper function upon the functions below.   1. Oid lo_import(PGconn *conn, const char *filename);   2. int lo_export(PGconn *conn, Oid lobjId, const char *filename); Am I right?:)Purusothaman AOn 9/11/06, Martijn van Oosterhout

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Martijn van Oosterhout
Short answer, you can't. The database server can obviously only access things on the database server. Since SQL is also executed on the server, no SQL statements can access stuff on the client computer. If you want to load a file on the client side to the server, you need to open the file and copy

Re: [GENERAL] [ADMIN] Problem with lo_export() and lo_import() from remote machine.

2006-09-11 Thread Purusothaman A
Hi Martijn van Oosterhout,Thanks for your valuable reply.Yes I misunderstood the documentation.Then, I searched PostgreSQL documentation for equivalent client-side functions.But I found only C programming APIs instead of SQL functions. I want functions which is usable in SQL statements.Can you give

Re: [GENERAL] Certificate, login & php question ? krb / sso

2006-09-11 Thread Jean-Gerard Pailloncy
Le 11 sept. 06 à 05:57, Michael Fuhr a écrit :On Sun, Sep 10, 2006 at 09:39:59PM -0600, Michael Fuhr wrote: On Mon, Sep 11, 2006 at 02:32:26AM +0200, Jean-Gerard Pailloncy wrote: 1) Is it possible to use the SSL authentification done by apache with  PostgreSQL ? I'm not aware of a way for Apache to