Re: [HACKERS] 7.4 feature freeze is here

2003-07-03 Thread Christopher Kings-Lynne
On Thu, Jul 03, 2003 at 10:18:23 +0800, Christopher Kings-Lynne [EMAIL PROTECTED] wrote: It might be killer than that PHP support for Apache2 requires that all PHP modules be thread-safe... Is that true if you are using the prefork MPM? Dunno. Chris ---(end

Re: [HACKERS] How to submit Tsearch V2 ?

2003-07-03 Thread Christopher Kings-Lynne
we still have no r/w access to CVS, so I'm asking authoritative developers to grab archive http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/tsearch-v2-stable.tar.gz and submit it to CVS for 7.4 beta. Out of interest - is it completely backwards compatible? Chris

[HACKERS] btree index growth

2003-07-03 Thread Christopher Kings-Lynne
How fixed is the btree index growth issue in 7.4? Does it mean no more reindexing ever? Or does it mean reindexing once a month instead of once a week? Chris ---(end of broadcast)--- TIP 6: Have you searched our list archives?

Re: [HACKERS] How to submit Tsearch V2 ?

2003-07-03 Thread Christopher Kings-Lynne
we still have no r/w access to CVS, so I'm asking authoritative developers to grab archive http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/tsearch-v2-stable.tar.gz and submit it to CVS for 7.4 beta. Out of interest - is it completely backwards compatible? unfortunately,

Re: [HACKERS] Index expressions: how to recreate

2003-07-02 Thread Christopher Kings-Lynne
Clearly understood, while pgadmin3 will always behave quite backend specific. The code for index display broke just shortly ago, because the column pg_index.indproc went away. There's a growing number of version specific stuff in it, because we try to prevent the user from doing illegal

Re: [HACKERS] 7.4 feature freeze is here

2003-07-02 Thread Christopher Kings-Lynne
Read the HISTORY file - there's a few things. Chris - Original Message - From: Robert Treat [EMAIL PROTECTED] To: Tom Lane [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 9:27 PM Subject: Re: [HACKERS] 7.4 feature freeze is here Once you folks are done going

[HACKERS] 7.4 feature freeze

2003-07-02 Thread Christopher Kings-Lynne
No-one's fixed the %rowtype with dropped columns business yet either... Chris ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] 7.4 feature freeze is here

2003-07-02 Thread Christopher Kings-Lynne
You might like to mention that (as far as I can tell) ECPG is now safe for pthreads on Linux and FreeBSD. The recursive mutex locks are removed, so even platforms that implement the earlier version of pthreads ought to work as well, once configure supports them (anyone care to actually test

[HACKERS] vacuum bug

2003-07-01 Thread Christopher Kings-Lynne
Hi, I was running a long-running vacuum full, and then halfway thru that our background vacuum process started. As well as this, there was light activity on a users table from which vacuum full was removing 9 rows. Then vacuum full failed after a while: ERROR: simple_heap_update: tuple

Re: [HACKERS] vacuum bug

2003-07-01 Thread Christopher Kings-Lynne
There would be *zero* activity on a table undergoing vacuum full, unless your app has found a way around vacuum full's exclusive lock. You sure this wasn't a plain vacuum? Hmm...correct. So I don't know what happened. Then vacuum full failed after a while: ERROR: simple_heap_update:

Re: [HACKERS] Urgent : Regarding Submission of Code

2003-07-01 Thread Christopher Kings-Lynne
First, read the developer's FAQ. Second, you probably will want to look at /contrib and see if it can be made into a loadable module. I am not sure we would want to have the datacube stuff in the main backend source tree. Why not? It's in SQL99... Chris ---(end

Re: [HACKERS] Setting locale per connection

2003-07-01 Thread Christopher Kings-Lynne
I usually use PostgreSQL for multiple languages, so I needed to set locale per connection, or can change the locale on the fly. I don't know if there is any such ability integrated in or not, so I have wrote my 10lines function as a wrapper around setlocale, that is attached. So what I do is

Re: Tablespaces (was Re: [HACKERS] [GENERAL] Physical Database

2003-06-27 Thread Christopher Kings-Lynne
No, they're not. Chris On 27 Jun 2003, Austin Gonyou wrote: I thought Tablespaces were already implemented. Are they not? On Thu, 2003-06-26 at 22:10, Christopher Kings-Lynne wrote: ROTFL... the answer is no. Feature freeze is Tuesday, people. In practice, the time to start coding

Re: [HACKERS] Manual fixing of plpgsql_call_handler binary location

2003-06-27 Thread Christopher Kings-Lynne
Will I destroy things if I execute update pg_proc set probin = '/usr/lib/pgsql/plpgsql.so' where proname = 'plpgsql_call_handler'; Nope ... that's what I'd probably do. You could alternatively use CREATE OR REPLACE FUNCTION if you wanted to be pure, but I'd say that that creates as

Re: [HACKERS] When will table partitioning be available..

2003-06-27 Thread Christopher Kings-Lynne
A long, long time. Chris On Thu, 26 Jun 2003, Shirish Reddy wrote: Hi, One of the issues that is preventing us from migrating from an Oracle DB to Postgres is that Table Partitioning is not available in Postgres yet. Partitioning is still listed as a TO DO. Any ideas when this will be

[HACKERS] date parsing

2003-06-26 Thread Christopher Kings-Lynne
Is this deliberate? usa=# select '1-1-2001'::date; date 2001-01-01 (1 row) usa=# select '1-1--2001'::date; date 2001-01-01 (1 row) usa=# select '1-1---2001'::date; date 2001-01-01 (1 row) usa=# select

Re: [HACKERS] [GENERAL] Physical Database Configuration

2003-06-26 Thread Christopher Kings-Lynne
Good question. If it gets in 7.4, that would be more than a killer feature to put against 7.4 release, with due respect to all other enhancements in progress.. It's not going to happen. Chris ---(end of broadcast)--- TIP 6: Have you searched

Re: [HACKERS] [GENERAL] Physical Database Configuration

2003-06-26 Thread Christopher Kings-Lynne
Tablespaces databases schemas objects with each of them implemented as a directory and data files under it. If we could get a quota check propogated in both direction, that would be pretty good, may be a warning when things start getting close to limit. Database do not

Tablespaces (was Re: [HACKERS] [GENERAL] Physical Database Configuration )

2003-06-26 Thread Christopher Kings-Lynne
ROTFL... the answer is no. Feature freeze is Tuesday, people. In practice, the time to start coding new stuff is already long past. Especially major new stuff. If you start now you might have something done for 7.5. Can everyone who is interested in actually coding a tablespaces

Re: [HACKERS] Table partitioning question.

2003-06-26 Thread Christopher Kings-Lynne
As people who are needing to move away from Oracle due to cost restrictions, I wanted to know how much work, or what the status is of this option. Please respond asap if possible. I have to give my VP info on this relatively soon. A lot of work is needed, and I wouldnt' even guarantee it

Re: [HACKERS] [GENERAL] Physical Database Configuration

2003-06-25 Thread Christopher Kings-Lynne
Well, correct solution is to implement tablespaces on which objects like databases, tables and indexes can be put. I have started working on tablespaces (to the extent that I am capable!), based not on the rejected patch, but on Jim's eventual syntax proposal that was never developed. eg.

Re: [HACKERS] allowed user/db variables

2003-06-25 Thread Christopher Kings-Lynne
I was considering adding this and the stuff Andreas requested to pg_settings (but not SHOW ALL or SHOW x unless people feel it's important to kept them consistent with pg_settings). Were the Red Hat guys going to do this? pg_settings would be fine for phpPgAdmin. Chris

Re: [HACKERS] [GENERAL] Physical Database Configuration

2003-06-25 Thread Christopher Kings-Lynne
I have started working on tablespaces (to the extent that I am capable!), based not on the rejected patch, but on Jim's eventual syntax proposal that was never developed. Hmm... Remember feature freeze is 1st of July. So unless you send out a minimally working patch before that, it won't

[HACKERS] recursive queries

2003-06-25 Thread Christopher Kings-Lynne
What's the chances of getting recursive queries in for 7.4? Chris ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [HACKERS] recursive queries

2003-06-25 Thread Christopher Kings-Lynne
If you mean SQL99 WITH clauses, approximately zero ... unless you had an implementation you were planning to whip out of your hip pocket along about now. Andrew Overholt of Red Hat has been working on this, but is certainly not going to make the Tuesday feature-freeze deadline. I was just

Re: [HACKERS] ftp mirror

2003-06-23 Thread Christopher Kings-Lynne
Is it me or is there a problem with ftp mirrors? The latest shapshots I have here are from June 2; seems rather old.. Also, what happened to www.au.postgresql.org??? Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[HACKERS] How to disconnect a user

2003-06-23 Thread Christopher Kings-Lynne
Someone's asking this in the PHPBuilder forums: http://www.phpbuilder.com/board/showthread.php?s=e35a83518b040c2b4db0c7ef3867ab40threadid=10244626 --- Hi all Is there a way to disconnect users from a D.B in postgresql rather than kill -9 the pid user? thanks in advance --- Doesn't seem to me

Re: [HACKERS] Two weeks to feature freeze

2003-06-22 Thread Christopher Kings-Lynne
No. I want to know what the subordinate does when it's promised to commit and the co-ordinator never responds. AFAICS the subordinate is screwed --- it can't commit, and it can't abort, and it can't expect to make progress indefinitely on other work while it's holding locks for the

Re: [HACKERS] add column .. default

2003-06-20 Thread Christopher Kings-Lynne
Thats still double the disk space, although that has the nice side effect of not requiring a vacuum. Also, a rollback after 99% of the updates have been done will waste no diskspace... Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the

Re: [HACKERS] Commands to change name, schema, owner

2003-06-20 Thread Christopher Kings-Lynne
The command is: ALTER THING name AUTHORIZATION username; (This is consistent with the CREATE SCHEMA syntax. Anyone like OWNER better?) k WHy not copy the exiting ALTER TABLE / OWNER TO syntax? Chris ---(end of broadcast)--- TIP 8: explain

Re: [HACKERS] Two weeks to feature freeze

2003-06-20 Thread Christopher Kings-Lynne
We (at CONNX Solutions Inc.) have a formal release procedure that includes many tens of thousands of automated tests using dozens of different platforms. There are literally dozens of machines (I would guess 70 or so total) running around the clock for 7 days before we even know if we have a

Re: [HACKERS] Two weeks to feature freeze

2003-06-20 Thread Christopher Kings-Lynne
I don't have a lot of faith in huge automated test efforts. They're great at ensuring you don't make the same mistakes you made once before, but in my experience the nastiest bugs are the ones you haven't seen before and would never in a million years have dreamed to test for. Thus, the best

Re: [HACKERS] Two weeks to feature freeze

2003-06-20 Thread Christopher Kings-Lynne
Things like that drive the credibility of the whole thing to the floor. Maybe something like this should exist for Postgres, but it's not crash-me. Maybe the NIST compliance test is adequate. Plus I belive the RedHat people are getting PostgreSQL through the NIST compliance tests at the

Re: [HACKERS] Two weeks to feature freeze

2003-06-20 Thread Christopher Kings-Lynne
Sounds like testing for the existence of a bug. X = NULL X = NULL X = NULL Etc. must always test false, regardless of the contents of X. Test for equality with NULL is a conformance error if NULL == NULL returns true. They should all return NULL, not false... dates like '00-00-');

Re: [HACKERS] Two weeks to feature freeze

2003-06-20 Thread Christopher Kings-Lynne
If you mean the one that comes with PostgreSQL, then I think the MySQL test is better. The PostgreSQL test seems to focus more on extensions than anything else. What the? It tests no extensions. The extensions have their own regression tests. Most of the criticism leveled at their efforts

Re: [HACKERS] Two weeks to feature freeze

2003-06-19 Thread Christopher Kings-Lynne
We have a lot of pretty good stuff. You're not happy that the performance of IN (subselect) has been fixed? All our code uses workaround now :) That btree index bloat is fixed (at least in large part, it remains to be seen whether the field performance is all that we need...)? Yes,

Re: [HACKERS] allowed user/db variables

2003-06-19 Thread Christopher Kings-Lynne
See my followup. Which bits of info would you like to see added that SHOW doesn't reveal? Unlike andreas, I'm not interested in the types and ranges of values, what I need to know is the GUC variables that the user is allowed to set, in particular what they can ALTER USER / SET ... so that I

Re: [HACKERS] add column .. default

2003-06-19 Thread Christopher Kings-Lynne
There is no alternative, unless you want the command to be non-roll-back-able. Well, you can do a cluster-type table duplication... Someone can make it more efficient in regards to constraint checks, etc. in the future if they want -- I don't intend to. It'd be nice if you at least

Re: [HACKERS] src/bin/scripts seems a bit of a misnomer now

2003-06-19 Thread Christopher Kings-Lynne
Christopher Kings-Lynne [EMAIL PROTECTED] writes: Does anyone care about contrib/reindexdb anymore? I'd think it's still at least as useful as clusterdb. Why, are you thinking of doing some work on it? No, I just noticed that it escaped the C conversion... Chris

Re: tsearch V2 (Was: Re: [HACKERS] Two weeks to feature freeze)

2003-06-19 Thread Christopher Kings-Lynne
Why part of the core distribution, and not just left as a loadable module, like it is now? The day I can go 'CREATE FULLTEXT INDEX ...' just like MySQL can I will be a very happy chappy... Chris ---(end of broadcast)--- TIP 8: explain analyze

Re: [HACKERS] pg_get_triggerdef in pg_dump

2003-06-18 Thread Christopher Kings-Lynne
Hi Andreas, I'm not natively english speaking, and so I don't understand what you want to say with this. Maybe this is some kind of Australian slang? Do you agree or disagree? I'm trying to explain my concerns and proposals, and it would be kind if I'm answered seriously and understandably.

Re: [HACKERS] pg_get_triggerdef in pg_dump

2003-06-18 Thread Christopher Kings-Lynne
If that's what you need you can always change the system catalogs manually. For CHAR(n) and VARCHAR(n) you change pg_attribute.atttypmod to (n+4). For NUMERIC(n,m) it's something like (n16) + m + 4 or maybe (m16) + n + 4, don't remember right now. Be sure to check that your data is in a

Re: [HACKERS] pg_get_triggerdef in pg_dump

2003-06-18 Thread Christopher Kings-Lynne
Hm, you're right, 'thou I wouldn't recommend this to the average user, and wonder if this will be possible for all future pgsql versions too. I'm considering adding safe support for this type of column change to pgAdmin3. There might be other cases of legal direct change of system catalog

Re: [HACKERS] pg_get_triggerdef in pg_dump

2003-06-18 Thread Christopher Kings-Lynne
Right offhand I think text-varchar and adjustment of length limits in char, varchar, and perhaps numeric would be the only things useful enough to worry about handling. I'd love to have adding and removing precision and timezones on timestamp* fields Chris ---(end of

Re: [HACKERS] src/bin/scripts seems a bit of a misnomer now

2003-06-18 Thread Christopher Kings-Lynne
With Peter's latest commit, there aren't any actual scripts left in src/bin/scripts; only C programs. Does that bother anyone? I was wondering about renaming to something like src/bin/misc. (Not that that name seems very compelling either...) Does anyone care about contrib/reindexdb

Re: [HACKERS] Two weeks to feature freeze

2003-06-18 Thread Christopher Kings-Lynne
We have less than two weeks to feature freeze. Win32 is still in an uncompleted state, and I haven't been able to return to it recently. Jan is working on getting exec() working, and hopefully someone can help me on signals. If I get those two done, I think I can tweek Win32 in minor ways

Re: [HACKERS] allowed user/db variables

2003-06-18 Thread Christopher Kings-Lynne
I wonder if there's a way to read all allowed user/database variables that can be set/reset. I'd like to have this self-configured in pgAdmin3 instead of hard-coded. You know, I was just about to ask this for phpPgAdmin3!!! SHOW ALL; Will help, but won't tell the whole story... Chris

[HACKERS] O_DIRECT in freebsd

2003-06-17 Thread Christopher Kings-Lynne
I noticed this in the FreeBSD 5.1 release notes: A new DIRECTIO kernel option enables support for read operations that bypass the buffer cache and put data directly into a userland buffer. This feature requires that the O_DIRECT flag is set on the file descriptor and that both the offset and

Re: [HACKERS] O_DIRECT in freebsd

2003-06-17 Thread Christopher Kings-Lynne
Will PostgreSQL pick this up automatically, or do we need to add extra checks? Extra checks, though I'm not sure why you'd want this. This is the equiv of a nice way of handling raw IO for read only operations... which would be bad. Call me crazy, but unless you're on The reason I

Re: [HACKERS] pg_get_triggerdef in pg_dump

2003-06-17 Thread Christopher Kings-Lynne
this arguments are quite academic. You what! On one side, this could be restricted, thats what pg_depends is good for (this already happens for inherited tables). On the other side, how often do you rename columns or tables? You what! On mssql, nobody cares. You what! If you fool

[HACKERS] lots of configure failures on freebsd/alpha

2003-06-17 Thread Christopher Kings-Lynne
configure: WARNING: sys/select.h: present but cannot be compiled configure: WARNING: sys/select.h: check for missing prerequisite headers? configure: WARNING: sys/select.h: proceeding with the preprocessor's result checking for sys/select.h... yes checking sys/sem.h usability... no checking

Re: [HACKERS] lots of configure failures on freebsd/alpha

2003-06-17 Thread Christopher Kings-Lynne
bare ass guess do these headers assume sys/types.h as a prerequisite on your system? I don't know - I'll check Not sure why it'd have just now broken, though. Take a look at the most recent commits to the configure stuff if you need clues. I haven't tried a build for a few weeks... Chris

[HACKERS] pg_get_triggerdef in pg_dump

2003-06-16 Thread Christopher Kings-Lynne
Is there any point using pg_get_triggerdef in pg_dump to generate trigger definitions? We'd still have to keep the old code so that we can dump pre 7.4, but it might mean we don't have to touch that code again if we add triggers on columns or something... Also, it doesn't format them as nicely

Re: [HACKERS] pg_get_triggerdef in pg_dump

2003-06-16 Thread Christopher Kings-Lynne
Seems like a good idea to me --- we've been trying to reduce pg_dump's knowledge of backend nitty-gritty, and this would be another small step in the right direction. Also, it doesn't format them as nicely as the current pg_dump code... That's fixable no? I guess you might want to

Re: [HACKERS] security flaw

2003-06-15 Thread Christopher Kings-Lynne
Since schemas provide a simple way to limit your own view, they provide for that function. Can phppgadmin be programmed to only use certain search paths in the schema? Not at the moment. The only control you have is 'show only owned databases'. 'Show only owned schemas' is also quite easy.

Re: [HACKERS] Groups and roles

2003-06-15 Thread Christopher Kings-Lynne
1. Do we want to someday allow groups to have groups as members? (Seems reasonable to me.) I agree. I think the other requirement of roles is that they are able to own objects. ie. we need to allow groups to own objects. Chris ---(end of

Re: [HACKERS] enumeration type?

2003-06-15 Thread Christopher Kings-Lynne
There is no such thing as an enumeration type. What there is is the char type with a CHECK constraint. MySQL made up ENUMs out of whole cloth...they should copy our way, not us theirs... Chris - Original Message - From: Andrew Dunstan [EMAIL PROTECTED] To: PostgreSQL Hackers Mailing

Re: [HACKERS] Groups and roles

2003-06-15 Thread Christopher Kings-Lynne
Christopher Kings-Lynne [EMAIL PROTECTED] writes: I think the other requirement of roles is that they are able to own objects. ie. we need to allow groups to own objects. Hm. That seems to be another reason to unify usesysid and grosysid into a single unique something-id. Which probably

Re: [HACKERS] Broken RR?

2003-06-05 Thread Christopher Kings-Lynne
T1: begin; T1: select * from table; (notice the row with id = X) T2: begin; T2: delete from table where id = X; T1: select * from table; (notice the row with id = X suddenly is gone) You'll need to SELECT ... FOR UPDATE to lock the row, or use the SERIALIZABLE transaction more I

Re: [HACKERS] Problems with renaming a column

2003-06-05 Thread Christopher Kings-Lynne
Which ones are missing, and should we really be looking at creating a pg_definition_schema instead? Missing: Database, schema, table, domain, cast, conversion, function... Maybe a definition schema might be better.dunno...it would need to use the pg_get_*def functions anyway methinks.

[HACKERS] pg_database encoding again

2003-06-02 Thread Christopher Kings-Lynne
Hi Guys, I really need a solution to this one :( What is the encoding of the database names in the pg_database table? As far as I can tell, each row is saved in the encoding of the database from which it is created? In my application, the actual names change from gobbledygook to proper

Re: [HACKERS] pg_database encoding again

2003-06-02 Thread Christopher Kings-Lynne
That sounds about right. If you're using databases of different encodings in the same installation, it would probably be wise to restrict yourself to the intersection of those encodings when choosing database names. Bummer. So there's no one encoding I can set it to :( Actually, since the

Re: [HACKERS] Help needed in testing my code.

2003-05-28 Thread Christopher Kings-Lynne
Hi, This is a much better way than printf: elog(NOTICE, this is my test: %s, string); Chris - Original Message - From: Srikanth M [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 3:08 PM Subject: [HACKERS] Help needed in testing my code. Dear Sir, I want

Re: [HACKERS] [PATCHES] Sequence usage patch

2003-05-27 Thread Christopher Kings-Lynne
(Moved to -hackers) Rod Taylor [EMAIL PROTECTED] writes: Are you ok with the DB2 and draft-spec syntax of NEXT VALUE FOR (where value is not a reserved word)? Or should I hold onto that until the spec has gone through the final draft / release? By that time we'll have done the

Re: [HACKERS] SIGSEGV on cvs tip/7.3.2

2003-05-27 Thread Christopher Kings-Lynne
There's been some past speculation about putting in a function call nesting depth limit, but I haven't been able to think of any reasonable way to estimate a safe limit. The stack size limit varies a lot across different platforms, and the amount of stack space consumed per PL function call

[HACKERS] psql improvements

2003-04-06 Thread Christopher Kings-Lynne
Just wanting some feedback on those psql improvements I put through. Have people been using psql in CVS? Do you like the new format? Chris ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send

Re: [HACKERS] Detecting corrupted pages earlier

2003-04-02 Thread Christopher Kings-Lynne
What I'd really prefer to see is not a ZERO_DAMAGED_PAGES setting, but an explicit command to DESTROY PAGE n OF TABLE foo. That would make you manually admit defeat for each individual page before it'd drop data. But I don't presently have time to implement such a command (any volunteers

[HACKERS] A few questions:

2003-03-31 Thread Christopher Kings-Lynne
1. Did that fix to not allow cluster on partial and non-null indexes get backpatched? 2. How can I deliberately cause a deadlock in order to test some code? Chris ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ?

[HACKERS] deadlock problem

2003-03-31 Thread Christopher Kings-Lynne
I'm always getting deadlocks like this: [30-Mar-2003 19:19:51] PHP Fatal error: postgres7 error: [0: ERROR: deadlock detected ] in EXECUTE(INSERT INTO users_foods (user_id, date, meal_id, quantity, eaten, food_id) VALUES ('55283', '2003-04-07', '1', '1.00', 'f', '779')) in

[HACKERS] compile failure in HEAD

2003-03-27 Thread Christopher Kings-Lynne
I seem to be getting this: gmake[3]: Entering directory `/home/chriskl/pgsql-temp/src/backend/parser' bison -y -d gram.y gram.y:4260.4-4307.10: type clash (`boolean' `keyword') on default action gram.y:4307.11: parse error, unexpected :, expecting ; or | gmake[3]: *** [parse.h] Error 1 Chris

Re: [HACKERS] [GENERAL] Solution to UPDATE...INSERT problem

2003-03-27 Thread Christopher Kings-Lynne
AFAIK the except select won't see other inserts in uncommitted transactions. If those transactions are committed you will end up with the same problem. You can try it yourself, by manually doing two separate transactions in psql. Yeah, I see that now. You either have to lock the whole

Re: [HACKERS] Solution to UPDATE...INSERT problem

2003-03-26 Thread Christopher Kings-Lynne
Uh, why exactly do you think this is race-free? It looks fancy, but AFAICS the SELECT will return info that is correct as of its starting timestamp; which is not enough to guarantee that the INSERT won't conflict with another transaction doing the same thing concurrently. How about:

Re: [HACKERS] DEFAULT in set clause list

2003-03-24 Thread Christopher Kings-Lynne
set clause list (the list of SET expressions in an UPDATE statement; section 14.12) allows a contextually typed value specification on the right-hand side of SET assignments. One of the possibilities for a contextually typed value specification is DEFAULT (section 6.5). In other words, this

Re: [HACKERS] ALTER TABLE / CLUSTER ON

2003-03-21 Thread Christopher Kings-Lynne
How can it recurse, actually - there won't be an index with the same name in the subtable? On Fri, 21 Mar 2003, Alvaro Herrera wrote: On Fri, Mar 21, 2003 at 11:21:16AM +0800, Christopher Kings-Lynne wrote: Does the new ALTER TABLE / CLUSTER ON syntax support the ONLY modifier - it isn't

[HACKERS] probs with postgres

2003-03-20 Thread Christopher Kings-Lynne
I keep getting this: 2003-03-20 08:15:49 WARNING: Rel users_sessions: Uninitialized page 3195 - fixing 2003-03-20 08:15:49 WARNING: Rel users_sessions: Uninitialized page 3196 - fixing 2003-03-20 08:15:49 WARNING: Rel users_sessions: Uninitialized page 3197 - fixing 2003-03-20 08:15:49

[HACKERS] ALTER TABLE / CLUSTER ON

2003-03-20 Thread Christopher Kings-Lynne
Does the new ALTER TABLE / CLUSTER ON syntax support the ONLY modifier - it isn't documented if it is?? I guess it's not really relevant is it? Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] ALTER TABLE / CLUSTER ON

2003-03-20 Thread Christopher Kings-Lynne
I just managed to break the CLUSTER ON patch: test=# create table test (a int4 primary key, b int4 unique, c int4); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'test_pkey' for table 'test' NOTICE: CREATE TABLE / UNIQUE will create implicit index 'test_b_key' for table 'test'

[HACKERS] date index problems

2003-03-20 Thread Christopher Kings-Lynne
This behaviour I find unusual: usa=# explain analyze select user_id, plan_next from users_profiles where plan_next = '2003-01-01'; QUERY PLAN

Re: [HACKERS] date index problems

2003-03-20 Thread Christopher Kings-Lynne
Surely the planner is aware that '2003-01-01'::date - interval '1 week' is a constant??? Actually, turns out that the planner was smarter than me I think. 2003-01-01 occurs very rarely in the system, but other dates occupy 1/7th of the table, so it's not so easy to plan... Chris

Re: [HACKERS] probs with postgres

2003-03-20 Thread Christopher Kings-Lynne
Christopher Kings-Lynne [EMAIL PROTECTED] writes: I keep getting this: 2003-03-20 08:15:49 WARNING: Rel users_sessions: Uninitialized page 3195 - fixing Hmm. In 7.2.* I'd have said this was a known problem, but in 7.3.* it's not. Want to dig into it? This is what I know about the 7.2

Re: [HACKERS] [GENERAL] Extracting time from timestamp

2003-03-20 Thread Christopher Kings-Lynne
select time(abstime(timestamp 'now')) from bookings; select time(timestamp 'now') from bookings; First of all, thanks, it worked.. And What's so holy about if it is a function? It's really old 7.1 syntax, not supported from 7.2+. Basically it's because time can now have a precision.

Re: [HACKERS] MySQL at .NET conference

2003-03-19 Thread Christopher Kings-Lynne
Anyway, on to MySQL. The had a booth there. I asked their technical guy a few questions and he seemed to have a decent understanding. When I asked the question, Why would I choose MySQL over something like PostgreSQL? his response was There is one company driving MySQL. Also, when we do

[HACKERS] Little problem with tsearch

2003-03-17 Thread Christopher Kings-Lynne
Having a little problem with 7.3's tsearch: usa=# select brand,description, ftiidx from food_foods where description ilike '%frapp%'; brand | description | ftiidx

Re: [HACKERS] anyone? CREATELANG in pgsql 7.3.2 failing

2003-03-17 Thread Christopher Kings-Lynne
the command: createlang --pglib=/usr/local/pgsql/lib --dbname=apache_auth plpgsql Try just this: createlang plpgsql apache_auth Chris ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] SQL99 ARRAY support proposal

2003-03-13 Thread Christopher Kings-Lynne
implode(text[], text) returns text - join array elements into a string using given string delimiter I'm open to opinions on implode() -- I only picked implode() because that's what it is called in PHP. Any suggestions? It's also called 'join' in PHP... Chris

Re: [HACKERS] Upgrading the backend's error-message infrastructure

2003-03-13 Thread Christopher Kings-Lynne
Comments? All the error stuff sounds really neat. I volunteer for doing lots of elog changes when the time comes. Would it be possible to do a command line app? bash$ pg_error 1200D Severity: ERROR Message: Division by zero Detail: Hint: Modify statement to prevent zeros appearing in

Re: [HACKERS] Upgrading the backend's error-message infrastructure

2003-03-13 Thread Christopher Kings-Lynne
Great work, Tom! While we're effectively changing every elog call site in the backend, would it also be a good idea to adopt a standard for the format of error messages? (e.g. capitalization, grammar, etc.) I 100% agree with this - a style guide! Chris ---(end of

Re: [HACKERS] Upgrading the backend's error-message infrastructure

2003-03-13 Thread Christopher Kings-Lynne
On Thu, 2003-03-13 at 21:16, Christopher Kings-Lynne wrote: Would it be possible to do a command line app? bash$ pg_error 1200D Severity: ERROR Message: Division by zero Detail: Hint: Modify statement to prevent zeros appearing in denominators. Is there any benefit to having

Re: [HACKERS] Roadmap for FE/BE protocol redesign

2003-03-13 Thread Christopher Kings-Lynne
Obviously there is cost, but doing a lookup only on demand, has got to be cheaper in the long run than including the entire column definition in the message whether it's wanted or not? So if there are 100 fields, should we ask the backend the column name 100 times ? No, you do a single

Re: [HACKERS] Roadmap for FE/BE protocol redesign

2003-03-12 Thread Christopher Kings-Lynne
One addition I would personally like to see (it comes up in my apps code) is the ability to detect wheather the server is big endian or little endian. When using binary cursors this is necessary in order to read int data. Actually, my hope is to eliminate that business entirely by

[HACKERS] bug in setval?

2003-03-12 Thread Christopher Kings-Lynne
When I create a new table with a serial column, the first row defaults to inserting '1'. If I delete all the rows from the table and want to reset the sequence, I can't: ERROR: users_health_types_type_id_seq.setval: value 0 is out of bounds (1,9223372036854775807) How do I set the sequence to

Re: [HACKERS] Roadmap for FE/BE protocol redesign

2003-03-12 Thread Christopher Kings-Lynne
I suggested using names to Tom for this reason, but he preferred to use attrelid/attnum. Oh, and what happenned to the attlognum idea? If something that needs it is going to be implemented the column should probably be added now and used instead of attnum. Wll, it'd be nice, but I

Re: [HACKERS] SQL99 ARRAY support proposal

2003-03-10 Thread Christopher Kings-Lynne
So if I understand correctly, all instances of anyarray and anyelement in a function definition would need to be self-consistent, but the group could represent essentially any datatype with its corresponding array type. If we need more than one of these self consistent groups, we could

Re: Beta Schedule (was Re: [HACKERS] Roadmap for FE/BE protocol redesign)

2003-03-10 Thread Christopher Kings-Lynne
I had been leaning to May 1 beta, but am happy to switch to June 1 if you feel that makes an improvement in the odds of completing the Windows port. (I think it will also improve the odds of finishing this protocol stuff I've taken on...) I don't want to see it pushed further than that

Re: [HACKERS] Cursors and backwards scans and SCROLL

2003-03-09 Thread Christopher Kings-Lynne
3. Create a runtime parameter (GUC variable) which when set causes us to assume SCROLL is present even if it's not stated. Setting this to TRUE would allow existing applications to work without modification; when it's FALSE, we'd enforce the spec behavior. The trouble with this is the TRUE

Re: [HACKERS] Cursors and backwards scans and SCROLL

2003-03-09 Thread Christopher Kings-Lynne
I'd be in favour of creating whole sets of backwards-compatibility GUC's whenever we break backwards compatibility. eg. use_72_compat = yes use_73_compat = yes That sounds like a recipe for a maintenance nightmare to me. We only have to keep them for one major version, say. eg. 7.3

Re: [HACKERS] [GENERAL] problems with dropped columns

2003-03-07 Thread Christopher Kings-Lynne
There are (at least) two distinct problems involved here. One is getting plpgsql to deal correctly with rowtypes that include dropped columns. The other is getting it to react when someone alters a table whose rowtype is relied on by already-compiled functions. I'm working on this

Re: [HACKERS] bug in contrib/adddepend

2003-03-06 Thread Christopher Kings-Lynne
Was this resolved. Christopher, do you have a reproducible case? It wasn't resolved, in fact I'd forgotten about it :) I do have a reproducible case (our live server), however it seems like it's basically a case of an invalid set of triggers. I really need to manually remove some of the

Re: [HACKERS] bug in contrib/adddepend

2003-03-06 Thread Christopher Kings-Lynne
Was this resolved. Christopher, do you have a reproducible case? Oh sorry, I answered the wrong question! Yes, I resolved it by reinstalling my DBD perl stuff. I still have the problem of left over constraint triggers, but they do look like they're broken, so it's not an adddepend problem...

Re: [HACKERS] Partial index on date column

2003-03-06 Thread Christopher Kings-Lynne
The optimizer does not think that pbx_date = CURRENT_DATE satisfies the partial index's WHERE condition. I don't see any really good way around this; to improve matters there'd need to be some concept of a plan that is only good for a limited time. It's the same as the slight issue I had:

<    8   9   10   11   12   13   14   15   16   17   >