Re: [pgadmin-hackers] Materialized View Patch File

2013-07-18 Thread Dave Page
Hi

I realised this code is all wonky anyway - why is IsMaterializedView()
not just an accessor over a pgView private variable that is set in
pgViewFactory::CreateObjects when we create the object? We already
know at that point whether it's a matview or not (from
pg_class.relkind). Querying pg_class every time we want to check if
the view is materialized or not is horribly inefficient. There should
be just one function, that is a member of pgView and takes no
arguments. Whereever it's called, we just need to get the pgView
object and call it.

Please fix.

Thanks.

On Thu, Jul 18, 2013 at 5:58 AM, Neel Patel neel.pa...@enterprisedb.com wrote:
 Hi Dave,

 Please find the updated patch with modification in query.

 Thanks,
 Neel Patel


 On Wed, Jul 17, 2013 at 5:15 PM, Dave Page dave.p...@enterprisedb.com
 wrote:

 On Wed, Jul 17, 2013 at 12:23 PM, Neel Patel
 neel.pa...@enterprisedb.com wrote:
  Hi Dave,
 
  Just want to know.
 
  Now we are passing GetName() to qtDbString() and to form the complete
  query
  we need to use qtDbString() to compare the string.
 
  We have added below string.
 
  wxString sql = wxT(SELECT count(*) FROM pg_matviews WHERE matviewname =
  )
  + qtDbString(this-GetName()) + wxT( AND schemaname = ) +
  qtDbString(this-GetSchema()-GetName());
 
  Is it correct ?

 I'd expect you to be using GetQuotedIdentifier() there. For a view and
 schema, the identifier is the name anyway.


 --
 Dave Page
 Chief Architect, Tools  Installers
 EnterpriseDB: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company

 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake





-- 
Dave Page
Chief Architect, Tools  Installers
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake


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


[pgadmin-hackers] pgAdmin III commit: Ensure SQL keywords used in the UI don't get transl

2013-07-18 Thread Dave Page
Ensure SQL keywords used in the UI don't get translated.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=4b06713e62a690a81066dc85ecf005a8e1b125b6
Author: Dinesh Kumar dinesh.ku...@enterprisedb.com

Modified Files
--
pgadmin/dlg/dlgForeignKey.cpp |   14 ++
pgadmin/dlg/dlgIndex.cpp  |4 
pgadmin/dlg/dlgRule.cpp   |6 ++
pgadmin/dlg/dlgTrigger.cpp|   10 ++
4 files changed, 34 insertions(+)


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


Re: [pgadmin-hackers] pgAdmin bug - SQL creation for foreign keys

2013-07-18 Thread Dave Page
Thanks - patch applied with a couple of minor changes:

- I reworded the comments.

- I removed the changes to dlgIndex.xrc and one of the corrsponding changes
in dlgIndex.cpp. They changed the labelling that was previously correct.


On Wed, Jul 17, 2013 at 6:09 PM, Dinesh Kumar dinesh.ku...@enterprisedb.com
 wrote:

 Hi Dave,

 Further to my understanding, we don't any option available to deal
 untranslated strings in XRC files. Hence, i have reset the label text with
 the keywords. And also i have found this case with some other dialogue
 boxes, and adding fix for those also.

 Please find the attached patch for the same, and let me know your inputs.

 Thanks in advance.



 Dinesh

 --
 *Dinesh Kumar*
 Software Engineer

 Ph: +918087463317
  Skype ID: dinesh.kumar432
 www.enterprisedb.co 
 http://www.enterprisedb.com/mhttp://www.enterprisedb.com/
 *
 Follow us on Twitter*
 @EnterpriseDB

 Visit EnterpriseDB for tutorials, webinars, 
 whitepapershttp://www.enterprisedb.com/resources-community and
 more http://www.enterprisedb.com/resources-community


 On Tue, Jul 16, 2013 at 1:05 PM, Dinesh Kumar 
 dinesh.ku...@enterprisedb.com wrote:

 Hi Dave,

 On Mon, Jul 15, 2013 at 6:55 PM, Dinesh Kumar 
 dinesh.ku...@enterprisedb.com wrote:

 Hi Dave,

 I am able to re-produce the reported issue and with the create new role
 dialogue box. Please find the attached patch for these reported cases.


 This fix seems reasonable if we want the keywords to be translated in
 the UI, but I don't think we do, because they are keywords not natural
 language. Can we just prevent them being translated in the first place? If
 they're in the XRC file, that may require us to reset the labels to
 un-translated strings in code.


 Thanks Dave. Let me send you new patch with this suggested approach.


  Dinesh

 --
 *Dinesh Kumar*
 Software Engineer

 Ph: +918087463317
 Skype ID: dinesh.kumar432
 www.enterprisedb.co 
 http://www.enterprisedb.com/mhttp://www.enterprisedb.com/
 *
 Follow us on Twitter*
 @EnterpriseDB

 Visit EnterpriseDB for tutorials, webinars, 
 whitepapershttp://www.enterprisedb.com/resources-community and
 more http://www.enterprisedb.com/resources-community





-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Re: [pgadmin-hackers] pgAdmin bug - SQL creation for foreign keys

2013-07-18 Thread Dinesh Kumar
OK.

Thanks Dave.

Dinesh

-- 
*Dinesh Kumar*
Software Engineer

Ph: +918087463317
Skype ID: dinesh.kumar432
www.enterprisedb.co
http://www.enterprisedb.com/mhttp://www.enterprisedb.com/
*
Follow us on Twitter*
@EnterpriseDB

Visit EnterpriseDB for tutorials, webinars,
whitepapershttp://www.enterprisedb.com/resources-community and
more http://www.enterprisedb.com/resources-community


On Thu, Jul 18, 2013 at 7:31 PM, Dave Page dp...@pgadmin.org wrote:

 Thanks - patch applied with a couple of minor changes:

 - I reworded the comments.

 - I removed the changes to dlgIndex.xrc and one of the corrsponding
 changes in dlgIndex.cpp. They changed the labelling that was previously
 correct.


 On Wed, Jul 17, 2013 at 6:09 PM, Dinesh Kumar 
 dinesh.ku...@enterprisedb.com wrote:

 Hi Dave,

 Further to my understanding, we don't any option available to deal
 untranslated strings in XRC files. Hence, i have reset the label text with
 the keywords. And also i have found this case with some other dialogue
 boxes, and adding fix for those also.

 Please find the attached patch for the same, and let me know your inputs.

 Thanks in advance.



 Dinesh

 --
 *Dinesh Kumar*
 Software Engineer

 Ph: +918087463317
  Skype ID: dinesh.kumar432
 www.enterprisedb.co 
 http://www.enterprisedb.com/mhttp://www.enterprisedb.com/
 *
 Follow us on Twitter*
 @EnterpriseDB

 Visit EnterpriseDB for tutorials, webinars, 
 whitepapershttp://www.enterprisedb.com/resources-community and
 more http://www.enterprisedb.com/resources-community


 On Tue, Jul 16, 2013 at 1:05 PM, Dinesh Kumar 
 dinesh.ku...@enterprisedb.com wrote:

 Hi Dave,

 On Mon, Jul 15, 2013 at 6:55 PM, Dinesh Kumar 
 dinesh.ku...@enterprisedb.com wrote:

 Hi Dave,

 I am able to re-produce the reported issue and with the create new
 role dialogue box. Please find the attached patch for these reported 
 cases.


 This fix seems reasonable if we want the keywords to be translated in
 the UI, but I don't think we do, because they are keywords not natural
 language. Can we just prevent them being translated in the first place? If
 they're in the XRC file, that may require us to reset the labels to
 un-translated strings in code.


 Thanks Dave. Let me send you new patch with this suggested approach.


  Dinesh

 --
 *Dinesh Kumar*
 Software Engineer

 Ph: +918087463317
 Skype ID: dinesh.kumar432
 www.enterprisedb.co 
 http://www.enterprisedb.com/mhttp://www.enterprisedb.com/
 *
 Follow us on Twitter*
 @EnterpriseDB

 Visit EnterpriseDB for tutorials, webinars, 
 whitepapershttp://www.enterprisedb.com/resources-community and
 more http://www.enterprisedb.com/resources-community





 --
 Dave Page
 Blog: http://pgsnake.blogspot.com
 Twitter: @pgsnake

 EnterpriseDB UK: http://www.enterprisedb.com
 The Enterprise PostgreSQL Company



[pgadmin-hackers] pgAdmin III commit: Fix UTF-8 display for guru hints

2013-07-18 Thread Guillaume Lelarge
Fix UTF-8 display for guru hints

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=95c14eea5e6ee502f3e64053a6cdbc89ba7487fd
Author: Marek Cernocky ma...@manet.cz

Modified Files
--
CHANGELOG   |1 +
docs/en_US/hints/autovacuum.html|2 +-
docs/en_US/hints/conn-hba.html  |2 +-
docs/en_US/hints/conn-ident.html|2 +-
docs/en_US/hints/conn-listen.html   |2 +-
docs/en_US/hints/encoding-ascii.html|2 +-
docs/en_US/hints/encoding-unicode.html  |2 +-
docs/en_US/hints/fki.html   |2 +-
docs/en_US/hints/instrumentation.html   |2 +-
docs/en_US/hints/instrumentation91_with.html|2 +-
docs/en_US/hints/instrumentation91_without.html |2 +-
docs/en_US/hints/multiple.html  |2 +-
docs/en_US/hints/object-editing.html|2 +-
docs/en_US/hints/pk.html|2 +-
docs/en_US/hints/saving-passwords.html  |2 +-
docs/en_US/hints/vacuum-full.html   |2 +-
docs/en_US/hints/vacuum.html|2 +-
docs/en_US/hints/view-without-pk.html   |2 +-
docs/fr_FR/hints/instrumentation91_with.html|2 +-
docs/fr_FR/hints/instrumentation91_without.html |2 +-
docs/fr_FR/hints/vacuum-full.html   |2 +-
docs/sl_SI/hints/autovacuum.html|2 +-
docs/sl_SI/hints/conn-hba.html  |2 +-
docs/sl_SI/hints/conn-ident.html|2 +-
docs/sl_SI/hints/conn-listen.html   |2 +-
docs/sl_SI/hints/encoding-ascii.html|2 +-
docs/sl_SI/hints/encoding-unicode.html  |2 +-
docs/sl_SI/hints/fki.html   |2 +-
docs/sl_SI/hints/instrumentation.html   |2 +-
docs/sl_SI/hints/multiple.html  |2 +-
docs/sl_SI/hints/pk.html|2 +-
docs/sl_SI/hints/vacuum.html|2 +-
docs/sl_SI/hints/view-without-pk.html   |2 +-
pgadmin/frm/frmHint.cpp |2 +-
pgadmin/utils/sysSettings.cpp   |2 +-
35 files changed, 35 insertions(+), 34 deletions(-)


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


Re: [pgadmin-hackers] Heads-up - Beta 1

2013-07-18 Thread Guillaume Lelarge
On Thu, 2013-06-20 at 08:28 +0100, Dave Page wrote:
 Guillaume?
 

Sorry for the huge delay.

Both are commited, and pushed.

 On Thu, Jun 20, 2013 at 7:11 AM, Marek Černocký ma...@manet.cz wrote:
  What my translation and patch
  http://www.postgresql.org/message-id/1366823347.15060.23.camel@sirius
  Can Guillaume see it.
 
 
  Dave Page píše v Út 18. 06. 2013 v 15:48 +0100:
  I plan to cut the beta 1 release on Monday.
 
  --
  Dave Page
  Blog: http://pgsnake.blogspot.com
  Twitter: @pgsnake
 
  EnterpriseDB UK: http://www.enterprisedb.com
  The Enterprise PostgreSQL Company
 
 
 
 
 
 
  --
  Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
  To make changes to your subscription:
  http://www.postgresql.org/mailpref/pgadmin-hackers
 
 
 


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



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


[pgadmin-hackers] pgAdmin III commit: Update czech hints files

2013-07-18 Thread Guillaume Lelarge
Update czech hints files

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=af512147b89f9f5db3de1bb0582b061aad02f6e1
Author: Marek Cernocky ma...@manet.cz

Modified Files
--
docs/cs_CZ/hints/autovacuum.html   |   33 -
docs/cs_CZ/hints/conn-hba.html |   26 ++---
docs/cs_CZ/hints/conn-ident.html   |   28 +++---
docs/cs_CZ/hints/conn-listen.html  |   38 +++-
docs/cs_CZ/hints/encoding-ascii.html   |   26 ++---
docs/cs_CZ/hints/encoding-unicode.html |   20 -
docs/cs_CZ/hints/fki.html  |   48 ++
docs/cs_CZ/hints/instrumentation.html  |   50 ++--
docs/cs_CZ/hints/multiple.html |6 +++-
docs/cs_CZ/hints/object-editing.html   |   38 +---
docs/cs_CZ/hints/pk.html   |   42 +--
docs/cs_CZ/hints/saving-passwords.html |   25 ++--
docs/cs_CZ/hints/vacuum.html   |   46 +++--
docs/cs_CZ/hints/view-without-pk.html  |   17 +++
14 files changed, 278 insertions(+), 165 deletions(-)


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


[pgadmin-hackers] pgAdmin III commit: Automatic merge using stringmerge script.

2013-07-18 Thread Guillaume Lelarge
Automatic merge using stringmerge script.

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=4c2ceac29501d9a48f962cd80185cb60c8880fed

Modified Files
--
i18n/af_ZA/pgadmin3.po | 4008 +---
i18n/ar_SA/pgadmin3.po | 4029 +---
i18n/bg_BG/pgadmin3.po | 4010 +---
i18n/ca_ES/pgadmin3.po | 3990 +---
i18n/cs_CZ/pgadmin3.po | 4001 +---
i18n/da_DK/pgadmin3.po | 4064 +---
i18n/de_CH/pgadmin3.po | 3992 +---
i18n/de_DE/pgadmin3.po |25299 +--
i18n/el_GR/pgadmin3.po | 3990 +---
i18n/es_ES/pgadmin3.po | 3994 +---
i18n/fa_IR/pgadmin3.po | 3997 +---
i18n/fi_FI/pgadmin3.po | 3989 +---
i18n/fr_FR/pgadmin3.po |25701 ++--
i18n/gl_ES/pgadmin3.po | 4003 +---
i18n/gu_IN/pgadmin3.po | 3917 +---
i18n/hi_IN/pgadmin3.po | 3933 +---
i18n/hr_HR/pgadmin3.po | 4104 +---
i18n/hu_HU/pgadmin3.po | 4004 +---
i18n/id_ID/pgadmin3.po | 4024 +---
i18n/is_IS/pgadmin3.po | 3917 +---
i18n/it_IT/pgadmin3.po | 4061 +---
i18n/ja_JP/pgadmin3.po | 4059 +---
i18n/ko_KR/pgadmin3.po | 4048 +---
i18n/lt_LT/pgadmin3.po | 3987 +---
i18n/lv_LV/pgadmin3.po | 3991 +---
i18n/mk_MK/pgadmin3.po | 3917 +---
i18n/nb_NO/pgadmin3.po | 4032 +---
i18n/nl_NL/pgadmin3.po | 4010 +---
i18n/pl_PL/pgadmin3.po | 4035 +---
i18n/pt_BR/pgadmin3.po | 4017 +---
i18n/pt_PT/pgadmin3.po | 4029 +---
i18n/ro_RO/pgadmin3.po | 4043 +---
i18n/ru_RU/pgadmin3.po | 4038 +---
i18n/sk_SK/pgadmin3.po | 3997 +---
i18n/sl_SI/pgadmin3.po | 4000 +---
i18n/sr_RS/pgadmin3.po | 4022 +---
i18n/sv_SE/pgadmin3.po | 3989 +---
i18n/te_IN/pgadmin3.po | 3917 +---
i18n/tl_PH/pgadmin3.po | 4017 +---
i18n/tr_TR/pgadmin3.po | 4063 +---
i18n/uk_UA/pgadmin3.po | 3919 +---
i18n/ur_PK/pgadmin3.po | 3978 +---
i18n/vi_VN/pgadmin3.po | 3915 +---
i18n/zh_CN/pgadmin3.po | 4020 +---
i18n/zh_TW/pgadmin3.po | 4022 +---
45 files changed, 121521 insertions(+), 101571 deletions(-)


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


[pgadmin-hackers] pgAdmin III commit: There's one less folder to check for new messages t

2013-07-18 Thread Guillaume Lelarge
There's one less folder to check for new messages to translate

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=3d09954445d86af171c3dfe18976659522017e13

Modified Files
--
stringextract |1 -
1 file changed, 1 deletion(-)


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


[pgadmin-hackers] Bug in the graphical explain

2013-07-18 Thread Guillaume Lelarge
Hi,

I have no idea on how to fix this. I've attached the test case to
reproduce it.

First execute the test SQL file, then select the last UPDATE query, and
hit F7. The graphical explain is kinda ugly because two nodes are one on
the other. That's not the first time I meet this bug. For example, when
you explain an DELETE query on a table with foreign keys.

If you know how to fix this, that would be great because I'm completely
lost here.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
drop schema if exists refgeo cascade;
create schema refgeo;

drop table if exists refgeo.hzone cascade;
create table refgeo.hzone (
hid serial  -- historical id
, id serial -- normal id
, name varchar  -- zone name
, funcid varchar-- functional identifier
, geom varchar  -- varchar for the zone
, sdate timestamp   default current_timestamp   -- start date : 
data is valid from that date on
, edate timestamp   default null-- end date : data is valid 
until that date
);

-- the view to current data
create or replace view 
refgeo.zone as 
select
id
, name
, funcid
, geom
from
refgeo.hzone
where
edate is null;

-- make this view updatable
-- this mechanism will be almost automatic with PG = 9.3
-- insert
create rule refgeo_zone_ins as
on insert to refgeo.zone do instead
insert into refgeo.hzone (id, name, funcid, geom) values (NEW.id, NEW.name, 
NEW.funcid, NEW.geom);
-- update
create rule refgeo_zone_up as
on update to refgeo.zone do instead
(
update refgeo.hzone set edate = current_timestamp where id = OLD.id and edate 
is null;
insert into refgeo.hzone (id, name, funcid, geom) values (OLD.id, NEW.name, 
NEW.funcid, NEW.geom);
);
;
-- datsup current value instead of delete
create rule refgeo_zone_del as
on delete to refgeo.zone do instead
update refgeo.hzone set edate = current_timestamp where id = OLD.id and edate 
is null;

/* test it */
truncate refgeo.hzone;

insert into 
refgeo.hzone (id, name, funcid, geom, sdate, edate)
select 
n as id
, 'Point ' || n::text as name
, n as funcid
, ''
, current_timestamp - interval '1 month' as sdate
, current_timestamp as edate
from 
generate_series(1, 1000) as n
union
select 
n as id
, 'Point ' || n::text as name   
, n + 1000 as funcid
, ''
, current_timestamp as sdate
, null as edate
from 
generate_series(1, 1000) as n;

-- get all data
select * from refgeo.hzone;

-- get current data
select * from refgeo.zone;

-- insert new data
insert into refgeo.zone (id, name, funcid, geom) values (3500, 'Point 3500', 
3500, 'POINT(33 33)'::varchar);

-- see new data
select * from refgeo.zone order by id desc limit 10;
select * from refgeo.hzone order by id desc limit 10;

-- update our point
update refgeo.zone set geom = 'POINT(42 42)'::varchar where id = 3500;
select * from refgeo.zone order by id desc limit 10;
select * from refgeo.hzone order by id desc limit 10;
-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] Bug in the graphical explain

2013-07-18 Thread Dave Page
Ashesh; do we have any capacity in the team to spend a little time on
this at the moment? It'll affect the PEM SQL Profiler as well of
course...

On Thu, Jul 18, 2013 at 9:26 PM, Guillaume Lelarge
guilla...@lelarge.info wrote:
 Hi,

 I have no idea on how to fix this. I've attached the test case to
 reproduce it.

 First execute the test SQL file, then select the last UPDATE query, and
 hit F7. The graphical explain is kinda ugly because two nodes are one on
 the other. That's not the first time I meet this bug. For example, when
 you explain an DELETE query on a table with foreign keys.

 If you know how to fix this, that would be great because I'm completely
 lost here.


 --
 Guillaume
 http://blog.guillaume.lelarge.info
 http://www.dalibo.com


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




-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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