Re: [HACKERS] constraint defaults still print

2003-01-18 Thread Christopher Kings-Lynne
I vote for not showing 'NO ACTION', so long as it's the SQL standard default... Chris On Sat, 18 Jan 2003, Bruce Momjian wrote: > Remember how we made DEFERRABLE/DEFERRED not print if the constraint was > the default. Shouldn't we do the same for MATCH and ON UPDATE/ON DELETE > sections of the

Re: [HACKERS] Survey results from the PostgreSQL portal page

2003-01-19 Thread Christopher Kings-Lynne
> I wonder why people ask for better documentation. I think the > documentation is really good. Ever read Oracle stuff? *ugh*. Ever read MySQL docs - *hack*!! Chris ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an

[HACKERS] unquoted special constants

2003-01-19 Thread Christopher Kings-Lynne
Hi, Is this the complete list of constants that must not be quoted? CURRENT_TIME CURRENT_TIMESTAMP CURRENT_DATE LOCAL_TIME LOCAL_TIMESTAMP CURRENT_USER SESSION_USER USER Anything else? (Aside from functions?) Chris ---(end of broadcast)--- TIP

[HACKERS] pg_dump ordering

2003-01-20 Thread Christopher Kings-Lynne
Hey Peter, I remember a while back you were saying you were working on pg_dump object ordering? What happened with that? Did you need some help with it? I ask because my 7.2 to 7.3 upgrade is making me cry and I want to prevent future pain... Chris ---(end of broadcas

Re: [HACKERS] What goes into the security doc?

2003-01-21 Thread Christopher Kings-Lynne
Recommend always running "initdb -W" and setting all pg_hba entries to md5. Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Robert Treat > Sent: Tuesday, 21 January 2003 11:17 PM > To: Dan Langille > Cc: [EMAIL PROTECTED] > Subject: Re: [HACK

Re: [HACKERS] Call for objections: put back OIDs in CREATE TABLE AS/SELECT INTO

2003-01-21 Thread Christopher Kings-Lynne
Why don't you just include them by default, otherwise if WITHOUT OIDS appears in the CREATE TABLE command, then don't include them ? Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Tom Lane > Sent: Wednesday, 22 January 2003 4:12 AM > To: [EMA

Re: [HACKERS] Call for objections: put back OIDs in CREATE TABLE AS/SELECT INTO

2003-01-22 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > > Why don't you just include them by default, otherwise if WITHOUT OIDS > > appears in the CREATE TABLE command, then don't include them ? > > Well, adding a WITHOUT OIDS option to CREATE T

Re: [HACKERS] Cast and Schemas don't work as expected

2003-01-23 Thread Christopher Kings-Lynne
That's probably because CASTS are database-wide and are not in schemas. Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Eduardo Stern > Sent: Sunday, 19 January 2003 11:07 PM > To: [EMAIL PROTECTED] > Subject: [HACKERS] Cast and Schemas don't

Re: [HACKERS] Can we revisit the thought of PostgreSQL 7.2.4?

2003-01-26 Thread Christopher Kings-Lynne
> I think we have to accept the statement that in 7.2.X malicious SQL > queries can cause database failure, and fixing one or two of the ten > known problems doesn't change that fact. > > I don't have a problem with releasing 7.2.4 and including all the fixes, > including security fixes, but I don'

Re: [HACKERS] unquoted special constants

2003-01-26 Thread Christopher Kings-Lynne
No actually, the docs. I need to know for the phpPgAdmin project... Chris > -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED]] > Sent: Sunday, 26 January 2003 10:03 AM > To: Christopher Kings-Lynne > Cc: Hackers > Subject: Re: [HACKERS] unquoted

[HACKERS] SET NULL on NOT NULL field

2003-01-27 Thread Christopher Kings-Lynne
I just noticed you can do this: create table blah ( a not null references test on delete set null ) Should that be prevented? It shouldn't be too hard to test for really... Chris ---(end of broadcast)--- TIP 2: you can get off all lists

Re: [HACKERS] IPv6 patch

2003-01-27 Thread Christopher Kings-Lynne
> > > However, the server log messages stating an IPv6 socket was > not made is > > > only printed if the binary supports IPv6. The message seems to be a > > > compromise between those who wanted a separate IPv6 GUC/flag and those > > > who wanted it to silently fail on IPv6. > > > > I'm not sure.

Re: [HACKERS] SET NULL on NOT NULL field

2003-01-28 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > > I just noticed you can do this: > > create table blah ( > > a not null references test on delete set null > > ) > > > Should that be prevented? > > It already does. Or did you

[HACKERS] Recursive unions

2003-01-29 Thread Christopher Kings-Lynne
Hi guys, What was the result of the recursive unions thread? I remember Tom maybe saying that the Redhat guys like the DB2 (SQL99) syntax the best, however was it said that that was going to be done by Redhat for 7.4? Chris ---(end of broadcast)-

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

2003-01-29 Thread Christopher Kings-Lynne
This came to -general, it seems like a serious problem... Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Damjan Pipan > Sent: Tuesday, 28 January 2003 9:36 PM > To: [EMAIL PROTECTED] > Subject: [GENERAL] problems with dropped columns > >

Re: [HACKERS] Specifying Rowtypes

2003-01-29 Thread Christopher Kings-Lynne
No, in 7.3 you can create anonymous composite types using the CREATE TYPE command. Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Curt Sampson > Sent: Wednesday, 29 January 2003 1:45 PM > To: PostgreSQL Development > Subject: [HACKERS] Specif

[HACKERS] Linux.conf.au 2003 Report

2003-01-29 Thread Christopher Kings-Lynne
Linux.conf.au Report The Linux.conf.au is an international Linux/Open Source event that attracts lots of international speakers. Total conf attendance was around 360, maybe even 400 I think. Gavin Sherry was speaking at this particular conf, and I attended as a hobbyist. Po

Re: [HACKERS] v7.2.4 bundled ...

2003-01-29 Thread Christopher Kings-Lynne
Where do I get it from? I can't see it on any of the FTP sites... Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Marc G. Fournier > Sent: Thursday, 30 January 2003 10:00 AM > To: [EMAIL PROTECTED] > Subject: [HACKERS] v7.2.4 bundled ... > >

Re: [HACKERS] Linux.conf.au 2003 Report

2003-01-29 Thread Christopher Kings-Lynne
> Yeah. This is a pretty self-contained problem, it just needs someone > who's motivated to work on it. Mostly what we need is to understand how > we want to extend the previously-agreed-to I/O behaviors for IPv4 inet > and cidr types into the v6 domain. (Or should we back up and ask if the > in

Re: [HACKERS] v7.2.4 bundled ...

2003-01-29 Thread Christopher Kings-Lynne
All tests pass on FreeBSD/Alpha. Chris > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Magnus > Naeslund(f) > Sent: Thursday, 30 January 2003 2:13 PM > To: Marc G. Fournier; [EMAIL PROTECTED] > Subject: Re: [HACKERS] v7.2.4 bundled ... > > > Redh

Re: [HACKERS] On file locking

2003-01-30 Thread Christopher Kings-Lynne
Mmy problem is freebsd getting totally loaded at which point it sends kills to various processes. This sometime seems to end up with several actual postmasters running, and none of them working. Better existing process detection would help that greatly I'm sure. Chris > -Original Message---

Re: [HACKERS] POSIX regex performance bug in 7.3 Vs. 7.2

2003-02-01 Thread Christopher Kings-Lynne
Why on earth are you using a CVS version!?!?!?! Chris On Fri, 31 Jan 2003, wade wrote: > Hello, > We recently upgraded a project from 7.2 to 7.3.1 to make use of some of > the cool new features in 7.3. The installed version is CVS stable from > yesterday. However, we noticed a major performa

Re: [HACKERS] [OpenFTS-general] relor and relkov

2003-02-01 Thread Christopher Kings-Lynne
I'll volunteer to do some docs... Chris On Fri, 31 Jan 2003, Oleg Bartunov wrote: > Hi there, > > we've discussed with Teodor about adding ranking feature to tsearch and > seems we've found a way to do that. New version of tsearch will have > ranking supports, friendly configurability, linguist

Re: [HACKERS] Win32 port powerfail testing

2003-02-01 Thread Christopher Kings-Lynne
Try it with FreeBSD's UFS and FreeBSD 5.0's new UFS2 filesystems perhaps - or I could! Chris On 1 Feb 2003, Greg Copeland wrote: > On Fri, 2003-01-31 at 14:36, Dave Page wrote: > > > > I intend to run the tests on a Dual PIII 1GHz box, with 1Gb of Non-ECC > > RAM and a 20Gb (iirc) IDE disk. I wi

[HACKERS] 7.2 -> 7.3 incompatibility

2003-02-02 Thread Christopher Kings-Lynne
I found an example of a casting problem in our source code now that we're running 7.3: SELECT CURRENT_DATE - EXTRACT(DOW FROM CURRENT_DATE); (Get's the start of the week); This worked in 7.2, but fails in 7.3 with: ERROR: Unable to identify an operator '-' for types 'date' and 'double precision

[HACKERS] regression failure on freebsd/alpha

2003-02-03 Thread Christopher Kings-Lynne
Latest CVS, timetz and horology is failing... parallel group (13 tests): text name varchar float4 char int2 boolean oid int8 float8 bit int4 numeric boolean ... ok char ... ok name ... ok varchar ... ok text

Re: [HACKERS] regression failure on freebsd/alpha

2003-02-03 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > > Latest CVS, timetz and horology is failing... > > Would you poke into it and see why? I can, but I'm not sure what you want me to do - I'm not really familiar with it all bar th

Re: [HACKERS] [GENERAL] HELP NEEDED: Recreating DROP columns

2003-02-04 Thread Christopher Kings-Lynne
> "Damjan Pipan" <[EMAIL PROTECTED]> writes: > > I have dropped some columns and have quite some problems now > with RECTYPE > > variables types. > > My question: Can I RECREATE dropped columns? > > I checked the pg_attribute table and there I can change values > of attname, > > attstattarget and a

Re: [HACKERS] Status report: regex replacement

2003-02-05 Thread Christopher Kings-Lynne
> > set regex_flavor = advanced > > set regex_flavor = extended > > set regex_flavor = basic > [snip] > > Any suggestions about the name of the parameter? > > Actually I think 'regex_flavor' sounds fine. Not more Americanisms in our config files!! :P Chris -

Re: [HACKERS] Status report: regex replacement

2003-02-05 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > >> Actually I think 'regex_flavor' sounds fine. > > > Not more Americanisms in our config files!! :P > > You want regex_flavour? ;-) Hehe - yeah I don't really care. I have

Re: [HACKERS] PostgreSQL, NetBSD and NFS

2003-02-05 Thread Christopher Kings-Lynne
> Hmmm... does anyone remember the name of that NFS testing tool the > FreeBSD guys were using? Think it came from Apple. They used it to > find and isolate bugs in the FreeBSD code a while ago. fsx Chris ---(end of broadcast)--- TIP 1: subscr

Re: [HACKERS] 7.2 result sets and plpgsql

2003-02-06 Thread Christopher Kings-Lynne
It's a 7.3 feature only.   Chris -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of mail.luckydigital.comSent: Sunday, 2 February 2003 2:19 PMTo: [EMAIL PROTECTED]Subject: [HACKERS] 7.2 result sets and plpgsql I've had a good look and to

Re: [HACKERS] [OpenFTS-general] relor and relkov

2003-02-06 Thread Christopher Kings-Lynne
> > Nice ! We'll send you archive with new tsearch and short > > info, so you could test it and write documentation. > > I have a live DB, is it possible to install the new alpha tsearch > module w/o conflicting with the existing production one? Can you install it to a different schema? Chris

[HACKERS] log_duration

2003-02-10 Thread Christopher Kings-Lynne
Hi guys, Looking at the log_duration postgresql.conf option. How about adding an option log_duration_min which is a value in milliseconds that is the minimum time a query must run for before being logged. Basically, what I'd be interested in is "please log the SQL query and duration of all queri

[HACKERS] PostgreSQL Benchmarks

2003-02-11 Thread Christopher Kings-Lynne
Hrm. I just saw that the PHP ADODB guy just published a bunch of database benchmarks. It's fairly evident to me that benchmarking PostgreSQL on Win32 isn't really fair: http://php.weblogs.com/oracle_mysql_performance *sigh* Chris ---(end of broadcast)

Re: [pgsql-advocacy] [HACKERS] PostgreSQL Benchmarks

2003-02-11 Thread Christopher Kings-Lynne
Why don't we include a postgresql.conf.recommended along with our postgresql.conf.sample. That shouldn't be too hard. We can just jack up the shared buffers and wal buffers and everything - it doesn't matter if it's not perfect, but it will at least give people an idea of what needs to be increas

Re: [HACKERS] Changing the default configuration (was Re: [pgsql-advocacy]

2003-02-11 Thread Christopher Kings-Lynne
> >After it's all said and done, I would rather someone simply say, "it's > >beyond my skill set", and attempt to get help or walk away. That seems > >better than them being able to run it and say, "it's a dog", spreading > >word-of-mouth as such after they left PostgreSQL behind. Worse yet, > >t

[HACKERS] PostgreSQL Tuning Results

2003-02-11 Thread Christopher Kings-Lynne
Hi Everyone, I have just completed a basic set of benchmarking on our new database server. I wanted to figure out a good value for shared_buffers before we go live. We are a busy ecommerce-style website and so we probably get 10 or 20 to 1 read transactions vs. write transactions. We also don't

Re: [pgsql-advocacy] [HACKERS] PostgreSQL Tuning Results

2003-02-11 Thread Christopher Kings-Lynne
> > I am now going to leave it on 5000 and play with wal_buffers. > > Is there anything else people are interested in me trying? > > Keenly interested. Who wouldn't want to know how to optimize it? > That's the hardest guideline to find. Oops - what that sentence was supposed to say is "Is there

Re: [HACKERS] PostgreSQL Tuning Results

2003-02-11 Thread Christopher Kings-Lynne
> > Machine: > > 256MB RAM, FreeBSD 4.7, EIDE HDD, > 1 Ghz > > Seems like a small amount of memory to be memory based tests with. Perhaps, but I'm benchmarking for that machine, not for any other. The results have to include the 256MB spec. Also, the peak was 25MB of SHM, which still leave 231MB

Re: [HACKERS] location of the configuration files

2003-02-12 Thread Christopher Kings-Lynne
> Okay, here's one: most Unix systems store all of the configuration > files in a well known directory: /etc. These days it's a hierarchy of > directories with /etc as the root of the hierarchy. When an > administrator is looking for configuration files, the first place he's > going to look is in

Re: [HACKERS] Changing the default configuration

2003-02-12 Thread Christopher Kings-Lynne
> Had this happen at a previous employer, and it definitely is bad. I > believe we had to do a reboot to clear it up. And we saw the problem a > couple of times since the sys admin wasn't able to deduce what had > happened the first time we got it. IIRC the problem hit somewhere around > 150 connec

Re: [HACKERS] Changing the default configuration (was Re:

2003-02-12 Thread Christopher Kings-Lynne
> Seriously, I know Linux can change these on the fly, and I'm pretty sure > Solaris can too. I haven't played with BSD for a while so can't speak > about that. Anyone else know? You cannot change SHMMAX on the fly on FreeBSD. Chris ---(end of broadcast)-

[HACKERS] horology and time failures on freebsd/alpha

2003-02-12 Thread Christopher Kings-Lynne
I'm still getting failure, but it gets weirder: regression=# drop table timetz_tbl; DROP TABLE regression=# CREATE TABLE TIMETZ_TBL (f1 time(2) with time zone); INSERT INTO TIMETZ_TBL VALUES ('00:01 PDT'); CREATE TABLE regression=# regression=# INSERT INTO TIMETZ_TBL VALUES ('00:01 PDT'); INSERT

Re: [HACKERS] horology and time failures on freebsd/alpha

2003-02-12 Thread Christopher Kings-Lynne
Oops - just to clarify I accidentally copied too many INSERTs into the email. The result of the first SELECT is correct compared to the INSERTs that I did. I copied the INSERTs and CREATE TABLE as-is from timetz.sql Chris > -Original Message- > From: Christopher Kings-Lynne [

[HACKERS] More benchmarking of wal_buffers

2003-02-12 Thread Christopher Kings-Lynne
Hi Everyone, I've just spent the last day and a half trying to benchmark our new database installation to find a good value for wal_buffers. The quick answer - there isn't, just leave it on the default of 8. The numbers just swing up and down so much it's impossible to say that one setting is be

Re: [HACKERS] More benchmarking of wal_buffers

2003-02-13 Thread Christopher Kings-Lynne
> I don't think this is based on a useful test for wal_buffers. The > wal_buffers setting only has to be large enough for the maximum amount > of WAL log data that your system emits between commits, because a commit > (from anyone) is going to flush the WAL data to disk (for everyone). > So a benc

Re: [HACKERS] More benchmarking of wal_buffers

2003-02-13 Thread Christopher Kings-Lynne
> I don't think this is based on a useful test for wal_buffers. The > wal_buffers setting only has to be large enough for the maximum amount > of WAL log data that your system emits between commits, because a commit > (from anyone) is going to flush the WAL data to disk (for everyone). > So a benc

Re: [PERFORM] [HACKERS] More benchmarking of wal_buffers

2003-02-13 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > > Here's a question then - what is the _drawback_ to having 1024 > wal_buffers > > as opposed to 8? > > Waste of RAM? You'd be better off leaving that 8 meg available for use > as genera

[HACKERS] Offering tuned config files

2003-02-13 Thread Christopher Kings-Lynne
OK, Here's a stab at some extra conf files. Feel free to shoot them down. If we can come up with at least _some_ alternative files that we can put somewhere for them to see when postgres is installed, then at least people can see what variables will affect what... I didn't see the point of a 'w

Re: [HACKERS] Offering tuned config files

2003-02-15 Thread Christopher Kings-Lynne
No, not really - I can do some more testing with pgbench to see what happens though...I'll do it on monday Chris On Fri, 14 Feb 2003, Tom Lane wrote: > Manfred Koizar <[EMAIL PROTECTED]> writes: > > In postgresql.conf.sample-writeheavy you have: > > commit_delay = 1 > > Is this still nee

Re: [HACKERS] stats_command_string default?

2003-02-15 Thread Christopher Kings-Lynne
You can just turn it on in one second in your postgresql.conf file... Chris On Fri, 14 Feb 2003, Kevin Brown wrote: > > One of the functions of the DBA is to monitor what people are doing to > the database. My experience is that "ps" is often sorely lacking in > this regard: its output is somew

Re: [HACKERS] Changing the default configuration (was Re: [pgsql-advocacy]

2003-02-11 Thread Christopher Kings-Lynne
> >> We could retarget to try to stay under SHMMAX=4M, which I think is > >> the next boundary that's significant in terms of real-world platforms > >> (isn't that the default SHMMAX on some BSDen?). That would allow us > >> 350 or so shared_buffers, which is better, but still not really a > >> se

Re: [HACKERS] Changing the default configuration (was Re: [pgsql-advocacy]

2003-02-11 Thread Christopher Kings-Lynne
> A separate line of investigation is "what is the lowest common > denominator nowadays?" I think we've established that SHMMAX=1M > is obsolete, but what replaces it as the next LCD? 4M seems to be > correct for some BSD flavors, and I can confirm that that's the > current default for Mac OS X -

Re: [HACKERS] Incremental backup

2003-02-12 Thread Christopher Kings-Lynne
> Someone at Red Hat is working on point-in-time recovery, also known as > incremental backups. It will be in 7.4. Does that mean that the poor guy/gal is implementing redo for all the index types? Chris ---(end of broadcast)--- TIP 3: if posting

Re: [HACKERS] log_duration

2003-02-12 Thread Christopher Kings-Lynne
> Tom is right here. log_duration _just_ prints the duration, so we would > need to basically create a merged param that does log_duration and > log_statement and have it activate only if the statement takes more than > X milliseconds, something like log_long_statement, or something like > that. >

Re: [HACKERS] log_duration

2003-02-12 Thread Christopher Kings-Lynne
> Someone asked about this at FOSDEM. The only way I know to do it is look > in the pgsql_temp directory, but they disappear pretty quickly. Folks, > do we need something to report sort file usage? How about a new GUC variable: log_sort_tempfiles And in the code that creates the temp file, if th

Re: [HACKERS] Linux.conf.au 2003 Report

2003-02-15 Thread Christopher Kings-Lynne
Australia next year? > > ----------- > > Christopher Kings-Lynne wrote: > > Linux.conf.au Report > > > > > > The Linux.conf.au is an international Linux/Open Source event that a

Re: [HACKERS] stats_command_string default?

2003-02-16 Thread Christopher Kings-Lynne
> Averaging over three trials on an unloaded system, I got 21.0 seconds > with stats_command_string off, 27.7 with it on, or about 32% overhead. > > My conclusion is that stats_command_string overhead is non-negligible > for simple commands. So I stand by my previous opinion that it should > not b

[HACKERS] Hard problem with concurrency

2003-02-16 Thread Christopher Kings-Lynne
OK, this is the problem: I want to write a bit of SQL that if a row exists in a table, then update it, otherwise it will update it. Problem is, there is a very high chance of simultaneous execute of this query on the same row (the rows have a unique index). So, strategy one: begin; update row;

Re: [HACKERS] Hard problem with concurrency

2003-02-16 Thread Christopher Kings-Lynne
> Do the update, then try to insert if the update found nothing, and put > a retry loop around the whole transaction in case you fail because of > concurrent inserts. > > Realistically you will need a retry loop in all but the most trivial > cases anyway --- certainly so if you want to use serializ

Re: [HACKERS] Hard problem with concurrency

2003-02-16 Thread Christopher Kings-Lynne
> If you don't have a primary key already, create a unique index on the > combination you want to be unique. Then: > > . Try to insert the record > . If you get a duplicate key error > then do update instead > > No possibilities of duplicate records due to race conditions. If two people > try to

Re: [HACKERS] Questions about indexes?

2003-02-17 Thread Christopher Kings-Lynne
> I ended up with few only indexes on the operations table, because the > processes that fill it up do minimal lookups to see if data is already in the > table, if not do inserts. Then at regular intervals, the table is cleaned up - > that is, a process to remove the duplicate is run. This unfortun

Re: [HACKERS] IpcSemaphoreKill: ...) failed: Invalid argument

2003-02-17 Thread Christopher Kings-Lynne
> This is a fairly spectacular failure :-(. As far as I can see from the > semctl and shmctl man pages, the only plausible reason for EINVAL is > that something had deleted the semaphores and shared memory out from > under Postgres. I do not believe that Postgres itself could have done > that ---

Re: [HACKERS] pg environment? metadata?

2003-02-18 Thread Christopher Kings-Lynne
> On Tue, Feb 18, 2003 at 13:13:30 +0100, > Christoph Haller <[EMAIL PROTECTED]> wrote: > > > > > > > > Moreover, are there any ANSI standards for this kind of thing? Or > > each one > > > > to his own? > > Based on discussions in the past that I have loosely followed, I believe > there is some k

[HACKERS] deleting dependencies

2003-02-19 Thread Christopher Kings-Lynne
Hi, I've been looking at the dependency API and I notice that there is a function to delete ALL dependencies on an object and a function to add a dependency, but there doesn't seem to be any way of deleting a dependency between two _particular_ objects. Is there any other way of doing this other

Re: [HACKERS] deleting dependencies

2003-02-20 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > > I've been looking at the dependency API and I notice that there is a > > function to delete ALL dependencies on an object and a function to add a > > dependency, but there doesn't seem to

[HACKERS] contrib/adddepend

2003-02-20 Thread Christopher Kings-Lynne
When I run adddepend on my FreeBSD system, I get this: > /usr/local/bin/adddepend -d usa install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 . /usr/libdata/perl/5.00503/mach /usr/libdata/pe

Re: [HACKERS] contrib/adddepend

2003-02-20 Thread Christopher Kings-Lynne
*sigh* My system was stuffed. Fixed now. Please disregard this post - sorry for spamming the list... Chris - Original Message - From: "Christopher Kings-Lynne" <[EMAIL PROTECTED]> To: "Hackers" <[EMAIL PROTECTED]> Sent: Friday, February 21, 2003 10:

[HACKERS] bug in contrib/adddepend

2003-02-20 Thread Christopher Kings-Lynne
Hi, I just noticed a bug in adddepend: The below commands will upgrade the foreign key style. Shall I execute them? DROP TRIGGER "RI_ConstraintTrigger_1105102" ON news_authors; DROP TRIGGER "RI_ConstraintTrigger_1105103" ON news_authors; DROP TRIGGER "RI_ConstraintTrigge

[HACKERS] Loss of cluster status

2003-02-21 Thread Christopher Kings-Lynne
Hi, The new cluster is cool in that : 1. It works 2. It saves the indisclustered status However, after a dump and restore, this indisclustered status will be lost. Would it be an idea to issue a CLUSTER command after the CREATE TABLE statement in SQL dumps for tables that have an indisclustered

Re: [HACKERS] Loss of cluster status

2003-02-21 Thread Christopher Kings-Lynne
> The new cluster is cool in that : > > 1. It works > 2. It saves the indisclustered status > > However, after a dump and restore, this indisclustered status will be lost. > Would it be an idea to issue a CLUSTER command after the CREATE TABLE > statement in SQL dumps for tables that have an indisc

Re: [HACKERS] request for sql3 compliance for the update command

2003-02-19 Thread Christopher Kings-Lynne
> While I don't see the syntax of: > > update table set (col...) = ( val...) > > as valuable compared to separate col=val assignments, I do see a value > in allowing subqueries in such assignments: > > update table set (col...) = ( select val ..) > > Without it, you have to do separate subquery

Re: [HACKERS] request for sql3 compliance for the update command

2003-02-19 Thread Christopher Kings-Lynne
> BTW, looking at the SQL99 standard, I see that you can do > > UPDATE table SET ROW = foo WHERE ... > > where foo is supposed to yield a row of the same rowtype as table > --- I didn't dig through the spec in detail, but I imagine foo can > be a sub-select. I don't care a whole lot for that, t

Re: [HACKERS] [PATCHES] Non-colliding auto generated names

2003-02-20 Thread Christopher Kings-Lynne
OK, I have discovered a problem with my auto-naming patch. It's do to with dumping serial columns with pg_dump, eg: -- -- TOC entry 2 (OID 1004551) -- Name: users_users; Type: TABLE; Schema: public; Owner: chriskl -- CREATE TABLE users_users ( userid serial NOT NULL, firstname character

Re: [HACKERS] Hard problem with concurrency

2003-02-18 Thread Christopher Kings-Lynne
> > REPLACE INTO anyone? ;) > > The upcoming SQL 200x standard includes a MERGE command that appears to > fulfill that purpose. Is there somewhere that I can read that spec? Or can you just post the MERGE syntax for us? *sigh* It's just like a standard to come up with a totally new syntax for a

Re: [HACKERS] Loss of cluster status

2003-02-23 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > >> Would it be an idea to issue a CLUSTER command after the CREATE TABLE > >> statement in SQL dumps for tables that have an indisclustered index? > > Yeah... > A CLUSTER command issued just

Re: [HACKERS] bug in contrib/adddepend

2003-02-23 Thread Christopher Kings-Lynne
> > See how it's HTMLised the foreign key name? I cannot find how $keyname in > > the code is being html escaped. Perhaps it's some weird taint mode thing? > > Not to mention when it's , the code is setup to ignore the > constraint name entirely (line 267). I worked around it by checking to see

Re: [HACKERS] Loss of cluster status

2003-02-23 Thread Christopher Kings-Lynne
> No; directly manipulating the system catalogs in dump scripts is a > crummy idea, because (a) it only works if you're superuser, and (b) > it creates a nasty backwards-compatibility problem if we change the > catalogs involved. > > A CLUSTER command issued just after table creation, while it's st

[HACKERS] quick question

2003-02-25 Thread Christopher Kings-Lynne
Hi Guys, Were the pgattribute.attstorage and pg_type.typstorage fields available in 7.1? Also, if they existed in 7.2, but the ALTER TABLE/SET STORAGE command didn't exist, should I still dump it if they are dumping a 7.2 database? Chris ---(end of broadcast)--

[HACKERS] CHECK constraints in pg_dump

2003-02-25 Thread Christopher Kings-Lynne
Hi guys, I notice that we're still dumping CHECK constraints as part of the CREATE TABLE statement, and not as an ALTER TABLE statement after the data has been loaded. Should we move it to after the data for speed purposes, like we have with all other constraints? Chris --

Re: [HACKERS] CHECK constraints in pg_dump

2003-02-25 Thread Christopher Kings-Lynne
> "Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > > I notice that we're still dumping CHECK constraints as part of the CREATE > > TABLE statement, and not as an ALTER TABLE statement after the data has been > > loaded. > > > Should we mo

Re: [HACKERS] analyze after a database restore?

2003-02-27 Thread Christopher Kings-Lynne
> Although I suggested doing a single unconditional ANALYZE at the end > of the script, second thought leads me to think the per-table ANALYZE > (probably issued right after the table's data-load step) might be > better. That way you'd not have any side-effects on already-existing > tables in the

Re: [HACKERS] Brain dump: btree collapsing

2003-02-27 Thread Christopher Kings-Lynne
> Two things I regret: one is being unable to see the changes as patches > the way you applied them, to get a sense of how the code evolved. > Unfortunately the interface to CVS via web does not allow me to see it, > or I don't know how to use it. It's not that important, however, > because I was

Re: [HACKERS] Brain dump: btree collapsing

2003-02-27 Thread Christopher Kings-Lynne
> Two things I regret: one is being unable to see the changes as patches > the way you applied them, to get a sense of how the code evolved. > Unfortunately the interface to CVS via web does not allow me to see it, > or I don't know how to use it. It's not that important, however, > because I was

Re: [HACKERS] CLUSTER loses nulls (was Re: [ADMIN] Still a bug in

2003-03-02 Thread Christopher Kings-Lynne
> * Make CLUSTER error out if the target index is not of an 'amindexnulls' > index AM. This would amount to restricting CLUSTER to b-trees, which is > annoying. I think this solution is fine - we just need to fix GiST to index nulls one day :) > It occurs to me also that the same kind of pitfall

Re: [HACKERS] [PATCHES] ALTER SEQUENCE

2003-03-03 Thread Christopher Kings-Lynne
Hey, with this new ALTER SEQUENCE patch, how about this for an idea: I submitted a patch to always generate non-colliding index and sequence names. Seemed like an excellent idea. However, 7.3 dumps tables like this: CREATE TABLE blah a SERIAL ); SELECT SETVAL('blah_a_seq', 10); Sort of th

Re: [HACKERS] problem importing languages in CVS tip

2003-03-03 Thread Christopher Kings-Lynne
Hi Brandon, > Are we supposed to report bugs with the CVS tip of PostgreSQL, or are > we to assume that the developers are well aware of problems there and > are already working on them? You're supposed to report them! If we were aware of the problems, we'd fix them ;) Cheers, Chris ---

Re: [HACKERS] Best setup for RAM drive

2003-03-05 Thread Christopher Kings-Lynne
Why not just run PostgreSQL like everyone else does (from a hard drive) and simply give it heaps of buffers - let PostgreSQL manage its RAM itself? Unless you have your xlog on physical storage, you are asking for trouble. Actually, unless you have all your database in physical storage, you are as

[HACKERS] pgsql.com website store

2003-03-05 Thread Christopher Kings-Lynne
Hi, I tried to go buy a shirt off the pgsql.com site, but when it comes to shipping it just has: international shipping zone 1 international shipping zone 2 international shipping zone 3 international shipping zone 4 international shipping zone 5 How am I supposed to know which zone Australia is

Re: [HACKERS] ETA for PostgreSQL 7.3.3?

2003-03-05 Thread Christopher Kings-Lynne
> Feels like we've been isolating a whole bunch of bugs in 7.3.2 recently, > some of which are causing crashes out in the real world. > > Wondering when we feel it'd be good to start assembling a 7.3.3? I'm > thinking in about two weeks or so, to give a bit more time to catch bugs > and stuff. I

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 trigg

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 ha

[HACKERS] Order by optimisations?

2005-07-13 Thread Christopher Kings-Lynne
Hi, Does PostgreSQL do the following optimisation: SELECT * FROM diary WHERE date = '2005-05-01' ORDER BY date; or in fact even better (for my situation) SELECT * FROM diary WHERE date BETWEEN '2005-05-01' AND '2005-05-01' ORDER BY date; Does it know that the input to the sort routine is al

Re: [HACKERS] Order by optimisations?

2005-07-14 Thread Christopher Kings-Lynne
Hannu Krosing wrote: On K, 2005-07-13 at 16:08 +0800, Christopher Kings-Lynne wrote: Hi, Does PostgreSQL do the following optimisation: SELECT * FROM diary WHERE date = '2005-05-01' ORDER BY date; or in fact even better (for my situation) SELECT * FROM diary WHERE date BETWEE

Re: [HACKERS] Order by optimisations?

2005-07-14 Thread Christopher Kings-Lynne
I assume that this is program generated SQL, as I hope a human would know better than to write this. In which case, isn't the answer to improve the generator rather than expect postgres to make up for its defficiencies? Well, the issue in my case is we have user food diaries. Usually, 99.%

Re: [HACKERS] Order by optimisations?

2005-07-14 Thread Christopher Kings-Lynne
Does it know that the input to the sort routine is already sorted and hence is a no-op? Yes No, but in most cases this will use an index and hence will assume that the index is responsible for ordering. OK, so what's going on here? usa=> explain select * from users_myfoods_map where user

Re: [HACKERS] Simplifying identification of temporary tables

2005-07-14 Thread Christopher Kings-Lynne
Seems worthwhile to me --- any objections? Any better ideas about a name? pg_session_temp_namespace() ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining col

Re: [HACKERS] Order by optimisations?

2005-07-14 Thread Christopher Kings-Lynne
Well, date evidently isn't the high-order key of this index. But why exactly are you worried about a sort of 2 rows? Aha that's nailed it: usa=> explain select * from users_myfoods_map where user_id=1 and date between '2003-11-03' and '2003-11-03' order by user_id, date;

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