Page 1 of 2

Possible to convert limits?

PostPosted: Wed Nov 26, 2008 3:04 pm
by C2Knuckles
I have thousands of hands mislabeled as full ring and I would like to convert them to either 6max or 1-on-1. With PT2 it's a piece of cake to do that but I can't seem to be able to do it with PT3. Are there any tricks to accomplish this?

Re: Possible to convert limits?

PostPosted: Wed Nov 26, 2008 3:34 pm
by kraada
There is no built in way to do this in PT3, but it will be coming eventually.

You might be able to get this working via a direct PostgreSQL query, though.

Start --> Programs --> PostgreSQL --> psql to 'postgres' (it might be psql to 'template1', either way, psql into something).

At the prompt type:
\connect "your database name"
(so if it were "PT3DB" it'd be \connect PT3DB)

Then type:

SELECT * from holdem_limit;

and hit enter (don't forget the semicolon, you won't see any output without it).

Find the limit you're going to want to convert the other limit INTO (So if you're looking for $6NL (6max), find that from the list) and write down on a piece of paper, or otherwise remember, the id_limit entry (the one all the way on the left).

Then you need to know the table name for the sessions you are trying to update. (Look in your sessions list of PT3 if you don't know the table name.)

For each table name you want to update, run the following query, replacing TableName with the name of the table, and LimitID with the ID you got in the last step.

UPDATE holdem_table_session_summary SET id_limit = LimitID FROM holdem_table WHERE holdem_table.id_table = holdem_table_session_summary.id_table and holdem_table.table_name='TableName';

Note those quotes are necessary especially if you have a table name with spaces.

It will then say UPDATE and a number, which is how many rows were updated.

If you want to do this for multiple tables at once, use this (slightly modified) query:
UPDATE holdem_table_session_summary SET id_limit = LimitID FROM holdem_table WHERE holdem_table.id_table = holdem_table_session_summary.id_table and holdem_table.table_name in ('TableName1', 'TableName2', 'TableName3');

and you can add as many table names as you'd like to that list, just make sure it's in single quotes just as I have it above and it should work fine.

Good luck.

Re: Possible to convert limits?

PostPosted: Wed Nov 26, 2008 10:26 pm
by C2Knuckles
Thanks, but I'm stuck at the beginning, can't get past here:

Image
Image

Re: Possible to convert limits?

PostPosted: Thu Nov 27, 2008 5:25 am
by WhiteRider
You will need to put your database name in quotes.
\connect "Short-Handed NLHE Database"

Re: Possible to convert limits?

PostPosted: Mon Dec 01, 2008 2:05 pm
by C2Knuckles
Image
Image

I typed it in exactly as it appears when I look up the database name.

Re: Possible to convert limits?

PostPosted: Mon Dec 01, 2008 4:05 pm
by WhiteRider
I think that you are using the database label rather than it's actual name.
Type at that command line:
/l

This will list the database names.

Re: Possible to convert limits?

PostPosted: Mon Dec 01, 2008 7:43 pm
by C2Knuckles
Thanks, that problem solved. Now I can't get passed the next step. :|

Image
Image

Re: Possible to convert limits?

PostPosted: Tue Dec 02, 2008 5:35 am
by WhiteRider
Kraada's directions say:
SELECT * from holdem_limit;

Re: Possible to convert limits?

PostPosted: Tue Dec 02, 2008 11:07 am
by C2Knuckles
Opps, wrong screenshot, I tried more than one way, just getting error after error.

Image
Image

Re: Possible to convert limits?

PostPosted: Tue Dec 02, 2008 11:17 am
by WhiteRider
I'll get kraada to take another look at this..

highfalutin