Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > Do you have an example at hand of a system function which will face this > problem so that I can see what is involved? Mmm ... try CREATE TABLE with foreign keys. IIRC the basic table is created and then we do ALTER TABLE ADD FOREIGN KEY.

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Gavin Sherry
On Thu, 12 Feb 2004, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > Do you have an example at hand of a system function which will face this > > problem so that I can see what is involved? > > Mmm ... try CREATE TABLE with foreign keys. IIRC the basic table is > created and then w

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Gavin Sherry
On Wed, 11 Feb 2004, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > My idea is to provide a generic interface which is called inside > > ProcessUtility() after all other functions are called for the particular > > node we're handling. The nodetag itself will be passed to this gener

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: > Yes, the internal calls from one command to another make this tricky -- > but the return Tag is set very early for the statement. Could the Before > trigger for system commands (CREATE, ALTER, etc.) not be kicked of in > the same area as the tag is set? At

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > My idea is to provide a generic interface which is called inside > ProcessUtility() after all other functions are called for the particular > node we're handling. The nodetag itself will be passed to this generic > function, the function will map nodetag t

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Rod Taylor
On Wed, 2004-02-11 at 22:30, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > There have been a few discussions about triggers on system tables in > > the past and the problems with such triggers seem to be: > > I think the killer problem is that we couldn't allow triggers on system

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Gavin Sherry
On Wed, 11 Feb 2004, Tom Lane wrote: > Gavin Sherry <[EMAIL PROTECTED]> writes: > > There have been a few discussions about triggers on system tables in > > the past and the problems with such triggers seem to be: > > I think the killer problem is that we couldn't allow triggers on system > tables

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Tom Lane
Gavin Sherry <[EMAIL PROTECTED]> writes: > There have been a few discussions about triggers on system tables in > the past and the problems with such triggers seem to be: I think the killer problem is that we couldn't allow triggers on system tables to do very much. By definition, the database is

Re: [HACKERS] [PATCHES] client_encoding in dump file

2004-02-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Pavel Stehule wrote: > >> I send my first patch for PostgreSQL - maybe ugly patch. This patch > >> generate on top of dump file line with setting of current encoding. Its > >> useful for languages like czech with more than one wide u

Re: [HACKERS] Triggers on system tables

2004-02-11 Thread Gavin Sherry
On Thu, 12 Feb 2004, Gavin Sherry wrote: > Hi all, > > I've been thinking about triggers on system tables. The motivation for > this is to allow for better interaction between the system and interfaces. > For example, interfaces could store database meta data (list of tables) > and have the cache

[HACKERS] Triggers on system tables

2004-02-11 Thread Gavin Sherry
Hi all, I've been thinking about triggers on system tables. The motivation for this is to allow for better interaction between the system and interfaces. For example, interfaces could store database meta data (list of tables) and have the cache invalidated by a trigger on pg_class (calling a funct

Re: [HACKERS] [BUGS] Bug in pg_autovacuum ?

2004-02-11 Thread Cott Lang
On Wed, 2004-02-11 at 16:25, Bruce Momjian wrote: > > Sure, shoot them over to hackers or patches. The pg_autovacuum author > is looking into this. Here they are. They've worked well for me, but someone wiser in the ways of C should certainly look them over. :) ? autovac.patch ? pg_autovacuum

Re: [HACKERS] SET WITHOUT OIDS and VACUUM badness?

2004-02-11 Thread Gavin Sherry
On Wed, 11 Feb 2004, Bruce Momjian wrote: > Gavin Sherry wrote: > > On Wed, 21 Jan 2004, Gavin Sherry wrote: > > > > > On Wed, 21 Jan 2004, Christopher Kings-Lynne wrote: > > > > > > > This is what we did: > > > > > > > > 0. BEGIN; > > > > > > > > 1. ALTER TABLE ... SET WITHOUT OIDS > > > > > > >

Re: [HACKERS] [PATCHES] client_encoding in dump file

2004-02-11 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Pavel Stehule wrote: >> I send my first patch for PostgreSQL - maybe ugly patch. This patch >> generate on top of dump file line with setting of current encoding. Its >> useful for languages like czech with more than one wide used encoding. >> We need i

Re: [HACKERS] [BUGS] Bug in pg_autovacuum ?

2004-02-11 Thread Bruce Momjian
Cott Lang wrote: > I have my original changes + Tom's recommended changes applied to 7.4.1 > if you're interested. Sure, shoot them over to hackers or patches. The pg_autovacuum author is looking into this. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

Re: [HACKERS] [BUGS] Bug in pg_autovacuum ?

2004-02-11 Thread Cott Lang
I have my original changes + Tom's recommended changes applied to 7.4.1 if you're interested. On Wed, 2004-02-11 at 15:57, Matthew T. O'Connor wrote: > Yeah, I'll take a look at it and submit a patch. Sorry I didn't see it > sooner, but I don't read the bugs mailing list. > > On Wed, 2004-02-11

Re: [HACKERS] How can I have 2 completely seperated databases in

2004-02-11 Thread scott.marlowe
Well, in postgresql you have a cluster, and inside the cluster, you have databases, and inside the databases you have schemas. You cannot cross database boundaries with transactions. i.e. you can begin a transaction, insert into two databases and roll it back. Transactions live within a singl

Re: [HACKERS] [BUGS] Bug in pg_autovacuum ?

2004-02-11 Thread Matthew T. O'Connor
Yeah, I'll take a look at it and submit a patch. Sorry I didn't see it sooner, but I don't read the bugs mailing list. On Wed, 2004-02-11 at 17:29, Bruce Momjian wrote: > Would someone review these problems and submit a patch? Thanks. > >

Re: [HACKERS] How can I have 2 completely seperated databases in PostgreSQL?

2004-02-11 Thread hong . ge
Thank you very much for your reply. Yes, that's true. But it seems not a good idea if I have many databases and I want them totally seperated with each other. What's your opinion? Thanks. --Hong Ge Quoting Rod Taylor <[EMAIL PROTECTED]>: > On Wed, 2004-02-11 at 16:36, [EMAIL PROTECTED] wrote:

Re: [HACKERS] How can I have 2 completely seperated databases in PostgreSQL?

2004-02-11 Thread hong . ge
Thank you very much for your reply. I'd like to discuss the why. I don't think letting them share data and logs could gain me something. And if I have 2 databases totally not relevant, I think the most natural way is to make them totally seperated. Does the sharing buys me anything? If not, what's

Re: [HACKERS] SET WITHOUT OIDS and VACUUM badness?

2004-02-11 Thread Bruce Momjian
Gavin Sherry wrote: > On Wed, 21 Jan 2004, Gavin Sherry wrote: > > > On Wed, 21 Jan 2004, Christopher Kings-Lynne wrote: > > > > > This is what we did: > > > > > > 0. BEGIN; > > > > > > 1. ALTER TABLE ... SET WITHOUT OIDS > > > > > 12. ROLLBACK; > > > > > > 13. VACUUM FULL forums_posts; > > > > Th

Re: [HACKERS] [BUGS] Bug in pg_autovacuum ?

2004-02-11 Thread Bruce Momjian
Would someone review these problems and submit a patch? Thanks. --- Tom Lane wrote: > Cott Lang <[EMAIL PROTECTED]> writes: > > If the number of tuples is sufficiently high, pg reports 'reltuples' > > back in TABLE_STATS_QU

Re: [HACKERS] How can I have 2 completely seperated databases in

2004-02-11 Thread scott.marlowe
On Wed, 11 Feb 2004 [EMAIL PROTECTED] wrote: > Hi, all > > What should I do if I want to have 2 completely seperated databases in > PostgreSQL? I want each database to have its own data, log and > everything needed to access that database. I don't want them to share > anything. Has anyone done th

Re: [HACKERS] [PATCHES] client_encoding in dump file

2004-02-11 Thread Bruce Momjian
Pavel Stehule wrote: > Hello > > I send my first patch for PostgreSQL - maybe ugly patch. This patch > generate on top of dump file line with setting of current encoding. Its > useful for languages like czech with more than one wide used encoding. > We need informations about used encoding. I

[HACKERS] Circular-freelist bug is still there

2004-02-11 Thread Tom Lane
I just saw the parallel regression tests hang up again. Inspection revealed that StrategyInvalidateBuffer() was stuck in an infinite loop because the freelist was circular. (gdb) p StrategyControl->listFreeBuffers $5 = 579 (gdb) p BufferDescriptors[579] $6 = {bufNext = 106, data = 4991904, tag =

Re: [HACKERS] Request for additional SPI functions.

2004-02-11 Thread Bruce Momjian
This seems like a reasonable request. Care to submit a patch? --- Thomas Hallgren wrote: > Short story: > I need two new functions in the Server Programming Interface (SPI) when > mapping an ExecutionPlan to a Java prepared

Re: [HACKERS] libpq thread safety

2004-02-11 Thread Bruce Momjian
Manfred Spraul wrote: > libpq needs additional changes for complete thread safety: > - openssl needs different initialization. > - kerberos is not thread safe. > - functions such as gethostbyname are not thread safe, and could be used > by kerberos. Right now protected with a libpq specific mutex

Re: [HACKERS] libpq thread safety

2004-02-11 Thread Bruce Momjian
Manfred Spraul wrote: > Bruce Momjian wrote: > > >However, we really have two types of function tested. > >The first, strerror, can be thread safe by using thread-local storage > >_or_ by returning pointers to static strings. The other two function > >tests require thread-local storage to be thr

Re: [HACKERS] Transaction aborts on syntax error.

2004-02-11 Thread Bruce Momjian
Simon Riggs wrote: > I've have tried to work out which section of the manual to document this > in. The most likely section would seem to be: doc/src/sgml/mvcc.sgml, > which is the Concurrency Control chapter of the User's Guide (on PDF). > I'd suggest including an extra sect1 section like this...e

Re: [HACKERS] Transaction aborts on syntax error.

2004-02-11 Thread Bruce Momjian
Simon Riggs wrote: > >Tom Lane > > "Simon Riggs" <[EMAIL PROTECTED]> writes: > > > Most importantly, other references I have state that: the ANSI > SQL-99 > > > specification does require that if a statement errors then only that > > > statement's changes are rolled back. > > > > ...if anybody has

[HACKERS] How can I have 2 completely seperated databases in PostgreSQL?

2004-02-11 Thread hong . ge
Hi, all What should I do if I want to have 2 completely seperated databases in PostgreSQL? I want each database to have its own data, log and everything needed to access that database. I don't want them to share anything. Has anyone done this before? Or, could anyone give me some clue of how to do

Re: [HACKERS] Transaction aborts on syntax error.

2004-02-11 Thread Simon Riggs
>Tom Lane > "Simon Riggs" <[EMAIL PROTECTED]> writes: > > Most importantly, other references I have state that: the ANSI SQL-99 > > specification does require that if a statement errors then only that > > statement's changes are rolled back. > > ...if anybody has a copy of the actual spec could th

Re: [HACKERS] PITR Dead horse?

2004-02-11 Thread Alvaro Herrera
On Mon, Feb 09, 2004 at 10:04:56AM -0700, scott.marlowe wrote: > On Thu, 5 Feb 2004, Rod Taylor wrote: > > One thing we could use (and I have no idea how to do it) is a "This > > hardware is not appropriate for a database" test kit. > > > > Something to detect lying disks, battery backed write ca

Re: [HACKERS] RFC: Security documentation

2004-02-11 Thread Jim C. Nasby
On Sun, Feb 08, 2004 at 11:24:56PM -0800, Josh Berkus wrote: > The problem with this approach, of course, is that large application > developers generally like to make the database fairly "passive" and put all > business & security logic in the middleware. I do think it would be useful > for t

Re: [HACKERS] [GENERAL] dblink - custom datatypes don't work

2004-02-11 Thread Mark Gibson
Mark Gibson wrote: Well, I've re-compiled PostgreSQL 7.4.1 with --enable-debug (was previously working with a Gentoo ebuild of it). And strangely I get a different error now: ERROR: query-specified return row and actual function return row do not match After placing a few elog statements around

Re: [HACKERS] Summary of Changes since last release (7.4.1)

2004-02-11 Thread Mike Benoit
Simon, Excellent job, your summaries have saved me hours of reading the hackers mailing list. Keep up the good work! On Wed, 2004-02-11 at 00:21, Simon Riggs wrote: > >Mike Mascari > > Actually, that was an Aug 6, 2002 commit, not 2003 which would make > > it 7.3, right? So Simon, my I

Re: [HACKERS] [GENERAL] dblink - custom datatypes don't work

2004-02-11 Thread Tom Lane
Joe Conway <[EMAIL PROTECTED]> writes: > I'd add that when working with shared libraries, you need to make sure > they are loaded before you attach to the process (I think there is a way > to deal with it after the fact, but I'm not sure of the details). On HPUX, I find that "sharedlibrary /path

Re: [HACKERS] [GENERAL] dblink - custom datatypes don't work

2004-02-11 Thread Tom Lane
Mark Gibson <[EMAIL PROTECTED]> writes: > I've been trying to use gdb to trace the problem, but I can't work out > how to attach gdb to a backend process. It's not hard. Start psql, then in another window use ps to determine the PID of the connected backend. (The pg_stat_activity view might hel

Re: [HACKERS] [GENERAL] dblink - custom datatypes don't work

2004-02-11 Thread Joe Conway
Tom Lane wrote: It's not hard. Start psql, then in another window use ps to determine the PID of the connected backend. (The pg_stat_activity view might help too.) Then gdb /path/to/postgres-executable PID gdb> b whereever gdb> cont and away you go. I'd add that when work

Re: [HACKERS] Recursive queries?

2004-02-11 Thread evgent
hi again, at last i found patch for WITH and make it working. it's resides in attach. what it does: WITH a AS (SELECT * FROM t) SELECT * FROM a; WITH a AS (SELECT * FROM t), b as (SELECT * FROM t) SELECT * FROM a.id=b.id; WITH a AS (SELECT * FROM t), b AS (SELECT * FROM a) SELECT * FROM b; where

Re: [HACKERS] [GENERAL] dblink - custom datatypes don't work

2004-02-11 Thread Mark Gibson
Tom Lane wrote: Mark Gibson <[EMAIL PROTECTED]> writes: Unfortunately, it doesn't work using the oid the map, whether custom types are involved or not. All I get is the following message: ERROR: unsupported byval length: SPI is very new to me (like 2 days old ;). Any suggestions where I'v

[HACKERS] Improved index creation (was:MS SQL features for new version)

2004-02-11 Thread Andreas Pflug
Rod Taylor wrote: On Tue, 2004-02-10 at 15:37, Robert Treat wrote: On Tue, 2004-02-10 at 13:20, Rod Taylor wrote: http://www.microsoft.com/sql/yukon/productinfo/top30features.asp Notice the Snapshot Isolation. Sounds like MVCC for MSSQL? Actually, the one I noticed was

Re: [HACKERS] Summary of Changes since last release (7.4.1)

2004-02-11 Thread Simon Riggs
>Mike Mascari > Actually, that was an Aug 6, 2002 commit, not 2003 which would make > it 7.3, right? So Simon, my I humbly ask from where you culled this > change in CVS tip? Wow, looks like you got me there. It is I who humbly apologises. Humble AND Zealous though :) Overall, each item has bee