pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feednewbie question
12+ messages / 10 participants
[nested] [flat]
* newbie question
@ 2002-07-07 21:59 Mirco D'Angelo <dangelo@isic.org>
2002-07-08 15:53 ` Re: newbie question Roberto Mello <rmello@cc.usu.edu>
2002-07-08 16:49 ` Re: newbie question Richard Huxton <dev@archonet.com>
2002-07-08 20:28 ` Re: newbie question Ignacio Coloma <icoloma-lists@iverdino.com>
2002-07-09 06:45 ` Re: newbie question Achilleus Mantzios <achill@matrix.gatewaynet.com>
0 siblings, 4 replies; 12+ messages in thread
From: Mirco D'Angelo @ 2002-07-07 21:59 UTC (permalink / raw)
To: pgsql-sql
Hi
I am going to learn MySql 'cause I have to, but would it be better, or let's
say, more interesting, to learn postgressql? Is it newer, more common, etc.?
greets
mirco
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2002-07-07 21:59 newbie question Mirco D'Angelo <dangelo@isic.org>
@ 2002-07-08 15:53 ` Roberto Mello <rmello@cc.usu.edu>
3 siblings, 0 replies; 12+ messages in thread
From: Roberto Mello @ 2002-07-08 15:53 UTC (permalink / raw)
To: Mirco D'Angelo <dangelo@isic.org>; +Cc: pgsql-sql
On Sun, Jul 07, 2002 at 11:59:51PM +0200, Mirco D'Angelo wrote:
> Hi
>
> I am going to learn MySql 'cause I have to, but would it be better, or let's
> say, more interesting, to learn postgressql? Is it newer, more common, etc.?
PostgreSQL is certainly more interesting, more useful, more
feature-complete (as far as Relational database servers go), more fun and
what you could learn with PostgreSQL you could take to other database
servers who are out to be real database servers, not the case with MySQL.
AFAIK, MySQL is more common.
-Roberto
--
+----| http://fslc.usu.edu/ USU Free Software & GNU/Linux Club |------+
Roberto Mello - Computer Science, USU - http://www.brasileiro.net/
http://www.sdl.usu.edu/ - Space Dynamics Lab, Developer
Why trying to DRINK and DRIVE, while you can SMOKE and FLY?
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2002-07-07 21:59 newbie question Mirco D'Angelo <dangelo@isic.org>
@ 2002-07-08 16:49 ` Richard Huxton <dev@archonet.com>
3 siblings, 0 replies; 12+ messages in thread
From: Richard Huxton @ 2002-07-08 16:49 UTC (permalink / raw)
To: Mirco D'Angelo <dangelo@isic.org>; pgsql-sql
On Sunday 07 Jul 2002 10:59 pm, Mirco D'Angelo wrote:
> Hi
>
> I am going to learn MySql 'cause I have to, but would it be better, or
> let's say, more interesting, to learn postgressql? Is it newer, more
> common, etc.?
Mysql is more common on web-hosting platforms, but you can find PostgreSQL if
you look. PostgreSQL's ancestors go back further than MySQL - both get
updated regularly, so "newer" doesn't mean much.
Mysql is easier to setup initially, but both systems require knowledge to tune
properly. Both have a lot of online documentation - I'm not sure that one is
better than the other. The mailing lists for PostgreSQL are very helpful and
contain some very experienced people.
PostgreSQL offers some more advanced features. Once you are used to these
features it is irritating to find them missing in MySql. For some
applications they are pretty much mandatory. PostgreSQL also tends to fit
standards more than MySQL. Where I use MySQL behind a website I tend to use
PostgreSQL to manage the data here during development.
I'd recommend installing both if you can. Try to make sure anything you write
works on both and check the documentation for where both diverge from
standards.
- Richard Huxton
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2002-07-07 21:59 newbie question Mirco D'Angelo <dangelo@isic.org>
@ 2002-07-08 20:28 ` Ignacio Coloma <icoloma-lists@iverdino.com>
2002-07-09 06:39 ` Re: newbie question Christopher Kings-Lynne <chriskl@familyhealth.com.au>
3 siblings, 1 reply; 12+ messages in thread
From: Ignacio Coloma @ 2002-07-08 20:28 UTC (permalink / raw)
To: Mirco D'Angelo <dangelo@isic.org>; +Cc: pgsql-sql
Transactions (well, recently mysql allows them but using propietary
extensions), foreign key relationships, subqueries, stored
procedures/triggers. MySQL lacks all of these.
On the other side, postgres is only ported on *nix platforms, but you
can put cygwin/cygipc on Windows, if that is the case. And mysql is
"friendlier", that means wrong column value types (INT_VALUE = '5') and
double quotes working as simple quotes, so it's easier to start with.
As far as I can remember.
Mirco D'Angelo wrote:
>Hi
>
>I am going to learn MySql 'cause I have to, but would it be better, or let's
>say, more interesting, to learn postgressql? Is it newer, more common, etc.?
>
>greets
>mirco
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
>
>
>
>
>
>
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2002-07-07 21:59 newbie question Mirco D'Angelo <dangelo@isic.org>
2002-07-08 20:28 ` Re: newbie question Ignacio Coloma <icoloma-lists@iverdino.com>
@ 2002-07-09 06:39 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 0 replies; 12+ messages in thread
From: Christopher Kings-Lynne @ 2002-07-09 06:39 UTC (permalink / raw)
To: Ignacio Coloma <icoloma-lists@iverdino.com>; Mirco D'Angelo <dangelo@isic.org>; +Cc: pgsql-sql
> Transactions (well, recently mysql allows them but using propietary
> extensions), foreign key relationships, subqueries, stored
> procedures/triggers. MySQL lacks all of these.
MySQL's InnoDB tables have foreign keys, but they are RESTRICT only - ie.
they're kinda useless.
> On the other side, postgres is only ported on *nix platforms, but you
> can put cygwin/cygipc on Windows, if that is the case. And mysql is
> "friendlier", that means wrong column value types (INT_VALUE = '5') and
> double quotes working as simple quotes, so it's easier to start with.
It's a trap that 'easy to use' factor. Problem with MySQL is that they just
make up whole swathes of their SQL syntax out of whole cloth. They just
make it up. Then, when you go to use any other SQL-standard database on
Earth you have a rather painful learning and code conversion process. Just
talk to anyone who uses MySQL's date and time functions, ISNULL(field), or
'KEY's and stuff...
Poor newbies get to thinking that MySQL's way is the standard way, but it's
not. That's what happened to me, and my life has been a wonderful thing
ever since we ditched MySQL in favour of Postgres in our company!
Chris
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2002-07-07 21:59 newbie question Mirco D'Angelo <dangelo@isic.org>
@ 2002-07-09 06:45 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
3 siblings, 0 replies; 12+ messages in thread
From: Achilleus Mantzios @ 2002-07-09 06:45 UTC (permalink / raw)
To: Mirco D'Angelo <dangelo@isic.org>; +Cc: pgsql-sql
On Sun, 7 Jul 2002, Mirco D'Angelo wrote:
> Hi
>
> I am going to learn MySql 'cause I have to, but would it be better, or let's
> say, more interesting, to learn postgressql? Is it newer, more common, etc.?
>
Well IMO you just cant compare them.
Think of a porche that does 100km/h better than a Mirage F1 military
aircraft, but F1 can do much higher accelerations at higher speeds,
move in 3D space rather than 2D, etc...
If you wanna travel fast on the ground go with the porche.
If you want the skies go with F1!!
> greets
> mirco
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
--
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel: +30-10-8981112
fax: +30-10-8981877
email: achill@matrix.gatewaynet.com
mantzios@softlab.ece.ntua.gr
^ permalink raw reply [nested|flat] 12+ messages in thread
* newbie question
@ 2006-03-03 09:43 ivan marchesini <marchesini@unipg.it>
2006-03-03 10:51 ` Re: newbie question Andreas Kretschmer <akretschmer@spamfence.net>
2006-03-03 11:04 ` Re: newbie question Karsten Hilbert <Karsten.Hilbert@gmx.net>
0 siblings, 2 replies; 12+ messages in thread
From: ivan marchesini @ 2006-03-03 09:43 UTC (permalink / raw)
To: pgsql-sql
Dear users..
I have fastly created a table in a postgresql database..
some columns where edited by hand (columns A, B, C), and some others
(columns D, E, F) have been calculated as a result of mathematical
equation (where the factors are the A, B, C columns)....
now I simply need to change some values in the A, B, C columns and I
would like to obtain the correct values in the D, E, F column...
I know that this is a tipical problem of a spreadsheet but how can I
solve it with a DBMS??
there a way to impose some constrain, also after the table is already
filled with values??
I need only some suggestions to start.. then I can go on by myself!!
thank you very much
Ivan
--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2006-03-03 09:43 newbie question ivan marchesini <marchesini@unipg.it>
@ 2006-03-03 10:51 ` Andreas Kretschmer <akretschmer@spamfence.net>
2006-03-03 11:30 ` Re: newbie question ivan marchesini <marchesini@unipg.it>
1 sibling, 1 reply; 12+ messages in thread
From: Andreas Kretschmer @ 2006-03-03 10:51 UTC (permalink / raw)
To: pgsql-sql
ivan marchesini <marchesini@unipg.it> schrieb:
> Dear users..
> I have fastly created a table in a postgresql database..
> some columns where edited by hand (columns A, B, C), and some others
> (columns D, E, F) have been calculated as a result of mathematical
> equation (where the factors are the A, B, C columns)....
You should create a table with (a,b,c) and a view. Below a example.
test=# create table foo (a int, b int, c int);
CREATE TABLE
test=# create view foo_view as (select a,b,c,a*b as ab, a*c as ac, b*c as bc from foo);
CREATE VIEW
> now I simply need to change some values in the A, B, C columns and I
> would like to obtain the correct values in the D, E, F column...
> I know that this is a tipical problem of a spreadsheet but how can I
> solve it with a DBMS??
test=# insert into foo values (2,3,4);
INSERT 0 1
test=# select * from foo_view ;
a | b | c | ab | ac | bc
---+---+---+----+----+----
2 | 3 | 4 | 6 | 8 | 12
(1 row)
test=# update foo set a=3;
UPDATE 1
test=# select * from foo_view ;
a | b | c | ab | ac | bc
---+---+---+----+----+----
3 | 3 | 4 | 9 | 12 | 12
(1 row)
HTH, Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2006-03-03 09:43 newbie question ivan marchesini <marchesini@unipg.it>
2006-03-03 10:51 ` Re: newbie question Andreas Kretschmer <akretschmer@spamfence.net>
@ 2006-03-03 11:30 ` ivan marchesini <marchesini@unipg.it>
2006-03-03 12:40 ` Re: newbie question A. Kretschmer <andreas.kretschmer@schollglas.com>
2006-03-03 12:46 ` Re: newbie question Karsten Hilbert <Karsten.Hilbert@gmx.net>
0 siblings, 2 replies; 12+ messages in thread
From: ivan marchesini @ 2006-03-03 11:30 UTC (permalink / raw)
To: ; +Cc: pgsql-sql
Thanks to all...
another question...
is it possible to copy a table to a view and then back the view to a
table???
thank you very much...
ivan
Il giorno ven, 03/03/2006 alle 11.51 +0100, Andreas Kretschmer ha
scritto:
> ivan marchesini <marchesini@unipg.it> schrieb:
>
> > Dear users..
> > I have fastly created a table in a postgresql database..
> > some columns where edited by hand (columns A, B, C), and some others
> > (columns D, E, F) have been calculated as a result of mathematical
> > equation (where the factors are the A, B, C columns)....
>
> You should create a table with (a,b,c) and a view. Below a example.
>
> test=# create table foo (a int, b int, c int);
> CREATE TABLE
>
> test=# create view foo_view as (select a,b,c,a*b as ab, a*c as ac, b*c as bc from foo);
> CREATE VIEW
>
>
> > now I simply need to change some values in the A, B, C columns and I
> > would like to obtain the correct values in the D, E, F column...
> > I know that this is a tipical problem of a spreadsheet but how can I
> > solve it with a DBMS??
>
> test=# insert into foo values (2,3,4);
> INSERT 0 1
> test=# select * from foo_view ;
> a | b | c | ab | ac | bc
> ---+---+---+----+----+----
> 2 | 3 | 4 | 6 | 8 | 12
> (1 row)
>
> test=# update foo set a=3;
> UPDATE 1
> test=# select * from foo_view ;
> a | b | c | ab | ac | bc
> ---+---+---+----+----+----
> 3 | 3 | 4 | 9 | 12 | 12
> (1 row)
>
>
> HTH, Andreas
--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini@unipg.it
ivan.marchesini@gmail.com
tel: +39(0)755853760
fax: +39(0)755853756
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2006-03-03 09:43 newbie question ivan marchesini <marchesini@unipg.it>
2006-03-03 10:51 ` Re: newbie question Andreas Kretschmer <akretschmer@spamfence.net>
2006-03-03 11:30 ` Re: newbie question ivan marchesini <marchesini@unipg.it>
@ 2006-03-03 12:40 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
1 sibling, 0 replies; 12+ messages in thread
From: A. Kretschmer @ 2006-03-03 12:40 UTC (permalink / raw)
To: pgsql-sql
am 03.03.2006, um 12:30:20 +0100 mailte ivan marchesini folgendes:
> Thanks to all...
> another question...
> is it possible to copy a table to a view and then back the view to a
> table???
Yes this is possible.
>
> Il giorno ven, 03/03/2006 alle 11.51 +0100, Andreas Kretschmer ha
please, no silly fullquote below the answer.
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2006-03-03 09:43 newbie question ivan marchesini <marchesini@unipg.it>
2006-03-03 10:51 ` Re: newbie question Andreas Kretschmer <akretschmer@spamfence.net>
2006-03-03 11:30 ` Re: newbie question ivan marchesini <marchesini@unipg.it>
@ 2006-03-03 12:46 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
1 sibling, 0 replies; 12+ messages in thread
From: Karsten Hilbert @ 2006-03-03 12:46 UTC (permalink / raw)
To: pgsql-sql
On Fri, Mar 03, 2006 at 12:30:20PM +0100, ivan marchesini wrote:
> another question...
> is it possible to copy a table to a view and then back the view to a
> table???
You need to read a basic textbook about what a view is.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
^ permalink raw reply [nested|flat] 12+ messages in thread
* Re: newbie question
2006-03-03 09:43 newbie question ivan marchesini <marchesini@unipg.it>
@ 2006-03-03 11:04 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
1 sibling, 0 replies; 12+ messages in thread
From: Karsten Hilbert @ 2006-03-03 11:04 UTC (permalink / raw)
To: pgsql-sql
On Fri, Mar 03, 2006 at 10:43:09AM +0100, ivan marchesini wrote:
> I have fastly created a table in a postgresql database..
> some columns where edited by hand (columns A, B, C), and some others
> (columns D, E, F) have been calculated as a result of mathematical
> equation (where the factors are the A, B, C columns)....
> now I simply need to change some values in the A, B, C columns and I
> would like to obtain the correct values in the D, E, F column...
> I know that this is a tipical problem of a spreadsheet but how can I
> solve it with a DBMS??
Use triggers or a view.
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
^ permalink raw reply [nested|flat] 12+ messages in thread
end of thread, other threads:[~2006-03-03 12:46 UTC | newest]
Thread overview: 12+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-07-07 21:59 newbie question Mirco D'Angelo <dangelo@isic.org>
2002-07-08 15:53 ` Roberto Mello <rmello@cc.usu.edu>
2002-07-08 16:49 ` Richard Huxton <dev@archonet.com>
2002-07-08 20:28 ` Ignacio Coloma <icoloma-lists@iverdino.com>
2002-07-09 06:39 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2002-07-09 06:45 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2006-03-03 09:43 newbie question ivan marchesini <marchesini@unipg.it>
2006-03-03 10:51 ` Andreas Kretschmer <akretschmer@spamfence.net>
2006-03-03 11:30 ` ivan marchesini <marchesini@unipg.it>
2006-03-03 12:40 ` A. Kretschmer <andreas.kretschmer@schollglas.com>
2006-03-03 12:46 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
2006-03-03 11:04 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox