Re: [HACKERS] [pgadmin-hackers] Client-side password encryption

2005-12-22 Thread Christopher Kings-Lynne
Where are we on this? In general I agree with Tom, but I have no time to do the work. Unless someone has an immediate implementation, I suggest that pro tem we add pg_md5_encrypt to src/interfaces/libpq/exports.txt, which is the minimum needed to unbreak Windows builds, while this gets sorted o

Re: [HACKERS] [pgadmin-hackers] Client-side password encryption

2005-12-21 Thread Christopher Kings-Lynne
IIRC the whole point of this exercise was to avoid passing the password to the server in the first place. Unless you are talking about a PHP md5() password of course ... ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ig

Re: [HACKERS] Improving planning of outer joins

2005-12-21 Thread Christopher Kings-Lynne
I'm not sure whether we'd need any additional planner knobs to control this. I think that the existing join_collapse_limit GUC variable should continue to exist, but its effect on left/right joins will be the same as for inner joins. If anyone wants to force join order for outer joins more than

Re: [HACKERS] [pgadmin-hackers] Client-side password encryption

2005-12-19 Thread Christopher Kings-Lynne
I've already implemented this in phpPgAdmin trivially using the md5() function. I can't be bothered using a C library function :D IIRC the whole point of this exercise was to avoid passing the password to the server in the first place. Unless you are talking about a PHP md5() password of cours

Re: [HACKERS] [pgadmin-hackers] Client-side password encryption

2005-12-19 Thread Christopher Kings-Lynne
pher Kings-Lynne Cc: Peter Eisentraut; pgsql-hackers@postgresql.org; Andreas Pflug; Dave Page Subject: Re: [HACKERS] [pgadmin-hackers] Client-side password encryption Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: So it appears that pg_md5_encrypt is not officially exported fro

Re: [HACKERS] [pgadmin-hackers] Client-side password encryption

2005-12-18 Thread Christopher Kings-Lynne
So it appears that pg_md5_encrypt is not officially exported from libpq. Does anyone see a problem with adding it to the export list and the header file? Is it different to normal md5? How is this helpful to the phpPgAdmin project? Chris ---(end of broadcast)-

Re: [HACKERS] Improving planning of outer joins

2005-12-15 Thread Christopher Kings-Lynne
I'm not sure whether we'd need any additional planner knobs to control this. I think that the existing join_collapse_limit GUC variable should continue to exist, but its effect on left/right joins will be the same as for inner joins. If anyone wants to force join order for outer joins more than

Re: [HACKERS] Improving planning of outer joins

2005-12-15 Thread Christopher Kings-Lynne
I'm not sure whether we'd need any additional planner knobs to control this. I think that the existing join_collapse_limit GUC variable should continue to exist, but its effect on left/right joins will be the same as for inner joins. If anyone wants to force join order for outer joins more than

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Christopher Kings-Lynne
If it was me I'd just copy the pg_dump way of doing things... To the extent possible, I'd like to preserve the exact functionality (or lack thereof) of previous versions. Would this be possible that way? Don't see it'd be too hard. All pg_dump basically does is this: if (version <= 7.3) {

Re: [HACKERS] Immodest Proposal: pg_catalog.pg_ddl

2005-12-14 Thread Christopher Kings-Lynne
There were quite some proposals about additional triggers (on connect/disconnnect) around, I wonder if some kind of schema/database-level trigger could be used for DDL logging. Or, "global triggers" where you can have a trigger that is executed upon ANY DML or DDL... Chris

Re: [HACKERS] Immodest Proposal: pg_catalog.pg_ddl

2005-12-14 Thread Christopher Kings-Lynne
What I would like to see is some builtin functions that give me the table's DDL, just as pg_dump does. Extra nice would be complementary functions that also give me skeleton select statements for each table or view. Yeah, what I first thought David was proposing was a consolidated view simila

Re: [HACKERS] psql and COPY BINARY

2005-12-14 Thread Christopher Kings-Lynne
Examining why psql won't do sensible stuff with COPY BINARY, I realized that psql still uses PQgetline, which is marked obsolete since 7.4. Is this intentional or just a "never reviewed because it works"? There wasn't any obvious bang for the buck in rewriting it. The obvious one (and why I s

Re: [HACKERS] psql and COPY BINARY

2005-12-14 Thread Christopher Kings-Lynne
I submitted a patch a while back to change that but I withdrew it because I wasn't 100% confident I'd done it right. Here is the link to it: http://archives.postgresql.org/pgsql-patches/2005-03/msg00242.php It's probably 99% there - just a bit of checking. Chris Andreas Pflug wrote: Examinin

Re: [HACKERS] Refactoring psql for backward-compatibility

2005-12-14 Thread Christopher Kings-Lynne
Neil Conway suggested something like a get_function_list(), which I presume would be called on connect, and would be version-aware. Does this seem like a good idea? If so, what might an implementation look like? I know C isn't all that great for function overloading, so do we want to keep all t

Re: [HACKERS] Cost-based optimizers

2005-12-12 Thread Christopher Kings-Lynne
I saw it in print; the only thing that seemed interesting about it was the recommendation that query optimization be biased towards the notion of "stable plans," query plans that may not be the most "aggressively fast," but which don't fall apart into hideous performance if the estimates are a lit

Re: [HACKERS] Different length lines in COPY CSV

2005-12-12 Thread Christopher Kings-Lynne
Anyway, that's history now. Where would you want this file conversion utility? bin? contrib? pgfoundry? How about a full SQL*Loader clone? :D ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[HACKERS] Cost-based optimizers

2005-12-12 Thread Christopher Kings-Lynne
A vaguely interesting interview with IBM and MS guys about cost-based optimizers. http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=297 Chris ---(end of broadcast)--- TIP 6: explain analyze is your friend

[HACKERS] Different length lines in COPY CSV

2005-12-11 Thread Christopher Kings-Lynne
Hi, Is there any way to force COPY to accept that there will be lines of different length in a data file? I have a rather large file I'm trying to import. It's in CSV format, however, they leave off trailing empty columns on most lines. Any way to do this? Should it be supported by CSV mo

Re: [HACKERS] int to inet conversion [or Re: inet to bigint?]

2005-12-09 Thread Christopher Kings-Lynne
Hi Kai, There are some rather simplistic functions to convert 32bit inet values to and from bigints in the mysql compatibility project: http://pgfoundry.org/projects/mysqlcompat/ In the miscellaneous.sql. Chris Kai wrote: Hello All, I've been pondering the discussed subject a few times, a

Re: [HACKERS] Another encoding issue

2005-12-08 Thread Christopher Kings-Lynne
If we're bringing up odd encoding issues, why not talk about the mystery encoding of the shared catalogs? :) Basically depending on which database you're logged into when you alter a catalog will affect what encoding the new object appears as in the shared catalog. This for one makes it impo

[HACKERS] HOOKS for Synchronous Replication?

2005-12-07 Thread Christopher Kings-Lynne
Anyone remember this patch? http://gorda.di.uminho.pt/community/pgsqlhooks/ The discussion seems to be pretty minimal: http://archives.postgresql.org/pgsql-hackers/2005-06/msg00859.php Does anyone see a need to investigate it further? Chris ---(end of broadcast)-

Re: [HACKERS] Oddity with extract microseconds?

2005-12-06 Thread Christopher Kings-Lynne
mysql> SELECT EXTRACT(MICROSECOND FROM '2003-01-02 10:30:01.00123'); +---+ | EXTRACT(MICROSECOND FROM '2003-01-02 10:30:01.00123') | +---+ | 1230

Re: [HACKERS] Oddity with extract microseconds?

2005-12-06 Thread Christopher Kings-Lynne
Looks like MySQL doesn't allow a space before the open parenthesis (there isn't one in the manual's example): mysql> SELECT EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.00123'); +---+ | EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.00123') | +-

Re: [HACKERS] Oddity with extract microseconds?

2005-12-06 Thread Christopher Kings-Lynne
MySQL 5.0.16 gives an error: mysql> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:00.00123'); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM '2003-01-02 10:30:00.00123')' at line

Re: [HACKERS] Optimizer oddness, possibly compounded in 8.1

2005-12-06 Thread Christopher Kings-Lynne
One of the easier cases would be non-overlapping (exclusive) constraints on union subtables on the joined column. This could serve as a "partition key", or in case of many nonoverlapping columns (ex.: table is partitioned by date and region), as many partition keys. Yes, thats my planned direc

Re: [HACKERS] Oddity with extract microseconds?

2005-12-06 Thread Christopher Kings-Lynne
Why aren't 'minutes' considered too? Because they aren't 'seconds'. Well, seconds aren't microseconds either. Yeah, they are: it's just one field. The other way of looking at it (that everything is seconds) is served by "extract(epoch)". Well, it's different in MySQL unfortunately - what doe

Re: [HACKERS] Oddity with extract microseconds?

2005-12-06 Thread Christopher Kings-Lynne
OK, AndrewSN just pointed out that it's "documented" to work like that... ...still seems bizarre... Chris Christopher Kings-Lynne wrote: Does anyone else find this odd: mysql=# select extract(microseconds from timestamp '2005-01-01 00:00:00.123'); date_part

[HACKERS] Oddity with extract microseconds?

2005-12-06 Thread Christopher Kings-Lynne
Does anyone else find this odd: mysql=# select extract(microseconds from timestamp '2005-01-01 00:00:00.123'); date_part --- 123000 (1 row) mysql=# select extract(microseconds from timestamp '2005-01-01 00:00:01.123'); date_part --- 1123000 (1 row) No other extracts inc

Re: [HACKERS] Bug in pg_dump -c with casts

2005-12-06 Thread Christopher Kings-Lynne
Actually, scratch that - I'm wrong... It appeared separately from the other DROP commands... Chris Christopher Kings-Lynne wrote: Hi, Playing around with this MySQL compatibility library, I noticed that pg_dump -c does not emit DROP commands for casts. Seems like a bug...?

Re: [HACKERS] inet to bigint?

2005-12-06 Thread Christopher Kings-Lynne
Sheesh, arbitrary restrictions ;-) Something like this then: CREATE FUNCTION inet2num(inet) RETURNS numeric AS $$ DECLARE a text[] := string_to_array(host($1), '.'); BEGIN RETURN a[1]::numeric * 16777216 + a[2]::numeric * 65536 + a[3]::numeric * 256 +

Re: [HACKERS] inet to bigint?

2005-12-05 Thread Christopher Kings-Lynne
PL/SQL or PL/PGSQL... Chris Michael Fuhr wrote: On Tue, Dec 06, 2005 at 03:31:59PM +0800, Christopher Kings-Lynne wrote: OK, I give up - how do I convert an INET type to a NUMERIC representation of its network address? How about: CREATE FUNCTION inet2num(inet) RETURNS numeric AS $$ use

[HACKERS] inet to bigint?

2005-12-05 Thread Christopher Kings-Lynne
OK, I give up - how do I convert an INET type to a NUMERIC representation of its network address? Is there a quick and easy way? Chris ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[HACKERS] Bug in pg_dump -c with casts

2005-12-05 Thread Christopher Kings-Lynne
Hi, Playing around with this MySQL compatibility library, I noticed that pg_dump -c does not emit DROP commands for casts. Seems like a bug...? Chris ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [HACKERS] Replication on the backend

2005-12-05 Thread Christopher Kings-Lynne
replication (master/slave, multi-master, etc) implemented inside postgres...I would like to know what has been make in this area. It's not in the backend, check out things like Slony (www.slony.info) and various other commercial solutions. Chris ---(end of broadcast)

Re: [HACKERS] SERIAL type feature request

2005-12-04 Thread Christopher Kings-Lynne
I think nobody would object to implementing support for the SQL2003 syntax. Most of that would be providing all the values that will get forwarded into the internal sequence generation during CREATE TABLE. Someone also pointed out on IRC the other day that Oracle and DB2 list 'identity' as the

Re: [HACKERS] Reducing relation locking overhead

2005-12-01 Thread Christopher Kings-Lynne
4. The only reason we need to take relation-level locks on indexes at all is to make the world safe for REINDEX being done concurrently with read-only accesses to the table (that don't use the index being reindexed). If we went back to requiring exclusive lock for reindex we could forget all abou

[HACKERS] Docs misspelling

2005-12-01 Thread Christopher Kings-Lynne
36.7.3.5. FOR (integer variant) In the 8.1 docs. "Label" has been spelt "Labal". Chris ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[HACKERS] Problem with COPY CSV

2005-11-30 Thread Christopher Kings-Lynne
Attached is a small test extract from the USDA nutrient database. The problem is that the script won't load the COPY data correctly. This is with CVS HEAD (and 8.1). It is the 4th column in the table that gives the problem (nutr_no integer). Each of the 3 COPY rows has a different way of sp

Re: [HACKERS] BIN()

2005-11-29 Thread Christopher Kings-Lynne
Tom Lane wrote: Christopher Kings-Lynne <[EMAIL PROTECTED]> writes: test=> SELECT ltrim(textin(bit_out(12::bit(64))), '0'); ltrim --- 1100 (1 row) Swet. Good old i/o functions. Who needs the I/O functions? Just cast int to bit(n). Then how do you remov

Re: [HACKERS] BIN()

2005-11-29 Thread Christopher Kings-Lynne
Or something like this in SQL or PL/pgSQL: test=> SELECT ltrim(textin(bit_out(12::bit(64))), '0'); ltrim --- 1100 (1 row) Swet. Good old i/o functions. Chris ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [HACKERS] BIN()

2005-11-29 Thread Christopher Kings-Lynne
create or replace function bin(bigint) returns text language plperl as $$ my $arg = $_[0] + 0; my $res = ""; while($arg) { $res = ($arg % 2) . $res; $arg >>= 1; } return $res; $$; Any reason not to use sprintf("%b", $_[0])? All very well and good, but it has to be PL/SQL preferably or

[HACKERS] BIN()

2005-11-29 Thread Christopher Kings-Lynne
Hi guys, How would I go about implementing MySQL's BIN() function easily in PL/SQL. mysql> SELECT BIN(12); -> '1100' Basically it converts a bigint to a string containing 1's and 0's. I've tried messing about with bit() types, but those types lack casts to text, etc. And they are lef

Re: [HACKERS] ice-broker scan thread

2005-11-28 Thread Christopher Kings-Lynne
Qingqing, I am considering add an "ice-broker scan thread" to accelerate PostgreSQL sequential scan IO speed. The basic idea of this thread is just like the "read-ahead" method, but the difference is this one does not read the data into shared buffer pool directly, instead, it reads the data i

Re: [HACKERS] Getting different number of results when using hashjoin

2005-11-28 Thread Christopher Kings-Lynne
The path field is an "ltree" column, with an GIST index on it. Something to do with bitmap indexscans on lossy indexes? Chris ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[HACKERS] Strange interval arithmetic

2005-11-27 Thread Christopher Kings-Lynne
What's going on here? Some sort of integer wraparound? WORKS = mysql=# select interval '2378 seconds'; interval -- 00:39:38 (1 row) mysql=# mysql=# select 2378 * interval '1 second'; ?column? -- 00:39:38 (1 row) DOESN'T WORK test=# select interval '237823

[HACKERS] [Fwd: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql package.xml pgsql_driver.c pgsql_statement.c php_pdo_pgsql_int.h]

2005-11-27 Thread Christopher Kings-Lynne
Is Wez of the PHP project correct here in that you can't find parameter types of statements via libpq? Chris Original Message Subject: [PHP-CVS] cvs: php-src(PHP_5_1) /ext/pdo_pgsql package.xml pgsql_driver.c pgsql_statement.c php_pdo_pgsql_int.h Date: Fri, 25 Nov 2005 03:35

Re: [HACKERS] Windows installation notes

2005-11-27 Thread Christopher Kings-Lynne
If you don't give a password, the randomly generated one is ghastly. Not sure if this is a Windows thing or what, but it was definitely a strong password. Impossible to remember, and very difficult to write down and enter. It's not necessary to remember that password...

Re: [HACKERS] gprof SELECT COUNT(*) results

2005-11-27 Thread Christopher Kings-Lynne
Thinking more about other systems, ISTM that Oracle can do this, as can any MVCC based system. OTOH DB2 and SQLServer take block level read locks, so they can do this too, but at major loss of concurrency and threat of deadlock. Having said that, *any* system that chose not to do this would be sev

Re: [HACKERS] gprof SELECT COUNT(*) results

2005-11-26 Thread Christopher Kings-Lynne
...and for emphasis: this optimization of SeqScans is not possible with any other database system, so its a big win for PostgreSQL. With any other db system? That's a big call. Why? Not even other MVCC systems? Chris ---(end of broadcast)---

Re: [HACKERS] NULL safe equality operator

2005-11-25 Thread Christopher Kings-Lynne
CREATE OR REPLACE FUNCTION null_safe_cmp (ANYELEMENT, ANYELEMENT) RETURNS INTEGER IMMUTABLE LANGUAGE SQL AS $$ SELECT CASE WHEN NOT ($1 IS DISTINCT FROM $2) THEN 1 ELSE 0 END; $$; Even cooler: CREATE OR REPLACE FUNCTION null_safe_cmp(anyelement, anyelement) RETURNS integer AS ' SELECT

Re: [HACKERS] NULL safe equality operator

2005-11-25 Thread Christopher Kings-Lynne
test=# select null_safe_cmp (NULL,NULL); ERROR: could not determine anyarray/anyelement type because input has type "unknown" test=# select null_safe_cmp (NULL::integer,NULL::integer); null_safe_cmp --- 1 (1 row) Same casting problem due to anyelement, of course. Ye

Re: [HACKERS] NULL safe equality operator

2005-11-24 Thread Christopher Kings-Lynne
Yeah, I saw your commit. Nice shortcut. Also didn't know you could define operators using SQL functions. Tom's suggestion of NOT (a DISTINCT FROM b) is really cool. Much cleaner in my opinion. I learn a lot from these lists :) Needs to return 0 or 1 though. Chris

Re: [HACKERS] NULL safe equality operator

2005-11-24 Thread Christopher Kings-Lynne
when ($1 is null and $2 is not null) or ($1 is not null and $2 is null) then 0 That's the same as: when $1 is null != $2 is null then 0 Chris ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropri

[HACKERS] NULL safe equality operator

2005-11-24 Thread Christopher Kings-Lynne
Hi guys, Does anyone know how I'd go about implementing the following MySQL operator in PostgreSQL? --- NULL-safe equal. This operator performs an equality comparison like the = operator, but returns 1 rather than NULL if both operands are NULL, and 0 rather than NULL if one operand isNULL

Re: [HACKERS] NVL vs COALESCE

2005-11-24 Thread Christopher Kings-Lynne
If we're going to do that we should add IFNULL() from MySQL as well... Chris Michael Glaesemann wrote: On Nov 24, 2005, at 21:21 , Marcus Engene wrote: When we're having an alias discussion, I'd really like to see NVL in postgres. Not because of porting from oracle as much as just spelling

Re: [HACKERS] POWER vs. POW ???

2005-11-24 Thread Christopher Kings-Lynne
It appears that the line is extended one underscore beyond the width of the wider of the attribute name and value. Am I missing something? Ah yes, I'm stupid :P Chris ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [HACKERS] POWER vs. POW ???

2005-11-24 Thread Christopher Kings-Lynne
Also, POW() is not documented here: http://www.postgresql.org/docs/8.1/interactive/functions-math.html Chris Christopher Kings-Lynne wrote: How come these give slightly different results? test=# SELECT POW(2,-2); pow -- 0.25 (1 row) test=# SELECT POWER(2,-2); power --- 0.25 (1

[HACKERS] TRUNC vs. TRUNCATE

2005-11-24 Thread Christopher Kings-Lynne
Hi, I notice we added CEILING() as an alias to CEIL() for compatibility. We also have POWER() for POW(). I notice that MySQL uses TRUNCATE() and we only have TRUNC(). Is TRUNCATE actually spec compliant? Should we add TRUNCATE anyway for consistency and compatibility? Chris ---

[HACKERS] POWER vs. POW ???

2005-11-24 Thread Christopher Kings-Lynne
How come these give slightly different results? test=# SELECT POW(2,-2); pow -- 0.25 (1 row) test=# SELECT POWER(2,-2); power --- 0.25 (1 row) (Note width of result field.) Chris ---(end of broadcast)--- TIP 4: Have you searched ou

Re: [HACKERS] MS SQL Server compatibility functions

2005-11-24 Thread Christopher Kings-Lynne
Why do you use "GRANT ALL" and not "GRANT SELECT, UPDATE"? All means everybody can do bad things with those sequences. GRANT ALL on a sequence IS GRANT SELECT & UPDATE. Chris ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will

Re: [HACKERS] MS SQL Server compatibility functions

2005-11-23 Thread Christopher Kings-Lynne
I just started a MySQL compatibility functions project on pgfoundry.org. I suggest starting an MSSQL one as well. I'd be interested if you could mail me your code for your functions so far because many of the MySQL functions are copied from MSSQL... Chris Fredrik Olsson wrote: Hi. In the

Re: [HACKERS] PL/php in pg_pltemplate

2005-11-23 Thread Christopher Kings-Lynne
Is anybody opposed to having PL/php in pg_pltemplate in the 8.1 branch? If not, I will add it on monday. (I plan to add it to 8.2 at the same time.) With non-forced initdb? Chris ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] Practical error logging for very large COPY

2005-11-22 Thread Christopher Kings-Lynne
Actually, there are really only a few errors people want to trap I imagine: - CHECK constraints (all handled in ExecConstraints) - Duplicate keys - Foreign key violations (all handled by triggers) Rather than worry about all the events we can't safely trap, how about we simply deal with the hand

Re: [HACKERS] Practical error logging for very large COPY statements

2005-11-22 Thread Christopher Kings-Lynne
Seems similar to the pgloader project on pgfoundry.org. It is similar and good, but I regard that as a workaround rather than the way forward. Yes, your way would be rad :) ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, ple

Re: [HACKERS] Are NULLs in Arrays compressed?

2005-11-21 Thread Christopher Kings-Lynne
I thought NULLs don't work in arrays yet? :-) http://archives.postgresql.org/pgsql-committers/2005-11/msg00385.php http://developer.postgresql.org/docs/postgres/arrays.html Someone's checked that this NULLs in arrays stuff doesn't affect indexes over array elements, etc.? Or indexes that don

Re: [HACKERS] Practical error logging for very large COPY statements

2005-11-21 Thread Christopher Kings-Lynne
Seems similar to the pgloader project on pgfoundry.org. Chris Simon Riggs wrote: If you've ever loaded 100 million rows, you'll know just how annoying it is to find that you have a duplicate row somewhere in there. Experience shows that there is always one, whatever oath the analyst swears befo

Re: [HACKERS] [PATCHES] drop database if exists

2005-11-21 Thread Christopher Kings-Lynne
here's a patch for "drop database if exists". Barring objections I will apply it in a day or two. Should we use the IF EXISTS syntax in pg_dump output? For all DROP commands in clean mode? Might make it easier to wrap pg_dump output in a transaction? Chris ---(end

Re: [HACKERS] Loading 7.4 dump to 8.1 with user-custom search_path

2005-11-17 Thread Christopher Kings-Lynne
[EMAIL PROTECTED]:08]~:90>grep search_path fritz-20051106.sql ALTER USER decibel SET search_path TO 'decibel, rrs, rrd, page_log, public'; Trying that command in psql... decibel=# ALTER USER decibel SET search_path TO 'decibel, rrs, rrd, page_log, public'; NOTICE: schema "decibel, rrs, rrd, pag

Re: [HACKERS] [pgsql-advocacy] Call for sample databases

2005-11-17 Thread Christopher Kings-Lynne
ilable to you. The file's big. -javier ___ Javier Soltero Hyperic | www.hyperic.net o- 415 738 2566 | c- 415 305 8733 [EMAIL PROTECTED] _______ On Nov 16, 2005, at 8:18 PM, Christopher Kings-Lynne wrote: Hi guys, I&#x

[HACKERS] Call for sample databases

2005-11-16 Thread Christopher Kings-Lynne
Hi guys, I've set up a new sample databases project: http://pgfoundry.org/projects/dbsamples/ If any of you have sample databases (schema + data, pg_dump format) that you are willing to share under the BSD license, please send 'em to me so I can host them on the project. You might also find

Re: [HACKERS] [COMMITTERS] pgsql: make_restrictinfo() failed to attach

2005-11-16 Thread Christopher Kings-Lynne
I've never been a fan of "regression tests" in the narrow sense of "let's test for this specific mistake we made once". If you can devise a test that catches a class of errors including the one you actually made, that's a different story, because it's much more likely to catch a real future probl

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Christopher Kings-Lynne
I'm asking, because we have a bigger datawarehouse and dump the data for a backup every night. Unfortunately, the backup now takes realy long. That means, other processes that insert data will have to wait which is sometime really long! I was searching for a way to avoid this. I thought besides th

Re: [HACKERS] bind variables, soft vs hard parse

2005-11-15 Thread Christopher Kings-Lynne
> Oracle recently gave some money to Zend to make proper Oracle support > for PHP. In that interface they use bind variables. Apart from greater > speed, sqlinjection becomes history as well. I did the same for PostgreSQL for PHP 5.1. http://au3.php.net/manual/en/function.pg-

Re: [HACKERS] MERGE vs REPLACE

2005-11-15 Thread Christopher Kings-Lynne
We should probably throw a notice or warning if we go to a table lock, too. That's not very useful, because you can only do somethign about it AFTER the 1 hour exclusive lock merge has already run :) Chris ---(end of broadcast)--- TIP 2: Don't

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Christopher Kings-Lynne
I belive a lock is acquired on every table including inherited children BEFORE doing ANY dumping. To allow pg_dump to get a consistent dump snapshot. Chris Yann Michel wrote: Hi, On Wed, Nov 16, 2005 at 09:59:44AM +0800, Christopher Kings-Lynne wrote: It acquires share locks on EVERY

Re: [HACKERS] PG_DUMP and table locking in PG7.4

2005-11-15 Thread Christopher Kings-Lynne
It acquires share locks on EVERY table. Yann Michel wrote: Hi all, On Sun, Nov 13, 2005 at 03:22:23AM +0100, Yann Michel wrote: I'm using PG_DUMP for backing up a postgres 7.4 database. As I have seen, the pg_dump aquires a table lock while dump the table's content. What will happen, if I hav

Re: [HACKERS] Réf. : Re: [HACKERS] Runn

2005-11-15 Thread Christopher Kings-Lynne
NO, it won't reduce everybody's security. You obviously don't understand what I'm trying to say. It would NOT be the default option. The user could just choose by SPECIFYING it, that PostGre don't control the privileged he has. This discussion is amazing. Without this option, I CANNOT use PostG

Re: [HACKERS] [ADMIN] Major Problem, need help! Can't run our website!

2005-11-14 Thread Christopher Kings-Lynne
We've seen reports of people firing this particular foot-gun before, haven't we? Would it make sense to rename pg_xlog to something that doesn't sound like it's "just" full of log files? Eg pg_wal - something where the half-educated will have no idea what it is, and therefore not think they kno

Re: [HACKERS] Multi-table-unique-constraint

2005-11-12 Thread Christopher Kings-Lynne
Most of the people who have thought about this have figured that the right solution involves a single index spanning multiple tables (hence, adding a table ID to the index entry headers in such indexes). This fixes the lookup and entry problems, but it's not any help for the lock-against-schema-m

[HACKERS] Unclear documentation

2005-11-09 Thread Christopher Kings-Lynne
In the CREATE FUNCTION docs I notice this: RETURNS NULL ON NULL INPUT or STRICT indicates that the function always returns null whenever any of its arguments are null. If this parameter is specified, the function is not executed when there are null arguments; instead a null result is assumed a

Re: [HACKERS] [COMMITTERS] dbsamples - dbsamples: Imported Sources

2005-11-09 Thread Christopher Kings-Lynne
Anyone know how I can turn off these emails to the pgsql committer's list? User Chriskl wrote: Update of /cvsroot/dbsamples/dbsamples In directory pgfoundry.org:/tmp/cvs-serv14202 Log Message: Intial import of port of MySQL world database. Status: Vendor Tag: chriskl Release Tags: start

Re: [HACKERS] Supporting NULL elements in arrays

2005-11-08 Thread Christopher Kings-Lynne
I also think the best non-compatible solution is to require non-numeric elements to be delimited (double quotes, configurable?), and use NULL unadorned to represent NULL. I think the ultimate solution should have null values represented by NULL... I mean NULL is NULL :) Chris

Re: [HACKERS] Enums again

2005-11-08 Thread Christopher Kings-Lynne
Also, Christopher - I was somewhat motivated to work on this by your recent comment about enums being the number one demand of migrating MySQL users, so I am mildly amused by your last sentence ;-) They're not mutually exclusive statements :) ---(end of broadcast)-

Re: [HACKERS] Enums again

2005-11-08 Thread Christopher Kings-Lynne
So, instead of using enums for order states or originating system, I'll user numbers or text? Or implement lookup tables ? Use a text field and a CHECK constraint if you have just a couple of states, and a lookup table if you have many. Always use a lookup table if you plan on adding new stat

Re: [HACKERS] Enums again

2005-11-08 Thread Christopher Kings-Lynne
Maybe I missed it, but I didn't see any conclusion. If I want to design an Open Source system now that may be in beta in three to six months and I'd like to use enums, is this a good place to look? There's no way you're going to be using enums. I guess I'm wondering about the kit going into Pg

Re: [HACKERS] Getting table name/tuple from OID

2005-11-07 Thread Christopher Kings-Lynne
Try SELECT 12341234::regclass; Where 12341234 is the OID of a table. Otherwise try: SELECT tableoid, * FROM table; To get the tableoid on each row. Chris Paresh Bafna wrote: Is there any way to retrieve table name and/or tuple values from OID of table/tuple? ---(en

Re: [HACKERS] Ideas for easier debugging of backend problems

2005-11-01 Thread Christopher Kings-Lynne
What about the Google Core Dumper? :) http://sourceforge.net/projects/goog-coredumper/ Chris Peter Eisentraut wrote: Martijn van Oosterhout wrote: 3. Add either a GUC or a command line switch or PGOPTION switch to automatically invoke and attach gdb on certain types of error. Obviously you

Re: SOLVED Re: [HACKERS] _penalty gist method invoked with one key

2005-10-27 Thread Christopher Kings-Lynne
Grzegorz - it'd be great if you submitted documentation improvements :) Grzegorz Jaskiewicz wrote: Sorry for all this crap, this is bullocks. reason was, one of internal functions didn't filled out length value, and since the type is variable length, we had trouble. Postgres wasn't copying any

Re: [HACKERS] Differences in UTF8 between 8.0 and 8.1

2005-10-26 Thread Christopher Kings-Lynne
However I'm running into another problem now. The command: iconv -c -f UTF8 -t UTF8 does strip out the invalid characters. However, iconv reads the entire file into memory before it writes out any data. This is not so good for multi-gigabyte dump files and doesn't allow for it to be used

[HACKERS] PQescapeIdentifier

2005-10-25 Thread Christopher Kings-Lynne
TODO item done for 8.2: * Add PQescapeIdentifier() to libpq Someone probably needs to check this :) Chris libpq.txt.gz Description: GNU Zip compressed data ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [HACKERS] Sequence dependencies

2005-10-25 Thread Christopher Kings-Lynne
How about it's in the release notes and in adddepend? Hmm, it's currently early Wednesday morning my time, and we were thinking of wrapping RC1 Thursday or Friday. An adddepend extension is going to get coded and tested when exactly? Fair enough. Also, I'm dubious about the assumption that

Re: [HACKERS] Sequence dependencies

2005-10-25 Thread Christopher Kings-Lynne
Should we not just make this part of contrib/adddepend? Uh, I thought adddepend did more than just sequence dependencies, and I Yes it does... am worried it might mess up someone's database. Adddepend has been around for a long time - seems to work perfectly. Also, by doing it manually,

Re: [HACKERS] SQL99 compat list

2005-10-25 Thread Christopher Kings-Lynne
Has the sql compatibiliy list been updated? eg. for BETWEEN SYMMETRIC? http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/sql_features.txt All signs point to "Sort of not really". Someone more knowledgeable than me will have to update it I think. These look like likely ca

Re: [HACKERS] add_missing_from breaks existing views

2005-10-25 Thread Christopher Kings-Lynne
2. Revert the change to make add_missing_from default as false, and wait a few more releases before making it default. +1 No skin off our nose. What do we care if the default changes in a few releases time - however there are probably many end-users who will see problems upgrading... Chris

[HACKERS] Sequence dependencies

2005-10-25 Thread Christopher Kings-Lynne
Hi, I notice that in the release notes there is a large query that should be run if upgrading from prior to 8.1, to ensure that sequence dependencies are recorded. Should we not just make this part of contrib/adddepend? Chris ---(end of broadcast)---

[HACKERS] SQL99 compat list

2005-10-25 Thread Christopher Kings-Lynne
Has the sql compatibiliy list been updated? eg. for BETWEEN SYMMETRIC? Chris ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[HACKERS] Surge in MySQL converters

2005-10-25 Thread Christopher Kings-Lynne
Hi All, Just thought the hackers might be interested to know that there has been a serious surge in the number of people in #postgresql coming in with questions related to switching from MySQL to PostgreSQL. Maybe it's something to do with Innobase - a few of them have specifically mentioned

Re: [HACKERS] PostgreSQL 8.1 Beta 4

2005-10-24 Thread Christopher Kings-Lynne
Hi Tomas, Have you considered joining the PostgreSQL Build Farm? www.pgbuildfarm.org Chris Tomas wrote: Hello. I've joined this mailing list to report you the success I am having compiling postgresql-8.1 beta4 on DragonFly BSD, which is not supported. Because the distribution is not kno

Re: [HACKERS] Differences in UTF8 between 8.0 and 8.1

2005-10-23 Thread Christopher Kings-Lynne
Thanks go out to John Hansen, he recommended to run the dump through iconv: iconv -c -f UTF8 -t UTF8 -o fixed.sql dump.sql This seems to strip out invalid UTF8 and will allow for a clean import. Someone should add this to the Release Notes/FAQ.. Yes I think that's extremely important to put

Re: [HACKERS] [COMMITTERS] pgsql: Clean up some obsolete statements about GiST

2005-10-20 Thread Christopher Kings-Lynne
Tom, I also notice that the link I put in ages ago to Kornacker's thesis is now defunct :( (GiST indexes Introduction) A quick search of Google Scholar finds it hosted on Oleg & Teodor's site. http://scholar.google.com/scholar?hl=en&lr=&safe=off&q=Marcel+Kornacker+Access+Methods+for+Next-Gener

<    1   2   3   4   5   6   7   8   9   10   >