Re: [GENERAL] how to insert multiple rows and get the ids back in a temp table (pgplsql)?

2010-09-19 Thread Alban Hertroys
O test (i) select x from generate_series(4, 10) t(x) ret urning i; i 4 5 6 7 8 9 10 (7 rows) INSERT 0 7 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,4c96398f10255076983698! -- Sent via

Re: [GENERAL] query join issue

2010-09-16 Thread Alban Hertroys
but NULL in all those cases. The solution is to put those conditions in your ON clause, like so: LEFT OUTER JOIN TRAIN_COMP ON ( TRAIN_MOD.TRM_TRC_SEQ=TRAIN_COMP.TRC_SEQ_NO AND (TC_PUB_ED IS TRUE OR TC_SEQ_NO IS NULL) ) Alban Hertroys -- Screwing up is an excellent way t

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Alban Hertroys
On 11 Sep 2010, at 12:09, Alban Hertroys wrote: > It would be great to be able to use a WITH statement to lock down a data set > for multiple subsequent operations, something like: > > WITH nonduplicates (key, data1, data2, etc) AS ( > SELECT key, data1, data2, etc FRO

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Alban Hertroys
to just do: MOVE * FROM staging_table TO live_table WHERE NOT EXISTS ( SELECT 1 FROM live_table WHERE key = staging_table.key ); 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,4c8b557b10401521071037!

Re: [GENERAL] NOT IN vs. OUTER JOIN and NOT NULL

2010-09-09 Thread Alban Hertroys
(1 row) development=> SELECT 1 NOT IN (2, 3, 4, NULL, 1); ?column? -- f (1 row) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c89101f10402127211624! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Forcing the right queryplan

2010-09-07 Thread Alban Hertroys
r to use gist or gin there I really don't know. I'd probably go for gist, I seem to recall that gin is fairly heavy to use. > How to use the right plan regardless of the 'LIMIT-size'? You could try turning off planner-options, but that's probably a fairly bad idea.

Re: [GENERAL] Vacuum full progress

2010-09-05 Thread Alban Hertroys
Is > there a way to identify the progess of the work? Well, you already noticed it's at the 53rd file of 102 files. It's about half-way then I guess. > b) How much space will be shrank at the time vacuum full finishes? According to the above up to 27GB (probably less),

Re: [GENERAL] pg_dump --compress error

2010-08-30 Thread Alban Hertroys
you'll get much more flexibility to restore your database. Shouldn't you be using level 9 btw, if you're worried about disk space? > I can take a dump_file but I can't restore it. Is there any other way to > restore compressed data ? Didn't you read the man p

Re: [GENERAL] pg_dump --compress error

2010-08-30 Thread Alban Hertroys
t taking any error ? By using pg_restore instead of psql. 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,4c7c9a6510401193214009! -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] Is your data okay?

2010-08-27 Thread Alban Hertroys
ate of Microsoft Visual Nuclear Power Plant Designer. > On 27/08/10 07:30, Mike Christensen wrote: >> I found this tool pretty helpful for validating my architectural decisions.. >> >> http://www.howfuckedismydatabase.com/ Interesting tool :) Alban Hertroys -- Screwing up is

Re: [GENERAL] Win32 Backend Cash - pre-existing shared memory block is still in use

2010-08-24 Thread Alban Hertroys
on top again)? Or mouse scrolling when using the scroll wheel over a piece of user-interface that doesn't have focus (Answer; install katmouse)? Or basic file-system performance? Or detaching a USB-keyboard without halting the OS for a second? Alban Hertroys -- If you can't see the f

Re: [GENERAL] Using concatenation operator

2010-08-17 Thread Alban Hertroys
; LINE 1: select ||'select count (*) from '||schemaname||'.'||relname >^ > HINT: No operator matches the given name and argument type(s). > You might need to add explicit type casts There's nothing before the first concat operator ;) Alban

Re: [GENERAL] good exception handling archiecutre

2010-08-16 Thread Alban Hertroys
PC internally as well (at least shared memory), so maybe it's possible to use some of the internal mechanisms. I have no idea whether that's possible or at all advisable, I'm sure someone (probably Tom) will chime in regarding that. Cheers! > -Original Message- > From

Re: [GENERAL] InitDB: Bad system call

2010-08-15 Thread Alban Hertroys
he ken of a simple database hacker ... Hmm... shared memory in a jail, there used to be some issues with that and I don't think they have been (or are going to be) solved. I recall that shared memory can't be local to a jail (it's "shared" after all), so you probably need(e

Re: [GENERAL] good exception handling archiecutre

2010-08-13 Thread Alban Hertroys
7;s any way to log errors into a table from within the same transaction, you'll probably need to use a separate connection for the logging. I think LISTEN/NOTIFY may come in handy there. > end; > end; > $BODY$ > LANGUAGE 'plpgsql' VOLATILE > COST 100; > ALTE

Re: [GENERAL] InitDB: Bad system call

2010-08-12 Thread Alban Hertroys
On 12 Aug 2010, at 16:04, Torsten Zühlsdorff wrote: > Ok, next round. I just have truss as an option, because strace didn't work at > my AMD64. Hope its helpfull: I haven't used it yet, but I've heard good things about DTrace, which is apparently in base these

Re: [GENERAL] Howto only select secific lines from a result?

2010-08-08 Thread Alban Hertroys
gt; Or do you have any other ideas howto solve this problem? I think cursors are what you're looking for. Start reading from: http://www.postgresql.org/docs/8.4/interactive/sql-declare.html Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll

Re: [GENERAL] Using AND in query

2010-08-08 Thread Alban Hertroys
, "date" HAVING type & 011::bit = 011::bit; But I think David's solution is more readable, as it leaves the item names in tact. 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,4c5e6ee42862

Re: [GENERAL] MySQL versus Postgres

2010-08-07 Thread Alban Hertroys
st not on MySQL. One exception is the guy who has to use one of their real-time engines for telecommunication, where data-integrity apparently isn't considered critical. 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] Application user name attribute on connection pool

2010-08-02 Thread Alban Hertroys
ing problems), and dividing each value in application by some scale > isn't nice, too. Most people don't use float for monetary values. Have a look at the NUMERIC type: http://www.postgresql.org/docs/8.4/interactive/datatype-numeric.html Alban Hertroys -- If you can't see the for

Re: [GENERAL] How to improve: performance of query on postgresql 8.3 takes days

2010-07-30 Thread Alban Hertroys
that though, you should at least declare these functions as STABLE instead of VOLATILE, see: http://www.postgresql.org/docs/8.4/interactive/xfunc-volatility.html Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c52ae01286211819977167! -- Sent

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Alban Hertroys
atively few people who've done so for PostgreSQL, and some even wrote about it, but to make up for the difference "we" need to do a lot more writing of articles than those MySQL folks. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and y

Re: [GENERAL] Which CMS/Ecommerce/Shopping cart ?

2010-07-30 Thread Alban Hertroys
ve measurement, but from my observations Postgres does seem to be on the rise. There's still a ways to go to make potential users aware of its existence though. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no forest. !DSPAM:73

Re: [GENERAL] Increase Query Speed

2010-07-27 Thread Alban Hertroys
-> Bitmap Index Scan on campaign_impressions_campaign_idx > (cost=0.00..19196.54 rows=1039330 width=0) (actual time=421.587..421.587 > rows=1044475 loops=1) > Index Cond: (campaign = 42) Nothing wrong here either. > Total runtime: 2209.869 ms > (10 ro

Re: [GENERAL] prepared statements

2010-07-24 Thread Alban Hertroys
ner to guess which columns you left out? ;) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c4ac805286212004583493! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgres

Re: [GENERAL] pg_dump, shemas, backup strategy

2010-07-24 Thread Alban Hertroys
an aside; I'm not familiar with Sphyder, but Postgres' TSearch 2 is pretty good too. It's built into the main database since version 8.3, not in your version. For 8.1 there is an extension with largely the same functionality, in case you're interested. I'm not sure how e

Re: [GENERAL] Prefix LIKE search and indexes issue.

2010-07-24 Thread Alban Hertroys
term _starts_ with a wildcard instead of _ending_ with one. That's a situation where a btree index is in trouble. 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,4c4abfcd286214416410229! -- Sent via pgsql

Re: [GENERAL] Blocked inserts on tables with FK to tables for which UPDATE has been revoked

2010-07-24 Thread Alban Hertroys
NOCREATEROLE NOCREATEUSER INHERIT > LOGIN; > \c test afsugil You create a new user, but you still connect with the user who created the database. > REVOKE UPDATE ON station FROM afsugil; And then you revoke rights from that user instead of from the test user. Effectively you&#x

Re: [GENERAL] Bitmask trickiness

2010-07-23 Thread Alban Hertroys
-- f (1 row) development=> select (~ '00010'::bit(5)) | '01010'::bit(5) = '1'::bit(5); ?column? -- t (1 row) development=> select (~ '01000'::bit(5)) | '01010'::bit(5) = '1'::bit(5); ?column? -- t

Re: [GENERAL] Passing a PGconn * between two processes on Unix like systems

2010-07-22 Thread Alban Hertroys
to the connection. You can't have multiple transactions running in parallel on one connection. 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,4c482748286211410335719! -- Sent via pgsql-general mailin

Re: [GENERAL] INSERT RETURNING and partitioning

2010-07-21 Thread Alban Hertroys
ount = getRowCount(context); Maybe you could even override the database's internal diagnostics ROW_COUNT value (after taking the sum of the results of inserting into each child table) and have that "faked" result available after the insert into the parent table finishes. Prob

Re: [GENERAL] Need a better way to do my constraints

2010-07-20 Thread Alban Hertroys
ated approach to this than the > check constraints and plpgsql you see above. I think your best bet would be to define an ENUM type with those values and store the CSV data as an array of that type. I think it would automatically reject any invalid values that way. A foreign key constrai

Re: [GENERAL] Unable to create a Postgre Datasource from windows With Database installed in RHEL 5.3

2010-07-15 Thread Alban Hertroys
_log': File exists Did you run those commands as a user with sufficient privileges (usually root)? The script obviously knows where the PG_DATA directory is supposed to be, and according to initdb it is there - which is why I think you don't have access. It looks like postgres failed

Re: [GENERAL] Planner features, discussion

2010-07-15 Thread Alban Hertroys
think we're all failing to see the point you're trying to make. 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,4c3edb34286212005648618! -- Sent via pgsql-general mailing list (pgsql-general@postgr

Re: [GENERAL] constraint/rule/trigger - insert into table X where not in table Y

2010-07-14 Thread Alban Hertroys
NOT NULL) OR (foo IS NOT NULL AND bar IS NULL)) ) You can populate this table from a rule or trigger. OTOH, if you have a trigger anyway, you can move the checks in there as well. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is

Re: [GENERAL] Plan for in with one argument

2010-07-11 Thread Alban Hertroys
pond_user = $0) > -> Bitmap Index Scan on pond_item_common_x1 (cost=0.00..7.04 > rows=363 width=0) (actual time=0.038..0.038 rows=11 loops=1) > Index Cond: (pond_user = $0) > Total runtime: 0.096 ms > (9 rows) > > pondDump=> > > Best regards, &g

Re: [GENERAL] problem with table structure

2010-07-09 Thread Alban Hertroys
ightly more complicated if that's the case. If you use table inheritance you'll have to redefine the foreign key constraint on each child table, as the FK constraint won't be inherited. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll s

Re: [GENERAL] problem with table structure

2010-07-09 Thread Alban Hertroys
s to use table inheritance, but be aware that some things can't be inherited (foreign key constraints, for example). BTW, shouldn't that table be named site_archeological? Or if arquelogy is Spanish or Portuguese, shouldn't it be arquelogical? Alban Hertroys -- Screwing up is an excellen

Re: [GENERAL] \COPY ... CSV with hex escapes

2010-07-08 Thread Alban Hertroys
ing, or whatever Sybase was using. I'm just saying, be careful what you're parsing there ;) Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c359d9f286212106016419! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] Rules in views, how to?

2010-07-06 Thread Alban Hertroys
on that table you can use it to identify the records for the update. Whether that PK uses a simple unique index or a composite unique index doesn't matter at all either. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c33391e28621170387

Re: [GENERAL] Rules in views, how to?

2010-07-06 Thread Alban Hertroys
clause WHERE in the UPDATE rule. For example the UPDATE could > be done when "WHERE email = 'X' " or "WHERE id = 'Y' ". > > Question: How can I deal with this? In the WHERE-clause you use the columns from the OLD record that uniquely identify that

Re: [GENERAL] PostgreSQL trigger execution order

2010-07-06 Thread Alban Hertroys
pan multiple processes (or connections), I suppose because it would be very hard (impossible?) to guarantee integrity if you'd go that route. With that knowledge, your second scenario cannot happen. > After putting a bunch of RAISE > NOTICEs in my triggers it would appear as though the former

Re: [GENERAL] PostgreSQL triggers

2010-07-01 Thread Alban Hertroys
he command to complete. Since I'm quite sure triggers fire and execute sequentially, the command cannot complete until all trigger procedures finished executing. So, yes. 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] Waarschuwing na pg_dumpall en restore

2010-06-25 Thread Alban Hertroys
sql have no way of knowing about that. The newer versions have. > > PROBLEM 3 > > We get some messages that referential integrity rules (foreign keys) are > violated. How can that be? This undermines my confidence in the system!! This > would imply that the f

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread Alban Hertroys
irly quick if there are only 462 rows with this sender. In summary, I think your statistics are off. Do you vacuum frequently enough? Autovacuum helps here, but there have been large improvements to that in later versions. Another approach would be an index on (email_sender, email_msg_id) -

Re: [GENERAL] Bad query performance with more conditions?

2010-06-24 Thread Alban Hertroys
n index on the former, while you probably didn't on the latter, causing the second query to have to scan sequentially through all records. 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,4c2321f5286211760940

Re: [GENERAL] Re: Moving a live production database to different server and postgres release

2010-06-15 Thread Alban Hertroys
27;t see a lot of bug reports though, no matter what OS people are using. And yes, it's slower on Windows. IIRC that's because Windows isn't very good at multi-processing and Postgres runs as multiple processes. Alban Hertroys -- If you can't see the forest for the trees, cut t

Re: [GENERAL] DDL partitioning with insert trigger issue

2010-06-15 Thread Alban Hertroys
I need to do? Are you sure you're not mistaking table inheritance for duplicates? If you're querying the master table without the ONLY keyword then you'll see the data from the child tables as well. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling.

Re: [GENERAL] Re: Moving a live production database to different server and postgres release

2010-06-14 Thread Alban Hertroys
On 14 Jun 2010, at 22:22, Scott Marlowe wrote: > Is there are good reason to go to Windows instead of a new BSD system? > Windows is a known mediocre performer for postgres. I was wondering that too. I assume the good reasons wear ties. Alban Hertroys -- If you can't see the for

Re: [GENERAL] What are the minimal files required to backup a postgresql database

2010-06-14 Thread Alban Hertroys
e likely to come in useful, rather than necessary > for backup I don't mind adding them That highly depends on what you're trying to accomplish. I'd think pg_dumpall, pg_restore and psql would be useful too. Alban Hertroys -- Screwing up is an excellent way to attach something

Re: [GENERAL] Is there a way to backup Postgres via SQL commands?

2010-06-14 Thread Alban Hertroys
mands that can be replayed to a server to > restore it, rather than something that saves directly to file, or > passes it through a pipe? That sounds quite a bit like replicating the DB to a warm standby, is that what you're after? There are several solutions for that. Alban Hertroys --

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-14 Thread Alban Hertroys
On 14 Jun 2010, at 12:14, Schwaighofer Clemens wrote: > On Mon, Jun 14, 2010 at 19:10, Alban Hertroys > wrote: >> On 14 Jun 2010, at 2:02, Clemens Schwaighofer wrote: >> >>> Right now I added two simple wrappers in my .psqlrc >>> >>> \set

Re: [GENERAL] How to show the current schema or search path in the psql PROMP

2010-06-14 Thread Alban Hertroys
you a few key-presses though. Is your psql built with libreadline? Without it you don't get TAB-completion, that would be a nuisance! Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c160039286219954085656! -- Sent via pgsql-general mai

Re: [GENERAL] ERROR: character 0x90 of encoding "WIN1252" has no equivalent in "UTF8"

2010-06-05 Thread Alban Hertroys
f you already have a mixed bag of encodings, that's the easiest solution to get back to a working system - be aware though that you probably were already having issues with displaying some data correctly. > -Original Message- > From: Alban Hertroys [mailto:dal...@solfertje.stud

Re: [GENERAL] ERROR: character 0x90 of encoding "WIN1252" has no equivalent in "UTF8"

2010-06-05 Thread Alban Hertroys
sert-control-charactersintovarcharcolumn.html for someone with the same problem (on Ingres) and links to two different code pages listing the characters therein. 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

Re: [GENERAL] cannot assign non-composite value to a row variable

2010-06-04 Thread Alban Hertroys
something else. You probably need to cast it to the right type first. > Each of these gives the same error message: > > CONTEXT: ERROR > CODE: 42804 > MESSAGE: cannot assign non-composite value to a row variable Alban Hertroys -- Screwing up is an excellent way to attach somethin

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-04 Thread Alban Hertroys
(unique) index on the same columns concurrently, but you can't replace the primary key index with it as you're not allowed to drop the index without dropping the PK constraint. If you have any FK constraints pointing to that table, you can't drop the PK constraint without also dro

Re: [GENERAL] Query Slow in Postgres 8.4.3 than Postgres 8.1.5

2010-06-03 Thread Alban Hertroys
, 'RESCIND')) > inner join > (select t.transaction_relation_id, > sum (case when (e.debit_id != 1100 and e.credit_id >= 2000 and > e.credit_id < 3000) then amount else 0 end) as cs, > sum (case when (e.credit_id != 1100 and e.debit_id >= 2000 and >

Re: [GENERAL] How to debug efficiently

2010-06-03 Thread Alban Hertroys
d) change the behaviour. > So the question is how do other people debug sql this sql EFFICIENTLY, > preferably in a simular fashion to my sql server days. I usually find the psql prompt more efficient to work with than, for example, pgadmin. But I'm a typical command line us

Re: [GENERAL] create index concurrently - duplicate index to reduce time without an index

2010-06-02 Thread Alban Hertroys
improvement when doing > reindexing (for example an ils performed in 0.3 s will goes down to less > than 0.1 s when reindexing has been made)." There are cases where reindexing shows a performance improvement over just analysing a table, but the above (only inserts) shouldn't be

Re: [GENERAL] What Linux edition we should chose?

2010-06-01 Thread Alban Hertroys
eeping > up to date with both PostgreSQL and PHP. I totally agree with that. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c0599a810154434717690! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Insert or Update a path from textbox...

2010-05-31 Thread Alban Hertroys
escape characters. Either escape them or turn on standard_conforming_strings. That said, if you're having this problem your queries are probably vulnerable to SQL injection too, they're certainly not parameterised or Postgres would have done the escaping for you. Alban Hertroys -- If

Re: [GENERAL] sintax error in script

2010-05-29 Thread Alban Hertroys
emoving the '/' at the start of the line. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4c00decd10151812910245! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.po

Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-05-28 Thread Alban Hertroys
the token isn't among the exceptions for those if tok not in ('borough', 'city', 'of', 'the', 'at', 'incl', 'inc'): out += ADDR_FIELD_DELIM You should probably define those lists outside the for-loop though,

Re: [GENERAL] Config Changes Broke Postgres Service (Windows)

2010-05-28 Thread Alban Hertroys
gt; Now my postgres service wont start from the windows Services dialog, however > using pgAdmin I can start the service and connect to my database, run queries > etc. Sorry, can't help you there - I rarely use Windows. Alban Hertroys -- Screwing up is an excellent way to attach som

Re: [GENERAL] INSERTing lots of data

2010-05-28 Thread Alban Hertroys
ipedia.org/wiki/Global_Interpreter_Lock Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4bff996b10419162611771! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] conditional rules VS 1 unconditional rule with multiple commands?

2010-05-27 Thread Alban Hertroys
example would help. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4bff0ec010411146380094! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] UPDATE...RETURNING col INTO var - what is returned?

2010-05-27 Thread Alban Hertroys
did not find a reference to that fact with the docs. I'm pretty sure it's the new value, since that's what INSERT...RETURNING returns - very convenient if the value you inserted was generated somehow (by a sequence for example). Since you can also UPDATE some column using a generated

Re: [GENERAL] Commit every N rows in PL/pgsql

2010-05-26 Thread Alban Hertroys
ted transactions. > Is there an equivalent Postgres way of doing this? Nested transactions wouldn't solve the problem, as the rows you "commit" here still aren't allowed to be visible to other transactions and so both versions of the rows need to be kept around until the outer

Re: [GENERAL] uppdate from postgersql 8.3.7 to 8.4.4

2010-05-25 Thread Alban Hertroys
t have anything to do with it? Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4bfba33510414354318240! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)

2010-05-21 Thread Alban Hertroys
mentioning of a 5GB file that threw me off, hadn't realised you were referring to a dump file 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,4bf67a7e10411591919641! -- Sent via pgsql-

Re: [GENERAL] pg_restore: [custom archiver] dumping a specific TOC data block out of order is not supported without ID on this input stream (fseek required)

2010-05-21 Thread Alban Hertroys
;One remaining advantage of the large object facility is that it allows values up to 2 GB in size" So I guess your large object is too large. 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,4bf6617510414104

Re: [GENERAL] Persistence problem

2010-05-12 Thread Alban Hertroys
ure directly from postgres without using palloc. 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,4beadfeb10411880534263! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] 8.3.7, 'cache lookup failed' for a table

2010-05-12 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 -- If you can't see the forest for the trees, cut the trees and you'll see ther

Re: [GENERAL] 8.3.7, 'cache lookup failed' for a table

2010-05-12 Thread Alban Hertroys
probably better off asking on the slony lists, if it's not you might want to give us some context, like the actual error message and from what command you got that for example. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll see there is no

Re: [GENERAL] Finding rows with text columns beginning with other text columns

2010-05-10 Thread Alban Hertroys
On 10 May 2010, at 21:24, Christoph Zwerschke wrote: > Am 10.05.2010 11:50 schrieb Alban Hertroys: > > On 10 May 2010, at 24:01, Christoph Zwerschke wrote: > > > >> select * from b join a on b.txt like a.txt||'%' > >> > >> I feel there should b

Re: [GENERAL] Sorting with materialized paths

2010-05-10 Thread Alban Hertroys
just used plain Postgres arrays of integers you would get the > sorting you want. But you lose all the useful ltree operators for > trees. I recall from the docs that you can create arrays of ltrees. It has some special operators for that. I couldn't figure out what the use case

Re: [GENERAL] question about unique indexes

2010-05-10 Thread Alban Hertroys
lity of the data in those tables. None of these solutions are pretty. It should be quite a common problem though, how do people normally solve this? Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4be7e01210416358213314! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Query that produces index information for a Table

2010-05-10 Thread Alban Hertroys
*** No relations found. > SPAMfighter has removed 1388 of my spam emails to date. You shouldn't be sending spam, you know ;) Or isn't that what's meant here? That's a pretty useless number anyhow, the spam filter I use (dspam) catches about that much in a weeks t

Re: [GENERAL] Finding rows with text columns beginning with other text columns

2010-05-10 Thread Alban Hertroys
come up with anything. Can anybody help me? Have you tried using substring instead of like? 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,4be7d6ec10411051620847! -- Sent via pgsql-general mailing li

Re: [GENERAL] Database design confusing pg_restore, and misc pg_restore issues

2010-05-09 Thread Alban Hertroys
same action on data from multiple code paths. That's not (necessarily) bad design in the business logic, it's just that the translation from user interface to data objects often isn't a straight one. I wouldn't be surprised if your different types of orders

Re: [GENERAL] Inheritance efficiency

2010-05-01 Thread Alban Hertroys
On 1 May 2010, at 12:56, Alban Hertroys wrote: > You could argue that some logic could be added to the handling of prepared > statements to insert query-subplans depending on what data you use for your > parameters, but then you're moving back in the direction of unprepared

Re: [GENERAL] Inheritance efficiency

2010-05-01 Thread Alban Hertroys
tly or do not use a prepared statement. > ir you instead execute the statement > > SELECT fields FROM parritioned_table WHERE primarykey = constant; > > he says the planner will go straight to the correct partition. > > i haven't confirmed this

Re: [GENERAL] Cumulative count (running total) window fn

2010-04-30 Thread Alban Hertroys
bably appreciate having a few views over those tables that translate that gibberish to human readable stuff. You could go further and make those views updatable (by means of a few rules), but then you run the risk that colleagues start to hug you... Alban Hertroys -- Screwing up is an excellen

Re: [GENERAL] Performance and Clustering

2010-04-29 Thread Alban Hertroys
you'll certainly have to make lots of changes in your application, so combining the two and do that only once may be preferable. If you're thinking of going that way I'd suggest FreeBSD or Solaris, but Linux is a popular choice (as is Windows, for that matter). Alban Hertroys -- Screwi

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Alban Hertroys
ted the remainder. Top-posting is considered bad form in mailing-lists. Alban Hertroys -- Screwing up is an excellent way to attach something to the ceiling. !DSPAM:737,4bd6e4f110411684215286! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] PostgreSQL Performance issue

2010-04-27 Thread Alban Hertroys
e_t” That's odd... Is this a 32-bit Postgres build or is a 64-bit Windows incapable of assigning more than a 32-bit number for the amount of shared memory? Are you running in some kind of 32-bit compatibility mode maybe (PAE comes to mind)? That said, I haven't used Windows for anything

Re: [GENERAL] Syntax error in spi_prepare usage

2010-04-24 Thread Alban Hertroys
my $query = (< INSERT INTO changelogtest(id, txid, txtime) > SELECT \$1, \$2, \$3 > EXCEPT > SELECT id, txid, txtime > FROM changelogtest > WHERE id = \$1 > AND txid = \$2 > AND txtime = \$3; > ENDQUERY Alban Hertroys -- If you can&#

Re: [GENERAL] EXCEPT doesn't compare TIMESTAMP type?

2010-04-23 Thread Alban Hertroys
time) > FROM changelogtest > WHERE id = \$1 > AND txid = \$2 > AND txtime = \$3; > ENDQUERY You need to remove the braces from the query in your trigger too, they change the meaning of the query. You use brackets in this way if you need to reference fields from a compos

Re: [GENERAL] EXCEPT doesn't compare TIMESTAMP type?

2010-04-23 Thread Alban Hertroys
int & text. > except > select (id, txid, txtime) ^^^--- 1 column, a row-type containing (int, int, timestamp) > from changelogtest > where id=5; > ERROR: each EXCEPT query must have the same number of columns > LINE 2: except select (id, txid, txtim

Re: [GENERAL] Ltree - how to sort nodes on parent node

2010-04-20 Thread Alban Hertroys
lution with recursive queries will probably be more flexible and allows for referential integrity without having to write your own triggers and stuff - for example, what happens if you decide that Archeology isn't a Science but a Colour? What makes sure it's child-nodes get moved

Re: [GENERAL] Ltree - how to sort nodes on parent node

2010-04-20 Thread Alban Hertroys
7;s after all), can't the sorting be done using a windowing function or something? We have recursion now, there's got to be a proper solution, I just can't get my mind around it right now. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'

Re: [GENERAL] Ltree - how to sort nodes on parent node

2010-04-20 Thread Alban Hertroys
On 19 Apr 2010, at 20:26, cojack wrote: >> Alban Hertroys wrote: >> >> It would help if you'd show us what result you expect from ordering the >> above. >> >> Most people would order this by path I think. However that doesn't match >> your so

Re: [GENERAL] Ltree - how to sort nodes on parent node

2010-04-19 Thread Alban Hertroys
. Most people would order this by path I think. However that doesn't match your sort column and I can't think of any method that would give results in such an arbitrary order as you seem to be specifying - unless you set it by hand like you do. Alban Hertroys -- Screwing up is an ex

Re: [GENERAL] prevent connection using pgpass.conf

2010-04-13 Thread Alban Hertroys
On 13 Apr 2010, at 2:36, John R Pierce wrote: > Alban Hertroys wrote: >> Storing those passwords encrypted on the client side seems the proper way to >> deal with this issue. IMHO, time working on that is better spent than time >> trying to prevent .pgpass files from wor

Re: [GENERAL] When is an explicit cast necessary?

2010-04-10 Thread Alban Hertroys
r example) and you'd lose data casting it down, but it's fine the other way around. Since your function has smallint as one of its parameter types the database can't cast the smallint up to an int like it would normally do in such cases as the function doesn't accept integer

Re: [GENERAL] can't connect to server on localhost

2010-04-06 Thread Alban Hertroys
m localhost. That said, I have no idea what settings PG comes with when installed on Windows. 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,4bbbc65910411225214359! -- Sent via pgsql-general mailing list (pg

Re: [GENERAL] How to fix set-valued function called in contextthat cannot accept a set in earlier versions

2010-04-05 Thread Alban Hertroys
course, you don't specify where to take line or linelen from. You probably meant to put some constant values there or results from another table. > select wordwrap83('fdgdf',10) ^^ These values for example. Alban Hertroys -- If you can't see the forest for the t

Re: [GENERAL] transaction control in pl/pgsql

2010-04-01 Thread Alban Hertroys
But I will > try and cut the function into little snippets and let them run one for > one - perhaps the memory overflows still occurs for one snippet... > > I you have any ideas ... > > Thanks again and regards, > > Birgit. > > > > > On 01.04.2010 13:27,

Re: [GENERAL] transaction control in pl/pgsql

2010-04-01 Thread Alban Hertroys
ctions, everything is only one trancaction > again and I get memory overflow once more. If the problem persists, maybe you could post your function somewhere. As it's apparently a rather long function, can you strip it down to something that still causes it to run out of memory but that

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