Re: [GENERAL] postgresql vs mysql

2007-02-23 Thread Martijn van Oosterhout
s. Useful, maybe. Confusing, absolutly. I'm just wondering how it would interact with foreign keys for example. Different people can't have different ideas about '' = NULL, else you'd get constraints that are violated depending on who's looking. Have a nice day, -- M

Re: [GENERAL] complex referential integrity constraints

2007-02-23 Thread Martijn van Oosterhout
snapshot to execute the query to get the share lock. It's probably true that other PL's can't do this directly. Not sure how to deal with that. I got confused because I thought the first version of RI did use straight pl/pgsql functions, so I thought that was enough. Have a nice

Re: [GENERAL] complex referential integrity constraints

2007-02-22 Thread Martijn van Oosterhout
bility rules would make any difference at all. AIUI a foreign key just takes a shared lock on the referenced row and all the magic of MVCC makes sure the row exists when the transaction completes. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to

Re: [GENERAL] complex referential integrity constraints

2007-02-22 Thread Martijn van Oosterhout
Err, foreign keys are implemented using triggers, so this statement is self-contradictary. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Slony subscription problem

2007-02-22 Thread Martijn van Oosterhout
for slony, you might have better luck there. http://gborg.postgresql.org/mailman/listinfo/slony1-general Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] postgresql vs mysql

2007-02-22 Thread Martijn van Oosterhout
ay of interpreting the above query. Is the value of bar selected randomly? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] massive memory allocation until machine crashes

2007-02-21 Thread Martijn van Oosterhout
y_id, role_type_id) REFERENCES > party_role(party_id, role_type_id) DEFERRABLE INITIALLY DEFERRED Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Odd behaviour of timestamptz

2007-02-21 Thread Martijn van Oosterhout
tween 1909 and 1937 Amsterdam was 19 minutes 32.13 seconds ahead of GMT, so I imagine entiring a time in that period will produce similar results. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability

Re: [GENERAL] How to force disconnections from a Perl script?

2007-02-19 Thread Martijn van Oosterhout
l_backend() to kill them. You could "kill -INT" them yourself. You could change the pg_hba.conf to forbid logging in and then bouncing the server. Hope this gives you some ideas. -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each accordin

Re: [GENERAL] Why *exactly* is date_trunc() not immutable ?

2007-02-19 Thread Martijn van Oosterhout
. :) > IOW, I want the database to force programmers to have to > think about from which timezone they deliver timestamps into > a date-of-birth field into. Right. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Why *exactly* is date_trunc() not immutable ?

2007-02-19 Thread Martijn van Oosterhout
t with a date_trunc_utc() wrapper. It should be noted the date_truc(timestamptz) is not immutable, whereas date_trunc(timestamp) is. Thus you should be able to make an index on: date_trunc( timestamptz_column AT TIME ZONE 'UTC', 'foo' ) OTOH, if you're only storing times in U

Re: [GENERAL] Stored Procedure examples

2007-02-14 Thread Martijn van Oosterhout
re merely functions that don't return a value. So in that sense procedures are indeed just functions. You obviously mean something else but I'm not sure what. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each accor

Re: [GENERAL] suggestions on improving a query

2007-02-14 Thread Martijn van Oosterhout
be executed once, many times or not at all. There are some more comprehensive writeups around, but hopefully this gives you an idea. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > li

Re: [GENERAL] partitioning / rules - strange behavior

2007-02-07 Thread Martijn van Oosterhout
iple evaluations. If you've played with the C preprocessor: that has the same basic problem. It's rather unexpected for novices, which is why triggers are usually recommended. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. T

Re: [GENERAL] invalid page header in pg_statistic

2007-02-07 Thread Martijn van Oosterhout
both a lot of items and a lot of free space... > Items: 35 Free Space: 8032 > Length (including item array): 164 Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: Fwd: [GENERAL] convert(USING utf8_to_iso_8859_15) on Windows

2007-02-06 Thread Martijn van Oosterhout
t natively. At some point postgresql will know how to do string comparisons itself ad thus the problem will be solved, but it hasn't happened yet. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his abilit

Re: [GENERAL] 8.2.1 Compiling Error

2007-02-05 Thread Martijn van Oosterhout
ns of gcc/g++ installed and some varients of binutils. Once I pruned out the versions I didn't actually need and did a make clean, the problem went away. Hope this helps, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Any Plans for cross database queries on the same server?

2007-02-04 Thread Martijn van Oosterhout
e system won't let you allocate more memory than swap plus a percentage of real memory. If you use it, make sure you allocate plenty of swap, or you'll find you get out of memory errors long before ou're actually out of memory. Have a nice day, -- Martijn van Oosterhout http://s

Re: Speaking of upgrades... (was Re: [GENERAL] Predicted ...)

2007-01-26 Thread Martijn van Oosterhout
ut the underlying system is fairly small. In theory it could work, but I don't know about the status. There has been some support from the core that *if* such a pg_upgrade tool existed, *then* they would provide some backward compatability for he datatypes. Have a nice day, -- Martijn van

Re: [GENERAL] DBI support for pg native arrays?

2007-01-26 Thread Martijn van Oosterhout
of it. > > Is that somehow possible? I looked at the docs without finding anything. That would involve the DBI driver converting it, since it's just returning what the server returns... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each accordi

Re: [GENERAL] too many trigger records found for relation "item" -

2007-01-26 Thread Martijn van Oosterhout
e DISABLE TRIGGER triggername" > > everything ok. And this is the right way... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] column limit

2007-01-25 Thread Martijn van Oosterhout
ys, or normalize the data into a seperate table. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Cannot Restart PostgreSQL-8.1.4

2007-01-24 Thread Martijn van Oosterhout
this journey). I don't > know how to run ldd on a perl script. Method 1: Find the .so module that perl uses (try locate Pg.so and ldd that). Method 2: strace -e open And look at which version it tries to open. How exactly is it failing? Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] Cannot Restart PostgreSQL-8.1.4

2007-01-24 Thread Martijn van Oosterhout
have: > What version of libpq.so do I need? The server doesn't care, what matter is what version the *client* (in this case SQL-Ledger) expects. ldd should tell you that. (It's ok to have multiple versions of the client library installed...) Have a nice day, -- Martijn van Oo

Re: [GENERAL] Installing PostgreSQL under Cpanel

2007-01-23 Thread Martijn van Oosterhout
es. It returns 5 websites, 3 in English. None of which explains > anything meaningful. Your problem is the double quotes, take them out and you get thousands of pages with your exact problem. Google tip: don't use double quotes where the error message contains something substituted (like &

Re: [GENERAL] Postgresql.conf

2007-01-23 Thread Martijn van Oosterhout
spend the overhead, you can make a working system. But most people can live with estimates... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Installing PostgreSQL under Cpanel

2007-01-23 Thread Martijn van Oosterhout
lackage working. That's the way it should be. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Regular expressions and arrays and ANY() question

2007-01-22 Thread Martijn van Oosterhout
r with it that was a communtator of LIKE (call it "is liked by"), would the planner be smart enough to split the ANY and commutate it to the normal order? i.e. convert: foo "is_liked_by" ANY( 'bar', 'baz') to 'bar' like foo OR 'baz' like fo

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-22 Thread Martijn van Oosterhout
locks allows the drive to complete other requests more quickly then it's beneficial, even if the vacuum takes longer. This may be a silly thought, I'm not sure how drives handle multiple requests... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each

Re: [GENERAL] CAST function for user defined type

2007-01-22 Thread Martijn van Oosterhout
gt; VALUES > ( 'aaa', encode( y_uuid_generate(), 'hex' )::y_byte_16 ); or ^ I'm not sure from your example of the difference? byte vs octet. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ >

Re: [GENERAL] security question

2007-01-22 Thread Martijn van Oosterhout
g PG with restrictive SELinux policies? I beleive redhat does this by default, if you have SELinux enabled. Suitably restricted, it should mean the dba/programmer won't be able to get at the data except via the database. I don't know of anyone that's actually done this. Have a nice da

Re: [GENERAL] security question

2007-01-22 Thread Martijn van Oosterhout
come up before. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread Martijn van Oosterhout
cute("BEGIN"); before and after plpy.execute("COMMIT"); Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [HACKERS] [GENERAL] Autovacuum Improvements

2007-01-21 Thread Martijn van Oosterhout
Map would give you this automatically, since that's your memory... Once you have the DSM to track where the dead pages are, you can set it up to target clusters first, thus giving maximum bang for buck. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each

Re: [GENERAL] Password encryption method

2007-01-19 Thread Martijn van Oosterhout
and they can already login as anybody. If you don't like it, don't use password authentication, there are a number of other methods. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > l

Re: [GENERAL] Clearing plans

2007-01-19 Thread Martijn van Oosterhout
ons, if that's what you're looking for... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Alter definition of a column

2007-01-19 Thread Martijn van Oosterhout
able to make sure it's ok. By doing it directly you're basically telling the DB it's OK. For making a varchar column longer it's safe though, and the easiest way. Have a ncie day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability.

Re: [GENERAL] GUID/UUID Support

2007-01-18 Thread Martijn van Oosterhout
tegrity (validation), and performance would be better if PostgreSQL > supported UUIDs directly. Obviously the benefits are not so great given you don't use one of the existing UUID types... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each acco

Re: [GENERAL] Controlling memory of session

2007-01-18 Thread Martijn van Oosterhout
chine has masses of memory left over? A bit like VM overcommit? If you know your queries don't generally use more than one sort, it's fairly easy to estimate memory usage. The best way to find out how many backends you can handle is: simulation. Anything else is guesswork. Have a nice day

Re: [GENERAL] datatype advice numeric vs. varchar

2007-01-17 Thread Martijn van Oosterhout
reated as numbers and things like LIKE don't work on them. When you select them, java is likely to convert them to numbers there too. Is this not a case of premature optimisation? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability.

Re: [GENERAL] FATAL: invalid frontend message type 47 server closed the connection unexpectedly

2007-01-17 Thread Martijn van Oosterhout
onnection from multiple threads. Or some other break in protocol. We're going to need a lot more info to work this out. Incidently, 47 is a capital G, IIRC. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each ac

Re: [GENERAL] Newbie questions (pg_global, tablespace, pg_temp, ...)

2007-01-17 Thread Martijn van Oosterhout
t; documentation. > Want something more - the inner workings, pg_temp*, etc.. The docs cover all this, but you'll have to go to the section dealing with technical details. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Speed of postgres compared to ms sql, is this article/comment

2007-01-17 Thread Martijn van Oosterhout
t what they tested, now that's useful. But much more rare. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] 8.1 vs 8.2.1 view optimization

2007-01-16 Thread Martijn van Oosterhout
or do > I need to create a non-volatile function that returns the result? You could create a function that does the job, but that's generally not necessary. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each acco

Re: [GENERAL] Temp Table Within PLPGSQL Function - Something Awry

2007-01-16 Thread Martijn van Oosterhout
es to use the plan with the old temp table after the table has gone. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Mounting a data dir read only

2007-01-16 Thread Martijn van Oosterhout
he first server doesn't have any compulsion to write out data blocks at the end of a transaction, so the second server will read rubbish. > Is there a way to set such parameters, within startup parameters? Nope, do proper replication, either WAL-shipping, or slony, or something. Have a nice d

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

2007-01-16 Thread Martijn van Oosterhout
s not match the > encoding expected by the server, which is controlled by "client-encoding" Well, your data isn't UTF8 and yet that's what you told the server. Either make the data UTF8, or tell the server the actual encoding used... Have a nice day, -- Martijn van Oosterhou

Re: [GENERAL] Need help on SP

2007-01-16 Thread Martijn van Oosterhout
u showed us the actual error message. At the moment my best guess is a typo in the first line: > DECALRE ^^^ Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.

Re: [GENERAL] Remove diacritical marks in SQL

2007-01-12 Thread Martijn van Oosterhout
7;,'SQL_ASCII') I don't think postgres has any stuff builtin for that, but other languages (like perl) have modules to do this kind of thing. The method is to decompose the string to normal form D, strip the diacritics, and recompose what's left. Hope this helps, -- Martijn van

Re: [GENERAL] TRIGGER BEFORE INSERT

2007-01-11 Thread Martijn van Oosterhout
t; But as this is the 'second round' of my 'call for help' - I get an > impression, that there may actually not be a solution. Too bad. It's possible, by making your foreign key INITIALLY DEFERRED. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] TRIGGER BEFORE INSERT

2007-01-11 Thread Martijn van Oosterhout
to do, but I'm fairly sure you can't change te "deferred state" of triggers after the transaction has started. AIUI you also have to make the foreign key constraint "deferrable" otherwise you can't defer it in any case. This is incidently what Tom suggested. H

Re: [GENERAL] Knowing the length(convert(username using windows_1251_to_utf8))

2007-01-11 Thread Martijn van Oosterhout
tf-8, because it required minimal changes to programs (and in particular, the C library). Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Recording insert, updates, and deletes

2007-01-11 Thread Martijn van Oosterhout
d to be minimal impact so that it can be turned on without slowing down your system. You on the other hand want accuracy over speed, and so the stats collector is not what you want. Some triggers will do it fine. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each

Re: [GENERAL] Knowing the length(convert(username using windows_1251_to_utf8))

2007-01-11 Thread Martijn van Oosterhout
ail you ask: > Can I still be sure that the data returned in the > convert(username using windows_1251_to_utf8) > column will be 0-terminated or should I fetch > the data length using PQgetlength and maintain > that value in my C-program? In the client end (as long you're not

Re: [GENERAL] Export to shape file

2007-01-10 Thread Martijn van Oosterhout
can some one help me on how to import it to shape file. I can't find any docs on that program quickly, but it's evidently looking for a password. You could: - Find a way to give it the password or - Setup your system so it does not need a password. Have a nice day, -- Martijn van Ooster

Re: [GENERAL] join problem...

2007-01-10 Thread Martijn van Oosterhout
k? You can use the ANY() operator for this: # select 1 = ANY( ARRAY[2,3,4] ); ?column? -- f (1 row) # select 2 = ANY( ARRAY[2,3,4] ); ?column? -- t (1 row) Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability

Re: [GENERAL] Array constructor requires one argument

2007-01-09 Thread Martijn van Oosterhout
hink it would be too hard to fix, I'll look tomorrow. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Array constructor requires one argument

2007-01-09 Thread Martijn van Oosterhout
On Tue, Jan 09, 2007 at 10:02:09AM -0500, Tom Lane wrote: > Martijn van Oosterhout writes: > > Is there a particular reason why the array constructor requires at > > least one argument? > > Define the data type of > > SELECT ARRAY[]; The same type as:

Re: [GENERAL] Confused by misleading error message on SP creation

2007-01-09 Thread Martijn van Oosterhout
ater there, and $2 and $3 the command on the next line. As for speed decrease, you should trying working out which bit is slow... If it's choosing a seq scan, maybe you havn't ANALYZE'd? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From e

[GENERAL] Array constructor requires one argument

2007-01-09 Thread Martijn van Oosterhout
lect '{}'::int4[]; int4 -- {} (1 row) Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Deleting From View?

2007-01-05 Thread Martijn van Oosterhout
, that would duplicate records in the result. You can't delete any particular duplicate because it is the result, not the cause. Hope this helps, > -----Original Message- > From: Martijn van Oosterhout [mailto:[EMAIL PROTECTED] > Sent: Friday, January 05, 2007 10:16 AM &

Re: [GENERAL] Deleting From View?

2007-01-05 Thread Martijn van Oosterhout
postgresql at all. Obviously, whatever trick that was applied to convince java to insert into a view needs to be used to make the delete work. Wouldn't fixing the insert rule be better? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to

Re: [GENERAL] Deleting From View?

2007-01-05 Thread Martijn van Oosterhout
exist, it's the result of a query. Obviously you have some rules setup to allow inserting, which is obviously not doing the right thing if the output suddenly creates two rows. You're going to need to provide the complete definition of the table+rules if you want a more detailed answer.

Re: [GENERAL] Table inheritance implementation.

2007-01-05 Thread Martijn van Oosterhout
an index that can be updated by multiple tables, what are the locking semantics then? If you want to drop the parent index, do you have to lock every child table? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each acc

Re: [GENERAL] How to use the SQL parser subsystem

2007-01-04 Thread Martijn van Oosterhout
de the server. > 3] If not, what would be a better mechanism to re-use all the work already > done in postgres for SQL analysis? No idea. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Tabbed data in tab-separated output

2007-01-04 Thread Martijn van Oosterhout
is prety dumb that way, being designed for people not programs. I think recent versions will escape the tab. I suggest you use \copy instead, which on recent versions will allow you to copy from a query. Alternativly, use a delimiter that doesn't exist in your data. Have a nice day, -- Mart

Re: [GENERAL] Generic timestamp function for updates where field

2006-12-31 Thread Martijn van Oosterhout
name is that you can no longer tell what type the result will be. It could be any type supported by postgres. pl/pgsql can't handle that, perl and python can... Hope this helps, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To eac

Re: [GENERAL] out of memory woes

2006-12-29 Thread Martijn van Oosterhout
king up the virtual memory. Note that in Linux, overcommit off limits the total virtual memory to swap space + half of real RAM. How much RAM have you got and how much active swap? If you have a server with lots of ram, you need at least half that RAM as swap to be able to use it all... Have a

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

2006-12-28 Thread Martijn van Oosterhout
ry out entirely? Like so: create view view photo_info_v as select photo_id, (select orientation from e2 where e2.tag='Orientation' and e2.photo_id = e1.photo_id), etc Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his abilit

Re: [GENERAL] Optimization of unnecessary GROUP BY columns

2006-12-26 Thread Martijn van Oosterhout
> made me curious: Recent SQL standards require it, so it's likely to be implemented at some point. Havn't seen any patches in that direction though... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each ac

Re: [GENERAL] NEED URGENT HELP....

2006-12-26 Thread Martijn van Oosterhout
On Mon, Dec 25, 2006 at 08:52:52PM -0300, Henrique P Machado wrote: > WHERE (USER_ID = $1) AND (COMPANY_ID = $2) AND BOOK_NO IN ($3) > > Could'nt he use an array in this 3rd parameter? I think so, if it's written: AND BOOK_NO = ANY($3) Have a nice day, -- Mar

Re: [GENERAL] table locks

2006-12-25 Thread Martijn van Oosterhout
rder to avoid conflicts > with autovacuum and suchlike? The documentation on locks clearly lists what lock types conflict with what. But seriously, why block autovacuum? It no visible effect on the table. Why do you want to lock at all? Lock-free designs are always better. Have a nice day,

Re: [GENERAL] Tricky join question

2006-12-22 Thread Martijn van Oosterhout
want is to apply to restriction on person earlier, maybe: SELECT c.id, c.name, pc.person_id FROM person as p left outer join person_course as pc on (p.id = pc.person_id and p.id = 2) right outer join course as c on pc.course_id = c.id order by 1; Hope this helps, -- Martijn van Oosterh

Re: [GENERAL] 8.2.0 psql \df+ output mangled a bit relative to 8.1.4 ...

2006-12-21 Thread Martijn van Oosterhout
unaligned mode it's still the old way. There was some discussion at the time about whether tabs should be converted to spaces on output, but I don't think that got anywhere... It's a psql only thing BTW, other programs will not see it. Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] MAGIC_MODULE and libc

2006-12-19 Thread Martijn van Oosterhout
my actual C code...but in this > case surely I am not expected to recompile libc...am I? Is there an > easier way to get the pid of the current process? In general you should use a wrapper library, but in your case pg_backend_pid() will do it. Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] TIMESTAMP WITHOUT TIME ZONE

2006-12-15 Thread Martijn van Oosterhout
en, multi-time-zone applications need to be VERY warry. It looks like you understand the issues, so if you're using it correctly, fine. Most people do not, and many try to use "timestamp without timezone" to store local times, which does not work. The good rule of thumb is ba

Re: [GENERAL] b-tree index performance

2006-12-15 Thread Martijn van Oosterhout
nsive on a 32-bit system. The difference between int4 and int8 is probably negligable. > Since TEXT is totally variable, is there a big difference in TEXT vs > CHAR(8)? Nothing measurable I'd think. It's probably the same code. Have a nice day, -- Martijn van Oosterhout

Re: [GENERAL] b-tree index performance

2006-12-15 Thread Martijn van Oosterhout
#x27;m especially interested between INT8 and TEXT data types. The difference in performence will be determined by the cost of comparison. The cost of comparing strings is much higher than for integers, so it will be slower. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/

Re: [GENERAL] a question for the way-back machine

2006-12-15 Thread Martijn van Oosterhout
not cached ofcourse. In his example it's not the INSERT that's being cached, it's a query in the trigger. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] could not write to log -> PANIC -> System down

2006-12-14 Thread Martijn van Oosterhout
if there was anything to do. It probably didn't do anything. Waking up every minute is not that big a deal... Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] a question for the way-back machine

2006-12-14 Thread Martijn van Oosterhout
guess I'm trying to figure out how to get the plan to re-cache, without > making it entirely dynamic. I don't think you can. Restarting the connection should be enough. Have a ncie day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability.

Re: [GENERAL] out of memory woes

2006-12-14 Thread Martijn van Oosterhout
overcommit turned off you will get out of memory errors long before it actually runs out. Perhaps that is the issue? However, we need to see the actual messages to be sure. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. T

Re: [GENERAL] plperl exception catching

2006-12-13 Thread Martijn van Oosterhout
ing something about the Safe module in perl not being able to enable eval while staying "safe", so to speak. Looking at the safe module it looks like you can exclude certain functions from restrictions. The manpage has an example, so a simple try/catch mechanism could be created if e

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 02:01:46PM -0800, Ben wrote: > > > On Wed, 13 Dec 2006, Martijn van Oosterhout wrote: > > >>- 7.3 isn't smart enough to use an index on an insert? Seems unlikely. > > > >This question makes no sense, you don't need an index to

Re: [GENERAL] INSERT INTO row value constructors

2006-12-13 Thread Martijn van Oosterhout
ytable > VALUES (0,'hello'),(1,'world'); > Is that correct, or is this behavior expected to change? It's in 8.2, see the documentation: http://www.postgresql.org/docs/current/static/dml-insert.html Have a nice day, -- Martijn van Oosterhout http://svana.or

Re: [GENERAL] a question for the way-back machine

2006-12-13 Thread Martijn van Oosterhout
7;t need an index to insert. Are you sure it's not due to some foreign key check? BTW, seperate inserts is the worst way to load data. At least put them within a single transaction, or use COPY. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each ac

Re: [GENERAL] grant all privileges on database

2006-12-13 Thread Martijn van Oosterhout
stration easier I think. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Martijn van Oosterhout
he schema, but you definitly have to grant access to the tables directly. Have you used \z to check the permissions? Please post actual psql output. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his abili

Re: [GENERAL] Statement timeout not working on broken connections with active queries

2006-12-13 Thread Martijn van Oosterhout
your TCP stack implementors. > I think it is fundamentally wrong for Postgres to be second-guessing > the network software about whether a network connection is still live. It would ofcourse be nice if postgres could honour signals while writing to the client, but the currently that

Re: [GENERAL] a question on SQL

2006-12-12 Thread Martijn van Oosterhout
feature postgresql has. It is thus simultaneously bad (from a portatbility aspect) and brilliant (because it's a million times easier and faster than the alternatives). Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To ea

Re: [GENERAL] PostgreSQL 8.2 : IPO link warning with ICC 9.1.045

2006-12-12 Thread Martijn van Oosterhout
to stop exporting unnessesary symbols. It should only be used for gcc, I wonder how it selected it for your compiler? Did you run configure with the right compiler? In any case, it's harmless. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to

Re: [GENERAL] returning parameters from function

2006-12-12 Thread Martijn van Oosterhout
That way I can have the function exactly how I like it. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] Metadata from NEW and OLD constructs?

2006-12-12 Thread Martijn van Oosterhout
r anywhere the new record differs from > the old record (i.e. NEW.column_X <> OLD.column_X). Any advice would be > greatly appreciated. If your trigger is written in C, definitly. If the trigger is in pl/pgsql, no. For other languages I don't know. which language are you using? H

Re: [GENERAL] out of memory error on 3 table join

2006-12-12 Thread Martijn van Oosterhout
00MB at once? If you don't, use a cursor. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] PostgreSQL 8.2.0 and ip4r?

2006-12-09 Thread Martijn van Oosterhout
file a bug, or email the authors to put up a new version. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] contrib/fuzzystrmatch search_path: what does it mean?

2006-12-09 Thread Martijn van Oosterhout
n when given a table name - The first one is the schema objects are created in by default Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] PostgreSQL 8.2.0 and ip4r?

2006-12-09 Thread Martijn van Oosterhout
or: 'struct ' has no member named 'type' > make: *** [ip4r.o] Error 1 Looking at CVS, line 967 is a blank line, so I have to ask what version you're compiling. I notice the CVS tree got some patches two months ago for 8.2 but there has been no release since then. Perhap

Re: [GENERAL] PostgreSQL 8.2.0 and ip4r?

2006-12-09 Thread Martijn van Oosterhout
e or something? Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate. signature.asc Description: Digital signature

Re: [GENERAL] help understanding analyze

2006-12-09 Thread Martijn van Oosterhout
ot using the index. At a guess your table is not big enough to make an index worthwhile. If your table is only a few pages long, it's just not efficient to lookup an index first. If you post the results of EXPLAIN ANALYZE we can tell you for sure. Have a ncie day, -- Martijn van Oost

Re: [GENERAL] Marking indexes out of date (WAS: loading data, creating indexes, clustering, vacuum) feature request?

2006-12-08 Thread Martijn van Oosterhout
ed indexes would need to be updated when there are new rows. If you don't update the index when it's disabled, then re-enabling will essentially need to rebuild the index. Have a nice day, -- Martijn van Oosterhout http://svana.org/kleptog/ > From each according to h

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