Re: [HACKERS] Bug in renaming view columns

2004-05-10 Thread Christopher Kings-Lynne
Take it a little further: if we extend ALTER TABLE to be able to alter view column types, would you expect CREATE OR REPLACE VIEW to stop checking that the column types didn't change? I'd argue that that's a real bad idea. If you want the view's output signature to change, you should have to use

[HACKERS] Bug in renaming view columns

2004-05-10 Thread Christopher Kings-Lynne
Hi, Are we supposed to be able to rename view columns or not? You can't if you replace the view, but you can if you rename the column. test=# create view test as select 1 as a; CREATE VIEW test=# \d test View public.test Column | Type | Modifiers +-+--- a

[HACKERS] CLUSTER locking

2004-05-10 Thread Christopher Kings-Lynne
Hi, Is there a way the CLUSTER command can be changed to not take an exclusive lock on the table, and instead allow reads on the old table and index, just preventing writes? Chris ---(end of broadcast)--- TIP 2: you can get off all lists at once

Re: [HACKERS] CLUSTER locking

2004-05-10 Thread Christopher Kings-Lynne
No. Committing the relfilenode swap would cut the knees off of any active scan on the old file. Could it upgrade its lock to exclusive just before doing the swap? Chris ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-09 Thread Christopher Kings-Lynne
Except you can keep trying and trying without the outermost transaction failing. But that won't provide the necessary next key locking you mentioned in your first email, will it? No, but since I can loop an infinite number of times until either the update or insert works, I don't need next key

Re: [HACKERS] Constraint not shown on \d ?

2004-05-08 Thread Christopher Kings-Lynne
CREATE UNIQUE INDEX activation_code_code_key ON public.activation_code USING btree (code, id_code_pool); or ALTER TABLE activation_code ADD UNIQUE ( code, id_code_pool ); with \d command there is no difference but is different because the first command create an index deleteable with a drop

[HACKERS] Comments on all system objects

2004-05-08 Thread Christopher Kings-Lynne
Hi, Is there any reason I shouldn't submit a patch that makes it so that we have comments on 100% of the catalog objects? I don't see any reason why we shouldn't do it... Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Christopher Kings-Lynne
What does the MERGE command do? I have never heard of it, so I doubt someone is working on it. It is basically the SQL standard version of MySQL's REPLACE syntax. It does an update-else-insert set. However, the trick is that it uses some sort of next key locking to ensure that it cannot fail.

Re: [HACKERS] Comments on all system objects

2004-05-08 Thread Christopher Kings-Lynne
The ability to comment on all types of catalog objects or actual comments on all predefined catalog objects? Both are more or less reasonable. But I think we should have some sort of internationalization mechanism for the actual comments. One of my first commits for 7.5 was the format, I

Re: [HACKERS] Adding MERGE to the TODO list (resend with subject)

2004-05-08 Thread Christopher Kings-Lynne
I intend to release locks on subtransaction abort, so if the update fails there's room for another transaction to insert the key (which I understand should fail?). I guess there's a different locking mechanism needed; I believe nested transactions will not be enough. Except you can keep trying

[HACKERS] Subtle pg_dump problem...

2004-05-07 Thread Christopher Kings-Lynne
I have a table with a tsearch2 index on it. Now, I have all the tsearch2 stuff installed into a 'contrib' schema. I have had to change the default database schema to include the contrib schema as behind-the-scenes, tsearch2 looks for its tables, and cannot find them even if the function

Re: [HACKERS] ALTER TABLE TODO items

2004-05-06 Thread Christopher Kings-Lynne
FireBird: ALTER COLUMN column TYPE type DB2:ALTER COLUMN column SET DATA TYPE type. Oracle: MODIFY column type MSSQL: ALTER COLUMN column type constraints MySQL: Both Oracle and MSSQL Sap:MODIFY column type Given that, I'm happy with what we got ... Yeah same, I was just wondering

Re: [HACKERS] ALTER TABLE TODO items

2004-05-06 Thread Christopher Kings-Lynne
I tweaked things so that the clustered flag is preserved for indexes that aren't directly affected by the ALTER TYPE. It would take more work to preserve the setting for an index that is rebuilt by ALTER TYPE, and I'm not even sure that it's sensible --- the new index could have a significantly

Re: [HACKERS] alter table alter columns vs. domains

2004-05-06 Thread Christopher Kings-Lynne
Is it feasible or practical to consider adding ALTER DOMAIN TYPE type? (basically following the same rules as ALTER TABLE). I was _just_ about to ask that! Chris ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index

Re: [HACKERS] pgFoundry Open For Business

2004-05-06 Thread Christopher Kings-Lynne
Over the next few months, we will be enabling the following features (all of which currently have some bugs) -- Code Snippets: A library to share small scripts and functions, like Roberto's old PL/pgSQL Library, but supporting multiple languages; -- lightweight personal

Re: [HACKERS] COPY command - CSV files

2004-05-06 Thread Christopher Kings-Lynne
Hi Umberto, If you are interested in doing any development work on PostgreSQL, you _really_ need to work from the CVS version :) Chris Umberto Zappi wrote: Thanks to everybody has reply to my email. Stop immediatly my work in progress. Some days ago I've downloaded version 7.4.3 of postgresql

Re: [HACKERS] [ADMIN] cast not IMMUTABLE?

2004-05-06 Thread Christopher Kings-Lynne
(login_time at time zone 'GMT')::date but upon experimenting I see that that isn't considered immutable either :-(. Offhand I think this may be an oversight --- I can't see any reason for the various flavors of AT TIME ZONE (a/k/a timezone() function) not to be considered immutable.

Re: [HACKERS] ALTER TABLE TODO items

2004-05-06 Thread Christopher Kings-Lynne
I left the statistic setting as-is (do you think that's wrong?) but the storage spec gets reset to whatever the default for the new type is. Seems reasonable. We could talk about doing something more complicated, such as keep the old setting if both old and new types support toasting, else reset

Re: [HACKERS] psql 7.3.4 disagrees with NATURAL CROSS JOIN

2004-05-06 Thread Christopher Kings-Lynne
I have discovered a problem with psql 7.3.4 where it does not seem to like statements containing NATURAL CROSS JOIN. I have a test that I have created that will show the problem. Please have a look at it, give it a try, and let me know if there is a problem with the program or with the operator.

Re: [HACKERS] COPY command - CSV files

2004-05-05 Thread Christopher Kings-Lynne
I believe this has already been implemented in CVS... Chris Umberto Zappi wrote: I wish modify COPY command for support of CSV files (dump/load files in CSV format). I think this option is very important from import data from spreedsheet as OpenOffice/calc or M$/excel. I have found this task in

Re: [HACKERS] ALTER TABLE TODO items

2004-05-05 Thread Christopher Kings-Lynne
Yeah, the USING is actually any arbitrary expression over the old table row. (Getting that to work was a tad tricky...) So you can view this as a full-table UPDATE operation that folds in possible column type changes. All I can say is three cheers for Tom and Rod on this one Chris

Re: [HACKERS] Multiple Xids in PGPROC?

2004-05-04 Thread Christopher Kings-Lynne
I remember going through this. Other backends will use pg_subtrans to know what transactions are in progress. They have to do the standard lookups to find the status of the parent transaction. The backend-local list of xids is needed so the commit can clean up those subtransaction xids so that

Re: [HACKERS] Multiple Xids in PGPROC?

2004-05-04 Thread Christopher Kings-Lynne
I hope not, because for many of us there will be as many (if not more) subtransactions than standard transactions. How can that possibly be true? Every statement executed in postgres is a transaction how many subtransactions are really needed and how can they be as common as normal

Re: [HACKERS] Multiple Xids in PGPROC?

2004-05-04 Thread Christopher Kings-Lynne
Yup.. And some of us intend on wrapping every single statement in a subtransaction so we can rollback on an error without aborting the main transaction. Point there being main transaction. What i'm saying is that the vast majority of your transactions will be single statements. eg. single

[HACKERS] OT: Open source developer survey

2004-05-03 Thread Christopher Kings-Lynne
Hi guys, I know this is off topic, but if there are any developers with sourceforge accounts here, they might be interested in filling out this query which came throught the phpPgAdmin lists. It seems legit :) Chris Original Message Subject: [ppa-dev] FASD project: Online

Re: [HACKERS] I need Help

2004-05-03 Thread Christopher Kings-Lynne
I installed postgresql 7.4 in my computer, I'm using redhat 9.0 . I installed pgadmin III but I can't to conecct to the server. The port 5432 is not open. You need to set tcpip_socket = true in your postgresql.conf. Chris ---(end of broadcast)---

Re: [HACKERS] Nasty security bug with clustering

2004-05-03 Thread Christopher Kings-Lynne
I'm in the middle of reviewing (read whacking around) Rod Taylor's patch for multiple operations in ALTER TABLE, so I'm afraid that no patch in the same area is likely to apply cleanly after the dust settles :-( OK, Bruce - just ignore the patch I sent in. I'll refactor it after Tom commits.

Re: [HACKERS] SET WITHOUT CLUSTER patch

2004-05-02 Thread Christopher Kings-Lynne
Actually, it occurs to me that the SET WITHOUT CLUSTER form CAN recurse. Should I make it do that, even though the CLUSTER ON form cannot? I just thought about this. CLUSTER is more of a storage-level specification, rather than a logical one. Seems it is OK that WITOUTH CLUSTER not recurse

Re: [HACKERS] SET WITHOUT CLUSTER patch

2004-05-02 Thread Christopher Kings-Lynne
Uh, if the CLUSTER doesn't recurse, the WITHOUT shouldn't either, I think, and throwing an error seems fine to me, even if it isn't the same wording as a syntax error. Well, maybe - up to you. ---(end of broadcast)--- TIP 5: Have you checked our

Re: [HACKERS] Plan for feature freeze?

2004-05-01 Thread Christopher Kings-Lynne
Tatsuo brought up the an excellent point (that I have been saying for a long time), that the number of must-fix bugs from previous releases is shrinking, and the complexity of new features is increasing. This dictates the that length of our release process should lengthen over time. May I also

[HACKERS] Clustering system catalog indexes

2004-04-28 Thread Christopher Kings-Lynne
Is it worth us marking any system catalog indexes as clusterable by default for performance? Chris ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [HACKERS] bitwise and/or aggregate functions?

2004-04-28 Thread Christopher Kings-Lynne
SELECT BIT_OR(aclitem_privs(...)) AS effective_privs FROM ... WHERE aclitem_grantee(...)=... AND ... ; Is there anything in SQL2003 about such operators? If there is, we should make sure we use the correct aggregate names. Chris ---(end of

[HACKERS] Weirdness with OIDs and JOIN ON?

2004-04-28 Thread Christopher Kings-Lynne
Why doesn't this work: test=# select oid, relname, indisclustered from pg_index join pg_class on indexrelid=oid where indexrelid 17205; ERROR: column oid does not exist I'm _joining_ on the oid column. If I qualify it, it works: test=# select pg_class.oid, relname, indisclustered from pg_index

Re: [HACKERS] Nasty security bug with clustering

2004-04-28 Thread Christopher Kings-Lynne
No check is performed for being a superuser, the table owner or that it is a system table when marking an index for clustering: I'm about to submit my SET WITHOUT CLUSTER patch, so I'll fix this bug in that. Chris ---(end of broadcast)--- TIP 9:

Re: [HACKERS] bitwise and/or aggregate functions?

2004-04-28 Thread Christopher Kings-Lynne
Is there anything in SQL2003 about such operators? If there is, we should make sure we use the correct aggregate names. That's a point! I thought of BIT_* because it is short and also used by mysql. Ingres has BIT_AND and BIT_OR functions, but they are not aggregates. I don't know where these

Re: [HACKERS] Nasty security bug with clustering

2004-04-28 Thread Christopher Kings-Lynne
I'm in the middle of reviewing (read whacking around) Rod Taylor's patch for multiple operations in ALTER TABLE, so I'm afraid that no patch in the same area is likely to apply cleanly after the dust settles :-( OK, Bruce - just ignore the patch I sent in. I'll refactor it after Tom commits.

Re: [HACKERS] Usability, MySQL, Postgresql.org, gborg, contrib, etc.

2004-04-27 Thread Christopher Kings-Lynne
If anything, I'd rather see the JDBC and ODBC drivers reinstated in the release. More than 56% of the PostgreSQL users (according to the poll) uses JDBC today. ODBC is merely 18% but that might change significantly when the native Win32 port is released. I might have missed something altogether

Re: [HACKERS] Usability, MySQL, Postgresql.org, gborg, contrib,

2004-04-27 Thread Christopher Kings-Lynne
Seriously - I'd like to raise my voice in favor of installing plpgsql in template1 by default. I haven't heard any good reason not to (nor even a bad reason). It has to work with older dumps that will try to recreate pl/pgsql themselves explicitly. I offered the same opinion a while back,

[HACKERS] Nasty security bug with clustering

2004-04-27 Thread Christopher Kings-Lynne
No check is performed for being a superuser, the table owner or that it is a system table when marking an index for clustering: usa= alter table pg_class cluster on pg_class_oid_index; ALTER TABLE usa= select oid from pg_class where relname='pg_class_oid_index'; oid --- 16613 (1 row) usa=

Re: [HACKERS] [pgsql-advocacy] What can we learn from MySQL?

2004-04-23 Thread Christopher Kings-Lynne
My question is, What can we learn from MySQL? I don't know there is anything, but I think it makes sense to ask the question. Questions I have are: I have already told Bruce at length about the single most common complaint in the phpPgAdmin lists and in the IRC channel: the inability to change

Re: [HACKERS] pg_autovacuum crashes when query fails for temp tables

2004-04-20 Thread Christopher Kings-Lynne
I looked into this and I see a number of cases where pg_autovacuum calls send_query(), but doesn't test for a NULL return from the function. Matthew, would you look into this and submit a patch? Thanks. Does pg_autovacuum vacuum and analyze system catalog and TOAST tables properly? Chris

Re: [HACKERS] pg_autovacuum crashes when query fails for temp tables

2004-04-20 Thread Christopher Kings-Lynne
No, I have not heard of a 7.4.3 timeline, but we certainly want your eventual fixes in that release. Right, and along these lines there are a few other pg_autovacuum bugs that were fixed just after 7.4.2. A rollable log solution would be nice :) Syslog? :) Chris ---(end

Re: [HACKERS] pg_autovacuum crashes when query fails for temp

2004-04-20 Thread Christopher Kings-Lynne
Ok, so I will change pg_autovacuum to explicitly ignore temp tables. Just to be sure, I can do this by avoiding anything found in the pg_temp schemea, or is there a better way? Is it possible that a user could or would put a non-temp table the pg_temp schemea? There's no such thing as the

Re: [HACKERS] ON COMMIT DROP

2004-04-19 Thread Christopher Kings-Lynne
Where exactly would you propose to stick it in the syntax? Good question, I don't know. Can you do it without introducing more fully-reserved words than we have already? No idea. Is there any spec or other-product precedent for it? (Offhand I can't even find CREATE TABLE AS in SQL99...) Weeell.

Re: [HACKERS] 'begin transaction' new syntax bug?

2004-04-19 Thread Christopher Kings-Lynne
char *argstring = flatten_set_variable_args(name, args); + printf(bjm: %s %s\n, name, argstring); + fflush(stdout); Did you really mean to include that? :) Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

[HACKERS] ON COMMIT DROP

2004-04-18 Thread Christopher Kings-Lynne
Is there any reason why the 'ON COMMIT' behaviour feature is not available if you use CREATE TABLE AS ...? Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] Remove MySQL Tools from Source?

2004-04-17 Thread Christopher Kings-Lynne
But you would have to assign the copyright to them If someone is going to make money from my code, I prefer it to be me, or at least that everyone has a chance to do so rather than just one company. Well, then for the same reason we should write a Perl script that connects to MySQl and

Re: [HACKERS] Remove MySQL Tools from Source?

2004-04-14 Thread Christopher Kings-Lynne
... on projects.postgresql.org, or similar.They really aren't doing any good in /contrib. I've already set up a category conversion tools on pgFoundry, and my idea was one project per target system. I reckon that by far the best way to do a mysql2pgsql converter is to just modify mysqldump

Re: [HACKERS] Function to kill backend

2004-04-03 Thread Christopher Kings-Lynne
This is a commonly requested feature by DBA's migrating from SQL Server and Oracle.In those databases, there is a GUI to monitor database requests, and potentially kill them to resolve deadlocks or runaway queries (though, in the case of SQL server, it does not work). Right now, it is very

Re: [HACKERS] Update on PITR

2004-03-31 Thread Christopher Kings-Lynne
Is your timeline based on the assumption of doing all the work yourself? If so, how about farming out some of it? I'd be willing to contribute some effort to PITR. (It's been made clear to me that Red Hat really wants PITR in 7.5 ;-)) What is RedHat's interest in PostgreSQL? Last time I heard

Re: [HACKERS] pg_dump end comment

2004-03-30 Thread Christopher Kings-Lynne
I like an end-of-dump marker for folks who want to check if the dump got truncated somehow. I can see how to do that for text dumps, but what about for tar or custom dumps? Wouldn't it be more effective to test for non zero return status as this handles -Fc cases, etc, which would be non-trivial

[HACKERS] pg_dump 7.4 bug

2004-03-29 Thread Christopher Kings-Lynne
If you do this sequence of events, you get a failure to restore: 1. As superuser, do this: test2=# CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler test2-# AS '$libdir/plpgsql.so', 'plpgsql_call_handler' test2-# LANGUAGE c; CREATE FUNCTION 2. Drop privs. test2=# alter

[HACKERS] PostgreSQL and FreeBSD SoftUpdates

2004-03-29 Thread Christopher Kings-Lynne
Hi guys, Does anyone else have this problem? We have softupdates turned on on our data dir. (Soon to be turned off due to these issues). The partition is 12GB. 'df' says that we're using 12 and a bit GB but 'du' says we're using 2GB (which we really are). It seems that perhaps softupdates

Re: [HACKERS] pg_dump 7.4 bug

2004-03-29 Thread Christopher Kings-Lynne
If you do this sequence of events, you get a failure to restore: This is not a pg_dump bug. Possibly ALTER USER should refuse to drop someone's superuserness if there is content in the database that depends on his superuserness, but I don't see how to enforce that. How about we allow changing

Re: [HACKERS] PostgreSQL and FreeBSD SoftUpdates

2004-03-29 Thread Christopher Kings-Lynne
what version of FreeBSD are you using? I'm running 4.9-STABLE with softupdates on my db file system ... FreeBSD goddard.calorieking.com 4.9-STABLE FreeBSD 4.9-STABLE #2: Mon Jan 26 23:23:17 EST 2004 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GODDARD i386 We're not 100% sure it's softupdates, but

Re: [HACKERS] PostgreSQL and FreeBSD SoftUpdates

2004-03-29 Thread Christopher Kings-Lynne
Right off the top of my head, it almost sounds like a file is being held open after its been deleted ... we went through that with the new aspseek a little while back, where 170gig just disappeared overnight, but du showed hardly any disk space being used ... Does restarting the database server

[HACKERS] pg_dump end comment

2004-03-29 Thread Christopher Kings-Lynne
This might seem a bit silly, but is there any chance we could add a comment at the end of pg_dump text output that says '-- End of dump'? Would make it useful for checking that you actually have a complete dump... Chris ---(end of broadcast)---

Re: [HACKERS] PostgreSQL and FreeBSD SoftUpdates

2004-03-29 Thread Christopher Kings-Lynne
'k, *shouldn't* require a reboot ... but, what I'd try is to do what you've thought .. disable softupdates and see if you can recreate ... if killing off the process auto-reclaims the space fast, then it sounds like a stale file being held open (log file being rotated improperly?) ... Log file's

Re: [HACKERS] Increasing security in a shared environment ...

2004-03-28 Thread Christopher Kings-Lynne
The \l command should only list databases that the current user is authorized for, the \du command should only list users authorized for the current database (and perhaps only superusers should get even that much information), etc. Perhaps it is possible to set PG to do this, but that should

Re: [HACKERS] Email addresses on developer bios site

2004-03-25 Thread Christopher Kings-Lynne
Is there any chance we could get our email addresses obfuscated to prevent spam? Just an FYI, but just by posting, you do realize that your email address is propogated to every Usenet server in the world, as well as several search engines like Google and Gname, right? I'm well aware of that, since

Re: [HACKERS] Nested transaction proposal - take N (N 2)

2004-03-25 Thread Christopher Kings-Lynne
a c 0 0 transaction in progress, the owning backend knows whether it is a main- or a sub-transaction, other backends don't care 1 0 aborted, nobody cares whether main- or sub-transaction 0 1 committed main-transaction or - with shortcut 2 - a sub-

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Christopher Kings-Lynne
(6) possible inclusion in postgresql? - among other contributions? what about contrib/advisor? - added to template1 on default installation? maybe not for a first release? or yes? it is easier to communicate about I think we're going to want a gborg project for developing/coordinating

Re: [HACKERS] pg_advisor schema proof of concept

2004-03-24 Thread Christopher Kings-Lynne
I was thinking along the kind of missing index Tom was arguing about for RI checks, that may be helped if an appropriate index is available. I'm not sure what could be done, even with the query, in the general case. How to guess what index would help make a better plan? It depends on the optimiser

Re: subversion vs cvs (Was: Re: [HACKERS] linked list rewrite)

2004-03-24 Thread Christopher Kings-Lynne
It does have some downsides that I have found, most notibly that the size of your sources you have in your working copy are essentially doubled. There is a copy in your .svn directory that allows the offline status, diff, and revert commands to work. What's needed is a good window

[HACKERS] Email addresses on developer bios site

2004-03-24 Thread Christopher Kings-Lynne
On this page: http://developer.postgresql.org/bios.php Is there any chance we could get our email addresses obfuscated to prevent spam? Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] Chapter on PostreSQL in a book

2004-03-23 Thread Christopher Kings-Lynne
I'm at a loss as to how much we should focus on these sections. Do we use what's in GBorg ? Do the hackers have any suggestions ? There are 33 DBA tools and 19 Design tools in GBorg .. are there any specific tools that are recommended ? Well, I think there are really just two major active free

Re: [HACKERS] dollar quoting and pg_dump

2004-03-23 Thread Christopher Kings-Lynne
I don't mind if it's on by default; just thinking that some people might appreciate a way to turn it off. -X disable-dollar-quoting sounds fine. Does it _have_ to be dollars? Other languages call this feature 'heretext' IIRC. Chris ---(end of

Re: [HACKERS] bug in 7.4 SET WITHOUT OIDs

2004-03-23 Thread Christopher Kings-Lynne
Will it handle this case: usa=# create table testy (a int4) without oids; usa=# alter table testy add oid int4; No. This is DROP not ADD. What I meant is - does it handle dropping a non-system 'oid' column? ie. A user column that just happens to be named 'oid'. Chris

Re: [HACKERS] bug in 7.4 SET WITHOUT OIDs

2004-03-23 Thread Christopher Kings-Lynne
If you have one (implying that you don't have a system OID column) then DROP COLUMN oid will drop it, but SET WITHOUT OIDS will not. Okay with you? Sounds fair. Chris ---(end of broadcast)--- TIP 7: don't forget to increase your free space map

Re: [HACKERS] float8 regression test failure in head

2004-03-22 Thread Christopher Kings-Lynne
This has not yet been fixed... Chris Tom Lane wrote: Christopher Kings-Lynne [EMAIL PROTECTED] writes: Attached are the test failures I'm currently getting. It looks like Neil didn't update expected/float8-small-is-zero.out for his recent changes (for which, shame on him). Would you get

[HACKERS] bug in 7.4 SET WITHOUT OIDs

2004-03-22 Thread Christopher Kings-Lynne
I had a suspicion and it was confirmed: test=# create table oidtest (a int4, unique(oid)); NOTICE: CREATE TABLE / UNIQUE will create implicit index oidtest_oid_key for table oidtest CREATE TABLE test=# select oid from oidtest; oid - (0 rows) test=# alter table oidtest set without oids;

[HACKERS] Weird behaviour with subquery

2004-03-22 Thread Christopher Kings-Lynne
What's going on here: usa= select user_id from users_users where joindate = '2004-03-09'; ERROR: column user_id does not exist usa= select * from shop_orders where user_id in (select user_id from users_users where joindate = '2004-03-09'); [waits and waits and waits...have to cancel] ^CCancel

Re: [HACKERS] Weird behaviour with subquery

2004-03-22 Thread Christopher Kings-Lynne
Doh - I think I understand now why this is normal behavior - sorry! Chris Christopher Kings-Lynne wrote: What's going on here: usa= select user_id from users_users where joindate = '2004-03-09'; ERROR: column user_id does not exist usa= select * from shop_orders where user_id in (select

Re: [HACKERS] bug in 7.4 SET WITHOUT OIDs

2004-03-22 Thread Christopher Kings-Lynne
The problem appears to be that ALTER TABLE SET WITHOUT OIDS doesn't make the index on the OID column go away. I don't have a strong opinion on whether to fix this by forcing a drop of the index or by rejecting the ALTER command. Seems like we have to do one or the other though. This is actually

Re: [HACKERS] bug in 7.4 SET WITHOUT OIDs

2004-03-22 Thread Christopher Kings-Lynne
Maybe it needs CASCADE/RESTRICT added? Seems like overkill, considering that this is a very marginal feature. I'm happy to decree that it works in whichever way is the easiest to implement. In that case, it seems to me that it has to be default RESTRICT. If anything depend on it, it must fail.

Re: [HACKERS] pg_autovacuum next steps

2004-03-21 Thread Christopher Kings-Lynne
I think these configuration issues will become a lot easier if you make the autovacuum daemon a subprocess of the postmaster (like, say, the checkpoint process). Then you have access to a host of methods for storing state, handling configuration, etc. Yeah - why delay making it a backend

Re: [HACKERS] Further thoughts about warning for costly FK checks

2004-03-18 Thread Christopher Kings-Lynne
though I'd be worried about the portability price paid to have one. Or are you concerned about whether a GUI could invoke it? I don't see why not --- the GUIs don't reimplement pg_dump, do they? Actually Tom, I think they do (where they have an export facility). How would you run pg_dump on a

Re: [HACKERS] Will auto-cluster be in 7.5?

2004-03-18 Thread Christopher Kings-Lynne
# CLUSTER * Automatically maintain clustering on a table * Add way to remove cluster specification on a table I've done the latter - it's been sent to -patches. However, I need someone to look at the shift/reduce problem I'm getting... Chris ---(end of

Re: [HACKERS] Will auto-cluster be in 7.5?

2004-03-18 Thread Christopher Kings-Lynne
This patch is done and will be applied soon. I'm a bit confused, why would you want to uncluster a table? You would want to remove the marker that says 'cluster this column in the future'. At the moment, there is no way of removing all markers from a table. Chris

[HACKERS] SET WITHOUT CLUSTER patch

2004-03-18 Thread Christopher Kings-Lynne
Hi, I have done a patch for turning off clustering on a table entirely. Unforunately, of the three syntaxes I can think of, all cause shift/reduce errors: SET WITHOUT CLUSTER; DROP CLUSTER CLUSTER ON NONE; This is the new grammar that I added: /* ALTER TABLE name SET WITHOUT CLUSTER */ |

Re: [HACKERS] Doxygen?

2004-03-17 Thread Christopher Kings-Lynne
I was thinking of writing a cron job to update the CVS tree and then build the documentation (takes about 10 minutes on my computer). Then I could push it to wherever you like. Are we currently maintaining two or three branches in the code? We may want to keep them seperate. We could also

[HACKERS] relation_expr vs. qualified_name

2004-03-17 Thread Christopher Kings-Lynne
How come half the ALTER TABLE statements use relation_expr and half use qualified_name? Is one more correct now? Chris ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[HACKERS] float8 regression test failure in head

2004-03-17 Thread Christopher Kings-Lynne
Attached are the test failures I'm currently getting. -bash-2.05b$ uname -a FreeBSD mir.internal 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Mon Sep 22 14:46:18 WST 2003 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MIR i386 Chris parallel group (13 tests): text name char varchar oid boolean int2

Re: [HACKERS] Some one deleted pg_database entry how to fix it?

2004-03-16 Thread Christopher Kings-Lynne
Thanks, first of all it wasn't my mess, but someone elses. Secondly this worked however I was unable to use the same name, some remnants of the old database must have remained in pg_database. I couldn't even reindex it with postgres -O -P Maybe try a full dump and reload now? Chris

[HACKERS] Custom format for pg_dumpall

2004-03-14 Thread Christopher Kings-Lynne
Hi, Why is there no custom format dump option for pg_dumpall? What if I want to use pg_dumpall to dump all db's and blobs? Or if I want to have a huge sql dump from which I can easily exract the sql to recreate just one table? Chris ---(end of

Re: [HACKERS] [PATCHES] log_line_info

2004-03-10 Thread Christopher Kings-Lynne
Please don't. Declare them obsolete for 7.5 and remove them in a later release. Nah, just remove them. We've removed, added and changed so many config options and no-one's ever complained... Chris ---(end of broadcast)--- TIP 2: you can get

Re: [HACKERS] grants

2004-03-09 Thread Christopher Kings-Lynne
hi there i'm having troubles to find how to GRANT SELECT ON all-tables-onmydb TO specificuser There isn't any such command. You need to write a stored procedure to do it for you in a loop. Chris ---(end of broadcast)--- TIP 1: subscribe and

Re: [HACKERS] About hierarchical_query of Oracle

2004-03-09 Thread Christopher Kings-Lynne
Try contrib/tablefunc Chris Li Yuexin wrote: Who can tell me how to complete /oracle's / /hierarchical_query /through postgresql/ / ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] [PATCHES] NO WAIT ...

2004-03-08 Thread Christopher Kings-Lynne
If NOWAIT is the choice, I could live with it. If there's no objection, I will go with NOWAIT, not NO WAIT. How about WITHOUT WAIT, which is like many of our other commands? Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] Tablespaces

2004-03-02 Thread Christopher Kings-Lynne
A table space parameter will be added to DDL commands which create physical database objects (CREATE DATABASE/INDEX/TABLE/SEQUENCE) and to CREATE SCHEMA. The associated routines, as well as the corresponding DROP commands will need to be updated. Adding the ability to ALTER object TABLESPACE name

Re: [HACKERS] API Layers within Postgres

2004-03-02 Thread Christopher Kings-Lynne
How easy is to to get cursor access to the indexes and fine grained control of the transaction system, are their fairly clean internal APIs I can leverage. I'm not sure 'PostgreSQL' and 'fairly clean internal API' go together :P Chris ---(end of

Re: [HACKERS] Tablespaces

2004-03-02 Thread Christopher Kings-Lynne
I've been looking at implementing table spaces for 7.5. Some notes and implementation details follow. Ah sorry, other things you might need to consider: Privileges on tablespaces: GRANT USAGE ON TABLESPACE tbsp TO ...; Different disk settings for different tablespaces (since they will likely

Re: [HACKERS] [ADMIN] Schema comparisons

2004-03-02 Thread Christopher Kings-Lynne
I recently had to figure out what was different between the live schema and the schema in cvs at work. This was a really painful process, and it occurred to me that it wouldn't be terribly hard to write a perl program to do it (I wound up using vim and diff). Is there interest in such a tool? I

Re: [HACKERS] [GENERAL] select statement against pg_stats returns

2004-02-24 Thread Christopher Kings-Lynne
Why? You can reconstruct it with a simple ANALYZE command. Dumping and restoring would mean nailing down cross-version assumptions about what it contains, which doesn't seem real forward-looking... I seem to recall that people like that kind of thing so that the dump is really the current state

Re: [HACKERS] [GENERAL] select statement against pg_stats returns

2004-02-24 Thread Christopher Kings-Lynne
I don't think so --- we weren't trying to use it as an actual column datatype back then. 7.4 has a problem though :-( ... this is one of the damn I wish we'd caught that before release ones, since it can't easily be fixed without initdb. Reminds me that I need to get to work on making pg_upgrade

[HACKERS] user defined function in CHECK constraint

2004-02-23 Thread Christopher Kings-Lynne
Hi, I've just talked to a few users on IRC who cannot restore dumps because they use user-defined functions in CHECK constraints. Any chance this will be fixed using dependencies? Or maybe it's just easy to put all ADD CHECKs at the very end? Chris ---(end of

[HACKERS] unqualified function calls in system_views.sql

2004-02-18 Thread Christopher Kings-Lynne
Do these need to be fixed in backend/catalog/system_views.sql to have pg_catalog. before everything? eg. CREATE VIEW pg_rules AS SELECT N.nspname AS schemaname, C.relname AS tablename, R.rulename AS rulename, pg_get_ruledef(R.oid) AS definition FROM

Re: [PATCHES] [HACKERS] dollar quoting

2004-02-16 Thread Christopher Kings-Lynne
Actually, I thought the way to handle it would be to duplicate the backend lexer as nearly as possible. Most of the productions would have empty bodies probably, but doing it that way would guarantee that in fact psql and the backend would lex a string the same way, which is exactly the problem

Re: [HACKERS] casting zero-length strings

2004-02-16 Thread Christopher Kings-Lynne
Yes, surely, unless someone wants to argue for reverting that change to pg_atoi. I can't see a reason for having them act inconsistently. While we are at it we should make sure these functions are all on the same page about allowing leading/trailing whitespace. I seem to recall that the spec

Re: [HACKERS] No Timeout in SELECT..FOR UPDATE

2004-02-15 Thread Christopher Kings-Lynne
(1) Re-write the SELECT...FOR UPDATE SQL code, to return with an exception or error if it cannot immediately secure the lock, OR: You could use SET STATEMENT_TIMEOUT... Chris ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please

<    4   5   6   7   8   9   10   11   12   13   >