Re: [HACKERS] tsearch thoughts

2002-12-02 Thread Teodor Sigaev
I mean, when the index is created over the text column, instead of just indexing the text as-is, index the txt2txtidx'd version...? For two reasons: 1. gist_txtidx_ops create with loss information (for less size), so any operation with index must be checked with original txtidx value. The way

[HACKERS] 7.4 Wishlist

2002-12-02 Thread Lee Kindness
Christopher Kings-Lynne writes: Just out of interest, if someone was going to pay you to hack on Postgres for 6 months, what would you like to code for 7.4? Well judging by the hoards on Slashdot, it would appear that replication is the hot enhancement... Slashdot | PostgreSQL 7.3 Released

Re: [HACKERS] [GENERAL] One SQL to access two databases.

2002-12-02 Thread Shridhar Daithankar
On 2 Dec 2002 at 12:05, Karel Zak wrote: On Sat, Nov 30, 2002 at 01:11:20PM -0800, Joe Conway wrote: As I said, this is all very preliminary; comments, suggestions, requests are all welcome. Only idea/dream: what implement dblink as virtual schema. CREATE SCHEMA myschema AS DBLINK TO ...

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Igor Georgiev
Native Windows port Plz don't forget poor victims of Microsoft !!!

Re: [HACKERS] [GENERAL] One SQL to access two databases.

2002-12-02 Thread Karel Zak
On Sat, Nov 30, 2002 at 01:11:20PM -0800, Joe Conway wrote: As I said, this is all very preliminary; comments, suggestions, requests are all welcome. Only idea/dream: what implement dblink as virtual schema. CREATE SCHEMA myschema AS DBLINK TO ... some connection options ...; SELECT *

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Tommi Maekitalo
Am Sonntag, 1. Dezember 2002 06:47 schrieb Tom Lane: Joe Conway [EMAIL PROTECTED] writes: Someone asked earlier about how to change a bunch of existing tables int the PUBLIC schema to some other schema. For grins I tried: regression=# update pg_class set relnamespace=556829 where relname =

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Prasanna Phadke
How about giving OLAP (Dimension / Measure) functionality to PG. Catch all the cricket action. Download Yahoo! Score tracker

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Karel Zak
On Fri, Nov 29, 2002 at 10:51:26AM -0800, Christopher Kings-Lynne wrote: Hi guys, Just out of interest, if someone was going to pay you to hack on Postgres for 6 months, what would you like to code for 7.4? This is interesting discussion.. my wish: * error codes. It's very

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Dave Page
-Original Message- From: Karel Zak [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 11:26 To: Christopher Kings-Lynne Cc: [EMAIL PROTECTED] Subject: Re: [HACKERS] 7.4 Wishlist On Fri, Nov 29, 2002 at 10:51:26AM -0800, Christopher Kings-Lynne wrote: Hi guys, Just out

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Nicolai Tufar
my wish: * error codes. It's very interesting that nobody other wants it... I do :-) Me too. It is a must in my opinion.. Regards, Nic. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Fernando Nasser
Joe Conway wrote: Christopher Kings-Lynne wrote: possible. We should probably just go with your suggestion. Anything else beyond the relnamespace and pg_depend entries that need to be dealt with? What about sequences for serial columns? What about views or types that depend on the table?

Re: [HACKERS] 7.3 gotchas for applications and client libraries

2002-12-02 Thread Lee Kindness
Tom/Hackers, Going back a bit, but relevant with 7.3's release... Tom Lane writes on 03 Sep 2002: Lee Kindness [EMAIL PROTECTED] writes: [ original post was regarding the mileage in adding utility functions to PostgreSQL to cut-out common catalog lookups, thus making apps less

[HACKERS] Patch to make Turks happy.

2002-12-02 Thread Nicolai Tufar
Hi, Yet another problem with Turkish encoding. clean_encoding_name() in src/backend/utils/mb/encnames.c uses tolower() to convert locale names to lower-case. This causes errors if locale name contains capital I and current olcale is Turkish. Some examples: aaa=# \l List of databases

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Joe Conway
Fernando Nasser wrote: Why not just leave the sequence and types in the original schema and make sure the table refers to them _there_? We just need to make sure we have schema qualified references to the sequences and types. Well, the type entry for the relation *is* related to just one

Re: [HACKERS] Postgres 7.3 announcement on postgresql.org

2002-12-02 Thread Marc G. Fournier
On Fri, 29 Nov 2002, Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Has there been a release? It certainly hasn't been announced in the usual places that I monitor. Marc claimed he'd put out the announcement on pgsql-announce, but that copy of the message never arrived here

Re: [HACKERS] Postgres 7.3 announcement on postgresql.org

2002-12-02 Thread Marc G. Fournier
On Fri, 29 Nov 2002, Vince Vielhaber wrote: On Fri, 29 Nov 2002, Bruce Momjian wrote: FYI, Vince, I started reading all my email (using elm) in a special 120 column wide, 38 row xterm. There was just too much detail in those subjects i was missing. Doesn't do me much good if too

Re: [HACKERS] Postgres 7.3 announcement on postgresql.org

2002-12-02 Thread Vince Vielhaber
On Mon, 2 Dec 2002, Marc G. Fournier wrote: On Fri, 29 Nov 2002, Vince Vielhaber wrote: On Fri, 29 Nov 2002, Bruce Momjian wrote: FYI, Vince, I started reading all my email (using elm) in a special 120 column wide, 38 row xterm. There was just too much detail in those subjects

Re: [HACKERS] [GENERAL] One SQL to access two databases.

2002-12-02 Thread Joe Conway
Karel Zak wrote: On Sat, Nov 30, 2002 at 01:11:20PM -0800, Joe Conway wrote: As I said, this is all very preliminary; comments, suggestions, requests are all welcome. Only idea/dream: what implement dblink as virtual schema. CREATE SCHEMA myschema AS DBLINK TO ... some connection options

[HACKERS] numeric to text (7.3)

2002-12-02 Thread Szima Gábor
Hello In PostgreSQL 7.2/7.1: template1=# select text(2.000::numeric); text -- 2 (1 row) In 7.3: template1=# select text(2.000::numeric); text --- 2.000 (1 row) The text(numeric) function doesn't round numbers. :( This is bug or feature? :)

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Fernando Nasser
I wonder if the sequences created by SERIAL should not be going into a pg_sequence schema and protected like the toast tables are. One could still share sequences by explicitly creating them and using a DEFAULT clause with nextval(). We could even stop printing that annoying NOTICE ;-)

[HACKERS] 7.3: Change in cursor behaviour?

2002-12-02 Thread Jeroen T. Vermeulen
I've been getting reports of one of my test scenarios for libpqxx failing with postgres 7.3. At the moment I can't reproduce this (I'm still on 7.2) and I can't find anything pertinent in CVS commit messages, mailing lists etc. so I'd really appreciate any lucidity from this list. My problem

Re: [HACKERS] numeric to text (7.3)

2002-12-02 Thread Rod Taylor
template1=# select text(2.000::numeric); text --- 2.000 (1 row) The text(numeric) function doesn't round numbers. :( This is bug or feature? :) I'd say feature in that it doesn't reduce the precision of the number. -- Rod Taylor [EMAIL PROTECTED] PGP Key:

Re: [HACKERS] numeric to text (7.3)

2002-12-02 Thread Joel Burton
On Mon, Dec 02, 2002 at 01:35:47PM -0500, Rod Taylor wrote: template1=# select text(2.000::numeric); text --- 2.000 (1 row) The text(numeric) function doesn't round numbers. :( This is bug or feature? :) I'd say feature in that it doesn't reduce the precision of the

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Rod Taylor
We could even stop printing that annoying NOTICE ;-) Agreed with this part :) -- Rod Taylor [EMAIL PROTECTED] PGP Key: http://www.rbt.ca/rbtpub.asc signature.asc Description: This is a digitally signed message part

Re: [HACKERS] 7.3: Change in cursor behaviour?

2002-12-02 Thread Rod Taylor
On Mon, 2002-12-02 at 10:20, Jeroen T. Vermeulen wrote: The scenario boils down to: Create a cursor, fetch n rows, move minus 2 billion or so rows, fetch 1 row. That last fetch used to give me the row I was hoping for (the original first row again), but with 7.3 it appears to yield nothing.

Re: [HACKERS] numeric to text (7.3)

2002-12-02 Thread Rod Taylor
This feature is missing from 7.3.. (new round function is good idea (e.g. fround(numeric)) double precision | pg_catalog | round | double precision numeric | pg_catalog | round | numeric numeric | pg_catalog | round | numeric, integer Looks

Re: [HACKERS] 7.3: Change in cursor behaviour?

2002-12-02 Thread Jeroen T. Vermeulen
On Mon, Dec 02, 2002 at 02:29:03PM -0500, Rod Taylor wrote: Seems to work the fine for me: Puzzling... Would you mind, if you have time, downloading libpqxx from GBorg and doing a ./configure; make; make check and telling me if tests 19 38 succeed? I expect them to have identical results,

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Mysql is planning on making this work: SELECT id, @a:=COUNT(*), SUM(sum_col)/@a FROM table_name GROUP BY id. Do we have anything like it (After a discussion with Tom i figure no). User variables is nice, especially in these kind of queries. Nice would be to be able to use them as in C (almost

Re: [HACKERS] numeric to text (7.3)

2002-12-02 Thread Joel Burton
On Mon, Dec 02, 2002 at 08:23:24PM +0100, Szima Gábor wrote: OK, but: template1=# select round('2.001'::numeric); round --- 2 (1 row) template1=# select round('2.001'::numeric,2); round --- 2.00 (1 row) The good idea (in 7.2): template1=# select

[HACKERS] PG 7.3: Query Meta Data with the JDBC-driver

2002-12-02 Thread Henner Zeller
Hi, Just compiled the 7.3 branch from source and made some tests using the JDBC driver coming with it. I did some tests with the henplus JDBC-shell and noticed some problems quering the database meta data: o the foreign key name is 'wierd' --- DatabaseMetaData meta =

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Christopher Kings-Lynne
Yeah, good point. I think properly dealing with the pg_depends issues will catch anything of that nature, but what to do with them? Probably should move dependent type, constraint, index entries to the same new namespace. We might want to move related sequences, but I'm not sure we'd want to

Re: [HACKERS] toast table growing indefinitely? Known

2002-12-02 Thread Christopher Kings-Lynne
Good call; they are still default (1 pages) and we are seeing 26000 pages per day being updated: NOTICE: Removed 102226 tuples in 26002 pages. CPU 2.02s/1.87u sec elapsed 69.85 sec. NOTICE: Pages 201819: Changed 26128, Empty 0; Tup 315227: Vac 102226, Keep 0, UnUsed 393793.

[HACKERS] [GENERAL] PostgreSQL Global Development Group Announces Version 7.3(fwd)

2002-12-02 Thread Bruce Momjian
Wow, this sounds great. Where can I get a copy? Why would anyone use anything else? ;-) -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Christopher Kings-Lynne
Mysql is planning on making this work: SELECT id, @a:=COUNT(*), SUM(sum_col)/@a FROM table_name GROUP BY id. Do we have anything like it (After a discussion with Tom i figure no). User variables is nice, especially in these kind of queries. Well of course they have to make that work -

Re: [HACKERS] PG 7.3: Query Meta Data with the JDBC-driver

2002-12-02 Thread Kris Jurka
On Mon, 2 Dec 2002, Henner Zeller wrote: Hi, Just compiled the 7.3 branch from source and made some tests using the JDBC driver coming with it. I did some tests with the henplus JDBC-shell and noticed some problems quering the database meta data: o the foreign key name is 'wierd'

[HACKERS] ALTER .. ADD PRIMARY KEY

2002-12-02 Thread Rod Taylor
Right now ALTER .. ADD PRIMARY KEY insists that the columns must be NOT NULL first. I'd like to change it so that it automatically creates the NOT NULL constraint (same as CREATE TABLE). I didn't see anything in the spec for or against doing this automatically. I believe the best way to do

Re: [HACKERS] ALTER TABLE schema SCHEMA TO new_schema?

2002-12-02 Thread Rod Taylor
Why just restrict them to moving tables? What if someone wants to move a function or an aggregate to another schema? What if they want to copy it? Copying might be tricky, but I'd be happy to help with moving everything else around. Though I don't think sequences can move (until we can

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Christopher Kings-Lynne [EMAIL PROTECTED] wrote: Mysql is planning on making this work: SELECT id, @a:=COUNT(*), SUM(sum_col)/@a FROM table_name GROUP BY id. Do we have anything like it (After a discussion with Tom i figure no). User variables is nice, especially in these kind of queries.

Re: [HACKERS] toast table growing indefinitely? Known

2002-12-02 Thread Rod Taylor
I've increased the value to 4 since we have much busier days, and I'll se what happens. Hang on - so when vacuum runs it knows exactly how many pages it cleaned up but if the fsm value is low, it doesn't help? Why don't we just automaticlaly set the FSM value to the max that vacuum

Re: [HACKERS] protecting prosrc (was Re: [GENERAL] USAGE on schema allowed by

2002-12-02 Thread Robert Treat
NOTE: redirecting to hackers On Mon, 2002-12-02 at 12:50, Joe Conway wrote: Tom Lane wrote: For example, something I've heard repeatedly is that people would like to hide the source code of their SQL or PLxxx functions from users who are nonetheless allowed to call those functions. A

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Christopher Kings-Lynne
Yeah, but there is a point about running count(*) one time too many. Say if i would like to get a prettyprinting query like this: SELECT id, @a:=COUNT(*), sum_col::text||'/'@a::text FROM table_name; That would be DAMN expensive doing with a subselect: SELECT id, sum_col||'/'||(select

Re: [HACKERS] ALTER .. ADD PRIMARY KEY

2002-12-02 Thread Christopher Kings-Lynne
Just check out the AlterTableSetNotNull function in tablecmds.c to see a quick and easy example of checking for NULL values. Chris - Original Message - From: Rod Taylor [EMAIL PROTECTED] To: PostgreSQL-development [EMAIL PROTECTED] Sent: Monday, December 02, 2002 12:31 PM Subject:

Re: [HACKERS] ALTER .. ADD PRIMARY KEY

2002-12-02 Thread Christopher Kings-Lynne
Just check out the AlterTableSetNotNull function in tablecmds.c to see a quick and easy example of checking for NULL values. Chris - Original Message - From: Rod Taylor [EMAIL PROTECTED] To: PostgreSQL-development [EMAIL PROTECTED] Sent: Monday, December 02, 2002 12:31 PM Subject:

Re: [HACKERS] protecting prosrc (was Re: [GENERAL] USAGE on schema allowed by

2002-12-02 Thread Christopher Kings-Lynne
It wouldn't be terribly difficult to encrypt prosrc with 3des (or maybe aes) using the owner's passwd from pg_shadow. We would need a new bool column in pg_proc (proisencrypted?) and some logic in fmgr.c. Is there sufficient interest to justify the effort? I think this would be a

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Christopher Kings-Lynne [EMAIL PROTECTED] wrote: Are you sure that postgres evaluates that subselect more than once? It looks to me like it returns a constant result for every row and hence it will be evaluated once per statement, not once per row. I'm no expert tho. Can someone answer this?

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Stephan Szabo [EMAIL PROTECTED] wrote: If you use a scalar subquery, yes, but I think a subselect in from would help, maybe something like (if you want the total count) select table_name.id, sum(sum_col)||'/'||t2.count from table_name, (select count(*) as count from table_name) as t2 group

Re: [HACKERS] PG 7.3: Query Meta Data with the JDBC-driver

2002-12-02 Thread Rod Taylor
We need contrib/array in 7.4 and unique name in pg_constraint Whelp. I'd like to make the constraint name unique too, but how do you coax everyone into renaming their existing constraints -- especially when there isn't an ALTER CONSTRAINT ... RENAME type statement? -- Rod Taylor [EMAIL

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Stephan Szabo
On Mon, 2 Dec 2002, Magnus Naeslund(f) wrote: Stephan Szabo [EMAIL PROTECTED] wrote: If you use a scalar subquery, yes, but I think a subselect in from would help, maybe something like (if you want the total count) select table_name.id, sum(sum_col)||'/'||t2.count from table_name,

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Bruce Momjian
Joe Conway wrote: David Wheeler wrote: My understanding is that the nul character is legal in a byte sequence, but if it's not properly escaped, it'll be parsed as the end of the statement. Unfortunately, I think that it's a very tough problem to solve. No question wrt '\0' bytes --

[HACKERS] unofficial 7.3 RPMs

2002-12-02 Thread Joe Conway
I've hacked the spec file from a 7.2.x source RPM to produce a 7.3 source RPM. I've also created a set of i686 binary RPMs. These are *not* official PGDG RPMs, and I'm not an RPM expert by any means (so use at your own risk!), but I've posted them in case anyone is interested. I'll leave them

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Gavin Sherry
I want to see: i) proper resource management a-la Oracle. This would allow a DBA to limited the amount of time any given user spends in the parser, planner or executor. It would be limited with a more sophisticated user system, including things like CREATE USER PROFILE ... ii) Auditing. Who

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Christopher Kings-Lynne
i) proper resource management a-la Oracle. This would allow a DBA to limited the amount of time any given user spends in the parser, planner or executor. It would be limited with a more sophisticated user system, including things like CREATE USER PROFILE ... Hehehe - yeah this would be neat.

Re: [HACKERS] Croatian language file for 7.3

2002-12-02 Thread Peter Eisentraut
Darko Prenosil writes: OK, here it is. I do not know if this will help to use postgres some more here in Croatia, but ... I'll put this in the 7.3 branch, so it will be released when 7.3.1 comes out. -- Peter Eisentraut [EMAIL PROTECTED] ---(end of

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Gavin Sherry
On Mon, 2 Dec 2002, Christopher Kings-Lynne wrote: viii) General advocacy, particularly in pushing mainstream IT media coverage, conferences and university usage -- both for teaching SQL and for teach database engineering concepts for senior undergrads. Definitely. How about a resource

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Christopher Kings-Lynne
I might get together with some of the lecturers I've worked with in Sydney to give such a document some weight. I must say, the problem is not a technical one though. I've given talks to 3rd and 4th year students about PostgreSQL -- technical, conceptual, political talks... you name it. Out

PostgreSQL in Universities (Was: Re: [HACKERS] 7.4 Wishlist)

2002-12-02 Thread Gavin Sherry
On Mon, 2 Dec 2002, Christopher Kings-Lynne wrote: I've given a talk in the 2002 honours lecture series at UWA about Postgres and some of the things it can do. All of those guys were interested. Especially since the deptartment does a lot of work in genetic algoriithms. Excellent. Can you

Re: [HACKERS] Auto Vacuum Daemon (again...)

2002-12-02 Thread Matthew T. O'Connor
- Original Message - From: Shridhar Daithankar [EMAIL PROTECTED] To: Matthew T. O'Connor [EMAIL PROTECTED] Sent: Monday, December 02, 2002 11:12 AM Subject: Re: [HACKERS] Auto Vacuum Daemon (again...) On 28 Nov 2002 at 3:02, Matthew T. O'Connor wrote: I went thr. it today and I have

Re: PostgreSQL in Universities (Was: Re: [HACKERS] 7.4 Wishlist)

2002-12-02 Thread Justin Clift
Gavin Sherry wrote: On Mon, 2 Dec 2002, Christopher Kings-Lynne wrote: I've given a talk in the 2002 honours lecture series at UWA about Postgres and some of the things it can do. All of those guys were interested. Especially since the deptartment does a lot of work in genetic algoriithms.

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Hannu Krosing
Magnus Naeslund(f) kirjutas T, 03.12.2002 kell 03:18: It looks like it (7.2.x): # time psql genline -c select id from /dev/null real0m0.694s user0m0.147s sys 0m0.025s # time psql genline -c select id,id||'/'||(select count(*) from ) as x from /dev/null real

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Stephan Szabo [EMAIL PROTECTED] wrote: On Tue, 3 Dec 2002, Magnus Naeslund(f) wrote: Now convert this query so that it only evaluates the date_part thing ONCE: That's not a good idea as long as t.stamp varies from row to row. ;) Perhaps once per row, maybe... :) I give up

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Hannu Krosing [EMAIL PROTECTED] wrote: Magnus Naeslund(f) kirjutas T, 03.12.2002 kell 03:18: It looks like it (7.2.x): # time psql genline -c select id from /dev/null real0m0.694s user0m0.147s sys 0m0.025s # time psql genline -c select id,id||'/'||(select count(*) from

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Mike Mascari
Gavin Sherry wrote: I want to see: i) proper resource management a-la Oracle. This would allow a DBA to limited the amount of time any given user spends in the parser, planner or executor. It would be limited with a more sophisticated user system, including things like CREATE USER PROFILE ...

[HACKERS] Shrinkwrap Windows Product, any issues? Anyone?

2002-12-02 Thread mlw
I am working on getting a shrink-wrapped version of PostgreSQL for Windows Currently it installs a customized version of Cygwin, PostgreSQL 7.2.3, cygipc, psqlodbc, and pgadminII I currently have the setup done. The target audience is not the enterprise, it is aimed at people using Access

Re: [HACKERS] toast table growing indefinitely? Known

2002-12-02 Thread Tom Lane
Christopher Kings-Lynne [EMAIL PROTECTED] writes: Hang on - so when vacuum runs it knows exactly how many pages it cleaned up but if the fsm value is low, it doesn't help? Why don't we just automaticlaly set the FSM value to the max that vacuum has to clean up? Because we can't resize shared

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Bruce Momjian
Magnus Naeslund(f) wrote: select id, sum(sum_col)||'/'||count(*) from table_name group by id; or select table_name.id, sum(sum_col)||'/'||t2.count from table_name, (select id, count(*) as count from table_name group by id) as t2 where table_name.id=t2.id group by

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Tom Lane
Magnus Naeslund(f) [EMAIL PROTECTED] writes: Mysql is planning on making this work: SELECT id, @a:=COUNT(*), SUM(sum_col)/@a FROM table_name GROUP BY id. We're supposed to spend our time emulating nonstandard features that don't even exist yet? I think I have better things to do ...

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Magnus Naeslund(f)
Bruce Momjian [EMAIL PROTECTED] wrote: Magnus Naeslund(f) wrote: select id, sum(sum_col)||'/'||count(*) from table_name group by id; or select table_name.id, sum(sum_col)||'/'||t2.count from table_name, (select id, count(*) as count from table_name group by id) as t2 where

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Christopher Kings-Lynne
Good! Now convert this query so that it only evaluates the date_part thing ONCE: select t.id, date_part('days',now()-t.stamp) from table_name t where date_part('days',now()-t.stamp) 20; Yes, it's a bit of a bugger that one. I hope you all are kidding me in not seeing the real issue i'm

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Bruce Momjian
Magnus Naeslund(f) wrote: Good! Now convert this query so that it only evaluates the date_part thing ONCE: select t.id, date_part('days',now()-t.stamp) from table_name t where date_part('days',now()-t.stamp) 20; I hope you all are kidding me in not seeing the real issue i'm trying to

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Stephan Szabo
On Tue, 3 Dec 2002, Magnus Naeslund(f) wrote: Now convert this query so that it only evaluates the date_part thing ONCE: That's not a good idea as long as t.stamp varies from row to row. ;) Perhaps once per row, maybe... :) select t.id, date_part('days',now()-t.stamp) from table_name t

Re: [HACKERS] 7.4 Wishlist

2002-12-02 Thread Stephan Szabo
On Tue, 3 Dec 2002, Bruce Momjian wrote: Magnus Naeslund(f) wrote: Good! Now convert this query so that it only evaluates the date_part thing ONCE: select t.id, date_part('days',now()-t.stamp) from table_name t where date_part('days',now()-t.stamp) 20; I hope you all are