[GENERAL] SQL Agreate Functions

2004-11-02 Thread Alex P
Hi, I have a problem I dont really know how to solve except for writing a function. I have a table with prices; SecCode| Price | PriceDate ---++--- A0001 | 13.10 | 2004-10-30 A0001 | 13.03 | 2004-10-29 A0001 | 13.12 | 2004-10-28 A0001 | 12.45 | 2004-10-27

[GENERAL] Subselect Question

2004-11-02 Thread Alex P
Hi, when creating a query with a subselect SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name) AS max_pop FROM states; then it is not possible to sort after max_pop or use max_pop in a function or a CASE. am I dont anything wrong or is this meant to be the case? Thanks

[GENERAL] Postgres Versions / Releases

2004-11-02 Thread Alex P
Will there be a release 7.4.7 in the future? When can the production release of 8 be expected? thanks Alex ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not

Re: [GENERAL] Numeric type problems

2004-11-02 Thread M.A. Oude Kotte
This is a very interesting option. My biggest concern is performance: the project will require tables with millions of tuples. How does the performance of such user created types compare to using native types? Or are they 'built' using the same structure? Thanks again! Marc Paul Tillotson

Re: [GENERAL] Postgres Versions / Releases

2004-11-02 Thread Peter Eisentraut
Am Dienstag, 2. November 2004 09:09 schrieb Alex P: Will there be a release 7.4.7 in the future? Possibly. When can the production release of 8 be expected? When it's ready. Probably this year. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end

Re: [GENERAL] Split query

2004-11-02 Thread Tino Wildenhain
Hi, On Tue, 2004-11-02 at 07:47, Katsaros Kwn/nos wrote: Hi! I want to parse a query (SFW) and create new queries: one for each table referenced, if that possible. I've written a function for this in the Query struct level after parserewrite (not very general ofcourse :-)) but I would

Re: [GENERAL] Subselect Question

2004-11-02 Thread Tino Wildenhain
Hi, On Tue, 2004-11-02 at 09:05, Alex P wrote: Hi, when creating a query with a subselect SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name) AS max_pop FROM states; then it is not possible to sort after max_pop or use max_pop in a function or a CASE. Hm.

Re: [GENERAL] Split query

2004-11-02 Thread Katsaros Kwn/nos
Well, the second question is trivial indeed :-) ,even though I had pipelining in mind when writting it... (which is not so query oriented but rather plan/executor oriented) However, I'm more interested in the first question. Thank you very much, Ntinos Tino Wildenhain wrote: Hi, On Tue,

Re: [GENERAL] Subselect Question

2004-11-02 Thread Sim Zacks
You can't use the alias name in the sort, case, where etc.. you have to use the entire subselect. So you would order by (select max(pop)...) and you would also case the full thing as well. A bit of a pain but Tom Lane explained it in a post a couple days ago and said the system was optimized so it

Re: [GENERAL] Subselect Question

2004-11-02 Thread Richard Huxton
Alex P wrote: Hi, when creating a query with a subselect SELECT name, (SELECT max(pop) FROM cities WHERE cities.state = states.name) AS max_pop FROM states; then it is not possible to sort after max_pop or use max_pop in a function or a CASE. Here max_pop is naming the whole subselect. How

Re: [GENERAL] Postgres Versions / Releases

2004-11-02 Thread Richard Huxton
Alex P wrote: Will there be a release 7.4.7 in the future? Maybe - there have been patches for 7.3 after 7.4 was released. It depends if any serious bugs are found. When can the production release of 8 be expected? The official answer is when it's ready. If I were a betting man, I'd be happy

Re: [GENERAL] SQL Agreate Functions

2004-11-02 Thread Richard Huxton
Alex P wrote: Hi, I have a problem I dont really know how to solve except for writing a function. [snip] What I would like to calculate is: a) the difference of the past 2 days for every security of available prices Find the maximum date for a give SecCode (simple enough) and then the maximum

Re: [GENERAL] Reasoning behind process instead of thread based

2004-11-02 Thread Marco Colombo
[Cc: list minimized] On Tue, 2 Nov 2004, Neil Conway wrote: I don't see the big difference between what Marco is suggesting and user threads -- or to be more precise, I think user threads and event-based programming are just two sides of the same coin. A user thread just represents the state of

Re: [GENERAL] Rows created by a stored proc prompt Access' dreaded write conflict

2004-11-02 Thread Jeff Eckermann
--- Sim Zacks [EMAIL PROTECTED] wrote: After the stored procedure is run, call requery on the form that was updated. We are in the middle of moving Access implementations to PostGreSQL. I'd be happy to trade war stories, if you'd like. I hope that you do it on the list, so that the rest

Re: [GENERAL] Rows created by a stored proc prompt Access' dreaded write conflict

2004-11-02 Thread Sim Zacks
Maybe you need some ODBC settings reconfigured: Here's what I have, I read a couple of these settings on various lists and websites and others were the defaults. I would guess if you don't have row versioning checked, that is the problem. Also, if you change ODBC settings you have to

Re: [GENERAL] Postgres Versions / Releases

2004-11-02 Thread Bruno Wolff III
On Tue, Nov 02, 2004 at 19:09:02 +1100, Alex P [EMAIL PROTECTED] wrote: Will there be a release 7.4.7 in the future? You can get a snapshot of the 7.4 stable cvs if there is some post 7.4.6 fix you are interested in, before there is a 7.4.7 release. ---(end of

Re: [GENERAL] Calling on all SQL guru's

2004-11-02 Thread Alvaro Herrera
On Mon, Nov 01, 2004 at 05:34:21PM -0800, John Fabiani wrote: God bless you! It works as expected. But is it possible to create a SQL statement using only the pg files. This will allow it to be used with 7.3.x and later. I have been trying for a full day. Actually, I really need to

Re: [GENERAL] Daylight Savings Time handling on persistent connections

2004-11-02 Thread Steve Crawford
On Sunday 31 October 2004 11:44 am, Tom Lane wrote: Randall Nortman [EMAIL PROTECTED] writes: Ah, I see now. PostgreSQL is behaving a bit differently than I expected. The timestamp string above is ambiguous in the timezone US/Eastern -- it could be EST or EDT. I was expecting

[GENERAL] Batch processing select

2004-11-02 Thread Steve Crawford
I'm still mulling the best way to handle this situation. I have a table that describes work to be processed. This table includes a description of the work as well as priority and scheduling information (certain records can only be handled by certain client processes or at particular times of

Re: [GENERAL] Numeric type problems

2004-11-02 Thread Paul Tillotson
First, every type in postgres is user-defined, in the sense that its binary structure and the arithmetic and comparison operations you can perform on it are defined by a set of native C functions that are present in the database executable or loaded as shared libraries. Because of postgres's

[GENERAL] unsubscribe

2004-11-02 Thread Keow Yeong Huat Joseph
unsubscribe from postgresql maillist