Possible to convert limits?

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Possible to convert limits?

Postby C2Knuckles » Wed Nov 26, 2008 3:04 pm

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?
C2Knuckles
 
Posts: 85
Joined: Sat May 17, 2008 6:11 pm

Re: Possible to convert limits?

Postby kraada » Wed Nov 26, 2008 3:34 pm

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.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Possible to convert limits?

Postby C2Knuckles » Wed Nov 26, 2008 10:26 pm

Thanks, but I'm stuck at the beginning, can't get past here:

Image
Image
C2Knuckles
 
Posts: 85
Joined: Sat May 17, 2008 6:11 pm

Re: Possible to convert limits?

Postby WhiteRider » Thu Nov 27, 2008 5:25 am

You will need to put your database name in quotes.
\connect "Short-Handed NLHE Database"
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Possible to convert limits?

Postby C2Knuckles » Mon Dec 01, 2008 2:05 pm

Image
Image

I typed it in exactly as it appears when I look up the database name.
C2Knuckles
 
Posts: 85
Joined: Sat May 17, 2008 6:11 pm

Re: Possible to convert limits?

Postby WhiteRider » Mon Dec 01, 2008 4:05 pm

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.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Possible to convert limits?

Postby C2Knuckles » Mon Dec 01, 2008 7:43 pm

Thanks, that problem solved. Now I can't get passed the next step. :|

Image
Image
C2Knuckles
 
Posts: 85
Joined: Sat May 17, 2008 6:11 pm

Re: Possible to convert limits?

Postby WhiteRider » Tue Dec 02, 2008 5:35 am

Kraada's directions say:
SELECT * from holdem_limit;
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Possible to convert limits?

Postby C2Knuckles » Tue Dec 02, 2008 11:07 am

Opps, wrong screenshot, I tried more than one way, just getting error after error.

Image
Image
C2Knuckles
 
Posts: 85
Joined: Sat May 17, 2008 6:11 pm

Re: Possible to convert limits?

Postby WhiteRider » Tue Dec 02, 2008 11:17 am

I'll get kraada to take another look at this..
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 9 guests

cron
highfalutin