Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables

From: "Dan Shoubridge" <dan(dot)shoubridge(at)autovhc(dot)co(dot)uk>
To: <pgadmin-support(at)postgresql(dot)org>
Subject: Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Date: 2010-11-16 12:14:39
Message-ID: 000701cb8587$d8aa26e0$89fe74a0$@autovhc.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

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

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Guillaume Lelarge 2010-11-16 12:34:59 Re: Feature Request for Debugging SQL in PGAdmin3 when SQL contains variables
Previous Message Guillaume Lelarge 2010-11-15 20:18:31 Re: orphaned runaway queries after killing pgadmin