Re: [GENERAL] londiste3: removing a node that does not exist

2017-08-25 Thread Willy-Bas Loos
On Thu, Jun 22, 2017 at 6:03 PM, Victor Yegorov wrote: > 2017-06-22 18:21 GMT+03:00 Willy-Bas Loos : > >> Does anyone know of a method to get rid of the bad node and the data that >> it is gathering? > > > I also do not know the correct way to achieve this. > >

[GENERAL] RAM, the more the merrier?

2017-06-29 Thread Willy-Bas Loos
ng special that I should look out for when configuring such a server? Or would it be much better to buy 2 smaller servers and tie them together somehow? (partitioning, replication, ...) -- Willy-Bas Loos

[GENERAL] londiste3: removing a node that does not exist

2017-06-22 Thread Willy-Bas Loos
thing? Cheers, -- Willy-Bas Loos

Re: [GENERAL] journaling / time travel

2016-09-19 Thread Willy-Bas Loos
On Mon, Sep 19, 2016 at 5:48 PM, Willy-Bas Loos wrote: > > The use case of legal disputes being fought with our data as evidence and > digging up the exact data from a certain point of time never occurred in > those 10 years, and it is unlikely that it ever will. > But it might,

[GENERAL] journaling / time travel

2016-09-19 Thread Willy-Bas Loos
candidate for a standard component, but it takes up much more space. We could double the retention time if the journal were to be axed, but that would probably not be enough. Cheers, -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
On Fri, Jul 15, 2016 at 5:07 PM, Tom Lane wrote: > Willy-Bas Loos writes: > > (the manual says:"It is recommended that you use the pg_dump and > pg_dumpall > > programs from the newer version of PostgreSQL") > > The reason for the manual's recomme

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
all-identifiers" option. (the manual says:"It is recommended that you use the pg_dump and pg_dumpall programs from the newer version of PostgreSQL") Thank you, -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
previous answer directed at melvin -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
ut that doesn't reallyt do any harm. But there's more that i don't remember, since i learned how to avoid them. Thanks for your help though :) -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
On Fri, Jul 15, 2016 at 4:19 PM, Adrian Klaver wrote: > > pg_dump is backwards compatible to version 7.0. > Yes but is it forward compatible from 7.0? I mean can i restore a dump made with pg_dump 7.0 on a 9.4 database? -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
ul Ramsey's advice. -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
On Fri, Jul 15, 2016 at 4:09 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​You need to also include "​--quote-all-identifiers" if you intend for the > dump to be restored onto a newer version of PostgreSQL. > > https://www.postgresql.org/docs/9.6/static/app-pgdump.html > > Hey that

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
s per distro, and includes postgis too. Great stuff, upgrade a big db in single minutes of downtime. -- Willy-Bas Loos

Re: [GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
n 9.5 > and use pg_restore to load the his_dbname.sql ? > Because it's not the same version, so that will cause some errors. But i guess we should be able to live with that. Thanks, i guess i was thinking a bit too rigid. Cheers, -- Willy-Bas Loos

[GENERAL] migrating data from an old postgres version

2016-07-15 Thread Willy-Bas Loos
installer on filehorse.com Now, maybe this is overcautious, but being a linux man myself, i dislike installing unknown software. So is there an md5 signature for that installer around? Or maybe a more official source for a 8.4 installer? Cheers, -- Willy-Bas Loos

Re: [GENERAL] cache lookup failed for index

2016-06-29 Thread Willy-Bas Loos
On Wed, Jun 29, 2016 at 4:26 PM, Tom Lane wrote: > Willy-Bas Loos writes: > > So what i don't get is, -if the above is the case- If pg_dump expects to > > find an index, it already knows about its existence. Then why does it > need > > to look for it again? >

Re: [GENERAL] cache lookup failed for index

2016-06-29 Thread Willy-Bas Loos
On Wed, Jun 29, 2016 at 11:16 AM, Willy-Bas Loos wrote: > Ah OK. So it needs a lock for the visibility to be registered to the > transaction, is that it? > Wait that doesn't make sense. pg_dump merely describes the table in DDL, so it doesn't even need access to the index p

Re: [GENERAL] cache lookup failed for index

2016-06-29 Thread Willy-Bas Loos
Ah OK. So it needs a lock for the visibility to be registered to the transaction, is that it?

Re: [GENERAL] cache lookup failed for index

2016-06-28 Thread Willy-Bas Loos
On Tue, Jun 28, 2016 at 7:14 PM, Willy-Bas Loos wrote: > > (...) > Does anyone know what's up? > -- > > oh btw this is postgres 9.3 on debian 7 and londiste 2 -- Willy-Bas Loos

[GENERAL] cache lookup failed for index

2016-06-28 Thread Willy-Bas Loos
d while pg_dump has it in some task list, and by the time pg_dump wants to dump it, it's gone. But that should not be possible, because of transactions. Does anyone know what's up? -- Willy-Bas Loos

Re: [GENERAL] edit wiki

2016-05-17 Thread Willy-Bas Loos
OK, thx On Tue, May 17, 2016 at 6:19 PM, Daniel Gustafsson wrote: > > The wiki editor permission requests should go to the pgsql-www@ > mailinglist, > remember to include your community username in the email. > -- Willy-Bas Loos

[GENERAL] edit wiki

2016-05-17 Thread Willy-Bas Loos
with support for multiple clusters. There is some possible example code in Debian's postgresql-common pg_lsclusters, which is written in perl. Cheers, -- Willy-Bas Loos

Re: [GENERAL] database corrupt

2015-11-17 Thread Willy-Bas Loos
Thank you Tom Lane

[GENERAL] database corrupt

2015-11-16 Thread Willy-Bas Loos
on_target = 0.5 I'd like to know what can be the cause of this corruption in a bit more detail if possible. As far as i can see, there is a bad memory address in the WAL, is that correct? Cheers, -- Willy-Bas Loos

Re: [GENERAL] epoch and timezone changed bevior

2015-09-24 Thread Willy-Bas Loos
On Thu, Sep 24, 2015 at 5:22 PM, Adrian Klaver wrote: > Yeah, I forgot about the EXTRACT change. > > >> regards, tom lane >> >> > thanks a lot for clarifying! -- Willy-Bas Loos

Re: [GENERAL] epoch and timezone changed bevior

2015-09-24 Thread Willy-Bas Loos
On Thu, Sep 24, 2015 at 4:01 PM, Willy-Bas Loos wrote: > =# show timezone; > TimeZone > --- > localtime > (1 row) > > > sorry for the top post -- Willy-Bas Loos

Re: [GENERAL] epoch and timezone changed bevior

2015-09-24 Thread Willy-Bas Loos
=# show timezone; TimeZone --- localtime (1 row) On Thu, Sep 24, 2015 at 3:57 PM, Adrian Klaver wrote: > On 09/24/2015 06:42 AM, Willy-Bas Loos wrote: > >> Hi, >> >> We're upgrading a database from 8.4 to 9.4 >> The web developer complains that

[GENERAL] epoch and timezone changed bevior

2015-09-24 Thread Willy-Bas Loos
9.4 --> 00:00:008.4 Is there a reason for this change of behavior between 8.4 and 9.* ? Cheers, -- Willy-Bas Loos

Re: [GENERAL] md5(large_object_id)

2015-09-22 Thread Willy-Bas Loos
atabase. Also, the max size of a value is 1GB. Maybe it would be better to do some file administration in the database, but not the actual storage. Then you could use a tool that does what you want on the bare file and maybe store the results in the database. HTH, -- Willy-Bas Loos

[GENERAL] could not load library liblwgeom-2.1.7.so

2015-09-22 Thread Willy-Bas Loos
This looks pretty serious, what's going on? This might not be the right place to discuss this, does anyone know where else i should adress my question? Cheers, -- Willy-Bas Loos

Re: [GENERAL] FDW and BDR

2015-09-02 Thread Willy-Bas Loos
Haha, that is funny :) It's always nice to see problems evaporate. Thank's a lot for your answers. On Wed, Sep 2, 2015 at 2:40 PM, Andres Freund wrote: > Either way it should be > simple to implement. > > -- Willy-Bas Loos

Re: [GENERAL] Re: (expert) "insert into VIEW returning" inside an instead of trigger returns nothing

2015-09-02 Thread Willy-Bas Loos
On Wed, Sep 2, 2015 at 2:16 PM, Rémi Cura wrote: > I think I got it, > I have to always return something (like NEW) in the instead of trigger, > but fill NEW > with returnings of INSERT into regular table. > > Yes, the GID is detemined for the table. But in test.rc_editing_generic_object( ) you

Re: [GENERAL] FDW and BDR

2015-09-02 Thread Willy-Bas Loos
Sorry, forgot [GENERAL] in the subject at first. On Wed, Sep 2, 2015 at 12:46 PM, Willy-Bas Loos wrote: > Hi, > > I've read that CREATE FOREIGN DATA WRAPPER currently is prohibited on BDR > enabled databases. And other FDW and FTS related commands too. > > This seems obvi

[GENERAL] FDW and BDR

2015-09-02 Thread Willy-Bas Loos
on? (maybe one could create the FDW before configuring replication) Cheers, -- Willy-Bas Loos

[GENERAL] users per database

2014-11-25 Thread Willy-Bas Loos
x27; in priv)-1), count(*) from a where substring(priv, 1, position('=' in priv)-1) != '' group by 1 order by 2 desc; Cheers, -- Willy-Bas Loos

[GENERAL] synchronize DTAP

2014-09-30 Thread Willy-Bas Loos
neric problem, i thought that i should ask around before i start writing my own scripts. Does anyone know of script or application that does this? Cheers -- Willy-Bas Loos

Re: [GENERAL] 2 left joins causes seqscan

2014-09-16 Thread Willy-Bas Loos
;abcd%'; > > Thanks for that query, it really helps. Cheers, -- Willy-Bas Loos

[GENERAL] londiste repair on a 3rd machine

2014-09-16 Thread Willy-Bas Loos
urces on neither provider nor subscriber." Now, how can i run repair on a third machine? Cheers, -- Willy-Bas Loos

Re: [GENERAL] 2 left joins causes seqscan

2014-09-14 Thread Willy-Bas Loos
he planner should do that, just that getting the data in 2 queries (and appending with union (all)) which was faster than the 1 query. Cheers, -- Willy-Bas Loos

Re: [GENERAL] 2 left joins causes seqscan

2014-09-13 Thread Willy-Bas Loos
> But the two queries don't return the same results. Of course the > second one will be faster. > The equivalent of your first query is to take the result sets from > these two queries (...) > it's not > too surprising that the planner can't come up with the optimal > plan; you've posed quite a

[GENERAL] 2 left joins causes seqscan

2014-09-12 Thread Willy-Bas Loos
Bitmap Index Scan on b_title_lowerto (cost=0.00..4.45 rows=3 width=0) Index Cond: ((lower(title) ~>=~ 'abcd'::text) AND (lower(title) ~<~ 'abce'::text)) -> Index Scan using a_pkey on a a_1 (cost=0.29..8.31 rows=1 width=9) Index Cond: (id = b2.id) As you can see, the second query is far more efficient, even though it scans both tables twice to combine the results. Is this some glitch in the query planner? Cheers, -- Willy-Bas Loos

Re: [GENERAL] importing a messy text file

2014-04-30 Thread Willy-Bas Loos
7;" > .log 2>&1 It's especially handy if you want to stay in sql(transaction), i gues. Cheers, -- Willy-Bas Loos

Re: [GENERAL] importing a messy text file

2014-04-30 Thread Willy-Bas Loos
On Wed, Apr 30, 2014 at 11:03 AM, Alberto Cabello Sánchez wrote: > > > What about using "cut" to strip the extra fields? > Wow, i didn't know "cut", this looks promising. thanks. -- Willy-Bas Loos

Re: [GENERAL] importing a messy text file

2014-04-30 Thread Willy-Bas Loos
bably insert this line for line. That's a possibility. It might take a long time to run, but that's not much of an issue. -- Willy-Bas Loos

[GENERAL] importing a messy text file

2014-04-30 Thread Willy-Bas Loos
documented?) option in copy or \copy to ignore extra columns. Or maybe there is some no-sql software where i can import this and then structure the data before i pass it to postgres.. Do you have any tips, please? Cheers, -- Willy-Bas Loos

[GENERAL] [GENARAL] round() bug?

2014-04-15 Thread Willy-Bas Loos
-- PostgreSQL 9.1.13 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1, 64-bit (1 row) Cheers, -- Willy-Bas Loos

Re: [ADMIN][GENERAL] openvz and shared memory trouble

2014-03-31 Thread Willy-Bas Loos
On Sat, Mar 29, 2014 at 6:17 PM, Adrian Klaver wrote: > On 03/29/2014 08:19 AM, Willy-Bas Loos wrote: > >> The error that shows up is a Bus error. >> That's on the replication slave. >> Here's the log about it: >> 2014-03-29 12:41:33 CET db: ip: us: FA

Re: [ADMIN][GENERAL] openvz and shared memory trouble

2014-03-29 Thread Willy-Bas Loos
The error that shows up is a Bus error. That's on the replication slave. Here's the log about it: 2014-03-29 12:41:33 CET db: ip: us: FATAL: could not receive data from WAL stream: server closed the connection unexpectedly This probably means the server terminated abnormally before

[ADMIN][GENERAL] openvz and shared memory trouble

2014-03-28 Thread Willy-Bas Loos
Hi, I have a problem with postgres in combination with openvz. My hot standby crashes on me when i give it a normal value for shared_buffers (4GB, which 25% of the memory in the container). When i tune down the shared_buffers, it works again. But of course this is far from desireable. Now, i've s

Re: [GENERAL] str replication failed, restart fixed it

2014-02-26 Thread Willy-Bas Loos
these issues, but this post makes me think that they won't: http://www.postgresql.org/message-id/CAHyXU0xa5EgvjeH=4vp-ezdjds5kmquidivvtrljy-uz62y...@mail.gmail.com Does anyone know solutions? Cheers, WBL On Wed, Feb 26, 2014 at 10:53 AM, Willy-Bas Loos wrote: > Hi, > > I had a

[GENERAL] str replication failed, restart fixed it

2014-02-26 Thread Willy-Bas Loos
Hi, I had a problem today and i fixed it by restarting postgres. That doesn't seem to make sense to me, what could have been going on? This is the log: 2014-02-26 04:30:45 CET db: ip: us: FATAL: could not send data to WAL stream: SSL error: sslv3 alert unexpected message cp: cannot stat `/data/

Re: [postgis-users][GENERAL] postgis in postgresql apt and upgrades

2014-02-20 Thread Willy-Bas Loos
On Thu, Feb 20, 2014 at 4:45 PM, Willy-Bas Loos wrote: > Since the package names are equal to those in debian and ubuntu > (postgresql-x.x-postgis), how will new versions of postgis and upgrades be > handled? > please excuse me, i was being silly. the package names are actually: po

Re: [postgis-users] [GENERAL] postgis in postgresql apt and upgrades

2014-02-20 Thread Willy-Bas Loos
On Thu, Feb 20, 2014 at 4:57 PM, Rémi Cura wrote: > could you please explain what you mean by "Congrats on the availability of > postgis in de postgresql apt reporsitory"? > It would be very great, > but I can't find postgis package in > http://apt.postgresql.org/pub/repos/apt/dists/ > Is this w

[postgis-users][GENERAL] postgis in postgresql apt and upgrades

2014-02-20 Thread Willy-Bas Loos
Hi, Congrats on the availability of postgis in de postgresql apt reporsitory, this is great work! I have one question about versions and upgrade sof postgis. Since the package names are equal to those in debian and ubuntu (postgresql-x.x-postgis), how will new versions of postgis and upgrades be

[GENERAL] wal archive peak during pg_dump

2014-01-09 Thread Willy-Bas Loos
please excuse my forgetting [GENERAL] in the subject of the other mail. On Thu, Jan 9, 2014 at 11:42 AM, Willy-Bas Loos wrote: > Hi, > > I've set up hot standby slaves for a couple of clusters. > The wal is cleaned up after use, i don't use it as a backup (yet). > It

[GENERAL] wal archive peak during pg_dump

2014-01-09 Thread Willy-Bas Loos
Hi, I've set up hot standby slaves for a couple of clusters. The wal is cleaned up after use, i don't use it as a backup (yet). It seems that the amount of wal peaks shortly after midnight, when pg_dump is running. It doesn't seem logical to me that pg_dump should generate wal, but i haven't been

Re: [GENERAL] client that supports editing views

2013-12-10 Thread Willy-Bas Loos
cool, SQL Workbench/J: does the job. It's too bad that it doesn't list the lables/views, so that you can't just open them with a click (i use select * from table to get the data), but it works well. thanks Thomas. On Mon, Dec 9, 2013 at 11:51 PM, Thomas Kellerer wrote: > Wi

Re: [GENERAL] client that supports editing views

2013-12-09 Thread Willy-Bas Loos
t 4:16 PM, Adrian Klaver wrote: > On 12/09/2013 05:36 AM, Willy-Bas Loos wrote: > >> I have a database with views that have rules on them, so that users can >> do insert/update/delete on their part of the data. >> The rules ore "do instead" rules that redirect the e

[GENERAL] client that supports editing views

2013-12-09 Thread Willy-Bas Loos
I have a database with views that have rules on them, so that users can do insert/update/delete on their part of the data. The rules ore "do instead" rules that redirect the edits to the table that actually holds the data, on which the users have no rights. This works fine in MS Access (at least v

Re: [GENERAL] no syntax error on limit1

2013-10-09 Thread Willy-Bas Loos
duh! thx. On Wed, Oct 9, 2013 at 2:30 PM, Szymon Guz wrote: > > On 9 October 2013 14:24, Willy-Bas Loos wrote: > >> Hi, >> >> Postgres 9.1.9 gives me no syntax error on this, but all the records: >> with a as (values >> (1),(2),(3)) >> select * &

[GENERAL] no syntax error on limit1

2013-10-09 Thread Willy-Bas Loos
Hi, Postgres 9.1.9 gives me no syntax error on this, but all the records: with a as (values (1),(2),(3)) select * from a limit1 Cheers, WBL -- "Quality comes from focus and clarity of purpose" -- Mark Shuttleworth

Re: [GENERAL] don't i need a -modules package for londiste3?

2013-04-29 Thread Willy-Bas Loos
thanks! i also see that it's available from apt.postgresql.org, including lots of postgres versions! WBL On Mon, Apr 29, 2013 at 1:01 PM, Marko Kreen wrote: > On Mon, Apr 29, 2013 at 12:25:15PM +0200, Willy-Bas Loos wrote: > > I want to upgrade from londiste2 to londiste3. >

[GENERAL] don't i need a -modules package for londiste3?

2013-04-29 Thread Willy-Bas Loos
Hi, I want to upgrade from londiste2 to londiste3. Skytools 2 has a -modules- package. We're using postgres 8.4 at the moment, so we use the package skytools-modules-8.4. Now i'm looking at londiste3 in Debian experimental, but there are no 'modules' packages. Don't i need one anymore? (hope this

Re: [GENERAL] integer instead of 'double precision'?

2012-11-12 Thread Willy-Bas Loos
On Fri, Sep 9, 2011 at 5:09 PM, Guillaume Lelarge wrote: > You divide an integer with an integer, that should give you an integer. > Can you tell me the reasoning behind that idea? Is it a rule that the output type of an operator must equal the input type? In this case that doesn't seem locigal.

Re: [GENERAL] something better than pgtrgm?

2012-10-10 Thread Willy-Bas Loos
hanks anyway :)! WBL On Tue, Oct 9, 2012 at 5:16 PM, Andrew Sullivan wrote: > On Tue, Oct 09, 2012 at 03:54:35PM +0200, Willy-Bas Loos wrote: > > > > > If so, I > > > can almost imagine a way this could work > > > > > > > Great! How? > > We

Re: [GENERAL] something better than pgtrgm?

2012-10-09 Thread Willy-Bas Loos
On Tue, Oct 9, 2012 at 3:23 PM, Andrew Sullivan wrote: > you will need to be extremely rigorous about > normalizing spellings on the way in. Is that a possibility? Yes, it is. > If so, I > can almost imagine a way this could work > Great! How? -- "Quality comes from focus and clarity of

Re: [GENERAL] something better than pgtrgm?

2012-10-09 Thread Willy-Bas Loos
Hi, Andrew thanks for replying On Tue, Oct 9, 2012 at 2:18 PM, Andrew Sullivan wrote: > But for the mixed languages case, surely it's not _any_ mixed > language? Are you mixing Arabic, Farsi, Chinese, and Hindi, for > instance? > We're mixing species names of birds in greek and latin (scientifi

[GENERAL] something better than pgtrgm?

2012-10-09 Thread Willy-Bas Loos
Hi, I need a *language unaware* text comparison algorithm, so i found pgtrgm. But i am not so content with it, because the similarities it finds are: - biased to favor text that is the same in the first character - much dependent on similar length of the strings Are there any other options

Re: [GENERAL] insert ... returning in plpgsql

2012-10-02 Thread Willy-Bas Loos
cool, thanks On Tue, Oct 2, 2012 at 3:13 PM, Cédric Villemain wrote: > ** > > Le mardi 2 octobre 2012 15:01:08, Willy-Bas Loos a écrit : > > > Hi, > > > (postgres 9.1) > > > I was doing something like this in a plpgsql function, but i got a Syntax > >

[GENERAL] insert ... returning in plpgsql

2012-10-02 Thread Willy-Bas Loos
Hi, (postgres 9.1) I was doing something like this in a plpgsql function, but i got a Syntax Error. t_var:=(insert into table1(field2) values ('x') returning field1); Is there no support for using RETURNING in insert, update, delete queries to fill a variable in plpgsql? Here's some code. Retur

[GENERAL] force defaults

2012-09-11 Thread Willy-Bas Loos
Hi, I want to force deafults, and wonder about the performance. The trigger i use (below) makes the query (also below) take 45% more time. The result is the same now, but i do have a use for using the trigger (see "background info"). Isn't there a more efficient way to force the defaults (in the

Re: [GENERAL] return text from explain

2012-09-07 Thread Willy-Bas Loos
cool, it does work with RETURN QUERY. Thanx! WBL On Fri, Sep 7, 2012 at 11:00 AM, Виктор Егоров wrote: > Hope this helps: > > CREATE OR REPLACE FUNCTION explain(in_sql text) RETURNS TABLE(explain_line > text) AS $explain$ > BEGIN > RETURN QUERY EXECUTE 'EXPLAIN '||in_sql; > END; > $explain

Re: [GENERAL] return text from explain

2012-09-07 Thread Willy-Bas Loos
On Thu, Sep 6, 2012 at 10:15 PM, Tom Lane wrote: > Bruce Momjian writes: > > On Thu, Sep 6, 2012 at 07:18:50PM +0200, Willy-Bas Loos wrote: > >> Is it possible to use the output of explain as text values? > > > I think you have to do EXPLAIN in a function and call t

Re: [GENERAL] return text from explain

2012-09-06 Thread Willy-Bas Loos
t;explain" to "x > 'a'". Cheers, WBL On Thu, Sep 6, 2012 at 8:03 PM, Bruce Momjian wrote: > On Thu, Sep 6, 2012 at 07:18:50PM +0200, Willy-Bas Loos wrote: > > Hi, > > > > Is it possible to use the output of explain as text values? > > Th

Re: [GENERAL] return text from explain

2012-09-06 Thread Willy-Bas Loos
correction. What won't work is: select y||'--some text' from ( explain select * from (values (1),(2), (3)) foo(x) where x > 2 ) bar(y) Cheers, WBL On Thu, Sep 6, 2012 at 7:18 PM, Willy-Bas Loos wrote: > Hi, > > Is it possible to use the output of explain as tex

[GENERAL] return text from explain

2012-09-06 Thread Willy-Bas Loos
Hi, Is it possible to use the output of explain as text values? This won't work: explain select * from (values (1),(2),(3)) foo(x) where x > 2 What i really want is to explain analyze a dynamic query that i build up in a function. If it returns a value i can do stuff with it, but i can't find ou

Re: [GENERAL] pivot functions with variable number of columns

2012-09-06 Thread Willy-Bas Loos
a very nice way is to use a cursor. http://okbob.blogspot.cz/2008/08/using-cursors-for-generating-cross.html HTH WBL On Thu, Sep 6, 2012 at 12:40 PM, Vincent Veyron wrote: > Le jeudi 06 septembre 2012 à 00:40 -0700, Chris Travers a écrit : > > > > > > On Wed, Sep 5, 2012 at 10:14 PM, punnoose

Re: [GENERAL][postgis-users] pg_dump -s should use add_geometrycolumn(...)

2012-08-30 Thread Willy-Bas Loos
On Wed, Aug 29, 2012 at 5:46 PM, Andres Freund wrote: > > Two things: > * the geometry_columns table is not a table anymore but a view of the > postgres > catalogs > Great! I didn't know that yet. It must derive the info from the constraints then. So that means you can just create the column with

Re: [GENERAL][postgis-users] pg_dump -s should use add_geometrycolumn(...)

2012-08-29 Thread Willy-Bas Loos
On Wed, Aug 29, 2012 at 5:23 PM, Andres Freund wrote: > That shouldn't be a problem with postgres 2 anymore as far as I understand > things? > Why? -- "Quality comes from focus and clarity of purpose" -- Mark Shuttleworth

[GENERAL][postgis-users] pg_dump -s should use add_geometrycolumn(...)

2012-08-29 Thread Willy-Bas Loos
Hi, pg_dump -s should use add_geometrycolumn(...) instead of creating a column+constraints with normal DDL Because, when you don't dump the data, then the record in geometry_columns is lost. Cheers, WBL -- "Quality comes from focus and clarity of purpose" -- Mark Shuttleworth

Re: [GENERAL] Tutorial On Connecting LibreOffice to PostgreSQL Available

2012-07-09 Thread Willy-Bas Loos
thx for sharing! On Fri, Jul 6, 2012 at 9:13 PM, Don Parris wrote: > Hi all, > > I believe this may be pertinent here. Last year I wrote a tutorial on > connecting LibreOffice to the powerful PostgreSQL database server. Now > there is an updated driver that allows read-write access. So I've upd

Re: [GENERAL] acessibility for tables

2012-06-07 Thread Willy-Bas Loos
the error sounds clear enough. you should make a very simple test case that shows your problem (including some test data). then people on the list can help cheers, WBL On Thu, Jun 7, 2012 at 1:59 AM, Philipp Kraus wrote: > Hello, > > > On 2012-06-06 09:24:16 +0200, Albe Laurenz said: > > You c

Re: [GENERAL] acessibility for tables

2012-06-06 Thread Willy-Bas Loos
Do you mean, you want everyone to see the data, but only the "owner" can > > I would like to modify not only one field, but rather the whole record. > No problem, only don't let them change the owner > I thin NEW is the record of the view with the updated data and OLD the > orginal records (simi

Re: [GENERAL] acessibility for tables

2012-06-06 Thread Willy-Bas Loos
I did something like that some years ago. Albe, are rules out of grace? Philipp, here's some code: create role firm1 nologin; create role john password 'secret' login; grant firm1 to john; create role firm2 nologin; create role amy password 'secret' login; grant firm2 to amy; create table table1

[GENERAL] column definition for setof record functions (like dblink and crosstabs)

2012-06-06 Thread Willy-Bas Loos
Hi, Functions that return SETOF RECORD need to be called with a column definition. That is a bit limiting. For example, you might not know how many columns your crosstab will have in advance, you might not know the structure of a table that you access with dblink in advance. Also, it's always a mo

Re: [GENERAL] dblink.sql and Linux

2012-05-15 Thread Willy-Bas Loos
It only shows up when you search for it in lowercase. e.g "postgresql", not "PostgreSQL". You could also just use sudo-apt get install postgresql-9.1 postgresql-contrib-9.1 ("postgresql" is a meta-package) hth, WBL On Tue, May 15, 2012 at 8:41 AM, Lee Hachadoorian < lee.hachadooria...@gmail.com>

Re: [GENERAL] how robust are custom dumps?

2012-05-01 Thread Willy-Bas Loos
great stuff! was that already in it? i'd plea for adding recognition of gzipped data too.. cheers, WBL On Wed, Apr 25, 2012 at 11:05 PM, Guillaume Lelarge wrote: > On Wed, 2012-04-25 at 10:40 +0200, Willy-Bas Loos wrote: > > On Wed, Apr 25, 2012 at 9:51 AM, Magnus Ha

Re: [GENERAL] Psql dosent log error messages on windows

2012-04-25 Thread Willy-Bas Loos
like so: http://support.microsoft.com/kb/110930 On Wed, Apr 25, 2012 at 2:27 PM, Willy-Bas Loos wrote: > the windows user that owns the process ("postgres" by default) needs to > have the right to write in the folder to write a server log. > by default, this user has very

Re: [GENERAL] Psql dosent log error messages on windows

2012-04-25 Thread Willy-Bas Loos
the windows user that owns the process ("postgres" by default) needs to have the right to write in the folder to write a server log. by default, this user has very few privileges (for good reasons - security). about psql not writing that log: >> means to redirect "standard out" to a file. But "st

Re: [GENERAL] Bug? Query plans / EXPLAIN using gigabytes of memory

2012-04-25 Thread Willy-Bas Loos
ared buffers, effective cache) might seem to be set > quite conservatively at the moment, given the memory available in the > machine -- but since we can exhaust that memory with just a few > connections, it seems fair. > > Cheers, > Toby > > - Original Message - > F

Re: [GENERAL] how robust are custom dumps?

2012-04-25 Thread Willy-Bas Loos
On Wed, Apr 25, 2012 at 9:51 AM, Magnus Hagander wrote: > We used to have a bug/lackoffeature in pg_dump at the 2GB boundary as > well, IIRC, specifically on Win32. Maybe you were hit by that one.. Yes, possibly. I didn't even know how to make a compressed plain dump, but that doesn't really plea

Re: [GENERAL] Bug? Query plans / EXPLAIN using gigabytes of memory

2012-04-25 Thread Willy-Bas Loos
Stacking views is a bad practice. It usually means that you are making the db do a lot of unnecessary work, scanning tables more than once when you don't even need them. According to your description, you have 3 layers of views on partitioned tables. I can imagine that that leaves the planner with

Re: [GENERAL] how robust are custom dumps?

2012-04-25 Thread Willy-Bas Loos
On Tue, Apr 24, 2012 at 10:04 PM, Thom Brown wrote: > What was the experience? Is it possible you had specified a > compression level without the format set to custom? That would result > in a plain text output within a gzip file, which would then error out > if you tried to restore it with pg_

[GENERAL] how robust are custom dumps?

2012-04-24 Thread Willy-Bas Loos
Hi, Some 6 years ago, i had a bad experience with a custom dump. It wouldn't restore and my data was lost. I was a beginner then, and working under windows, and i wasn't on the mailing list yet. It was no critical data, we could build the database again, which was then easier than figuring out wha

Re: [GENERAL] Detecting corrupt table

2012-04-19 Thread Willy-Bas Loos
you might want to log any errors resulting from pg_dump and then grep through them to verify. or you could record the exit status ( $? ) for each pg_dump command. I was also thinking about how to check if something malformed your data on disk. I could think of some ways to do that, but it doesn't

Re: [GENERAL] remove some rows from resultset

2012-04-19 Thread Willy-Bas Loos
should work. you could move b1 out of the sub query and add a normal where clause to make the syntax nicer. Might also matter for the query plan. other than that i don't see any bumps. It's good that you placed "b2.org_specific_rule = true" in the join clause so that the left join works properly. w

Re: [GENERAL] Performance degrades until dump/restore

2012-04-18 Thread Willy-Bas Loos
what performance, insert or select? On Thu, Apr 19, 2012 at 8:35 AM, Chris wrote: > Hello, > I'm using PG 9.1. Data is streaming into one particularly large table (at > 11 million rows currently) on a constant basis. It is pretty much all > inserts, very little updates or deletes (if any). > A

Re: [GENERAL] doc minor glitch?

2012-02-22 Thread Willy-Bas Loos
On Wed, Feb 22, 2012 at 10:33 AM, John R Pierce wrote: > hey, just noticed in the pg TOC on http://www.postgresql.org/** > docs/current/static/index.html > > chapter VI has roman numeral subsections, but V and VII both have decimal > secti

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Willy-Bas Loos
On Fri, Oct 14, 2011 at 3:38 PM, Guillaume Lelarge wrote: > Not sure which pgAdmin release you use, but 1.14 can edit comments on an > already existing views. Of course it supports editting comments on the view itself, but that's not what i mean. I have a view that shows the comments on all the t

Re: [GENERAL][HACKERS] register creation date of table

2011-10-14 Thread Willy-Bas Loos
On Fri, Oct 14, 2011 at 2:51 PM, Guillaume Lelarge wrote: >> When you edit the description in the table (or the view, but no >> support in pgAdmin), the comment in the system tables is updated also. > I'm not sure I understand your comment: "no support in pgAdmin". No > support for what? Editabl

  1   2   3   >