Обсуждение: Stored Procedures and pgAdmin

Поиск
Список
Период
Сортировка

Stored Procedures and pgAdmin

От
howler@bigbadwolf.org
Дата:

Hello Everyone,

I'm a newbie to PostgreSQL and pgAdmin. I apologize if this has been answered
before, and I'm sure it has, but I've not found the answer yet. What I would
like to know is how do I add a stored proc to PostgreSQL using pgAdmin?

I've tried creating a new stored function and such, but after I select the
procedure name, return type etc, and go to the SQL tab I am unable to enter my
SQL statments.  I'm sure that I'm not doing something correctly as it occurs on
both Linux and Windows.

If there is documentation on how to do this would someone please be so kind as
to send me a link? I'm not adverse to reading. :-)

Thanks in advance,
John Brosan


Re: Stored Procedures and pgAdmin

От
howler@bigbadwolf.org
Дата:
Cheetah,

Thanks a bunch! I was unsure what that box was for.  I'll give this a shot when
I get home.

Thanks,
John


Quoting Cheetah <fastcat@gmail.com>:

> On Thu,  7 Oct 2004 16:36:50 -0400, howler@bigbadwolf.org
> <howler@bigbadwolf.org> wrote:
> >
> > I've tried creating a new stored function and such, but after I select the
> > procedure name, return type etc, and go to the SQL tab I am unable to enter
> my
> > SQL statments.  I'm sure that I'm not doing something correctly as it
> occurs on
> > both Linux and Windows.
>
> On the tab with the parameter and return types, there is a (poorly
> labeled) field for you to enter the code for your stored procedure.
> pgAdmin will nicely take care of escaping things like single quotes
> for you when you enter your code here, which is a definite bonus IMO.
> The SQL tab is a readonly thing to let you see what will be sent to
> the server when you hit OK/Apply.
>
> --
>     -- Cheetah
>





Function editor

От
"Tony Caduto"
Дата:
Hi,
I have been using PG Admin 3 for about 5 months now and mostly it is a great
program, however the function editor window is driving me nuts.
I know I have been told that if I simply resize it the problems will go
away, and they do for awhile.
The problem is I am so used to using the maximize button in every single
other windows app out there.
The way the PGadmin 3 function editor window behaves is not like any other
windows app I have ever used.(even junky outlook express does not do this)
I don't have one single app on my pc where the window will open off to the
lower left of the screen if you maximize it.

Can the developers please do something about this weird behavior?
And please don't tell me it is the way it should be...  I have several other
developers who I have introduced to PGAdmin III and they all complain about
the function editor.
Could you at least make it open center screen?  or how about adding a simple
preference option that if checked the function editor would simply open
maximized, it does not block the desktop when maximized and I am sure most
users maximize the window anyway.
It is a royal pain to have to manually resize it everytime I open a new
function.

Is what I am asking impossible?  Please at least add a option so we the
users can choose the behavior we prefer.

Thanks for listening.

Tony Caduto
Senior Programmer/Analyst
M&I Trust




Bug

От
"Tony Caduto"
Дата:
When creating a new function if you select the owner, and in my case the
only one available in the picklist is postgres, the function will fail to
create.
To reproduce, just pick a owner name and then try to create the function.

It works fine if you leave it blank, but for many new users who don't know
this it causes problems.  I had a developer who works with me spend a hour
trying to get his function to work until he finally ask for help.


Thanks,

TC




Re: Function editor

От
Andreas Pflug
Дата:
Tony Caduto wrote:
> Hi,
> I have been using PG Admin 3 for about 5 months now and mostly it is a great
> program, however the function editor window is driving me nuts.
> I know I have been told that if I simply resize it the problems will go
> away, and they do for awhile.
> The problem is I am so used to using the maximize button in every single
> other windows app out there.
> The way the PGadmin 3 function editor window behaves is not like any other
> windows app I have ever used.(even junky outlook express does not do this)
> I don't have one single app on my pc where the window will open off to the
> lower left of the screen if you maximize it.
> 
> Can the developers please do something about this weird behavior?


This is win32 weird behaviour, returning bogus sizes/positions if 
maximized. consequently, values are out of range if restoring previous 
positions. Several apps will display the window of the screen in that 
situation (e.g. xrced), pgadmin will push it back on screen.
Do not maximize, instead resize to your preferred size without using 
that F***ing maximize button to enable pgadmin's position remembering 
feature.

Don't complain about this to me. I don't ever use maximize, because it 
disables D&D. wxWidgets can't handle it, and unless somebody else wants 
to implement this specifically it will stay like this.

Regards,
Andreas


Re: Function editor

От
Andreas Pflug
Дата:
Tony Caduto wrote:
> It is a royal pain to have to manually resize it everytime I open a new
> function.
> 
> Is what I am asking impossible?  Please at least add a option so we the
> users can choose the behavior we prefer.

I'm a bit tired arguing again and again why maximizing can't be handled 
on win32 with wxWidgets. As a consequence to this repeating request I've 
removed the "grab the whole screen and screw up all size handling", 
misleadingly called "maximize window", on win32.

NB: GTK works as expected.

Regards,
Andreas


Re: Bug

От
Andreas Pflug
Дата:
Tony Caduto wrote:
> When creating a new function if you select the owner, and in my case the
> only one available in the picklist is postgres, the function will fail to
> create.
> To reproduce, just pick a owner name and then try to create the function.

I can't reproduce this on 8.0.
Apparently owner isn't supported on older versions, I'll change pgAdmin 
accordingly.

Regards,
Andreas



Re: Function editor

От
"Tony Caduto"
Дата:
Andreas,
The point is you are not the only user of this software, and many many
others DO use the maximize button.
I don't have anyone else to complain to :-)
I could do it myself, but I would have to learn C++ and Wxwidgets and it
would probably take me weeks to get up to speed with it, but you on the
other hand should be able to resolve this by simply making the form open
center screen like it does in the stable release from last year.
I could easily write a similar program in Borland Delphi,but I like PG Admin
III and I don't have time to make a new one that has a correct functioning
editor.

Can't you guys at least make it optional to open center screen, or just open
maximized right off the bat?

I don't think I am asking for much here.

Thanks,

Tony Caduto

> Don't complain about this to me. I don't ever use maximize, because it
> disables D&D. wxWidgets can't handle it, and unless somebody else wants
> to implement this specifically it will stay like this.
>
> Regards,
> Andreas
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>




Re: Function editor

От
Andreas Pflug
Дата:
Tony Caduto wrote:
> Andreas,
> The point is you are not the only user of this software, and many many
> others DO use the maximize button.
> I don't have anyone else to complain to :-)
> I could do it myself, but I would have to learn C++ and Wxwidgets and it
> would probably take me weeks to get up to speed with it, but you on the
> other hand should be able to resolve this by simply making the form open
> center screen like it does in the stable release from last year.
> I could easily write a similar program in Borland Delphi,but I like PG Admin
> III and I don't have time to make a new one that has a correct functioning
> editor.
> 
> Can't you guys at least make it optional to open center screen, or just open
> maximized right off the bat?
> 
> I don't think I am asking for much here.

There will be no maximize support in win32 from me, and the issue has 
been discussed in-deep several times now, scan the archives.

Do resize the window, and your preferred size/position will be saved. 
The next snapshot (upload tonight) has the maximize button removed.

Regards,
Andreas


Re: Function editor

От
Tony Caduto
Дата:
I still don't understand why you are being so unflexible on this matter, even 
removing the maximize button is going to be inconvienient.

I don't know about you but when I am editing a function I like as much real 
estate as possible, and maximizing gives me every pixel.

The function editor should be maximized by default if you ask me and it should 
be show in the task bar and be able to minimize.
Right now if you open up more than one function, you have to drag the other 
one out of the way, This realy needs to be addressed.

Have you ever used Word or any other major windows application, none of them 
behave like PG Admin III when it comes to editing something.

I am sorry, but I believe you are wrong about this and you are just being bull 
headed/stubborn.

I am not trying to be a pest, but how difficult would it be to have a simple 
registry entry and if it's true maximize the the window. or a INI fle or a 
conf file whatever....
If Wxwindows is this un flexible you should have used something else....


If PG Admin III can't accomodate this very simple request I will have to stop 
recommending it and I will create a clone in Delphi where there are no issues 
with form maximizing and position.


Thanks,

Tony Caduto



> There will be no maximize support in win32 from me, and the issue has
> been discussed in-deep several times now, scan the archives.
>
> Do resize the window, and your preferred size/position will be saved.
> The next snapshot (upload tonight) has the maximize button removed.
>
> Regards,
> Andreas
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org

-- 
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com


Re: Function editor

От
Andreas Pflug
Дата:
Tony Caduto wrote:
> I still don't understand why you are being so unflexible on this matter, even 
> removing the maximize button is going to be inconvienient.
> 
> I don't know about you but when I am editing a function I like as much real 
> estate as possible, and maximizing gives me every pixel.
> 
> The function editor should be maximized by default if you ask me and it should 
> be show in the task bar and be able to minimize.
> Right now if you open up more than one function, you have to drag the other 
> one out of the way, This realy needs to be addressed.
> 
> Have you ever used Word or any other major windows application, none of them 
> behave like PG Admin III when it comes to editing something.
> 
> I am sorry, but I believe you are wrong about this and you are just being bull 
> headed/stubborn.


Provide a viable patch or shut up.