[HACKERS] How to keep a table in memory?

2007-11-12 Thread adrobj
I have a pretty small table (~20MB) that is accessed very frequently and randomly, so I want to make sure it's 100% in memory all the time. There is a lot of other staff that's also gets accessed frequently, so I don't want to just hope that Linux file cache would do the right thing for me. Is th

Re: [HACKERS] proposal casting from XML[] to int[], numeric[], text[]

2007-11-12 Thread Andrew Dunstan
Nikolay Samokhvalov wrote: On Nov 12, 2007 12:59 AM, Tom Lane <[EMAIL PROTECTED]> wrote: I'm not clear on what you're proposing. There is no such thing as an opclass with no operators (or at least, not a useful one), so this seems mutually contradictory. regards, t

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Sun, 2007-11-11 at 23:38 -0500, Andrew Dunstan wrote: > Moreover, Postgres is extensible, so ideally Hibernate should look at > providing a way of querying a database server to get a list of supported > function signatures. > > Not sure how you could handle user defined types automatically,

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Heikki Linnakangas
adrobj wrote: I have a pretty small table (~20MB) that is accessed very frequently and randomly, so I want to make sure it's 100% in memory all the time. There is a lot of other staff that's also gets accessed frequently, so I don't want to just hope that Linux file cache would do the right thing

Re: [HACKERS] proposal casting from XML[] to int[], numeric[], text[]

2007-11-12 Thread Pavel Stehule
> > > > You're right, that's my mistake, sorry. So, having casting rules seems > > to be the only option.. > > > > > We can already cast as text[], and so we can do this: > > andrew=# select > xpath('//foo/text()','12')::text[]::int[]; > xpath > --- > {1,2} > (1 row) > > > So why do we desper

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Magnus Hagander
On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: > On 10/26/07, I wrote: > > On 10/26/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > > > > > Can you try the attached patch? See how many backends you can get up to. > > > > > > This patch changes from using a single thread for each ba

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Dave Page
Magnus Hagander wrote: >> As for desktop heap, only 65KB of the service heap was allocated, or >> about 80 bytes per connection. No danger of hitting limits in the >> kernel memory pools either. > > As Dave said, it could be that the server version uses a lot less heap per > process, which would

Re: [HACKERS] Problem to configure pg8.3b2 w/ ossp-uuid-support on OS X

2007-11-12 Thread Jörg Beyer
Am 11.11.2007 17:36 Uhr schrieb Tom Lane (<[EMAIL PROTECTED]>): > J=?ISO-8859-1?B?9g==?=rg Beyer <[EMAIL PROTECTED]> writes: >> -- Binaries and libraries installed _by the OS itself_ reside in /usr (e.g. >> uuid, libxml2, libxslt) > > What I see on my OSX machines is /usr/include/uuid/uuid.h and

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Magnus Hagander
On Mon, Nov 12, 2007 at 10:01:09AM +, Dave Page wrote: > Magnus Hagander wrote: > >> As for desktop heap, only 65KB of the service heap was allocated, or > >> about 80 bytes per connection. No danger of hitting limits in the > >> kernel memory pools either. > > > > As Dave said, it could be t

[HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Gokulakannan Somasundaram
Hi, I had a chance to test one of the real world cases with Oracle and PostgreSQL. Create a Table with 10 million rows (i worked on a 1GB RAM machine) both in oracle and Postgresql. Just write a JDBC program for a 'select *' on that table. With PostgreSQL as backend, java crashes saying that it

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Dave Page
Magnus Hagander wrote: > I'm certainly not convinved about that either, but we should make a test on > a VM at some point. > > Sophos AV has plugins into for example the explorer (I assume - most AV > does, haven't used Sophos specifically myself), which may be done with > extra DLLs loading along

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Sun, 2007-11-11 at 16:48 -0200, Diego Pires Plentz wrote: > > > - You have supportsRowValueConstructorSyntax commented out. It does, if > > > you have a recent enough version, or do you mean something else? > > > > The way to fix both that and the differing available functions would > > probabl

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Richard Huxton
Gokulakannan Somasundaram wrote: Hi, I had a chance to test one of the real world cases with Oracle and PostgreSQL. Create a Table with 10 million rows (i worked on a 1GB RAM machine) both in oracle and Postgresql. Just write a JDBC program for a 'select *' on that table. With PostgreSQL as b

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Trevor Talbot
On 11/12/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: > > As for desktop heap, only 65KB of the service heap was allocated, or > > about 80 bytes per connection. No danger of hitting limits in the > > kernel memory pools either. >

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Heikki Linnakangas
Gokulakannan Somasundaram wrote: I had a chance to test one of the real world cases with Oracle and PostgreSQL. Create a Table with 10 million rows (i worked on a 1GB RAM machine) both in oracle and Postgresql. Just write a JDBC program for a 'select *' on that table. With PostgreSQL as backe

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Gokulakannan Somasundaram
On Nov 12, 2007 5:25 PM, Richard Huxton <[EMAIL PROTECTED]> wrote: > Gokulakannan Somasundaram wrote: > > Hi, > > I had a chance to test one of the real world cases with Oracle and > > PostgreSQL. Create a Table with 10 million rows (i worked on a 1GB RAM > > machine) both in oracle and Postgre

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Gokulakannan Somasundaram
On Nov 12, 2007 6:01 PM, Heikki Linnakangas <[EMAIL PROTECTED]> wrote: > Gokulakannan Somasundaram wrote: > > I had a chance to test one of the real world cases with Oracle and > > PostgreSQL. Create a Table with 10 million rows (i worked on a 1GB RAM > > machine) both in oracle and Postgresql.

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Gokulakannan Somasundaram
> we have a region of uncertainity. There are some JDBC hints like > setFetchSize(), which actually affects Oracle's behaviour. But it > doesn't seem to do anything with postgres. But JDBC has declared these > commands as hint commands and has provided a warning to users, about > the fact that it m

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Richard Huxton
Gokulakannan Somasundaram wrote: I also noticed that it doesn't crash with psql, but it takes a long time to show the first set of records. It takes a long time, even to quit after i pressed 'q'. With oracle SQLPlus, it is quite instantaneous. Again, you're measuring different things. Wha

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Magnus Hagander
On Mon, Nov 12, 2007 at 04:00:04AM -0800, Trevor Talbot wrote: > On 11/12/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > > On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: > > > > As for desktop heap, only 65KB of the service heap was allocated, or > > > about 80 bytes per connecti

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 10:55 +, Simon Riggs wrote: > On Sun, 2007-11-11 at 16:48 -0200, Diego Pires Plentz wrote: > > > > > - You have supportsRowValueConstructorSyntax commented out. It does, if > > > > you have a recent enough version, or do you mean something else? > > > > > > The way to fix

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Trevor Talbot
On 11/12/07, Richard Huxton <[EMAIL PROTECTED]> wrote: > Gokulakannan Somasundaram wrote: > >>> I also noticed that it doesn't crash with psql, but it takes a > >>> long time to show the first set of records. It takes a long time, even > >>> to quit after i pressed 'q'. > >>>With oracle SQ

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Bernd Helmle
--On Montag, November 12, 2007 18:10:12 +0530 Gokulakannan Somasundaram <[EMAIL PROTECTED]> wrote: http://jdbc.postgresql.org/documentation/head/query.html#query-with-curs or -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com Thanks Heikki. That answered my question. Can

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Trevor Talbot
On 11/12/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > On Mon, Nov 12, 2007 at 04:00:04AM -0800, Trevor Talbot wrote: > > On 11/12/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: > > > On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: > > > > > > As for desktop heap, only 65KB of the

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Peter Eisentraut
Simon Riggs wrote: > On Sun, 2007-11-11 at 17:11 +, Tom Dunstan wrote: > > The way to fix both that and the differing available functions would > > probably be to have a subclass of the dialect for each server version. > > MySQL seems to have about 5 :) > > I think a static dialect for each ser

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 10:55 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > I've posted files to pgsql-patches, as well as to Diego directly. I dropped them into a Hibernate 3.2.5.ga source tree and ran the hibernate tests with the 8.3 dialect against pgsql HEAD and got a few errors. Diego, I assume that t

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
[oops, sent with non-subscribed from: address first time] On Nov 12, 2007 10:55 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > I've posted files to pgsql-patches, as well as to Diego directly. I dropped them into a Hibernate 3.2.5.ga source tree and ran the hibernate tests with the 8.3 dialect agai

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
> All of this should work for functions, but operators are a whole > different story. I strongly suspect that someone is not going to be > able to use e.g. @@ in a HQL query. Are there ways to do tsearch type > queries just using functions and more standard operators? Of course, if someone's using

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 1:08 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: > If we do this, then it looks like we can hack this file also > http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DialectFactory.java Oh, that's nice. Unfortunately, though. it only seems t

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Gokulakannan Somasundaram
On Nov 12, 2007 6:48 PM, Bernd Helmle <[EMAIL PROTECTED]> wrote: > --On Montag, November 12, 2007 18:10:12 +0530 Gokulakannan Somasundaram > <[EMAIL PROTECTED]> wrote: > > >> http://jdbc.postgresql.org/documentation/head/query.html#query-with-curs > >> or > >> > >> -- > >>Heikki Linnakangas > >

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Andrew Dunstan
Tom Dunstan wrote: On Nov 12, 2007 1:08 PM, Simon Riggs <[EMAIL PROTECTED]> wrote: If we do this, then it looks like we can hack this file also http://anonsvn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hibernate/dialect/DialectFactory.java Oh, that's nice. Unfortuna

Re: [HACKERS] Clarification reqeusted for "select * from a huge table"

2007-11-12 Thread Richard Huxton
Trevor Talbot wrote: On 11/12/07, Richard Huxton <[EMAIL PROTECTED]> wrote: Gokulakannan Somasundaram wrote: I also noticed that it doesn't crash with psql, but it takes a long time to show the first set of records. It takes a long time, even to quit after i pressed 'q'. With oracle SQ

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 2:13 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: > > Oh, that's nice. Unfortunately, though. it only seems to support major > > version number differentiation as an int. Apparently the idea that you > > might have a version number like 8.3 didn't occur to whoever wrote it, > > alt

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Andrew Dunstan
Tom Dunstan wrote: On Nov 12, 2007 2:13 PM, Andrew Dunstan <[EMAIL PROTECTED]> wrote: Oh, that's nice. Unfortunately, though. it only seems to support major version number differentiation as an int. Apparently the idea that you might have a version number like 8.3 didn't occur to whoever wr

[HACKERS] Simplifying Text Search

2007-11-12 Thread Simon Riggs
Something Tom Dunstan just mentioned has made me ask the question "Why does our full text search feature look so strange?". It's the operator-laden syntax that causes the problem. By any stretch, this query is difficult for most people to understand: SELECT * FROM text_table WHERE to_tsvector('fa

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 13:30 +, Tom Dunstan wrote: > On Nov 12, 2007 10:55 AM, Simon Riggs <[EMAIL PROTECTED]> wrote: > > I've posted files to pgsql-patches, as well as to Diego directly. > > I dropped them into a Hibernate 3.2.5.ga source tree and ran the > hibernate tests with the 8.3 dialect

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 14:35 +, Tom Dunstan wrote: > Nice try :), but as I read the javadoc for DialectFactory it seems to > suggest that hibernate gets the major number from our JDBC driver, > which dutifully reports it as 8. We can extend that so it uses getMinorVersion() also. Personally,

Re: [HACKERS] Proposal: Select ... AS OF Savepoint

2007-11-12 Thread Decibel!
On Nov 2, 2007, at 11:29 AM, Tom Lane wrote: [ splorfff... ] The grammar support alone will cost ten times that. When next we meet, expect me to ask you how that's pronounced. ;) -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy! www.distr

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Dave Cramer
On 12-Nov-07, at 10:10 AM, Simon Riggs wrote: On Mon, 2007-11-12 at 14:35 +, Tom Dunstan wrote: Nice try :), but as I read the javadoc for DialectFactory it seems to suggest that hibernate gets the major number from our JDBC driver, which dutifully reports it as 8. We can extend that so

Re: [HACKERS] plpgsql keywords are hidden reserved words

2007-11-12 Thread Decibel!
On Nov 5, 2007, at 11:58 AM, John DeSoi wrote: Is there any feasibility to the idea of allowing pl/pgsql variables and parameters to be prefixed with a special character like '$'? I'm constantly adding prefixes like 'v_' because of conflicts with table or column names. It would be nice to ha

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Martijn van Oosterhout
On Mon, Nov 12, 2007 at 03:00:36PM +, Simon Riggs wrote: > Something Tom Dunstan just mentioned has made me ask the question "Why > does our full text search feature look so strange?". It's the > operator-laden syntax that causes the problem. > > By any stretch, this query is difficult for mos

Re: [HACKERS] Proposal: Select ... AS OF Savepoint

2007-11-12 Thread Gregory Stark
"Decibel!" <[EMAIL PROTECTED]> writes: > On Nov 2, 2007, at 11:29 AM, Tom Lane wrote: >> [ splorfff... ] The grammar support alone will cost ten times that. > > When next we meet, expect me to ask you how that's pronounced. ;) I think it can only be properly pronounced with a mug of coffee --

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 16:28 +0100, Martijn van Oosterhout wrote: > On Mon, Nov 12, 2007 at 03:00:36PM +, Simon Riggs wrote: > > Something Tom Dunstan just mentioned has made me ask the question "Why > > does our full text search feature look so strange?". It's the > > operator-laden syntax that

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread David Fetter
On Mon, Nov 12, 2007 at 03:48:20PM +, Simon Riggs wrote: > On Mon, 2007-11-12 at 16:28 +0100, Martijn van Oosterhout wrote: > > On Mon, Nov 12, 2007 at 03:00:36PM +, Simon Riggs wrote: > > > Something Tom Dunstan just mentioned has made me ask the question "Why > > > does our full text sear

Re: [HACKERS] minimal update

2007-11-12 Thread Decibel!
On Nov 2, 2007, at 10:49 AM, Andrew Dunstan wrote: update tname set foo = bar ... where foo is null or foo <> bar ... FYI, you should be able to do WHERE foo IS DISTINCT FROM bar instead. -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your computer some brain candy

Re: [HACKERS] minimal update

2007-11-12 Thread Andrew Dunstan
Decibel! wrote: On Nov 2, 2007, at 10:49 AM, Andrew Dunstan wrote: update tname set foo = bar ... where foo is null or foo <> bar ... FYI, you should be able to do WHERE foo IS DISTINCT FROM bar instead. True, that's a bit nicer. It's still more than somewhat ugly and fragile if there

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Alvaro Herrera
Dave Cramer escribió: > > On 12-Nov-07, at 10:10 AM, Simon Riggs wrote: > >> On Mon, 2007-11-12 at 14:35 +, Tom Dunstan wrote: >>> Nice try :), but as I read the javadoc for DialectFactory it seems to >>> suggest that hibernate gets the major number from our JDBC driver, >>> which dutifully rep

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Heikki Linnakangas
Simon Riggs wrote: Something Tom Dunstan just mentioned has made me ask the question "Why does our full text search feature look so strange?". It's the operator-laden syntax that causes the problem. By any stretch, this query is difficult for most people to understand: SELECT * FROM text_table

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Tom Dunstan
On Nov 12, 2007 4:08 PM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > > What should the driver report then ? I believe the backend code considers 8 > > to be the major version, and 0123 to be the minor versions ? > > No, 8.1 is the major version. In 8.2.5, 8.2 is the major, 5 is the > minor version

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-12 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 hubert depesz lubaczewski writes: ... > return (shift =~ /[a-z0-9_-]+/i) || 0; ... > 'require' trapped by operation mask at line 15. > > it looks strange - what "require"? As you guessed, it's trying to do load the utf8 pragma, and failing as

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-12 Thread Andrew Dunstan
Greg Sabino Mullane wrote: Yes, we might want to consider making utf8 come pre-loaded for plperl. There is no direct or easy way to do it (we don't have finer-grained control than the 'require' opcode), but we could probably dial back restrictions, 'use' it, and then reset the Safe contain

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > So we end up with a normal sounding function that is overloaded to > provide all of the various goodies. As best I can tell, @@ does exactly this already. This is just a different spelling of the same capability, and I don't actually find it better. Why

Re: [HACKERS] 8.2.3: Server crashes on Windows using Eclipse/Junit

2007-11-12 Thread Magnus Hagander
Trevor Talbot wrote: > On 11/12/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: >> On Mon, Nov 12, 2007 at 04:00:04AM -0800, Trevor Talbot wrote: >>> On 11/12/07, Magnus Hagander <[EMAIL PROTECTED]> wrote: On Sat, Nov 10, 2007 at 03:17:13PM -0800, Trevor Talbot wrote: > As for desktop heap,

Re: [HACKERS] [hibernate-team] PostgreSQLDialect

2007-11-12 Thread Dave Cramer
On 12-Nov-07, at 11:33 AM, Tom Dunstan wrote: On Nov 12, 2007 4:08 PM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: What should the driver report then ? I believe the backend code considers 8 to be the major version, and 0123 to be the minor versions ? No, 8.1 is the major version. In 8.2.5

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-12 Thread Andrew Dunstan
Andrew Dunstan wrote: Greg Sabino Mullane wrote: Yes, we might want to consider making utf8 come pre-loaded for plperl. There is no direct or easy way to do it (we don't have finer-grained control than the 'require' opcode), but we could probably dial back restrictions, 'use' it, and th

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Simon Riggs <[EMAIL PROTECTED]> writes: >> So we end up with a normal sounding function that is overloaded to >> provide all of the various goodies. > > As best I can tell, @@ does exactly this already. This is just a > different spelling of the same capab

Re: [HACKERS] Proposal: Select ... AS OF Savepoint

2007-11-12 Thread Alvaro Herrera
Gregory Stark escribió: > "Decibel!" <[EMAIL PROTECTED]> writes: > > > On Nov 2, 2007, at 11:29 AM, Tom Lane wrote: > >> [ splorfff... ] The grammar support alone will cost ten times that. > > > > When next we meet, expect me to ask you how that's pronounced. ;) > > I think it can only be proper

Re: [HACKERS] Proposal: Select ... AS OF Savepoint

2007-11-12 Thread Kevin Grittner
>>> On Mon, Nov 12, 2007 at 1:16 PM, in message <[EMAIL PROTECTED]>, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Gregory Stark escribió: >> "Decibel!" <[EMAIL PROTECTED]> writes: >> >> > On Nov 2, 2007, at 11:29 AM, Tom Lane wrote: >> >> [ splorfff... ] The grammar support alone will cost ten t

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 11:56 -0500, Tom Lane wrote: > Simon Riggs <[EMAIL PROTECTED]> writes: > > So we end up with a normal sounding function that is overloaded to > > provide all of the various goodies. > > As best I can tell, @@ does exactly this already. This is just a > different spelling of

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Heikki Linnakangas
Simon Riggs wrote: On Mon, 2007-11-12 at 11:56 -0500, Tom Lane wrote: Simon Riggs <[EMAIL PROTECTED]> writes: So we end up with a normal sounding function that is overloaded to provide all of the various goodies. As best I can tell, @@ does exactly this already. This is just a different spell

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Andrew Sullivan
On Mon, Nov 12, 2007 at 08:09:48PM +, Simon Riggs wrote: > > @@ would still exist, so no problems. These additions are for new users, > not old ones. Given that this is all sugar on top of tsearch anyway, why not put it in pgfoundry as the tsearch_sugar project? Then packagers could include

Re: [HACKERS] [GENERAL] plperl and regexps with accented characters - incompatible?

2007-11-12 Thread Andrew Dunstan
Andrew Dunstan wrote: Ugh, in testing I see some nastiness here without any explicit require. It looks like there's an implicit require if the text contains certain chars. I'll see what I can do to fix the bug, although I'm not sure if it's possible. Looks like it's going to be very h

Re: [HACKERS] Proposal: Select ... AS OF Savepoint

2007-11-12 Thread Andrew Dunstan
Alvaro Herrera wrote: Gregory Stark escribió: "Decibel!" <[EMAIL PROTECTED]> writes: On Nov 2, 2007, at 11:29 AM, Tom Lane wrote: [ splorfff... ] The grammar support alone will cost ten times that. When next we meet, expect me to ask you how that's pronounced. ;)

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Alvaro Herrera
Heikki Linnakangas wrote: > Granted, @@ is a bit awkward until you get used to it. "x LIKE y" would > read out better, but unfortunately that's already taken ;-). Actually LIKE does not make much sense when you have 'hay & needle'. Probably MATCHES would be a better term ... but then, MySQL defi

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Aidan Van Dyk
* Heikki Linnakangas <[EMAIL PROTECTED]> [071112 15:18]: > Simon Riggs wrote: > >Right now, Full Text Search SQL looks like complete gibberish and it > >dissuades many people from using what is an awesome set of features. I > >just want to add a little sugar to help people get started. > Granted,

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 20:17 +, Heikki Linnakangas wrote: > Granted, @@ is a bit awkward until you get used to it. "x LIKE y" would > read out better, but unfortunately that's already taken ;-). Remember, I'm not suggesting we get rid of @@ > In any case, it's way too late. I'm suggesting w

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Pavel Stehule
Hello look to standard, please. SQL/MM has part - full text. SELECT docno FROM information WHERE document.CONTAINS ('STEMMED FORM OF "standard" IN SAME PARAGRAPH AS SOUNDS LIKE "sequel"') = 1 it's little bit baroque, It's sample of method. So,it can be: SELECT .. FROM x.contains(y); It

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Joshua D. Drake
Simon Riggs wrote: On Mon, 2007-11-12 at 20:17 +, Heikki Linnakangas wrote: Granted, @@ is a bit awkward until you get used to it. "x LIKE y" would read out better, but unfortunately that's already taken ;-). Remember, I'm not suggesting we get rid of @@ In any case, it's way too late.

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Martijn van Oosterhout
On Mon, Nov 12, 2007 at 03:44:18PM -0500, Aidan Van Dyk wrote: > Can LIKE be easily overloaded in the parser? So: > text LIKE text > works in it's current form, and > tsvector LIKE tsquery > also works like the @@? Or have I gotten all the ts* types all mixed up > again... AIUI LIKE

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 21:59 +0100, Pavel Stehule wrote: > SELECT docno > FROM information > WHERE document.CONTAINS > ('STEMMED FORM OF "standard" > IN SAME PARAGRAPH AS > SOUNDS LIKE "sequel"') = 1 > > it's little bit baroque, It's sample of method. Seems thats the way Oracle does it too.

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Alvaro Herrera
Pavel Stehule escribió: > Hello > > look to standard, please. SQL/MM has part - full text. Huh, what version of the standard is this? My copy (the typical 2003 draft) doesn't have SQL/MM AFAICS. -- Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4 "La espina, desde

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Pavel Stehule
On 12/11/2007, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Pavel Stehule escribió: > > Hello > > > > look to standard, please. SQL/MM has part - full text. > > Huh, what version of the standard is this? My copy (the typical 2003 > draft) doesn't have SQL/MM AFAICS. > > I found http://jtc1sc32.or

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Alex Drobychev
Hi Heikki, Thanks for the response! I understand that relying on cache management would be the easiest solution. However, I had a similar issue with other RDBMS (MSSQL, to be specific) in the past and observed a lot of disk activity until the table was pinned in memory (fortunately M

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Andrew Dunstan
Alex Drobychev wrote: Hi Heikki, Thanks for the response! I understand that relying on cache management would be the easiest solution. However, I had a similar issue with other RDBMS (MSSQL, to be specific) in the past and observed a lot of disk activity until the table was pinned in me

Re: [HACKERS] Problem to configure pg8.3b2 w/ ossp-uuid-support on OS X

2007-11-12 Thread Tom Lane
J=?ISO-8859-1?B?9g==?=rg Beyer <[EMAIL PROTECTED]> writes: > To be precise, for uuid I have: > /usr/bin/uuidgen [the CL tool, which should be of no interest here] > /usr/include/uuid/uuid.h > and that's the same as you have. Nothing else uuid-related in /usr. > And yes, AFAICT, uuid-functio

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Robert Treat
On Monday 12 November 2007 18:31, Andrew Dunstan wrote: > 1. when someone replies to your post at the bottom, please don't put > your reply at the top. It makes everything totally unreadable. > +1 > 2. you should investigate one or more of: pg_memcache, solid state disk. > you might also conside

Re: [HACKERS] [COMMITTERS] pgsql: Adjust script to be consistent (thanks Tom for the fix).

2007-11-12 Thread Tom Lane
[EMAIL PROTECTED] (Bruce Momjian) writes: > pgsql/contrib/uuid-ossp: > uuid-ossp.sql.in (r1.4 -> r1.5) > > (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/uuid-ossp/uuid-ossp.sql.in?r1=1.4&r2=1.5) Pray tell, why do you think it's a good idea to not have version label

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Joshua D. Drake
Robert Treat wrote: On Monday 12 November 2007 18:31, Andrew Dunstan wrote: 1. when someone replies to your post at the bottom, please don't put your reply at the top. It makes everything totally unreadable. +1 2. you should investigate one or more of: pg_memcache, solid state disk. you

[HACKERS] Re: [COMMITTERS] pgsql: Adjust script to be consistent (thanks Tom for the fix).

2007-11-12 Thread Bruce Momjian
Tom Lane wrote: > [EMAIL PROTECTED] (Bruce Momjian) writes: > > pgsql/contrib/uuid-ossp: > > uuid-ossp.sql.in (r1.4 -> r1.5) > > > > (http://developer.postgresql.org/cvsweb.cgi/pgsql/contrib/uuid-ossp/uuid-ossp.sql.in?r1=1.4&r2=1.5) > > Pray tell, why do you think it's a good

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Devrim GÜNDÜZ
Hi, On Mon, 2007-11-12 at 21:15 -0500, Robert Treat wrote: > > 2. you should investigate one or more of: pg_memcache, solid state > > disk. > > you might also consider creating a tablespace on tmpfs or ramfs or > something like pramfs IIRC, ramfs are not that good for database use: If you want t

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Andrew Dunstan
Joshua D. Drake wrote: FYI, Postgres is know to be used successfully on some *extremely* heavy websites, without using tables pinned in memory. +1 I give this a +/- 1. Yes extremely heavy websites can do this *but* they require extremely expensive hardware to do so. I expect extrem

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Joshua D. Drake
Devrim GÜNDÜZ wrote: Hi, On Mon, 2007-11-12 at 21:15 -0500, Robert Treat wrote: 2. you should investigate one or more of: pg_memcache, solid state disk. you might also consider creating a tablespace on tmpfs or ramfs or something like pramfs IIRC, ramfs are not that good for database use: If

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Joshua D. Drake
Andrew Dunstan wrote: I give this a +/- 1. Yes extremely heavy websites can do this *but* they require extremely expensive hardware to do so. I expect extremely heavy websites to require extremely expensive equipment regardless of the software they use. Cost was not the issue raised by t

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Devrim GÜNDÜZ
Hi, On Mon, 2007-11-12 at 09:12 +, Heikki Linnakangas wrote: > Just leave it to the cache management algorithms in Postgres and > Linux. If it really is frequently accessed, it should stay in > Postgres shared buffers. How is "frequently accessed" determined by PostgreSQL? I mean... You kn

Re: [HACKERS] [COMMITTERS] pgsql: Adjust script to be consistent (thanks Tom for the fix).

2007-11-12 Thread Tom Lane
Bruce Momjian <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Pray tell, why do you think it's a good idea to not have version labels >> in the contrib scripts? > If we want them, they should be in all of them. +1 for putting the label in all of them --- these files end up "loose" in user instal

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Tom Lane
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <[EMAIL PROTECTED]> writes: > So, IMHO, saying "trust your OS + PostgreSQL" is not a 100% perfect > approach for the people who are asking to keep their objects on RAM, > even though I know that there is nothing we can say right now. Well, nothing is a 100% solut

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Bruce Momjian
Simon Riggs wrote: > On Mon, 2007-11-12 at 11:56 -0500, Tom Lane wrote: > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > So we end up with a normal sounding function that is overloaded to > > > provide all of the various goodies. > > > > As best I can tell, @@ does exactly this already. This is

[HACKERS] Re: [COMMITTERS] pgsql: Adjust script to be consistent (thanks Tom for the fix).

2007-11-12 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Tom Lane wrote: > >> Pray tell, why do you think it's a good idea to not have version labels > >> in the contrib scripts? > > > If we want them, they should be in all of them. > > +1 for putting the label in all of them --- these fil

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Greg Smith
On Mon, 12 Nov 2007, Alex Drobychev wrote: Or any other ideas for "pinning" a table in memory? If the table you're worried about is only 20MB, have you considered just running something regularly that touches the whole thing? This may be the only time I've ever considered running "select co

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Luke Lonergan
Vacuum is a better thing to run, much less CPU usage. - Luke Msg is shrt cuz m on ma treo -Original Message- From: Greg Smith [mailto:[EMAIL PROTECTED] Sent: Monday, November 12, 2007 11:59 PM Eastern Standard Time To: Alex Drobychev Cc: pgsql-hackers@postgresql.org Subject:

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Christopher Browne
In an attempt to throw the authorities off his trail, [EMAIL PROTECTED] ("Joshua D. Drake") transmitted: > Andrew Dunstan wrote: >>> I give this a +/- 1. Yes extremely heavy websites can do this >>> *but* they require extremely expensive hardware to do so. >>> >> I expect extremely heavy websites

Re: [HACKERS] How to keep a table in memory?

2007-11-12 Thread Christopher Browne
Quoth [EMAIL PROTECTED] (Tom Lane): > Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <[EMAIL PROTECTED]> writes: >> So, IMHO, saying "trust your OS + PostgreSQL" is not a 100% perfect >> approach for the people who are asking to keep their objects on RAM, >> even though I know that there is nothing we can say

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Simon Riggs
On Mon, 2007-11-12 at 23:03 -0500, Bruce Momjian wrote: > Simon Riggs wrote: > > On Mon, 2007-11-12 at 11:56 -0500, Tom Lane wrote: > > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > > So we end up with a normal sounding function that is overloaded to > > > > provide all of the various goodies. >

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Pavel Stehule
On 13/11/2007, Simon Riggs <[EMAIL PROTECTED]> wrote: > On Mon, 2007-11-12 at 23:03 -0500, Bruce Momjian wrote: > > Simon Riggs wrote: > > > On Mon, 2007-11-12 at 11:56 -0500, Tom Lane wrote: > > > > Simon Riggs <[EMAIL PROTECTED]> writes: > > > > > So we end up with a normal sounding function that