[pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Originally from SQL Server background, there is one feature that I am missing and would save developers hours of time. In SQL Server I could copy sql code out of an application and paste it into SSMS, declare & assign vars that exist in the sql and run - great debugging scenario. e.g. (please note I am rusty and syntax may be incorrect) declare @x as varchar(10) set @x = 'abc' select * from sometable where somefield = @x It would be amazing if simular functionality could be built into in pgadmin3 (NpgSQL uses : instead of @) where I can just drop my sql (params & all) into the query window. I realise you can create pgscript, but it doesn't achieve the above... Currently I have a peice of sql someone has written that has 3 unique varibles in it which are used around 7 times each... I originally posted this question on stack overflow, there doesn't seem to be a (commercial) competitor that does this either: http://stackoverflow.com/questions/2959343/debugging-sql-in-pgadmin3-when-sq l-contains-variables -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Le 16/11/2010 13:14, Dan Shoubridge a écrit : > Originally from SQL Server background, there is one feature that I am > missing and would save developers hours of time. > > In SQL Server I could copy sql code out of an application and paste it into > SSMS, declare & assign vars that exist in the sql and run - great debugging > scenario. > e.g. (please note I am rusty and syntax may be incorrect) > > declare @x as varchar(10) > set @x = 'abc' > select * from sometable where somefield = @x > > It would be amazing if simular functionality could be built into in pgadmin3 > (NpgSQL uses : instead of @) where I can just drop my sql (params & all) > into the query window. > > I realise you can create pgscript, but it doesn't achieve the above... > Currently I have a peice of sql someone has written that has 3 unique > varibles in it which are used around 7 times each... > And? I don't see why pgscript can't do that. The example you give is certainly doable with pgscript. > I originally posted this question on stack overflow, there doesn't seem to > be a (commercial) competitor that does this either: > http://stackoverflow.com/questions/2959343/debugging-sql-in-pgadmin3-when-sq > l-contains-variables > > -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Le 16/11/2010 13:34, Guillaume Lelarge a écrit : > Le 16/11/2010 13:14, Dan Shoubridge a écrit : >> Originally from SQL Server background, there is one feature that I am >> missing and would save developers hours of time. >> >> In SQL Server I could copy sql code out of an application and paste it into >> SSMS, declare & assign vars that exist in the sql and run - great debugging >> scenario. >> e.g. (please note I am rusty and syntax may be incorrect) >> >> declare @x as varchar(10) >> set @x = 'abc' >> select * from sometable where somefield = @x >> >> It would be amazing if simular functionality could be built into in pgadmin3 >> (NpgSQL uses : instead of @) where I can just drop my sql (params & all) >> into the query window. >> >> I realise you can create pgscript, but it doesn't achieve the above... >> Currently I have a peice of sql someone has written that has 3 unique >> varibles in it which are used around 7 times each... >> > > And? I don't see why pgscript can't do that. The example you give is > certainly doable with pgscript. > Just for the record, the above script looks like this in pgscript: declare @x; set @x = 'abc'; select * from sometable where somefield = '@x'; And it works. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
> > Le 16/11/2010 13:14, Dan Shoubridge a écrit : > > > Originally from SQL Server background, there is one feature that I > > > am missing and would save developers hours of time. > > > > > > In SQL Server I could copy sql code out of an application and paste > > > it into SSMS, declare & assign vars that exist in the sql and run - > > > great debugging scenario. > > > e.g. (please note I am rusty and syntax may be incorrect) > > > > > > declare @x as varchar(10) > > > set @x = 'abc' > > > select * from sometable where somefield = @x > > > > > > It would be amazing if simular functionality could be built into in > > > pgadmin3 (NpgSQL uses : instead of @) where I can just drop my sql > > > (params & all) into the query window. > > > > > > I realise you can create pgscript, but it doesn't achieve the above... > > > Currently I have a peice of sql someone has written that has 3 > > > unique varibles in it which are used around 7 times each... > > And? I don't see why pgscript can't do that. The example you give is certainly doable with pgscript. > > Just for the record, the above script looks like this in pgscript: > > declare @x; > > set @x = 'abc'; > > select * from sometable where somefield = '@x'; > > And it works. > Ok, I tried it - I think I must have missed of the quotes in my version, but that still defeats the point - It's easy to replace @ with :, but having to put quotes around all the vars makes it less efficient. Is there anything that can be done about this? And I don't get any output in the 'Data Output tab' - this is the most important bit. -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
> > > Originally from SQL Server background, there is one feature that I > > > am missing and would save developers hours of time. > > > > > > In SQL Server I could copy sql code out of an application and > > > paste it into SSMS, declare & assign vars that exist in the sql > > > and run - great debugging scenario. > > > e.g. (please note I am rusty and syntax may be incorrect) > > > > > > declare @x as varchar(10) > > > set @x = 'abc' > > > select * from sometable where somefield = @x > > > > > > It would be amazing if simular functionality could be built into > > > in > > > pgadmin3 (NpgSQL uses : instead of @) where I can just drop my sql > > > (params & all) into the query window. > > > > > > I realise you can create pgscript, but it doesn't achieve the above... > > > Currently I have a peice of sql someone has written that has 3 > > > unique varibles in it which are used around 7 times each... > > Le 16/11/2010 13:34, Guillaume Lelarge a écrit : > > And? I don't see why pgscript can't do that. The example you give is certainly doable with pgscript. > > Just for the record, the above script looks like this in pgscript: > > declare @x; > > set @x = 'abc'; > > select * from sometable where somefield = '@x'; > > And it works. 16/11/2010 13:00, Dan Shoubridge: (Apologies for messing up my reply, I've not used mailing lists before and they never get formatted correctly/ Ok, I tried it - I think I must have missed of the quotes in my version, but that still defeats the point - It's easy to replace @ with :, but having to put quotes around all the vars makes it less efficient. Is there anything that can be done about this? And I don't get any output in the 'Data Output tab' - this is the most important bit. - I can copy and paste the result that I can then run, after I've fiddled with the script a bit, but it isn't seamless. - Just a request as I think others would find it useful too? -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] It is possible to add an option to save files without UTF-8 BOM sequence
On Tue, Nov 16, 2010 at 4:47 PM, Guillaume Lelarge wrote: > > There's no possibility to do that right now. But I'm not against having > such an option. > Is this some internal limitation of wxWidgets or time effort is too big? Taras Kopets
Re: [pgadmin-support] It is possible to add an option to save files without UTF-8 BOM sequence
Le 16/11/2010 16:01, Taras Kopets a écrit : > On Tue, Nov 16, 2010 at 4:47 PM, Guillaume Lelarge > wrote: >> >> There's no possibility to do that right now. But I'm not against having >> such an option. >> > > Is this some internal limitation of wxWidgets or time effort is too big? > That's not a limitation of wxWidgets. It's doable in 2/3 hours of work. Not sure we really want to add a workaround for this. And actually, this is not a bug in pgAdmin. psql and surely quite a lot of tools don't do that write. In psql's specific case, I think it's already fixed. Anyway, as already stated, I'm not against adding such an option. It's quite simple to add, but it is another option to add on an already filled dialog. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
[pgadmin-support] slony crash
[Apologies if this appears twice; I didn't see it on the archive after it was sent.] Hi, I'm using pgAdmin 3 version 1.12.1 on Mac OS X (10.6.4). When I go to Preferences->General, enter a path in "Slony-I path", and hit "ok", the app crashes every time. If it helps, the path I entered was: /Library/PostgreSQL8/versions/8.4.1/share/postgresql/ Thanks! Demitri -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] It is possible to add an option to save files without UTF-8 BOM sequence
On Tue, Nov 16, 2010 at 6:58 PM, Guillaume Lelarge wrote: > That's not a limitation of wxWidgets. It's doable in 2/3 hours of work. > Not sure we really want to add a workaround for this. And actually, this > is not a bug in pgAdmin. psql and surely quite a lot of tools don't do > that write. In psql's specific case, I think it's already fixed. > > Anyway, as already stated, I'm not against adding such an option. It's > quite simple to add, but it is another option to add on an already > filled dialog. According to wiki - Unicode standard does not require or recommend BOM, further mentioning that BOM could possibly break stuff in Unix-like systems. I don't see the problem with adding one checkbox to options page, if this option solves compatibility problem with main postgres tool (psql). If you look closer to option page there is even checkbox "Reset guru hints", which is much less important than checkbox "Let me run my files in psql". What do you think? Taras Kopets
Re: [pgadmin-support] It is possible to add an option to save files without UTF-8 BOM sequence
Le 16/11/2010 21:31, Taras Kopets a écrit : > On Tue, Nov 16, 2010 at 6:58 PM, Guillaume Lelarge > wrote: > >> That's not a limitation of wxWidgets. It's doable in 2/3 hours of work. >> Not sure we really want to add a workaround for this. And actually, this >> is not a bug in pgAdmin. psql and surely quite a lot of tools don't do >> that write. In psql's specific case, I think it's already fixed. >> >> Anyway, as already stated, I'm not against adding such an option. It's >> quite simple to add, but it is another option to add on an already >> filled dialog. > > > According to wiki - Unicode standard does not require or recommend BOM, > further mentioning that BOM could possibly break stuff in Unix-like systems. > Perhaps, I don't know quite a lot about BOM. > I don't see the problem with adding one checkbox to options page, if this > option > solves compatibility problem with main postgres tool (psql). > psql 9.0 knows how to handle this. > If you look closer to option page there is even checkbox "Reset guru > hints", > which is much less important than checkbox "Let me run my files in psql". > Much less for you, right. Doesn't mean everyone has the same opinion. And removing something is usually not appreciated. > What do you think? > That I'm waiting for your patch :) -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] slony crash
Le 16/11/2010 19:15, Demitri Muna a écrit : > [Apologies if this appears twice; I didn't see it on the archive after it was > sent.] > > Hi, > > I'm using pgAdmin 3 version 1.12.1 on Mac OS X (10.6.4). When I go to > Preferences->General, enter a path in "Slony-I path", and hit "ok", the app > crashes every time. > > If it helps, the path I entered was: > > /Library/PostgreSQL8/versions/8.4.1/share/postgresql/ > I tried it on Linux and didn't reproduce it. Could be a Mac OS X specific bug, but I still cannot compile pgAdmin on this OS. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Le 16/11/2010 14:01, Dan Shoubridge a écrit : Originally from SQL Server background, there is one feature that I am missing and would save developers hours of time. In SQL Server I could copy sql code out of an application and paste it into SSMS, declare & assign vars that exist in the sql and run - great debugging scenario. e.g. (please note I am rusty and syntax may be incorrect) declare @x as varchar(10) set @x = 'abc' select * from sometable where somefield = @x It would be amazing if simular functionality could be built into in pgadmin3 (NpgSQL uses : instead of @) where I can just drop my sql (params & all) into the query window. I realise you can create pgscript, but it doesn't achieve the above... Currently I have a peice of sql someone has written that has 3 unique varibles in it which are used around 7 times each... > > >>> Le 16/11/2010 13:34, Guillaume Lelarge a écrit : > >>> And? I don't see why pgscript can't do that. The example you give is > certainly doable with pgscript. > >>> Just for the record, the above script looks like this in pgscript: > >>> declare @x; >>> set @x = 'abc'; >>> select * from sometable where somefield = '@x'; > >>> And it works. > > 16/11/2010 13:00, Dan Shoubridge: > > (Apologies for messing up my reply, I've not used mailing lists before and > they never get formatted correctly/ > > Ok, I tried it - I think I must have missed of the quotes in my version, but > that still defeats the point - It's easy to replace @ with :, but having to > put quotes around all the vars makes it less efficient. Is there anything > that can be done about this? > I don't think this is something we want to do. Problem is that variables are not strictly typed, so there is nothing that could tell pgscript if it should add simple quotes (simple quotes for text, but not for integer for example). > And I don't get any output in the 'Data Output tab' - this is the most > important bit. - I can copy and paste the result that I can then run, after > I've fiddled with the script a bit, but it isn't seamless. - Just a request > as I think others would find it useful too? > Yeah, that's quite surprising. I would be useful but quite hard to do. I think I'll add a ticket on this. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Le 16/11/2010 23:26, Guillaume Lelarge a écrit : > Le 16/11/2010 14:01, Dan Shoubridge a écrit : > Originally from SQL Server background, there is one feature that I > am missing and would save developers hours of time. > > In SQL Server I could copy sql code out of an application and > paste it into SSMS, declare & assign vars that exist in the sql > and run - great debugging scenario. > e.g. (please note I am rusty and syntax may be incorrect) > > declare @x as varchar(10) > set @x = 'abc' > select * from sometable where somefield = @x > > It would be amazing if simular functionality could be built into > in > pgadmin3 (NpgSQL uses : instead of @) where I can just drop my sql > (params & all) into the query window. > > I realise you can create pgscript, but it doesn't achieve the above... > Currently I have a peice of sql someone has written that has 3 > unique varibles in it which are used around 7 times each... >> >> Le 16/11/2010 13:34, Guillaume Lelarge a écrit : >> And? I don't see why pgscript can't do that. The example you give is >> certainly doable with pgscript. >> Just for the record, the above script looks like this in pgscript: >> declare @x; set @x = 'abc'; select * from sometable where somefield = '@x'; >> And it works. >> >> 16/11/2010 13:00, Dan Shoubridge: >> >> (Apologies for messing up my reply, I've not used mailing lists before and >> they never get formatted correctly/ >> >> Ok, I tried it - I think I must have missed of the quotes in my version, but >> that still defeats the point - It's easy to replace @ with :, but having to >> put quotes around all the vars makes it less efficient. Is there anything >> that can be done about this? >> > > I don't think this is something we want to do. Problem is that variables > are not strictly typed, so there is nothing that could tell pgscript if > it should add simple quotes (simple quotes for text, but not for integer > for example). > >> And I don't get any output in the 'Data Output tab' - this is the most >> important bit. - I can copy and paste the result that I can then run, after >> I've fiddled with the script a bit, but it isn't seamless. - Just a request >> as I think others would find it useful too? >> > > Yeah, that's quite surprising. I would be useful but quite hard to do. > > I think I'll add a ticket on this. > Ticket added. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support
Re: [pgadmin-support] It is possible to add an option to save files without UTF-8 BOM sequence
Le 16/11/2010 22:39, Guillaume Lelarge a écrit : > Le 16/11/2010 21:31, Taras Kopets a écrit : >> On Tue, Nov 16, 2010 at 6:58 PM, Guillaume Lelarge >> wrote: >> >>> That's not a limitation of wxWidgets. It's doable in 2/3 hours of work. >>> Not sure we really want to add a workaround for this. And actually, this >>> is not a bug in pgAdmin. psql and surely quite a lot of tools don't do >>> that write. In psql's specific case, I think it's already fixed. >>> >>> Anyway, as already stated, I'm not against adding such an option. It's >>> quite simple to add, but it is another option to add on an already >>> filled dialog. >> >> >> According to wiki - Unicode standard does not require or recommend BOM, >> further mentioning that BOM could possibly break stuff in Unix-like systems. >> > > Perhaps, I don't know quite a lot about BOM. > >> I don't see the problem with adding one checkbox to options page, if this >> option >> solves compatibility problem with main postgres tool (psql). >> > > psql 9.0 knows how to handle this. > >> If you look closer to option page there is even checkbox "Reset guru >> hints", >> which is much less important than checkbox "Let me run my files in psql". >> > > Much less for you, right. Doesn't mean everyone has the same opinion. > And removing something is usually not appreciated. > >> What do you think? >> > > That I'm waiting for your patch :) > BTW, I added a ticket, so that we remember your request when we'll some time to work on it. -- Guillaume http://www.postgresql.fr http://dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support