Re: [SQL] graphical interface - admin
On Friday 28 June 2002 17:30, Josh Berkus wrote: > David, > > > As for what I first said in this mail, I'll launch the development of > > a Kde > > application (I think called KPostgreSQL...), which will have to fit > > the > > following : > > Listen, the PGAdminII "team" (i.e. David Page) is planning to port > PGAdmin to a more OS-independant platform, such as C++ or Java. > Instead of striking out on your own, how about you get together with > them? > > Or, in the short term, you could do the community a huge service just > by ressurecting KPSQL, which died with KDE 1.1. It just needs a KDE > expert to dust it off and make it compatible with KDE 3.0. > > Just my thoughts. I'd just really hate to see another 50% complete > PostgreSQL interface -- we have too many, already. > > -Josh Berkus Take a look at TOra - Toolkit For Oracle: http://www.globecom.se/tora/ It has excellent PostgreSQL support. -- Andreas Joseph Krogh (Senior Software Developer) <[EMAIL PROTECTED]> "Everything should be made as simple as possible, but not simpler" - Albert Einstein ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] graphical interface - admin
On Mon, 1 Jul 2002, Andreas Joseph Krogh wrote: > > Take a look at TOra - Toolkit For Oracle: http://www.globecom.se/tora/ > > It has excellent PostgreSQL support. I tried 1.2.4 but didn't found how to configure tora to work with postgresql. > > Regards, Oleg _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] graphical interface - admin
On Monday 01 July 2002 13:29, you wrote: > On Mon, 1 Jul 2002, Andreas Joseph Krogh wrote: > > Take a look at TOra - Toolkit For Oracle: http://www.globecom.se/tora/ > > > > It has excellent PostgreSQL support. > > I tried 1.2.4 but didn't found how to configure tora to work > with postgresql. I have a version here which works for me: http://www.officenet.no/~andreak/tora-alpha-1.3.4-1static.i686.rpm If you get a core-dump, try temporarily to remove your $HOME/.qt dir. I have not gotten the newer version(1.3.5.1) to work with PostgreSQL(I only get Oracle and MySQL in the combo-box even though its staticly linked with pgsql). -- Andreas Joseph Krogh (Senior Software Developer) <[EMAIL PROTECTED]> "Everything should be made as simple as possible, but not simpler" - Albert Einstein ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] graphical interface - admin
On Mon, 1 Jul 2002, Andreas Joseph Krogh wrote: > On Monday 01 July 2002 13:29, you wrote: > > On Mon, 1 Jul 2002, Andreas Joseph Krogh wrote: > > > Take a look at TOra - Toolkit For Oracle: http://www.globecom.se/tora/ > > > > > > It has excellent PostgreSQL support. > > > > I tried 1.2.4 but didn't found how to configure tora to work > > with postgresql. > > I have a version here which works for me: > http://www.officenet.no/~andreak/tora-alpha-1.3.4-1static.i686.rpm > > If you get a core-dump, try temporarily to remove your $HOME/.qt dir. > > I have not gotten the newer version(1.3.5.1) to work with PostgreSQL(I only > get Oracle and MySQL in the combo-box even though its staticly linked with > pgsql). How did you configure sources ? There is no --with-pgsql option > > Regards, Oleg _ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] graphical interface - admin
On Monday 01 July 2002 15:00, Oleg Bartunov wrote: > On Mon, 1 Jul 2002, Andreas Joseph Krogh wrote: > > On Monday 01 July 2002 13:29, you wrote: > > > On Mon, 1 Jul 2002, Andreas Joseph Krogh wrote: > > > > Take a look at TOra - Toolkit For Oracle: > > > > http://www.globecom.se/tora/ > > > > > > > > It has excellent PostgreSQL support. > > > > > > I tried 1.2.4 but didn't found how to configure tora to work > > > with postgresql. > > > > I have a version here which works for me: > > http://www.officenet.no/~andreak/tora-alpha-1.3.4-1static.i686.rpm > > > > If you get a core-dump, try temporarily to remove your $HOME/.qt dir. > > > > I have not gotten the newer version(1.3.5.1) to work with PostgreSQL(I > > only get Oracle and MySQL in the combo-box even though its staticly > > linked with pgsql). > > How did you configure sources ? There is no --with-pgsql option I didn't:-) I downloaded the precompiled static binary. -- Andreas Joseph Krogh (Senior Software Developer) <[EMAIL PROTECTED]> "Everything should be made as simple as possible, but not simpler" - Albert Einstein ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [SQL] graphical interface - admin
On Mon, Jul 01, 2002 at 02:29:27PM +0300, Oleg Bartunov wrote: > > I tried 1.2.4 but didn't found how to configure tora to work > with postgresql. Tora is very nice. I'm using 1.3.5 with PG 7.2 (Debian). I had to compile the PostgreSQL Qt 3 module for it to work. -Roberto -- +| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |--+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer * * * <- Tribbles § § § <- teenage mutant ninja tribbles ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] pl/pgsql capabilities?
On Mon, Jul 01, 2002 at 01:43:29AM +0200, Ferenc Engard wrote: > Hi all, > > A long time ago (at version 6.3.2 or what :) I have asked, but maybe > since it changed: can I use the procedural languages (any of them) to > return a table- (or view-) like output, just like in Interbase, for > example? E.g., if I have a metamodel and I want to write functions what > perform complex computations and queries, can they return the result > (which can be of many rows) to the client? As of PG 7.2 you can, by returning a cursor: http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html -Roberto -- +| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |--+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer I wonder if Singapore has any computer pirateers or hackers... ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[SQL] Using union to avoid creating temp table
I don't know if this is a well known trick or not. I wanted to check a list of values inputted to a script against some existing tables. I was trying to think of alternatives to using a temp table and copy since this would take two requests instead of one. What I ended up doing is building the input values into sepearte select statements unioned together. So if the input values were 'abc', 'def' and 'ghi', I would end up doing a select like: select add.id from (select 'abc' union select 'def' union select 'ghi') add (id)where not exists (select from role where add.id = role.id) I don't know whether or not this is faster in general, but it probably is under at least some circumstances. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[SQL] unsubscribe
unsubscribe su www.tim.it puoi iscriverti gratis alle TimNews, un modo rapido e tempestivo per conoscere le ultime novita di TIM. ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html
Re: [SQL] Using union to avoid creating temp table
Bruno Wolff III <[EMAIL PROTECTED]> writes: > What I ended up doing is building the input values into sepearte > select statements unioned together. So if the input values were > 'abc', 'def' and 'ghi', I would end up doing a select like: > select add.id from (select 'abc' union select 'def' union select 'ghi') add >(id)where not exists (select from role where add.id = role.id) Might be worth writing "union all" not "union". This suppresses union's check for duplicated rows, which you presumably don't need. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] pg_restore cannot restore function
Jie Liang wrote: > > Oops,my OS is FreeBSD4.3 PostgreSQL7.2 I cannot see such an error message in the pg_restore sources at all. Are you sure to use the right versions together? Jan > > Thanks > > Jie Liang > > -Original Message- > From: Jie Liang > Sent: Friday, June 28, 2002 1:46 PM > To: 'Jan Wieck' > Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' > Subject: RE: [SQL] pg_restore cannot restore function > > No any error msg in the logfile, I didn't see any create function statement > in my logfile which I enabled the query log. > This function is written in PL/pgSQL which is enabled in target db, > If I pg_dump the schema into a plain text file, I can see its defination > there, I can easily copy & paste (restore) it into mydb2. > however, I failed to restore it by using flag -P with compressed file. > I also tried to use > su postgres -c "/usr/local/pgsql/bin/pg_restore --function=myfunction > --dbname=mydb2 dbf" > error msg > pg_restore: [archiver] could not open input file: No such file or directory > > weird??? > > I use > pg_restore -Rxt mytable -d mydb2 dbf > have no such a problem, it works. > > Is any syntax error?? > I am confused by documentation now! > Is it a bug > > Thanks > > Jie Liang > > -Original Message- > From: Jan Wieck [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 28, 2002 12:39 PM > To: Jie Liang > Cc: 'Bruce Momjian'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' > Subject: Re: [SQL] pg_restore cannot restore function > > Jie Liang wrote: > > > > I use > > pg_dump -Fc mydb > dbf > > then I create another db by: > > createdb mydb2 > > I use > > pg_restore -P myfunction -d mydb2 dbf > > > > cannot restore myfunction into mydb2 > > > > why?? > > Good question. Is there any error message in the postmaster log? > > If the function is written in a procedural language, is that language > enabled in the target database? If the function is written in the SQL > language, do all underlying objects like tables and views exist? If it's > a C language function, does the shared object containing the function > exist at the expected location? > > Jan > > -- > > #==# > # It's easier to get forgiveness for being wrong than for being right. # > # Let's break this rule - forgive me. # > #== [EMAIL PROTECTED] # -- #==# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #== [EMAIL PROTECTED] # ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [SQL] pl/pgsql capabilities?
> > since it changed: can I use the procedural languages (any of them) to > > return a table- (or view-) like output, just like in Interbase, for > > example? E.g., if I have a metamodel and I want to write functions what > > perform complex computations and queries, can they return the result > > (which can be of many rows) to the client? > > As of PG 7.2 you can, by returning a cursor: > > http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html If I understand well, I can create a cursor for a SELECT statement, and return that cursor. Well, it is better than nothing, but I fear it is not flexible enogh for me. Here is an example from an interbase app. I have to declare that this is not my program, and I do not know IB, so forgive me if I say silly things... CREATE PROCEDURE VIEW_1_1 ( SZEMPONTID INTEGER, PARENT CHAR(10) CHARACTER SET WIN1250, ELNEVEZESTIPUSID INTEGER, RENDSZERKOD CHAR(16) CHARACTER SET WIN1250 ) RETURNS ( CHILD VARCHAR(10) CHARACTER SET WIN1250, GYERMEKDB INTEGER, OSZTALYTIPUSID INTEGER, NORMATIVNEV VARCHAR(30) CHARACTER SET WIN1250, TIPUSNEV VARCHAR(30) CHARACTER SET WIN1250, NORMATIVKOD VARCHAR(30) CHARACTER SET WIN1250, TIPUSKOD VARCHAR(30) CHARACTER SET WIN1250 ) AS BEGIN FOR SELECT D1.CHILD, D2.TYPEID FROM HIERARCHIA D1, OSZTALY D2 WHERE D1.PARENT = :PARENT AND D1.SZEMPONTID=:SZEMPONTID AND D1.CHILD = D2.OSZTALYKOD ORDER BY D1.SORREND INTO :CHILD, :OSZTALYTIPUSID DO BEGIN SELECT COUNT(CHILD) FROM HIERARCHIA WHERE PARENT = :CHILD AND SZEMPONTID = :SZEMPONTID INTO :GYERMEKDB; EXECUTE PROCEDURE VIEW_ELNEVEZES(:ELNEVEZESTIPUSID, :RENDSZERKOD, NULL, NULL, NULL, NULL, NULL, :CHILD, NULL) RETURNING_VALUES :NORMATIVNEV, :TIPUSNEV, :NORMATIVKOD, :RENDSZERKOD; SUSPEND; END END The point is not what this proc does (in summary, it gets all the childs with their properties of a parent in a tree structure), but it cannot gather all the information with just one select, e.g. it gets some data from another (nontrivial) stored procedure. As I see, that 'suspend' command gives back the actual row (and the control) to the caller until it fetches the next row from this proc's return value. Do I interpret correct that this stored proc returns a cursor with structure described in the 'RETURNS' part, and which is not linked to a SELECT statement? Can I do something similar in PG? If not now, maybe in the (near) future? Thanks: Circum ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [SQL] pl/pgsql capabilities?
On Tue, Jul 02, 2002 at 01:37:08AM +0200, Ferenc Engard wrote: > > If I understand well, I can create a cursor for a SELECT statement, and > return that cursor. Well, it is better than nothing, but I fear it is > not flexible enogh for me. Maybe not for the solution you have right now, but you most likely can rework things a bit to make it work. > Here is an example from an interbase app. I have to declare that this is > not my program, and I do not know IB, so forgive me if I say silly > things... > > CREATE PROCEDURE VIEW_1_1 > ( > SZEMPONTID INTEGER, > PARENT CHAR(10) CHARACTER SET WIN1250, > ELNEVEZESTIPUSID INTEGER, > RENDSZERKOD CHAR(16) CHARACTER SET WIN1250 > ) ... > The point is not what this proc does (in summary, it gets all the childs > with their properties of a parent in a tree structure), but it cannot > gather all the information with just one select, e.g. it gets some data > from another (nontrivial) stored procedure. > > As I see, that 'suspend' command gives back the actual row (and the > control) to the caller until it fetches the next row from this proc's > return value. Do I interpret correct that this stored proc returns a > cursor with structure described in the 'RETURNS' part, and which is not > linked to a SELECT statement? > > Can I do something similar in PG? If not now, maybe in the (near) > future? Not in the way you currently have, as far as I could understand it. I didn't read the procedure very attentively because it's horribly written in all caps, and my eyes started scrambling the letters half way through. -Roberto -- +| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |--+ Roberto Mello - Computer Science, USU - http://www.brasileiro.net/ http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer "Data! I thought you were dead!" "No, Sir. I rebooted." ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])