Re: [GENERAL] count (DISTINCT expression [ , ... ] ) and documentation

2008-12-26 Thread Ivan Sergio Borgonovo
On Fri, 26 Dec 2008 16:23:52 +0100 "Pavel Stehule" wrote: > 2008/12/26 Ivan Sergio Borgonovo : > > On Fri, 26 Dec 2008 15:46:48 +0100 > > "Pavel Stehule" wrote: > > > >> count has only one argument, > > > > then what was changed bet

Re: [GENERAL] count (DISTINCT expression [ , ... ] ) and documentation

2008-12-26 Thread Ivan Sergio Borgonovo
On Fri, 26 Dec 2008 10:43:25 -0800 David Fetter wrote: > On Fri, Dec 26, 2008 at 03:34:33PM +0100, Ivan Sergio Borgonovo > wrote: > > I noticed that starting from 8.2 the documentation at > > http://www.postgresql.org/docs/8.2/interactive/sql-expressions.html > > sa

[GENERAL] WITH AS vs subselect was: count (DISTINCT expression [ , ... ] ) and documentation

2008-12-26 Thread Ivan Sergio Borgonovo
On Fri, 26 Dec 2008 12:04:48 -0800 David Fetter wrote: > On Fri, Dec 26, 2008 at 08:03:30PM +0100, Ivan Sergio Borgonovo > wrote: > > > > aggregate_name (DISTINCT expression [, expression] ) > > > In 8.4, you'll be able to do: > > > WITH d AS ( >

[GENERAL] subselect and count (DISTINCT expression [ , ... ] ) performances

2008-12-27 Thread Ivan Sergio Borgonovo
be spent on "distinct" where postgresql shouldn't suffer from its "count" implementation. But well still 300K rows to count on 1M aren't few. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) T

[GENERAL] refactoring: changing tables names

2009-01-09 Thread Ivan Sergio Borgonovo
in any significant slowdown accessing the table indirectly? Later I'll have to rename tables that have associated sequences, pk/fk and are referenced in functions etc... etc... Any good list of advices? Is there any tools that works with postgresql that can help me? thanks -- Ivan S

[GENERAL] limit and other joined tables

2009-01-13 Thread Ivan Sergio Borgonovo
on s.Aid=C.Cid; Can postgresql take advantage of the LIMIT even if it is in the outer select? -- 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] Polymorphic "setof record" function?

2009-01-14 Thread Ivan Sergio Borgonovo
s, outside of the anyarray tricks. I still haven't got the time to use them, but wouldn't refcursor help? Unfortunately I didn't find very enlightening examples of refcursors use around. -- 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

HTML email (was: Re: [GENERAL] Vacuum and Reindex hangs)

2009-01-15 Thread Ivan Sergio Borgonovo
w.webthatworks.it/d1/node/page/are_geeks_rich_media_impaired_or_why_html_emails_are_evil -- 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] left join with smaller table or index on (XXX is not null) to avoid upsert

2009-01-18 Thread Ivan Sergio Borgonovo
f discounts easier, but I was wondering if it makes retrieval of Products and Prices slower. Having a larger table that is being updated at a rate of 5% to 10% a day may make it a bit "fragmented". Advices on the overall problem of discount overlap management will be appreciated t

[GENERAL] too smart update (was: left join with smaller table or index on (XXX is not null) to avoid upsert)

2009-01-19 Thread Ivan Sergio Borgonovo
e same field again to 4. With the trigger some But what should be the expected/standard behaviour? It seems that unless an update should fire triggers just if columns get updated... things will start to be a bit non-deterministic. You'll have to take into account rules etc... eg. FOUND is set tru

Re: [GENERAL] left join with smaller table or index on (XXX is not null) to avoid upsert

2009-01-19 Thread Ivan Sergio Borgonovo
EAST. Since few products will get out of stock concurrently I'll have to regenerate the entries just for those product... with a rule or a trigger. I'm still looking for advices for an overall better strategy or just to lower the numbers of actual tests to see if this stuff is feasible in a decent time. -- 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] How can I look at a recursive table dependency tree?

2009-01-19 Thread Ivan Sergio Borgonovo
to watch all dependencies recursively without > > doing a drop? > BEGIN; > DROP CASCADE... > -- check things > ROLLBACK; Isn't it going to be a pretty expensive way to see? Is the default log level enough to take note of the things that will be touched? (including eg

Re: [GENERAL] How can I look at a recursive table dependency tree?

2009-01-19 Thread Ivan Sergio Borgonovo
On Mon, 19 Jan 2009 14:41:12 + Richard Huxton wrote: > Ivan Sergio Borgonovo wrote: > > On Mon, 19 Jan 2009 14:19:51 + > > Richard Huxton wrote: > > > >> Igor Katson wrote: > >>> Is there a way to watch all dependencies recursively without >

Re: [GENERAL] left join with smaller table or index on (XXX is not null) to avoid upsert

2009-01-19 Thread Ivan Sergio Borgonovo
On Sun, 18 Jan 2009 22:12:07 +0100 Ivan Sergio Borgonovo wrote: > I've to apply a discounts to products. > > For each promotion I've a query that select a list of products and > should apply a discount. > > Queries may have intersections, in these intersections the

[GENERAL] very long update gin index troubles back?

2009-01-22 Thread Ivan Sergio Borgonovo
nd create. Is there anything wrong in the above to make this update so slow on a 2x Xeon 3.2GHz 4GbRAM and a RAID1 [sic] I know it is slow on write. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] very long update gin index troubles back?

2009-01-24 Thread Ivan Sergio Borgonovo
ve a gin index on agg. No matter if I drop the trigger that update agg content and the fact that I'm just updating d, postgresql will update the index? Right? -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] very long update gin index troubles back?

2009-01-28 Thread Ivan Sergio Borgonovo
version should be index as old one. Does that mean that it could be a good choice to place the tsvector in another table? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: ht

Re: [GENERAL] very long update gin index troubles back?

2009-01-29 Thread Ivan Sergio Borgonovo
On Wed, 28 Jan 2009 23:38:47 +0300 (MSK) Oleg Bartunov wrote: > On Wed, 28 Jan 2009, Ivan Sergio Borgonovo wrote: > > On Tue, 27 Jan 2009 20:45:53 +0300 > > Teodor Sigaev wrote: > >>> No matter if I drop the trigger that update agg content and the > >

[GENERAL] ssl to more than one server

2009-01-29 Thread Ivan Sergio Borgonovo
e? 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] ssl to more than one server

2009-01-29 Thread Ivan Sergio Borgonovo
On Thu, 29 Jan 2009 12:53:20 -0500 Tom Lane wrote: > Ivan Sergio Borgonovo writes: > > I succeded to connect to one postgresql server with ssl. > > Now it's the time of the second... but postgresql clients (pgsql) > > just look at ~/.postgresql/postgresql.(key|

Re: [GENERAL] ssl to more than one server

2009-01-30 Thread Ivan Sergio Borgonovo
On Thu, 29 Jan 2009 21:56:05 +0100 Ivan Sergio Borgonovo wrote: > On Thu, 29 Jan 2009 12:53:20 -0500 > Tom Lane wrote: > > > Ivan Sergio Borgonovo writes: > > > I succeded to connect to one postgresql server with ssl. > > > Now it's the time o

Re: [GENERAL] Need some help converting MS SQL stored proc to postgres function

2009-02-01 Thread Ivan Sergio Borgonovo
able like [1] and create table as that seems the most promising for your needs http://www.postgresql.org/docs/8.3/interactive/sql-createtableas.html not everything is yet as we dream it, but there is still a lot of syntactic sugar available to exploit. -- Ivan Sergio Borgonovo http://www.webthatworks.

[GENERAL] minimal open source e-commerce software for pg

2009-02-06 Thread Ivan Sergio Borgonovo
has to be a quick and dirty job and the actual requirement are just the above. 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] [findings] minimal open source e-commerce software for pg

2009-02-08 Thread Ivan Sergio Borgonovo
On Sat, 7 Feb 2009 01:43:10 +0100 Ivan Sergio Borgonovo wrote: > I need to build up a minimal e-commerce website on a host that is > already running postgresql. > > Requirement is minimal. Usual configurable pretty standard > couple of paying/shipping system and popular enough

Re: [GENERAL] [findings] minimal open source e-commerce software for pg

2009-02-08 Thread Ivan Sergio Borgonovo
.apache.org/ and actually I used it to learn something already... but well neither this fit the bill. 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.o

Re: [GENERAL] TSearch queries with multiple languages

2009-02-13 Thread Ivan Sergio Borgonovo
m of good programmers ;) Not only Oleg write very valuable code, but he really cares about his users base. I'm still sorry I haven't been able to track down the origin of a very slow gin index creation I reported months ago. -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pg

Re: [GENERAL] [findings] minimal open source e-commerce software for pg

2009-02-13 Thread Ivan Sergio Borgonovo
#x27;t dare to publish it till it will be clean enough I won't see a too fast improvement I can't handle on the project that originated all this. So, sooner or later there will be one more Free e-commerce project based on postgresql around. -- Ivan Sergio Borgonovo http://www.webtha

[GENERAL] idle DB and resources

2009-02-16 Thread Ivan Sergio Borgonovo
move it on another box or leave it there since once the editors job will be finished the DB will be much smaller. Meanwhile we will have 2 large DB, one of them being nearly idle. Is the idle DB going to have any impact on performance? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it

[GENERAL] transfering tables into other schema

2009-02-16 Thread Ivan Sergio Borgonovo
rd one day down. Of course running a well crafted set of SQL statement may do... But sed and plain text backup may do as well. Any other options? Any advices on how to procede once an option is the clear winner? thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it -- Sent via pgsql-general

Re: [GENERAL] transfering tables into other schema

2009-02-17 Thread Ivan Sergio Borgonovo
ly... what else? OK BEFORE: create table x ( xid primary key, ... ); create table y ( xid int referencex x (xid), ... ); -- following in application select x.a, y.b from x join y on x.xid=y.xid; -- following in the DB create or replace function xy() as $$ begin select x.a, y.b from x join y on x.xid

Re: [GENERAL] transfering tables into other schema

2009-02-17 Thread Ivan Sergio Borgonovo
On Tue, 17 Feb 2009 17:36:32 + Sam Mason wrote: > On Tue, Feb 17, 2009 at 06:20:54PM +0100, Ivan Sergio Borgonovo > wrote: > > I can't get how this really work. > > You're saying that constraint, fk/pk relationships will be > > preserved automaticall

Re: [GENERAL] transfering tables into other schema

2009-02-18 Thread Ivan Sergio Borgonovo
move a table in a new schema? The manual says: Associated indexes, constraints, and sequences owned by table columns are moved as well. But at my eyes I still can grasp the extent of the change. So I wouldn't like to be bitten by something I didn't take into account. -- Ivan Sergio Bor

Re: [GENERAL] where to divide application and database

2009-02-20 Thread Ivan Sergio Borgonovo
pg types and the application language/library types it becomes easier to keep in sync those checks otherwise it is a really boring job and DB checks becomes just one more security net to maintain. In some places you REALLY appreciate/need that layer... sometimes it just get in the way. --

Re: [GENERAL] where to divide application and database

2009-02-25 Thread Ivan Sergio Borgonovo
On Sat, 21 Feb 2009 15:02:55 -0800 Ron Mayer wrote: > Ivan Sergio Borgonovo wrote: > > I was wondering if "checks" may have an impact > > on performances and if pg does some optimisation over them. > Are you suggesting thee would be a positive or negative impact

Re: [GENERAL] where to divide application and database

2009-02-25 Thread Ivan Sergio Borgonovo
On Fri, 20 Feb 2009 20:45:20 + Sam Mason wrote: > On Fri, Feb 20, 2009 at 04:51:33PM +0100, Ivan Sergio Borgonovo > wrote: > > What I find a bit annoying is politely deal with the error once > > it is reported back to the application *and* connection and > > *ba

[GENERAL] grant everything on everything and then revoke

2009-03-03 Thread Ivan Sergio Borgonovo
h a few exception so it is easier to revoke than to grant. Any advice even with completely different approach? 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.pos

Re: [GENERAL] grant everything on everything and then revoke

2009-03-03 Thread Ivan Sergio Borgonovo
On Tue, 03 Mar 2009 09:29:17 -0800 John R Pierce wrote: > Ivan Sergio Borgonovo wrote: > > I'd like to have different users mainly to have a different > > search schema path. > > Things may evolve so this is not going to be the only reason to > > have more than o

[GENERAL] merging 2 databases

2009-03-05 Thread Ivan Sergio Borgonovo
till working in particular) or if there are other approaches. -- 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] What is the difference?

2009-03-06 Thread Ivan Sergio Borgonovo
a15c+fb4e7219ab898ce+b08586cb81059f9','+',''',''') > || E'\'' and '95b5a221aeba15c','fb4e7219ab898ce','b08586cb81059f9'? You assume that the statement is interpreted twice. The first is comparing yo

[GENERAL] in role, ownership and permissions was: grant everything on everything and then revoke

2009-03-09 Thread Ivan Sergio Borgonovo
On Tue, 03 Mar 2009 09:29:17 -0800 John R Pierce wrote: > Ivan Sergio Borgonovo wrote: > > I'd like to have different users mainly to have a different > > search schema path. > > Things may evolve so this is not going to be the only reason to > > have more than

[GENERAL] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Ivan Sergio Borgonovo
commerce_baskets ( sid int references sessions (sid) on delete set null, ... ); I'm on PostgreSQL 8.3.6 (Debian Lenny). 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] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Ivan Sergio Borgonovo
t;group" permissions assigned to the single users -- 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] bug?: permission denied for schema on "on delete set null"

2009-03-10 Thread Ivan Sergio Borgonovo
On Tue, 10 Mar 2009 13:12:03 -0400 Tom Lane wrote: > Ivan Sergio Borgonovo writes: > > I get a > > Query failed: ERROR: permission denied for schema user_test > > CONTEXT: SQL statement "UPDATE ONLY > > "user_test"."shop_commerce_baskets" SET

[GENERAL] schema, view and role

2009-03-18 Thread Ivan Sergio Borgonovo
I log in with one of the userN_role I should see 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 m

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

2009-03-18 Thread Ivan Sergio Borgonovo
n't recommend this approach. 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.o

Re: [GENERAL] bash & postgres

2009-03-23 Thread Ivan Sergio Borgonovo
another technique that's not exactly embedding but makes the sql file easily executable from other shells to and easier to maintain (eg. you don't lose syntax highlight, you don't need to make wide use of x bit, you can concatenate files...). echo "select :a;" | psql --set

Re: [GENERAL] text column constraint, newbie question

2009-03-23 Thread Ivan Sergio Borgonovo
ers and signal an error if you pass float where integers are expected... but I'm not sure. 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
up a string concatenating and escaping 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

Re: [GENERAL] text column constraint, newbie question

2009-03-23 Thread Ivan Sergio Borgonovo
y of data that get stored in the db - 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

Re: [GENERAL] Question about hosting and server grade

2009-03-26 Thread Ivan Sergio Borgonovo
z. It's on RAID5 (not my choice) on a decent controller and has 4Gb 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

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

2009-04-02 Thread Ivan Sergio Borgonovo
lect a,b,c from 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.postgresq

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 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

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 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 > > e

[GENERAL] media server (mp3 player) on postgresql

2009-04-06 Thread Ivan Sergio Borgonovo
lect media and decide on which box 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

[GENERAL] recovery after segmentation fault

2009-04-08 Thread Ivan Sergio Borgonovo
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 to

Re: [GENERAL] recovery after segmentation fault

2009-04-08 Thread Ivan Sergio Borgonovo
On Wed, 08 Apr 2009 10:59:54 -0400 Tom Lane wrote: > Ivan Sergio Borgonovo 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 process f

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

2009-04-08 Thread Ivan Sergio Borgonovo
Alvaro Herrera 5212.2% > Joshua Drake4681.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

Re: [GENERAL] recovery after segmentation fault

2009-04-08 Thread Ivan Sergio Borgonovo
stick with some rituals I can live with it. Avoid vacuum full when there is load and restart the server before 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

Re: [GENERAL] database corruption

2009-04-09 Thread Ivan Sergio Borgonovo
? A lot 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-gene

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

2009-04-13 Thread Ivan Sergio Borgonovo
ere 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
e people doing the actual work will correct me if I'm wrong, but > I believe it will be up on vimeo.com fairly soon as last 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

[GENERAL] backup getting larger and larger

2009-04-14 Thread Ivan Sergio Borgonovo
cords? 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:

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 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...

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

2009-04-23 Thread Ivan Sergio Borgonovo
ovide the same checking of varchar and explain (if the code/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 wrote: > On Thu, Apr 23, 2009 at 11:33:34AM +0200, Ivan Sergio Borgonovo > wrote: > > > Karsten Hilbert wrote: > > > > > On Thu, Apr 23, 2009 at 12:02:13AM +0100, Seref Arikan wrote: > > > > > >

Re: [GENERAL] Selling an 8.1 to 8.3 upgrade

2009-04-24 Thread Ivan Sergio Borgonovo
and I think it will be an enough cool reason to switch not only DB 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

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

2009-05-04 Thread Ivan Sergio Borgonovo
explicitly all the columns 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 subscript

[GENERAL] Excel and pg

2009-05-17 Thread Ivan Sergio Borgonovo
r debugging that I'm not sure I can find for Linux or can be as easily installed as with Stack Builder: - debugger - Tuning 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

Re: [GENERAL] Excel and pg

2009-05-18 Thread Ivan Sergio Borgonovo
On Mon, 18 May 2009 09:14:41 +0800 Craig Ringer 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 >

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

2009-05-20 Thread Ivan Sergio Borgonovo
o have some kind of replication solution that will somehow let you do "hot upgrades". Anyway this shouldn't be your concern if you're dealing with a SOHO. Coming from a web background but where transactions and some "advanced" features are essential to survival

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 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.

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

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

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

2009-05-20 Thread Ivan Sergio Borgonovo
an howto for installing edb in Debian. Could it be packaged for Debian if there were resources? > It's pitched 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] Aggregate Function to return most common value for a column

2009-05-22 Thread Ivan Sergio Borgonovo
t; I don't want to use PL/Perl to avoid 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 Borg

[GENERAL] psql Windows and variables

2009-05-23 Thread Ivan Sergio Borgonovo
.sql \copy 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 (pgs

[GENERAL] Excel and postgresql functions

2009-05-26 Thread Ivan Sergio Borgonovo
someone confirm 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 -

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 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 su

[GENERAL] graphs in PostgreSQL

2005-10-13 Thread Ivan Yu. Zolotukhin
e all path lengths between all vertices pairs (roadmap), that is very expensive to maintain. I would appreciate any suggestions... -- Sincerely, Ivan Zolotukhin ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[GENERAL] exploiting features of pg to obtain polymorphism maintaining ref. integrity

2006-10-06 Thread Ivan Sergio Borgonovo
Is there any good documentation, example, tutorial, pamphlet, discussion... to exploit pg features to obtain "polymorphic" behavior without renouncing to referential integrity? Inheritance seems *just* promising. Any methodical a approach to the problem in pg context? -- I

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-08 Thread Ivan Sergio Borgonovo
ew light and I'll think if I can exploit it for my tasks. I wrote "exploiting [unnamed] features" cos I still don't know pg enough and cos I was hoping the list came up with something creative as the use of schema that maybe wouldn't come up if I explicit

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-08 Thread Ivan Sergio Borgonovo
On Sun, 8 Oct 2006 14:09:53 +0200 Karsten Hilbert <[EMAIL PROTECTED]> wrote: > On Fri, Oct 06, 2006 at 11:09:29PM +0200, Ivan Sergio Borgonovo > wrote: > > > Is there any good documentation, example, tutorial, pamphlet, > > discussion... to exploit pg feat

Re: [GENERAL] Determining caller of a function (due to a cascaded

2006-10-09 Thread Ivan Sergio Borgonovo
d up in adding metadata to tables and "simulating" triggers with a dynamically generated sp. So I could define "deferred" referential integrity nearby table definitions as I was used with pk/fk triggers. -- Ivan Sergio Borgonovo http://www.webthatworks.it --

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-12 Thread Ivan Sergio Borgonovo
Resending since it definitively seems it has been lost in outer spaces. Sorry for duplicates if any. On Sun, 8 Oct 2006 14:09:53 +0200 Karsten Hilbert <[EMAIL PROTECTED]> wrote: > On Fri, Oct 06, 2006 at 11:09:29PM +0200, Ivan Sergio Borgonovo > wrote: > > > Is there a

Re: [GENERAL] exploiting features of pg to obtain polymorphism

2006-10-16 Thread Ivan Sergio Borgonovo
On Fri, 13 Oct 2006 16:37:42 +0200 Karsten Hilbert <[EMAIL PROTECTED]> wrote: > On Thu, Oct 12, 2006 at 04:40:32PM +0200, Ivan Sergio Borgonovo > wrote: > > > Anyway it doesn't solve the problem of having lists that > > can contain different elements with

Re: [GENERAL] more anti-postgresql FUD

2006-10-16 Thread Ivan Sergio Borgonovo
eep transactions open across pages? -- Ivan Sergio Borgonovo http://www.webthatworks.it ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] what fired a trigger

2006-09-05 Thread Ivan Sergio Borgonovo
references where idUser=37; should delete all row in linked tables. the above trigger doesn't work. I've tried to understand if there is a way to exploit TG_ARGV[] & Co. but I didn't understand even how to use it. BTW postgres is 7.4.13 thx -- Ivan Sergio Borgonovo http:/

Re: [GENERAL] constraint -- one or the other column not null

2006-09-06 Thread Ivan Sergio Borgonovo
$2) or (not $1 and $2); end; ' language 'sql'; check (xor(is null a, is null b)) sort of Anyway if one of the 2 has to be null, why don't you use a boolean column + an int? create table f ( ab int, aorb boolean, ); -- Ivan Sergio Borgonovo http://www.webthatworks.it ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] what fired a trigger

2006-09-06 Thread Ivan Sergio Borgonovo
On Tue, 5 Sep 2006 22:53:14 +0200 Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote: > Hi, > > The most general problem that may be a design problem (and I'm not > asking to do my homework even if well, you may still help ) is > I've a "temporary relation&

[GENERAL] references/tutorial/tricks on dynamic generation of sql (& plpgsql functions) editing/coding

2006-09-11 Thread Ivan Sergio Borgonovo
return null; end; '' language plpgsql; end; ' language plpgsql; thx -- Ivan Sergio Borgonovo http://www.webthatworks.it ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] references/tutorial/tricks on dynamic generation of

2006-09-11 Thread Ivan Sergio Borgonovo
ld already be in etch (that should be ready before I'll finish my pgsql project). Anyway I'm quite conservative in administrative related stuff... since I'm not a sysadmin and I don't want to rely on anything that gives me a feeling of not being under my control. > On Sep 11,

Re: [GENERAL] Need Help w/ Timestamps

2006-09-11 Thread Ivan Sergio Borgonovo
:25:42.332 >Linux Timestamp: 2006-09-09 21:25:06.947069 > > Is there any way (even somehow through the ODBC driver) to restrict > the timestamp accuracy to "M$ Win" accuracy? http://www.postgresql.org/docs/7.4/static/functions-datetime.html#FUNCTIONS-DATETIME-

Re: [GENERAL] initdb: invalid locale name "sv_SE.ISO-8859-1"

2006-09-12 Thread Ivan Sergio Borgonovo
ales. > try man locale-gen I've bad memories of how to tweak with ubuntu's locales. Differently from Debian doing dpkg-reconfigure -plow locales won't help You had to do it manually. here are the explanation on how I did it http://www.webthatworks.it/drupal/2006/09/general/generati

[GENERAL] composite types

2004-04-20 Thread Ivan Sergio Borgonovo
I'd like to compute some "row like" results and return them from a function (and pass the result to PHP[*]). Well I've read about composite type but all the references I've seen are about coding in C. That's not the way I'd like to follow by now. I was expecting to declare composite types in plps

Re: [GENERAL] nested elseif woes

2004-05-10 Thread Ivan Sergio Borgonovo
On Mon, 10 May 2004 13:56:39 -0500 (EST) Kris Jurka <[EMAIL PROTECTED]> wrote: > On Mon, 10 May 2004, Ivan Sergio Borgonovo wrote: > > > Now let's come to the problem: > > > > create or replace function testa( ) > > returns char(32) as > > &#x

[GENERAL] passing strings to functions

2004-05-10 Thread Ivan Sergio Borgonovo
I can't understand how to pass strings to functions. create type tSession as ( SessionCode char(32), SessionID char(32), UserIDI integer, SessionN integer ); create or replace function GetSessionCode( char(32), smallint, boolean, varchar(128) ) returns tSession as ' declare ne

[GENERAL] composite type and assignment in plpgsql

2004-04-27 Thread Ivan Sergio Borgonovo
what's wrong with this? create type tSession as ( ty_found boolean, ty_Session char(32) ); create or replace function GetSessionID( integer ) returns tSession as ' declare thisSession tSession; begin --HERE!!! thisSession := ( ''t'', md5( now( ) || rand( )

Re: [GENERAL] composite type and assignment in plpgsql

2004-04-27 Thread Ivan Sergio Borgonovo
On Tue, 27 Apr 2004 10:12:13 -0700 Ron St-Pierre <[EMAIL PROTECTED]> wrote: > Ivan Sergio Borgonovo wrote: > > --HERE!!! > > thisSession := ( ''t'', md5( now( ) || rand( ) ) ); > > > - md5 takes TEXT as an argument, not a numeric type

[GENERAL] grant wildcard

2004-05-19 Thread Ivan Sergio Borgonovo
I'd like to do something like grant all on * to username; on a whole database, where * are tables, sequences etc... is there any shortcut? thx ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "u

[GENERAL] Emigrar SqlServer a Posgres

2007-08-17 Thread IVAN JOSE RIVERA URIARTE
Bueno me pueden dar una mano para emigrar una bases de dato de sql a posgres. Slds Ivan Rivera Tel#(505)8074075 Managua, Nicaragua __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http

[GENERAL] utf8 issues

2015-02-25 Thread Felix Ivan Romero Rodríguez
I've got the followin issue with postgres 9.3, trying to restore a backup from sql script: "invalid byte sequence for encoding “UTF8″: 0xc2de" how can i solve it?

<    2   3   4   5   6   7   8   >