[GENERAL] Optimize sort before groupping

2012-02-16 Thread pasman pasmański
4 rows=4000 loops=1) " Sort Key: (max((b.""Data"")::text))" Sort Method: top-N heapsort Memory: 660kB -> GroupAggregate (cost=19.16..82252.30 rows=145232 width=42) (actual time=1.954..31534.246 rows=63759 loops=1) " Filter: (NOT bool_and(b.""Darmowe""))" -> Merge Left Join (cost=19.16..60017.63 rows=573034 width=42) (actual time=0.339..26669.766 rows=865978 loops=1) "Merge Cond: (((b.""NTA"")::text = (r.""Numer stacji"")::text) AND ((b.""NKA"")::text = (r.""Numer kierunkowy"")::text) AND ((b.""KodBłędu"")::text = (r.""Kod Błędu"")::text))" "Join Filter: ((replace((b.""Data"")::text, ':'::text, '.'::text))::cube && r.""Zakres"")" "Filter: (r.""Wartość"" IS NULL)" "-> Index Scan using ""Bladpol2_nta_nka_kod_błędu_btree"" on ""Bladpol2"" b (cost=0.00..46593.65 rows=1452312 width=38) (actual time=0.145..8622.003 rows=1439383 loops=1)" " Filter: ((""KodBłędu"")::text ~ '^(?:74|80|81)$'::text)" "-> Index Scan using ""NumerStacji_NumerKierunkowy_KodBłędu_LP"" on ""Rejestr stacji do naprawy"" r (cost=0.00..1405.83 rows=70476 width=47) (actual time=0.014..3113.398 rows=1045687 loops=1)" Total runtime: 32045.317 ms -- pasman -- 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] Extensions btree_gist and cube collide?

2012-01-31 Thread pasman pasmański
Hi. I recreate database and a problem disapears. Thanks. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Extensions btree_gist and cube collide?

2012-01-30 Thread pasman pasmański
Hi. When i add extensions: cube and btree_gist. First extension installs, but second not. There is a (spelled) error message: ERROR: operator 6(oid,oid) already exists in operator's family gist_oid_ops I try to install it in other schema, but i don't know how to use it. -- -----

[GENERAL] I cant create excluding constaint

2012-01-24 Thread pasman pasmański
uot;Period" for all orders in a field "Orders" ? pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Feature request: pgsql's CASE...WHEN optimization

2012-01-20 Thread pasman pasmański
: IF x<=const2 THEN IF x=const1 THEN action1 ELSE action2 END IF; ELSE IF x=const3 THEN action3 ELSE action4 END IF; END IF; ---- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] Pgsql problem

2012-01-17 Thread pasman pasmański
Thanks. Hstore works perfectly. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Pgsql problem

2012-01-12 Thread pasman pasmański
Hi. I write function in pgsql. This function needs to execute other functions by name. I do it using loop: declare r record; begin for r in execute 'select ' || $1 || '()' loop end loop; But I can't convert a record to array of text. How to do it ? p

[GENERAL] How to display the progress of query

2011-11-24 Thread pasman pasmański
display number of processed rows ? pasman -- 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] strange behavior, hoping for an explanation

2011-11-10 Thread pasman pasmański
mns named 'name' in other contexts? > > Best Wishes, > Chris Travers > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- p

Re: [GENERAL] Www emulator

2011-11-07 Thread pasman pasmański
>> On 07/11/2011 20:13, pasman pasmański wrote: >>> Hi. >>> >>> Is any application, which works as www server on client's side, and >>> loads pages from postgresql database? (free or commercial) >>> >> >> Many. Depends on what you

[GENERAL] Www emulator

2011-11-07 Thread pasman pasmański
Hi. Is any application, which works as www server on client's side, and loads pages from postgresql database? (free or commercial) -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

[GENERAL] pgAgent and encoding

2011-10-27 Thread pasman pasmański
"KodB³êdu" = '61' AND to_char("DataPliku",'MM') like '${MONTH_1}' GROUP BY to_char("DataPliku",'MM'), "KodB³êdu", "NKA", "NTA" ORDER BY "NKA"

[GENERAL] Problem with odbc_fdw

2011-10-16 Thread pasman pasmański
form: WinXp sp3 + mingw32 How to solve it ? pasman -- 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] Bulk processing & deletion

2011-10-13 Thread pasman pasmański
FROM table WHERE id IN (SELECT fk_id FROM to_delete); > > Good point. I can even use a temp table for this and make use of > UNLOGGED temp tables when we upgrade to 9.1! > > > -- pasman -- 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] [9.2devel] why it doesn't do index scan only?

2011-10-08 Thread pasman pasmański
is selecting 20 rows out of 30 million. why is it: > 1. not using index only scan > 2. not using even normal index scan? > > Best regards, > > depesz > > -- > The best thing about modern society is how easy it is to avoid contact with > it. > > http://depesz.com/

Re: [GENERAL] Restoring 2 Tables From All Databases Backup

2011-10-05 Thread pasman pasmański
PGRESTORE-OPTIONS > > -- > Dickson S. Guedes > mail/xmpp: gue...@guedesoft.net - skype: guediz > http://guedesoft.net - http://www.postgresql.org.br > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://ww

Re: [GENERAL] Hash index not being updated

2011-10-05 Thread pasman pasmański
n helps. Thanks in advance. > > -- > > > Justin Naifeh Software Developer > > Voice: > 303-460-7111 x1 Toll Free: > 877-444-3074 x1 Cell: > 720-363-8874 AIM, Yahoo > justinnaifeh > > www.terraframe.com/products/runwaysdk > <http://www.terraframe.com/products/runwaysdk> > Makers of TerraFrame RUNWAY SDK^(TM), the next-generation > model-driven engineering (MDE) application toolkit for software developers > > -- pasman -- 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] How to find freak UTF-8 character?

2011-10-02 Thread pasman pasmański
-entered it by hand. Problem solved. > > But thank you for the idea, I think that I will strip out at least any ‎ > entities from text entered into the database. > > By the way, is there a setting in psql that will output unprintable > characters > as question marks or something

Re: [GENERAL] how to improve this similarity query?

2011-09-30 Thread pasman pasmański
have to change the > preprocessing so the > 'B' and 'R' parts would be separate. > > So, I wonder whether there is any better way of doing these. I have looked > into tsquery > resp. fulltext, but they do not seem to support prefix matches, only exact > ones. &g

Re: [GENERAL] New feature: accumulative functions.

2011-09-27 Thread pasman pasmański
Thanks Marti for inspiration :). Monotonic functions allows to skip some sorts in window expressions containing them: select winfun1(...) over(order by x), winfun2(...) over(order by f(x)) from ... 2011/9/27, pasman pasmański : > Yes, accumulative functions may be used for sorting,groupp

Re: [GENERAL] New feature: accumulative functions.

2011-09-27 Thread pasman pasmański
Yes, accumulative functions may be used for sorting,groupping and merge joins with limit. Groupping looks simplest to implement, and comparable to performance of functional index . 2011/9/27, Marti Raudsepp : > 2011/9/25 pasman pasmański : >> My english is not perfect, by accumulativ

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
new functionalities - functional or gist index does the same work. Not for all encodings. Unknown performance advantages. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
For single argument strict increasing function f(x), estimation is simple: it is f(estimation of x). 2011/9/25, Pavel Stehule : > 2011/9/25 pasman pasmański : >> See that setting flag on function need less work than create new gist >> operator. Of course if postgresql's develo

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
spect also shows that for textual arguments, > it might matter which locale you're talking about. > > In short, this is looking awfully complicated, and I gauge the probable > level of interest by the fact that you're the first person to ask for it > in more than a dozen y

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
See that setting flag on function need less work than create new gist operator. Of course if postgresql's developers do biggest work before. 2011/9/25, Pavel Stehule : > 2011/9/25 pasman pasmański : >> I found second use case. Look at expression: >> >> where left(str

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
This feature give profits for increasing muliti-arg functions. Example: WHERE f(x,param) = const it may be impossible to create functional indexes for all params. 2011/9/25, Pavel Stehule : > Hello > > what is a real use case? > > Regards > > Pavel > > 2011/9/

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
t; > Regards > > Pavel > > 2011/9/25 pasman pasmański : >> My english is not perfect, by accumulative i think about monotonically >> increasing function. >> >> It works that for clause WHERE f(x)=const: >> 1. Read root page of index_on_x and get x1 ... Xn &g

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
... When n changes of course. Sorry for top posting, phone not allows to move cite. 2011/9/25, pasman pasmański : > I found second use case. Look at expression: > > where left(str,n)='value' > > function left(str,n) increase monotonically for str and n. With this >

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
y cheap > to evaluate, you'd end up preferring an index on f(x) anyway, because > that can be searched without any new evaluations of f(). > > regards, tom lane > -- pasman -- Sent via pgsql-general mailing list (pgsql-general@pos

Re: [GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
ng f(x): >> where f(x) = const >> where f(x) > const > > ... because it's sure not clear how you would get that to work. > > regards, tom lane > -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] New feature: accumulative functions.

2011-09-25 Thread pasman pasmański
Hi. I propose to add "accumulative" flag to a function definition. This flag would be set for function f(x) which is accumulative and immutable. This flag allows to use an index on x for clauses containing f(x): where f(x) = const where f(x) > const and so on. -- --

Re: [GENERAL] how just install psql on windows?

2011-09-22 Thread pasman pasmański
e with a db cluster but > having to keep all the server binary around is a wee bit overkill when I > just need the client. > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-gener

[GENERAL] Pgadmin and foreign tables

2011-09-19 Thread pasman pasmański
Hi. In 9.1 is cool feature - foreign tables. But when create foreign table in pgadmin (file_fdw wrapper), strings in the OPTIONS section ignore setting standard_conforming_strings=on. I don't know if it is a bug in postgres or pgadmin. -- pasman -- Sent via pgsql-general ma

[GENERAL] New feature in file_fdw

2011-09-18 Thread pasman pasmański
Hi. I propose that some options for foreign tables may be stored as defaults in server object: format, encoding, delimiter, quote. -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] How to get Transaction Timestamp ?

2011-09-17 Thread pasman pasmański
column, that will get you the time of the insert. >> >> If you want the update time, create a BEFORE UPDATE ON x FOR EACH ROW >> trigger on this table to update it. >> >> Regards, >> Marti >> > -- pasman -- 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] Bit datatype performance?

2011-09-14 Thread pasman pasmański
ole table. > > So I think, you should do some performance test for large number of > data, and compare both ways. I think bitset will be fast for really > small data, but M:N relations may be faster for really large data sets. > > You need to measure size of your database too, in

Re: [GENERAL] Stability of 9.1.0

2011-09-14 Thread pasman pasmański
I think that using any function in plperlu language stops the server. Perl version is 5.14 from activestate. 2011/9/14, pasman pasmański : > Hi. > > I install postgresql 9.1.0 version Win32 from enterprisedb (WinXp+sp3). > Every about 0,5 - 6 hours server stops. > Whats going on

[GENERAL] Stability of 9.1.0

2011-09-14 Thread pasman pasmański
cuum_max_workers = 1 # max number of autovacuum subprocesses statement_timeout = 24h # in milliseconds, 0 is disabled datestyle = 'iso, ymd' lc_messages = 'Polish_Poland.1250' # locale for system error message lc_monetary

Re: [GENERAL] Compatibility 9.1rc and 9.1.0

2011-09-12 Thread pasman pasmański
t update the binaries. > > regards, tom lane > -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Compatibility 9.1rc and 9.1.0

2011-09-12 Thread pasman pasmański
Hi. I have the cluster created under 9.1rc version. When i do upgrade to 9.1.0, i can only reinstall binaries or i should import data too? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Index Corruption

2011-09-12 Thread pasman pasmański
or our processes that is making us > more > susceptible. > > Is there something we should be doing to make index corruption less likely? > Is > there anyway to do an index integrity check so we can be more proactive with > REINDEXing? > > Thanks, > dylan > > -

Re: [GENERAL] feature request - update nowait

2011-09-08 Thread pasman pasmański
idea. > > Best regards, > Eduardo. > -- pasman -- 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] Which perl works with pg9.1

2011-09-06 Thread pasman pasmański
>> The win32 packages require whatever version of Perl they were built >> against, AFAIK. Perl DLLs are only binary compatible within a major >> version, and I think the DLL naming changes too. >> Looks like 9.1 binaries are linked with perl 5.14. Thanks for answers pa

[GENERAL] Which perl works with pg9.1

2011-09-06 Thread pasman pasmański
Hi. I have installed activeperl 5.10. It works with pg8.4, but not with 9.1rc1 (win32 installer). Do this version need perl 5.12? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] UPDATE using query; per-row function calling problem

2011-09-02 Thread pasman pasmański
.. > > But > b = uuid_generate_v1() > is a lot simpler! > > In my "-1" example, am I right in assuming that I created a correlated > subquery rather than an correlated one? I'm confused about the > difference. > > Many thanks > Rory > > &

Re: [GENERAL] Backups and binary mode

2011-08-29 Thread pasman pasmański
> Simple benchmark show that COPY BINARY is 8 times faster > than COPY CSV on my desktop. > > I retry benchmark, and differences are small. ---- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.po

[GENERAL] Backups and binary mode

2011-08-29 Thread pasman pasmański
Hi. Is this possible to force pg_dump to make backups using COPY ... BINARY ? Simple benchmark show that COPY BINARY is 8 times faster than COPY CSV on my desktop. Postgresql 8.4.8 , WinXp sp3 pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Feature request: per user connections limit

2011-08-28 Thread pasman pasmański
Thanks, i'll try it tomorrow -- 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] Problem importing a csv file

2011-08-27 Thread pasman pasmański
What if you run this query using psql? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Feature request: per user connections limit

2011-08-27 Thread pasman pasmański
Hi. Is this possible to limit number of connections for given user/role? Postgres 8.4.8. -- pasman -- 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] Array syntax in the copier

2011-08-27 Thread pasman pasmański
Do you tried "," ? -- -------- pasman -- 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] Need help with dropping a view please

2011-08-26 Thread pasman pasmański
Hi. Maybe last bugfix helps you. -- pasman -- 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] documentation for hashtext?

2011-08-26 Thread pasman pasmański
The better solution is you write own hashing function. -- pasman -- 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] COPY FROM how long should take ?

2011-08-26 Thread pasman pasmański
You can add a trigger and send message every 10 rows -- pasman -- 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] array_agg problem

2011-08-19 Thread pasman pasmański
Array_agg is not implemented for arrays. -- pasman -- 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] Problem with planner

2011-08-08 Thread pasman pasmański
t; (10 rows) > > running analyze objects 2 times in a row fixed the issue, but hour later > - the problem came back. > > what can be wrong? > > Best regards, > > depesz > > -- > The best thing about modern society is how easy it is to avoid contact with &g

Re: [GENERAL] Query with rightmost function does not use index

2011-08-07 Thread pasman pasmański
gotcha? >> I'm using PostgreSQL 8.4.8 on i686-pc-linux-gnu, compiled by GCC >> gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 32-bit >> >> >> > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your s

Re: [GENERAL] New feature: cached foreign keys

2011-07-09 Thread pasman pasmański
Reality is crude, seems than this idea is not as good as i think :( Thanks for answer. 2011/7/9, Craig Ringer : > On 9/07/2011 3:06 PM, pasman pasmański wrote: >> Hi. >> >> Today i have an idea for increase performance of foreign keys. After >> search parent record,

[GENERAL] New feature: cached foreign keys

2011-07-09 Thread pasman pasmański
is constant. Less locks on index. Contra: slower searching when parent table is heavy updated. More memory used for cached ctid's. -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [GENERAL] plpgsql function with update and seeing changed data from outside during run

2011-06-09 Thread pasman pasmański
nza Chuo-ku, Tokyo 104-8167, JAPAN > ★ Tel: +81-(0)3-3545-7706 > ★ Fax: +81-(0)3-3545-7343 > ★ http://www.e-gra.co.jp > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-

Re: [GENERAL] Cannot reproduce why a query is slow

2011-05-06 Thread pasman pasmański
region_area_idx" btree > (dealer_region_area), tablespace "lms_index" > "lead_reporting_data_dealer_region_idx" btree (dealer_region), > tablespace "lms_index" > "lead_reporting_data_model_idx" btree (model), tablespace "lms_index" >

Re: [GENERAL] Short-circuit boolean evaluation

2011-04-30 Thread pasman pasmański
es to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] New feature: skip row locks when table is locked.

2011-04-27 Thread pasman pasmański
Hi. Yesterday i have an idea, that sometimes row locks may be skipped, when table is already locked with LOCK command. It may to reduce an overhead from row locks. What do you think about it? -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Using column aliasses in the same query

2011-04-17 Thread pasman pasmański
gt; >> It's easy to define a view or an SQL function and stash the hairy logic >> there. >> >> regards, Leif > > True, but that is essentially the same thing as the example query I gave. > There are plenty of cases where this approach is not workable. > > Che

[GENERAL] New feature: selectivity - new attribute in function

2011-04-16 Thread pasman pasmański
pg_dump: [custom archiver] WARNING: ftell mismatch with expected position -- > ftell used > > I was trying to do a Posgres 8.1.4 backup and restored it to Postgres 9.0 on > a new Dell server running Windows server 2008. > > Any clue how to resolve it? > > Edison &g

Re: [GENERAL] Why security-definer functions are executable by public by default?

2011-04-06 Thread pasman pasmański
t security > definer functions are used to get access to things that you usually > don't have access to - shouldn't the privilege be revoked by default, > and grants left for dba to decide? > you can create function in schema accesible to dba only. pasman --

Re: [GENERAL] Database "gnu make" equivalent

2011-04-05 Thread pasman pasmański
> > A perl script, perhaps? You would of course have to make a query to > determine that the specific row you are looking for is either null or > nonexistant, then send your additional queries. > > Yes, it is simplest. I try to do it ---- pasman -- Sent via pgsql-ge

[GENERAL] Database "gnu make" equivalent

2011-04-05 Thread pasman pasmański
Hello. I search a tool to send queries to database when specific rows contain null or not exist. What can be used for this purpose ? pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

[GENERAL] Convert xmin to format used by txid_current

2011-04-01 Thread pasman pasmański
Hi. How to convet xmin field (32bit) to format used by txid_current (64bit) ? I use it to track updates in table. pasman -- 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] Out of memory

2011-03-26 Thread pasman pasmański
___ > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- pasman -- 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] help understanding explain output

2011-02-16 Thread pasman pasmański
> Naturally a boolean can only have two values, really? ---- pasman -- 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] read and restore deleted record

2011-02-15 Thread pasman pasmański
> > -- > Lu Ying > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- pasman -- Sent via pgsql-general mailing list (pgsql-general@p

[GENERAL] Logging planner estimates.

2011-02-14 Thread pasman pasmański
Hi. Is it possible to log plans which planner discard? I want to tune planner settings for some queries. -- pasman -- 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] partitioning and dynamic query creation

2011-02-12 Thread pasman pasmański
d lines are working as expected and I think this is the common > way > of handling partitions. > > Now my question: > is it possible at all to create the insert statement on the fly, to avoid > modifying the trigger function each time a new partition has been added ? > > any help appreciated::GERD:: > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- pasman -- 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] Heavy queries not run by user application

2011-02-12 Thread pasman pasmański
to happen? > > I use PostgreSQL 8.4.4 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) > 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit. > > Thanks in advance for any help. > Ruben. > You check who is sending this queries. pasman -- 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] Multithreaded query onto 4 postgresql instances

2011-02-11 Thread pasman pasmański
ronic format." > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- pasman -- 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] Permission denied error - best way to fix?

2011-02-08 Thread pasman pasmański
need to be a superuser, or is there some way to GRANT > this permission (if possible, I don't want this user to be able to > modify the schema).. > this lock need only SELECT privilege. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

[GENERAL] Feature: vacuum page before write

2011-02-04 Thread pasman pasmański
), but seq scan will be faster and disk io usage will be lower. I don't know what is happen when a index entry points to reclaimed row. -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresq

Re: [GENERAL] isn't "insert into where not exists" atomic?

2011-02-03 Thread pasman pasmański
Mage, add "raise notice" at the begin of your buggy trigger. -- 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] Tip: Transposing rows using generate_series()

2011-02-03 Thread pasman pasmański
Look at unnest function. -- 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] isn't "insert into where not exists" atomic?

2011-02-03 Thread pasman pasmański
Your trigger is wrong. You try to insert the same row twice. -- 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] Adding an "and is not null" on an indexed field slows the query down immensely.

2011-01-15 Thread pasman pasmański
I think this is a planner's bug. Can you send these explains to pgsql-bugs ? On 1/15/11, Tim Uckun wrote: > 2011/1/15 pasman pasmański : >> Try : >> order by index_delta+1 desc >> > > I have attached the explain analyze for that below why does this > retur

Re: [GENERAL] Adding an "and is not null" on an indexed field slows the query down immensely.

2011-01-15 Thread pasman pasmański
" > " Index Cond: ((topical_urls.domain_id = 157) AND > (topical_urls.consolidated_url_id = consolidated_urls.id))" > " Filter: (NOT topical_urls.hidden)" > > > > The index_delta field is double precision and is indexed. > > Any suggestions as to how to make this query run faster? > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Sent from my mobile device pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Pl/perl and perl version-tip in doc

2011-01-06 Thread pasman pasmański
It is need tip in doc which version of perl must be installed. Error message tells nothing. For example Postgres 8.4 works only with perl 5.10. -- Sent from my mobile device pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] Archive command and used size of wal

2011-01-05 Thread pasman pasmański
Hi. I propose new feature - allow archive command to copy part of not full filled wal segment. It need new parameter %b - number of bytes used in segment . Then one can use head or dd to archive wal and reduce network traffic to standby server. -- Sent from my mobile device pasman

Re: [GENERAL] Cursors WITH HOLD

2011-01-03 Thread pasman pasmański
Thanks for reply. I do some checking and some queries boost very well :) pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Cursors WITH HOLD

2010-12-30 Thread pasman pasmański
Hello. I use Postgres 8.4.5 via perl DBI. And i try to use cursors WITH HOLD to materialize often used queries. My question is how many cursors may be declared per session and which memory setting s to adjust for them ? regards. pasman -- Sent via pgsql-general mailing list

Re: [GENERAL] Compress data sent to client

2010-12-25 Thread pasman pasmański
I read in doc that by default longer text fields are compressed. They may be sent to client without decompression - this reduce netword load. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

[GENERAL] Compress data sent to client

2010-12-24 Thread pasman pasmański
Hello. Is postgresql able to compress data sent to the client? -- Sent from my mobile device pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] [feature request] left/right join + limit optimization

2010-12-21 Thread pasman pasmański
hello. I think that left/right joins and limit may be optimized. When there aren't WHERE conditions this may be executed as below: Limit N Merge Left Join Sort Top N Bitmap Heap Scan ... Sort Bitmap Heap Scan ... pasman -- Sent via pgsql-general ma

[GENERAL] Fatal accident :)

2010-12-13 Thread pasman pasmański
2010-12-13 11:19:35 CET FATAL: the database system is starting up pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Optimizing query

2010-11-24 Thread pasman pasmański
t=1502.09..3884.98 rows=29341 width=95) (actual time=282.570..1215.355 rows=46694 loops=1)" " Recheck Cond: (("DataPliku" >= (('now'::text)::date - 120)) AND (("KodBłędu")::text = '74'::text))" "

[GENERAL] Read binary records

2010-11-17 Thread pasman pasmański
Hello. How to read binary file ? I try pg_read_file() but this returns text (not bytea) and skip part of record pasman -- 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] Comments on tables

2010-11-14 Thread Pasman
> do $$ > begin >   execute 'COMMENT ON TABLE test_count is ''Updated ' || current_date || > ''''; > end$$; > thanks, it works cool. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

[GENERAL] Comments on tables

2010-11-10 Thread pasman pasmański
Hello. How to add comment on table with calculated value ? COMMENT ON TABLE test IS 'Updated ' || current_date; not works ... Regards. -------- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.post

[GENERAL] Planner features, discussion

2010-07-13 Thread pasman pasmański
transformations: F( F(a,1), 2) = F(a, F(1,2) ) - for algebraic groups for example etc. pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Manual for small project

2010-07-05 Thread pasman pasmański
Hello. I have to prepare manual to simple database in postgresql 8.4.4, Winxp+sp2. I want to store doc pages in comment field, format html. Is a better idea to store documentation ? thanks for answer -- pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

[GENERAL] effective_io_concurrency details

2010-05-26 Thread pasman pasmański
Hello. I have 2 questions: Is effective_io_concurrency working on WinXP sp2 ? and what is the difference between effective_io_concurrency = 0 and effective_io_concurrency = 1 Postgres 8.4.4 pasman -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

[GENERAL] Multilevel partitioning

2010-05-05 Thread pasman pasmański
I create partitions as below. And run query: select * from test where grupa='A'; Is planner skip to analyze partitions: test2d, test2e, test2f ? best regards - CREATE TABLE test ( grupa character varying(1), id

[GENERAL] File compression in WinXP

2010-05-02 Thread pasman pasmański
Hello. I'm install postgresql 8.4.3 on WinXPsp3. Because of small disk i create tablespace pointing to commpressed folder and move some tables to it. Compression is good: 10GB to 3-4GB speed acceptable (small activity,10 users) But is this safe ? pasman

  1   2   >