Re: [HACKERS] to_char(interval) --- done?

2003-03-24 Thread Karel Zak
On Fri, Mar 21, 2003 at 03:32:11PM -0800, Josh Berkus wrote: Folks, Some months ago we agreed on this list that the functioning of to_char(interval) was not particularly useful the way it works in current stable versions. I don't see a to_char fix on the TODO list, though; does that

Re: [HACKERS] PQescapeBytea on Win32

2003-03-24 Thread Peter Eisentraut
Bruce Momjian writes: The problem with that is the new versions are still going to reference PQfreeNotify, and then we still can't remove it. I think we need the macro for PQfreeNotify pointing to PQfreemem, but keep the PQfreeNotify function around for a release or two, then remove it, and

[HACKERS] GiST: Need ideas on how to minimise data in a GiST index

2003-03-24 Thread Mark Cave-Ayland
Hi everyone, I'm looking for someone with experience with GiST and PostgreSQL to offer some advice on the following problem: I'm currently looking at improving the R-Tree implementation of PostGIS (http://postgis.refractions.net) by consolidating the indexable and non-indexable operators so that

Re: [HACKERS] to_char(interval) --- done?

2003-03-24 Thread Alvaro Herrera
On Mon, Mar 24, 2003 at 04:34:38AM -0600, Larry Rosenman wrote: --On Monday, March 24, 2003 09:40:46 +0100 Karel Zak [EMAIL PROTECTED] wrote: On Fri, Mar 21, 2003 at 03:32:11PM -0800, Josh Berkus wrote: Folks, Some months ago we agreed on this list that the functioning of

Re: [HACKERS] to_char(interval) --- done?

2003-03-24 Thread Karel Zak
On Mon, Mar 24, 2003 at 09:56:53AM -0400, Alvaro Herrera wrote: I volunteered to look into it, but got a sorta negative reply from Peter_E, but no response to my request for suggestions. I think what Peter was saying is to research some ways to manage intervals and other time related

Re: [HACKERS] Threaded Python vs. PostGreSQL plpython

2003-03-24 Thread Peter Eisentraut
Mike Meyer writes: The problem is that the ports system build python with thread support. postmaster doesn't have thread support, so when the libpython2.2.so is dynamically loaded, it fails to find the thread functions, and the load fails. What is thread support, what are the thread

Re: [HACKERS] [GENERAL] GiST: Need ideas on how to minimise data in a GiST index

2003-03-24 Thread Mark Cave-Ayland
Hi Tom, Mark Cave-Ayland [EMAIL PROTECTED] writes: However, each database column also has a spatial reference system identifier (SRID) that specifies the coordinate system the geometry is in. What should happen is that given two geometries or bounding boxes, an error should be

Re: [HACKERS] [GENERAL] GiST: Need ideas on how to minimise data in a GiST index

2003-03-24 Thread Tom Lane
Mark Cave-Ayland [EMAIL PROTECTED] writes: This sounds exactly as if it would solve the problem. Have you got any pointers to documentation on this, and more specifically on the PostgreSQL implementation of GiST? (I'm guessing this is a GiST only extension). Has it been available since

Re: [HACKERS] PQescapeBytea on Win32

2003-03-24 Thread Bruce Momjian
Peter Eisentraut wrote: Bruce Momjian writes: The problem with that is the new versions are still going to reference PQfreeNotify, and then we still can't remove it. I think we need the macro for PQfreeNotify pointing to PQfreemem, but keep the PQfreeNotify function around for a release

[HACKERS] Strange aggregate

2003-03-24 Thread Teodor Sigaev
Hi! Is there possibility to write aggregate returns setof value? I want to implement some statistic aggregate for tsearch: create type statinfo as (word text, ndoc int4, nentry int4); CREATE FUNCTION ts_accum(txtstat,txtidx) RETURNS txtstat AS 'MODULE_PATHNAME' LANGUAGE 'C' with

[HACKERS] How to store retrieve Binary Data?

2003-03-24 Thread A Mohan
I would like to know how to store and retrieve binary data in PostgreSQL thourgh ODBC from Visual Basic Program. Please help me for this. I want to store image files. This is most urgent. Regards, A.Mohan ___ Odomos - the only

[HACKERS] DEFAULT in set clause list

2003-03-24 Thread Neil Conway
Folks, While browsing through the SQL spec (200x draft), I noticed the following: 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

Re: [HACKERS] Strange aggregate

2003-03-24 Thread Tom Lane
Teodor Sigaev [EMAIL PROTECTED] writes: Is there possibility to write aggregate returns setof value? Not with the present implementation. I suppose we could think about postponing the call to the finalfunction so that it's executed by execQual.c while evaluating an Agg node's output tlist, and

Re: [HACKERS] cursors: SCROLL default, error messages

2003-03-24 Thread Neil Conway
On Fri, 2003-03-21 at 12:12, Tom Lane wrote: I agree that the second of these is bogus. I'm ambivalent about changing the first; it's odd but perhaps there are apps out there that depend on it. Any other opinions out there? For what it's worth, I noticed that the first (DECLARE CURSOR

Re: [HACKERS] cursors: SCROLL default, error messages

2003-03-24 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Personally, I'm inclined to change both of these cases to result in an error... No strong objection from me, but perhaps you ought to toss out a query on pgsql-sql or pgsql-general to see if anyone wants to complain. Not all the folks who might be upset

Re: [HACKERS] SQL99 ARRAY support proposal

2003-03-24 Thread scott.marlowe
On Sun, 23 Mar 2003, Kevin Brown wrote: Joe Conway wrote: Jason Earl wrote: Actually, I think it was someone else (Joe???) that is doing the leg work, and he was the one choosing explode / implode and getting gruff for it, so I was just stepping in and defending his decision. Oops,

Re: [HACKERS] IO scheduler vs PostgreSQL performance measurement

2003-03-24 Thread scott.marlowe
On Mon, 17 Mar 2003, Nick Piggin wrote: Dear PostgreSQL hackers, I am developing a disk IO scheduler for Linux and am aiming to have it included in the stable 2.6 release. Due to its design, performance regressions do appear, and are often more specific to the workload in question than with

Re: [HACKERS] Please clarify with regard to Renaming a Sequence

2003-03-24 Thread Dave Cramer
Postgres manages sequences using DEFAULT, which means that if you insert a row with the sequence column set to DEFAULT, or omit the row in the insert, then the default value will be inserted. This is usually nextval('sequence_name'). There is no underlying magic other than this. So, as long as you

[HACKERS] 7.4devel auth failed

2003-03-24 Thread Andreas Pflug
Trying to connect from pgadmin2, I get the message no pg_hba.conf entry for ... I found that the ip address matching with rangeSockAdr in line 651 in hba.c fails. I get access if I set ipaddr/mask to 0.0.0.0/0.0.0.0 in pg_hba.conf. ---(end of

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Bruce Momjian
Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: We can just say, Don't alter the client encoding behind the back of the driver. We can perhaps get away with saying that for client_encoding, but what of DateStyle? SET has been the traditional way to adjust that since the stone

Re: [HACKERS] SQL99 ARRAY support proposal

2003-03-24 Thread Joe Conway
scott.marlowe wrote: On Sun, 23 Mar 2003, Kevin Brown wrote: Use split and merge. Avoids the join issue and avoids the implode/explode issue too. :-) Isn't merge a new SQL keyword in SQL99 or SQL03? Yup, in SQL200x at least: 14.9 merge statement Function Conditionally update rows of a table,

Re: [HACKERS] MySQL at .NET conference

2003-03-24 Thread Merlin Moncure
mlw wrote: I had the misfortune of having to attend a .NET forum. It was interesting, it seems like Microsoft is gonna may anyone's dog able to write web service applications. The catch being that it will only run on Windows .NET. Ah, so you were in heck: how was the weather? Seriously, .NET

[HACKERS] updateable cursors visibility

2003-03-24 Thread Neil Conway
Folks, I'd like to implement updateable cursors. I'll be working on just getting updateable cursors working for relatively simple SELECT queries (e.g. no joins, aggregates, grouping, user-defined function calls, etc.). BTW, I believe that's all the SQL spec requires, but I need to double check

Re: [HACKERS] updateable cursors visibility

2003-03-24 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: - if the user updates a row X in the cursor, then rewinds the cursor and fetches X again, should they see the new X or the old X? If it's considered an insensitive cursor, I'd think it should see the old X. You would have a hard time making the code do

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

[HACKERS] Nested transactions

2003-03-24 Thread Alvaro Herrera
Hackers, I've been playing with nested transactions. In fact I have already have some things working, but there are some major complications I had not seen. First is the management of Snapshots (SnapshotDirty, QuerySnapshot, SerializableSnapshot). They are kept in global variables for each

Re: [HACKERS] Threaded Python vs. PostGreSQL plpython

2003-03-24 Thread Shridhar Daithankar
On 24 Mar 2003 at 11:45, Mike Meyer wrote: In [EMAIL PROTECTED], Shridhar Daithankar[EMAIL PROTECTED] [EMAIL PROTECTED] typed: Well, I believe, if you link a library against libc_r explicitly, then even if it is loaded by a program which is not linked against it would do. One

Re: [HACKERS] PQescapeBytea on Win32

2003-03-24 Thread Bruce Momjian
OK, patch applied to document PQfreemem() for notify. PQfreeNotify wasn't even documented, but I kept it in for binary compatibility, and added a #define to map it to PQfreemem(). I updated various interfaces to use PQfreemem() rather than free().

Re: [HACKERS] updateable cursors visibility

2003-03-24 Thread Bruce Momjian
Neil Conway wrote: On Mon, 2003-03-24 at 22:50, Hiroshi Inoue wrote: Does the SQL standard allow INSENSITIVE updatable cursors ? Hmmm... apparently not: (Subsection 14.1, Syntax Rules of DECLARE CURSOR) 11) If an updatability clause of FOR UPDATE with or without a column name list is

[HACKERS] plpgsql compile failure

2003-03-24 Thread Bruce Momjian
I am seeing the following plpgsql compile failure in CVS: #$ gmake bison -y -d gram.y NONE:0: /usr/contrib/bin/gm4: ERROR: EOF in string sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' y.tab.c ./pl_gram.c /bin/sh: cannot open y.tab.c: no such

Re: [HACKERS] plpgsql compile failure

2003-03-24 Thread Joe Conway
Bruce Momjian wrote: I am seeing the following plpgsql compile failure in CVS: #$ gmake bison -y -d gram.y NONE:0: /usr/contrib/bin/gm4: ERROR: EOF in string sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' y.tab.c ./pl_gram.c /bin/sh: cannot

Re: [HACKERS] updateable cursors visibility

2003-03-24 Thread Hiroshi Inoue
Neil Conway wrote: Folks, I'd like to implement updateable cursors. I'll be working on just getting updateable cursors working for relatively simple SELECT queries (e.g. no joins, aggregates, grouping, user-defined function calls, etc.). BTW, I believe that's all the

Re: [HACKERS] updateable cursors visibility

2003-03-24 Thread Neil Conway
On Mon, 2003-03-24 at 22:50, Hiroshi Inoue wrote: Does the SQL standard allow INSENSITIVE updatable cursors ? Hmmm... apparently not: (Subsection 14.1, Syntax Rules of DECLARE CURSOR) 11) If an updatability clause of FOR UPDATE with or without a column name list is specified, then INSENSITIVE

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: One idea is for SET to return a command tag that has more information, like we do for INSERT/UPDATE/DELETE. It could return the variable modified and the new value. But that doesn't solve the problem --- what about begin, set, rollback? What about

Re: [HACKERS] 7.4devel auth failed

2003-03-24 Thread Bruce Momjian
That's strange. I just tested it here, and it worked. I have IPv6 code enabled. but no IPv6 in my kernel, so there are just IPv4 connections. Can you peek in this funciton and see where it is failing: int rangeSockAddrAF_INET(const SockAddr *addr, const SockAddr

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: One idea is for SET to return a command tag that has more information, like we do for INSERT/UPDATE/DELETE. It could return the variable modified and the new value. But that doesn't solve the problem --- what about begin, set,

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Yes, rereading the config file would kill my idea --- but what API are we going to pass SET to applications? Passing the info up the client-side stack is an issue, yes, but it will be so in any case. If it's not there in the protocol we haven't even got

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Yes, rereading the config file would kill my idea --- but what API are we going to pass SET to applications? Passing the info up the client-side stack is an issue, yes, but it will be so in any case. If it's not there in the

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: The question is whether a client-side implementation of autocommit is going to allow SET to begin a transaction when autocommit is off. Well, that'd be up to the client to decide ... but I would imagine they'd probably make it do so. AFAIR the reason we

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Peter Eisentraut
Tom Lane writes: If the JDBC driver needs to do anything different for one encoding than another, then it needs to be informed of changes. We can debate what's the most appropriate way to keep it informed, but I don't think we can just ignore the need to inform it. We can just say, Don't

Re: [HACKERS] A bad behavior under autocommit off mode

2003-03-24 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: We can just say, Don't alter the client encoding behind the back of the driver. We can perhaps get away with saying that for client_encoding, but what of DateStyle? SET has been the traditional way to adjust that since the stone age. It seems to me

Re: [HACKERS] [ADMIN] Regular expressions in PostgreSQL

2003-03-24 Thread Robert Treat
See chapter 6.6.3. POSIX Regular Expressions in the Users Guide Robert Treat On Thu, 2003-03-13 at 20:27, Partho Bhowmick wrote: Is the regular expression used by Postgres POSIX compliant? Regards, Partho ---(end of broadcast)--- TIP 3: if