[SQL] inet versus text for ip addresses

2003-07-04 Thread Dan Langille
The PostgreSQL inet datatype stores an holds an IP host address, and optionally the identity of the subnet it is in, all in one field. This requires 12 bytes. Using my "random" data of approximately 8000 IP addresses collected during previous polls, I've found the average length of an IP ad

Re: [SQL] INSERT ... SELECT problem in Mysql

2003-07-04 Thread Evil Azrael
Thanx for the fast answer. I already thought something about like this and considered sending the question to the advocacy list instead of the SQL list. I really like their docs since i´ve read about their reasons against Foreign Keys *g* One more point in favor for PostgreSQL :) Christoph Nelles

Re: [SQL] INSERT ... SELECT problem in Mysql

2003-07-04 Thread Tom Lane
Evil Azrael <[EMAIL PROTECTED]> writes: > I have a problem with this part in the text > > The target table of the INSERT statement cannot appear in the FROM > clause of the SELECT part of the query because it's forbidden in > standard SQL to SELECT from the same table into which you are > inse

[SQL] INSERT ... SELECT problem in Mysql

2003-07-04 Thread Evil Azrael
Hi! I was trying to port a solution from postgresql to mysql for a mysql user. im often using INSERT ... SELECTS with the same table in the INSERT and SELECT statments at the same time. In Postgres i used to use the destination only in a Subquery with IN, but in Mysql i had to join the table, but