How to debug efficiently

Поиск
Список
Период
Сортировка
Искать
От
Jamie Lawrence-Jenner
Тема
How to debug efficiently
Дата
Msg-id
!&!AAAAAAAAAAAYAAAAAAAAACSjyZCDEbJLs7GIuOJ8tGbCgAAAEAAAAORhVzRjH2VNgkgTo2L8ju0BAAAAAA==@autovhc.co.uk
Список
Дерево обсуждения
How to debug efficiently "Jamie Lawrence-Jenner" <jamie.jenner@autovhc.co.uk>
Re: How to debug efficiently Alban Hertroys <dalroi@solfertje.student.utwente.nl>

Hi All

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

I want to do something simular with postgres in pgadmin3 (or another postgres tool, anyy reccomendations?)

I realise you can create pgscript, but it doesn't appear to be very good, for example, if I do the equlivent of above, it doesn't put the single quotes around the value in @x, nor does it let me by doubling them up and you don't get a table out after - only text...

Currently I have a peice of sql someone has written that has 3 unique varibles in it which are used around 6 times each...

So the question is how do other people debug sql this sql EFFICIENTLY, preferably in a simular fashion to my sql server days.

Regards

 

Dan

 

В списке pgsql-general по дате отправления
От: Leonardo F
Дата:
Сообщение: Auto-partitioning in COPY
От: Alban Hertroys
Дата:
Сообщение: Re: How to debug efficiently
FAQ