Re: [HACKERS] autoconf taking forever?

2001-10-24 Thread bpalmer
I'm working on making some changes to the top level configure.in and m4 has now been running for 17 minutes on a 1.4G tbird. Am I missing something or is this know to take forever? For me, the autoconf run is instantaneous. Make sure you're using Autoconf 2.13, and you don't have

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Bruce Momjian
I have added this to the TODO list: * Add OR REPLACE clauses to non-FUNCTION object creation I think there are clearly some other objects that need OR REPLACE. Not sure which ones yet. --- Dear all, Would

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Our current CREATE OR REPLACE FUNCTION perserves the OID of the function. Is there similar functionality you need where a simple DROP (ignore the error), CREATE will not work? If possible, it's nice to not have commands whose error codes you ignore.

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Bill Studenmund
On Tue, 23 Oct 2001, Bruce Momjian wrote: Dear all, Would it be possible to implement CREATE OR REPLACE VIEW / TRIGGER in PostgreSQL 7.2? Probably not, it's rather late in the cycle (isn't beta imminent?). Oh, I'd vote for OR REPLACE as there's already an opt_or_replace non-terminal in

Re: [HACKERS] [GENERAL] To Postgres Devs : Wouldn't changing the select limit

2001-10-24 Thread Bruce Momjian
Bruce Momjian writes: I recommend tips when they are one line in length, have a high probability of being accurate, and are common mistakes. Anything longer and we should point to a specific section in the docs. I would put when porting from MySQL into that category. I would too

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Bruce Momjian
Not until we do the necessary legwork. I spent a good deal of time over the past week making the various PL modules react to replacement of pg_proc entries by CREATE OR REPLACE FUNCTION (cf. complaint from Peter a week or so back). CREATE OR REPLACE VIEW implies updating cached query

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Mike Mascari
Bruce Momjian wrote: Alternatively, could someone implement CREATE OR DROP VIEW / TRIGGER? These features are needed for pgAdmin II (we could also provide a patch for PhpPgAdmin). If this cannot be implemented in PostgreSQL, we will go for pseudo-modification solutions (which is

Re: [HACKERS] LOCK ROW SHARE MODE

2001-10-24 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: In the LOCK TABLE docs it documents the SELECT...FOR UPDATE as follows: ROW SHARE MODE Note: Automatically acquired by SELECT...FOR UPDATE. While it is a shared lock, may be upgraded later to a ROW EXCLUSIVE lock. Conflicts with EXCLUSIVE

[HACKERS] PQconnectStart() and -EINTR

2001-10-24 Thread David Ford
I've got a bit of a problem. I added a fast SIGALRM handler in my project to do various maintenance and this broke PQconnectStart(). Oct 23 21:56:36 james BlueList: connectDBStart() -- connect() failed: Interrupted system call ^IIs the postmaster running (with -i) at 'archives.blue-labs.org'

Re: [HACKERS] storing binary data

2001-10-24 Thread Joe Conway
+ What I really need is a binary *short* object type. I have heard rumors of a legendary bytea type that might help me, but it doesn't appear to be documented anywhere, so I hesitate to use it. It's real and it's not going away. It is pretty poorly documented and doesn't have a

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-24 Thread Hiroshi Inoue
Tom Lane wrote: Martin Weinberg [EMAIL PROTECTED] writes: Yes, I understand locking the table, but empirically, two index creations will not run simultaneously on the same table. Hmm, on trying it you are right. The second index creation blocks here: #6 0x1718e0 in XactLockTableWait

Re: [HACKERS] Index of a table is not used (in any case)

2001-10-24 Thread Zeugswetter Andreas SB SD
*very* slow, due to seq scan on 20 million entries, which is a test setup up to now) Perennial first question: did you VACUUM ANALYZE? Can there, or could there, be a notion of rule based optimization of queries in PostgreSQL? The not using index problem is probably the most

[HACKERS] copying a large object?

2001-10-24 Thread mario
I'm working on an application where it is necessary to make copies of large objects, and now I wonder if it is safe to use this (symbolic, somewhat PHP like) code. Say I've a LOB with OID=1234 $oid = db_exec(select lo_create()) db_exec(delete from pg_largeobject where loid=$oid)

[HACKERS] between?

2001-10-24 Thread Vince Vielhaber
It seems Sybase has dropped the BETWEEN search condition. I thought it was part of SQL92, has it been dropped from the spec since then or wasn't it ever in there? Vince. -- == Vince Vielhaber -- KA8CSHemail: [EMAIL

[HACKERS] check disk space

2001-10-24 Thread Kiran Kumar Gahlot
Hi all, I was just looking for the code which checks for the memory available on machine before writing the data. Any related information will be appreciated. Thanks, KKG _ Get your FREE download of MSN Explorer at

[HACKERS] Index on wide column

2001-10-24 Thread Antonio Sergio de Mello e Souza
Hi all, I need to perform a tree traversal on a big table (millions of rows). To avoid recursive queries, one for each non-leaf node, this table has, in addition to its 70 columns, a VARCHAR(3) column that is used exclusively to sort the rows with the required order. The actual content

Re: [HACKERS] between?

2001-10-24 Thread Vince Vielhaber
On Wed, 24 Oct 2001, Thomas Lockhart wrote: It seems Sybase has dropped the BETWEEN search condition. I thought it was part of SQL92, has it been dropped from the spec since then or wasn't it ever in there? It is documented in every SQL book I have and I see it in our SQL99 docs. Are

[HACKERS] Can't cast bigint to smallint?

2001-10-24 Thread Philip Warner
The minor featurette seems to have crept into current sources; it is probably the cause of pg_dump being unable to reinstate disabled triggers. Philip Warner| __---_ Albatross Consulting Pty. Ltd.

[HACKERS] Make a copy of a large object

2001-10-24 Thread mario
I'm working on an application where it is necessary to make copies of large objects, and now I wonder if it is safe to use this (symbolic, somewhat PHP like) code. Say I've a LOB with OID=1234 $oid = db_exec(select lo_create()) db_exec(delete from pg_largeobject where loid=$oid)

Re: [HACKERS] storing binary data

2001-10-24 Thread Tom Lane
Joe Conway [EMAIL PROTECTED] writes: I'll take a shot at improving the documentation for bytea. I'm hoping documentation patches are accepted during beta though ;-) Of course. The only limitation we place during beta is no new features added. I plan to spend a good deal of time on the docs

[HACKERS] join instruction

2001-10-24 Thread Zenon
HELP left outer join intructionworking or not on POSTGRES 7 Zenon Karol ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

Re: [HACKERS] autoconf taking forever?

2001-10-24 Thread Tom Lane
bpalmer [EMAIL PROTECTED] writes: I am running 2.13 (even on a clean checkout of 7.1.3) and the autoconf takes forever. However, m4 is the process that's running forever, so I have no doubs that the problem is there. What version do you use that works? GNU m4 ... the version I have here

Re: [HACKERS] copying a large object?

2001-10-24 Thread Tom Lane
mario [EMAIL PROTECTED] writes: And another question regarding large objects, as I see the objects are organized in units of 2048 bytes each. Can I somehow set this to a higher value like 8k or 32k (I use 32k pages). Then you've already got larger units, because the code is #define LOBLKSIZE

Re: [HACKERS] Can't cast bigint to smallint?

2001-10-24 Thread Tom Lane
Philip Warner [EMAIL PROTECTED] writes: The minor featurette seems to have crept into current sources; it is probably the cause of pg_dump being unable to reinstate disabled triggers. Huh? There's never been a cast from int8 to int2. I checked 7.0 and 7.1, they both complain as well:

Re: [HACKERS] join instruction

2001-10-24 Thread Tom Lane
Zenon [EMAIL PROTECTED] writes: left outer join intructionworking or not on POSTGRES 7 It works in 7.1 or later. regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an

[HACKERS] Proposed new create command, CREATE OPERATOR CLASS

2001-10-24 Thread Bill Studenmund
I'd like to propose a new command, CREATE OPERATOR CLASS. Its purpose is to create a named operator class, so that you can create new types of index ops. Also, its inclusion would remove the section of the documentation where we tell people how to manually manipulate the system tables. Since

Re: [HACKERS] Can't cast bigint to smallint?

2001-10-24 Thread Tom Lane
Philip Warner [EMAIL PROTECTED] writes: At 16:09 24/10/01 -0400, Tom Lane wrote: Huh? There's never been a cast from int8 to int2. I checked 7.0 and 7.1, they both complain as well: Is this a policy decision, or just a case where noone has had a chance to do it? Just a missing feature.

Re: [HACKERS] Proposed new create command, CREATE OPERATOR CLASS

2001-10-24 Thread Bill Studenmund
On Tue, 23 Oct 2001, Bill Studenmund wrote: Here's the syntax I'd like to propose: CREATE OPERATOR CLASS name [DEFAULT] FOR TYPE typename USING access method WITH list of operators AND list of support functions Hmmm.. Teach me to read the docs. :-) There's no way to set opckeytype. So hwo

Re: [HACKERS] schema support, was Package support for Postgres

2001-10-24 Thread Ross J. Reedstrom
On Tue, Oct 23, 2001 at 08:43:32AM -0700, Bill Studenmund wrote: And there's the fact that schemas were wanted for 7.2, and didn't happen. Withouth external adgitation, will they happen for 7.3? Given the size of the job, I understand why they didn't happen (the package changes so far

Re: [HACKERS] Can't cast bigint to smallint?

2001-10-24 Thread Philip Warner
At 16:09 24/10/01 -0400, Tom Lane wrote: Huh? There's never been a cast from int8 to int2. I checked 7.0 and 7.1, they both complain as well: Is this a policy decision, or just a case where noone has had a chance to do it? Where exactly is pg_dump failing? The problem in in the code to

Re: [HACKERS] Proposed new create command, CREATE OPERATOR CLASS

2001-10-24 Thread Bill Studenmund
On Wed, 24 Oct 2001, Tom Lane wrote: Bill Studenmund [EMAIL PROTECTED] writes: I'd like to propose a new command, CREATE OPERATOR CLASS. Seems like a good idea. operator spec is either an operator or an operator followed by the keyword REPEATABLE. The presence of REPEATABLE indicates

Re: [HACKERS] Proposed new create command, CREATE OPERATOR CLASS

2001-10-24 Thread Tom Lane
Bill Studenmund [EMAIL PROTECTED] writes: I'd like to propose a new command, CREATE OPERATOR CLASS. Seems like a good idea. operator spec is either an operator or an operator followed by the keyword REPEATABLE. The presence of REPEATABLE indicates that amopreqcheck should be set to true for

Re: [HACKERS] Can't cast bigint to smallint?

2001-10-24 Thread Philip Warner
At 19:41 24/10/01 -0400, Tom Lane wrote: We just had one earlier this week, so I suppose another wouldn't make all that much difference. Comments? My pref would be for the initdb; the current situation may break (other) existing apps.

Re: [HACKERS] Proposed new create command, CREATE OPERATOR CLASS

2001-10-24 Thread Tom Lane
Bill Studenmund [EMAIL PROTECTED] writes: [ revised proposal for CREATE OPERATOR CLASS syntax ] I don't like the idea of writing a bunch of consecutive commas (and having to count them correctly) for cases where we're inserting noncontigous amopstrategy or amprocnum numbers. Perhaps the syntax

Re: [HACKERS] [BUGS] New default ignored by pre-exising insert rulesets.

2001-10-24 Thread Tom Lane
Arguile [EMAIL PROTECTED] writes: If a table field is altered to add a default, the default value is bypassed by pre-existing rules. Yeah, this problem has been known for awhile (to me at least). The difficulty is that default values are added to INSERTs by the parser, which is before rule

Re: [HACKERS] Triggered data change violation, once again

2001-10-24 Thread Tom Lane
Stephan Szabo [EMAIL PROTECTED] writes: I think all we need to do to implement things correctly is to consider a previous event only if both xmin and cmin of the old tuple match the current xact command IDs, rather than considering it on the basis of xmin alone. Are there any things that

Re: [HACKERS] Triggered data change violation, once again

2001-10-24 Thread Stephan Szabo
On Wed, 24 Oct 2001, Tom Lane wrote: Stephan Szabo [EMAIL PROTECTED] writes: I think all we need to do to implement things correctly is to consider a previous event only if both xmin and cmin of the old tuple match the current xact command IDs, rather than considering it on the basis of

Re: [HACKERS] storing binary data

2001-10-24 Thread Christopher Kings-Lynne
Quick question - I couldn't find this in the docs: What exactly is the advantage in using VIEWs? I get the impression that the SELECT query it is based on is cached (ie. a cached query plan). But, is this cached between db restarts, between connections, etc. Is it cached upon the first use of

Re: [HACKERS] storing binary data

2001-10-24 Thread Christopher Kings-Lynne
I get the impression that the SELECT query it is based on is cached (ie. a cached query plan). Nope. If there's something in the docs that makes you think so, point out so I can fix it ;-) Hmmm...I could have sworn that you mentioned in passing something about cached query plans and

[HACKERS] pgindent run

2001-10-24 Thread Bruce Momjian
OK, I see my email got through to the list. Running pgindent now and will commit changes. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your

Re: [HACKERS] Triggered data change violation, once again

2001-10-24 Thread Hiroshi Inoue
Tom Lane wrote: Stephan Szabo [EMAIL PROTECTED] writes: I think all we need to do to implement things correctly is to consider a previous event only if both xmin and cmin of the old tuple match the current xact command IDs, rather than considering it on the basis of xmin alone. Are

[HACKERS] TOra

2001-10-24 Thread Christopher Kings-Lynne
Just noticed this QT software: http://www.globecom.net/tora/ It's a very lovely administrative tool for Oracle. I wonder if anyone would be interested in porting it to Postgres? Don't think many of the funky administrative functions can be acheived remotely in Postgres yet tho? Chris

[HACKERS] pgindent run

2001-10-24 Thread Bruce Momjian
I have run pgindent on the C files and run pgjindent on the jdbc files as requested by the jdbc list. You can package up beta now. I will update the HISTORY file tomorrow with recent changes. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED]

Re: [HACKERS] Index of a table is not used (in any case)

2001-10-24 Thread mlw
Zeugswetter Andreas SB SD wrote: *very* slow, due to seq scan on 20 million entries, which is a test setup up to now) Perennial first question: did you VACUUM ANALYZE? Can there, or could there, be a notion of rule based optimization of queries in PostgreSQL? The not using

Re: [HACKERS] between?

2001-10-24 Thread Thomas Lockhart
It seems Sybase has dropped the BETWEEN search condition. I thought it was part of SQL92, has it been dropped from the spec since then or wasn't it ever in there? It is documented in every SQL book I have and I see it in our SQL99 docs. Are you *sure* Sybase dropped it? If so, then it

Re: [HACKERS] storing binary data

2001-10-24 Thread Thomas Lockhart
... I'll take a shot at improving the documentation for bytea. I'm hoping documentation patches are accepted during beta though ;-) Always. At least up until a week or so before release, when we need to firm up the docs and work on final cleanup etc. There are several announcements leading up

Re: [HACKERS] [GENERAL] CVS server stumbling?

2001-10-24 Thread Bruce Momjian
Yes, I have seen this too today. Is something amiss with the CVS server? I'm running an strace to watch a cvs update and it's forbiddingly slow. It zooms along until it slams into a brick wall for minutes, sometimes 10+ minutes, then it flys on. David

Re: [HACKERS] Proposed new create command, CREATE OPERATOR CLASS

2001-10-24 Thread Tom Lane
Bill Studenmund [EMAIL PROTECTED] writes: Do any of the access methods really support using non-binary operators? Whether they do today is not the question. The issue is whether they could --- and they certainly could. Oh gross. I just looked at contrib/intarray, and it defines two entries

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on

2001-10-24 Thread Hiroshi Inoue
Tom Lane wrote: "Hiroshi Inoue" [EMAIL PROTECTED] writes: In the end, I changed DefineIndex() to not call IndexesAreActive(). I saw that. But is it a good solution? If someone has deactivated indexes on a user table (ie turned off relhasindex), then creating a new index would activate

Re: [HACKERS] Triggered data change violation, once again

2001-10-24 Thread Stephan Szabo
On Wed, 24 Oct 2001, Tom Lane wrote: The only reason we do this is to enforce the triggered data change violation restriction of the spec. However, I think we've misinterpreted the spec. The code prevents an RI referenced value from being changed more than once in a transaction, but what

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-24 Thread Hiroshi Inoue
-Original Message- From: Hiroshi Inoue Tom Lane wrote: Martin Weinberg [EMAIL PROTECTED] writes: Yes, I understand locking the table, but empirically, two index creations will not run simultaneously on the same table. Hmm, on trying it you are right. The second index

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Bill Studenmund
On Tue, 23 Oct 2001, Bruce Momjian wrote: If possible, it's nice to not have commands whose error codes you ignore. That way if you see an error, you know you need to do something about it. Folks, is this a valid reason for adding OR REPLACE to all CREATE object commands? Sounds good to

Re: [HACKERS] PQconnectStart() and -EINTR

2001-10-24 Thread Doug McNaught
David Ford [EMAIL PROTECTED] writes: I've got a bit of a problem. I added a fast SIGALRM handler in my project to do various maintenance and this broke PQconnectStart(). Oct 23 21:56:36 james BlueList: connectDBStart() -- connect() failed: Interrupted system call ^IIs the postmaster

Re: [HACKERS] schema support, was Package support for Postgres

2001-10-24 Thread Peter Eisentraut
Bill Studenmund writes: Why? Operators are used differently than functions. I don't think so. Operators are a syntacticaly convenience for functions. That's what they always have been and that's what they should stay. How does what you say disagree with what I said? Operators

Re: [HACKERS] PQconnectStart() and -EINTR

2001-10-24 Thread Tom Lane
David Ford [EMAIL PROTECTED] writes: I've got a bit of a problem. I added a fast SIGALRM handler in my project to do various maintenance and this broke PQconnectStart(). It'd probably be reasonable to just retry the connect() call if it fails with EINTR. If that works for you, send a

Re: [HACKERS] schema support, was Package support for Postgres

2001-10-24 Thread Bill Studenmund
On Wed, 24 Oct 2001, Peter Eisentraut wrote: Bill Studenmund writes: So I am a naive programmer because I mention intent above? No. Sorry, that's the way it came across. As you've said that was not your intent, please disregard my response; I was responding to something you did not mean.

Re: [HACKERS] Compiling on Solaris with Sun compiler

2001-10-24 Thread Peter Eisentraut
Lee Kindness writes: After a simple './configure' on a stock Solaris 2.6 box the compilation of interfaces/ecpg/lib/execute.c fails due to the macro definition of 'gettext' to ''. This macro is invoked on the prototype of gettext() in libintl.h (included via locale.h). This should be fixed

Re: [HACKERS] Index of a table is not used (in any case)

2001-10-24 Thread Peter Eisentraut
mlw writes: The not using index was very frustrating to understand. The stock answer, did you vacuum? just isn't enough. There has to be some explanation (in the FAQ or something) about the indexed key distribution in your data. Most not using index questions seem to be related to a

Re: [HACKERS] CREATE OR REPLACE VIEW/TRIGGER

2001-10-24 Thread Peter Eisentraut
Bill Studenmund writes: Our current CREATE OR REPLACE FUNCTION perserves the OID of the function. Is there similar functionality you need where a simple DROP (ignore the error), CREATE will not work? If possible, it's nice to not have commands whose error codes you ignore. That way if

[HACKERS] Triggered data change violation, once again

2001-10-24 Thread Tom Lane
I have been looking at the way that deferred triggers slow down when the same row is updated multiple times within a transaction. The problem appears to be entirely due to calling deferredTriggerGetPreviousEvent() to find the trigger list entry for the previous update of the row: we do a linear

Re: [HACKERS] Index of a table is not used (in any case)

2001-10-24 Thread Tom Lane
mlw [EMAIL PROTECTED] writes: ... Postgres' statistics are pretty poor too, a relative few very populous entries in a table will make it virtually impossible for the cost based optimizer (CBO) to use an index. Have you looked at development sources lately? regards,

[HACKERS] pgindent run

2001-10-24 Thread Bruce Momjian
I have been asked to run pgindent in preparation for beta starting tomorrow. In this run, I will also reformat the jdbc files as agreed to by the jdbc list. I don't have much time to wait before starting the pgindent run. I hope people don't have outstanding patches sitting around. --

Re: [HACKERS] [GENERAL] Using an SMP machine to make multiple indices on the same

2001-10-24 Thread Tom Lane
Hiroshi Inoue [EMAIL PROTECTED] writes: In the end, I changed DefineIndex() to not call IndexesAreActive(). I saw that. But is it a good solution? If someone has deactivated indexes on a user table (ie turned off relhasindex), then creating a new index would activate them again, which would

Re: [HACKERS] storing binary data

2001-10-24 Thread Peter Eisentraut
Jason Orendorff writes: Hi. I was surprised to discover today that postgres's character types don't support zero bytes. That is, Postgres isn't 8-bit clean. Why is that? PostgreSQL is 8-bit clean. The character types don't support zero bytes because the character types store characters,

Re: [HACKERS] [GENERAL] Database corruption?

2001-10-24 Thread Mikheev, Vadim
Um, Vadim? Still of the opinion that elog(STOP) is a good idea here? That's two people now for whom that decision has turned localized corruption into complete database failure. I don't think it's a good tradeoff. One is able to use pg_resetxlog so I don't see point in removing