Skip site navigation (1) Skip section navigation (2)

Re: Calling pgScript from the command line

From: Jeremy Palmer <JPalmer(at)linz(dot)govt(dot)nz>
To: Magnus Hagander <magnus(at)hagander(dot)net>, Dave Page <dpage(at)pgadmin(dot)org>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>,"pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Calling pgScript from the command line
Date: 2011-01-17 21:41:02
Message-ID: 666FB8D75E95AE42965A0E76A5E5337E06D2C68787@prdlsmmsg01.ad.linz.govt.nz (view raw or flat)
Thread:
Lists: pgadmin-support
Wow thanks for the patch Magnus - so fast!

Patch looks great. Is it also possible to update the patch to include the win32 executable into the packaging? i.e pkg/win32/src/pgadmin3.wxs

Cheers
Jeremy

-----Original Message-----
From: Magnus Hagander [mailto:magnus(at)hagander(dot)net] 
Sent: Tuesday, 18 January 2011 2:17 a.m.
To: Dave Page
Cc: Jeremy Palmer; Guillaume Lelarge; pgadmin-support(at)postgresql(dot)org
Subject: Re: [pgadmin-support] Calling pgScript from the command line

On Mon, Jan 17, 2011 at 07:46, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Sun, Jan 16, 2011 at 23:02, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>> On Sun, Jan 16, 2011 at 9:50 PM, Jeremy Palmer <JPalmer(at)linz(dot)govt(dot)nz> wrote:
>>> It would be really awesome for DBAs admins to be able to run pgscripts from the command line which have developed in pgadmin. Even better if the programme is distributed with the standard win32 download.
>>>
>>> Would it be possible to revive it and integrate xtra/pgScript into the pgadmin?
>>
>> Well it's already in the source tree, and already integrated into the
>> pgAdmin GUI. All that is needed is a patch to fix the bitrot. As
>> always, patches are welcome.
>
> Seems the first issue at least comes from patch
> 93834d477cd3fb91deacc0946ef845622fd6678d which removed our md5
> support. But there seems to be other issues as well. If you (=Jeremy)
> want to look at this, that'd be great - if not, I can probably look at
> it, but not right now.
>
> (btw, we really should look at making it not compile pgscript twice -
> once for pgadmin and once for the one in xtra/. But that's something
> for another day :D)

Here's a patch that seems to make it work. The issues were:

* md5 no longer available - but also not needed, removed.
* qtIdent() was not available in commandline mode, but needed. This in
turn required db/keywords.c to be linked in.

Comments/objections on patch?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/
______________________________________________________________________________________________________

This message contains information, which is confidential and may be subject to legal privilege. 
If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message.
If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info(at)linz(dot)govt(dot)nz) and destroy the original message.
LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ.

Thank you.
______________________________________________________________________________________________________

In response to

Responses

pgadmin-support by date

Next:From: Magnus HaganderDate: 2011-01-18 14:12:55
Subject: Re: Calling pgScript from the command line
Previous:From: Magnus HaganderDate: 2011-01-17 13:16:33
Subject: Re: Calling pgScript from the command line

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group