Re: [GENERAL] pg_dirtyread doesnt work

2012-12-28 Thread Phil Sorber
Most likely it's because of TOAST'd records. The module is pretty naive and needs to be updated to handle such cases. On Fri, Dec 28, 2012 at 10:53 AM, Alejandro Carrillo wrote: > > Anybody knows why could be happening: ERROR: invalid memory alloc request > size 1850015748 > > Thanks > > ___

Re: [GENERAL] [BUGS] Prepared Statement Name Truncation

2012-11-17 Thread Phil Sorber
On Nov 17, 2012 11:06 PM, "Gavin Flower" wrote: > > On 18/11/12 16:49, Greg Sabino Mullane wrote: >> >> -BEGIN PGP SIGNED MESSAGE- >> Hash: RIPEMD160 >> >> >>> NOTICE: identifier >>> "this_is_a_really_long_identifier_for_a_prepared_statement_name_ok" >>> will be truncated to >>> "this_is_

Re: [GENERAL] Why is cast array integer[] <--> text[] is not immutable.

2011-12-09 Thread Phil Couling
Thanks I'm having trouble finding any reference to array_out and array_in in the documentation. Is there a way to set a different cast for an array? Regards On 9 December 2011 15:09, Tom Lane wrote: > Phil Couling writes: >> I'm struggling to understand why this cas

[GENERAL] Why is cast array integer[] <--> text[] is not immutable.

2011-12-09 Thread Phil Couling
Hi I'm struggling to understand why this casts is not immutable: integer[]::text[] text[]::integer[] The following are all immutable: integer::text text::integer integer[]::float[] integer::float I hit on this while trying to make a gin index which cast from one to the other. Why does the enc

Re: [GENERAL] Error: timestamp with timezone + interval is not immutable while creating index

2011-10-14 Thread Phil Couling
On 14 October 2011 00:49, Steve Crawford wrote: > On 10/13/2011 04:32 PM, Tom Lane wrote: >> >> Phil Couling  writes: >>> >>> main=>  create index foo_next_update on foo( (last_updated + >>> update_cycle) ) ; >>> ERROR:  functions in index ex

[GENERAL] Error: timestamp with timezone + interval is not immutable while creating index

2011-10-13 Thread Phil Couling
Hi All I've got a table with (amongst others) two fields: last_updated timestamp with time zone; update_cycle interval; I'd like to create an index on these, to index time "next update" time (last_updated + update_cycle). When I try this I get an error though: main=> create index foo_next_updat

[GENERAL] Error: timestamp with timezone + interval is not immutable while creating index

2011-10-13 Thread Phil Couling
Hi All I've got a table with (amongst others) two fields: last_updated timestamp with time zone; update_cycle interval; I'd like to create an index on these, to index time "next update" time (last_updated + update_cycle). When I try this I get an error though: main=> create index foo_next_updat

Re: [GENERAL] gaps/overlaps in a time table : current and previous row question

2011-10-05 Thread Phil Couling
I think you need to get the full list of change dates first. Assuming you're searching over a time period between "period_from" and "period_to": SELECT change_time, sum(diff) as total_diff FROM ( SELECT starttime as change_time, 1 AS diff FROM t WHERE starttime > period_from AND endtime < period_t

Re: [GENERAL] how to select one column into another in same table?

2011-10-05 Thread Phil Couling
I don't this this is possible as postgres. There is something simular with: alter table table_name alter column column_foo using column_bar But I don't think there's any performance advantage over a simple update and the using clause doesn't appear to have an equivalent in an add column statement.

Re: [GENERAL] Add quto increment to existing column

2011-10-04 Thread Phil Couling
Hi Dropping the column is a bit drastic if you already have data in there. You could just set the default on the column: alter table my_table alter hist_id set default nextval('hist_id_seq') Also considder setting the sequence owner: alter sequence hist_id_seq owned by my_table.hist_id; This w

Re: [GENERAL] Convert data into horizontal from vertical form

2011-05-20 Thread Phil Couling
Hi Adarsh You say you need this to be done dynamically. I assume that by this you're looking for a way to have 1 query produce an increasing number of columns as you increase the number of rows in your table. This really isn't possible and doesn't fit with the model SQL was designed for. The conc

Re: [GENERAL] find the greatest, pick it up and group by

2011-05-17 Thread Phil Couling
Hi The method you're using is functionally correct and quite efficient if a little on the verbose side. Other non-postgres variants of SQL have a "DECODE" function which comes in very handy. I dont believe postgres has any equivalent. (Postgres decode() does something entirely differnt). I often

[GENERAL] Extract (Recover) data from a cluster built on a different architecture (ARM).

2011-04-24 Thread Phil Couling
Hi I'm looking for a way to extract the data from a PostgreSQL 8.3.14 database (cluster) that was built using an an ARM/Linux server. The problem is that the hardware itself is a brick and the replacement hardware will be X86/AMD64. Sadly my backups are all copies of the DB files and don't inclu

[GENERAL] Problems with ODBC Driver

2010-09-01 Thread Phil Jackson
Hi Hiroshi The same program works on the server unchanged - that's why I think it is something to do with the driver. The error message says that the field name doesn't exist when it does as can be verified by looking at the database in Postgresql. Cheers Phil Jackson On 9/2/20

[GENERAL] Problems with ODBC Driver

2010-08-31 Thread Phil Jackson
doesn't exist. I am running XP Professional on both machines. I have no idea what is happening - I have opened up the firewall on both machines to allow port 5432 to be used by all applications with TCP (also tried TCP and UDP). Does anyone have any suggestions? Cheers Phil Jackson --

[GENERAL] problem with ON UPDATE rule

2010-08-02 Thread Phil Dagosto
Hi all, I'm new to Postgres and I'm not really a database expert but I was wondering if someone could help me out with this issue. I am trying to use event notifications controlled by an ON UPDATE rule. In the table I'm interested in I have created a rule that should be invoked when a particular

Re: [GENERAL] Cannot open table in new database

2010-06-30 Thread Phil Jackson
Hi Adrian I had missed that bit. That makes sense now. Cheers Phil Jackson On 6/30/2010 5:04 PM, Adrian Klaver wrote: On Thursday 01 July 2010 11:11:29 am Phil Jackson wrote: Hi Adrian The link says that; "Identifier and key word names are case insensitive." But I have r

Re: [GENERAL] Cannot open table in new database

2010-06-30 Thread Phil Jackson
Hi Adrian The link says that; "Identifier and key word names are case insensitive." But I have renamed the source table in lowercase and this gets me one step further. I'll carry on and see what happens next. Cheers Phil Jackson On 6/30/2010 3:18 PM, Adrian Klaver wrote:

[GENERAL] Cannot open table in new database

2010-06-30 Thread Phil Jackson
Login Roles(1) Concept We can access the list of tables from the ODBC driver which shows the above tables. We've obviously done something wrong but we don't know where to look. The Help button is not helpful at all. Any ideas on what we are doing incorrectly? Cheers Phil J

[GENERAL] Trying to install ODBC driver on Windows XP notebook

2010-06-21 Thread Phil Jackson
) I don't know what else I can now do to get the connection. Any suggestions would be appreciated. Cheers Phil Jackson -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Rewriting select statements

2009-10-30 Thread Phil Cairns
Tom Lane wrote: > "Phil Cairns" writes: > > I want to have the server do this: > > If the query has no where clause, use a where clause of "where 1=0". > > > Is this possible? > > It's doubtless *possible*, but if you're asking for

[GENERAL] Rewriting select statements

2009-10-30 Thread Phil Cairns
5 million rows. This view is not queried without a where clause during the normal execution of the program, so to save between 6 and 20 minutes of startup time depending on server load, I'd like to be able to add the where clause. Thanks for any help, Phil Cairns. -- Sent via pgsql-general m

Re: [GENERAL] Libpq on windows

2009-06-11 Thread Phil Longstaff
I need the include files as well so I can build against the library. Phil From: Andy Colson To: Phil Longstaff Cc: pgsql-general@postgresql.org Sent: Thursday, June 11, 2009 9:47:52 AM Subject: Re: [GENERAL] Libpq on windows Phil Longstaff wrote: > On J

Re: [GENERAL] Libpq on windows

2009-06-11 Thread Phil Longstaff
On June 10, 2009 10:00:48 pm Andy Colson wrote: > Phil Longstaff wrote: > > I want to develop an app which uses libpq, built with mingw. Is there a > > download package which contains just the include files/dlls? If not, > > what package do I download? I don't need t

Re: [GENERAL] Libpq on windows

2009-06-11 Thread Phil Longstaff
On June 11, 2009 01:21:09 am Albe Laurenz wrote: > Phil wrote: > > I want to develop an app which uses libpq, built with mingw. > > Is there a download package which contains just the include files/dlls? > > If not, what package do I download? I don't need the server, jus

[GENERAL] Libpq on windows

2009-06-10 Thread Phil Longstaff
I want to develop an app which uses libpq, built with mingw. Is there a download package which contains just the include files/dlls? If not, what package do I download? I don't need the server, just the client libraries. Phil

[GENERAL] Do TEMP Tables have an OID? Can this be a problem if used too frequently?

2009-05-01 Thread Phil Couling
ried that there may be some pit falls in doing this. I'm especially worried about OIDs. Does creating a temp table assign an OID to the table? If so am I right to assume that, if the function is used too frequently, it could cause the database to crash by wraping OIDs? Thanks very muc

Re: [GENERAL] ER Diagram design tools (Linux)

2008-03-05 Thread Phil Rhoades
DA, don't know about OSA and although I usually avoid Java, I have found Power*Architect excellent - they even fixed a bug I found overnight! http://www.sqlpower.ca/page/architect Regards, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW

Re: [GENERAL] A select DISTINCT query? - followup Q

2008-01-27 Thread Phil Rhoades
Mike, I can't do that with my comments - I get all six of the records in the result with the example instead of just four like I want . . but someone else had a solution without using the "group by" clause . . Phil. On Sun, 2008-01-27 at 13:56 -0500, Mike Ginsburg wrote: > Hi

Re: [GENERAL] A select DISTINCT query? - followup Q

2008-01-27 Thread Phil Rhoades
he following result: 1first comment 2second comment 4fifth comment 5sixth comment Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Fax: +61:(0)2-8221-9599 E-mail: [EMAIL PROTECTED] ---

Re: [GENERAL] A select DISTINCT query?

2008-01-27 Thread Phil Rhoades
Guys, On Sun, 2008-01-27 at 17:38 +0100, Pavel Stehule wrote: > On 27/01/2008, Phil Rhoades <[EMAIL PROTECTED]> wrote: > > Tino, > > > > > > On Sun, 2008-01-27 at 15:16 +0100, Tino Wildenhain wrote: > > > Phil Rhoades wrote: > > > > Peop

Re: [GENERAL] A select DISTINCT query?

2008-01-27 Thread Phil Rhoades
Tino, On Sun, 2008-01-27 at 15:16 +0100, Tino Wildenhain wrote: > Phil Rhoades wrote: > > People, > > > > I want to select from a table ONLY unique records ie if a column has > > values: > > > > 1 > > 2 > > 3 > > 3 > > 4 > >

Re: [GENERAL] A select DISTINCT query?

2008-01-27 Thread Phil Rhoades
Pavel, You didn't read my note properly - your query gives: 1 2 3 4 5 I want: 1 2 4 5 Phil. On Sun, 2008-01-27 at 15:10 +0100, Pavel Stehule wrote: > Hello > > try > > SELECT DISTINCT col FROM table > > Pavel > > On 27/01/2008, Phil Rhoades <[

[GENERAL] A select DISTINCT query?

2008-01-27 Thread Phil Rhoades
People, I want to select from a table ONLY unique records ie if a column has values: 1 2 3 3 4 5 I want ONLY these records returned: 1 2 4 5 Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia Fax: +61:(0

[GENERAL] Approximate join on timestamps

2007-03-20 Thread Phil Endecott
t the left table has fewer rows than the right table, and I want one output row for each row in the left table.) Many thanks for any suggestions. Phil. (You are welcome to CC: me in any replies.) ---(end of broadcast)--- TIP 1: if posti

[GENERAL] Yet another PostgreSQL C++ binding

2007-03-09 Thread Phil Endecott
ries can be almost forgotten - they can be used as functions. I have written up some basic documentation here: http://svn.chezphil.org/libpbe/trunk/doc/Database Do let me know if you find this useful. Regards, Phil. (I encourage you to Cc: me in any replies.) --

[GENERAL] Still unclear about PQexecParams and "create view"

2007-02-12 Thread Phil Endecott
put a wrapper around it that substitutes $ parameters before passing them to PQexec. I'll post the code when I have it working - but maybe someone has already done this? Cheers, Phil. ---(end of broadcast)--- TIP 1: if posting/readi

[GENERAL] Re: "no value found for parameter 1" error for query with no parameters

2007-02-11 Thread Phil Endecott
Peter Eisentraut wrote: Phil Endecott wrote: I converted the first query like this: create or replace temporary view u_messages as select * from messsages where owner=$1; What makes you think this should work? Hi Peter, thanks for the quick reply. Well this page: http

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-11 Thread Phil Endecott
Is there any way to force pg to accept 1 and 0 for boolean? There is something called "create cast ... without function" which /might/ do what you want. Phil. ---(end of broadcast)--- TIP 4: Have you searched our lis

[GENERAL] "no value found for parameter 1" error for query with no parameters

2007-02-11 Thread Phil Endecott
s the old code which works: create or replace temporary view u_messages as select * from messsages where owner='phil'; select msg_id from u_messages where msgdate>'2007-02-11 21:36:43.886004+00'::timestamp with time zone - '1 day'::interv

Re: [GENERAL] "explain analyse" much slower than actual query

2007-01-28 Thread Phil Endecott
Thanks for the quick reply Tom. Tom Lane wrote: >"Phil Endecott" >writes: >> I was not patient enough to wait for the remaining explain-analyse results, >> but I feel that there is a linear slowdown of about 60x between the raw >> query and the explain-anal

[GENERAL] "explain analyse" much slower than actual query

2007-01-28 Thread Phil Endecott
erimental but has never lost any mail. If you're interested, have a look at http://decimail.org/.) Many thanks for any advice, Phil. (You are welcome to CC: me in any replies) ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Optimising "full outer join where" for muti-row to multi-column view

2006-12-28 Thread Phil Endecott
PostgreSQL has failed to simplify a query on the view as I had hoped it would, either because the semantics of SQL mean that it is unable to (with no way of describing the additional constraints that apply to that data and could make the simplification possible), or because the query optimiser doesn&#

[GENERAL] Initdb logging on xp

2006-06-14 Thread Phil Thornhill
postgres user account i'm having difficulties in finding out why? Any help would be much appreciated. Regards Phil Thornhill ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-n

[GENERAL] Installation Problem

2005-10-24 Thread phil campaigne
nlaod and install GCC.3.3.4 but the error message says it needs a c compiler Any ideas on how I might proceed? thanks, Phil ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] psql: server closed the connection unexpetedly

2005-08-24 Thread Phil Thornhill
Sean Davis wrote: On 8/24/05 7:24 AM, "Phil Thornhill" <[EMAIL PROTECTED]> wrote: Hi, I can't connect to a new installation of PostgreSQL 8.1 on a XP SP1 laptop. Im trying to connect using psql in the laptop's command prompt. i keep getting the foll

[GENERAL] psql: server closed the connection unexpetedly

2005-08-24 Thread Phil Thornhill
ectly. has anyone else ever come across the problem? or any suggestions as to what the problem may be? thanks in advance phil.. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Megabytes of stats saved after every connection

2005-07-29 Thread Phil Endecott
Postgresql core copes well with this setup. It's just peripheral things, like autovacuum and this stats writing issue, where poor big-O complexity had gone un-noticed. --Phil. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Megabytes of stats saved after every connection

2005-07-29 Thread Phil Endecott
Greg Stark wrote: Phil Endecott wrote: Just to give a bit of background, in case it is useful: this is my family tree website, treefic.com. I have a schema for each user, each with about a dozen tables. In most cases the tables are small, i.e. tens of entries, but the users I care about are

Re: [GENERAL] Megabytes of stats saved after every connection

2005-07-28 Thread Phil Endecott
does not seem to be a bottleneck. --Phil. ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Megabytes of stats saved after every connection

2005-07-28 Thread Phil Endecott
and pass it to the rest of the application. As far as I can see it is only because some parts of PostgreSQL have poor O(num tables) performance that things are slowing down. --Phil. ---(end of broadcast)--- TIP 3: Have you checked our ext

Re: [GENERAL] Megabytes of stats saved after every connection

2005-07-28 Thread Phil Endecott
I would assume that with a decent filesystem and appropriate OS buffers, none of the data blocks of most stat files even hit the disk. I must be missing something. This is possibly true --- Phil, do you see actual disk I/O happening from the stats writes, or is it just kernel calls? During my te

[GENERAL] Megabytes of stats saved after every connection

2005-07-28 Thread Phil Endecott
I need the stats, though I'm not entirely sure about that. Was the entire file re-written, even when the only query I've run is "select 1"? Is this necessary? Any comments or suggestions gratefully received. --Phil. ---(end of broadcast)---

[GENERAL] Pushing limit into subqueries of a union

2005-06-09 Thread Phil Endecott
I get the same results, about 1000 times faster. I presume that PostgreSQL doesn't try to push the limit clause into the subqueries of a UNION ALL in this way. I believe it is safe, isn't it? Cheers, Phil. ---(end of broadcast)--

Re: [GENERAL] Propogating conditions into a query

2005-06-09 Thread Phil Endecott
Tom Lane wrote: Phil Endecott <[EMAIL PROTECTED]> writes: D join (M join G on (M.g=G.id)) on (D.id=M.b) where D.id=nnn A possible workaround is to generate your query like D left join (M join G on (M.g=G.id)) on (D.id=M.b AND M.b=nnn) where D.id=nnn I don't suppose it would wo

Re: [GENERAL] Propogating conditions into a query

2005-06-09 Thread Phil Endecott
Tom Lane wrote: Phil Endecott <[EMAIL PROTECTED]> writes: I have a number of complex views for which the typical use is to select exactly one row by id, e.g. "select * from V where id=nnn". Some of these selects run orders of magnitude faster than others. Looking at the ou

[GENERAL] Propogating conditions into a query

2005-06-09 Thread Phil Endecott
ount estimates are all reasonable. I imagine that the restriction is something missing in the query optimiser. Can I rewrite this query somehow? Is there anything else I can do about it? This is with 7.4.2. Cheers, Phil. ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Phil Endecott
ble were taking up over half a gigabyte, which came down to less than 40 megs after reindexing them. Is there a case for having autovacuum also call reindex?) --Phil. ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-07 Thread Phil Endecott
Matthew T. O'Connor wrote: Phil Endecott wrote: > Could it be that there is some code in autovacuum that is O(n^2) in > the number of tables? Browsing the code using webcvs, I have found this: for (j = 0; j < PQntuples(res); j++) { tbl_elem = DLGetHead(dbs->table

Re: [GENERAL] CPU-intensive autovacuuming

2005-06-06 Thread Phil Endecott
s undoubtedly O(n^2) in the number of tables. Have I correctly understood what is going on here? --Phil. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] CPU-intensive autovacuuming

2005-06-05 Thread Phil Endecott
debugging suggestions? This is with the Debian package of 7.4.2, and all the default autovacuum settings. Cheers, Phil. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Postgresql .NET Data Provider for Visual Studio 2005

2005-05-23 Thread Phil Thornhill
to your toolbar. Now just drag and drop on the form designer! phil.. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Philippe Lang Sent: 23 May 2005 14:44 To: Howard Cole; PgSql General Subject: Re: [GENERAL] Postgresql .NET Data Provider for Visual

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread phil campaigne
Lonni J Friedman wrote: On Wed, 30 Mar 2005 15:58:02 -0500, phil campaigne <[EMAIL PROTECTED]> wrote: Scott Marlowe wrote: On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move my development database (7.2.3) to my production server but the production

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread phil campaigne
Scott Marlowe wrote: On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move my development database (7.2.3) to my production server but the production server database has a different name. What is the procedure for restoring a database pg_dump to another machine with a

[GENERAL] Restore to a database with another name?

2005-03-30 Thread phil campaigne
Hi All, I want to move my development database (7.2.3) to my production server but the production server database has a different name. What is the procedure for restoring a database pg_dump to another machine with a different database name? Thanks in advance, Phil

Re: [GENERAL] Query performance problem

2005-03-18 Thread Phil Daintree
S NULL LIMIT 0 , 30 In postgres: SQL executed. Total runtime: 12.241 ms Still this is a third of the time of the sub-query route but 4 times longer than mysql - this must be an install issue? Thanks again for this idea Paul phil On Fri, 18 Mar 2005 14:07, you wrote: > See the syntax f

Re: [GENERAL] Query performance problem

2005-03-18 Thread Phil Daintree
chartdetails WHERE period BETWEEN 1 AND 12 ) LIMIT 0 , 30 You'll notice the discrepancy on the timings though! Whilst pg is not performing the way mysql does with innodb - it is at least usable this way. I am guessing there is some gremlin with my install - I'll try an upgrade to v 8. Phi

[GENERAL] Query performance problem

2005-03-17 Thread Phil Daintree
Back Transaction!!'), '', _('DB DEBUG:') ); } } if ($TrapErrors){ include('includes/footer.inc'); exit; } } return $result; } I am hoping that someone will be able to see an alternative simpler method or suggest a method of indexing the pg tables to optmise the required queries. I would appreciate any help here men. Many thanks in advance -- Phil Daintree webERP Project Admin ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[GENERAL] [OT] Duration between two timestamps

2005-02-22 Thread phil campaigne
Hi All, In my java application I need to subtract two java.sql.timestamps. and I want to store the result as sql type "interval". But my insert statement is failing. Does anyone know what java type I need to use in the insert statement? (it must accept null values) thanks in adv

Re: [GENERAL] Triggers, again.. ;-)

2005-02-22 Thread Phil Endecott
Tom Lane wrote: Phil Endecott <[EMAIL PROTECTED]> writes: It seems less scary when you think of metadata as just being the content of more tables, rather than something special. PG does just fine with handling metadata changes transactionally. However, most operations that affect a t

Re: [GENERAL] Triggers, again.. ;-)

2005-02-22 Thread Phil Endecott
ine. It seems less scary when you think of metadata as just being the content of more tables, rather than something special. Hopefully someone will correct me if it is worse than this! --Phil. ---(end of broadcast)--- TIP 3: if posting/reading thro

Re: [GENERAL] Scalability with large numbers of tables

2005-02-21 Thread Phil Endecott
erver" benchmarks) which is not typical of what postgres does - it simply opens them. I was unaware that ext3 had a tree structure - I assumed that its backward compatibility with ext2 made that impossible. So that's another thing I don't need to worry about. Regard

Re: [GENERAL] error while loading shared libraries: libpq.so.3

2005-02-21 Thread phil campaigne
ing? LD_LIBRARY_PATH=/usr/local/pgsql/lib export LD_LIBRARY_PATH PATH=/usr/local/pgsql/bin:$PATH export PATH good luck, Phil ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Problem with select statement

2005-02-21 Thread phil campaigne
Ragnar Hafstað wrote: On Sun, 2005-02-20 at 20:01 -0500, phil campaigne wrote: Hi gnari, I forgot one thing. I also need to restrict the selecct with two more qualifiers where contest_id =1 and team='Duke' I'm confused where to put it in the select statement. I tried this

Re: [GENERAL] Problem with select statement

2005-02-20 Thread phil campaigne
Ragnar Hafstað wrote: On Sun, 2005-02-20 at 18:18 -0500, phil campaigne wrote: Yes Gnari it works now! all I had to do in addition to your advice was alias the sub select: hardwoodthunder=# select player_number,player_name,cum_score,sum(a),sum(c),sum(t) from ( select player_number

[GENERAL] Problem with select statement

2005-02-20 Thread phil campaigne
lumn that is the sum of a,c,t? I tried sum(sum(a),sum(c),sum(t)) but it doesn't work. Thanks, Phil ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] Problems with select statement

2005-02-20 Thread phil campaigne
0.8 40| R. Perkins | 4 | 0.27 | | 40| R. Perkins | 4 | | 0.33 | (8 rows) How all three (Randolph, 4) rows into one row? thanks, Phil ---(end of broadcast)--- TIP 5: Have you checked our ext

[GENERAL] Problems with select statement

2005-02-20 Thread phil campaigne
| 0.8 | 42| S. Randolph 0.27 | | | 40| R. Perkins | 0.33 | | 40| R. Perkins (8 rows) Any ideas on how to consolidate the rows? thanks in advance, Phil Campagine ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [GENERAL] Triggers, again.. ;-)

2005-02-20 Thread Phil Endecott
ate_ut(); > COMMIT; > > .. without other sessions being affected? This is exactly what I do to avoid matview bulk-update performance issues. --Phil. ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] Scalability with large numbers of tables

2005-02-20 Thread Phil Endecott
e numbers of tables. Should I worry about it? I don't want to wait until something breaks badly if I need architectural changes. Presumably tablespaces could be used to avoid the too-many-files-per-directory issue, though I've not moved to 8.0 yet. Thanks Phil.

Re: [GENERAL] Duration between two timestamps

2005-02-04 Thread phil campaigne
vent. What is a good way to calculate the difference in timestamp and store it in the record as duration. I am doing this as part of a java application on RH linux 8.0. My timestamp is of the form "2005-01-30 07:51:29.149458". thanks in advance, Phil How about: select (select m

[GENERAL] Duration between two timestamps

2005-02-04 Thread phil campaigne
and store it in the record as duration. I am doing this as part of a java application on RH linux 8.0. My timestamp is of the form "2005-01-30 07:51:29.149458". thanks in advance, Phil ---(end of broadcast)--- TIP 3: if posting/reading

Re: [GENERAL] Import SVG file

2005-02-01 Thread Phil Endecott
the one line of psql that you posted. Regards, --Phil Endecott. ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Error Message

2005-01-31 Thread phil campaigne
Hi All, false alarm... I found the problem. I tried to reuse an insertStatement. can't do it. Phil ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

[GENERAL] Error Message

2005-01-31 Thread phil campaigne
Hi All, I'm getting the following from an "insertStatement.executeUpdate();" error message: postgresql.stat.result [EMAIL PROTECTED] Does anybody know why? thanks, Phil ---(end of broadcast)--- TIP 3: if posting/reading through Usenet,

[GENERAL] Numeric type

2005-01-26 Thread phil campaigne
casts. If I just want to store the number as 'xx.xx', is 'numeric' the right postgresql type? thanks, Phil ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Partitioning Postgresql

2005-01-26 Thread phil campaigne
>phil campaigne wrote: Hello All, I know that with Oracle you can partition the tables into logical subsets and was wondering if this was also possible in postgres. >No (except by hand, with a view layered over the top). Also is postgresql supported on linux cluusters? >And no (at

[GENERAL] Partitioning Postgresql

2005-01-26 Thread phil campaigne
Hello All, I know that with Oracle you can partition the tables into logical subsets and was wondering if this was also possible in postgres. Also is postgresql supported on linux cluusters? Thanks in advance, Phil ---(end of broadcast)--- TIP 9

Re: [GENERAL] to_char(0,'9999.99') -> ".00"

2005-01-11 Thread Phil Endecott
point, e.g. this one to_char(148.5, 'FM999.990') '148.500' I imagine that in most cases people do want '0.000' rather than '.000', so perhaps these examples should be changed to, in this case, 990.000. Regards, --Phil. ---(end of

[GENERAL] to_char(0,'9999.99') -> ".00"

2005-01-10 Thread Phil Endecott
ooking for to_char finds lots of pages that just say 'char'.) Regards, Phil Endecott. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] Temporary tables and disk activity

2004-12-13 Thread Phil Endecott
Tom Lane wrote: Phil Endecott <[EMAIL PROTECTED]> writes: Does this make sense? I imagine that the temporary table is being added to these tables and then removed again. Yes, a temp table has the same catalog infrastructure as a regular table, so creation and deletion of a temp table will

Re: [GENERAL] Temporary tables and disk activity

2004-12-13 Thread Phil Endecott
e it seems to be writing of the order of a megabyte in each 5-second update. I should mention that I ANALYSE the temporary table after creating it and before using it for anything; I'm not sure if this does any good but I put it in as it "couldn't do any harm". Any thou

Re: [GENERAL] Temporary tables and disk activity

2004-12-12 Thread Phil Endecott
type of situation? Is there any kernel-tweaking I can play with? Regards, Phil. ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

[GENERAL] Temporary tables and disk activity

2004-12-10 Thread Phil Endecott
his down? Thanks in advance for any help that you can offer. Regards, Phil Endecott. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

[GENERAL] Temporary tables and disk activity

2004-12-04 Thread Phil Endecott
ithin read-only transactions? Is there any debug output that I can look at to track this down? Thanks in advance for any help that you can offer. Regards, Phil Endecott. ---(end of broadcast)--- TIP 6: Have you searched our list archives?

[GENERAL] null value of type java.sql.Time

2004-11-23 Thread phil campaigne
Thanks for the insight Thomas and Gregory. I think I can make a work around. Phil ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

[GENERAL] null value of type java.sql.Time

2004-11-22 Thread phil campaigne
hen I try to select on the null column value, I get zero records. select * from event where game_clock=null; How can I retreive records with null values for a column? thanks, Phil ---(end of broadcast)--- TIP 7: don't forget to increase y

Re: [GENERAL] Analyse - max_locks_per_transaction - why?

2004-11-11 Thread Phil Endecott
n 7.4 is probably to use VACUUM ANALYZE rather than > analyzing separately. That will force it to use a transaction per > table. That's another possibility. Thanks. --Phil. ---(end of broadcast)--- TIP 6: Have you searched our list archives?

[GENERAL] Analyse - max_locks_per_transaction - why?

2004-11-10 Thread Phil Endecott
rite a function to get the same effect - has anyone already done that? Regards, Phil Endecott. ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Time at end of transaction

2004-10-13 Thread Phil Endecott
itting the transaction. Surely last-modified timestamps and cache-refreshing are being used all over the place... Regards, --Phil. ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

  1   2   >