Re: [HACKERS] Modular Type Libraries: was A real currency type

2006-03-22 Thread Martijn van Oosterhout
On Tue, Mar 21, 2006 at 10:39:03PM -0500, Tom Lane wrote: AFAICS, the main part of the type system that isn't modular is the support for type parameters (a/k/a typmod), such as the maximum length for varchar or the precision/scale for numeric. We could certainly invent an API for interpreting

Re: [PATCHES] [HACKERS] Automatically setting work_mem

2006-03-22 Thread Simon Riggs
On Wed, 2006-03-22 at 07:48 +, Simon Riggs wrote: On Tue, 2006-03-21 at 17:47 -0500, Tom Lane wrote: I'm fairly unconvinced about Simon's underlying premise --- that we can't make good use of work_mem in sorting after the run building phase --- anyway. We can make good use of

[HACKERS] Request from Tom--offlist

2006-03-22 Thread Jonah H. Harris
Hey Tom, In regards to your last email to me, I'd like your help and advice. In the past, I'd heard that you block a ton of emails, so I'm not sure whether you received my response or not. If you would, please reply to me privately with info. Thanks! Sorry for posting this to the list guys!--

[HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Thomas Hallgren
Imagine the following scenario: Function 'A' returns SETOF 'x'. It will issue a query using SPI that calls function 'B'. This function returns SETOF 'y'. Each tuple of 'x' is formed from some data in 'y'. There will be millions of tuples so building a set of 'y' in memory is not an option.

Re: [HACKERS] Patch Submission Guidelines

2006-03-22 Thread Mark Wong
On Tue, 14 Feb 2006 21:54:12 + Simon Riggs [EMAIL PROTECTED] wrote: On Tue, 2006-02-14 at 16:17 -0500, Andrew Dunstan wrote: If I had enough time there are all sorts of things like this I'd love to set up. A fetchable url that says try these experimental CVS branches or something

Re: [HACKERS] Modular Type Libraries: was A real currency type

2006-03-22 Thread William ZHANG
Tom Lane [EMAIL PROTECTED] Timestamps and numerics are definitely in the spec, geometric and network types are definitely not. IIRC, bitstring types are in SQL99 but for some reason are deprecated in SQL2003 (if anyone knows the reasoning behind the SQL committee's about-face on that, please

Re: [HACKERS] Automatically setting work_mem

2006-03-22 Thread Luke Lonergan
Tom, On 3/21/06 3:06 PM, Tom Lane [EMAIL PROTECTED] wrote: The real problem we are facing with a whole lot of our optimization issues (not only sorting) is that it's not all that trivial to get credible experimental results that we can expect will hold up across a range of usage scenarios.

[HACKERS] How to put back??

2006-03-22 Thread Dhanaraj M - Sun Microsystems
Hi all, I have recented joined and working on postgres. I fixed a bug that I saw in the mailing list. I ran the regression test that is available in postgres. It was successful and now I need the following details.. 1) Test suits that i could get to test my code.. 2) How can I put back my

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Martijn van Oosterhout
On Wed, Mar 22, 2006 at 03:31:59PM +0100, Thomas Hallgren wrote: Imagine the following scenario: Function 'A' returns SETOF 'x'. It will issue a query using SPI that calls function 'B'. This function returns SETOF 'y'. Each tuple of 'x' is formed from some data in 'y'. There will be

Re: [HACKERS] How to put back??

2006-03-22 Thread Martijn van Oosterhout
On Wed, Mar 22, 2006 at 12:22:04PM +0530, Dhanaraj M - Sun Microsystems wrote: Hi all, I have recented joined and working on postgres. I fixed a bug that I saw in the mailing list. I ran the regression test that is available in postgres. It was successful and now I need the following

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes: I think you're running into a small limitation of set functions here. If you look at nodeFunctionScan.c that handles this, you can see that the code is written in such a way as to collect all the tuples first before returning anything. I don't

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Andrew Dunstan
Tom Lane wrote: plpgsql and similar languages will return a tuplestore anyway, so it has to handle that case, and it was convenient to make all the cases look alike for starters. Nobody's yet gone back to improve it for the case of languages that return a tuple per call. This would be

Re: [HACKERS] How to put back??

2006-03-22 Thread Adrian Maier
On 3/22/06, Dhanaraj M - Sun Microsystems [EMAIL PROTECTED] wrote: Hi all, I have recented joined and working on postgres. I fixed a bug that I saw in the mailing list. I ran the regression test that is available in postgres. It was successful and now I need the following details.. 1) Test

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Thomas Hallgren
Recursive calls works in PL/Java. No problem there. But the larger the set, the more memory it consumes. Do I read your answers correctly if I conclude this is a known limitation when SPI is used? I.e. there's no way to stream one row at a time without ever building the full set? Regards,

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Alvaro Herrera
Thomas Hallgren wrote: Recursive calls works in PL/Java. No problem there. But the larger the set, the more memory it consumes. Do I read your answers correctly if I conclude this is a known limitation when SPI is used? I.e. there's no way to stream one row at a time without ever building

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Tom Lane
Thomas Hallgren [EMAIL PROTECTED] writes: Recursive calls works in PL/Java. No problem there. But the larger the set, the more memory it consumes. Do I read your answers correctly if I conclude this is a known limitation when SPI is used? I.e. there's no way to stream one row at a time

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Andrew Dunstan
Thomas Hallgren wrote: Recursive calls works in PL/Java. No problem there. But the larger the set, the more memory it consumes. Do I read your answers correctly if I conclude this is a known limitation when SPI is used? I.e. there's no way to stream one row at a time without ever building the

Re: [HACKERS] 8.2 planning features

2006-03-22 Thread Robert Treat
On Tuesday 21 March 2006 18:59, satoshi nagayasu wrote: Tom Lane wrote: In particular, asking for a list of features that will be done in particular future releases shows a complete lack of understanding of the process ... I completely understand. However, we also need to know why

Re: [HACKERS] 8.2 planning features

2006-03-22 Thread Andrew Dunstan
Robert Treat wrote: On Tuesday 21 March 2006 18:59, satoshi nagayasu wrote: Tom Lane wrote: In particular, asking for a list of features that will be done in particular future releases shows a complete lack of understanding of the process ... I completely understand. However,

Re: [HACKERS] How to put back??

2006-03-22 Thread Darcy Buskermolen
On Tuesday 21 March 2006 22:52, Dhanaraj M - Sun Microsystems wrote: Hi all, I have recented joined and working on postgres. I fixed a bug that I saw in the mailing list. I ran the regression test that is available in postgres. It was successful and now I need the following details.. 1)

Re: [HACKERS] How to put back??

2006-03-22 Thread Chris Browne
[EMAIL PROTECTED] (Dhanaraj M - Sun Microsystems) writes: Hi all, I have recented joined and working on postgres. I fixed a bug that I saw in the mailing list. I ran the regression test that is available in postgres. It was successful and now I need the following details.. 1) Test suits

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Thomas Hallgren
Tom Lane wrote: Thomas Hallgren [EMAIL PROTECTED] writes: Recursive calls works in PL/Java. No problem there. But the larger the set, the more memory it consumes. Do I read your answers correctly if I conclude this is a known limitation when SPI is used? I.e. there's no way to stream one

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Martijn van Oosterhout
On Wed, Mar 22, 2006 at 09:09:34PM +0100, Thomas Hallgren wrote: There's one thing that's still a bit fuzzy to me. If I don't use SPI, the context that is current when my SRF function is called seems to be reset between each call. I can palloc stuff in it as much as I like. I can even

[HACKERS] Accessing schema data in information schema

2006-03-22 Thread Peter Eisentraut
I'm updating the information schema for SQL:2003. I'm having some difficulties with the sequences view. It should look approximately like this (uninteresting stuff omitted): CREATE VIEW sequences AS SELECT CAST(current_database() AS sql_identifier) AS sequence_catalog,

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: How does one get at the missing fields. The only way I know is selecting from the sequence, but how does one work this into this query? Somehow it seems that these things should be stored in a real system catalog. Yeah. I've occasionally toyed

Re: [HACKERS] Recursive calls to functions that return sets

2006-03-22 Thread Tom Lane
Thomas Hallgren [EMAIL PROTECTED] writes: But if I, during the SPI_IS_FIRST_CALL phase, do an SPI_connect (done when the 'multi_call_memory_ctx' is current), then the leak seem to occur immediately. Will that connect somehow alter the durability for the context that is current on each call

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Hannu Krosing
Ühel kenal päeval, K, 2006-03-22 kell 16:11, kirjutas Tom Lane: Peter Eisentraut [EMAIL PROTECTED] writes: How does one get at the missing fields. The only way I know is selecting from the sequence, but how does one work this into this query? Somehow it seems that these things should be

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Tom Lane
Hannu Krosing [EMAIL PROTECTED] writes: Ühel kenal päeval, K, 2006-03-22 kell 16:11, kirjutas Tom Lane: Yeah. I've occasionally toyed with the idea that sequences should be rows in a single catalog instead of independent tables as they are now. This would make for a much smaller disk

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Hannu Krosing
Ühel kenal päeval, K, 2006-03-22 kell 17:29, kirjutas Tom Lane: Hannu Krosing [EMAIL PROTECTED] writes: Ühel kenal päeval, K, 2006-03-22 kell 16:11, kirjutas Tom Lane: Yeah. I've occasionally toyed with the idea that sequences should be rows in a single catalog instead of independent

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Alvaro Herrera
Hannu Krosing wrote: I guess we can't easily start locking some subarea of a page, say 256 byte subpage, or just the tuple. OTOH it may be possible as we don't need to lock page header for sequences as the tuple is updated in place and will not change in size. Huh, we _can_ lock individual

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Hannu Krosing wrote: I guess we can't easily start locking some subarea of a page, say 256 byte subpage, or just the tuple. Huh, we _can_ lock individual tuples, using LockTuple() (or rather, heap_lock_tuple). Since the tuple is modified in place,

[HACKERS] create type error message

2006-03-22 Thread Jim Buttafuoco
# select version(); version PostgreSQL 8.1.3 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) (1 row) simple example: # create type a

[HACKERS] Where does the time go?

2006-03-22 Thread Kevin Grittner
I have some odd results from timing two versions of an update query, and was hoping to get a better handle on how to interpret this. The query does an update of one table. One version does three NOT IN tests against three related tables. The other version does the logically equivalent NOT

Re: [HACKERS] Modular Type Libraries: was A real currency type

2006-03-22 Thread Trent Shipley
On Wednesday 2006-03-22 08:53, William ZHANG wrote: Tom Lane [EMAIL PROTECTED] Timestamps and numerics are definitely in the spec, geometric and network types are definitely not. IIRC, bitstring types are in SQL99 but for some reason are deprecated in SQL2003 (if anyone knows the

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Darcy Buskermolen
On Wednesday 22 March 2006 13:11, Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: How does one get at the missing fields. The only way I know is selecting from the sequence, but how does one work this into this query? Somehow it seems that these things should be stored in a

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Tom Lane
Darcy Buskermolen [EMAIL PROTECTED] writes: On Wednesday 22 March 2006 13:11, Tom Lane wrote: (Thinks a bit...) Maybe it would work for pg_sequence to be a real catalog with a row per sequence, and we also create a view named after the sequence that simply selects from pg_sequence with an

Re: [HACKERS] Static build of psql with readline support

2006-03-22 Thread Mark Kirkwood
Christopher Kings-Lynne wrote: To the GP, adding -lncurses (or rather the static equivalent) to your link line should solve it. But if you include any other libraries like ssl or kerberos be prepared to add a lot more. With -lncurses or -lcurses I still can't get this to work. I add it to

[HACKERS] On vacation

2006-03-22 Thread Bruce Momjian
I am heading on vacation starting tomorrow/Thursday, and return the following Thursday, March 30th. I will be in Florida with my family. -- Bruce Momjian http://candle.pha.pa.us SRA OSS, Inc. http://www.sraoss.com + If your life is a hard drive, Christ can be your backup. +

Re: [HACKERS] Where does the time go?

2006-03-22 Thread Tom Lane
Kevin Grittner [EMAIL PROTECTED] writes: I have some odd results from timing two versions of an update query, and was hoping to get a better handle on how to interpret this. You didn't show us the explain analyze results, but I'm betting that a big part of your issue is that the EXPLAIN ANALYZE

Re: [HACKERS] Static build of psql with readline support

2006-03-22 Thread Andrew Dunstan
Mark Kirkwood said: Christopher Kings-Lynne wrote: To the GP, adding -lncurses (or rather the static equivalent) to your link line should solve it. But if you include any other libraries like ssl or kerberos be prepared to add a lot more. With -lncurses or -lcurses I still can't get this to

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Andrew Dunstan
Tom Lane said: Darcy Buskermolen [EMAIL PROTECTED] writes: On Wednesday 22 March 2006 13:11, Tom Lane wrote: (Thinks a bit...) Maybe it would work for pg_sequence to be a real catalog with a row per sequence, and we also create a view named after the sequence that simply selects from

Re: [HACKERS] On vacation

2006-03-22 Thread Michael Glaesemann
On Mar 23, 2006, at 11:43 , Bruce Momjian wrote: I am heading on vacation starting tomorrow/Thursday, and return the following Thursday, March 30th. I will be in Florida with my family. Have a great trip! Michael Glaesemann grzm myrealbox com ---(end of

Re: [HACKERS] Static build of psql with readline support

2006-03-22 Thread Mark Kirkwood
Andrew Dunstan wrote: Mark Kirkwood said: Christopher Kings-Lynne wrote: To the GP, adding -lncurses (or rather the static equivalent) to your link line should solve it. But if you include any other libraries like ssl or kerberos be prepared to add a lot more. With -lncurses or -lcurses I

Re: [HACKERS] Static build of psql with readline support

2006-03-22 Thread Andrew Dunstan
Mark Kirkwood said: Andrew Dunstan wrote: Mark Kirkwood said: Christopher Kings-Lynne wrote: To the GP, adding -lncurses (or rather the static equivalent) to your link line should solve it. But if you include any other libraries like ssl or kerberos be prepared to add a lot more. With

Re: [HACKERS] Static build of psql with readline support

2006-03-22 Thread Mark Kirkwood
Andrew Dunstan wrote: Mark Kirkwood said: Andrew Dunstan wrote: Mark Kirkwood said: Christopher Kings-Lynne wrote: To the GP, adding -lncurses (or rather the static equivalent) to your link line should solve it. But if you include any other libraries like ssl or kerberos be prepared to

Re: [HACKERS] Static build of psql with readline support

2006-03-22 Thread Andrew Dunstan
Mark Kirkwood said: FC3: /home/andrew/pglive/pgsql.plperl-pq/src/interfaces/libpq/ip.c:79: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking collect2: ld returned 1 exit status make: *** [psql]

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Tom Lane
Andrew Dunstan [EMAIL PROTECTED] writes: What happens to sequence ACLs? Hm, good point. We could put 'em in pg_sequence, except that most of the operations on pg_sequence rows will be nontransactional, and that doesn't seem to square nicely with transactional updates on ACLs. Maybe we need two

Re: [HACKERS] Accessing schema data in information schema

2006-03-22 Thread Christopher Kings-Lynne
Hm, good point. We could put 'em in pg_sequence, except that most of the operations on pg_sequence rows will be nontransactional, and that doesn't seem to square nicely with transactional updates on ACLs. Maybe we need two catalogs just to separate the transactional and nontransactional data for

Re: [HACKERS] create type error message

2006-03-22 Thread Tom Lane
Jim Buttafuoco [EMAIL PROTECTED] writes: # create type a as (a text,b int); CREATE TYPE # create type a as (a text,b int); ERROR: relation a already exists seems like ERROR: type a already exists would be better. It's not really all that easy, because tables and composite types both

[HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Enver ALTIN
Hi, We have been having a short talk with Devrim this evening about the pgnixInstaller[1] project he started[2] a while ago. I have briefly read over the thread following the project announce, particularly comments on issues about package systems of distributions and integration with them.

Re: [HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Enver ALTIN
Hey, Enver ALTIN wrote: Next step would be a simple, possibly shell-script and xdialog/zenity[4] based prototype installer. I personally can't afford the Python thing, Solaris and possibly others don't have it yet and embedding Python in a shell script is not the brightest idea obviously.

Re: [HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Tom Lane
Enver ALTIN [EMAIL PROTECTED] writes: In order to achieve this *properly*, I intend to make PostgreSQL relocatable, that is, PostgreSQL should be able to run if you `copy` it's binaries somewhere else -- no matter where you `./configure --prefix`ed it. I took a very quick look at some parts

Re: [HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Enver ALTIN
Hi Tom, Tom Lane wrote: Enver ALTIN [EMAIL PROTECTED] writes: In order to achieve this *properly*, I intend to make PostgreSQL relocatable, that is, PostgreSQL should be able to run if you `copy` it's binaries somewhere else -- no matter where you `./configure --prefix`ed it. I took a very

Re: [HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Tom Lane
Enver ALTIN [EMAIL PROTECTED] writes: Tom Lane wrote: s/doable/already done/, no? I did a Google search on relocatable PostgreSQL and the first result[1] said it's already done. Apparently it didn't work for me on Solaris 8 (linking problems). I'll be looking at it sometime today. OK ...

Re: [HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Josh Berkus
Enver, Fortunately we're not alone in the universe, several other projects suffered from the very same problem. Including the much larger OpenOffice.org project. Are you crossing over from OpenOffice.org? Hi! I'm former OOo now PG and likely to get involved with OOo again very soon ... --

[HACKERS] Get explain output of postgresql in Tables

2006-03-22 Thread Akshat Nair
HiI read a post in the archives saying about storing explain output directly into tables. Is this feature present in postgres now??I have a software in which I need to display the explain output in a Tree format, for which I need to parse the textual plan and get the relvant information. I have a

Re: [HACKERS] Get explain output of postgresql in Tables

2006-03-22 Thread Tom Lane
Akshat Nair [EMAIL PROTECTED] writes: Can I get the grammar for the explain output? There isn't one, it's just text and subject to change at a moment's notice :-(. The past proposals that we format it a bit more rigidly have so far foundered for lack of a workable definition of what the

Re: [HACKERS] pgNixInstaller: Making PostgreSQL relocatable

2006-03-22 Thread Greg Stark
Tom Lane [EMAIL PROTECTED] writes: Enver ALTIN [EMAIL PROTECTED] writes: Tom Lane wrote: s/doable/already done/, no? I did a Google search on relocatable PostgreSQL and the first result[1] said it's already done. Apparently it didn't work for me on Solaris 8 (linking problems).