Re: [GENERAL] Question on round-robin partitioning

2009-08-29 Thread Alban Hertroys
queries? What about foo_id = 100 AND foo_id % 8 = 100 % 8 ? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a9911a711861381017743! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Alban Hertroys
in some cases. Is that possible? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a95273611861044619247! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Alban Hertroys
values are TOASTed though, they're rather short values; not quite 2k anyway. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a954cda11869014116556! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Tagged types module and varlena changes

2009-08-26 Thread Alban Hertroys
On 26 Aug 2009, at 16:55, Alban Hertroys wrote: With the SET_VARSIZE the above should work *as long as datum is not toasted (or packed)*. If it's been detoasted then that's good, or if it was freshly generated and not stored in a tuple then it should be good too. I changed

Re: [GENERAL] how to return field based on field= NULL or not

2009-08-24 Thread Alban Hertroys
= 1; Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a92716d11861465718119! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

[GENERAL] Comparing arrays of composite types

2009-08-21 Thread Alban Hertroys
for unit_token[]. Alban Hertroys -- Screwing up is the correct approach to attaching something to the ceiling. !DSPAM:737,4a8eee7b10131407718702! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] Comparing arrays of composite types

2009-08-21 Thread Alban Hertroys
On 21 Aug 2009, at 22:12, Tom Lane wrote: Alban Hertroys dal...@solfertje.student.utwente.nl writes: I have created operators on unit_token for =, , =, and =, but either I did something wrong defining my operators or the error is pointing to some other problem. The mere fact

Re: [GENERAL] A history procedure that prevents duplicate entries

2009-08-19 Thread Alban Hertroys
about this very topic here recently. Alban Hertroys -- Screwing up is the correct approach to attaching something to the ceiling. !DSPAM:737,4a8bd41d10131434511488! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Unit conversion database (was: multiple paramters in aggregate function)

2009-08-19 Thread Alban Hertroys
On 18 Aug 2009, at 19:59, Alban Hertroys wrote: Hello all, Inspired by the original discussion on aggregating quantities of different units I made a start at a unit conversion database and the result is here: http://solfertje.student.utwente.nl/documents/units.sql I just uploaded

Re: [GENERAL] Unit conversion database (was: multiple paramters in aggregate function)

2009-08-19 Thread Alban Hertroys
on this ;) Ah, no problem. Please keep posting release announcements. Maybe on -announce if so. Yes, announce would be the right place. I dislike it when people start using this list for announcements of new versions of their software, so let's not start doing that myself :) Alban Hertroys

Re: [GENERAL] multiple paramters in aggregate function

2009-08-18 Thread Alban Hertroys
-- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general Alban Hertroys -- Screwing up is the correct approach to attaching something to the ceiling. !DSPAM:737,4a8a8ee410137968484637

Re: [GENERAL] Unit conversion database (was: multiple paramters in aggregate function)

2009-08-18 Thread Alban Hertroys
are welcome. On 18 Aug 2009, at 13:22, Alban Hertroys wrote: In this case however we have far better tools, namely a computer with a database. It's easy to create a table with units and their conversion factor to a standard unit. If you go a bit further you'd create a few tables linking

Re: [GENERAL] A history procedure that prevents duplicate entries

2009-08-16 Thread Alban Hertroys
ON radical FOR EACH ROW EXECUTE PROCEDURE history_radical(); Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a87e8d010131556343596! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Function doesn't work properly

2009-08-14 Thread Alban Hertroys
if; if cursor1.tipo_transaccion = 'CK' then creditos := creditos + cursor1.monto; end if; if cursor1.tipo_transaccion = 'NC' then creditos := creditos + cursor1.monto; end if; end loop; Alban Hertroys -- Screwing up is the correct

Re: [GENERAL] multiple paramters in aggregate function

2009-08-13 Thread Alban Hertroys
functions. You're much more flexible that way. Alban Hertroys -- Screwing up is the correct approach to attaching something to the ceiling. !DSPAM:737,4a83fca210137297812668! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Make check fails on 8.3.7

2009-08-07 Thread Alban Hertroys
the regression tests from the console? If that still doesn't show anything it's probably a good idea to run the regression tests through trace, but that's probably going to create a LOT of output to wade through. It should point you to the culprit though. Alban Hertroys -- If you can't see

Re: [GENERAL] timestamp with time zone, retrieving input offset/timezone

2009-08-06 Thread Alban Hertroys
' as timestamp with time zone) at time zone 'GMT'; timezone --- 2009-08-06 10:15:12.66097 (1 row) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a7aadf610131061822158! -- Sent via

Re: [GENERAL] LDAP Configuration for Postgres authenticating against AD

2009-08-06 Thread Alban Hertroys
=*;BELFRY\ Others already commented on that fact that this line is never matched, but is that space between master1. and belfry.lan intentional? (The re-wrapping caused by indenting it for reply didn't make it more obvious to see unfortunately) Alban Hertroys -- If you can't see the forest

Re: [GENERAL] Make check fails on 8.3.7

2009-08-06 Thread Alban Hertroys
command gets captured in a file and those are then diffed with the expected output? If so, isn't it just the output of stderr getting lost here? What shell are you using? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] Update Query doesn't affect all records

2009-08-06 Thread Alban Hertroys
there is one) is giving inconsistent results. Or the xid on the row itself is doing something strange (vacuum would probably have fixed that?). Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a7abcfd10131523526886! -- Sent

Re: [GENERAL] character 0xe29986 of encoding UTF8 has no equivalent in LATIN2

2009-08-04 Thread Alban Hertroys
or not? They do not intend to enter valid data after all ;) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a7820e510131352719414! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Refer to another database

2009-08-04 Thread Alban Hertroys
On 4 Aug 2009, at 7:43, Andreas Kalsch wrote: 1) I have to rewrite many lines of code = time Why? You do know that you can set multiple schemas in search_path do you? It's a path ;) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] character 0xe29986 of encoding UTF8 has no equivalent in LATIN2

2009-08-04 Thread Alban Hertroys
it. It is an international website and the simplification is just for indexing. But I think that this will not solve the problem and I have to use Python or Perl to get it done. Alban Hertroys schrieb: On 4 Aug 2009, at 24:57, Andreas Kalsch wrote: I think the real problem is: Where do you lose

Re: [GENERAL] character 0xe29986 of encoding UTF8 has no equivalent in LATIN2

2009-08-03 Thread Alban Hertroys
on the connection and send it to a database that can handle UTF-8 then you shouldn't be getting any conversion problems in the first place. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a77688810131526383955

Re: [GENERAL] questions on (parallel) COPY and when to REINDEX

2009-08-02 Thread Alban Hertroys
partition constraints into account too if you choose to use table partitioning. Looking forward to your replies. Janet Regards, Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a7581ec10134875916639! -- Sent via

Re: [GENERAL] Problem trying to load trigger

2009-08-02 Thread Alban Hertroys
or identifier quotation around the RETURN-type. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a75cff110131139260432! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] building a binary-portable database

2009-08-01 Thread Alban Hertroys
differences. I'd still not trust the data in it afterwards, but whether that matters depends on what you intend to use it for. If you want safe and sound, use pg_dump/restore. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] org.postgresql.util.PSQLException: PANIC: could not write to log file 6

2009-07-30 Thread Alban Hertroys
, in which case there would be data loss if it can't write there. Caused by: org.postgresql.util.PSQLException: PANIC: could not write to log file 6, segment 176 at offset 14991360, length 8192: Read-only file system You missed the interesting part: Read-only file system. Alban Hertroys

Re: [GENERAL] Very slow joins

2009-07-25 Thread Alban Hertroys
you're running into this issue. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a6af5d410132049512701! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Copying only incremental records to another DB..

2009-07-24 Thread Alban Hertroys
tool. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a6995d910131993413858! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] [EDIT] Timestamp indicies not being used!

2009-07-20 Thread Alban Hertroys
like this: http://en.wikipedia.org/wiki/The_boy_who_cried_wolf Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a6437be10131991414558! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Best practices to WorkFlow design?

2009-07-11 Thread Alban Hertroys
still developing. If you intend to handle conditions in the database, I suggest handling the expression evaluation needed for that in a language other than pl/ pgsql, it will be much easier that way. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] How to trace client sql requests?

2009-07-11 Thread Alban Hertroys
you're looking at that data from the same connection, or if not, that the inserts get committed? I've seen data disappear if people forgot they were in a transaction block and didn't commit at the end. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] ZFS prefetch considered evil?

2009-07-09 Thread Alban Hertroys
On Jul 9, 2009, at 3:53 AM, Yaroslav Tykhiy wrote: On 08/07/2009, at 8:39 PM, Alban Hertroys wrote: On Jul 8, 2009, at 2:50 AM, Yaroslav Tykhiy wrote: IIRC prefetch tries to keep data (disk blocks?) in memory that it fetched recently. What you described is just a disk cache

Re: [GENERAL] ZFS prefetch considered evil?

2009-07-08 Thread Alban Hertroys
to ask about this on the FreeBSD mailing lists as well, they'll know much better than I do ;) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a54776e10131807247821! -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] = Null is Null?

2009-07-08 Thread Alban Hertroys
it seems like those other DB's use their comparisons with null inconsistently, or they wouldn't be able to do outer joins... Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a548b0a10137687714970! -- Sent via pgsql

Re: [GENERAL] multiple rows by date using count(*)

2009-07-05 Thread Alban Hertroys
this: select date, sum(case when raw_text like '%RBL%' then 1 else 0 end) as RBL, sum(case when raw_text like '%PRB%' then 1 else 0 end) as PRB from zoa_pireps group by date. It's probably a lot more readable if you wrap those expressions in an immutable function. Alban Hertroys -- If you can't

Re: [GENERAL] BETWEEN not matching on timestamp value

2009-06-30 Thread Alban Hertroys
with currencies anymore THAT far into the future! Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a4a4f2d759151169695543! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

Re: [GENERAL] Need suggestions

2009-06-27 Thread Alban Hertroys
with by companies who co-locate your servers plus they usually provide a reliable internet connection for them as well. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a45e92b759151647533614! -- Sent via pgsql

Re: [GENERAL] Separating raise notice lines

2009-06-24 Thread Alban Hertroys
the newline. The fault is in the client though, so maybe you don't want to handle that on the server-side. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a41e08a759153794312201! -- Sent via pgsql-general mailing

Re: [GENERAL] looping over a small record set over and over in a function

2009-06-20 Thread Alban Hertroys
like you'd be better served by a language that can work with arrays of typed structures. As I'm not familiar with the other PL languages I can't tell whether they would be suitable in that respect, but I suspect Python or Java would be able to handle this better. Alban Hertroys -- If you

Re: [GENERAL] String Manipulation

2009-06-13 Thread Alban Hertroys
the text. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a33833c759151518024860! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] Maintenance database SQL_ASCII

2009-06-13 Thread Alban Hertroys
. What SQL_ASCII does is accept any value, regardless of encoding. It basically just stores the bytes, even for multi-byte encodings. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a33842e759156622419335! -- Sent

Re: [GENERAL] How to store text files in the postgresql?

2009-06-13 Thread Alban Hertroys
are available, but the database gets to check its constraints against those operations as well and can throw an error that prevents the file-system operation from being performed. Apparently something like this shouldn't be too hard to implement using FuseFS. Alban Hertroys -- If you can't see

Re: [GENERAL] When to use cascading deletes?

2009-06-11 Thread Alban Hertroys
to be able to deal with a foreign key constraint violation or have some method to prevent those from occuring. If you don't know what to choose for a given relation it's safe to stick with the default, but you do need to think about what your application needs to do in such cases. Alban Hertroys

Re: [GENERAL] quoting values magic

2009-05-26 Thread Alban Hertroys
= $foo_id Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a1c2f7010091048315763! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] Need beginning and ending date value for a particular week in the year

2009-05-26 Thread Alban Hertroys
-datetime.html#FUNCTIONS-DATETIME-EXTRACT ). Maybe you should upgrade. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a1c33e310093700910733! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Query

2009-05-25 Thread Alban Hertroys
0 end as segundo_campo_virtual from (select *, campo1 - campo2 as campo_virtual from tabla) as tabla; Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a1a708910091961258073! -- Sent via pgsql-general mailing list

Re: [GENERAL] very large tables

2009-05-25 Thread Alban Hertroys
. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a1a7e4d10092128944961! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] duplicate rows in query

2009-05-23 Thread Alban Hertroys
/mailpref/pgsql-general Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a17c3ee10091470919307! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] performance tuning on Vista problem

2009-05-23 Thread Alban Hertroys
not to be accessible by the postgres user, which displayed the behaviour you describe above. I don't know the details, I rarely even use Windows, but this is what I remember. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest

Re: [GENERAL] Code tables, conditional foreign keys?

2009-05-23 Thread Alban Hertroys
with the exact same layout? I don't quite see the benefit. You could use the ENUM type for that (http://www.postgresql.org/docs/current/static/datatype-enum.html ), although that works best if these values are really static. If users should be able to edit them they're probably not the best choice. Alban

Re: [GENERAL] After each row trigger NOT seeing data changes?

2009-05-22 Thread Alban Hertroys
subscription: http://www.postgresql.org/mailpref/pgsql-general Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a16764110091025167268! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Help with join syntax sought supplemental

2009-05-21 Thread Alban Hertroys
with a simple join. But as people often say here, premature optimisation is a waste of time, so don't go that route unless you have a reason to expect problems in that area. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] Help with join syntax sought

2009-05-19 Thread Alban Hertroys
) Or you ORDER BY effective_from DESC and use DISTINCT ON to ignore the duplicates after the first match (which is the newest currency due to the ordering). I wonder whether it's possible to have effective_from dates in the future though, that would complicate things slightly more... Alban

Re: [GENERAL] how do you get there from here?

2009-05-15 Thread Alban Hertroys
the constraint, at which point the database will verify that the related records match the constraint. Of course this opens a risk where a record gets inserted that doesn't match your FK constraint which will cause recreation to error out and your transaction to rollback. Alban Hertroys -- If you

Re: [GENERAL] A question about RAISE NOTICE

2009-05-10 Thread Alban Hertroys
on this list (although they're probably reading this as well). You'd probably be better off asking there. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4a06aec0129741990515020! -- Sent via pgsql-general mailing list

Re: [GENERAL] Re: Mapping output from a SEQUENCE into something non-repeating/colliding but random-looking?

2009-05-03 Thread Alban Hertroys
for the rest of the input according to Luhn''s algorithm.' Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49fd82b6129742129210600! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] Difference between array column type and separate table

2009-05-02 Thread Alban Hertroys
implementations. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49fc1d20129743379199738! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] triggers and execute...

2009-05-01 Thread Alban Hertroys
if it'd be similarly easy to inspect the name and type of each column. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49f82a8c129742043099112! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] deleting function

2009-04-25 Thread Alban Hertroys
On Apr 25, 2009, at 5:19 AM, pavunkumar wrote: Dear Friend Whatever your saying right , But why the function not saying error ? that is my doubt... this is what I want to clarify! Because it's a valid comparison, just not the one you wanted. Alban

Re: [GENERAL] Frequently unable connecting to db server doesn't listen

2009-04-20 Thread Alban Hertroys
can fix it by uninstall and reinstall PostgreSQL. But it happening repeatly. Reinstalling shouldn't be necessary, it's probably enough to wait until recovery is complete. The logs can tell you what's going on. Alban Hertroys -- If you can't see the forest for the trees, cut the trees

Re: [GENERAL] update one table with another

2009-04-20 Thread Alban Hertroys
could use UPDATE...FROM: update entities set customer_status = t2.customer_status from entity_dimension_update as t2 where entity_id = t2.entity_id Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49ed0151129747011493647

Re: [GENERAL] Connect without specifying a database?

2009-04-12 Thread Alban Hertroys
point of view. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49e1ca98129741055947028! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] [GENEAL] dynamically changing table

2009-03-31 Thread Alban Hertroys
, it allows you to specify types for your data) so that you know which fields to expect in the document. You can query XML fields using xpath expressions in your queries. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] [GENEAL] dynamically changing table

2009-03-31 Thread Alban Hertroys
On Mar 31, 2009, at 6:41 PM, Harald Fuchs wrote: In article 437faa9f-df2d-429e-9856-eb2026b55...@solfertje.student.utwente.nl , Alban Hertroys dal...@solfertje.student.utwente.nl writes: You could add the columns you're sure that you need and put the rest in an XML field. mantra If you

Re: [GENERAL] intermittant performance problem

2009-03-28 Thread Alban Hertroys
looking theories :) Alban Hertroys wrote: On Mar 25, 2009, at 5:09 PM, Mike Charnoky wrote: Due to the nature of the sampling (need to limit using several parameters with a WHERE clause), I can't just generate random numbers to select data that I need. Looks like I am stuck using ORDER

Re: [GENERAL] intermittant performance problem

2009-03-26 Thread Alban Hertroys
it's own disadvantages of course. I've used something like that (as a function in our PHP application) on a medium-sized data set before, and it performed adequately. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] Time intersect query

2009-03-23 Thread Alban Hertroys
, and since you don't know where your intervals start and end I don't see how you could do that without at least first generating your intervals. After that there doesn't seem to be much use for the windowing functions, as a simple group by seems to do what you want. Alban Hertroys -- If you

Re: [GENERAL] text column constraint, newbie question

2009-03-23 Thread Alban Hertroys
, so if someone searches for é in your forms it doesn't match eacute; in your database) or data in your scripts that is hard to compare (the value from a GET or POST request does not contain entities while the value read and converted from the database does). Alban Hertroys -- If you can't

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Alban Hertroys
at that. I think my approach works as well as it does because it's a procedural approach to a procedural problem. If you'd like to see some code, I have posted about this in the past and that contained some code examples. Just search the archives. Alban Hertroys -- If you can't see the forest

Re: [GENERAL] funny view/temp table problem with query

2009-02-26 Thread Alban Hertroys
wasted trying to get a proper question out of you... Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49a7359f129748797120425! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] restore single table

2009-02-25 Thread Alban Hertroys
before you commit (or rollback if they don't). Create savepoints before performing such tests so that typos in your test queries don't invalidate your schema changes. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] partial unique index and the planner

2009-02-16 Thread Alban Hertroys
in your table. This way you shouldn't have your earlier problem with the estimates. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4999b115747031962913450! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Slow database creation

2009-02-10 Thread Alban Hertroys
up in template1... oops! Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4991c5e6747031805728238! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Slow update

2009-02-09 Thread Alban Hertroys
151332 * (21.418 - 1.418) = 3026640 ms, which is almost 12% of the total time. The biggie seems to be the bitmap heap scan on rb though. The row estimates for that one are way off (estimated 549 rows vs actual 151332). Alban Hertroys -- If you can't see the forest for the trees, cut

Re: [GENERAL] Moving between major versions easily (Was: Vacuums taking forever :()

2009-02-05 Thread Alban Hertroys
if the slave fails queries that the master eats just fine? The data shouldn't get out of sync. For example due to the recent stricter type-casting changes. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: (Questioning the planner's mind) - was Re: [GENERAL] Fastest way to drop an index?

2009-02-04 Thread Alban Hertroys
in other queries as well, so it's likely in the cache. I guess that could make using that index and scan through the results faster than reading the new index from disk. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] Smartest way to resize a column?

2009-02-02 Thread Alban Hertroys
is logged. I'm confused. How to stop the error? You don't happen to have any functions that use varchar(20) in their arguments or for local variables? I'm not sure they'd cause the shown error, but I expect them to. Alban Hertroys -- If you can't see the forest for the trees, cut

Re: [GENERAL] Slow first query despite LIMIT and OFFSET clause

2009-01-28 Thread Alban Hertroys
mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4980a309747032541118883! -- Sent via

Re: [GENERAL] Slow first query despite LIMIT and OFFSET clause

2009-01-28 Thread Alban Hertroys
On Jan 29, 2009, at 1:35 AM, Phoenix Kiula wrote: On Thu, Jan 29, 2009 at 2:25 AM, Alban Hertroys dal...@solfertje.student.utwente.nl wrote: Ah I see, that's the original query and its plan again, not the one after implementing those triggers! You had me scratching my head for a bit

Re: [GENERAL] Re: how to implement a foreign key type constraint against a not unique column

2009-01-27 Thread Alban Hertroys
-1 then null else fee end ) ); anything wrong with create unique index foobar on foo where fee -1 ? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,497f50e9747031810420427! -- Sent via pgsql-general mailing list

Re: [GENERAL] Slow first query despite LIMIT and OFFSET clause

2009-01-27 Thread Alban Hertroys
are to determine those counts. If those counts are generally very low the benefit will probably be minimal. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,497f5466747032672819277! -- Sent via pgsql-general mailing

Re: [GENERAL] How to do an UPDATE for all the fields that do NOT break a constraint?

2009-01-27 Thread Alban Hertroys
for the new values and add a constraint to that, deprecating (or even dropping) the old column from your design. Don't forget to vacuum afterwards. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,497f5540747032091416566

Re: [GENERAL] performance advice needed: join vs explicit subselect

2009-01-27 Thread Alban Hertroys
verify unfortunately. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,497f5aa8747035160810079! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] failed insert queries to one table-postgis enabled db

2009-01-24 Thread Alban Hertroys
somewhere... You might be hitting that with 16MB queries. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,497af707747031347810546! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-11-08 Thread Alban Hertroys
violation! Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,49157dd89507271520953! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] on delete cascade slowing down delete

2008-08-24 Thread Alban Hertroys
On Aug 22, 2008, at 9:45 AM, Ivan Sergio Borgonovo wrote: On Fri, 22 Aug 2008 08:48:30 +0200 Alban Hertroys [EMAIL PROTECTED] wrote: Is it going to make things faster if I: delete from s; reindex table s; Why do you think this step would help you any? There's no index on p to begin

Re: [GENERAL] SERIAL datatype

2008-08-24 Thread Alban Hertroys
the start sequence ID to MAX() + 1? DELETEs don't use your sequence so will not exhaust it. In practice only INSERTs do. I saw you mention sequences in combination with DELETEs a few times, just making sure you're not confused ;) Alban Hertroys -- If you can't see the forest for the trees

Re: [GENERAL] on delete cascade slowing down delete

2008-08-22 Thread Alban Hertroys
likely be slower. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,48ae6140243481364815068! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] bytea encode performance issues

2008-08-03 Thread Alban Hertroys
this is for compatibility with an other database? Why use status IN (0, 1) instead of more descriptive keys? Is it even constrained this way, or could arbitrary numbers end up as status (say 99) and if so, what happens to those messages? Alban Hertroys -- If you can't see the forest

Re: [GENERAL] bytea encode performance issues

2008-08-03 Thread Alban Hertroys
. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4895b34b243488085013917! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] ERROR: could not open relation with OID 2836

2008-06-26 Thread Alban Hertroys
a reference to the toast table somehow)? Is that data-file on a mirror where one part of the mirror may be mirroring a bad sector over the good one on the other drive(s)? I may be talking nonsense, I'm no Tom Lane, but I know a fair share about postgres ;) Regards, Alban Hertroys -- If you

Re: [GENERAL] encoding confusion

2008-06-11 Thread Alban Hertroys
. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,4850140f927661409586227! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref

Re: [GENERAL] strpos NOT doing what I'd expect

2008-06-07 Thread Alban Hertroys
NOTICE: achar is RpS NOTICE: achar is RhS NOTICE: achar is R S find_next_delim - 6 (1 row) WHY find a match on the space??? Thanks! Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM

Re: [GENERAL] small table, huge table, and a join = slow and tough query. cake inside!

2008-05-29 Thread Alban Hertroys
' GROUP BY fips, small.geom, small.name HAVING SUM(huge.value) 500; Guessing from your performance problem you may not have an index on huge.fips? And did you vacuum/analyse those tables anytime recently? Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see

Re: [GENERAL] active queries

2008-05-27 Thread Alban Hertroys
) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,483c430d927661540552177! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] quote in string

2008-05-23 Thread Alban Hertroys
On May 21, 2008, at 7:36 PM, finecur wrote: select * from my_flexible_sql_function('select * from employee where dep ='Eng'') You need to escape that string like 'select * from employee where dep =''Eng'' ' Alban Hertroys -- If you can't see the forest for the trees, cut the trees

Re: [GENERAL] IN query operator and NULL values

2008-05-16 Thread Alban Hertroys
correctly (two records). That looks like a bug in 8.1. So the question is: what has changed from 8.1 to 8.2? I think a bug was fixed ;) Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:737,482dbc5e927668957138674! -- Sent

Re: [GENERAL] IN query operator and NULL values

2008-05-16 Thread Alban Hertroys
On May 16, 2008, at 6:54 PM, Alban Hertroys wrote: development= select b, coalesce( (b in (1, null))::text, 'NULL') from test; b | coalesce ---+-- 1 | true 2 | NULL | NULL (3 rows) Just remembered a nice option from psql that doesn't quite clutter my example as much

<    4   5   6   7   8   9   10   11   12   13   >