Re: [GENERAL] moving an installation

2004-07-15 Thread Peter Eisentraut
David Parker wrote: > allows initdb and createdb to run, which was my initial stumbling > block. I haven't done anything in particular with the resulting > database yet. Do you expect the installation to break in other > places? Off the top of my head, at least createlang, pg_dumpall, and ecpg wil

Re: [GENERAL] PQftable insufficient for primary key determination

2004-07-15 Thread Michal Maruška
Tom Lane <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] (Michal =?iso-8859-2?q?Maru=B9ka?=) writes: >> So, my question is: should i look at the code which walks that tree >> (probably related to the function SendRowDescriptionMessage), or >> is this code (which provides the distinguishing info) a

Re: [GENERAL] PQftable insufficient for primary key determination

2004-07-15 Thread Tom Lane
[EMAIL PROTECTED] (Michal =?iso-8859-2?q?Maru=B9ka?=) writes: > So, my question is: should i look at the code which walks that tree > (probably related to the function SendRowDescriptionMessage), or > is this code (which provides the distinguishing info) already available? The problem is you haven

Re: [GENERAL] PQftable insufficient for primary key determination

2004-07-15 Thread Michal Maruška
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Fri, Jul 16, 2004 at 03:38:52 +0200, > Michal Maru?ka <[EMAIL PROTECTED]> wrote: >> >> >> Imagine i have a table A with primary key "p" and another attribute called "data": >> >> SELECT * from A, A, B; >> >> here, i will have 2 columns "data",

Re: [GENERAL] PQftable insufficient for primary key determination

2004-07-15 Thread Bruno Wolff III
On Fri, Jul 16, 2004 at 03:38:52 +0200, Michal Maru?ka <[EMAIL PROTECTED]> wrote: > > > Imagine i have a table A with primary key "p" and another attribute called "data": > > SELECT * from A, A, B; > > here, i will have 2 columns "data", PQftable tells me that they are from A, but > which of

Re: [GENERAL] SELECT based on function result

2004-07-15 Thread Tom Lane
Robert Fitzpatrick <[EMAIL PROTECTED]> writes: > SELECT sample_id, is_wipe_positive(tblleadwipe.sample_id) AS > positive FROM tblleadwipe WHERE hud_building_id IS NOT NULL; > I see that I cannot change my WHERE statement to WHERE positive = 't' > because the column positive does not exist. What h

Re: [GENERAL] moving an installation

2004-07-15 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > David Parker wrote: >> I need to be able to build postgres (7.4.3) with a given --prefix, >> but then pack up the installation directory and deploy it in another >> directory (as part of a product install, for instance). > This doesn't work. Not at t

[GENERAL] PQftable insufficient for primary key determination

2004-07-15 Thread Michal Maruška
Imagine i have a table A with primary key "p" and another attribute called "data": SELECT * from A, A, B; here, i will have 2 columns "data", PQftable tells me that they are from A, but which of the 2 columns "p" is the primary key of the tuple (of the table A)? Is it possible to get distingu

[GENERAL] oh

2004-07-15 Thread igor . kovalenko
is that yours? --- Trend GateLock [EMAIL PROTECTED] (主機:higp3.gatelock.com.tw) ** 中毒檔案 shower.com 已刪除。 Trend GateLock [EMAIL PROTECTED] (主機:higp3.gatelock.com.tw) ** 在檔案 shower.com 中發現病毒 WORM_NETSKY.C。 無法清除病毒,中毒檔案已刪除。

Re: [GENERAL] moving an installation

2004-07-15 Thread David Parker
Either a) modify share/conversion_create.sql to specify a full path or b) modify share/conversion_create.sql to simply remove "$libdir/" everywhere, then setting dynamic_library_path in share/postgresql.conf.sample allows initdb and createdb to run, which was my initial stumbling block. I haven

Re: [GENERAL] moving an installation

2004-07-15 Thread Peter Eisentraut
David Parker wrote: > I need to be able to build postgres (7.4.3) with a given --prefix, > but then pack up the installation directory and deploy it in another > directory (as part of a product install, for instance). > > I configured with --disable-rpath, but I'm still getting the This doesn't wo

[GENERAL] cd, ls, mkdir, rmdir, etc.

2004-07-15 Thread CSN
I really can't believe mysql users a lot of the time. They actually think this is a good idea. > ls # lists databases > cd database > ls # lists tables > mkdir database > rmdir database http://jeremy.zawodny.com/blog/archives/002230.html#comments The \d* commands are a lot more appealing :). So

Re: [GENERAL] moving an installation

2004-07-15 Thread David Parker
OK, I see the problem is in the share/conversion_create.sql script, which references $libdir as part of the library path. So modifying the script and replacing $libdir with an actual path fixes the problem, allowing initdb to run. But is there any way around this without actually modifying the scr

Re: [GENERAL] SELECT based on function result

2004-07-15 Thread David Parker
Did you try creating a view with that select statement, then just selecting from the view? I don't know if there is a restriction on using a function like that in a view definition or not. -DAP -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Fitzp

[GENERAL] SELECT based on function result

2004-07-15 Thread Robert Fitzpatrick
I have a function that tells me if a record is positive and negative based on several field values. I use it in select statements: ohc=> SELECT sample_id, is_wipe_positive(tblleadwipe.sample_id) AS positive FROM tblleadwipe WHERE hud_building_id IS NOT NULL; sample_id | positive ---+-

[GENERAL] moving an installation

2004-07-15 Thread David Parker
I need to be able to build postgres (7.4.3) with a given --prefix, but then pack up the installation directory and deploy it in another directory (as part of a product install, for instance). I configured with --disable-rpath, but I'm still getting the creating conversions... ERROR: could not

Re: [GENERAL] Getting started with replication

2004-07-15 Thread CSN
--- Richard Huxton <[EMAIL PROTECTED]> wrote: > CSN wrote: > > Are there any docs that deal with replication and > > Postgresql? Intro's, faq's, etc. > > > > Can anybody recommend a Postgresql replication > > package? I'm really not familiar with any - seems > like > > there are several, with poss

Re: [GENERAL] Describe table and varchar lrngth

2004-07-15 Thread Tony Li
Here's what I came up with: select format_type(a.atttypid, a.atttypmod) from pg_attribute a, pg_class c where a.attrelid = c.oid and a.attname = '' and c.relname = '' The result needs to be parsed... Tony On Jul 15, 2004, at 1:38 AM, Constantin Khatsckevich wrote: Hello! I need get ordered lengt

Re: [GENERAL] tcl and rpms for rhel3

2004-07-15 Thread Tom Lane
Devrim GUNDUZ <[EMAIL PROTECTED]> writes: > AFAIK, RHEL does not ship with tcl-devel package, that's why I've disabled > tcl support in spec file. Builds just fine for me... regards, tom lane ---(end of broadcast)--- TIP 5:

Re: [GENERAL] Aggregate functions with two or more arguments?

2004-07-15 Thread Tom Lane
> Brian K Boonstra wrote: >> ... aggregate functions >> appear to want just a single argument, so I feel like either I am on the >> wrong track, or I have run into a limitation of postgresql. Sooner or later someone should fix aggregates to allow multiple inputs. There was once a restriction in

Re: [GENERAL] Getting started with replication

2004-07-15 Thread Jeff Eckermann
Slony seems to be moving to the head of the pack of replication solutions. Still too new to say definitively. Slony author Jan Wieck has said repeatedly that replication is used in practice to meet various needs, and there is no one replication solution that can be ideal for all of them. For tha

[GENERAL] Describe table and varchar lrngth

2004-07-15 Thread Constantin Khatsckevich
Hello! I need get ordered length of the varchcar field in PHP. But pg_FieldLength return -1 (it's right), but I need to get max length for this field. For example, create table t ( str varchar(40) ); I need to get 40... Help me please! ---(end of broadcast)-

Re: [GENERAL] tcl and rpms for rhel3

2004-07-15 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Thu, 15 Jul 2004, javier wilson wrote: > i just build the rpm for rhel3 based on > postgresql-7.4.3-3PGDG.src.rpm but i did not get the > postgresql-tcl package. > > i looked for it in some mirrors like > ftp://ftp22.us.postgresql.org/mirror

[GENERAL] tcl and rpms for rhel3

2004-07-15 Thread javier wilson
i just build the rpm for rhel3 based on postgresql-7.4.3-3PGDG.src.rpm but i did not get the postgresql-tcl package. i looked for it in some mirrors like ftp://ftp22.us.postgresql.org/mirrors/www.postgresql.org/binary/v7.4.3/redhat/rhel3/ but apparently it is not included in the RPM version of pos