Re: [pgadmin-hackers] query builder / system objects
sorry, forgot to hit reply to all... = dave, thanks for the advice. in other news, i've got a pretty hefty update coming your way. i've got a rudimentary query builder fully functional. it's got a lot of work yet to come, but i want you to see the executable and tell me what you think. i think it's really cool so far and would like some feedback. a zipped exec is about 1 meg. let me know if you want that emailed to you ... i prefer not to email it to the list since it is quite large. after you see the exec, and if you like where i'm going with the query builder, i can make a patch. i've made a lot of code changes. mostly i added several classes, but i found some bugs that i tweaked in the main code ... the only reason i changed them is because i needed the functionality for my component. also, i added some system settings functions and what not to store the query builder size and position. etc ad nauseum. let me know. thanks again. ps as for the cache ... i'll think on it. i really hadn't even given cache much thought, i'm just running raw queries. i know, that's probably bad. :) -keith -Original Message- From: Dave Page [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 04, 2003 1:56 AM To: efesar; pgadmin-hackers Subject: RE: [pgadmin-hackers] query builder / system objects Hi Keith, This raises a point I'd not thought of before. In pgAdmin II we load all object, system or not into pgSchema. We then just display whatever is required. This allows us to use pgSchema as a cache for future queries - ie. When we look for all functions in the CREATE OPERATOR dialogue, we just load everything from the Functions collection. In pgAdmin III, the hierarchy is built on the treeview, so how do we cache everything in the same way? I have to be honest, I haven't thought about any of this for a while now 'cos I've been too busy, but I might have some time in the next couple of weeks. Anyway, to answer your question, in pgSchema we say (attnum 1) = System. To check for views and tables, well this is easy now - if they are in the pg_catalog, pg_temp or pg_temp_* schemas, then they are system object. pgAdmin III is being written for 7.3+, so we know schemas will always exist. Regards, Dave. -Original Message- From: efesar [mailto:[EMAIL PROTECTED] Sent: 04 March 2003 00:19 To: pgadmin-hackers Subject: Re: [pgadmin-hackers] query builder / system objects correction relowner 1 instead of =1 // We need to know if we're going to show system objects wxString sysobjstr; if (!settings-GetShowSystemObjects()) sysobjstr = AND relowner 1 ; -Original Message- From: efesar [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 5:18 PM To: pgadmin-hackers Subject: query builder / system objects dave, pga3 question i can tell system columns easily (and hopefully correctly): // We need to know if we're going to show system objects wxString sysobjstr; if (!settings-GetShowSystemObjects()) sysobjstr = WHERE attnum = 0 ; but is this an adequate way to check for system tables/views? this is what i'm using now. // We need to know if we're going to show system objects wxString sysobjstr; if (!settings-GetShowSystemObjects()) sysobjstr = AND relowner = 1 ; the other way i was going to do it was if the first three letters are PG_ but maybe you have a more correct way of doing this. -keith ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED]) ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[pgadmin-hackers] idea error Handler
Current error Handler in first line of routine is : On Error GoTo Err_Handler In ide this method is not good because is not possible to debug routine when when it comes generated an error. Change all routine using If InIDE Then: On Error GoTo 0: Else: On Error GoTo Err_Handler: The InIDE is the global variable which indicate if program running in VB Design Environment (ide). This is a method to retrive if execution is in ide. -- '''module global Global InIDE As Boolean '''module api Public Declare Function GetModuleFileName Lib kernel32 Alias GetModuleFileNameA (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long '''module misc sub main InIDE = InVBDesignEnvironment end sub 'verify if execution of pgAdin2 is in ide Public Function InVBDesignEnvironment() As Boolean Dim szFileName As String Dim lCount As Long szFileName = String(255, 0) lCount = GetModuleFileName(App.hInstance, szFileName, 255) szFileName = Left(szFileName, lCount) InVBDesignEnvironment = False If UCase(Right(szFileName, 7)) = VB6.EXE Then InVBDesignEnvironment = True End Function Bye !! Frank Lupo (Wolf) !! /\_ _/\ \ o o / --ooo-ooo--- -- Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f Sponsor: Speciale voli a soli 80 Euro...affrettatevi, cliccate e partite per la Scandinavia Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1228d=4-3 ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [pgadmin-hackers] query builder / system objects
Hi Keith, This raises a point I'd not thought of before. In pgAdmin II we load all object, system or not into pgSchema. We then just display whatever is required. This allows us to use pgSchema as a cache for future queries - ie. When we look for all functions in the CREATE OPERATOR dialogue, we just load everything from the Functions collection. In pgAdmin III, the hierarchy is built on the treeview, so how do we cache everything in the same way? I have to be honest, I haven't thought about any of this for a while now 'cos I've been too busy, but I might have some time in the next couple of weeks. Anyway, to answer your question, in pgSchema we say (attnum 1) = System. To check for views and tables, well this is easy now - if they are in the pg_catalog, pg_temp or pg_temp_* schemas, then they are system object. pgAdmin III is being written for 7.3+, so we know schemas will always exist. Regards, Dave. -Original Message- From: efesar [mailto:[EMAIL PROTECTED] Sent: 04 March 2003 00:19 To: pgadmin-hackers Subject: Re: [pgadmin-hackers] query builder / system objects correction relowner 1 instead of =1 // We need to know if we're going to show system objects wxString sysobjstr; if (!settings-GetShowSystemObjects()) sysobjstr = AND relowner 1 ; -Original Message- From: efesar [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 5:18 PM To: pgadmin-hackers Subject: query builder / system objects dave, pga3 question i can tell system columns easily (and hopefully correctly): // We need to know if we're going to show system objects wxString sysobjstr; if (!settings-GetShowSystemObjects()) sysobjstr = WHERE attnum = 0 ; but is this an adequate way to check for system tables/views? this is what i'm using now. // We need to know if we're going to show system objects wxString sysobjstr; if (!settings-GetShowSystemObjects()) sysobjstr = AND relowner = 1 ; the other way i was going to do it was if the first three letters are PG_ but maybe you have a more correct way of doing this. -keith ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED]) ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[pgadmin-hackers] PGAdmin 3 Patch
Dave, Here is my patch file (changes and the relevant new files) for PGAdmin3. Basically it's all related to QueryBuilder. -k www.fearstudios.com www.efesar.com www.efesar.com/blog www.burque.info = I've stopped 6,843 spam messages. You can too! Get your free, safe spam protection at http://www.cloudmark.com/spamnetsig/ Requirements: * Windows 98 / NT / 2000 / XP * Outlook 2000 / XP pgadmin3.keith.2003.03.zip Description: Zip compressed data ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly