Re: [GENERAL] problem with ORDER BY

2008-02-01 Thread Martijn van Oosterhout
how lc_collate; Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] [ADMIN] Backup

2008-01-31 Thread Martijn van Oosterhout
Hmm? I thought the whole point of a filesystem snapshot was that it's the same as if the system crashed. And I was fairly sure we could recover from that... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolu

Re: [GENERAL] OT - pg perl DBI question

2008-01-29 Thread Martijn van Oosterhout
e one in this package: http://packages.debian.org/lenny/libpg-perl It's not old. It's kept reasonably up to date. It's more or less a shim over the C library and has direct access to all its features, which is not always possible with DBD:Pg. Have a nice day, -- Martijn van Oos

Re: [GENERAL] Forgot to dump old data before re-installing machine

2008-01-24 Thread Martijn van Oosterhout
On Thu, Jan 24, 2008 at 05:41:20PM +0100, Stefan Schwarzer wrote: > What would you recommend now in order to get the data back? I have > postgis data in the databases too, although this is not too important > for me... pg_dump, pg_dumpall... Have a nice day, -- Martijn van O

Re: [GENERAL] Forgot to dump old data before re-installing machine

2008-01-24 Thread Martijn van Oosterhout
the same byte-order it should work much betteR). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Sun acquires MySQL

2008-01-21 Thread Martijn van Oosterhout
eaning to post as it seems like a really bad bug), it was > slow. Please report such bugs, since no-one else has seen this problem... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make v

Re: [GENERAL] Sun acquires MySQL

2008-01-20 Thread Martijn van Oosterhout
is how to get help. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Sun acquires MySQL

2008-01-20 Thread Martijn van Oosterhout
nonexistent > 99% of SQL code in either Oracle and MySQL DB's are written in > Procedures..trying to port that to Postgres is a very long and tedious > uphill climb Sorry? PostgreSQL supports SPs in several languages.. What exactly are you referring to here? -- Martijn van Oost

Re: [GENERAL] SHA1 on postgres 8.3

2008-01-20 Thread Martijn van Oosterhout
see: > http://raveica.comdurav.com/blog/programming/how-do-i-add-sha1-to-postgresql/ It's in contrib in the pgcrypto module. If you use a distribution you can usually simply just install it. http://www.postgresql.org/docs/8.3/static/pgcrypto.html Have a nice day, -- Martijn van Oosterhout <[E

Re: [GENERAL] postgres.org src build vs. enterprisedb installer

2008-01-20 Thread Martijn van Oosterhout
precompiled on 13 architechtures... http://packages.debian.org/experimental/postgresql-8.3 Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-20 Thread Martijn van Oosterhout
process/user/database whatever you like. I think the word you're looking for is "configurable". Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolutio

Re: [GENERAL] ATTN: Clodaldo was Performance problem. Could it be related to 8.3-beta4?

2008-01-20 Thread Martijn van Oosterhout
n indexscan may have higher correlation... A low correlation works against plans returning lots of rows. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitabl

Re: [GENERAL] pg_dumpall

2008-01-17 Thread Martijn van Oosterhout
is outputting? PostgreSQL uses MVCC, which means the whole thing is lock free. It just requires more diskspace. To keep the older versions around. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible w

Re: [GENERAL] Don't cascade drop to view

2008-01-17 Thread Martijn van Oosterhout
ng them as functions that return sets of > whatever record type your views are. As you say, functions are compiled at use time, and hence don't suffer this problem. You can build a view on the function and it should be transparent... Have a nice day, -- Martijn van Oosterhout <[EMAIL PR

Re: [GENERAL] libpq updateable resultset?

2008-01-16 Thread Martijn van Oosterhout
On Sun, Jan 13, 2008 at 09:55:08PM +1100, Tristen Ennemuist wrote: > Hello, I'm new to libpq and I'm trying to discover a > means of updating resultset columns. > > I can see there's a "get" PQgetvalue but no "set" > equivalent PQsetvalue. Libpq

Re: [GENERAL] COUNT() with ORDER BY

2008-01-16 Thread Martijn van Oosterhout
ate: 42803 > > > How to fix this ? > This statement is generated by DbLinq driver and it is difficult to re-qrite > the driver. Sorry? The query is entirely non-sensical. The output will be a single row telling you the number of non-null elements in the col column. How can

Re: [GENERAL] Help with pre-loaded arbitrary key sequences

2008-01-16 Thread Martijn van Oosterhout
ormally when loading the data and then do a setval() on the sequence to past the values already stored. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitab

Re: [GENERAL] bulk copy

2008-01-15 Thread Martijn van Oosterhout
ction. There's even an example: http://www.maconlinux.net/php-online-manual/en/function.pg-put-line.html Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevit

Re: [GENERAL] Forgot to dump old data before re-installing machine

2008-01-15 Thread Martijn van Oosterhout
really doesn't work, try this: http://svana.org/kleptog/pgsql/pgfsck.html Point it at the right directory and it can give you a dump of data. It's not pretty, doesn't handle arrays or some of the less common datatypes but it should get you 99% of the way. Have a nice day, -- Mar

Re: [GENERAL] tcp_keepalives_idle ignored

2008-01-13 Thread Martijn van Oosterhout
That will list a lot of postgres processes, you're looking for the other ones. Connecting to unix domain socket happens if you don't specify a host. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] 8.2.4 serious slowdown

2008-01-10 Thread Martijn van Oosterhout
postgresql.org/pgsql-general/2008-01/msg00143.php Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Can I create a TYPE (or DOMAIN) with arguments?

2008-01-10 Thread Martijn van Oosterhout
od which will allow such constructs... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Time stamp issue

2008-01-10 Thread Martijn van Oosterhout
tant to you: DELETE from CONCURRENT_USER WHERE CONCURRENT_USER.TIME_STAMP < (now() - (? * '1 second'::interval)); Perhaps JDBC can handle intervals itself also, that I don't know. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ >

Re: [GENERAL] Setting variables equal to elements from an Array

2008-01-10 Thread Martijn van Oosterhout
------- {{4,5,6}} (1 row) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Kernel kills postgres process - help need

2008-01-10 Thread Martijn van Oosterhout
M killer gets invoked here I don't know). Disabling overcommit won't help you either. Perhaps a 64-bit architecture? Or a RAID controller that can access high memory (is this possible?). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Thos

Re: [GENERAL] count(*) and bad design was: Experiences with extensibility

2008-01-10 Thread Martijn van Oosterhout
to check visibility, but if you specify that the DB only needs to check 10% of the tuples and to extrapolate the results from that, you could get a fast yet reasonably accurate result. IIRC patches for this have been floated on the lists. Have a nice day, -- Martijn van Oosterhout <[EMAIL

Re: [GENERAL] Hash Indexes

2008-01-07 Thread Martijn van Oosterhout
your biggest concern. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Memory on 32bit machine

2008-01-07 Thread Martijn van Oosterhout
memory you have left you will be profitably used as diskcache. Postgres does not need to be able to access the memory directly to be able to use it... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impos

Re: [GENERAL] Hash Indexes

2008-01-04 Thread Martijn van Oosterhout
RE md5(textcol) = md5('text'); Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Mandatory AS keyword in SELECT statements

2008-01-04 Thread Martijn van Oosterhout
g" an alias or part of the type name? See this thread: http://archives.postgresql.org/pgsql-hackers/2003-04/msg00436.php Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revoluti

Re: [GENERAL] How to handle 'not a number' in postgresql

2008-01-04 Thread Martijn van Oosterhout
Is there such a value in postgresql? If not I will have to hack it in > with a boolean and would rather not do so. Did you try it? # select 'nan'::float; float8 ---- NaN (1 row) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog

Re: [GENERAL] how to alter an enum type

2007-12-24 Thread Martijn van Oosterhout
fter it is created, not for enums, not for any type. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] update pg question?

2007-12-23 Thread Martijn van Oosterhout
) don't require any changes to data files. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Restoring 8.0 db to 8.1

2007-12-21 Thread Martijn van Oosterhout
... No downtime... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] pgsql cannot read utf8 files moved from windows correctly!

2007-12-20 Thread Martijn van Oosterhout
r line. Err, no. In UTF-16 files it is common to begin the *file* with that character, but UTF-8 doesn't have that character anywhere, it's illegal. Just stripping them out should be fine. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/

Re: [GENERAL] Quick Regex Question

2007-12-20 Thread Martijn van Oosterhout
gt; With ^ you means an anchor, but within the brackets it's a simple char. Err no, it inverts the test. [^ ] means any character *except* a space. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossi

Re: [GENERAL] INDEX on a composite type

2007-12-20 Thread Martijn van Oosterhout
for your type, but there's no magic for that. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] INDEX on a composite type

2007-12-19 Thread Martijn van Oosterhout
s somewhere that anything except straight column names need parenthesis. What you have is an expression and thus it needs them. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revo

Re: [GENERAL] Getting char * from timestamp in a composite type

2007-12-19 Thread Martijn van Oosterhout
tAttributeByName( row, "time", & isNull ); >// Check for null >char * ret = DatumGetCString( DirectFunctionCall1(textout, var ) ); That's not going to work. textout wants a text datum. Try calling timestamp_out instead... Have a nice day, -- Martijn van Oosterhout &l

Re: [GENERAL] postgres8.3beta encodding problem?

2007-12-18 Thread Martijn van Oosterhout
On Tue, Dec 18, 2007 at 10:35:39AM -0500, Tom Lane wrote: > Martijn van Oosterhout <[EMAIL PROTECTED]> writes: > > Ok, but that doesn't apply in this case, his database appears to be > > LATIN1 and this character is valid for that encoding... > > You know what,

Re: [GENERAL] postgres8.3beta encodding problem?

2007-12-18 Thread Martijn van Oosterhout
character is valid for that encoding... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Hijack!

2007-12-14 Thread Martijn van Oosterhout
"rewritefrom" and others that can be set on a per user basis, so you can configure the list exactly how you like it... No need to complain to anyone else that it not your preferred way. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kle

Re: [GENERAL] Unable to ALTER table after SELECT data from table

2007-12-10 Thread Martijn van Oosterhout
problem. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Improving the timing of a query

2007-12-07 Thread Martijn van Oosterhout
anytime your query says: WHERE myfunction(column) = X Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-06 Thread Martijn van Oosterhout
ump table data, but it's not been updated in quite a while so I don't know if it'll work for your version... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revoluti

Re: [GENERAL] reformatting floats ?

2007-12-06 Thread Martijn van Oosterhout
nt to_char(). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-06 Thread Martijn van Oosterhout
loop is better. As for the index problem, I don't know but it will probably work better. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitab

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-04 Thread Martijn van Oosterhout
inning of this thread. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-04 Thread Martijn van Oosterhout
in the new table even if the copy worked? Ah sorry, I though you meant de table was dropped or the database was deleted. If you actually ran a DELETE FROM on the table, then yes they'll all be marked deleted. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://sv

Re: [GENERAL] Recovering data via raw table and field separators

2007-12-04 Thread Martijn van Oosterhout
down the postmaster and copying the old table over the new one. If it's the same cluster and the clog/xlog are still there it might work. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will

Re: [GENERAL] difficulty extracting variable-sized field on triggered row

2007-12-04 Thread Martijn van Oosterhout
However, DETOAST is the right step, because if you don't do that you might be handed a toasted string. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution &

Re: [GENERAL] "Suspending" indexes and constraint updates

2007-12-04 Thread Martijn van Oosterhout
dex checks can't be done. For really big loads it's not uncommon to remove the constraints and indexes prior to te load. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will ma

Re: [GENERAL] "relation deleted while in use" encountered with Postgresql 8.0.8

2007-12-02 Thread Martijn van Oosterhout
ng only INSERT statements. Any ideas > on what might be causing this and/or if this a known issue and possible > solutions would be greatly appreciated. Do you run VACUUM regularly? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Thos

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Martijn van Oosterhout
) (1 row) divide -1.00 (1 row) DROP FUNCTION DROP TABLE --- Can you try the attached script on a *nlank* database? It'll give us more info about your system. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful

Re: [GENERAL] Recheck condition

2007-11-30 Thread Martijn van Oosterhout
ndle that. The only things I can think of is to add the person_id to the index also so that you can avoid the sort (not sure if first or last is more helpful). Or perhaps clustering on that index to reduce disk access... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]>

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Martijn van Oosterhout
a > bug in the windows build. Seems rather unlikely to affect just windows. Can you post a script that you can run against a blank database that shows the problem. complete with output on your machine. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kle

Re: [GENERAL] postgresql table inheritance

2007-11-30 Thread Martijn van Oosterhout
e foo as (a text, b text); CREATE TYPE test=# create table test( id int4, vals foo ); CREATE TABLE test=# insert into test values ( 4, ROW('a', 'b')); INSERT 0 1 test=# select * from test; id | vals ----+--- 4 | (a,b) (1 row) The syntax is different but the ideas are th

Re: [GENERAL] Recheck condition

2007-11-30 Thread Martijn van Oosterhout
person_id FROM person WHERE (column1=1 AND column2='189') b WHERE a.person_id = b.person_id; or perhaps: SELECT a.person_id FROM person a, person b WHERE a.column1=1 AND a.column2='62' AND b.column1=1 AND b.column2='189' AND a.person_id = b.person_id; Which will

Re: [GENERAL] invalid byte sequence for encoding "UTF8"

2007-11-30 Thread Martijn van Oosterhout
think? Possibly the migration tools fault? I think they mean to select the correct encoding for the data, what encoding the database is in isn't relevent. The database can convert any encoding you want to use to UTF-8 as required. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECT

Re: [GENERAL] Record variable not behaving as expected (bug?)

2007-11-30 Thread Martijn van Oosterhout
g. On my 8.1.9 test system it returns -1.00 as expected. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Linux v.s. Mac OS-X Performance

2007-11-29 Thread Martijn van Oosterhout
stgres only requests blocks from the OS in large blocks. I doubt tcmalloc would make a useful difference here. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > i

Re: [GENERAL] Cascading Trigger Prevention

2007-11-29 Thread Martijn van Oosterhout
ut it seems to me that if when the trigger is fired it only updates its parent everything should work, right? As it recurses up the tree eventually it reaches the end, surely? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peace

Re: [GENERAL] Help needed optimizing query

2007-11-29 Thread Martijn van Oosterhout
uld take longer. What you really need is to send the output of EXPLAIN ANALYZE so we can see where the time actually went. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution

Re: [GENERAL] Recheck condition

2007-11-29 Thread Martijn van Oosterhout
recheck). > In other words, Will this query cause 1000 random heap access or 10 random > heap access ? I don't know, run it and see. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Recheck condition

2007-11-28 Thread Martijn van Oosterhout
es the conditions. This query is 8ms, I imagine when it takes a long time it's matching lots of rows? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Recheck condition

2007-11-28 Thread Martijn van Oosterhout
tion on the result to make sure you only get the rows you wanted. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Streaming LIBPQ? Sliding Window in LIBPQ?

2007-11-28 Thread Martijn van Oosterhout
avn't tested it on recent versions. The program I posted a while back that tested if the locks blocked as documented drove two connections simultaneously this way. http://archives.postgresql.org/pgsql-hackers/2005-08/msg01073.php http://archives.postgresql.org/pgsql-general/2006-07/msg00806.php

Re: [GENERAL] Streaming LIBPQ? Sliding Window in LIBPQ?

2007-11-28 Thread Martijn van Oosterhout
Use non-blocking mode to get the data in chunks. You can't easy control the number of rows you get each time though... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolu

Re: [GENERAL] indexing tables using my owns functions

2007-11-27 Thread Martijn van Oosterhout
4.htm) > > but i get the following error > > mhc2db=> create index h2iab on precalc (idr(p1,p4,p6,p7,p9,'H-2*IAb')); > ERROR: functions in index expression must be marked IMMUTABLE Where you declare the function, add the modifier IMMUTABLE. Have a nice day, --

Re: [GENERAL] Empty arrays with ARRAY[]

2007-11-25 Thread Martijn van Oosterhout
ix it: http://groups.google.com/group/pgsql.general/browse_thread/thread/911791e145a17daa/6b035035aeaac399 http://www.mail-archive.com/pgsql-general@postgresql.org/msg90681.html Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution

Re: [GENERAL] Problems with PostGreSQL and Windows 2003

2007-11-25 Thread Martijn van Oosterhout
because it certainly doesn't look like you're using a cursor, just a plain select. Which probably means youre client side is running out of memory. So, check you're using a cursor. Or just limit the output to however many rows you actually want. Have a nice day, -- Martijn van Oost

Re: [GENERAL] LIBPQ: Can we have buffered PGresult (i.e. a retreival by chuncks?)

2007-11-25 Thread Martijn van Oosterhout
w. It is possible to stream the results by setting the socket in non-blocking mode, but if you want windows you can use server-side cursors, or use a client side that handles this (I think JDBC can do it, but there are others) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECT

Re: [GENERAL] Problems with PostGreSQL and Windows 2003

2007-11-25 Thread Martijn van Oosterhout
mething more reasonable, like 256MB or 128MB. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] manipulating HeapTuples in a libpq client

2007-11-24 Thread Martijn van Oosterhout
the result. The question for me is why are you returning heaptuples and not just a resultset which you can access via the normal functions. There are no client side functions to deal with heaptuples. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/klep

Re: [GENERAL] ODBC, access, and joins

2007-11-23 Thread Martijn van Oosterhout
ccess? For the text-memo thing there are options in the configuration (a tickbox xsomewhere). I think it's called text-as-varchar switch or something. There were some other config options that I also changed, but it's been too long ago to give anything specific. Have a nice day, -- Marti

Re: [GENERAL] Primary Key

2007-11-23 Thread Martijn van Oosterhout
over time? I didn't think so... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] BEGIN strange behaviour

2007-11-22 Thread Martijn van Oosterhout
myconn, "BEGIN;"); You do have different database connections for each thread, right? Otherwise that's why it's not working... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible

Re: [GENERAL] Postgres table size

2007-11-22 Thread Martijn van Oosterhout
less there are no NULLs in which case it costs nothing. 10 cols = 2 bytes, which may or may not be swallowed by alignment. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revol

Re: [GENERAL] 8.3b2 XPath-based function index server crash

2007-11-18 Thread Martijn van Oosterhout
7;s being asked for is a self contained example. Can you make a single script file that when you run it on a blank database causes the error? If you can't, that in itself is a useful fact. But then we need schema dumps and such things. EXPLAIN output for the queries that break. Have a n

Re: [GENERAL] convert access sql to postgresql

2007-11-16 Thread Martijn van Oosterhout
the SQL standard. Not sure why, maybe the theory is that all output columns are calculated simultenously which can't be true if they refer to eachother. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revol

Re: [GENERAL] public schema doubt

2007-11-16 Thread Martijn van Oosterhout
vly, you can revoke all permissions from it... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] getting the number of rows affected by a query

2007-11-16 Thread Martijn van Oosterhout
a normal > SQL eg: The server provides the number of changed rows in its response. Like DELETE 2030. So check whatever you're using to run the commands. Have a ncie day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revol

Re: [GENERAL] Bulk Load Ignore/Skip Feature

2007-11-16 Thread Martijn van Oosterhout
in the logs, there's no way around that. However it looks to me that the data ended up in the database correctly? Or did I miss something? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will mak

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2007-11-14 Thread Martijn van Oosterhout
better way but I don't know it... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Martijn van Oosterhout
I think the effect is comparable to two people typing into the same shell, and each only getting half the output back. Sure, you're unlikely to lose anything big, but do you want to risk it? Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/

Re: [GENERAL] Sharing database handles across forked child processes

2007-11-13 Thread Martijn van Oosterhout
work. Maybe just setup a table indexed by PID and make sure you only use your own. Or after a fork() do a "close $dbh->getfd()" (untested). Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impo

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-13 Thread Martijn van Oosterhout
On Tue, Nov 13, 2007 at 02:08:47PM +0100, Christian Schröder wrote: > By the way, does the "--enable-thread-safety" switch have anything to do > with the problem? No, that only affects the client library, it doesn't affect the server... Have a nice day, -- Martijn van

Re: [GENERAL] PQexec(), what should I do for the "NULL in command" problem?

2007-11-12 Thread Martijn van Oosterhout
You should realise that the text data type does not handle embedded nulls, that's why the bytea datatype exists. If you don't want the full conversion, you'll need to handle your own escaping. PostgreSQL is not going return you strings with embedded NULLs... Have a nice day, --

Re: [GENERAL] PQexec(), what should I do for the "NULL in command" problem?

2007-11-12 Thread Martijn van Oosterhout
xec() failed > on such situation. Two ways: - out of line parameters - escape the nulls, like \0 Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevita

Re: [GENERAL] Regression in 8.3?

2007-11-12 Thread Martijn van Oosterhout
makes both of us say clearly what we want. If people want it they can add the automatic cast back in, it just isn't dfault anymore. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will

Re: [GENERAL] (Never?) Kill Postmaster?

2007-11-11 Thread Martijn van Oosterhout
robably be to disable the restartable flag for the period of socket I/O. Not sure if this has anything to do with your main problem though. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will m

Re: [GENERAL] subselect field "problem"

2007-11-08 Thread Martijn van Oosterhout
up cost, but the query itself finished pretty quickly. Pick up any SQL book and read up on correlated subqueries. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution >

Re: [GENERAL] any way for ORDER BY x to imply NULLS FIRST in 8.3?

2007-11-07 Thread Martijn van Oosterhout
ation (my COLLATE patch let you specify it per column). Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] md5() sorting

2007-11-07 Thread Martijn van Oosterhout
if that would solve it simply. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Copy the database..

2007-11-06 Thread Martijn van Oosterhout
On Sat, Nov 03, 2007 at 01:42:09PM -, Abandoned wrote: > I tryed pg_dump but it is very slowly. Are there any faster way to > copy database? Have you tried CREATE DATABASE .. TEMPLATE ? (See amual for syntax) Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED

Re: [GENERAL] Restore a database

2007-11-05 Thread Martijn van Oosterhout
ww.postgresql.org/docs/faq -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

Re: [GENERAL] Restore a database

2007-11-05 Thread Martijn van Oosterhout
ot sure that temporarily > reinstalling 7.1 will allow access immediately or must I have to rebuild > something. The debian packages tend to leave behind old versions of pg_dump and such to help with situations like this, though 7.1 is from quite a while ago... Have a nice day, -- Martijn van Oo

Re: [GENERAL] index usage in joins q'n

2007-11-03 Thread Martijn van Oosterhout
> say that? No, as long as one of the two columns is indexed it can help. An index on both might help if you need a lot of rows but it's a bit hard to construct a situation where it'd be obvious. Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.

Re: [GENERAL] index on array?

2007-11-02 Thread Martijn van Oosterhout
equest per row) references to the key/value pairs using > an bigint[] array In contrib there is the hstore module (for key/value lists) and intarray module for indexing arrays of integers. Either of these may help. Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> ht

Re: [GENERAL] select random order by random

2007-11-01 Thread Martijn van Oosterhout
the common rules somewhere). Then again, I may be remembering all wrong... Have a nice day, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution > inevitable. > -- John F Kennedy signature.asc Description: Digital signature

<    1   2   3   4   5   6   7   8   9   10   >