Re: [GENERAL] incorrect checksum in control file

2013-07-06 Thread Ian Turner
On Thursday, September 09, 2004 11:36:52 PM Tom Lane wrote: > "Jeffrey W. Baker" writes: > > I moved the database from a 32-bit arch to a 64-bit arch. All I did was > > shutdown a 7.4.1 database, shutdown the machine, swap the storage onto > > the 64-bit machine running 7.4.5, and try to restart.

Re: [GENERAL] incorrect checksum in control file

2013-07-06 Thread Ian Turner
On Saturday, July 06, 2013 11:39:19 PM Tom Lane wrote: > Install 32-bit Postgres executables. I'm not aware of any 64-bit > hardware that isn't able to run code built for its 32-bit predecessor. > (You might then wish to dump and reload into a 64-bit installation, but > whether you do or not, that

Re: [GENERAL] select question

2000-07-29 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Is there a way I can select the top 50 rows from table, 51 - 100 rows from > table etc (with order clause)? It is because I am writing a message board > and I would like to create the prev/next button on different page. Look at the documentat

Re: [GENERAL] Inheritance

2000-07-29 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > `SELECT * FROM Entities*;' > > up to and including 7.0.x. > > In 7.1, I believe a select on the parent will automatically show the > children and you will need to do something like `SELECT * FROM ONLY Entities' > to exclude descendant tables. Yes

Re: [GENERAL] Replication options in Postgres

2000-07-31 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > 1. In my PHP code, I have functions like > inserttransaction(values...). I could just modify inserttransaction() > so that it runs the same query (the INSERT) on two or more DB > servers. This would probably work ok. Why not have a proxy server t

Re: [GENERAL] CREATE TABLE from inside a function...

2000-08-16 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > IIRC you cannot use commands > like CREATE TABLE (etc) from PL/PGSQL (You'll get a cannot copy > node) Actually, this is fixed in 7.1. Ian -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.1 (GNU/Linux) Comment: For info see http://www.gnupg.org

[GENERAL] bits & the end of the world

2000-08-27 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I just got everyone's favorite error message: FATAL 1: my bits moved right off the end of the world! Recreate index pg_attribute_relid_attnum_index. Except, of course, this is a system index. The query was: CREATE TEMP TABLE NextHopTemp (n

Re: [GENERAL] SQL scripts - sequences

2000-08-29 Thread Ian Turner
ot;b" int4 DEFAULT nextval('a_b_seq'::text) NOT NULL, "c" int4 ); COPY "a" FROM stdin; 1 10 2 100 3 1000 4 1 \. So you see. All you do is create the sequence manually, with an optionally higher init

Re: [GENERAL] Error with tcp/ip networking

2000-08-31 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Now I'm back in business, but I don't understand why they didn't show > up in ps or ps -a. from the 'ps' manpage: aSelect all processes on a terminal, includ- ing those of other users xSelect processes without

Re: [GENERAL] POSTGRESQL vs. ORACLE 8i &Sybase & Interbase etc

2000-08-31 Thread Ian Turner
do not allow you to publish benchmark results for their product. So there is no way to know. Ian Turner -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.1 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE5rvyFfn9ub9ZE1xoRAsGDAJ47ArGoKnKEtG20ZrazosJA+/I+hQCgzucN W0U6euaJtMQMQXmbnnoNS1s=

[GENERAL] referential integrity

2000-08-31 Thread Ian Turner
, anum) VALUES (1,1,1); This passes without an error: delete from b where bnum = 1; delete from a where anum = 1; but this fails: delete from a where anum = 1; with this error: ERROR: referential integrity violation - key referenced from c not found in b Got any ideas? :o Ian Turner -BEGIN

Re: [GENERAL] function

2000-08-31 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > how can I write function which takes text from one field, replaces > some characters and puts it in other field? I have array with old and > new values. Probably best to do this as an embedded perl sql function. Then it is about 3 lines. Ian -

Re: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > CHECK (testconstraint(a, b)) Uhhh. I get no errors, but it dosen't work, either. Consider: CREATE FUNCTION testconstraint(int,int) RETURNS bool AS ' BEGIN RETURN (select sum(a) FROM test WHERE b = $2) < 1000; END; ' LANGUAGE 'plpgsql

Re: [GENERAL] subselect in CHECK constraint?

2000-09-04 Thread Ian Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Also, as several other people already pointed out, a constraint > involving a select could be violated in many ways including alteration > or removal of tuples in other tables. We only evaluate check > constraints when we insert/update tuples in th