[GENERAL] pg_dump excluding tables content but not table schema

2009-12-28 Thread Ivan Sergio Borgonovo
I've some tables that are just cache. I'd like to just dump the table schema without dumping the table contend. I think I could do it in 2 steps but I'd like to avoid it. Is there a way? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list

Re: [GENERAL] pg_dump excluding tables content but not table schema

2009-12-28 Thread Ivan Sergio Borgonovo
On Mon, 28 Dec 2009 19:39:36 + Raymond O'Donnell r...@iol.ie wrote: On 28/12/2009 18:41, Ivan Sergio Borgonovo wrote: I'd like to just dump the table schema without dumping the table contend. pg_dump -s -t table name db name My fault. I was not clear enough. I'd like to make

[GENERAL] flagging first row inserted for each group of key

2009-12-17 Thread Ivan Sergio Borgonovo
that will make reporting easier/faster. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] flagging first row inserted for each group of key

2009-12-17 Thread Ivan Sergio Borgonovo
On Thu, 17 Dec 2009 10:38:32 +0100 A. Kretschmer andreas.kretsch...@schollglas.com wrote: In response to Ivan Sergio Borgonovo : I've a web application. I'm logging data related to the landing page and subsequent selected hits. create table track_hit ( hitid serial not null

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Ivan Sergio Borgonovo
regexp? Can accents be ignored during searches? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] duplicating a schema

2009-12-01 Thread Ivan Sergio Borgonovo
On Tue, 1 Dec 2009 11:39:06 +0900 Schwaighofer Clemens clemens.schwaigho...@tequila.jp wrote: On Sun, Nov 29, 2009 at 21:21, Ivan Sergio Borgonovo m...@webthatworks.it wrote: I need to create a new schema with all the content in an existing one, just with a new name. The way I've found

Re: [GENERAL] duplicating a schema

2009-12-01 Thread Ivan Sergio Borgonovo
On Tue, 1 Dec 2009 09:53:12 +0100 Ivan Sergio Borgonovo m...@webthatworks.it wrote: On Tue, 1 Dec 2009 11:39:06 +0900 Schwaighofer Clemens clemens.schwaigho...@tequila.jp wrote: On Sun, Nov 29, 2009 at 21:21, Ivan Sergio Borgonovo m...@webthatworks.it wrote: I need to create a new

[GENERAL] duplicating a schema

2009-11-29 Thread Ivan Sergio Borgonovo
? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] passing parameters to multiple statements

2009-11-18 Thread Ivan Sergio Borgonovo
even knowing the reason. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] passing parameters to multiple statements

2009-11-18 Thread Ivan Sergio Borgonovo
On Wed, 18 Nov 2009 11:38:46 +0100 Pavel Stehule pavel.steh...@gmail.com wrote: 2009/11/18 Ivan Sergio Borgonovo m...@webthatworks.it: On Tue, 17 Nov 2009 20:16:36 -0800 David Fetter da...@fetter.org wrote: On Tue, Nov 17, 2009 at 09:33:05AM -0700, Konstantin Izmailov wrote: Some

[GENERAL] advocating pgsql was:passing parameters to multiple statements

2009-11-18 Thread Ivan Sergio Borgonovo
part of it and on the fall back on our beloved DB. I think there are far more people knowing just one DB and badly than companies with such strict (insane) policies and... well PostgreSQL is very standard compliant. I'd beat another horse ;) -- Ivan Sergio Borgonovo http://www.webthatworks.it

[GENERAL] impersonating a user/ownership problems

2009-11-17 Thread Ivan Sergio Borgonovo
sequence alter table ... owner to alter sequence ... owned by ... alter table ... set default ... Is there a less painful approach? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

[GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Ivan Sergio Borgonovo
; In this case test.mytable will be chosen. Is there a way to ask postgresql the schema of the table that will be chosen? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Ivan Sergio Borgonovo
On Thu, 12 Nov 2009 10:38:27 + Richard Huxton d...@archonet.com wrote: Ivan Sergio Borgonovo wrote: I have a search_path that may not just consist of $user, public. eg. $user, public, test, import I'd like to know which table is going to be chosen if I do a select * from mytable

[GENERAL] xml import/export tools and performance

2009-11-05 Thread Ivan Sergio Borgonovo
a tagged csv. Currently I'm mostly looking around to see where it would be convenient to move the boundaries of the problem. I'd be curious about what kind of performance impact they may have compared to COPY. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general

[GENERAL] pk vs unique not null differences between 8.3.4 and 8.3.8

2009-11-02 Thread Ivan Sergio Borgonovo
is needed for shop_commerce_gift_giftcode_key constraint was it something that was fixed between the releases or I just didn't take note of what I really did in the staging box? btw I was using the same pgsql version from my desktop to \d the tables. -- Ivan Sergio Borgonovo http

Re: [GENERAL] pk vs unique not null differences between 8.3.4 and 8.3.8

2009-11-02 Thread Ivan Sergio Borgonovo
On Mon, 02 Nov 2009 09:53:06 -0500 Tom Lane t...@sss.pgh.pa.us wrote: Ivan Sergio Borgonovo m...@webthatworks.it writes: This statement succede in 8.3.8 alter table shop_commerce_gift drop constraint shop_commerce_gift_pkey; but failed in 8.3.4. Uh, that doesn't seem to match the name

[GENERAL] still on joining array/inline values was and is: design, ref integrity and performance

2009-10-28 Thread Ivan Sergio Borgonovo
in pw_res. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] still on joining array/inline values was and is: design, ref integrity and performance

2009-10-28 Thread Ivan Sergio Borgonovo
. Every issue you've described so far is database design 101 and should present no real problem. I think you're agonizing over nothing... That's always a good advice. Sometimes you're out just for moral support. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql

[GENERAL] design, ref integrity and performance

2009-10-27 Thread Ivan Sergio Borgonovo
filling pw_resource. I could make the constraint deferrable, add a on delete cascade to pw_email.password but: - I'm not sure it is a good design - I'm still not sure it can work as expected Before testing if it can work I'd like to hear some comment on the design. thanks -- Ivan Sergio Borgonovo

Re: [GENERAL] design, ref integrity and performance

2009-10-27 Thread Ivan Sergio Borgonovo
On Tue, 27 Oct 2009 09:17:59 + Richard Huxton d...@archonet.com wrote: Ivan Sergio Borgonovo wrote: Hi, I've to generate unique password and associate them with emails. Association with emails is just to mail the password, email + password aren't the password, just the password

[GENERAL] joining an array with a table or...?

2009-10-26 Thread Ivan Sergio Borgonovo
query. Any clean technique? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] joining an array with a table or...?

2009-10-26 Thread Ivan Sergio Borgonovo
On Mon, 26 Oct 2009 14:15:26 +0100 Ivan Sergio Borgonovo m...@webthatworks.it wrote: I've a list of emails and a list of users (with emails). If the list of emails was already inside a table create table mails ( mail varchar(64) ); create table users ( name varchar(127), mail

Re: [GENERAL] joining an array with a table or...?

2009-10-26 Thread Ivan Sergio Borgonovo
On Mon, 26 Oct 2009 14:56:26 -0400 Merlin Moncure mmonc...@gmail.com wrote: On Mon, Oct 26, 2009 at 11:05 AM, Ivan Sergio Borgonovo m...@webthatworks.it wrote: To make it more concrete I came up with: select coalesce(u.mail,j.mail) from (  select (array['m...@example1.com','m

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
, yourinput) (or ts_rank_cd) -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
~ 'gino' AND summary ~ 'pino') you just need to weight the input query as well inputquery := setweight(cfg, inputtitle, 'A', ''); inputquery := inputquery setweight(cfg, inputsummary, 'B', ''); ... -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list

Re: [GENERAL] Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
now ts_rank* are black boxes for me. I envisioned I may enjoy some finer tuning on ranking... but currently they really do a good job. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

[GENERAL] setweight detailed doc was: Ranking search results using multiple fields in PostgreSQL fulltext search

2009-10-12 Thread Ivan Sergio Borgonovo
that explain in more details setweight? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] bayesian classification over tsvector

2009-08-21 Thread Ivan Sergio Borgonovo
assigned to a group already. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] ownership of sequences, pseudo random unique id

2009-08-21 Thread Ivan Sergio Borgonovo
On Thu, 20 Aug 2009 14:31:02 -0400 Alvaro Herrera alvhe...@commandprompt.com wrote: Ivan Sergio Borgonovo wrote: I've create table pr( code varchar(16) primary key, ... ); create sequence pr_code_seq owned by pr.code; -- uh! actually stuff like: alter table pr drop column

Re: [GENERAL] Temp table or normal table for performance?

2009-08-21 Thread Ivan Sergio Borgonovo
with temp tables IME. Why? you mean that since you generally use temp table for computation and looping several times over the table... a more expressive language would be suited? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Generating random unique alphanumeric IDs

2009-08-20 Thread Ivan Sergio Borgonovo
)),7 , to_hex((rand()*2^31)::int) ); I was wondering if there is any better way to get alphanumeric random string quickly. Since uniqueness is assured by passing a sequence to fesitel_encrypt, I just need turning into to alphanumeric quickly. -- Ivan Sergio Borgonovo http://www.webthatworks.it

[GENERAL] ownership of sequences, pseudo random unique id

2009-08-20 Thread Ivan Sergio Borgonovo
code; or just drop table pr seems to work as expected (they drop the sequence too). Should I be concerned of anything since it looks like a hack? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Generating random unique alphanumeric IDs

2009-08-20 Thread Ivan Sergio Borgonovo
. That's a common problem you may just have to adapt to plpgsql. [1] select s.i, feistel_decrypt(s.i) from generate_series(0,16) as s(i) order by feistel_decrypt(s.i) did it in a hurry... didn't check -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list

Re: [GENERAL] design, plpgsql and sql injection in dynamically generated sql

2009-08-18 Thread Ivan Sergio Borgonovo
to dynamically build the query on the client side. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] design, plpgsql and sql injection in dynamically generated sql

2009-08-18 Thread Ivan Sergio Borgonovo
the int example there with the text one. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] design, plpgsql and sql injection in dynamically generated sql

2009-08-17 Thread Ivan Sergio Borgonovo
of permitted (table, key) and then just pass the table and the key value. What should be the equivalent of quote_ident in PHP? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] Generating random unique alphanumeric IDs

2009-08-16 Thread Ivan Sergio Borgonovo
. Sometimes ago Daniel Verite posted an implementation of a fiestel cipher in plpgsql. I'm happily using it to generate pseudo-random hex strings. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

[GENERAL] acl_admin by Afilias CA (bug/feature report)

2009-08-06 Thread Ivan Sergio Borgonovo
-- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Ivan Sergio Borgonovo
I've create or replace function(... declare col1 varchar(32); ... create table pippo( col1 varchar(32), ... Unfortunately I can't schema specify the column to avoid name overlap. Is there another way other than just simply rename the variable? thanks -- Ivan Sergio Borgonovo http

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Ivan Sergio Borgonovo
On Tue, 4 Aug 2009 16:01:58 +0200 Pavel Stehule pavel.steh...@gmail.com wrote: 2009/8/4 Ivan Sergio Borgonovo m...@webthatworks.it: I've create or replace function(... declare  col1 varchar(32); ...  create table pippo(    col1 varchar(32), ... Unfortunately I can't

Re: [GENERAL] MSSQL to PostgreSQL

2009-07-31 Thread Ivan Sergio Borgonovo
-PostgreSQL-Databases-and-Servers.html http://www.postgresql.org/docs/8.3/static/dblink.html -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Constraint between 2 tables and taking a coherent snapshot of both

2009-07-26 Thread Ivan Sergio Borgonovo
to manage this situation so that I could make it as simple as possible AND lower as much as possible the chances that the transaction will have to be rolled back. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

[GENERAL] checking for temp tables information_schema vs. EXCEPTION

2009-07-21 Thread Ivan Sergio Borgonovo
Sergio Borgonovo http://www.webthatworks.it -- 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 Improvement suggestions

2009-07-20 Thread Ivan Sergio Borgonovo
versions they come from). -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] PostgreSQL and Poker

2009-07-08 Thread Ivan Sergio Borgonovo
correct the comments. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] PostgreSQL and Poker

2009-07-08 Thread Ivan Sergio Borgonovo
option was pg for licensing reasons. Or am I misunderstanding what you wrote? or... am I plainly wrong? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

[GENERAL] temp tables and replication/connection sharing/pooling

2009-07-08 Thread Ivan Sergio Borgonovo
. I'm not planning to use pg_pconnect. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] Feistel cipher, shorter string and hex to int

2009-07-07 Thread Ivan Sergio Borgonovo
On Tue, 07 Jul 2009 12:07:48 +0200 Daniel Verite dan...@manitou-mail.org wrote: Ivan Sergio Borgonovo wrote: r2:=l1 # 1366.0*r1+150889)%714025)/714025.0)*32767)::int; -- but what about this? where does it come from? This function: (1366.0*r1+150889)%714025 implements

[GENERAL] Feistel cipher, shorter string and hex to int

2009-07-06 Thread Ivan Sergio Borgonovo
END; $$ LANGUAGE plpgsql strict immutable; Anything else to suggest or copy from? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] combine multiple row values in to one row

2009-07-06 Thread Ivan Sergio Borgonovo
it I have to rewrite the function to customize it. Is there a generic way to do this? An aggregate maybe? array_accum http://www.postgresql.org/docs/8.2/static/xaggr.html ? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Replication and coding good practices

2009-06-29 Thread Ivan Sergio Borgonovo
was thinking to automate the application of schema changes with a hook in svn, but right now it doesn't look as a good investment. Still I'm very interested in techniques to version schema changes and bring them together with code change and being able to diff them. thanks -- Ivan Sergio Borgonovo http

[GENERAL] Replication and coding good practices

2009-06-28 Thread Ivan Sergio Borgonovo
with a general replication solution? The applications I mostly deal with are e-commerce sites. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

[GENERAL] drawback of array vs join

2009-06-23 Thread Ivan Sergio Borgonovo
... itemlisttemp tables will be very small (30 as an upper limit) and arrays as well will contain very few elements (4 as an upper limit). I'm aware of the drawback of de-normalization. Should I be aware of anything else when using arrays this way? thanks -- Ivan Sergio Borgonovo http

Re: [GENERAL] drawback of array vs join

2009-06-23 Thread Ivan Sergio Borgonovo
On Tue, 23 Jun 2009 17:39:46 -0300 Emanuel Calvo Franco postgres@gmail.com wrote: 2009/6/23 Ivan Sergio Borgonovo m...@webthatworks.it: I've a temporary table where I'd like to resume data coming from several other tables (normalised the usual way). eg. a list of items that may

Re: [GENERAL] temp tables, sessions, pgpool and disk

2009-06-22 Thread Ivan Sergio Borgonovo
the definition of temp table is very terse... and a bit confusing (at least for me) about global and local. I gave a quick look at what's available on MS SQL... and they have an sort of in memory temp table but you can't modify its schema. -- Ivan Sergio Borgonovo http://www.webthatworks.it

Re: [GENERAL] temp tables, sessions, pgpool and disk

2009-06-22 Thread Ivan Sergio Borgonovo
On Mon, 22 Jun 2009 11:40:08 +0200 Martijn van Oosterhout klep...@svana.org wrote: On Mon, Jun 22, 2009 at 09:53:59AM +0200, Ivan Sergio Borgonovo wrote: The OS knows much less about what anonymous memory (memory not backed by a file) means to a program and can't be as clever

[GENERAL] cursors, temp tables, dynamic sql technique (was and is: looping over a small record set over and over in a function)

2009-06-21 Thread Ivan Sergio Borgonovo
On Sun, 21 Jun 2009 10:57:51 +0800 Craig Ringer cr...@postnewspapers.com.au wrote: On Fri, 2009-06-19 at 20:23 +0200, Ivan Sergio Borgonovo wrote: If I could easily load all the dataset into an array, loop through it and then just update the computed field it would be nice... but how

Re: [GENERAL] cursors, temp tables, dynamic sql technique (was and is: looping over a small record set over and over in a function)

2009-06-21 Thread Ivan Sergio Borgonovo
On Sun, 21 Jun 2009 21:43:16 +0800 Craig Ringer cr...@postnewspapers.com.au wrote: On Sun, 2009-06-21 at 14:57 +0200, Ivan Sergio Borgonovo wrote: I think everything could be summed up as: select into t myaggregate1(field) from dataset where condition1; if(t10) then update dataset

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

2009-06-20 Thread Ivan Sergio Borgonovo
to incur in any disk write. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

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

2009-06-19 Thread Ivan Sergio Borgonovo
... what about all the UPDATEs involved to change field N+1 of the temp table? Will be they expensive? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

[GENERAL] simulating high load for vacuum full

2009-06-17 Thread Ivan Sergio Borgonovo
as a working strategy. The restore shouldn't be fragmented. What are the side effects of a vacuum full? Any cheaper way to cause a heavy vacuum full or just its side effects? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] why dropping a trigger may cause a deadlock

2009-06-08 Thread Ivan Sergio Borgonovo
On Fri, 05 Jun 2009 17:35:19 -0400 Tom Lane t...@sss.pgh.pa.us wrote: Ivan Sergio Borgonovo m...@webthatworks.it writes: I don't get it. Why dropping the triggers would cause a deadlock anyway? I bet it is due to my naïve view of the problem but I think a trigger is a function. Unless

[GENERAL] why dropping a trigger may cause a deadlock

2009-06-05 Thread Ivan Sergio Borgonovo
activity on the table on which the triggers are acting is minimal if not absent. But I suspect my understanding of how these things work is very naive... so some general clue would be appreciated as well. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing

Re: [GENERAL] why dropping a trigger may cause a deadlock

2009-06-05 Thread Ivan Sergio Borgonovo
On Fri, 05 Jun 2009 10:46:11 -0400 Tom Lane t...@sss.pgh.pa.us wrote: Ivan Sergio Borgonovo m...@webthatworks.it writes: I've encountered this error for the first time psql:./import_stock_scratch.sql:9: ERROR: deadlock detected DETAIL: Process 11095 waits for AccessExclusiveLock

Re: [GENERAL] optimize/cleanup SQL

2009-05-29 Thread Ivan Sergio Borgonovo
clockin))/3600 AS NUMERIC),2) AS hours FROM timeclock; satisfying? template1=# select extract(days from ('2009-01-01'::timestamp - '2008-01-01'::timestamp))+5::int; ?column? -- 371 (1 row) -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list

[GENERAL] Excel and postgresql functions

2009-05-26 Thread Ivan Sergio Borgonovo
Excel/Access 2003 can't return result sets coming from functions? - if Excel/Access can't return results from a function is there a way to masquerade the function (accepting parameters) behind a table/view. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general

Re: [GENERAL] Excel and postgresql functions

2009-05-26 Thread Ivan Sergio Borgonovo
On Tue, 26 May 2009 11:41:50 +0200 Ivan Sergio Borgonovo m...@webthatworks.it wrote: I've built some functions just for encapsulation reasons and avoiding to pass the same parameter over and over. I'd like to access the result from Excel but it seems (and I'm not pretty sure

[GENERAL] psql Windows and variables

2009-05-23 Thread Ivan Sergio Borgonovo
import.transaction from :csvfile but I get some.sql:3: :csvfile: No such file or directory I tried -v --set etc... Same result. How can I pass variables to a sql script? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] Aggregate Function to return most common value for a column

2009-05-22 Thread Ivan Sergio Borgonovo
the overhead of starting a perl interpreter for that. Do I have to write the function in C maybe? Isn't it a job for group by? select count(*), myvalue from table group by myvalue order by count(*) desc limit 1; -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general

Re: [GENERAL] [Windows] Feedback on PG?

2009-05-20 Thread Ivan Sergio Borgonovo
background but where transactions and some advanced features are essential to survival I got the impression that actually even for small SOHO applications even when server and client are on the same box pg may be a very good choice. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via

Re: [GENERAL] [Windows] Feedback on PG?

2009-05-20 Thread Ivan Sergio Borgonovo
On Wed, 20 May 2009 11:59:34 +0100 Raymond O'Donnell r...@iol.ie wrote: On 20/05/2009 11:49, Ivan Sergio Borgonovo wrote: I think you could connect from Delphi through ODBC, meybe even on some .NET driver. I think ODBC should be more mature... but don't trust me. You can use ODBC

Re: [GENERAL] [Windows] Feedback on PG?

2009-05-20 Thread Ivan Sergio Borgonovo
On Wed, 20 May 2009 06:59:28 -0400 Dave Page dp...@pgadmin.org wrote: On Wed, May 20, 2009 at 6:49 AM, Ivan Sergio Borgonovo m...@webthatworks.it wrote: ] I was surprised how polished the installation was. Thanks :-) Beside the fact I can only thank for all the great work around

[GENERAL] package for debugger/wizard was: Feedback on PG?

2009-05-20 Thread Ivan Sergio Borgonovo
as a ''get you started tool. We still expect you to Exactly. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] Excel and pg

2009-05-18 Thread Ivan Sergio Borgonovo
On Mon, 18 May 2009 09:14:41 +0800 Craig Ringer cr...@postnewspapers.com.au wrote: Ivan Sergio Borgonovo wrote: I'd like to know if: - it is possible to load in an Excel sheet a table (view, query result) coming from postgresql and to use those data to do further computation

[GENERAL] Excel and pg

2009-05-17 Thread Ivan Sergio Borgonovo
Wizard - replication solution (I wonder if it is easier to have a working solution with aptitude or Stack Builder) -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] PGSQL-to-MYSQL Migration: Error in a 'simple' inner join query

2009-05-04 Thread Ivan Sergio Borgonovo
not in aggregates. Postgresql is a bit stricter than mysql but it generally saves you a lot of debugging later. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org

Re: [GENERAL] Selling an 8.1 to 8.3 upgrade

2009-04-24 Thread Ivan Sergio Borgonovo
release but OS release as soon as 8.4 end up in the backport of Lenny. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] varchar vs. text + constraint/triggers was: Help request to improve function performance

2009-04-23 Thread Ivan Sergio Borgonovo
/example... doesn't make it clear) why it should be faster or less invasive? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] varchar vs. text + constraint/triggers was: Help request to improve function performance

2009-04-23 Thread Ivan Sergio Borgonovo
On Thu, 23 Apr 2009 12:00:30 +0200 Karsten Hilbert karsten.hilb...@gmx.net wrote: On Thu, Apr 23, 2009 at 11:33:34AM +0200, Ivan Sergio Borgonovo wrote: Karsten Hilbert karsten.hilb...@gmx.net wrote: On Thu, Apr 23, 2009 at 12:02:13AM +0100, Seref Arikan wrote: I have a set

Re: [GENERAL] backup getting larger and larger

2009-04-14 Thread Ivan Sergio Borgonovo
On Tue, 14 Apr 2009 13:26:24 -0700 Steve Crawford scrawf...@pinpointresearch.com wrote: Ivan Sergio Borgonovo wrote: I still have to investigate if the tables are getting really larger... but at a first guess there shouldn't be any good reason to see tables getting so large so fast... so I

[GENERAL] backup getting larger and larger

2009-04-14 Thread Ivan Sergio Borgonovo
? The only thing that should have been really changed is the number of concurrent connections during a backup. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http

Re: [GENERAL] PostgreSQL in the cloud now up on media.postgresql.org

2009-04-13 Thread Ivan Sergio Borgonovo
. Is there anything smaller? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] PostgreSQL in the cloud now up on media.postgresql.org

2009-04-13 Thread Ivan Sergio Borgonovo
month's is. Can vimeo movie be downloaded? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] database corruption

2009-04-09 Thread Ivan Sergio Borgonovo
of small files (even empty) somewhere? It happened to me when I was running a spider using curl and the spiders where not exiting properly when another process was killing them... -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general

[GENERAL] recovery after segmentation fault

2009-04-08 Thread Ivan Sergio Borgonovo
a backup? It was serving more than one DB and I assume that only one is causing problems. Can I skip just that one from recovery and start from backup? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] recovery after segmentation fault

2009-04-08 Thread Ivan Sergio Borgonovo
On Wed, 08 Apr 2009 10:59:54 -0400 Tom Lane t...@sss.pgh.pa.us wrote: Ivan Sergio Borgonovo m...@webthatworks.it writes: 2009-04-08 16:36:53 CEST LOG: startup process (PID 3176) was terminated by signal 11: Segmentation fault 2009-04-08 16:36:53 CEST LOG: aborting startup due to startup

Re: [GENERAL] Are there performance advantages in storing bulky field in separate table?

2009-04-08 Thread Ivan Sergio Borgonovo
4681.9% Richard Huxton 4321.8% Craig Ringer3381.4% Ivan Sergio Borgonovo 3141.3% I just wrote privately to Tom that I'm ashamed I ask so much and answer so few. But well I'm an exception ;) I'm the top of non-contributors. -- Ivan Sergio

Re: [GENERAL] recovery after segmentation fault

2009-04-08 Thread Ivan Sergio Borgonovo
doing it. [1] slow vacuum full and gin index update -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] media server (mp3 player) on postgresql

2009-04-06 Thread Ivan Sergio Borgonovo
to play it - several servers that will actually play the media thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] reducing IO and memory usage: sending the content of a table to multiple files

2009-04-03 Thread Ivan Sergio Borgonovo
On Fri, 3 Apr 2009 02:05:19 +0100 Sam Mason s...@samason.me.uk wrote: On Thu, Apr 02, 2009 at 09:48:33PM +0200, Ivan Sergio Borgonovo wrote: I didn't find any elegant example of cursor use in PHP... OK PHP is not the most elegant language around... but still any good exapmle someone could

[GENERAL] reducing IO and memory usage: sending the content of a table to multiple files

2009-04-02 Thread Ivan Sergio Borgonovo
verylargetable; --no where clause); vs. the \copy equivalent any way to avoid them? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql

Re: [GENERAL] reducing IO and memory usage: sending the content of a table to multiple files

2009-04-02 Thread Ivan Sergio Borgonovo
On Thu, 2 Apr 2009 17:27:55 +0100 Sam Mason s...@samason.me.uk wrote: On Thu, Apr 02, 2009 at 11:20:02AM +0200, Ivan Sergio Borgonovo wrote: This is the work-flow I've in mind: 1a) take out *all* data from a table in chunks (M record for each file, one big file?) (\copy??, from inside

Re: [GENERAL] Question about hosting and server grade

2009-03-26 Thread Ivan Sergio Borgonovo
of RAM. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] bash postgres

2009-03-23 Thread Ivan Sergio Borgonovo
can concatenate files...). echo select :a; | psql --set a=3 test ?column? -- 3 (1 row) of course in spite of piping your sql, you could put it into a file. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org

Re: [GENERAL] text column constraint, newbie question

2009-03-23 Thread Ivan Sergio Borgonovo
. Not really a security concern, but an early warning for some mistake. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- 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] text column constraint, newbie question

2009-03-23 Thread Ivan Sergio Borgonovo
in php. Still I wouldn't consider it a first source of slowdown. For making a difference in plan management you've to use another family of functions pg_prepare/pg_execute. I'm not an expert but not every time caching plans is what you'd like to do. -- Ivan Sergio Borgonovo http

Re: [GENERAL] text column constraint, newbie question

2009-03-23 Thread Ivan Sergio Borgonovo
- htmlentities is about formatting for web output - pg_escape_string is to prepare input for sql and avoiding sql injection - pg_query_params is a relative of pg_escape_string but somehow used differently -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing

[GENERAL] schema, view and role

2009-03-18 Thread Ivan Sergio Borgonovo
the correct result. If it gets interpreted when I create the view it should report an error since those tables don't exist in the public or group_role schema. -- Ivan Sergio Borgonovo http://www.webthatworks.it - Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] Is PGSQL enough safe for internet?

2009-03-18 Thread Ivan Sergio Borgonovo
. Someone may just close you out from your own home. Unless you're accessing the server from static IP and you can use white listing. -- Ivan Sergio Borgonovo http://www.webthatworks.it - Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription

<    1   2   3   4   5   6   >