Can't query test DB from PgAdmin
Results 1 to 10 of 10
  1. #1
    Senior Member
    Join Date
    Nov 2010
    Posts
    159

    Default Can't query test DB from PgAdmin

    I created a new db that only has 31 hands in it to mess around with SQL but I cant query it for some reason.

    I am a total noob with this stuff and I dont want to damage my real DB. I inserted this code from a twoplustwo thread
    Code:
    SELECT *
    FROM aliases a JOIN players p ON a.player_id = p.player_id
    WHERE playername = 'Villain';
    and got the table headers but no info on the "test" db. When I entered the same code for HM2 db it returned the correct data. What am I doing wrong?

  2. #2
    Senior Member
    Join Date
    Nov 2010
    Posts
    159

    Default

    This is not really related but how does HM retrieve stats? The "players" table only has like 4 columns and the only other table I saw that had anything like HUD stats was "compiledplayerresults" but that had no where near all the info found on the hud. Does HM somehow calculate those stats directly from HH's without first putting them in a table? I am trying to figure out how to most easily group all opponents with a given stat range, hopefully using an SQL query.

  3. #3
    *** HM3! *** fozzy71's Avatar
    Join Date
    Jun 2005
    Location
    HM Support
    Posts
    32,803

    Default

    Which thread is this code from? The thread about joining screen names to create an alias? Is the query code you posted actually for HM2 or is it for HM1 or PT3/4?

    None of us on the tech support team are programmers or have postgresql knowledge, and our database schema* is not made public, so we can't help you with these questions. If you have questions about the HMQL report and how to use it you can post in the HMQL API sticky thread and we can forward those questions to the developer of that report but I don't think we can ask the developers to answer these questions as what you are trying to do is likely impossible in HM2.

    *The HM2 Database Schema is completely unique due to the fact that we put some of the data in our own proprietary flat files for the player related hand data. This approach means that you can't use most/any postgresql queries like you could in HM1 or PT3/4 which is why we developed the HMQL Report API.

  4. #4
    Senior Member
    Join Date
    Nov 2010
    Posts
    159

    Default

    Quote Originally Posted by fozzy71 View Post
    Which thread is this code from? The thread about joining screen names to create an alias? Is the query code you posted actually for HM2 or is it for HM1 or PT3/4?

    None of us on the tech support team are programmers or have postgresql knowledge, and our database schema* is not made public, so we can't help you with these questions. If you have questions about the HMQL report and how to use it you can post in the HMQL API sticky thread and we can forward those questions to the developer of that report but I don't think we can ask the developers to answer these questions as what you are trying to do is likely impossible in HM2.

    *The HM2 Database Schema is completely unique due to the fact that we put some of the data in our own proprietary flat files for the player related hand data. This approach means that you can't use most/any postgresql queries like you could in HM1 or PT3/4 which is why we developed the HMQL Report API.
    Ok, well that kinda sux. So I am assuming this is not worth investigating further with me being the lowest level amateur DB user? I absolutely require this functionality so my next step is going to be to write a brute force screen-scrape-based search function in autoit but this will take me a very long time and it will be, to say the least, a bit less computationally efficient than running SQL queries. Is there any possibility of gaining this functionality through SQL (grouping players by specific stats) in <100 hours here?


    And you say "like you could in HEM1/PT3/4". Is there any way I could download HM1 and export my DB to that then run the queries? Does the HM1 DB contain tables with either recognizable HUD stats or information from which those hud stats could be easily derived?
    Last edited by mjackson; 02-08-2015 at 09:03 PM.

  5. #5
    Senior Member
    Join Date
    Nov 2010
    Posts
    159

    Default

    Sorry for how convoulted this thread is but I also wanted to figure out my first question. I had created a DB called "test" which consisted of 31 hands. I selected test and attempted to run a few basic queries, none of which returned any results except the expected headers for each table that was queried. However when I ran the same queries on my main DB all worked perfectly fine. I must be doing something basic wrong wrt the "test" db, any ideas?

  6. #6
    Senior Member
    Join Date
    Nov 2010
    Posts
    159

    Default

    I would also say that because the very logical path I have followed thus far has now reached the place where I need to essentially write my own tracking software to extract information from my tracking software, be it by creating new tables based on raw HH data in SQL or by screen scraping the interface directly and writing all the matrices and other relevant code to store info, it seems like this would be a logical feature to include, hopefully soon, so that your customers aren't being forced to reinvent wheels, plows etc.

  7. #7
    You're out! udbrky's Avatar
    Join Date
    Jul 2008
    Posts
    20,898

    Default

    I have escalated your issue to our 2nd level support techs and they will respond to your email as soon as possible.
    Regards udbrky (Chris)

  8. #8
    Tech Support Manager morny's Avatar
    Join Date
    Jul 2008
    Location
    Ireland
    Posts
    20,888

    Default

    Hi, can you confirm what database your trying to create the Query from, is it a HM1 database or HM2 database. Taking into consideration we no longer support HM1 and this is the HM2 forums im guessing its probably HM2's database although you mentioned

    When I entered the same code for HM2 db it returned the correct data.
    So i am not sure if it is a HM2 database.

    HM2 database structure is quite different from HM1, with HM1 everything was stored in PostgreSQL but in HM2 we use both PostgreSQL and a flat file system as we load a lot of the player data into memory. Those files are in your C:\Users\YourName\AppData\Roaming\HoldemManager\Da tabase folder and as you will see the wont be easy to figure out as there is no schema.

    We do however have an API which uses HMQL to access the data but it is limited in its capability. You can read more about the API here:
    http://forums.holdemmanager.com/gene...ger-2-api.html

    To be honest we are not putting a lot of focus on developing the API right now but that might change in the future but we have a full plate with other development work at the moment. Hopefully you can get the information you need from what we have already implemented.
    --------------------------------------------------------------------------------------------------------------------
    We welcome any feedback on any solutions we provide, this helps us to provide better quality solutions in the future.

  9. #9
    Senior Member
    Join Date
    Nov 2010
    Posts
    159

    Default

    So all data in HM1 is easily accessed though the PgAdmin query tool? Can I download HM1 somewhere and simultaneously run both HM1 and HM2? If not and assuming what I'm trying to do is more easily accomplished via HM1 can I still download it somewhere and run it on a separate machine?

  10. #10
    *** HM3! *** fozzy71's Avatar
    Join Date
    Jun 2005
    Location
    HM Support
    Posts
    32,803

    Default

    You should not run both at the same time while playing but you can import the hands from the \HM2Archive to HM1 if you have a HM1 license. The problem is that HM1 hasn't been updated in over a year, and won't ever be updated again, so you may get import errors depending on the sites/games you play. The download for HM1 is on the same page as our HM2 downloads. Here is a direct link - http://www.holdemmanager.com/downloa...ager_Setup.exe

Similar Threads

  1. Can't log into PgAdmin III
    By mjackson in forum General Support
    Replies: 2
    Last Post: 02-04-2015, 02:11 AM
  2. SQL Query in pgadmin - tuto for HM/poker databases
    By Flowers in forum General Support
    Replies: 10
    Last Post: 12-22-2013, 12:10 PM
  3. PGadmin
    By ProfesorKaos in forum Manager General
    Replies: 1
    Last Post: 08-31-2011, 02:09 PM
  4. No pgAdmin III
    By 5204salty in forum Manager General
    Replies: 3
    Last Post: 03-04-2010, 10:54 PM
  5. pgAdmin databases
    By runhot in forum Manager General
    Replies: 1
    Last Post: 02-02-2010, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •