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

2006-04-12 Thread Richard Huxton
would look nice, but this would at least remove the hazard from stuff that thinks whitespace isn't significant. That's the sort of thing I was thinking of, or even something like: 1> Nested Loop ... 1.1> Join Filter... 1.1.1> HashAggregate... 1.2&

Re: [HACKERS] Performance Issues

2006-05-23 Thread Richard Huxton
ta itself might be cached. You might want to look at memcached for this sort of thing. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] [PERFORM] Query in SQL statement

2005-10-05 Thread Richard Huxton
me), KEY Date (Date) The word "KEY" isn't valid here either - are you trying to define an index? If so, see the "CREATE INDEX" section of the SQL reference. http://www.postgresql.org/docs/8.0/static/sql-commands.html If you reply to this message

Resultset duplicates (was Re: [HACKERS] prefix btree implementation)

2005-10-05 Thread Richard Huxton
ating duplicate values in result-sets? I'd guess that many/most large result-sets are sorted which should make it possible to get away with a "same as last row" marker when the whole set is returned to a client. Of course, this is where someone turns around and tells me we do this alread

Re: [HACKERS] SIGSEGV in Postgres 8.0.3 (libpq4)

2005-10-19 Thread Richard Huxton
afety turned on. http://www.postgresql.org/docs/8.0/static/libpq-threading.html -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [HACKERS] 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)

2005-10-20 Thread Richard Huxton
s are the same, then any function on those two values should return the same result. Otherwise what does "equals" mean? At the very least length() is broken by your argument. Here it's CHAR that's broken IMHO - spawn of some punch-card spawned data processing rules of the

Re: [HACKERS] changing create table

2005-10-20 Thread Richard Huxton
://www.postgresql.org/developer/roadmap In postres for some reason its not possible to choose a file structure while we are creating tables!!! It is possibel while making an index. What do you mean by "file structure"? -- Richard Huxton Archonet Ltd ---(end of

Re: [HACKERS] Copy From CSV feature request?

2005-11-08 Thread Richard Huxton
There's a sign that you've got a bug. If Crystal can't read what it writes then I'm not sure you can expect anyone else to do so reliably. If I import it into Access 2003 it ships Line 1001 and Line 1002 into an import error table. Quite right too. It's one of the areas

Re: [HACKERS] Accessing libq functions from UDF (shared library)

2005-11-08 Thread Richard Huxton
TE OR REPLACE FUNCTION' , i get the following error: Should you not be using SPI to run queries if this is inside PostgreSQL? See chapter 39 "Server Programming Interface" for details. -- Richard Huxton Archonet Ltd ---(end of broadcast)-

Re: [HACKERS] Underlying view columns?

2005-11-10 Thread Richard Huxton
l: http://pgfoundry.org/projects/newsysviews -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] question about count(b) where b is a custom type

2005-11-16 Thread Richard Huxton
luded. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [HACKERS] Improving count(*)

2005-11-18 Thread Richard Huxton
erialised_view This should allow you to have where-clauses and apply to a range of cases. What I fear is that checking to see if the rule applies will cost too much on all those queries where it doesn't apply. -- Richard Huxton Archonet Ltd ---

Re: [pgsql-www] [HACKERS] Upcoming PG re-releases

2005-12-01 Thread Richard Huxton
second choice. If it's practical to keep them, I'd like to suggest doing so. If it's not practical, could we have a where_to_find_old_versions.txt file and open a project on sourceforge to keep them? -- Richard Huxton Archonet Ltd ---(end of bro

Re: [pgsql-www] [HACKERS] Upcoming PG re-releases

2005-12-01 Thread Richard Huxton
Csaba Nagy wrote: Maybe "mausoleum" would be even better name :-D Come on people, it's clearly: elephants-graveyard.postgresl.org -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 1: if posting/reading through Usen

Re: [HACKERS] Graphics in postgress using GTK

2005-12-02 Thread Richard Huxton
splay Can someone suggest a method to integrate this GTK code into postgres and solve this problem. Um - don't you want to be doing this in the client, not in the backend? -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 3: Have

Re: [HACKERS] lo function changed in PostgreSQL 8.1.1

2005-12-13 Thread Richard Huxton
), the ODBC driver needed a unique type. They had created an 'lo' type, but not the solution to orphaning. You don't actually have to use the 'lo' type to use the trigger, but it may be convenient to use it to keep track of which columns in your database

Re: [HACKERS] lo function changed in PostgreSQL 8.1.1

2005-12-14 Thread Richard Huxton
don't think it's been removed. The README.lo I quoted in my last email was from 8.1 source. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [HACKERS] Immodest Proposal: pg_catalog.pg_ddl

2005-12-14 Thread Richard Huxton
hat we have sub-transactions, we could wrap the call to the trigger function so that errors didn't abort the user setup/login etc. There's been demand for this sort of thing fairly regularly - I'd probably use it myself. -- Richard Huxton Archonet Ltd --

Re: [HACKERS] Resurrecting pg_upgrade

2004-09-01 Thread Richard Huxton
Serguei A. Mokhov wrote: Hello, Just poking around to see if anyone is working on resurrecting the concept of pg_upgrade after all these years? You probably want to join the (very recent) thread subject = "version upgrade" started by Andrew Rawnsley. -- Richard Huxton Ar

Re: [HACKERS] [PERFORM] [ADMIN] slower every day

2004-09-01 Thread Richard Huxton
G u i d o B a r o s i o wrote: Conclusion: If you comment a line on the conf file, and reload it, will remain in the last state. (either wast true or false, while I expected a default) Yes, that's correct. No, you're not the only one to have been caught out by this. -- Rich

Re: [HACKERS] [GENERAL] Networking feature for postgresql...

2004-10-14 Thread Richard Huxton
r SPI calls are made. Have you looked at the dblink code? -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [HACKERS] [GENERAL] Networking feature for postgresql...

2004-10-14 Thread Richard Huxton
you'd need to fork the backend itself. On Thu, 2004-10-14 at 11:15, Richard Huxton wrote: Katsaros Kwn/nos wrote: Hi, I'm trying to add a -project specific- networking feature to my postgres build (or database as function). What I want to do is to send a Query instance (as a String-retr

Re: RE : [HACKERS] Record unassigned yet

2004-10-01 Thread Richard Huxton
Tmp; END LOOP; RETURN true; END ' LANGUAGE 'plpgsql'; SELECT emp_test_fn(); === END test === PS - please reply to the -general list not -hackers. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] Increasing the length of

2004-11-10 Thread Richard Huxton
le, if you set it to 250 then all SQL statements that run 250ms or longer will be logged. Enabling this option can be useful in tracking down unoptimized queries in your applications. Only superusers can increase this or set it to minus-one if this option is set by the administrator. -- Rich

Re: [HACKERS] Fwd: SELECT MAX with char => BUG?

2004-11-20 Thread Richard Huxton
Crazy. And posting to the wrong list - try the general/sql lists for this sort of thing. teste=# CREATE TABLE test ( id char(15), name char(80) ); CREATE You've defined "id" as char - so it's sorting alphabetically, not numerically, so < 2 Just defined "id&q

Re: [HACKERS] Help!

2004-11-25 Thread Richard Huxton
refused Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? This isn't really the right list - I'll repost onto the General list for you now. Please join me there, and don't reply to this message. -- Rich

Re: [HACKERS] Getting Unicode characters greater than or equal to

2004-11-26 Thread Richard Huxton
ing UTF-8 but some other character set. Certainly that is what the error message implies. Note PG handles UTF-8 but not UTF-16 or other encodings. HTH -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[HACKERS] Possible TODO item? VACUUM on empty table

2004-11-26 Thread Richard Huxton
e's a work-around (unless you're running pg_autovacuum I'd guess) 2. We perhaps want a more general table description (this is a bulk-loading table, this is a log table, this is a mostly static lookup table) -- Richard Huxton Archonet Ltd ---(end of broadcast

Re: [HACKERS] Error handling in plperl and pltcl

2004-11-30 Thread Richard Huxton
originally either. Why a subtransaction per command rather than one per function? If I've got this right, this is so the PL can tidy up behind itself and report/log an appropriate error? -- Richard Huxton Archonet Ltd ---(end of broadcast)-

Re: [HACKERS] Error handling in plperl and pltcl

2004-12-01 Thread Richard Huxton
es standard try/catch. I don't use TCL, but from the little I know this should be straightforward. 3. We can do something similar with a pgeval() in plperl. Don't know enough to say about Python. Basically, if exception handling doesn't work the way it should intuitively work (IM

Re: [HACKERS] createdb failed

2004-12-01 Thread Richard Huxton
d choice. Things to check: 1. You are starting PG as the right user 2. Permissions are correct 3. The directory exists 4. Have you done anything with tablespaces? -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] Error handling in plperl and pltcl

2004-12-01 Thread Richard Huxton
Thomas Hallgren wrote: Richard Huxton wrote: Can I make some counter-proposals? 1. Wrap each function body/call (same thing here afaict) in a sub-transaction. An exception can be caught within that function, and all the spi in that function is then rolled back. This is rubbish, but at least

Re: [HACKERS] Error handling in plperl and pltcl

2004-12-01 Thread Richard Huxton
Thomas Hallgren wrote: Richard Huxton wrote: But is the problem not that forgetting to use SAVEPOINT can get us in trouble with clearing up after an exception? I fail to see how that's different from forgetting to use pgtry instead of try. It feels more distinct to me. I'll grant you

Re: [HACKERS] [Testperf-general] BufferSync and bgwriter

2004-12-16 Thread Richard Huxton
;s impractical / will never work, then don't be afraid to step up and let me know. If it helps, you could always think of me as an idiot savant who failed his savant exams :-) -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] RC2 and open issues

2004-12-21 Thread Richard Huxton
again :-) Any blocks written to would move up the cache, effectively moving the bookmark lower. Enough activity would cause the bookmark to drop off the end. If that isn't the case though, we know we can safely skip any blocks older than the bookmark. -- Richard Huxto

Re: [HACKERS] Thoughts about updateable views

2004-12-22 Thread Richard Huxton
certain special cases). UNION etc doesn't necessarily mean you can't update, so long as the underlying table/key can be identified. For INSERTing to a view, the same rules apply, but obviously you need to be able to identify table/keys for all columns in the view. This clearly rules

Re: [HACKERS] Thoughts about updateable views

2004-12-22 Thread Richard Huxton
Yann Michel wrote: Hi, On Wed, Dec 22, 2004 at 09:41:40AM +, Richard Huxton wrote: UNION etc doesn't necessarily mean you can't update, so long as the underlying table/key can be identified. I think you mean UNION ALL, i.e. the set addition, don't you? Otherwise UNION (wotho

Re: [HACKERS] Thoughts about updateable views

2004-12-22 Thread Richard Huxton
Tom Lane wrote: Richard Huxton writes: There are two things (AFAICT) you need to be able to do to update (NOTE - not insert) a view. 1. Identify the underlying table(s) for the updated column(s) 2. Identify (primary) key values for the table(s) being updated. So - I could have a join listing

Re: [HACKERS] Thoughts about updateable views

2004-12-22 Thread Richard Huxton
Tom Lane wrote: Richard Huxton writes: Yann Michel wrote: I think you mean UNION ALL, i.e. the set addition, don't you? Not if you can identify the underlying table(s) and key(s). If the UNION hides that information, then you are correct. If a unique key of the underlying table is includ

Re: [HACKERS] Thoughts about updateable views

2004-12-22 Thread Richard Huxton
Tom Lane wrote: Richard Huxton writes: Tom Lane wrote: No; you'd also have to have some guarantee that a given underlying table row gives rise to at most one join row. If the same table row gives rise to multiple join rows, then a request specifying an UPDATE of just one of those join rows

[HACKERS] Happy Christmas and thanks...

2004-12-23 Thread Richard Huxton
for all the hard work on 8.0, not to mention the new-look website. It's all shaping up to be a good new year. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [HACKERS] ARC patent

2005-01-17 Thread Richard Huxton
t;best of my knowledge...covered by no patents/claims/...". It's like having a bowl of sweets labelled "help yourself" and putting the price sticker inside the wrapper. -- Richard Huxton Archonet Ltd ---(end of broadcast)--

Re: [HACKERS] Much Ado About COUNT(*)

2005-01-20 Thread Richard Huxton
for you anyway. Well, it looks like ROW_COUNT isn't set in a statement-level trigger function (GET DIAGNOSTICS myvar=ROW_COUNT). Which is a shame, otherwise it would be easy to handle. It should be possible to expose this information though, since it gets reported at the command conclu

Re: [HACKERS] Much Ado About COUNT(*)

2005-01-20 Thread Richard Huxton
Mark Cave-Ayland wrote: -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: 20 January 2005 12:45 To: D'Arcy J.M. Cain Cc: Mark Cave-Ayland; [EMAIL PROTECTED]; [EMAIL PROTECTED]; pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Much Ado About COUNT(*) D

Re: [HACKERS] Permissions on aggregate component functions

2005-01-28 Thread Richard Huxton
ld be required. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] Allow GRANT/REVOKE permissions to be applied to all

2005-02-01 Thread Richard Huxton
istinction if it was available. I don't know about other users. Do we perhaps want a pg_find tool instead, rather than getting too clever inside the backend? pg_find --type=table --schema=foo --name='system_*' --execute='GRANT ALL ON % TO myuser'

Re: [HACKERS] Allow GRANT/REVOKE permissions to be applied to all

2005-02-01 Thread Richard Huxton
at you see posted above is the full extent of the idea. If there's a feeling it'd be useful I could pull my finger out and have a working prototype ready in Perl fairly quickly. It'd take me a while to get something decent in C though. -- Richard Huxton Archonet Ltd

Re: [HACKERS] Dealing with network-dead clients

2005-02-14 Thread Richard Huxton
and transaction timeouts have been suggested before, but there seems to be some resistance to them. Have you come across the pgpool connection-pooling project? http://pgpool.projects.postgresql.org/ Might be easier to put a timeout+disconnect in there. -- Richard Huxton Archonet Ltd -

Re: [HACKERS] Help me recovering data

2005-02-16 Thread Richard Huxton
oo? Pro: Teaches the lesson straight away. Con: Irritating Con: Might not be enough time for automated installers -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate

Re: [HACKERS] Strange RETURN NEXT behaviour in Postgres 8.0

2005-02-16 Thread Richard Huxton
? I seem to remember some subtle problems with dropped columns and plpgsql functions - could be one of those still left. It'd look like tablesize was the problem because of course no-one's got time to test with 500 million test rows. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [HACKERS] Design notes for BufMgrLock rewrite

2005-02-17 Thread Richard Huxton
s with count zero are taken by the sweep for recycling. Would there be any value in incrementing by 2 for index accesses and 1 for seq-scans/vacuums? Actually, it should probably be a ratio based on random_page_cost shouldn't it? -- Richard Huxton Archonet Ltd --

Re: [HACKERS] win32 performance - fsync question

2005-02-17 Thread Richard Huxton
ally being written to disk. That's what fsync does for you. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [HACKERS] serial as FK ?

2005-02-28 Thread Richard Huxton
g with it when those notes were written (and I need to update them, clearly). Back then SERIAL implied UNIQUE too, but that was changed (in 7.3 I believe). -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 9: the planner will ignor

<    1   2   3   4