Re: [PATCHES] [HACKERS] Cannot initdb in cvs tip

2004-06-19 Thread John Hansen
On Sun, 2004-06-20 at 08:04, Dave Page wrote: > > > -Original Message- > > From: Tom Lane [mailto:[EMAIL PROTECTED] > > Sent: 19 June 2004 00:22 > > To: Dave Page > > Cc: PostgreSQL-development > > Subject: Re: [HACKERS] Cannot initdb in cvs tip > > > > "Dave Page" <[EMAIL PROTECTED]>

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-06 Thread John Hansen
Attached, as promised, small patch removing the limitation, adding correct utf8 validation. Regards, John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Hansen Sent: Friday, August 06, 2004 2:20 PM To: 'Hackers' Subject: [HACKER

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-06 Thread John Hansen
My apologies for not reading the code properly. Attached patch using pg_utf_mblen() instead of an indexed table. It now also do bounds checks. Regards, John Hansen -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 4:37 AM To: John Hansen Cc

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-06 Thread John Hansen
Possibly, since I got it wrong once more About to give up, but attached, Updated patch. Regards, John Hansen -Original Message- From: Oliver Elphick [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 3:56 PM To: Tom Lane Cc: John Hansen; Hackers; Patches Subject: Re

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-06 Thread John Hansen
haracters are currently not in use tho. I didn't actually notice the difference in UTF8 width between my original patch and my last, so attached, updated patch. Regards, John Hansen -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 3:07 PM T

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
This should do it. Regards, John Hansen -Original Message- From: Dennis Bjorklund [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 5:02 PM To: Tom Lane Cc: John Hansen; Hackers; Patches Subject: Re: [HACKERS] UNICODE characters above 0x1 On Sat, 7 Aug 2004, Tom Lane

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
ncluded in the specification some day. Regards, John Hansen -Original Message- From: Tatsuo Ishii [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 8:09 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; John Hansen; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PATCHES

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
4 actually, 10 needs four bytes: 0xxx 10xx 10xx 10xx 10 = 1010 Fill in the blanks, starting from the bottom, you get: 1010 1011 1011 Regards, John Hansen -Original Message- From: Christopher Kings-Lynne [mailto:[EMAIL

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
s are allowed? Regards, John Hansen -Original Message- From: Tatsuo Ishii [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 8:46 PM To: John Hansen Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PATCHES] [HACKERS] UNICODE characters

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
Yea,. I know 10 - 10 : 2 separate planes iirc ... John -Original Message- From: Dennis Bjorklund [mailto:[EMAIL PROTECTED] Sent: Saturday, August 07, 2004 9:06 PM To: John Hansen Cc: Tatsuo Ishii; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
> -Original Message- > From: Dennis Bjorklund [mailto:[EMAIL PROTECTED] > Sent: Saturday, August 07, 2004 11:23 PM > To: John Hansen > Cc: Takehiko Abe; [EMAIL PROTECTED] > Subject: RE: [PATCHES] [HACKERS] UNICODE characters above 0x1 > > On Sat, 7 Aug

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > Sent: Sunday, August 08, 2004 2:43 AM > To: Dennis Bjorklund > Cc: Tatsuo Ishii; John Hansen; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [PATCHES] [HACKERS] UNICODE characters above

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
> -Original Message- > From: Oliver Elphick [mailto:[EMAIL PROTECTED] > Sent: Sunday, August 08, 2004 7:43 AM > To: Tom Lane > Cc: John Hansen; Hackers; Patches > Subject: Re: [HACKERS] UNICODE characters above 0x1 > > On Sat, 2004-08-07 at 07:10, Tom Lane w

Re: [PATCHES] [HACKERS] UNICODE characters above 0x10000

2004-08-07 Thread John Hansen
must be <= len in either case.) This would reduce the > main loop of pg_verifymbstr to a call of this function and an > error-case-handling block. > Sounds like a plan... > regards, tom lane > > Regards, John Hansen ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [PATCHES] Quieting the copyright/startup message...

2004-10-04 Thread John Hansen
> > After seeing the "Welcome to psql 8.0.0beta3, the PostgreSQL > interactive terminal." message, I finally got irritated > enough at it to try and figure out how to silence it without > using the -q option to psql(1). The attached (trivial) patch > fixes said problem so that one can add "\s

Re: [PATCHES] Quieting the copyright/startup message...

2004-10-04 Thread John Hansen
> There is no requirement that the program's output mention the > license terms (perhaps you are thinking of the GPL?) Yea,. I must have been... :) ... John ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http:/

[PATCHES] calling currval() before nextval() patch adding currval_isset()

2004-11-07 Thread John Hansen
ously, I just called currval, but with the result of filling up the server log with warnings. Kind Regards, John Hansen PS I picked OID 1295 for this function, as it's currently available according to unused_oids. === RCS file: /p

Re: [PATCHES] calling currval() before nextval() patch adding

2004-11-07 Thread John Hansen
> This might do what you're looking for on 8.0. > > CREATE OR REPLACE FUNCTION currval_isset(text) RETURNS bigint AS ' > DECLARE > var integer; > BEGIN > SELECT currval($1) INTO var; > > RETURN var; > > EXCEPTION > WHENOBJECT_NOT_IN_PREREQUISITE_STATE THEN > RETURN 0; > END;

Re: [PATCHES] calling currval() before nextval() patch adding

2004-11-07 Thread John Hansen
> I would argue that a program written that way is broken by definition, > and we should not encourage programmers to write broken applications. Hmmm, is mysql's last_insert_id behaviour really that much to ask for? This is basically what I'm trying to emulate, to make porting mysql applicat

Re: [PATCHES] calling currval() before nextval() patch adding

2004-11-07 Thread John Hansen
> Hmmm, is mysql's last_insert_id behaviour really that much to ask > for? Come to think of it, maybe the attached last_insert_id() patch is a better option. Actually copying the behaviour of mysql's counterpart. ... John Index: doc/src/sgml/func.sgml =

Re: [PATCHES] calling currval() before nextval() patch adding currval_isset()

2004-11-07 Thread John Hansen
> Hi list, > > attached, cvs context diff that adds currval_isset('sequence_name'); > Updated patch attached, didn't think to update the docs. Thanks oicu! Kind Regards, John Hansen Index: doc/src/sgml/func.sgml =

Re: [PATCHES] [HACKERS] plperl Safe restrictions

2004-11-16 Thread John Hansen
> Applied, with changes to allow srand and disallow sprintf, as per > subsequent discussion. How about allowing: use utf8; use locale; ? Kind Regards, John ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister c

Re: [PATCHES] [HACKERS] plperl Safe restrictions

2004-11-16 Thread John Hansen
> I think it is *way* too late in the dev cycle to be proposing this. > Maybe it should be a TODO item - I at least don't have time even to > think about the implications os using these pragmas. The effect of the > first is achievable via an environment setting, I believe. > > If you need these

[PATCHES] Unicode characters above 0x10000 #2

2004-11-20 Thread John Hansen
Hello, Seing that the limit is still in place, attached patch against CVS. Kind Regards, John Hansen Index: src/backend/utils/mb/wchar.c === RCS file: /projects/cvsroot/pgsql/src/backend/utils/mb/wchar.c,v retrieving revision 1.38

Re: [PATCHES] Unicode characters above 0x10000 #2

2004-11-21 Thread John Hansen
Updated patch, Disregard old one, it broke ucs2. ... John cvs.diff Description: cvs.diff ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [PATCHES] Unicode characters above 0x10000 #2

2004-11-21 Thread John Hansen
3 times lucky? Last one broke utf8 G This one works, Too tired, sorry for the inconvenience.. ... John cvs.diff Description: cvs.diff ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your

[PATCHES] RULES doesn't work as expected

2005-01-11 Thread John Hansen
It seems rules don't work as expected. I could be wrong,... In which case, what am I doing wrong? Clearly, the first insert below should not update the table as well. ... John CREATE TABLE test (a text, b int4[]); CREATE RULE test_rule AS ON INSERT TO test WHERE exists(SELECT 1 FROM test

Re: [PATCHES] again: add collation support function

2005-02-07 Thread John Hansen
ou reply this one. > > It still does not answer his question, being if this is the way core will want to go? > It was only posted seven days ago and will not appear until 8.1 so > people will have to keep looking for many more months no matter how > quickly we add it. >

Re: [PATCHES] optimize md5_text

2005-02-23 Thread John Hansen
Will this be backpatched to 8.0? > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Neil Conway > Sent: Thursday, February 24, 2005 9:46 AM > To: pgsql-patches > Subject: Re: [PATCHES] optimize md5_text > > Neil Conway wrote: > > This patch optimizes

Re: [PATCHES] lastval()

2005-05-08 Thread John Hansen
Tom Lane wrote: > Sent: Monday, May 09, 2005 8:37 AM > To: Dennis Bjorklund > Cc: pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > Dennis Bjorklund <[EMAIL PROTECTED]> writes: > > Here is a small patch that implements a function lastval() > that works > > just like currval()

Re: [PATCHES] lastval()

2005-05-10 Thread John Hansen
Neil Conway wrote: > Sent: Wednesday, May 11, 2005 10:56 AM > To: Dennis Bjorklund > Cc: pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > Dennis Bjorklund wrote: > > Here is a small patch that implements a function lastval() > that works > > just like currval() except that it

Re: [PATCHES] lastval()

2005-05-10 Thread John Hansen
Bruce Momjian wrote: > Sent: Wednesday, May 11, 2005 1:27 PM > To: John Hansen > Cc: Neil Conway; Dennis Bjorklund; pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > John Hansen wrote: > > Neil Conway wrote: > > > Sent: Wednesday, May 11, 2005 10

Re: [PATCHES] lastval()

2005-05-10 Thread John Hansen
Bruce Momjian wrote: > Sent: Wednesday, May 11, 2005 1:45 PM > To: John Hansen > Cc: Neil Conway; Dennis Bjorklund; pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > John Hansen wrote: > > > > > What do people think of this idea

Re: [PATCHES] lastval()

2005-05-10 Thread John Hansen
Neil Conway wrote: > Sent: Wednesday, May 11, 2005 2:13 PM > To: John Hansen > Cc: Dennis Bjorklund; pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > John Hansen wrote: > > Even more so if the 'currval(void) called before nextval(seq_name)' &g

Re: [PATCHES] lastval()

2005-05-11 Thread John Hansen
Tom Lane wrote: > Sent: Wednesday, May 11, 2005 3:41 PM > To: John Hansen > Cc: Neil Conway; Dennis Bjorklund; pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > "John Hansen" <[EMAIL PROTECTED]> writes: > > I'm all for it. Eve

Re: [PATCHES] lastval()

2005-05-11 Thread John Hansen
Alvaro Herrera wrote: > Sent: Wednesday, May 11, 2005 10:46 PM > To: John Hansen > Cc: Bruce Momjian; Neil Conway; Dennis Bjorklund; > pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > On Wed, May 11, 2005 at 02:08:16PM +1000, John Hansen wrote: > &g

Re: [PATCHES] lastval()

2005-05-12 Thread John Hansen
Alvaro Herrera wrote: > Sent: Thursday, May 12, 2005 6:36 AM > To: John Hansen > Cc: Bruce Momjian; Neil Conway; Dennis Bjorklund; > pgsql-patches@postgresql.org > Subject: Re: [PATCHES] lastval() > > On Thu, May 12, 2005 at 04:58:54AM +1000, John Hansen wrote: >

Re: [PATCHES] character type value is not padded with spaces

2005-05-23 Thread John Hansen
Ahemm,... UNICODE DB: create table t (a char(10)); set client_encoding = iso88591; insert into t VALUES ('æøå'); select a, octet_length(a),length(a) from t; a | octet_length | length +--+ æøå| 13 | 3 (1 row) This is with 8.0.2.

Re: [PATCHES] character type value is not padded with spaces

2005-05-23 Thread John Hansen
Ahhh... > -Original Message- > From: Tatsuo Ishii [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 24, 2005 9:26 AM > To: John Hansen > Cc: [EMAIL PROTECTED]; pgsql-patches@postgresql.org; > pgsql-hackers@postgresql.org > Subject: Re: [PATCHES] character type val

Re: [PATCHES] Unicode characters above 0x10000 #2

2005-06-04 Thread John Hansen
, please let me know, and correct it). ... John > -Original Message- > From: Bruce Momjian [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 05, 2005 11:23 AM > To: pgman@candle.pha.pa.us > Cc: John Hansen; pgsql-hackers@postgresql.org; PostgreSQL-patches > Subject: Re:

Re: [PATCHES] lastval()

2005-06-05 Thread John Hansen
> > I want the feature. Is useful for PHP ... > Ditto! ... John ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [PATCHES] lastval()

2005-06-06 Thread John Hansen
Yes please... ... That's exactly what I've been asking for > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Neil Conway > Sent: Monday, June 06, 2005 12:18 PM > To: Dennis Bjorklund > Cc: pgsql-patches@postgresql.org > Subject: Re: [PATCHES] la

Re: [PATCHES] insert into table (column) values (nullif('',''));

2005-08-26 Thread John Hansen
Since column is boolean, you need a boolean result: insert into table (column) values (nullif(true,true)); > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Matt A. > Sent: Monday, August 22, 2005 3:22 AM > To: pgsql-bugs@postgresql.org; pgsql-patch