query returning no lines

2001-10-16 Thread Guido Notari

I have a rather nasty problem with pgAdmin, verified today when I
installed version .59
On reinstalling version .34, I verified having the same problem --
didn't notice it before...

The problem is, on executing an 'arbitrary SQL query', a rather complex
one, I continue to obtain a dialog box stating 'Query Executed OK!',
with no lines returned.

Exactly the same query, executed on the same database, returns 8 rows
both in psql and in pgaccess -- verified copying and pasting it, reading
it from the same file, etc, etc.

I'm rather lost, am I overlooking something, or...?

Ciao
Guido









Re: query returning no lines

2001-10-16 Thread Guido Notari

> I have a rather nasty problem with pgAdmin, verified today when I
> installed version .59
> On reinstalling version .34, I verified having the same problem --
> didn't notice it before...
>
> The problem is, on executing an 'arbitrary SQL query', a rather
complex
> one, I continue to obtain a dialog box stating 'Query Executed OK!',
> with no lines returned.

I'll answer to myself, as I found the problem:

The query being processed and returning no lines, began with a
   select
i.e. a line with leading spaces before the keyword "select"

Removing the spaces, the query got processed as expected, returning n
lines..

Ciao
Guido









Save DB Schema

2001-10-16 Thread Wendt, Marian

Hi pgAdmin Development Team,

(following relates to pgAdminII version 1.1 build 59)

I imagine there's a little lack in your 
function "Save DB schema", so I will 
explain by example:

If you want to create a function, you can
do this with PSQL and a SQL script file -
if so, then the following syntax will bring
you the on the right way:

CREATE FUNCTION idics_track_revision_ins () RETURNS opaque AS '
  BEGIN
IF NEW.revcdate ISNULL THEN
  NEW.revcdate := ''now'';
END IF;
RETURN NEW;
  END;
' LANGUAGE 'plpgsql';

This creates the function well.

Note the double '' to use timestamp function "now" and
the syntax of the CREATE FUNCTION line.

pgAdminII export (and show) this as:

CREATE FUNCTION "idics_track_revision_ins"() RETURNS "opaque" AS '
  BEGIN
IF NEW.revcdate ISNULL THEN
  NEW.revcdate := 'now';
END IF;
RETURN NEW;
  END;
' LANGUAGE 'plpgsql';

Further use by PSQL was impossible.

pgAdminII was well designed to create and manage the database
but in case on install a ready designed database on a new host
the good old psql was the quickest way.

2. I know, christmas is not too far away - so here's a wish you
could simple fulfill:

PLEASE make all areas of pgAdminII "resizesable" (especially I 
mean the 'Definition' area, that is a very great idea to show
for control purposes, but in now it can only enlarged to the 
whole client area).

Greetings

Marian









Re: query returning no lines

2001-10-16 Thread Dave Page



> -Original Message-
> From: Guido Notari [mailto:[EMAIL PROTECTED]] 
> Sent: 16 October 2001 17:03
> To: [EMAIL PROTECTED]
> Subject: Re: [pgadmin-support] query returning no lines
> 
> 
> > I have a rather nasty problem with pgAdmin, verified today when I 
> > installed version .59 On reinstalling version .34, I 
> verified having 
> > the same problem -- didn't notice it before...
> >
> > The problem is, on executing an 'arbitrary SQL query', a rather
> complex
> > one, I continue to obtain a dialog box stating 'Query 
> Executed OK!', 
> > with no lines returned.
> 
> I'll answer to myself, as I found the problem:
> 
> The query being processed and returning no lines, began with a
>select
> i.e. a line with leading spaces before the keyword "select"
> 
> Removing the spaces, the query got processed as expected, 
> returning n lines..

Thanks for this info Guido. As you noticed the extra spaces will cause this
problem (the beginning of the query is checked to determine whether rows are
expected back from the server). I will fix this right away...

Regards, Dave.