Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Jonathan Trites
On 10/9/05, Rick Morris [EMAIL PROTECTED] wrote:
 Marc G. Fournier wrote:
  Stupid question, but what does MySQL bring to the equation?

 MySQL brings to the table an impressive AI interface that knows what you
 really meant to do and thus does away with those pesky error messages.

 After all, who wants to be told that -00-00 is not a date, or that
 you tried to insert a value of 7 into a SMALLINT column?


LOL, this is the single greatest reason I stopped using mysql for my
own stuff. I like the user management aspect better, in that each user
only sees their own databases, but that's a small annoyance (a little
psql -l | grep user largely solves that) Whoever decided that
silently truncating values and other similar things was a good idea
should be shot. Never ever ever ever ever silently do anything that
changes data you stupid bitch of a database. Either accept the data as
is or reject it and throw an error and make me do the change myself so
at least I can control it.

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] How to uninstall Postgres on Iinux.

2005-10-10 Thread Jonathan Trites
On 10/6/05, suresh ramasamy [EMAIL PROTECTED] wrote:
 On 10/6/05, Ly Lam Ngoc Bich [EMAIL PROTECTED] wrote:
  I am using Linux Fedora 3 . I've installed Postgres with
  postgresql-8.0.3.tar.gz package , so there is no rpm package  when I
  check with
   rpm -qa|grep postgresql
 
   Please show me the way to uninstall PostgresSQL.
 
  Sincerly yours,
 
 
  ---(end of broadcast)---
  TIP 9: In versions below 8.0, the planner will ignore your desire to
 choose an index scan if your joining column's datatypes do not
 match
 
 

 Go the installation directory and try
 #make uninstall  -   if it doesn't work then do the following

 # make clean
 # make dist clean
 and remove the directory manually


I think he wants to know how to uninstall the files that were
installed with 'make install', not the source directory.

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] How to uninstall Postgres on Iinux.

2005-10-10 Thread Jonathan Trites
  Go the installation directory and try
  #make uninstall  -   if it doesn't work then do the following
 
  # make clean
  # make dist clean
  and remove the directory manually
 

 I think he wants to know how to uninstall the files that were
 installed with 'make install', not the source directory.


Nevermind, wow I'm tired, should read the entire email and not just
the last three lines.

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] INSERT OR UPDATE?

2005-10-10 Thread Hannes Dorbath

On 09.10.2005 08:48, andrew wrote:

A very usual and smart approach is to use clases in PEAR::DB.


Well, IMHO PEAR::DB is one of the worst classes of PEAR. Besides its 
ugly code it's worth nothing. This is some incomplete abstraction 
layer for kiddies, to make it easy for people coming from stupid 
storage engines like MySQL or SqLite, to _store_ their data in another 
DBMS.


I never really understood, what such a thing should be good for. SQL 
implementations are not portable, nor are stored procedures, functions, 
rules, triggers, etc. Every DBMS implements them in it's own way and 
almost all professional devs will implement most, or at least the 
critical parts, of the business logic directly inside DBMS and not at 
application level. Thus making the application basically just a 
frontend, calling stored procedures and writing to views, controlled by 
triggers and strict permissions.


The only thing PEAR::DB might be usefull for is, writing those famous 
cross-dbms-apps, which basically use the DBMS highly inefficient as a 
better plaintext file (not even using foreign keys in most cases, so it 
will work with MySql 3.x as well).


And if you don't what to write such bizarre cross-dbms-apps, what is the 
point in using PEAR::DB at all? Those few incomplete methods wrapping 
the pg_* functions in some highly debatable way?


Do yourself a favor and write your own slime and efficient set of 
classes around the native API-functions of your DBMS. PEAR::DB and 
others prevent you from using an advanced DBMS the way you should.



--
Regards,
Hannes Dorbath

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] How to delete Large Object from Database?

2005-10-10 Thread Premsun Choltanwanich


The lib I use is call lo_in and lo_out for manage BLOB.
I understand that lo_unlink be related with lo_import and lo_export so I don't think that it work.

 Douglas McNaught [EMAIL PROTECTED] 07-Oct-05 20:13:36 pm Moises Alberto Lindo Gutarra [EMAIL PROTECTED] writes: try: delete from pg_catalog.pg_largeobject; from your database.Umm, the standard way to do this is lo_unlink(). You can put anON DELETE trigger on your referencing table that calls this function.-Doug


Re: [GENERAL] How to delete Large Object from Database?

2005-10-10 Thread Premsun Choltanwanich


I found loid column in pg_catalog.pg_largeobject. I try to match loid with any numbers in oidcolumn and lo column but I cannot found some that matched.

What think I do that wrong? Please advise Moises Alberto Lindo Gutarra [EMAIL PROTECTED] 07-Oct-05 18:40:12 pm try: delete from pg_catalog.pg_largeobject;from your database.2005/10/6, Premsun Choltanwanich [EMAIL PROTECTED]: Dear All, I use '$libdir/lo' for manage my PostgreSQL Large Object. It work fine for me to get and put Large Object from and to database. However I found something that may not correct when I try to backup my data. It seem that I cannot delete Large Object from database. It seem the thing I can do is only delete the reference oid from table but Object still in database. A Detail shown below is reason I think that I cannot delete Large Object out of database. 14MB of file size when BackUp Data (BLOB Included) 900KB of file size when BackUp Data (BLOB Excluded) 13MB of file size when BackUp Data after delete all data from table that has 'lo' column. (BLOB Included) So,How to delete Large Object from Database? or Is my understanding wrong?--AtteMoises Alberto Lindo GutarraConsultor y Desarrollador Java / Open SourceTUMI Solutions SACTel: +51.13481104Cel: +51.197366260MSN : [EMAIL PROTECTED]


Re: [GENERAL] pg_autovacuum, vacuumdb on Windows XP

2005-10-10 Thread Zlatko Matić

Hello.

I have found README file, and tried to install pg_autovacuum as Windows 
service, by a batch file:

@echo off
set ODREDISTE=C:
echo target disc is %ODREDISTE%
cd %ODREDISTE%\Program Files\PostgreSQL\8.0\bin
pg_autovacuum.exe pgsql-8.0.4 -I -N postgres_service -W postgres_service

postgres_service was both service username and password during 
installation of postgreSQL...
But, an error apeared regarding username and password. Then I tried with 
Windows administrator username and password, also unsuccessfully.
Finally I removed -N and -W parameters and then there was a message on 
console that it is successfully installed as service.

The final batch file was:
@echo off
set ODREDISTE=C:
echo target disc is %ODREDISTE%
cd %ODREDISTE%\Program Files\PostgreSQL\8.0\bin
pg_autovacuum.exe pgsql-8.0.4 -I

My questions are the following:

1. Is pg_autovacuum now really active and how can I be sure ?
2. Is it allowed to use pg_autovacuum -I without specifying parameters -N 
and -W ?

3. Why I was unable to pass username and password to parameters -N and -W?
4. Should -N be Windows administrator or postgres service username ?
5. If -N is postrges service name and -W password of that service, and both 
are entered as plain text in the batch file, how can it reflect to security 
of database? In fact, what can do service username postgres (or 
postgres_service in my case) ?


I'm sorry for bothering you,

Zlatko


- Original Message - 
From: Tom Lane [EMAIL PROTECTED]

To: Zlatko Matić [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Sent: Sunday, October 09, 2005 5:37 PM
Subject: Re: [GENERAL] pg_autovacuum



=?iso-8859-2?Q?Zlatko_Mati=E6?= [EMAIL PROTECTED] writes:

How to use pg_autovacuum ?


Read the README file for it.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend 



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] How to inject knowledge into a Postgres database

2005-10-10 Thread han . holl

Tom, Oleg, Yonathan,

thanks for the suggestions.
Indeed, upping the statistics from 10 to 100 helped.

But order by did not:
palga=# explain analyze select rapnaam from udps where geboortedatum = 
'1966-01-01' and naamvrouw like 'vos%' order by geboortedatum;
QUERY PLAN
--
 Sort  (cost=18.07..18.08 rows=1 width=18) (actual time=774.941..774.941 
rows=0 loops=1)
   Sort Key: main.geboortedatum
   -  Index Scan using nv on main  (cost=0.00..18.06 rows=1 width=18) (actual 
time=746.121..746.121 rows=0 loops=1)
 Index Cond: (((naamvrouw)::text = 'vos'::character varying) AND 
((naamvrouw)::text  'vot'::character varying))
 Filter: ((geboortedatum = '1966-01-01'::date) AND ((naamvrouw)::text 
~~ 'vos%'::text))
 Total runtime: 775.068 ms
(6 rows)

I got a similar problem with a functional index, but I guess my only option is 
to create a real column with the results of the function, and replace the 
functional index with a real one.

Thanks to all,

Han Holl

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] How to delete Large Object from Database?

2005-10-10 Thread Douglas McNaught
Premsun Choltanwanich [EMAIL PROTECTED] writes:

 The lib I use is call lo_in and lo_out for manage BLOB.
 I understand that lo_unlink be related with lo_import and lo_export so I
 don't think that it work.

It's exactly what you want--it removes a LO with the specified OID
from the large object table.  The 'contrib/lo' interface is just a thin
wrapper around the base LO calls.

-Doug

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Brent Wood


On Sun, 9 Oct 2005, CSN wrote:


 Maybe this is a crazy idea, I don't know how
 technically or legally feasible it is, but I really
 like the idea of the two open-source communities
 uniting to battle Oracle.


Two? I haven't used Firebird, but have heard lots of positive comments
from users. Firebird/Postgres/MySQL together maybe? Or with all the
embedded SQLlite users out there, perhaps all four :-)

( yes, I know there are still others)


Cheers

  Brent Wood

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[GENERAL] strange error

2005-10-10 Thread Sim Zacks
I am receiving the following error and cannot understand what it means.
Please let me know if this makes sense to you.

ERROR:  could not open relation 1663/3364852/7973197: No such file or
directory
CONTEXT:  SQL statement create temporary table tmpcust as select a.* from
qry_Customers_Country a
PL/pgSQL function buildsrtemptables line 34 at execute statement

The code I am using checks if a temporary tables exists, if it exists, it
drops 3 temp tables. The function continues on and creates the temporary
tables. This ensures that if my application calls the function twice in the
same connection, it doesn't get the error. What is strange about the error
is that it does not happen everytime. I can call the function and it creates
the tables. I then call it again and I get the error, and the tables still
exist. Then I call the function again and it drops and rebuilds the tables
with no error. But it is not always every other one, sometimes it is every 3
calls.
Below is the code:

create or replace function buildsrtemptables(uidparm int, prodparm int,
cntparm int, custparm int, orderparm int, startdateparm date, monthsparm
int) returns void
--prodparm 0=not enabled, 1=useprod, 2=useprodtype
--cntparm 0 = not enabled, 1 = usecountry, 2= useregion
--custparm 1=list, 2=all
--orderparm 0=not enabled, 1=3months, 2=1yr, 3=2yr, 4=3yr, 5=all, 6=defined
--if orderparm=6 then
--startdate date
--months int
as
$$
declare
 sqltmpcust citext;
 sqltmporder citext;
 tempschema citext;
begin
 select current_schemas[1] into tempschema from current_schemas(true);
 if tempschema like 'pg_temp%' then
  if exists(select * from pg_class a join pg_namespace b on
a.relnamespace=b.oid and b.nspname=tempschema where relname='tmpprod') then
   execute 'drop table tmpprod';
   execute 'drop table tmpcust';
   execute 'drop table tmporder';
  end if;
 end if;
 execute 'create temporary table tmpprod(like Products)';
 if prodparm=0 then
  execute 'insert into tmpprod select * from products';
 elsif prodparm=1 then
  execute 'insert into tmpprod select a.* from products a join set_prod b on
a.productid=b.id and b.setz AND b.uid=' || uidparm;
 else --prodparm = 2
  execute 'insert into tmpprod select a.* from products a join set_prodtype
b on a. producttypeid=b.id and b.setz and b.uid=' || uidparm;
 end if;

 sqltmpcust = 'select a.* from qry_Customers_Country a';
 if custparm=1 then
  sqltmpcust=sqltmpcust || ' join set_cust b on a.customerid=b.id and b.setz
and b.uid=' || uidparm;
 end if;
 if cntparm0 then
  if cntparm=1 then
   sqltmpcust=sqltmpcust || ' join set_country c on c.id=a.countryid and
c.setz and c.uid=' || uidparm;
  else --cntparm=2
   sqltmpcust=sqltmpcust || 'join countries c on c.countryid=a.countryid
join set_region d on d.id=c.regionid and d.setz and d.uid=' || uidparm;
  end if;
 end if;
 execute 'create temporary table tmpcust as ' || sqltmpcust;

 sqltmporder='select a.* from quotations a join tmpcust b on
a.customerid=b.customerid
   join quotationitems c on c.quotationid=a.quotationid join tmpprod d on
d.productid=c.productid';
 if orderparm not in (0,5) then
  sqltmporder=sqltmporder || ' where orderdate = ';
  if orderparm = 1 then
   sqltmporder=sqltmporder || 'current_date - interval ''3 months''';
  elsif orderparm=2 then
   sqltmporder=sqltmporder || 'current_date - interval ''1 year''';
  elsif orderparm=3 then
   sqltmporder=sqltmporder || 'current_date - interval ''2 years''';
  elsif orderparm=4 then
   sqltmporder=sqltmporder || 'current_date - interval ''3 years''';
  elsif orderparm=6 then
   if startdateparm is null then
sqltmporder=sqltmporder || 'current_date - interval ''' || monthsparm ||
' months''';
   else --startdateparm
sqltmporder=sqltmporder ||  || startdateparm || ;
   end if;
  end if;
 end if;
 execute 'create temporary table tmporder as ' || sqltmporder;
return;
end;
$$ language 'plpgsql';



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Greg Sabino Mullane

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

  
 Stupid question, but what does MySQL bring to the equation?  Why
 not just use PostgreSQL in the first place?

A good question. I think one answer is the MySQL name. Many open-source
advocates seem enamored of MySQL, but you can never pin them down about
exactly what it is they love so much about it. Maybe we can rebrand
PG as MiSQL or something. :)

The other answer may be the license: plugging PG into the MySQL system
(which is about as technically feasible trying to breed a porpoise
and an elephant) keeps MySQL GPL, which is another reason many people
like it.

- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200510101028
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-BEGIN PGP SIGNATURE-

iD8DBQFDSnrqvJuQZxSWSsgRAj7lAJ96I0TGpeOTFSkR91J8FLLIjU2ekgCgsM7C
DfI6bse1MVYUVrW9uGl69hM=
=ose4
-END PGP SIGNATURE-



---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[GENERAL] Is a primary key made of a couple columns so much better than a unique() constraint ?

2005-10-10 Thread David Pradier
Hi everybody,

i'd like to know if it is better to use a primary key made of a couple
columns, than to use a constraint UNIQUE() on this couple columns,
regarding the sake of postgresql.

For example, i've got these two tables, 'buyer' and 'purchaser' and i
want to make an association table buyer_purchaser in which i get only
some couples (id_buyer, id_purchaser), with a unique() contraint on them.

If i put a primary key on the couple, i won't use it, because the
framework on top of it is unable to use a primary key made of a couple of
columns.
Si my question is : is it better, in so far as only the database is
concerned, to have a primary key than a unique() contraint on a couple
columns ?

Thanks in advance for your answers,
David

-- 
David Pradier -- Directeur Technique de Clarisys Informatique -- Chef de projet 
logiciels libres / open-source

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-10 Thread Scott Marlowe
On Thu, 2005-10-06 at 17:42, Mark Cave-Ayland wrote:
 Hi everyone,
 
 I've just got back from LinuxWorld in London and seeing this thread thought
 I would share my experience of the MySQL stand - if you are of a delicate
 dispostion, please look away now. I basically asked them straight up why I
 should use MySQL instead of PostgreSQL and was quite surprised by the
 result, mainly since it was not done on features but more on FUD. The basic
 message was this:

This is sad.  In the past, the FUD efforts of MySQL AB were really quite
shameful.  I had thought we had moved past that phase, with the MySQL
folks understanding that bad mouthing PostgreSQL is a losing proposition
in the long run, because people don't like being lied to, and get
especially upset when they've dedicated resources to a project only to
find out that the technology they paid for can't do the job, and the
technology they were told couldn't do the job can.  Sigh.  

   - MySQL is the most popular open source database, with over 6m
 enterprise
   installs, with a large company supporting it. PostgreSQL is run by a
 very 
   small community of developers.

Actually, the same could be said of Samba and Apache.  I'll take one Tom
Lane or Jan Wieck or (all the other postgresql hackers go here) over
1,000 MySQL hackers.

I wonder what kind of result we would get if we compared something like
new lines of code per month / year of the two projects

 
   - PostgreSQL doesn't have row level locking.

Now that's rich.  

 And this last comment really took the biscuit - I really hope that the none
 of the core team read this and decide to throw in the towel:
 
   MySQL has the biggest collection of database experts... Open source
 people
   don't know how to write databases

The saddest part is the people who hear this and believe it.  

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Dan Armbrust

Greg Sabino Mullane wrote:


The other answer may be the license: plugging PG into the MySQL system
(which is about as technically feasible trying to breed a porpoise
and an elephant) keeps MySQL GPL, which is another reason many people
like it.



The fact that PostgreSQL is NOT released under GPL is the reason that 
people like me are here - MySQL's license drove us away from them. 
Their change of the driver licensing prevents us from shipping new 
drivers with our applications.


GPL is a poison pill when it comes to groups like us that are trying to 
develop standards (and shared code bases) that can be used by both 
opensource and corporate types alike.


So keep up the good work!

Dan


--

Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] copy data between database

2005-10-10 Thread Scott Marlowe
On Fri, 2005-10-07 at 21:34, Qingqing Zhou wrote:
 [EMAIL PROTECTED] wrote
  Hi, I have a table A in both database d1 and d2. I would like to copy
  data in A in d1 to A in d2. How can I do it? I do not want to copy all
  data, just some part of A,
 
 
 
 Here is a way if you feel want to try. The basic idea is that create a table 
 (say OS file name of this table is xxx) for the part of data of A that you 
 are interested in d1, and create another table of the same structure in d2 
 but empty with OS file name yyy. Then normally shutdown database, replace 
 yyy with xxx. Restart database again, you will get the data in d2. Notice 
 that you must make sure that two database d1 and d2 are initialized with the 
 same parameters.

Under no circumstances should you do this with a database that has any
data in it that you value.  pg_dump / pg_restore / psql are the
preferred way of doing this.

Note that for what is being done here, slony would be a great fit as
well, and now that it's available as an rpm, it should be pretty easy to
setup and use.

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Welty, Richard
Brent Wood wrote:
Two? I haven't used Firebird, but have heard lots of positive comments
from users. Firebird/Postgres/MySQL together maybe? Or with all the
embedded SQLlite users out there, perhaps all four :-)

i can't think of a single good reason why anyone in the PostgreSQL
community would put any time or energy into helping save MySQL
AB's bacon. one of the downsides of FUD campaigns is that people
remember these things.

PostgreSQL is BSD licensed, they can take it if they want and try
and do something with it. good luck trying and all that.

richard

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Is a primary key made of a couple columns so much better than a unique() constraint ?

2005-10-10 Thread Martijn van Oosterhout
On Mon, Oct 10, 2005 at 04:44:54PM +0200, David Pradier wrote:
 Hi everybody,
 
 i'd like to know if it is better to use a primary key made of a couple
 columns, than to use a constraint UNIQUE() on this couple columns,
 regarding the sake of postgresql.

In PostgreSQL, both primary keys and UNIQUE constraints are implemented
via UNIQUE indexes, ergo there is no difference...

Have a nice day,
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
 tool for doing 5% of the work and then sitting around waiting for someone
 else to do the other 95% so you can sue them.


pgpUZC5DxlAs4.pgp
Description: PGP signature


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread michael
On Mon, 10 Oct 2005 09:53:17 -0500
Dan Armbrust [EMAIL PROTECTED] wrote:

 The fact that PostgreSQL is NOT released under GPL is the reason that 
 people like me are here - MySQL's license drove us away from them. 
 Their change of the driver licensing prevents us from shipping new 
 drivers with our applications.
 
 GPL is a poison pill when it comes to groups like us that are trying
 to  develop standards (and shared code bases) that can be used by both
 opensource and corporate types alike.

 So keep up the good work!
 
 Dan

Preach it brother!

Michael

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] strange error

2005-10-10 Thread Tom Lane
Sim Zacks [EMAIL PROTECTED] writes:
 I am receiving the following error and cannot understand what it means.
 Please let me know if this makes sense to you.

 ERROR:  could not open relation 1663/3364852/7973197: No such file or
 directory
 CONTEXT:  SQL statement create temporary table tmpcust as select a.* from
 qry_Customers_Country a
 PL/pgSQL function buildsrtemptables line 34 at execute statement

That's pretty darn odd.  Is qry_Customers_Country a temp table, plain
table, view, or what?  What PG version is this exactly, running on what
platform?  When the error happens, can you find any row in pg_class with
relfilenode equal to the third number mentioned (7973197 above), and if
so what table is it?

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] Is a primary key made of a couple columns so much better than a unique() constraint ?

2005-10-10 Thread David Pradier
 In PostgreSQL, both primary keys and UNIQUE constraints are implemented
 via UNIQUE indexes, ergo there is no difference...

Thanks Martijn, it's exactly what i wanted to know.

Best regards,
David

-- 
David Pradier -- Directeur Technique de Clarisys Informatique -- Chef de projet 
logiciels libres / open-source

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] strange error

2005-10-10 Thread Sim Zacks
qry_Customers_Country is a view.
There is no row in pg_class with relfilenode=7973197 either when it
works or after I get the error.
The version (from select version()) is
PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc 
(GCC) 3.3.5  (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)


Thank You
Sim Zacks




Sim Zacks [EMAIL PROTECTED] writes:
 I am receiving the following error and cannot understand what it means.
 Please let me know if this makes sense to you.

 ERROR:  could not open relation 1663/3364852/7973197: No such file or
 directory
 CONTEXT:  SQL statement create temporary table tmpcust as select a.* from
 qry_Customers_Country a
 PL/pgSQL function buildsrtemptables line 34 at execute statement

That's pretty darn odd.  Is qry_Customers_Country a temp table, plain
table, view, or what?  What PG version is this exactly, running on what
platform?  When the error happens, can you find any row in pg_class with
relfilenode equal to the third number mentioned (7973197 above), and if
so what table is it?

regards, tom lane


---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-10 Thread Michael Fuhr
On Mon, Oct 10, 2005 at 09:51:48AM -0500, Scott Marlowe wrote:
 I'll take one Tom Lane or Jan Wieck or (all the other postgresql
 hackers go here) over 1,000 MySQL hackers.

Likewise.  They probably don't hear it enough, so I hope they're
aware that some of us have a great deal of respect for both their
technical abilities and the professionalism with which they run the
project.  I hope their employers appreciate what they've got.

-- 
Michael Fuhr

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Is a primary key made of a couple columns so much better than a unique() constraint ?

2005-10-10 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes:
 On Mon, Oct 10, 2005 at 04:44:54PM +0200, David Pradier wrote:
 i'd like to know if it is better to use a primary key made of a couple
 columns, than to use a constraint UNIQUE() on this couple columns,
 regarding the sake of postgresql.

 In PostgreSQL, both primary keys and UNIQUE constraints are implemented
 via UNIQUE indexes, ergo there is no difference...

Just for the sake of completeness, there are exactly two differences:

* PRIMARY KEY implies NOT NULL on the key columns; UNIQUE doesn't.

* PRIMARY KEY creates a default target for foreign key references,
  ie, if you've declared a primary key then you can later just say
  REFERENCES mytab instead of spelling out REFERENCES mytab(keycol).

So UNIQUE + NOT NULL is pretty dang close to the same as PRIMARY
KEY, but not quite.

regards, tom lane

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] Is a primary key made of a couple columns so much better than a unique() constraint ?

2005-10-10 Thread David Pradier
 Just for the sake of completeness, there are exactly two differences:
 * PRIMARY KEY implies NOT NULL on the key columns; UNIQUE doesn't.
 * PRIMARY KEY creates a default target for foreign key references,
   ie, if you've declared a primary key then you can later just say
   REFERENCES mytab instead of spelling out REFERENCES mytab(keycol).
 So UNIQUE + NOT NULL is pretty dang close to the same as PRIMARY
 KEY, but not quite.
   regards, tom lane

Thanks too, Tom :-)

Best regards,
David

-- 
David Pradier -- Directeur Technique de Clarisys Informatique -- Chef de projet 
logiciels libres / open-source

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] strange error

2005-10-10 Thread Tom Lane
Sim Zacks [EMAIL PROTECTED] writes:
 The version (from select version()) is
 PostgreSQL 8.0.1 on i686-pc-linux-gnu, compiled by GCC i686-pc-linux-gnu-gcc 
 (GCC) 3.3.5  (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)

Gentoo eh?  When you run a bleeding-edge distribution, sometimes you get
nicked :-(.  I'm betting this is some weird kernel bug.  You might try
another distro with tighter quality control.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


[GENERAL]

2005-10-10 Thread Florian Ledoux
Hello,

Having freshly installed a PG database (8.0.3), I have difficulties in
tracing exceptions in my PL/pgSQL functions. All my functions 
implement a BEGIN-EXCEPTION-END block in which exceptions must be
traced :
BEGIN
   -- Some stuff
EXCEPTION
  WHEN OTHERS THEN
  -- trace
END;

I would like to trace the SQLCODE that triggers the exception. I have
heard about a SQLSTATE variable but it doesn't seem to be implemented
in the 8.0.3 but only in the 8.1 (not stable release and so not a good
choice in a professional context...).

How can I get this information ? Is there a patch available ? Is there
a workaround ?

Thanks

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


[GENERAL] Too many clients connected

2005-10-10 Thread Venki




Hi All,
I am sorry if this was already discussed. I am new to the world of
postgressql and was experincing a problem for which I need help of an
expert in this lists.
We have devloped a site(asp.net 1.1) for which we have used postgresql 7.4
as the backend database. When the number of connections increases we are
getting an error Too many clients are connected we then adjusted the
number of connections from the initial value of 30+ to 200 it get solved
initially but we are experincing the same problem again. Before adjust the
connection settings I would like some one with answers to the following
questions.
1. How does postgresql handles database connections?
2. Under what situations does this error Too many clients connected is
thrown?
3. Should we increase the max connection settings to say 1000 if yes what
about the PC configuration that is needed for it. We are currently running
the postgresql in a linux box with 1 GB ram and 2GHZ xeon processor.
4. is it advisable to upgrade postgresql to 8.0?? will it solve this error
once and for all.

Thanks in advance

regards
venki


---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[GENERAL] error in SELECT from store procedure

2005-10-10 Thread Ivan Pavlov
I have a store procedure which returns a record; the query is defined as:

select * from spec_proc.view_empl_1('bg',2) AS (f1 varchar, f2 varchar,
f3 date, f4 varchar, f5 varchar,f6 varchar,f7 varchar, f8 varchar, f9
int, f10 varchar, f11 varchar, f12 varchar, f13 int, f14 varchar, f15
date, f16 date)

I recieve the following error:

ERROR:  record employee is not assigned yet
DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.

The record employee is the record returned by the store procedure.
It is created after all other data are assigned to variables.
Any ideas what might cause this?

I.P.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Too many clients connected

2005-10-10 Thread Moises Alberto Lindo Gutarra
first of all, your clients are closing connections??
yo should use a pool connection.

2005/10/10, [EMAIL PROTECTED] [EMAIL PROTECTED]:




 Hi All,
 I am sorry if this was already discussed. I am new to the world of
 postgressql and was experincing a problem for which I need help of an
 expert in this lists.
 We have devloped a site(asp.net 1.1) for which we have used postgresql 7.4
 as the backend database. When the number of connections increases we are
 getting an error Too many clients are connected we then adjusted the
 number of connections from the initial value of 30+ to 200 it get solved
 initially but we are experincing the same problem again. Before adjust the
 connection settings I would like some one with answers to the following
 questions.
 1. How does postgresql handles database connections?
 2. Under what situations does this error Too many clients connected is
 thrown?
 3. Should we increase the max connection settings to say 1000 if yes what
 about the PC configuration that is needed for it. We are currently running
 the postgresql in a linux box with 1 GB ram and 2GHZ xeon processor.
 4. is it advisable to upgrade postgresql to 8.0?? will it solve this error
 once and for all.

 Thanks in advance

 regards
 venki


 ---(end of broadcast)---
 TIP 4: Have you searched our list archives?

   http://archives.postgresql.org



--
Atte

Moises Alberto Lindo Gutarra
Consultor y Desarrollador Java / Open Source
TUMI Solutions SAC
Tel: +51.13481104
Cel: +51.197366260
MSN : [EMAIL PROTECTED]

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Too many clients connected

2005-10-10 Thread Csaba Nagy
Venki,

Postgres is using a thread per _realized_ connection, and reserves some
memory per _configured_ connection. So setting the configured connection
count too high is not free even if normally you won't have that many
connections actually open. And of course at peak load the number of
connections will go high, causing higher resource usage, which might be
worse than handling the same load with a fixed number of connection
managed by a connection pool.

So the short answer to your question is: you should look into using a
connection pooling solution for accessing the DB. I guess you're using
.net, which I have absolutely no idea about, but I guess there must be
some connection pooling project, general or postgres specific - search
for it :-)

HTH,
Csaba.


On Mon, 2005-10-10 at 17:59, [EMAIL PROTECTED] wrote:
 
 
 Hi All,
 I am sorry if this was already discussed. I am new to the world of
 postgressql and was experincing a problem for which I need help of an
 expert in this lists.
 We have devloped a site(asp.net 1.1) for which we have used postgresql 7.4
 as the backend database. When the number of connections increases we are
 getting an error Too many clients are connected we then adjusted the
 number of connections from the initial value of 30+ to 200 it get solved
 initially but we are experincing the same problem again. Before adjust the
 connection settings I would like some one with answers to the following
 questions.
 1. How does postgresql handles database connections?
 2. Under what situations does this error Too many clients connected is
 thrown?
 3. Should we increase the max connection settings to say 1000 if yes what
 about the PC configuration that is needed for it. We are currently running
 the postgresql in a linux box with 1 GB ram and 2GHZ xeon processor.
 4. is it advisable to upgrade postgresql to 8.0?? will it solve this error
 once and for all.
 
 Thanks in advance
 
 regards
 venki
 
 
 ---(end of broadcast)---
 TIP 4: Have you searched our list archives?
 
http://archives.postgresql.org


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Richard_D_Levine


[EMAIL PROTECTED] wrote on 10/09/2005 08:16:22 AM:

 
  This is the first time I can think of where software being GPL'd might
  actually hurt the open-source community.

The MySQL license has been modified so that it is, IMHO, not compatible
with the GPL.  The basic tenet of the GPL is that I can freely copy and
distribute, I just have to give back my contributions.  MySQL cannot be
freely copied and distributed if you are going to make money.

MySQL built a business model based on this modification, not on GPL.  Had
they left the GPL alone and used a consulting business model, they would
not be in this mess.  The business model, the GPLing of the drivers, and
the FUD show a commercial operation parading as a FOSS advocate.

I find the discussion of FOSS RDBMS developers uniting against Oracle
strange.  What are you going to hit them with? Your massive marketing
budgets?  The only weapon available is the quality of the products, and
PostgreSQL is already wielding that weapon mightily.

What is Oracle after?  Small DB technology?  They already have rdb.
Firebird, back in the Groton Database Corporation days, was built to be
compatible with rdb.  Marrying those technologies through modification of
existing gateways makes more technological sense than InnoDB.

Oracle is trying for market share, as they always do, but it appears ill
conceived.  MySQL is for people who can't or won't tune and manage a DBMS.
Oracle products are just not going to fit.  Both on price and complexity.
If they kill MySQL, they are just going to increase other true FOSS RDBMS
projects' market share.  Power to them.

Cheers,

Rick


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Welty, Richard
Marc G. Fournier wrote:
Stupid question, but what does MySQL bring to the equation?  Why not just 
use PostgreSQL in the first place?

really.

to my mind, the best thing the PostgreSQL community can do for the
MySQL community is provide simple, easy to use migration tools
and documentation.

cheers,
  richard

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Too many clients connected

2005-10-10 Thread Scott Marlowe
On Mon, 2005-10-10 at 10:59, [EMAIL PROTECTED] wrote:
 
 
 Hi All,
 I am sorry if this was already discussed. I am new to the world of
 postgressql and was experincing a problem for which I need help of an
 expert in this lists.
 We have devloped a site(asp.net 1.1) for which we have used postgresql 7.4
 as the backend database. When the number of connections increases we are
 getting an error Too many clients are connected we then adjusted the
 number of connections from the initial value of 30+ to 200 it get solved
 initially but we are experincing the same problem again. Before adjust the
 connection settings I would like some one with answers to the following
 questions.

It sounds to me like your application is leaking connections.  This
usually happens when your application doesn't close connections on
exit.  This is bad behaviour, and the best fix is to stop this from
happening.

 1. How does postgresql handles database connections?

One at a time?  Not sure what you're asking for here.  Or do you want to
know about time outs?  Generally, PostgreSQL lets the TCP/IP stack
timeout connections.  for this reason, you may find it useful to set
tcp_keepalive to something small, like 300, and the retries to something
small as well.

On a linux box (that has sysctl installed), you can see these settings
like so:

 sysctl -a|grep tcp_k
net.ipv4.tcp_keepalive_intvl = 75
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_time = 600

The keepalive time is normally set to two hours (7200).  What happens is
that at the end of the keepalive_time, the kernel will send a tcp
keepalive packet to the other end.  It will wait 75 seconds, and repeat
this for 8 more times (9 total) and THEN will time out the connection
and let PostgreSQL know that the connection is dead.

If you set your keepalive time to 600 (10 minutes) and reduce the probes
and intvl so they multiply out to about 5 minutes, then lost
connections should be harvested by postgresql fast enough to keep up
with the loss.  Note this isn't a fix it's a workaround.

 2. Under what situations does this error Too many clients connected is
 thrown?

When too many clients are connected?  Sorry.  I think my answer to 1
covered this point as well.

 3. Should we increase the max connection settings to say 1000 if yes what
 about the PC configuration that is needed for it. We are currently running
 the postgresql in a linux box with 1 GB ram and 2GHZ xeon processor.

No, you should set it high enough that by reducing tcp keepalive you
don't ever run out.  Monitor the number of backends with something like:

watch ps ax|grep post|wc -l

(or use the backend to check it with some kind of select from pg_...)

and see how high your number gets.  As long as it doesn't spike really
fast, the tcp keepalive will keep you afloat until you can fix your .net
app or connector.

Also, look at connection pooling, as mentioned elsewhere.  If you don't
want to use application level pooling, look at pg_pool.

 4. is it advisable to upgrade postgresql to 8.0?? will it solve this error
 once and for all.

No, this error is NOT in postgresql's domain, it is in your
application's domain.  However, 8.0 is quite a step up from 7.4...

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Indexen on 8.0.3

2005-10-10 Thread Gaetano Mendola
Tom Lane wrote:
 [EMAIL PROTECTED] writes:
 After upgrading to 8.0.3 I see very poor performance on several indexes.
 ...
 Database was recently analyzed. Clearly, something has to be tuned that 
 didn't 
 need tuning on 7.4.3 ? (Main table has about 1.7 million records).
 
 No, there's no reason for 8.0 to be slower at this than 7.4, if all else
 is equal.  I'm betting that all else is not equal.  Maybe you are using
 a different encoding or locale in the new installation than the old?

Mmm, sure 8.0 is not slower than 7.4 in certain scenarios?

Consider:

select f1(id), f2(id), ..., fn(id) from my_view;

where fi is eligible for be marked as STABLE but is not.

In 8.0 in that select are involved n+1 snapshots instead of one as it
in 7.4. Could this be a performance issue ?

Regards
Gaetano Mendola






---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread snacktime
On 10/7/05, Jim C. Nasby [EMAIL PROTECTED] wrote:
http://lnk.nu/prnewswire.com/4dv.pl--Jim C. Nasby, Sr. Engineering Consultant[EMAIL PROTECTED]Pervasive Software
http://pervasive.comwork: 512-231-6117vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
First thing that comes to my mind is that Oracle is setting the stage to buy them out. 


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Mitch Pirtle
On 10/10/05, Greg Sabino Mullane [EMAIL PROTECTED] wrote:

 A good question. I think one answer is the MySQL name. Many open-source
 advocates seem enamored of MySQL, but you can never pin them down about
 exactly what it is they love so much about it. Maybe we can rebrand
 PG as MiSQL or something. :)

Don't you mean OurSQL?

- Mitch, with an evil grin

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Dann Corbit
From:
http://www.filmsite.org/whof4.html

Valiant: Come on. Nobody's gonna drive this lousy freeway when they can take 
the Red Car for a nickel.
Doom: Oh, they'll drive. They'll have to. You see, I bought the Red Car so I 
could dismantle it.

I don't think Oracle has any interest in InnoDB other than to pull the rug out 
from under the commercial version of MySQL.  Ranks right up there with MS's 
gutting of STAK and Sun's claim of language ownership for Java.
IMO-YMMV.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of snacktime
Sent: Monday, October 10, 2005 10:14 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Oracle buys Innobase


On 10/7/05, Jim C. Nasby [EMAIL PROTECTED] wrote:
http://lnk.nu/prnewswire.com/4dv.pl
--
Jim C. Nasby, Sr. Engineering [EMAIL PROTECTED]
Pervasive Software   http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)--- 
TIP 2: Don't 'kill -9' the postmaster

First thing that comes to my mind is that Oracle is setting the stage to buy 
them out. 

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Marc G. Fournier


Stupid question here, but how susceptible is Oracle to monopolistic 
practices, similar to what M$ is going through with the DoJ in the US? 
This seems to be *very* close to the line, if it isn't over it ... no?


On Mon, 10 Oct 2005, Dann Corbit wrote:


From:
http://www.filmsite.org/whof4.html

Valiant: Come on. Nobody's gonna drive this lousy freeway when they can take 
the Red Car for a nickel.
Doom: Oh, they'll drive. They'll have to. You see, I bought the Red Car so I 
could dismantle it.

I don't think Oracle has any interest in InnoDB other than to pull the rug out 
from under the commercial version of MySQL.  Ranks right up there with MS's 
gutting of STAK and Sun's claim of language ownership for Java.
IMO-YMMV.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of snacktime
Sent: Monday, October 10, 2005 10:14 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Oracle buys Innobase


On 10/7/05, Jim C. Nasby [EMAIL PROTECTED] wrote:
http://lnk.nu/prnewswire.com/4dv.pl
--
Jim C. Nasby, Sr. Engineering [EMAIL PROTECTED]
Pervasive Software   http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster

First thing that comes to my mind is that Oracle is setting the stage to buy 
them out.

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq




Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] PostgreSQL missing in SuSE 10?

2005-10-10 Thread Steve Crawford
  Gregory Youngblood [EMAIL PROTECTED] writes:
  I've been using SuSE and PostgreSQL for a fairly long time.
  Recently (last 12 months), I've noticed that the 9.x (9.2 and
  9.3 specifically) versions of SuSE do not include PostgreSQL on
  the CD install -- only on the DVD. At first (9.2), I thought it
  was just a glitch that didn't get fixed in 9.3. Now, it seems to
  have been deliberate.

The real problem is that SuSE is not upfront about the difference 
between the CD and the DVD versions of their product. Someone (me) 
picking up the box would assume that the versions are the same but 
packaged on two different media but they (um, me) would be wrong. 

Even items listed on the box itself are not included on the CDs 
(Thunderbird, for example). Tech support was not helpful (Sorry, 
can't help. Go buy a DVD reader.)

Amusingly, even though the box contains CDs and DVDs, someone viewing 
the systems requirements on the web 
(http://www.novell.com/products/linuxprofessional/sysreqs.html) would 
not see that a CD or DVD is required at all. I suggested to the techs 
with whom I spoke that the web and box should have a prominent note 
that the CDs only contain a starter subset of the product but I 
haven't seen any evidence that SuSE/Novell wants to implement that 
form of truth-in-advertising.

Better still, they could quit being so frigging cheap and spring for 
the couple pennies/CD to make the CD version match the DVD version.

Cheers,
Steve

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Scott Marlowe
I think it kind of depends on how they treat with MySQL.  If they expect
MySQL to pay them $10,000 per installation, and MySQL was paying Heiki
$100 per installation, then that would be predatory.  OTOH, if they
charge the same rate, or some small incremental increase over what
innobase charges now, then I'd say no harm no foul.

Of course, knowing Oracle, they might want MySQL to pay by the CPU /
power rating, etc...  Licensing could be the same basic cost it is now,
but with so much paper work and documentation so as to be a nightmare.

I'm just glad PostgreSQL isn't beholden to licensed / patented software
to get the job done...

On Mon, 2005-10-10 at 12:47, Marc G. Fournier wrote:
 Stupid question here, but how susceptible is Oracle to monopolistic 
 practices, similar to what M$ is going through with the DoJ in the US? 
 This seems to be *very* close to the line, if it isn't over it ... no?
 
 On Mon, 10 Oct 2005, Dann Corbit wrote:
 
  From:
  http://www.filmsite.org/whof4.html
 
  Valiant: Come on. Nobody's gonna drive this lousy freeway when they can 
  take the Red Car for a nickel.
  Doom: Oh, they'll drive. They'll have to. You see, I bought the Red Car so 
  I could dismantle it.
 
  I don't think Oracle has any interest in InnoDB other than to pull the rug 
  out from under the commercial version of MySQL.  Ranks right up there with 
  MS's gutting of STAK and Sun's claim of language ownership for Java.
  IMO-YMMV.
  
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of snacktime
  Sent: Monday, October 10, 2005 10:14 AM
  To: pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Oracle buys Innobase
 
 
  On 10/7/05, Jim C. Nasby [EMAIL PROTECTED] wrote:
  http://lnk.nu/prnewswire.com/4dv.pl
  --
  Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
  Pervasive Software   http://pervasive.comwork: 512-231-6117
  vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461
 
  ---(end of broadcast)---
  TIP 2: Don't 'kill -9' the postmaster
 
  First thing that comes to my mind is that Oracle is setting the stage to 
  buy them out.
 
  ---(end of broadcast)---
  TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq
 
 
 
 Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
 Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
 ---(end of broadcast)---
 TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Joshua D. Drake

Marc G. Fournier wrote:



Stupid question here, but how susceptible is Oracle to monopolistic 
practices, similar to what M$ is going through with the DoJ in the 
US? This seems to be *very* close to the line, if it isn't over it ... 
no?


They are not... too many competitors... MS suffers because they are 98% 
of the desktop.

Oracle isn't even close to 98% of the database market.



On Mon, 10 Oct 2005, Dann Corbit wrote:


From:
http://www.filmsite.org/whof4.html

Valiant: Come on. Nobody's gonna drive this lousy freeway when they 
can take the Red Car for a nickel.
Doom: Oh, they'll drive. They'll have to. You see, I bought the Red 
Car so I could dismantle it.


I don't think Oracle has any interest in InnoDB other than to pull 
the rug out from under the commercial version of MySQL.  Ranks right 
up there with MS's gutting of STAK and Sun's claim of language 
ownership for Java.

IMO-YMMV.

From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of snacktime

Sent: Monday, October 10, 2005 10:14 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Oracle buys Innobase


On 10/7/05, Jim C. Nasby [EMAIL PROTECTED] wrote:
http://lnk.nu/prnewswire.com/4dv.pl
--
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software   http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster

First thing that comes to my mind is that Oracle is setting the stage 
to buy them out.


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq




Marc G. Fournier   Hub.Org Networking Services 
(http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 
7615664

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly




--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread David Fetter
On Mon, Oct 10, 2005 at 02:47:31PM -0300, Marc G. Fournier wrote:
 
 Stupid question here, but how susceptible is Oracle to monopolistic
 practices, similar to what M$ is going through with the DoJ in the
 US?  This seems to be *very* close to the line, if it isn't over it
 ... no?

It may well be, but somebody would have sue, and then they would have
to win against Oracle.  I don't think that MySQL AB has the resources
to fight such a legal action, even assuming they'd win it.

Cheers,
D
-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Dann Corbit
Consider what happened to Stak verse MS.
Stak won the court case but still went out of business.

 -Original Message-
 From: David Fetter [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 10, 2005 11:17 AM
 To: Marc G. Fournier
 Cc: Dann Corbit; snacktime; pgsql-general@postgresql.org
 Subject: Re: [GENERAL] Oracle buys Innobase
 
 On Mon, Oct 10, 2005 at 02:47:31PM -0300, Marc G. Fournier wrote:
 
  Stupid question here, but how susceptible is Oracle to monopolistic
  practices, similar to what M$ is going through with the DoJ in the
  US?  This seems to be *very* close to the line, if it isn't over it
  ... no?
 
 It may well be, but somebody would have sue, and then they would have
 to win against Oracle.  I don't think that MySQL AB has the resources
 to fight such a legal action, even assuming they'd win it.
 
 Cheers,
 D
 --
 David Fetter [EMAIL PROTECTED] http://fetter.org/
 phone: +1 510 893 6100   mobile: +1 415 235 3778
 
 Remember to vote!

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread David Fetter
On Mon, Oct 10, 2005 at 11:29:24AM -0700, Dann Corbit wrote:
 Consider what happened to Stak verse MS.  Stak won the court case
 but still went out of business.

My point exactly ;)

Cheers,
D
 
  -Original Message-
  From: David Fetter [mailto:[EMAIL PROTECTED]
  Sent: Monday, October 10, 2005 11:17 AM
  To: Marc G. Fournier
  Cc: Dann Corbit; snacktime; pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Oracle buys Innobase
  
  On Mon, Oct 10, 2005 at 02:47:31PM -0300, Marc G. Fournier wrote:
  
   Stupid question here, but how susceptible is Oracle to monopolistic
   practices, similar to what M$ is going through with the DoJ in the
   US?  This seems to be *very* close to the line, if it isn't over it
   ... no?
  
  It may well be, but somebody would have sue, and then they would have
  to win against Oracle.  I don't think that MySQL AB has the resources
  to fight such a legal action, even assuming they'd win it.
  
  Cheers,
  D
  --
  David Fetter [EMAIL PROTECTED] http://fetter.org/
  phone: +1 510 893 6100   mobile: +1 415 235 3778
  
  Remember to vote!

-- 
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] copy data between database

2005-10-10 Thread Qingqing Zhou

Scott Marlowe [EMAIL PROTECTED] wrote

 Under no circumstances should you do this with a database that has any
 data in it that you value.  pg_dump / pg_restore / psql are the
 preferred way of doing this.


Oh yeah, sorry for the miss leading information. My method is dangerous and 
can not cover all the cases (say you have an external stored column, etc).

Sorry about it,
Qingqing 



---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] copy data between database

2005-10-10 Thread Scott Marlowe
On Mon, 2005-10-10 at 13:53, Qingqing Zhou wrote:
 Scott Marlowe [EMAIL PROTECTED] wrote
 
  Under no circumstances should you do this with a database that has any
  data in it that you value.  pg_dump / pg_restore / psql are the
  preferred way of doing this.
 
 
 Oh yeah, sorry for the miss leading information. My method is dangerous and 
 can not cover all the cases (say you have an external stored column, etc).
 
 Sorry about it,
 Qingqing 

No need to apologize.  I do that same kind of thing all the time.  Just
not on production servers is all.  

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread CSN

--- Michael Fuhr [EMAIL PROTECTED] wrote:

 On Sun, Oct 09, 2005 at 12:46:51PM -0700, CSN wrote:
  select * from table1 where id=586;
  586|a|b|c|d
 
 Do you get different results from the following
 queries?
 
 SET enable_seqscan TO on;
 SET enable_indexscan TO off;
 SELECT * FROM table1 WHERE id = 586;

This returns 2 rows.

 SET enable_seqscan TO off;
 SET enable_indexscan TO on;
 SELECT * FROM table1 WHERE id = 586;

This returns 1 row.

  Yet:
  select * from table1 where id=585 and id=587;
  585|c|a|e|f
  586|a|b|c|d
  586|a|b|c|d
  587|g|e|r|z
 
 What's the output of the following query?
 
 RESET enable_seqscan;
 RESET enable_indexscan;
 
 SELECT oid, ctid, xmin, cmin, xmax, cmax, *
 FROM table1
 WHERE id = 585 AND id = 587;

  oid   |   ctid|  xmin   | cmin |  xmax   | cmax
| id
+---+-+--+-+--+-
 125465 | (3143,78) | 1664385 |0 | 1664386 |2
| 984
 125466 | (2745,50) | 1481020 |0 | 1682425 |2
| 985
 125466 | (2672,11) | 1445346 |0 | 1481020 |0
| 985
 125467 | (3159,28) | 1671875 |0 | 1671876 |2
| 986

(I'm using a different duplicate row - 985. I deleted
586's duplicate.)

Is this a problem with the index? Would rebuilding
them fix this problem? I'm still curious why this
happened, and somewhat troubled that something like
this can happen.

Thanks for your help,
CSN


 If you get the error 'column oid does not exist'
 then you've
 created the table without oids, so just omit oid
 from the select
 list:
 
 SELECT ctid, xmin, cmin, xmax, cmax, *
 FROM table1
 WHERE id = 585 AND id = 587;
 
  Wow, how is this possible? I'm using PG 8.0.3 on
  Windows XP. This computer has been crashing
 repeatedly
  lately, if that could be blamed (bad memory? hard
  disk? I haven't quite figured out why.)
 
 Faulty hardware is one possibile explanation.
 
 -- 
 Michael Fuhr
 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] error in SELECT from store procedure

2005-10-10 Thread Michael Fuhr
On Mon, Oct 10, 2005 at 06:43:25PM +0300, Ivan Pavlov wrote:
 I have a store procedure which returns a record; the query is defined as:
 
 select * from spec_proc.view_empl_1('bg',2) AS (f1 varchar, f2 varchar,
 f3 date, f4 varchar, f5 varchar,f6 varchar,f7 varchar, f8 varchar, f9
 int, f10 varchar, f11 varchar, f12 varchar, f13 int, f14 varchar, f15
 date, f16 date)
 
 I recieve the following error:
 
 ERROR:  record employee is not assigned yet
 DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.
 
 The record employee is the record returned by the store procedure.
 It is created after all other data are assigned to variables.
 Any ideas what might cause this?

Without seeing the function's code we can only guess.  My first
guess is that a simplified version of the function would look
like this:

CREATE FUNCTION foo() RETURNS SETOF record AS $$
DECLARE
employee  record;
BEGIN
employee.f1 := 'value of f1 column';
RETURN NEXT employee;
RETURN;
END;
$$ LANGUAGE plpgsql;

Calling this function yields the same error you're getting:

SELECT * FROM foo() AS (f1 varchar);
ERROR:  record employee is not assigned yet
DETAIL:  The tuple structure of a not-yet-assigned record is indeterminate.
CONTEXT:  PL/pgSQL function foo line 4 at assignment

See Record Types in the PL/pgSQL documentation for the reason:

http://www.postgresql.org/docs/8.0/interactive/plpgsql-declarations.html#PLPGSQL-DECLARATION-RECORDS

The substructure of a record variable can change each time it is
assigned to.  A consequence of this is that until a record variable
is first assigned to, it has no substructure, and any attempt to
access a field in it will draw a run-time error.

I'd guess you're making an assignment to a particular field instead
of to the record variable as a whole, so PL/pgSQL doesn't know what
the record structure should be.  If that's the case, consider
creating a composite type and declaring employee to be of that type,
and perhaps also declare the function to return that type.  Another
possibility would be to assign employee via a SELECT INTO statement.

-- 
Michael Fuhr

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Chris Browne
[EMAIL PROTECTED] (Marc G. Fournier) writes:
 Stupid question here, but how susceptible is Oracle to monopolistic
 practices, similar to what M$ is going through with the DoJ in the
 US? This seems to be *very* close to the line, if it isn't over it
 ... no?

No.  The market for databases is hardly a monopoly, what with (at the
top end) DB2 and Microsoft SQL Server being actively sold alternatives
to Oracle's products.

Someone might argue that there is a problem, but there would be plenty
of counterevidence to counterargue with.
-- 
(reverse (concatenate 'string gro.gultn @ enworbbc))
http://www3.sympatico.ca/cbbrowne/oses.html
Rules of the Evil Overlord #200. During times of peace, my Legions of
Terror will  not be permitted to  lie around drinking  mead and eating
roast boar. Instead they will be  required to obey my dietician and my
aerobics instructor. http://www.eviloverlord.com/

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread Tom Lane
CSN [EMAIL PROTECTED] writes:
   oid   |   ctid|  xmin   | cmin |  xmax   | cmax | id
 +---+-+--+-+--+-
  125466 | (2672,11) | 1445346 |0 | 1481020 |0 | 985
  125466 | (2745,50) | 1481020 |0 | 1682425 |2 | 985

Hmm.  The fact that the dup rows have the same OID indicates pretty
strongly that they are actually two versions of the same row, and
not two independently inserted rows.  Furthermore we can see that xact 
1481020 deleted the first version and inserted the second (note I took
the liberty of rearranging your output to make the rows appear in
chronological order).

So the index hasn't screwed up, exactly; the problem is that both rows
appear as good at the same time.  But why?

It's really highly annoying that we can't see the contents of the
infomasks for the rows.  Would you be willing to grab a copy of
pg_filedump and dump out these two data pages so we can see the
complete tuple headers?

(If you don't have a compiler then you'd need to find a precompiled
copy of pg_filedump for Windows.  I don't know if anyone's made one
available.)

Given that you say the machine has been crashing, my bet is that a crash
caused the loss of pg_clog status for xid 1481020 at a time when
2745,50's xmin had been marked committed good, but 2672,11's xmax had
not been similarly marked.  We have sufficient defenses against this
sort of thing *if the disk drive does not lie about write complete*.
(Unfortunately the vast majority of el-cheapo PCs are configured to lie
with abandon, which means that we can't guarantee data consistency
across power failures on such hardware.)  It'd be nice to get direct
confirmation of that theory though.

regards, tom lane

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread CSN

I don't have a compiler on this machine. If somebody
can point me to a copy of pg_filedump for Windows (I
didn't see any using Google) I'd be happy to use it.
Or perhaps I could compile it under cygwin.

The hard drive is a Western Digital 200GB JD (SATA),
if that can be used to determine how badly it lies. ;)

Thanks,
CSN


--- Tom Lane [EMAIL PROTECTED] wrote:

 CSN [EMAIL PROTECTED] writes:
oid   |   ctid|  xmin   | cmin |  xmax   |
 cmax | id
 

+---+-+--+-+--+-
   125466 | (2672,11) | 1445346 |0 | 1481020 |  
  0 | 985
   125466 | (2745,50) | 1481020 |0 | 1682425 |  
  2 | 985
 
 Hmm.  The fact that the dup rows have the same OID
 indicates pretty
 strongly that they are actually two versions of the
 same row, and
 not two independently inserted rows.  Furthermore we
 can see that xact 
 1481020 deleted the first version and inserted the
 second (note I took
 the liberty of rearranging your output to make the
 rows appear in
 chronological order).
 
 So the index hasn't screwed up, exactly; the problem
 is that both rows
 appear as good at the same time.  But why?
 
 It's really highly annoying that we can't see the
 contents of the
 infomasks for the rows.  Would you be willing to
 grab a copy of
 pg_filedump and dump out these two data pages so we
 can see the
 complete tuple headers?
 
 (If you don't have a compiler then you'd need to
 find a precompiled
 copy of pg_filedump for Windows.  I don't know if
 anyone's made one
 available.)
 
 Given that you say the machine has been crashing, my
 bet is that a crash
 caused the loss of pg_clog status for xid 1481020 at
 a time when
 2745,50's xmin had been marked committed good, but
 2672,11's xmax had
 not been similarly marked.  We have sufficient
 defenses against this
 sort of thing *if the disk drive does not lie about
 write complete*.
 (Unfortunately the vast majority of el-cheapo PCs
 are configured to lie
 with abandon, which means that we can't guarantee
 data consistency
 across power failures on such hardware.)  It'd be
 nice to get direct
 confirmation of that theory though.
 
   regards, tom lane
 




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread Scott Marlowe
On Mon, 2005-10-10 at 15:51, CSN wrote:
 I don't have a compiler on this machine. If somebody
 can point me to a copy of pg_filedump for Windows (I
 didn't see any using Google) I'd be happy to use it.
 Or perhaps I could compile it under cygwin.
 
 The hard drive is a Western Digital 200GB JD (SATA),
 if that can be used to determine how badly it lies. ;)

The general rule is that ATA (parallel or serial) drives lie.  You can
turn off the write cache, which will make it slower, but then it should
be reliable during a power loss.

Or, put it all on a big UPS and hope the power supply never goes out.

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread Michael Fuhr
On Mon, Oct 10, 2005 at 04:28:57PM -0400, Tom Lane wrote:
 It's really highly annoying that we can't see the contents of the
 infomasks for the rows.

Any particular reason there isn't an infomask system column?

-- 
Michael Fuhr

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] weird problem with grants

2005-10-10 Thread Dick Kniep
Hi list,

I have a weird problem with grants. Probably I am forgetting something, but I 
simply don't understand it.

We have a user 'x' that is member of group 'a'
there is a sequence where 
Grant all on table schema.sequence to group 'a'

But still I get a permission denied when I try to access the sequence as user 
'x'.

Thanks in advance.

D.Kniep

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread Tom Lane
Michael Fuhr [EMAIL PROTECTED] writes:
 On Mon, Oct 10, 2005 at 04:28:57PM -0400, Tom Lane wrote:
 It's really highly annoying that we can't see the contents of the
 infomasks for the rows.

 Any particular reason there isn't an infomask system column?

(a) inertia

(b) lack of desire to add an additional pg_attribute row per table.

I recall having proposed that we stop storing explicit pg_attribute
entries for system columns, which would make this sort of change easier
to make, and would save a pretty considerable amount of space in
pg_attribute too.  (In the present regression database, about 45% of the
rows in pg_attribute are for system columns; that might be overly high
for real-world DBs though.)  But people were a bit worried about what
might break.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] weird problem with grants

2005-10-10 Thread Scott Marlowe
On Mon, 2005-10-10 at 16:37, Dick Kniep wrote:
 Hi list,
 
 I have a weird problem with grants. Probably I am forgetting something, but I 
 simply don't understand it.
 
 We have a user 'x' that is member of group 'a'
 there is a sequence where 
 Grant all on table schema.sequence to group 'a'
 
 But still I get a permission denied when I try to access the sequence as user 
 'x'.

Did you grant permission on the sequence as well?

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] weird problem with grants

2005-10-10 Thread Tom Lane
Dick Kniep [EMAIL PROTECTED] writes:
 We have a user 'x' that is member of group 'a'
 there is a sequence where 
 Grant all on table schema.sequence to group 'a'

 But still I get a permission denied when I try to access the sequence as user 
 'x'.

Works fine for me, so you've omitted some critical bit of information.

regression=# create user x;
CREATE ROLE
regression=# create group g with user x;
CREATE ROLE
regression=# create sequence seq;
CREATE SEQUENCE
regression=# grant all on seq to group g;
GRANT
regression=# \c - x
You are now connected as new user x.
regression= select nextval('seq');
 nextval
-
   1
(1 row)

Given that you've mentioned schemas, a couple of possibilities are that
user x doesn't have USAGE permission on the schema containing the
sequence, or that he has a different search path which is leading him
to find a different sequence altogether.

If that doesn't help, let's see the exact case (including exact error
message) instead of a uselessly-abstract summary.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread Martijn van Oosterhout
On Mon, Oct 10, 2005 at 05:28:17PM -0400, Tom Lane wrote:
 I recall having proposed that we stop storing explicit pg_attribute
 entries for system columns, which would make this sort of change easier
 to make, and would save a pretty considerable amount of space in
 pg_attribute too.  (In the present regression database, about 45% of the
 rows in pg_attribute are for system columns; that might be overly high
 for real-world DBs though.)  But people were a bit worried about what
 might break.

In catalog/heap.c there already is a SystemAttributeByName() to do the
legwork. Seems to me all you'd need to do is check just as you're about
to fail on attribute not found.

If you actually look at scanRTEForColumn() in parser/parse_relation.c
it actually checks to see if a column name could be a system column
name, *before* looking it up in the catalog. Remove the catalog test
(except for OID obviously) and it'd sail right through. It'd be
interesting to see what happened...

Given that internally, they're referred to by number, it might not be
so bad. As usual, external clients might get confused if they're not
there...
-- 
Martijn van Oosterhout   kleptog@svana.org   http://svana.org/kleptog/
 Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
 tool for doing 5% of the work and then sitting around waiting for someone
 else to do the other 95% so you can sue them.


pgphlMek3EBog.pgp
Description: PGP signature


Re: [GENERAL] Duplicate primary keys/rows

2005-10-10 Thread Tom Lane
Martijn van Oosterhout kleptog@svana.org writes:
 On Mon, Oct 10, 2005 at 05:28:17PM -0400, Tom Lane wrote:
 But people were a bit worried about what
 might break.

 In catalog/heap.c there already is a SystemAttributeByName() to do the
 legwork. Seems to me all you'd need to do is check just as you're about
 to fail on attribute not found.

We could certainly make it work as far as the backend is concerned.
The issue is whether there is any client code out there that will fail
if these entries are no longer present in pg_attribute.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] INSERT OR UPDATE?

2005-10-10 Thread Jim C. Nasby
Check the TODO, I'm 99% certain it's on there.

On Mon, Oct 10, 2005 at 02:02:32PM +0200, Csaba Nagy wrote:
 On Mon, 2005-10-10 at 13:34, Lincoln Yeoh wrote:
 [snip]
  It's actually quite surprising how many people get this wrong and don't 
  realize it (I wonder how many problems are because of this). The SQL spec 
  should have had a PUT/MERGE decades ago. The insert vs update format being 
  different is also annoying, oh well.
 
 Referring to the above, is there any plan to implement such commands in
 postgres ? I don't know if it is standard SQL, but some other RDBMSes
 have such command, and they are actually useful.
 
  
  Regards,
  Link.
 [snip]
 
 Cheers,
 Csaba.
 
 
 
 ---(end of broadcast)---
 TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq
 

-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] PostgreSQL 8.1 vs. MySQL 5.0?

2005-10-10 Thread Jim C. Nasby
On Mon, Oct 10, 2005 at 09:51:48AM -0500, Scott Marlowe wrote:
 Actually, the same could be said of Samba and Apache.  I'll take one Tom
 Lane or Jan Wieck or (all the other postgresql hackers go here) over
 1,000 MySQL hackers.
 
 I wonder what kind of result we would get if we compared something like
 new lines of code per month / year of the two projects

Well, shouldn't be too hard to figure that out if someone's so
inclined. I know kloc numbers have been posted for the past several
versions of PostgreSQL; someone would just need to do the same for
MySQL.

Of course, it gets a bit tricky, since you have to define what is
actually MySQL code... ie, do you count InnoDB stuff?
-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread J B
Guys,

I was interested in researching a few items regarding bug reports in
PostgreSQL, but I can't seem to find what the project uses as a bug
tracker. I see the web form and mailing list, but I can't imagine
they're not captured in some central repository.

Could someone point me in the right direction?

Thanks!

John

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] How to inject knowledge into a Postgres database

2005-10-10 Thread Jim C. Nasby
What's the datatype on naamvrouw? Notice that it's being casted to text,
which means an index on that column won't be used.

On Mon, Oct 10, 2005 at 11:29:38AM +0200, [EMAIL PROTECTED] wrote:
 
 Tom, Oleg, Yonathan,
 
 thanks for the suggestions.
 Indeed, upping the statistics from 10 to 100 helped.
 
 But order by did not:
 palga=# explain analyze select rapnaam from udps where geboortedatum = 
 '1966-01-01' and naamvrouw like 'vos%' order by geboortedatum;
 QUERY PLAN
 --
  Sort  (cost=18.07..18.08 rows=1 width=18) (actual time=774.941..774.941 
 rows=0 loops=1)
Sort Key: main.geboortedatum
-  Index Scan using nv on main  (cost=0.00..18.06 rows=1 width=18) 
 (actual 
 time=746.121..746.121 rows=0 loops=1)
  Index Cond: (((naamvrouw)::text = 'vos'::character varying) AND 
 ((naamvrouw)::text  'vot'::character varying))
  Filter: ((geboortedatum = '1966-01-01'::date) AND ((naamvrouw)::text 
 ~~ 'vos%'::text))
  Total runtime: 775.068 ms
 (6 rows)
 
 I got a similar problem with a functional index, but I guess my only option 
 is 
 to create a real column with the results of the function, and replace the 
 functional index with a real one.
 
 Thanks to all,
 
 Han Holl
 
 ---(end of broadcast)---
 TIP 4: Have you searched our list archives?
 
http://archives.postgresql.org
 

-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Joshua D. Drake

J B wrote:


Guys,

I was interested in researching a few items regarding bug reports in
PostgreSQL, but I can't seem to find what the project uses as a bug
tracker. I see the web form and mailing list, but I can't imagine
they're not captured in some central repository.

Could someone point me in the right direction?
 


http://archives.postgresql.org/pgsql-bugs/

Is about as central as you get AFAIK.

Speaking of which, I have a customer running PostgreSQL/Bugzilla right 
now and it works
well for them. Is anyone interested is having us set this up for the 
community?


Sincerely,

Joshua D. Drake



Thanks!

John

---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org
 




--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Jim C. Nasby
On Mon, Oct 10, 2005 at 07:59:16PM -0400, J B wrote:
 Guys,
 
 I was interested in researching a few items regarding bug reports in
 PostgreSQL, but I can't seem to find what the project uses as a bug
 tracker. I see the web form and mailing list, but I can't imagine
 they're not captured in some central repository.

Imagine harder. :)

Search the pgsql-bugs archives.
-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Jim C. Nasby
On Mon, Oct 10, 2005 at 05:20:13PM -0700, Joshua D. Drake wrote:
 J B wrote:
 
 Guys,
 
 I was interested in researching a few items regarding bug reports in
 PostgreSQL, but I can't seem to find what the project uses as a bug
 tracker. I see the web form and mailing list, but I can't imagine
 they're not captured in some central repository.
 
 Could someone point me in the right direction?
  
 
 http://archives.postgresql.org/pgsql-bugs/
 
 Is about as central as you get AFAIK.
 
 Speaking of which, I have a customer running PostgreSQL/Bugzilla right 
 now and it works
 well for them. Is anyone interested is having us set this up for the 
 community?

IIRC the last time this was brought up it was violently shot-down on
-hackers (and the fact that bugzilla didn't directly support PostgreSQL
back then had nothing to do with it).
-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Marc G. Fournier

On Mon, 10 Oct 2005, Joshua D. Drake wrote:


J B wrote:


Guys,

I was interested in researching a few items regarding bug reports in
PostgreSQL, but I can't seem to find what the project uses as a bug
tracker. I see the web form and mailing list, but I can't imagine
they're not captured in some central repository.

Could someone point me in the right direction?


http://archives.postgresql.org/pgsql-bugs/

Is about as central as you get AFAIK.

Speaking of which, I have a customer running PostgreSQL/Bugzilla right 
now and it works well for them. Is anyone interested is having us set 
this up for the community?


To date, any discussions of setting up a BugTracker have ended with the 
developers themselves stating that they wouldn't use it, and have no 
interest in it ... so, you'd have to have someone you could assign as 
'liason' to handle monitoring -hackers and updating tickets, etc ... :(


This, like GPL vs BSD, comes up about every 3 months or so :)


Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Joshua D. Drake



IIRC the last time this was brought up it was violently shot-down on
-hackers (and the fact that bugzilla didn't directly support PostgreSQL
back then had nothing to do with it).
 

Yep, but you never know. Someday it just may happen. The community got 
Linus to

stop using his email box for patches, maybe someday we will get there too.

Sincerely,

Joshua D. Drake





--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Jan Wieck

On 10/10/2005 1:32 PM, Dann Corbit wrote:


From:
http://www.filmsite.org/whof4.html

Valiant: Come on. Nobody's gonna drive this lousy freeway when they can take 
the Red Car for a nickel.
Doom: Oh, they'll drive. They'll have to. You see, I bought the Red Car so I 
could dismantle it.

I don't think Oracle has any interest in InnoDB other than to pull the rug out 
from under the commercial version of MySQL.  Ranks right up there with MS's 
gutting of STAK and Sun's claim of language ownership for Java.
IMO-YMMV.


And this might not even be meant personally agains MySQL. There is this 
old tit for tat between Oracle and SAP, you know? Some of that finger 
wrestling lead to SAP having this other database, they don't really know 
what to do with (Adabas-D AKA SAP-DB AKA MaxDB). SAP still owns the 
rights to that code, but MySQL does all the maintenance and support for 
it. And as I understood it, there were plans to rebuild the MaxDB 
functionality in a future version of MySQL because the MaxDB code isn't 
exactly maintenance friendly.


Now here is the price question: How many SAP R/3 customers would chose 
that new MySQL version over Oracle while Oracle has their hand on that 
drain plug Innobase?



Jan

--
#==#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.  #
#== [EMAIL PROTECTED] #

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Marc G. Fournier

On Mon, 10 Oct 2005, Joshua D. Drake wrote:




IIRC the last time this was brought up it was violently shot-down on
-hackers (and the fact that bugzilla didn't directly support PostgreSQL
back then had nothing to do with it).



Yep, but you never know. Someday it just may happen. The community got 
Linus to stop using his email box for patches, maybe someday we will get 
there too.


Just as a suggestion/thought ... *if* you have the resources (or someone 
else wants to step up to it), why not setup the bug tracker, work with the 
-www guys on having the 'bug submission' stuff feed into it, and get a 
liason in place between it and -hackers?  put the structure into place, 
get ppl used to submitting/using it, and over time, it might be easier to 
get the developers themselves to use it vs having a middle man?


There may be some developers that will go over relatively easily *once* 
its in place, and others that stay resistent to it for awhile ...



Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Jim C. Nasby
On a side note, have you considered submitting a case study about the
work you're doing? One place where MySQL AB and it's zealots likes to
beat PostgreSQL over the head is with it's list of clients. It'd be nice
to be able to say that the Mayo Clinic is using PostgreSQL.

On Mon, Oct 10, 2005 at 09:53:17AM -0500, Dan Armbrust wrote:
 Greg Sabino Mullane wrote:
 
 The other answer may be the license: plugging PG into the MySQL system
 (which is about as technically feasible trying to breed a porpoise
 and an elephant) keeps MySQL GPL, which is another reason many people
 like it.
 
 
 The fact that PostgreSQL is NOT released under GPL is the reason that 
 people like me are here - MySQL's license drove us away from them. 
 Their change of the driver licensing prevents us from shipping new 
 drivers with our applications.
 
 GPL is a poison pill when it comes to groups like us that are trying to 
 develop standards (and shared code bases) that can be used by both 
 opensource and corporate types alike.
 
 So keep up the good work!
 
 Dan
 
 
 -- 
 
 Daniel Armbrust
 Biomedical Informatics
 Mayo Clinic Rochester
 daniel.armbrust(at)mayo.edu
 http://informatics.mayo.edu/
 
 ---(end of broadcast)---
 TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match
 

-- 
Jim C. Nasby, Sr. Engineering Consultant  [EMAIL PROTECTED]
Pervasive Software  http://pervasive.comwork: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf   cell: 512-569-9461

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Joshua D. Drake

Marc G. Fournier wrote:


On Mon, 10 Oct 2005, Joshua D. Drake wrote:




IIRC the last time this was brought up it was violently shot-down on
-hackers (and the fact that bugzilla didn't directly support PostgreSQL
back then had nothing to do with it).



Yep, but you never know. Someday it just may happen. The community 
got Linus to stop using his email box for patches, maybe someday we 
will get there too.



Just as a suggestion/thought ... *if* you have the resources (or 
someone else wants to step up to it), why not setup the bug tracker, 
work with the -www guys on having the 'bug submission' stuff feed into 
it, and get a liason in place between it and -hackers?  put the 
structure into place, get ppl used to submitting/using it, and over 
time, it might be easier to get the developers themselves to use it vs 
having a middle man?


There may be some developers that will go over relatively easily 
*once* its in place, and others that stay resistent to it for awhile ...


I have thought about that, however I would at least at some level want a 
blessing. For example, if we did that would we do it with

pgFoundry bug tracking? Or would we use Trac? Or Bugzilla?

If we got some interest in a particular direction then I bet some people 
(including us) would step up.


Sincerely,

Joshua D. Drake





Marc G. Fournier   Hub.Org Networking Services 
(http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 
7615664




--
Your PostgreSQL solutions company - Command Prompt, Inc. 1.800.492.2240
PostgreSQL Replication, Consulting, Custom Programming, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] How to delete Large Object from Database?

2005-10-10 Thread Premsun Choltanwanich

Excuse me, How? I try to find the way but not found. Douglas McNaught [EMAIL PROTECTED] 10-Oct-05 20:07:57 pm "Premsun Choltanwanich" [EMAIL PROTECTED] writes: The lib I use is call lo_in and lo_out for manage BLOB. I understand that lo_unlink be related with lo_import and lo_export so I don't think that it work.It's exactly what you want--it removes a LO with the specified OIDfrom the large object table. The 'contrib/lo' interface is just a thinwrapper around the base LO calls.-Doug


Re: [GENERAL] PostgreSQL's bug tracker

2005-10-10 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes:
 I have thought about that, however I would at least at some level want a 
 blessing. For example, if we did that would we do it with
 pgFoundry bug tracking? Or would we use Trac? Or Bugzilla?

I think the main thing that's killed previous proposals in this line
is that we could never get a consensus on which bug tracker to use.
Personally I'd be OK with Bugzilla, since I use it at Red Hat already,
but I know that some hate it violently.

There are also a set of issues involved in integrating any such project
with the pgsql-bugs list, which in the estimation of many of us is not
broken and does not need fixing.

Old-timers will recall that we already had one bad experience with an
early open-source bug tracker, which has left people a bit shy of the
concept too.  I think a large part of that had to do with confusion
between the purposes of bug *reporting* and bug *tracking*.  A mailing
list does very well for reporting issues that might be bugs, but not so
well for tracking the status of acknowledged bugs.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[GENERAL] Dumb question about serial's upper limit

2005-10-10 Thread CSN
If integer's range is -2147483648 to +2147483647, why
is serial's range only 1 to 2147483647 instead of 1 to
about 4294967294?

CSN



__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] Dumb question about serial's upper limit

2005-10-10 Thread Tom Lane
CSN [EMAIL PROTECTED] writes:
 If integer's range is -2147483648 to +2147483647, why
 is serial's range only 1 to 2147483647 instead of 1 to
 about 4294967294?

How are you going to stuff 4294967294 into an integer field, which as
you just stated has an upper limit of 2147483647?

If we had an unsigned int type, we could use it for serial and get
that result, but we do not.

regards, tom lane

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Terence



Marc G. Fournier wrote:


Stupid question, but what does MySQL bring to the equation?  Why not 
just use PostgreSQL in the first place?


Simplicity. A huge user base. No one is questioning that pg is a 
superior product :)



http://www.mysql.com/why-mysql/marketshare/ *

*with a pinch of salt perhaps

---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Bruce Momjian
[EMAIL PROTECTED] wrote:
 What is Oracle after?  Small DB technology?  They already have rdb.
 Firebird, back in the Groton Database Corporation days, was built to be
 compatible with rdb.  Marrying those technologies through modification of
 existing gateways makes more technological sense than InnoDB.
 
 Oracle is trying for market share, as they always do, but it appears ill
 conceived.  MySQL is for people who can't or won't tune and manage a DBMS.
 Oracle products are just not going to fit.  Both on price and complexity.
 If they kill MySQL, they are just going to increase other true FOSS RDBMS
 projects' market share.  Power to them.

Oracle must know that the comodity database days are coming.  By
attacking MySQL they delay that time by another few quarters, perhaps.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Bruce Momjian
Marc G. Fournier wrote:
 
 Stupid question here, but how susceptible is Oracle to monopolistic 
 practices, similar to what M$ is going through with the DoJ in the US? 
 This seems to be *very* close to the line, if it isn't over it ... no?
 

One big issue is that MS has the DOJ watching over it, as the DOJ did to
IBM when the PC came out.  Oracle doesn't have that oversight, meaning
that the database market is more aggressive.

---


 On Mon, 10 Oct 2005, Dann Corbit wrote:
 
  From:
  http://www.filmsite.org/whof4.html
 
  Valiant: Come on. Nobody's gonna drive this lousy freeway when they can 
  take the Red Car for a nickel.
  Doom: Oh, they'll drive. They'll have to. You see, I bought the Red Car so 
  I could dismantle it.
 
  I don't think Oracle has any interest in InnoDB other than to pull the rug 
  out from under the commercial version of MySQL.  Ranks right up there with 
  MS's gutting of STAK and Sun's claim of language ownership for Java.
  IMO-YMMV.
  
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of snacktime
  Sent: Monday, October 10, 2005 10:14 AM
  To: pgsql-general@postgresql.org
  Subject: Re: [GENERAL] Oracle buys Innobase
 
 
  On 10/7/05, Jim C. Nasby [EMAIL PROTECTED] wrote:
  http://lnk.nu/prnewswire.com/4dv.pl
  --
  Jim C. Nasby, Sr. Engineering [EMAIL PROTECTED]
  Pervasive Software?? http://pervasive.comwork: 512-231-6117
  vcard: http://jim.nasby.net/pervasive.vcf?? cell: 512-569-9461
 
  ---(end of broadcast)---
  TIP 2: Don't 'kill -9' the postmaster
 
  First thing that comes to my mind is that Oracle is setting the stage to 
  buy them out.
 
  ---(end of broadcast)---
  TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq
 
 
 
 Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
 Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
 ---(end of broadcast)---
 TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
 

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Bruce Momjian
Chris Browne wrote:
 [EMAIL PROTECTED] (Uwe C. Schroeder) writes:
  On Saturday 08 October 2005 21:07, Chris Browne wrote:
   2.  The code base was pretty old, pretty creaky, and has a *really*
   heavy learning curve.
 
   It was pretty famous as being *really* difficult to build; throw
   together such things as:
- It uses a custom set of build tools that were created for a
  mainframe environment and sorta hacked into Python
- Naming conventions for files, variables, and functions combine
  pseudo-German with an affinity for 8 character names that are
  anything but mnemonic.  (Think: Germans developing on MVS.)
- I seem to recall there being a Pascal translator to transform
  some of the code into C++...
 
  WOW - careful now. I'm german - but then, there's a reason why I
  immigrated to the US :-)
 
 I'm 1/4 German, and a couple brothers married German girls, so I'm not
 trying to be mean, by any stretch.
 
 The bad Procrustean part is the 8 character mainframe aspect, as it
 takes things that might have been mnemonic, at least to those knowing
 German, and distills things down in size so as to lose even that.
 
 It truly *was* Germans developing on MVS (or TSO or OS/360 or such)...

Just to clarify, directory names are single letters, and file names are
numbers --- I kid you not.

-- 
  Bruce Momjian|  http://candle.pha.pa.us
  pgman@candle.pha.pa.us   |  (610) 359-1001
  +  If your life is a hard drive, |  13 Roberts Road
  +  Christ can be your backup.|  Newtown Square, Pennsylvania 19073

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Dumb question about serial's upper limit

2005-10-10 Thread CSN

--- Tom Lane [EMAIL PROTECTED] wrote:

 CSN [EMAIL PROTECTED] writes:
  If integer's range is -2147483648 to +2147483647,
 why
  is serial's range only 1 to 2147483647 instead of
 1 to
  about 4294967294?
 
 How are you going to stuff 4294967294 into an
 integer field, which as
 you just stated has an upper limit of 2147483647?
 
 If we had an unsigned int type, we could use it for
 serial and get
 that result, but we do not.
 
   regards, tom lane
 

I was thinking about the types in the C code behind
PostgreSQL, rather than types in PG itself. Been a
long time since I coded in C but I thought it had
unsigned ints and maybe data types could be mapped as
so (pardon my ignorance about C/PG's inner workings):

PG int = C signed int
PG serial = C unsigned int

Anyhow, was just something I was curious about.

CSN




__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Oracle buys Innobase

2005-10-10 Thread Gregory Wood

Terence wrote:


Marc G. Fournier wrote:


Stupid question, but what does MySQL bring to the equation?  Why not 
just use PostgreSQL in the first place?


Simplicity.


Simplicity is in the eye of the beholder. Which of a dozen or so 
different storage engines should I use for table X? If I mix and match 
these table types, how will the database behave?


Personally I find simplicity to be in adherence to the SQL standard as 
closely as possible. Each database has their extensions, but every time 
I use MySQL it grates my teeth how much non-standard stuff I have to 
'relearn', making the experience anything *but* simple.



A huge user base.


While I would love PostgreSQL to be more widely used, I don't think 
something so ephemeral is necessarily something they bring to the 
table. Rather than shoehorn PostgreSQL into MySQL, having good 
migration tools seems to be the key here. After all, which of these 
widely used products were replaced, and which were expanded with outside 
technology:


Lotus 1-2-3
Wordperfect
IBM PC
etc


No one is questioning that pg is a superior product :)


As long as PostgreSQL manages to remain an active project with enough 
contributors to compete on features and/or performance, it doesn't need 
to attract any more attention than it already does, IMO. Owning a 
company that relies on PostgreSQL I see some value in more people being 
experienced with the database when it comes time to hire a DBA, but 
beyond that, it only needs to be a superior product.


Of course when someone /does/ know PostgreSQL, it's usually a sign that 
they have more than a passing familiarity. I wonder how many MySQL 
admins are on the same level of proficiency as Windows admins due to 
ubiquitity.


Gregory Wood

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] Dumb question about serial's upper limit

2005-10-10 Thread Michael Glaesemann


On Oct 11, 2005, at 14:04 , CSN wrote:


I was thinking about the types in the C code behind
PostgreSQL, rather than types in PG itself. Been a
long time since I coded in C but I thought it had
unsigned ints and maybe data types could be mapped as
so (pardon my ignorance about C/PG's inner workings):

PG int = C signed int
PG serial = C unsigned int


Serial is not a datatype per se; it's essentially a macro to create a  
sequence (foo_seq) and an INT column that has a default value of  
nextval('foo_seq').


Michael Glaesemann
grzm myrealbox com




---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly