[GENERAL] Mogwai ER-DesignerNG 1.7-SNAPSHOT available

2009-06-10 Thread Mirko Sertic
Mogwai ERDesigner NG is a Java based entity releationship design
tool. It includes the following key features:

* is based on Java and can be run on Windows and Unix systems
* has a powerful WYSIWYG for physical database design
* handles tables, relations, indexes and comments
* supports a central repository for all models ( Model Repository )
* supports subject areas
* supports domains
* supports MySQL, Oracle, DB2(experimental), Microsoft SQLServer,
PostgreSQL and H2
* creates the SQL DDL statements for schema creation
* has an integrated schema version control system
* can generate schema migration scripts for every change
* stores the database definition as XML files for further processing
* can export the database schema as GIF, BMP, JPEG or SVG files
* has an integrated reverse engineering module for existing schemas
* has a build in schema compare feature
* can generate schema documentation as PDF, HTML, RTF and other
formats
* supports schema conversion between different dialects
* it is based on GPL license
* support is available by authors and newsgroups

Also, ERDesignerNG is available as a SQuirreL SQL and as a NetBeans
Plugin. There is also a new feature for OpenXava application skeleton
generation for the loaded database model.

The 1.7-SNAPSHOT release includes the following changes:

* Improved UI response during long time tasks like reverse engineering
and complete compare
* Added support for automatic IZPack installers
* Improved handling of recently used files and last database
connections
* Added support for H2 (Thanks to Thomas Breitkreuz)
* Improved complete compare functionality for indexes
* If there is a duplicate relation name during reverse engineering, a
new unique name is generated
* Added support to Export model to OpenXava
* Bug Fixing 2513135 [ERDesignerNG] Oracle complete compare fails with
date colum
* Bug Fixing 2675526 [ERDesignerNG] Generation of migration script not
possible
* Bug Fixing 2615849 [ERDesignerNG] Wrong dialect is used to
communicate with rep
* Bug Fixing 2504309 [ERDesignerNG] ERdesigner 1.6: problems on exit
* Bug Fixing 2675509 [ERDesignerNG] Oracle RE of indexes fails
* Bug Fixing 2616079 [ERDesignerNG] OnUpdate=Cascade not persisted
* Bug Fixing 2675551 [ERDesignerNG] DB model comparison does not work
* Bug Fixing 2675559 [ERDesignerNG] Clipping labels
* Bug Fixing 2686597 [ERDesignerNG] Used domains are deletable
* Bug Fixing 2686630 [ERDesignerNG] Default value not setable
* Bug Fixing 2686882 [ERDesignerNG] Domains not initialized
* Bug Fixing 2686627 [ERDesignerNG] 'NOT NULL' ist not generated
* Bug Fixing 2675535 [ERDesignerNG] Not possible to edit relations in
subject area
* Bug Fixing 2292224 [ERDesignerNG] Comments cannot be added to
Subject Areas
* Bug Fixing 2735418 [ERDesignerNG] Table content is clipped
* Bug Fixing 2735413 [ERDesignerNG] German umlauts corrupted
* Implemented FR 2581994 [ERDesignerNG] Support for function based
indexes
* Implemented FR 1905364 [ERDesignerNG] Add support for views ( early
alpha )
* Implemented FR 2675641 [ERDesignerNG] ESC Default buttons for
dialogs
* Implemented FR 2686903 [ERDesignerNG] Store main window size
* Implemented FR 2675574 [ERDesignerNG] Resizable dialog windows
* Implemented FR 1889667 [ERDesignerNG] Allow editing of Edge
Waypoints ( right click + ALT )
* Implemented FR 2686546 [ERDesignerNG] Save vs. Save As
* Implemented FR 2169348 [ERDesignerNG] Allow switching of database/
dialect to generated mult. ddls
* Implemented FR 2690714 [ERDesignerNG] Add relation constraint
RESTRICT
* Implemented FR 2714523 [ERDesignerNG] prompt for password before db
operation
* Implemented FR 2504332 [ERDesignerNG] better comments display
* Implemented FR 2711884 [ERDesignerNG] Add support for hidden
relationships
* Implemented FR 2686547 [ERDesignerNG] Export to HTML
* Implemented FR 2220184 [ERDesignerNG] Make documentation available
as JavaHelp
* Implemented FR 2690710 [ERDesignerNG] Start script should switch to
installation directory
* Implemented FR 2725418 [ERDesignerNG] Add support for custom types

Feel free to visit the projects website at
http://mogwai.sourceforge.net for more details.

Regards

Mirko Sertic
Project admin
 


-- 
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] Postgres's Performance degrades after heavy db operation

2009-06-10 Thread Preeti Khurana
I checked the release notes till 8.1.17, but could not come across any such 
issue which leads to db performance degradation after doing heavy db 
operations. AutoVacuum is also enabled parallel.



-Original Message-
From: Grzegorz Jaśkiewicz [mailto:gryz...@gmail.com] 
Sent: Monday, June 08, 2009 9:59 PM
To: Preeti Khura
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Postgres's Performance degrades after heavy db operation

oh, and take the time to upgrade to newest 8.1.X as the matter of urgency!.

-- 
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] Postgres's Performance degrades after heavy db operation

2009-06-10 Thread Scott Marlowe
2009/6/10 Preeti Khurana preeti.khur...@globallogic.com:
 I checked the release notes till 8.1.17, but could not come across any such 
 issue which leads to db performance degradation after doing heavy db 
 operations. AutoVacuum is also enabled parallel.

Note that you might be much better served moving to 8.3 if HOT can
help with your usage patterns.  A database I work with dropped in load
by about 1/2 (maybe a bit more) just by switching to 8.3.  But it's
not magic pixie dust and if your usage patterns preclude HOT helping
(i.e. updating every row in a table) then I don't expect any miracles.

-- 
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] Postgres's Performance degrades after heavy db operation

2009-06-10 Thread Bill Moran
In response to Preeti Khurana preeti.khur...@globallogic.com:

 I checked the release notes till 8.1.17, but could not come across any such 
 issue which leads to db performance degradation after doing heavy db 
 operations.

I don't think that was his point.  I expect it was something more along the
lines of crashing bugs and data corruption bugs that you might want to 
have fixed.

 AutoVacuum is also enabled parallel.

Which means virtually nothing if we're trying to help you tune.  What are
your autovacuum settings?  Simply turning it on is not always enough (if
it were, there wouldn't be a need to have other settings, now would there)

And I'll reiterate something that was said on this thread earlier ... it's
likely that autovacuum isn't going to be enough for your usage pattern.

Have you posted the output of VACUUM VERBOSE yet?

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

-- 
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] limit table to one row

2009-06-10 Thread Jasen Betts
On 2009-06-09, Grzegorz Jaśkiewicz gryz...@gmail.com wrote:
 2009/6/9 Brandon Metcalf bran...@geronimoalloys.com:


 I'm not sure I follow how this solves the problem.

 Well, surely if you just need one row, you need single value per key.
 And that's the, imo , better solution to that problem, than limiting
 number of rows.

not really, if different keys have different types of values
associated.

one application I work with has a config table with atleast text, integer,
interval, and boolean values.




 -- 
 GJ



-- 
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] Upgrade from Postgres 8.2.4 to 8.3.5

2009-06-10 Thread Nykolyn, Andrew P (AS)
Nykolyn, Andrew P (AS) andrew.nyko...@ngc.com writes:
 I have successfully installed 8.3.5 as a fresh install on a Redhat 4.5

 machine.  Now I try to upgrade another Redhat 4.5 machine with an 
 existing 8.2.4 install and the make check fails all tests.  When I 
 look at the results file for each type being tested I see the same 
 error indicating that there is an undefined symbol:
 pg_valid_server_encoding_id and the test does not get run.  Any ideas 
 on what I might be missing or have to change? Thanks much.

Sounds like you are trying to use an 8.3 client program with an 8.2
version of libpq.so.

regards, tom lane

Why would the new install of 8.3.5 be using an 8.2 version of libpq.so
and how could I insure using the correct or 8.3 version of libpq.so for
the install?  Thanks.

Andy Nykolyn

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Average connections

2009-06-10 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all

I've googled for an answer but couldn't find one.
Is there anyway to monitor the average connections to a database?

Thank you in advance for any insights.

BR,

- --
Pedro Doria Meunier
GSM: +351 96 17 20 188
Skype: pdoriam
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFKL4ph2FH5GXCfxAsRAqOBAJwOJ2H4FVKAuIMxFtWasZpdI0cdggCgv2qM
5+JF4AV8VBobs1lVqeIQw9o=
=Am3y
-END PGP SIGNATURE-


-- 
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] Average connections

2009-06-10 Thread Bill Moran
In response to Pedro Doria Meunier pdo...@netmadeira.com:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi all
 
 I've googled for an answer but couldn't find one.
 Is there anyway to monitor the average connections to a database?
 
 Thank you in advance for any insights.

The pg_stat_activity table holds 1 row for each connection with information
on what that connection is doing.

It wouldn't be very difficult to write a passthrough script for something
like MRTG to graph this data.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

-- 
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] Upgrade from Postgres 8.2.4 to 8.3.5

2009-06-10 Thread Tom Lane
Nykolyn, Andrew P (AS) andrew.nyko...@ngc.com writes:
 Sounds like you are trying to use an 8.3 client program with an 8.2
 version of libpq.so.

 Why would the new install of 8.3.5 be using an 8.2 version of libpq.so

It's the same major version number, ie libpq.so.5, so if you'd failed to
replace 8.2 with 8.3 then the clients would try to use the 8.2 version.
Which would work fine for 8.2 clients and not so much for 8.3 clients,
because the 8.3 version exports additional functions.

regards, tom lane

-- 
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] Average connections

2009-06-10 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thank you Bill for your tip.

As far as the table's name is concerned the only one I can find is
'pg_statistic' (under pg_catalog). I'm using PGSQL 8.2.9 on x86_64.

BR,

Pedro Doria Meunier
GSM: +351 96 17 20 188
Skype: pdoriam
 



Bill Moran wrote:
 In response to Pedro Doria Meunier pdo...@netmadeira.com:

 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1

 Hi all

 I've googled for an answer but couldn't find one. Is there anyway
 to monitor the average connections to a database?

 Thank you in advance for any insights.

 The pg_stat_activity table holds 1 row for each connection with
 information on what that connection is doing.

 It wouldn't be very difficult to write a passthrough script for
 something like MRTG to graph this data.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFKL8ND2FH5GXCfxAsRAu/XAJ43UGqlzv5gfzg1YgECbhvL2MaPzwCdEnt3
GfewITsorV/t7cfpq3WxVqM=
=84cI
-END PGP SIGNATURE-


-- 
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] Average connections

2009-06-10 Thread Brad Nicholson
On Wed, 2009-06-10 at 15:29 +0100, Pedro Doria Meunier wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Thank you Bill for your tip.
 
 As far as the table's name is concerned the only one I can find is
 'pg_statistic' (under pg_catalog). I'm using PGSQL 8.2.9 on x86_64.
 
 BR,

http://www.postgresql.org/docs/8.2/interactive/monitoring-stats.html#MONITORING-STATS-VIEWS-TABLE

pg_stat_database also has the number of active server processes
connected to a database.

 
 
 Bill Moran wrote:
  In response to Pedro Doria Meunier pdo...@netmadeira.com:
 
  -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
 
  Hi all
 
  I've googled for an answer but couldn't find one. Is there anyway
  to monitor the average connections to a database?
 
  Thank you in advance for any insights.
 
  The pg_stat_activity table holds 1 row for each connection with
  information on what that connection is doing.
 
  It wouldn't be very difficult to write a passthrough script for
  something like MRTG to graph this data.
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (GNU/Linux)
 Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
 
 iD8DBQFKL8ND2FH5GXCfxAsRAu/XAJ43UGqlzv5gfzg1YgECbhvL2MaPzwCdEnt3
 GfewITsorV/t7cfpq3WxVqM=
 =84cI
 -END PGP SIGNATURE-
 
 
-- 
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.



-- 
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] Average connections

2009-06-10 Thread Bill Moran
In response to Pedro Doria Meunier pdo...@netmadeira.com:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Thank you Bill for your tip.
 
 As far as the table's name is concerned the only one I can find is
 'pg_statistic' (under pg_catalog). I'm using PGSQL 8.2.9 on x86_64.

Can't imagine why you're not seeing it.  It existed in 8.2, and I don't
know of any config setting that would make it not show up.

 Bill Moran wrote:
  In response to Pedro Doria Meunier pdo...@netmadeira.com:
 
  -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
 
  Hi all
 
  I've googled for an answer but couldn't find one. Is there anyway
  to monitor the average connections to a database?
 
  Thank you in advance for any insights.
 
  The pg_stat_activity table holds 1 row for each connection with
  information on what that connection is doing.
 
  It wouldn't be very difficult to write a passthrough script for
  something like MRTG to graph this data.
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (GNU/Linux)
 Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
 
 iD8DBQFKL8ND2FH5GXCfxAsRAu/XAJ43UGqlzv5gfzg1YgECbhvL2MaPzwCdEnt3
 GfewITsorV/t7cfpq3WxVqM=
 =84cI
 -END PGP SIGNATURE-
 


-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] fulltext search udf

2009-06-10 Thread Andreas Wenk

Hi everybody,

altough I know that the way over a Trigger is preferred, I can't see what is wrong in my 
function. It must be an escaping error:


CREATE OR REPLACE FUNCTION 
user_insert_vector_data(text,text,text,numeric,numeric,numeric,text)

RETURNS void AS
$$
DECLARE
art_nr ALIAS for $1;
bezeichnung ALIAS FOR $2;
beschreibung ALIAS FOR $3;
preis ALIAS FOR $4;
steuersatz ALIAS FOR $5;
aktionspreis ALIAS FOR $6;
stichworte ALIAS for $7;
vect tsvector;
BEGIN
vect := setweight(to_tsvector('german',coalesce(stichworte,'')),'A') ||
setweight(to_tsvector('german',coalesce(beschreibung,'')),'B');

EXECUTE 'INSERT INTO produkte 
(art_nr,bezeichnung,beschreibung,preis,steuersatz,aktionspreis,stichworte,vector)
VALUES 
('''||art_nr||''','''||bezeichnung||''','''||beschreibung||''','||preis||',

   
'||steuersatz||','||aktionspreis||','''||stichworte||''','||vect||')';

END;
$$ LANGUAGE plpgsql;

Firering this statement:

select 
user_insert_vector_data('adfvb','adfvb','adfvb',15.5,25.50,2,'alpha,beta,cesar');

results in this error:

FEHLER:  Syntaxfehler bei »:«
LINE 3: ... 25.50,2,'alpha,beta,cesar','beta':2A 'adfvb...
 ^
QUERY:  INSERT INTO produkte 
(art_nr,bezeichnung,beschreibung,preis,steuersatz,aktionspreis,stichworte,vector)

VALUES ('adfvb','adfvb','adfvb',15.5,
   25.50,2,'alpha,beta,cesar','beta':2A 'adfvb':4B 'alpha':1A 
'cesar':3A)
CONTEXT:  PL/pgSQL function user_insert_vector_data line 14 at EXECUTE 
statement


vector is of datatype tsvector. So I don't understand why pg is complaining ...

Thank's for any hints and sorry for annoying if I am too blind ...

Cheers

Andy

--
Netzmeister St.Pauli

St.Pauli - Hamburg - Germany

Andreas Wenk


--
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] fulltext search udf

2009-06-10 Thread Tom Lane
Andreas Wenk a.w...@netzmeister-st-pauli.de writes:
  EXECUTE 'INSERT INTO produkte 
 (art_nr,bezeichnung,beschreibung,preis,steuersatz,aktionspreis,stichworte,vector)
  VALUES 
 ('''||art_nr||''','''||bezeichnung||''','''||beschreibung||''','||preis||',
 
 '||steuersatz||','||aktionspreis||','''||stichworte||''','||vect||')';

This is not going to work with such a half-baked approach to quoting the
data values --- any value with ' or \ in it will break it.  You could
use quote_literal(), but I wonder why you are bothering with EXECUTE at
all.  If you just did the INSERT directly it would run faster and be a
lot less ugly.

regards, tom lane

-- 
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] Average connections

2009-06-10 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

First of all thank you very much to everyone that shared their views
on the task at hand!

I've actually accomplished it using MRTG :)

BR,

Pedro Doria Meunier
GSM: +351 96 17 20 188
Skype: pdoriam
 



Bill Moran wrote:
 In response to Pedro Doria Meunier pdo...@netmadeira.com:

 Thank you Bill for your tip.

 As far as the table's name is concerned the only one I can find is
 'pg_statistic' (under pg_catalog). I'm using PGSQL 8.2.9 on x86_64.


 Can't imagine why you're not seeing it.  It existed in 8.2, and I

 don't
 know of any config setting that would make it not show up.

 Bill Moran wrote:
 In response to Pedro Doria Meunier pdo...@netmadeira.com:

 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1

 Hi all

 I've googled for an answer but couldn't find one. Is there
 anyway to monitor the average connections to a database?

 Thank you in advance for any insights.
 The pg_stat_activity table holds 1 row for each connection
 with information on what that connection is doing.

 It wouldn't be very difficult to write a passthrough script
 for something like MRTG to graph this data.



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFKL/fv2FH5GXCfxAsRAiFmAKCP5i4lH7g0F/aldAM3+jzRO5KfdACgsU73
2ui5R+4Gb8HPCt+4uO7SH8w=
=GTGK
-END PGP SIGNATURE-


-- 
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] fulltext search udf

2009-06-10 Thread Andreas Wenk

Tom Lane wrote:

Andreas Wenk a.w...@netzmeister-st-pauli.de writes:
 EXECUTE 'INSERT INTO produkte 
(art_nr,bezeichnung,beschreibung,preis,steuersatz,aktionspreis,stichworte,vector)
 VALUES 
('''||art_nr||''','''||bezeichnung||''','''||beschreibung||''','||preis||',


'||steuersatz||','||aktionspreis||','''||stichworte||''','||vect||')';


This is not going to work with such a half-baked approach to quoting the
data values --- any value with ' or \ in it will break it.  You could
use quote_literal(), but I wonder why you are bothering with EXECUTE at
all.  If you just did the INSERT directly it would run faster and be a
lot less ugly.

regards, tom lane
Tom, thanks for the hint! I was really doing the wrong thing. There have 
been even more errors what made me confused. Now I got it ...


Cheers

Andy

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Different handling of PL/pgSQL for-loop variables in 8.3.7 vs. 8.2.7 ???

2009-06-10 Thread Atul Chojar
We recently upgraded from postgres version 8.2.7 to 8.3.7. The below
pl/pgsql test function behaves differently in the 2 versions.

 

The code of the function is :-

 

CREATE OR REPLACE FUNCTION public.testloop () RETURNS varchar AS

$body$

BEGIN

FOR idx IN 1..10 LOOP

raise notice 'idx=%', idx;

idx:=idx+1;  

END LOOP;

return '';

END;

$body$

LANGUAGE 'plpgsql'

 

The sql :-

 

select testloop();

 

in 8.2.7 returns:-

 

NOTICE:  idx=1

NOTICE:  idx=3

NOTICE:  idx=5

NOTICE:  idx=7

NOTICE:  idx=9

 

But in 8.3.7 returns:-

 

NOTICE:  idx=1

NOTICE:  idx=2

NOTICE:  idx=3

NOTICE:  idx=4

NOTICE:  idx=5

NOTICE:  idx=6

NOTICE:  idx=7

NOTICE:  idx=8

NOTICE:  idx=9

NOTICE:  idx=10

 

So in 8.3.7, the incrementing of the for-loop variable idx is being
ignored; that is not the case in 8.2.7. Is this a new feature of 8.3.7 or a
bug?

 

Since a lot of our functions depend on manual altering of for-loop
variables, any prompt help/advise/suggestions would be greatly appreciated!

 

Thanks!

atul

 http://www.airfacts.com/ AirFacts, Inc.
8120 Woodmont Ave., Suite 700
Bethesda, MD 20814
Tel: 301-760-7315

 

 

 

image001.png

Re: [GENERAL] Different handling of PL/pgSQL for-loop variables in 8.3.7 vs. 8.2.7 ???

2009-06-10 Thread Tom Lane
Atul Chojar acho...@airfacts.com writes:
 So in 8.3.7, the incrementing of the for-loop variable idx is being
 ignored; that is not the case in 8.2.7. Is this a new feature of 8.3.7 or a
 bug?

It's the new implementation.  Depending on unspecified implementation
details is a good way to have broken code.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] help with data recovery from injected UPDATE

2009-06-10 Thread Gus Gutoski
Hi,

I'm a noob who failed to properly sanitize incoming data from the
front end.  As a result, a poor hapless user managed to smuggle in a
malicious UPDATE statement that corrupted every single record in a
7+ table.  Only 3 fields were corrupted and of those only one is
vital.  But it's REALLY vital.

I don't expect there's anything anyone can do, but I've been advised
that some subscribers to this list are miracle-workers, so it's worth
a shot.

Here's how it happened.  A typical update statement from the front end
has the form
UPDATE collections SET foreign_id=2, coin=50-30, bills=10+20 WHERE
entry_date='2009-09-09';

The hapless user accidentally included TWO minus signs in one entry,
so the statement looked like this:
UPDATE collections SET foreign_id=2, coin=50--30, bills=10+20 WHERE
entry_date='2009-09-09';

(These examples are simplified for the sake of brevity in this message.)

Of course, the double minus sign comments out the rest of the line and
the statement is left dangling, looking for a terminating semicolon.

Now, my front-end happens to be Visual Basic 6.0 (yeah, I know) via
ActiveX Data Objects (ADO).  In particular, the SQL statement is
invoked via the ADO Recordset object's Open() method.  It appears that
this Open() method automagically terminates unfinished statements,
because the above statement *actually executes* in postgres when
invoked form the VB front end.

Naturally then, *every* record in the database has its foreign_id
field set to 2 and its coin field set to 50.  I *really* need to
recover that foreign_id field.  (As its name suggests, that field is
a foreign key into a different table.)

Here's some more info.  As I'm a noob, I don't know what all to
include here -- please ask for more info if you need it.

psql version() returns
PostgreSQL 8.1.5 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
3.4.2 (mingw-special)

OS is Windows XP (I think -- possibly Vista.  I'll check next time I'm
at that machine).

Yours in need,

Gus

-- 
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 with data recovery from injected UPDATE

2009-06-10 Thread Tom Lane
Gus Gutoski shared.entanglem...@gmail.com writes:
 Naturally then, *every* record in the database has its foreign_id
 field set to 2 and its coin field set to 50.  I *really* need to
 recover that foreign_id field.  (As its name suggests, that field is
 a foreign key into a different table.)

Well, in principle you could roll back that transaction, as long as the
old versions of the rows are still there and haven't been vacuumed away.
This being 8.1, if you haven't turned on autovacuum there is some chance
of that.  Shut down any manual vacuuming setup you may have *NOW*,
and then go trawl the pgsql archives for discussions of data recovery.
You most likely will need to find or write a special-purpose program
to change the xmin/xmax fields on the modified rows.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Libpq on windows

2009-06-10 Thread Phil Longstaff
I want to develop an app which uses libpq, built with mingw.  Is there a 
download package which contains just the include files/dlls?  If not, what 
package do I download?  I don't need the server, just the client libraries.

Phil


[GENERAL] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Christophe

Greetings,

The video from the June 9, 2009 SFPUG meeting, PostgreSQL as a secret  
weapon for high-performance Ruby on Rails applications, is now  
available for viewing or download from the media.postgresql.org server:


 http://media.postgresql.org/sfpug/sfpug-rails-20090609.mov

Thanks,
-- Xof

--
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] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Chris

Christophe wrote:

Greetings,

The video from the June 9, 2009 SFPUG meeting, PostgreSQL as a secret 
weapon for high-performance Ruby on Rails applications, is now 
available for viewing or download from the media.postgresql.org server:


 http://media.postgresql.org/sfpug/sfpug-rails-20090609.mov


Can you list the filesizes on http://media.postgresql.org/sfpug/ please?

--
Postgresql  php tutorials
http://www.designmagick.com/


--
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] Libpq on windows

2009-06-10 Thread Andy Colson

Phil Longstaff wrote:
I want to develop an app which uses libpq, built with mingw. Is there a 
download package which contains just the include files/dlls? If not, 
what package do I download? I don't need the server, just the client 
libraries.



Phil
If you dont mind all the ssl stuff (5 or 6 dll's worth) you can borrow 
the client from pgAdmin III.


I, however, just build my own w/out the ssl stuff.  There is no client 
only, but its really not hard, just download the full source, unpack, 
compile and then copy the libpq.dll out.


If you want mine I could copy it out so you can download it.

-Andy

--
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] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Christophe


On Jun 10, 2009, at 6:27 PM, Chris wrote:
Can you list the filesizes on http://media.postgresql.org/sfpug/  
please?


Josh Berkus handles that page, but I think that's a splendid idea.   
This particular video file is about 403MB.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [sfpug] [GENERAL] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Josh Berkus

On 6/10/09 7:20 PM, Christophe wrote:


On Jun 10, 2009, at 6:27 PM, Chris wrote:

Can you list the filesizes on http://media.postgresql.org/sfpug/ please?


Oh, good idea.  Didn't think of it.

--Josh

--
Josh Berkus
PostgreSQL Experts Inc.
www.pgexperts.com

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [sfpug] [GENERAL] Rails and PostgreSQL now up on media.postgresql.org

2009-06-10 Thread Chris

Josh Berkus wrote:

On 6/10/09 7:20 PM, Christophe wrote:


On Jun 10, 2009, at 6:27 PM, Chris wrote:

Can you list the filesizes on http://media.postgresql.org/sfpug/ please?


Oh, good idea.  Didn't think of it.


Thanks :D

--
Postgresql  php tutorials
http://www.designmagick.com/


--
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] Different handling of PL/pgSQL for-loop variables in 8.3.7 vs. 8.2.7 ???

2009-06-10 Thread Pavel Stehule
Hello

2009/6/10 Tom Lane t...@sss.pgh.pa.us:
 Atul Chojar acho...@airfacts.com writes:
 So in 8.3.7, the incrementing of the for-loop variable idx is being
 ignored; that is not the case in 8.2.7. Is this a new feature of 8.3.7 or a
 bug?

 It's the new implementation.  Depending on unspecified implementation
 details is a good way to have broken code.

                        regards, tom lane


we should to mark control varables as read-only?

regards
Pavel Stehule

 --
 Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
 To make changes to your subscription:
 http://www.postgresql.org/mailpref/pgsql-general


-- 
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] Libpq on windows

2009-06-10 Thread Albe Laurenz
Phil wrote:
 I want to develop an app which uses libpq, built with mingw.
 Is there a download package which contains just the include files/dlls?
 If not, what package do I download? I don't need the server, just the client 
 libraries.

You can use the regular binary installer for Windows,
it gives you the option to deselect certain components.
So you can just install th client and libraries without the server.
 
Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general