Re: [GENERAL] moving from MySQL to pgsql

2012-10-15 Thread Jasen Betts
On 2012-10-13, Merlin Moncure wrote: > On Sat, Oct 13, 2012 at 3:22 AM, Jasen Betts wrote: >> On 2012-10-11, Vineet Deodhar wrote: >> >>> To give an example, I have tables for storing master records (year master, >>> security master, etc.) for which pkid TINYINT is just sufficient. >>> These pki

Re: [GENERAL] moving from MySQL to pgsql

2012-10-13 Thread Merlin Moncure
On Sat, Oct 13, 2012 at 3:22 AM, Jasen Betts wrote: > On 2012-10-11, Vineet Deodhar wrote: > >> To give an example, I have tables for storing master records (year master, >> security master, etc.) for which pkid TINYINT is just sufficient. >> These pkid's are used as fk constraints in tables for

Re: [GENERAL] moving from MySQL to pgsql

2012-10-13 Thread Jasen Betts
On 2012-10-11, Vineet Deodhar wrote: > To give an example, I have tables for storing master records (year master, > security master, etc.) for which pkid TINYINT is just sufficient. > These pkid's are used as fk constraints in tables for storing business > transactions. > The no. of rows in busin

Re: [GENERAL] moving from MySQL to pgsql

2012-10-13 Thread Jasen Betts
On 2012-10-10, Vineet Deodhar wrote: > --f46d040714c5d7a08c04cbb08256 > Content-Type: text/plain; charset=UTF-8 > > Hi ! > At present, I am using MySQL as backend for my work. > Because of the licensing implications, I am considering to shift from MySQL > to pgsql. > Typically, my apps are multi-u

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread John R Pierce
On 10/11/12 2:07 AM, Vineet Deodhar wrote: To give an example, I have tables for storing master records (year master, security master, etc.) for which pkid TINYINT is just sufficient. These pkid's are used as fk constraints in tables for storing business transactions. The no. of rows in busines

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Mike Christensen
On Thu, Oct 11, 2012 at 9:38 AM, Gavin Flower wrote: > On 12/10/12 04:39, Merlin Moncure wrote: > >> On Thu, Oct 11, 2012 at 4:44 AM, Vineet Deodhar >> wrote: >> >>> Thanks all for your replies. >>> This is my first experience with postgres mailing list. >>> Hats Off to the active community of p

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Gavin Flower
On 12/10/12 04:39, Merlin Moncure wrote: On Thu, Oct 11, 2012 at 4:44 AM, Vineet Deodhar wrote: Thanks all for your replies. This is my first experience with postgres mailing list. Hats Off to the active community of pgsql. This has definitely raised my confidence level with postgres. thanks.

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Merlin Moncure
On Thu, Oct 11, 2012 at 4:44 AM, Vineet Deodhar wrote: > Thanks all for your replies. > This is my first experience with postgres mailing list. > Hats Off to the active community of pgsql. > This has definitely raised my confidence level with postgres. thanks. we like emails that start off 'movi

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Craig Ringer
On 10/11/2012 05:07 PM, Vineet Deodhar wrote: On Thu, Oct 11, 2012 at 1:12 PM, Craig Ringer mailto:ring...@ringerc.id.au>> wrote: The difference between SMALLINT and BOOLEAN (or TINYINT if Pg supported it) is 1 byte per column. If you had 30 smallint columns and quite a few million r

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Vineet Deodhar
Thanks all for your replies. This is my first experience with postgres mailing list. Hats Off to the active community of pgsql. This has definitely raised my confidence level with postgres. --- Vineet

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Vineet Deodhar
On Thu, Oct 11, 2012 at 3:04 PM, Craig Ringer wrote: > > AFAIK in most situations alignment requirements will mean you won't gain > any space in those situations anyway. > > I would be truly amazed if you saw more than something like a 1% > difference in size due to this; it'll be *massively* out

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Vineet Deodhar
On Thu, Oct 11, 2012 at 1:12 PM, Craig Ringer wrote: > The difference between SMALLINT and BOOLEAN (or TINYINT if Pg supported > it) is 1 byte per column. If you had 30 smallint columns and quite a few > million rows it might start making a difference, but it's *really* not > worth obsessing abou

Re: [GENERAL] moving from MySQL to pgsql

2012-10-11 Thread Craig Ringer
On 10/11/2012 02:07 PM, Vineet Deodhar wrote: On Thu, Oct 11, 2012 at 5:26 AM, Ondrej Ivanič mailto:ondrej.iva...@gmail.com>> wrote: Hi, On 10 October 2012 19:47, Vineet Deodhar mailto:vineet.deod...@gmail.com>> wrote: > 3) Can I simulate MySQL's TINYINT data-type (using maybe the

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread F. BROUARD / SQLpro
Le 10/10/2012 10:47, Vineet Deodhar a écrit : Hi ! 3) Can I simulate MySQL's TINYINT data-type (using maybe the custom data type or something else) Another way, and a good practice toot is to use SQL DOMAINs wich is a part of the ISO SQL since 1992 that MySQL don't have... CREATE DOMAIN TI

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Vineet Deodhar
On Thu, Oct 11, 2012 at 5:26 AM, Ondrej Ivanič wrote: > Hi, > > On 10 October 2012 19:47, Vineet Deodhar wrote: > > 3) Can I simulate MySQL's TINYINT data-type (using maybe the custom data > > type or something else) > > What do you exactly mean? Do you care about storage requirements or > constr

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Craig Ringer
On 10/10/2012 04:47 PM, Vineet Deodhar wrote: 2) I run MySQL from a USB stick. There is no installation required (on WinXP.). (not tried on Ubuntu) Is it the same for pgsql? On Windows PostgreSQL is usually installed as a system service with its own user account (pre-9.2) or running in the ne

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Joshua D. Drake
On 10/10/2012 02:18 AM, Sim Zacks wrote: 2) I run MySQL from a USB stick. There is no installation required (on WinXP.). (not tried on Ubuntu) Is it the same for pgsql? To use postgres on a USB stick, see http://www.postgresonline.com/journal/archives/172-Starting-PostgreSQL-in-windows-without

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Darren Duncan
I noticed something here that none of the other replies addressed. Vineet Deodhar wrote: 3) Can I simulate MySQL's TINYINT data-type (using maybe the custom data type or something else) The answer to your question depends on what you were using the TINYINT for. For example, many people use TI

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Ondrej Ivanič
Hi, On 10 October 2012 19:47, Vineet Deodhar wrote: > 3) Can I simulate MySQL's TINYINT data-type (using maybe the custom data > type or something else) What do you exactly mean? Do you care about storage requirements or constraints? The smallest numeric type in postgres is smallint: range is +/

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Merlin Moncure
On Wed, Oct 10, 2012 at 3:47 AM, Vineet Deodhar wrote: > Hi ! > At present, I am using MySQL as backend for my work. > Because of the licensing implications, I am considering to shift from MySQL > to pgsql. > Typically, my apps are multi-user, web based or LAN based. > > 1) Read over the internet

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Chris Travers
On Wed, Oct 10, 2012 at 2:20 AM, Vineet Deodhar wrote: > On Wed, Oct 10, 2012 at 2:38 PM, Chris Travers wrote: > >> >> >> On Wed, Oct 10, 2012 at 1:47 AM, Vineet Deodhar > > wrote: PostgreSQL has an excellent optimizer and the on-disk layout is >> completely different. This will dwarf any changes

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Vineet Deodhar
On Wed, Oct 10, 2012 at 2:38 PM, Chris Travers wrote: > > > On Wed, Oct 10, 2012 at 1:47 AM, Vineet Deodhar > wrote: PostgreSQL has an excellent optimizer and > the on-disk layout is > completely different. This will dwarf any changes due to threads vs > queries. > > However be prepared to re

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Sim Zacks
On 10/10/2012 10:47 AM, Vineet Deodhar wrote: Hi ! At present, I am using MySQL as backend for my work. Because of the licensing implications, I am considering to shift from MySQL to pgsql. Typically, my apps are multi-user, web based or LAN based.

Re: [GENERAL] moving from MySQL to pgsql

2012-10-10 Thread Chris Travers
On Wed, Oct 10, 2012 at 1:47 AM, Vineet Deodhar wrote: > Hi ! > At present, I am using MySQL as backend for my work. > Because of the licensing implications, I am considering to shift from > MySQL to pgsql. > Typically, my apps are multi-user, web based or LAN based. > > 1) Read over the internet

Re: [GENERAL] Moving from Mysql

2010-05-23 Thread David Fetter
On Sat, May 22, 2010 at 11:06:02PM -0400, Stephen Frost wrote: > * Luis Daniel Lucio Quiroz (luis.daniel.lu...@gmail.com) wrote: > > 1. whar are equivalent for these commands: > > in mysql: mysqldump mydata_base_name > > pg_dump (pg_restore to restore from the dump, if you use a non-SQL > format

Re: [GENERAL] Moving from Mysql

2010-05-22 Thread Stephen Frost
* Luis Daniel Lucio Quiroz (luis.daniel.lu...@gmail.com) wrote: > 1. whar are equivalent for these commands: > in mysql: mysqldump mydata_base_name pg_dump (pg_restore to restore from the dump, if you use a non-SQL format for it, which can give you the ability to do a parallel-restore) > mysql m

[GENERAL] Moving from Mysql

2010-05-22 Thread Luis Daniel Lucio Quiroz
Hi, Well, i'm moving some databases from Mysql to Pgsql, but i'm having some admin doubts, i wondering 3 things: 1. whar are equivalent for these commands: in mysql: mysqldump mydata_base_name mysql mydata_base_name < script.sql 2. any link to read about how to admin pgsql with mysql backgraoun

Re: [GENERAL] moving from mysql to postgree

2007-11-16 Thread Merlin Moncure
On Nov 15, 2007 10:44 AM, Pau Marc Munoz Torres <[EMAIL PROTECTED]> wrote: > I'm moving from mysql to postgresql just now i I'm a bit lost, could anyone > tell me some place with a comparative between postdresql and mysql commands, > i think than mostly is the same think but, any way, do anything

Re: [GENERAL] moving from mysql to postgree

2007-11-16 Thread Pau Marc Munoz Torres
Thanks every body, today i've created my first table with postgresql, what a mass with \d and sequancial vs auto_increment data type in create... anyway, i will become an expert soon ;-) thanks again pau 2007/11/16, Merlin Moncure <[EMAIL PROTECTED]>: > > On Nov 15, 2007 10:44 AM, Pau Marc Mun

Re: [GENERAL] moving from mysql to postgree

2007-11-15 Thread Andrew Sullivan
On Thu, Nov 15, 2007 at 04:44:33PM +0100, Pau Marc Munoz Torres wrote: > I'm moving from mysql to postgresql just now i I'm a bit lost, could anyone > tell me some place with a comparative between postdresql and mysql commands, > i think than mostly is the same think but, any way, do anything chan

Re: [GENERAL] moving from mysql to postgree

2007-11-15 Thread Tony Caduto
Pau Marc Munoz Torres wrote: Hi I'm moving from mysql to postgresql just now i I'm a bit lost, could anyone tell me some place with a comparative between postdresql and mysql commands, i think than mostly is the same think but, any way, do anything change ? pau -- Hi, You should check o

[GENERAL] moving from mysql to postgree

2007-11-15 Thread Pau Marc Munoz Torres
Hi I'm moving from mysql to postgresql just now i I'm a bit lost, could anyone tell me some place with a comparative between postdresql and mysql commands, i think than mostly is the same think but, any way, do anything change ? pau -- Pau Marc Muñoz Torres Laboratori de Biologia Computacional

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-18 Thread Vivek Khera
On Nov 17, 2005, at 4:44 PM, Robby Russell wrote: Sort of a meta-approach for Rails-based scaffolding generator. Not required, but it'll speed up the process and limit the number of chars that you can stick into a text field opposed to a text area. Yet again you see RoR compensating for lack

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread Robby Russell
On Thu, 2005-11-17 at 15:10 -0600, Bruno Wolff III wrote: > On Thu, Nov 17, 2005 at 09:23:51 -0800, > Robby Russell <[EMAIL PROTECTED]> wrote: > > > > CREATE TABLE product ( > > id SERIAL PRIMARY KEY, > > name VARCHAR(255) NOT NULL DEFAULT '', > > ); > > And depending on why you chose VARCH

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread Bruno Wolff III
On Thu, Nov 17, 2005 at 09:23:51 -0800, Robby Russell <[EMAIL PROTECTED]> wrote: > > CREATE TABLE product ( > id SERIAL PRIMARY KEY, > name VARCHAR(255) NOT NULL DEFAULT '', > ); And depending on why you chose VARCHAR(255), you may really want to use TEXT instead. -

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread David Fetter
On Thu, Nov 17, 2005 at 08:48:45AM -0800, Peter Michaux wrote: > Hi, > > I'm just new to the PostgreSQL world. I've been using MySQL but I want to > develop a Ruby on Rails application that can be installed on either MySQL or > PostgreSQL. I don't know how much the DDL dialects vary between them.

Re: [GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread Robby Russell
On Thu, 2005-11-17 at 08:48 -0800, Peter Michaux wrote: > Hi, > > I'm just new to the PostgreSQL world. I've been using MySQL but I want > to develop a Ruby on Rails application that can be installed on either > MySQL or PostgreSQL. I don't know how much the DDL dialects vary > between them. At th

[GENERAL] Moving from MySQL to PostgreSQL with Ruby on Rails.

2005-11-17 Thread Peter Michaux
Hi, I'm just new to the PostgreSQL world. I've been using MySQL but I want to develop a Ruby on Rails application that can be installed on either MySQL or PostgreSQL. I don't know how much the DDL dialects vary between them. At the moment I am interested in the options on a table like UTF-8. In My

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-05 Thread Mike Mascari
Michael Chaney wrote: On Thu, Mar 04, 2004 at 10:50:50AM -0500, Tom Lane wrote: If I understood the requirements correctly, it might be sufficient to put a unique index on (id1,id2). If two transactions simultaneously try to insert for the same id1, one would get a duplicate-index-entry failure,

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-04 Thread Michael Chaney
On Thu, Mar 04, 2004 at 10:50:50AM -0500, Tom Lane wrote: > If I understood the requirements correctly, it might be sufficient to > put a unique index on (id1,id2). If two transactions simultaneously try > to insert for the same id1, one would get a duplicate-index-entry > failure, and it would ha

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-03 Thread Tom Lane
Michael Chaney <[EMAIL PROTECTED]> writes: > begin; > lock table test in exclusive mode; > insert into test values (1,(select max(id2) from test where id1=1)+1); > commit; > It's not pretty, and it'll probably slow down as the table grows. As-is, that will definitely get pretty slow on large tabl

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-03 Thread Michael Chaney
On Wed, Mar 03, 2004 at 06:45:56AM +0100, Paulovi?? Michal wrote: > Yes I know, > > But how you do this at PgSQL You have to lock the table exclusively, get the max value for your particular "id1", increment it, insert the row, and commit: begin; lock table test in exclusive mode; insert int

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-03 Thread Paulovič Michal
Bruno Wolff III wrote: On Wed, Mar 03, 2004 at 18:12:18 +0100, Paulovi?? Michal <[EMAIL PROTECTED]> wrote: You don't build secent level unique You have to create uniqe index under both levels (first and second) together. But in MySQL there is no problem. I alredy have table with mulitlevel au

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-03 Thread scott.marlowe
On Wed, 3 Mar 2004, [UTF-8] Paulovič Michal wrote: > Yes I know, > > But how you do this at PgSQL OK, I just read the response where someone showed me how to make such a table in mysql. What an odd, and non-intuitive behaviour that is. Anyway, first off, upgrade your version of postgresql

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-03 Thread Bruno Wolff III
On Wed, Mar 03, 2004 at 18:12:18 +0100, Paulovi?? Michal <[EMAIL PROTECTED]> wrote: > You don't build secent level unique > You have to create uniqe index under both levels (first and second) > together. But in MySQL there is no problem. > I alredy have table with mulitlevel autoincrement (in My

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-03 Thread Paulovič Michal
Harald Fuchs wrote: In article <[EMAIL PROTECTED]>, "scott.marlowe" <[EMAIL PROTECTED]> writes: On Tue, 2 Mar 2004, [UTF-8] PauloviÃÂ Michal wrote: how you solve the problem with multilevel autoicrement? In MySQL you create table with col1, col2. Col 2 is AUTOICRE

Re: [GENERAL] Moving from MySQL to PGSQL....some questions (multilevel

2004-03-02 Thread Paulovič Michal
how you solve the problem with multilevel autoicrement? In MySQL you create table with col1, col2. Col 2 is AUTOICREMENT and you have to create UNIQUE INDEX (Col1, Col2). If you insert to this table for col1 volume 1, col2 automaticaly increase by one. Example: Insert into table values (1); Ins

Re: [GENERAL] Moving from MySQL to PGSQL....some questions

2004-03-02 Thread Bruce Momjian
Michael Chaney wrote: > One other note, for those converting a database from MySQL to > PostgreSQL, I have a table creation conversion script here: > > http://www.michaelchaney.com/downloads/m2p.pl > > I know that two come with PostgreSQL in the contrib directory, but I > wrote this because those

Re: Database metadata queries (WAS Re: [GENERAL] Moving from MySQL to PGSQL....some questions)

2004-03-02 Thread Bruno Wolff III
On Mon, Mar 01, 2004 at 11:09:32 -0600, Shawn Harrison <[EMAIL PROTECTED]> wrote: > > Would it be worthwhile to move many of these \d queries into the system > schema, as views on various system tables? I've thought that it would be > very useful to be able to access these things through the web

Re: [GENERAL] Moving from MySQL to PGSQL....some questions

2004-02-28 Thread Karl O. Pinc
"Karam Chand" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > 5.) In MySQL, there are many command like show tables, > show databases etc. to get object details. I cant see > anything similar in PGSQL. After searching the net i > find that i have to execute certain queries to fetch

Re: [GENERAL] Moving from MySQL to PGSQL....some questions

2004-02-28 Thread Greg Patnude
In PGAdmin III -- you might want to UNCHECK the "Display system objects" option under the "Display" menu option -- this will prevent you from seeing all of the non-public schema's and limit your view in PGAdmin to just the databases you created... Most people dont really need to dink around with t

Re: [GENERAL] Moving from MySQL

2003-08-14 Thread Paul Thomas
On 09/08/2003 01:41 Simon Windsor wrote: Hi I am sorry for mailing this list directly, but I am planning to migrate a web application from MySQL to Postgres. I am aware of a number of applications to help in this process, ie my2pg, etc. The biggest stumbling block I face is replication. What facil

[GENERAL] Moving from MySQL

2003-08-10 Thread Simon Windsor
Hi   I am sorry for mailing this list directly, but I am planning to migrate a web application from MySQL to Postgres. I am aware of a number of applications to help in this process, ie my2pg, etc. The biggest stumbling block I face is replication.   What facilities exist within Postgres to r

Re: [GENERAL] moving from mySQL to pgsql, need a bit of help (perl)

2000-07-11 Thread Peter Haworth
Ed Loehrwrote: > I believe DBI/DBD does this for you: > > while ($row_href = $sth->fetchrow_hashref) > { >push( @taghash, $row_href); > } Don't do that! Each hashref in that array will point to the same hash in some future version of the DBI. You should do this instead: while($row=$sth->

Re: [GENERAL] moving from mySQL to pgsql, need a bit of help (perl)

2000-07-10 Thread Ed Loehr
Matt Housh wrote: > > In my current code (perl/mySQL), I execute the following query: "SELECT * > from table_name" - then use the following code to put it in a hash: > > $j = 0; > while (@row = $sth->fetchrow_array) > { >for ($i = 0; $i < $fields; $i++) >{ > $taghash[$j]{$$

[GENERAL] moving from mySQL to pgsql, need a bit of help (perl)

2000-07-10 Thread Matt Housh
Hello, I'm trying to move from mySQL to PostgreSQL, and I've got to port a web app over that's written in perl. It uses the DBD/DBI stuff, and works great so far with mySQL. I've got a very specific question relating to pulling data out of a database, I hope this is the correct forum for