SubSelect as a column

Started by Larsabout 26 years ago4 messagesgeneral
Jump to latest
#1Lars
lars@sscsinc.com

I am trying to use a subselect as a column name, but it appears as if this
is not supported in Postgresql. Here is the query:

SELECT u.idnum, u.username,
(SELECT COUNT(t.techid)
FROM ticket t
WHERE t.techid = u.idnum)
FROM users u;

the desired output would be:

idnum|username|?column?
-----+--------+--------
6|lomboy | 3
2|stuart | 6
4|trevor | 0
9|victor | 0

I can do this with the INNER JOIN:

SELECT u.idnum, MAX(u.username), COUNT(t.techid)
FROM users u, ticket t
WHERE t.techid = u.idnum
GROUP BY u.idnum;

But this will only return the those Whose count is not 0:

idnum|username|?column?
-----+--------+--------
6|lomboy | 3
2|stuart | 6

I have tried in vain to figure out how to do this correctly, but I am at a
loss. Any advice on how to get this to work.

Thank you very much in advance,

-Lars

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Lars (#1)
Re: [SQL] SubSelect as a column

Lars <lars@sscsinc.com> writes:

I am trying to use a subselect as a column name, but it appears as if this
is not supported in Postgresql. Here is the query:

SELECT u.idnum, u.username,
(SELECT COUNT(t.techid)
FROM ticket t
WHERE t.techid = u.idnum)
FROM users u;

Nope, doesn't work in 6.5.*. It is there in current sources for the
upcoming 7.0 release. Can't think of any good workaround in 6.5...

regards, tom lane

From bouncefilter Tue Feb 8 02:34:22 2000
Received: from photon.skillbrokers.bg (root@photon.skillbrokers.bg
[195.24.42.194]) by hub.org (8.9.3/8.9.3) with ESMTP id CAA44773
for <pgsql-general@postgreSQL.org>; Tue, 8 Feb 2000 02:34:16 -0500 (EST)
(envelope-from nmmm@nmmm.nu)
Received: from niki (proton.skillbrokers.bg [195.24.42.206])
by photon.skillbrokers.bg (8.9.0/8.9.0) with SMTP id KAA10528;
Tue, 8 Feb 2000 10:26:27 +0200
Message-ID: <003a01bf7206$6031a620$ce2a18c3@skillbrokers.bg>
From: "Nikolay Mijaylov" <nmmm@nmmm.nu>
To: "pgsql-general" <pgsql-general@postgreSQL.org>,
"Tom Lane" <tgl@sss.pgh.pa.us>
References:
<Pine.BSF.4.10.10002071642050.53230-100000@maximillion.sscsinc.com>
<27709.949980829@sss.pgh.pa.us>
Subject: Re: [SQL] SubSelect as a column
Date: Tue, 8 Feb 2000 09:30:27 +0200
MIME-Version: 1.0
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300

Define this as function:

SELECT COUNT(t.techid)
FROM ticket t
WHERE t.techid = $1

Then use this....
SELECT u.idnum, u.username, func(u.idnum)
FROM users u;

--------------------------------------------------------------
The reboots are for hardware upgrades!
"http://www.nmmm.nu; <nmmm@nmmm.nu>

----- Original Message -----
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Lars <lars@sscsinc.com>
Cc: <pgsql-sql@postgreSQL.org>
Sent: �������, �������� 08, 2000 05:33
Subject: Re: [SQL] SubSelect as a column

Lars <lars@sscsinc.com> writes:

I am trying to use a subselect as a column name, but it appears as if

this

is not supported in Postgresql. Here is the query:

SELECT u.idnum, u.username,
(SELECT COUNT(t.techid)
FROM ticket t
WHERE t.techid = u.idnum)
FROM users u;

Nope, doesn't work in 6.5.*. It is there in current sources for the
upcoming 7.0 release. Can't think of any good workaround in 6.5...

regards, tom lane

************

From bouncefilter Tue Feb 8 03:21:23 2000
Received: from mx6.rmplc.co.uk (mx6.rmplc.co.uk [194.238.48.58])
by hub.org (8.9.3/8.9.3) with ESMTP id DAA56662
for <pgsql-general@postgreSQL.org>; Tue, 8 Feb 2000 03:20:45 -0500 (EST)
(envelope-from s266@thekjs.essex.sch.uk)
Received: from server1.thekjs.essex.sch.uk (station1.thekjs.essex.sch.uk
[212.132.242.2]) by mx6.rmplc.co.uk (Postfix) with SMTP id B829788039
for <pgsql-general@postgreSQL.org>;
Tue, 8 Feb 2000 08:20:39 +0000 (GMT)
Received: from station20.thekjs.essex.sch.uk (station20.thekjs.essex.sch.uk
[212.132.242.21]) by server1.thekjs.essex.sch.uk (NTMail
3.02.13) with ESMTP id ja006041 for
<pgsql-general@postgreSQL.org>; Tue, 8 Feb 2000 08:22:09 +0000
From: "s266" <s266@thekjs.essex.sch.uk>
To: <pgsql-general@postgreSQL.org>
Subject:
Date: Tue, 8 Feb 2000 08:22:07 -0000
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1160
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Message-Id: <08220923402579@thekjs.essex.sch.uk>

subscribe
end

#3Patrick JACQUOT
patrick.jacquot@anpe.fr
In reply to: Lars (#1)
Re: [SQL] SubSelect as a column

Tom Lane wrote:

Lars <lars@sscsinc.com> writes:

I am trying to use a subselect as a column name, but it appears as if this
is not supported in Postgresql. Here is the query:

SELECT u.idnum, u.username,
(SELECT COUNT(t.techid)
FROM ticket t
WHERE t.techid = u.idnum)
FROM users u;

Nope, doesn't work in 6.5.*. It is there in current sources for the
upcoming 7.0 release. Can't think of any good workaround in 6.5...

regards, tom lane

************

i would do an UNION of the tuples coming from the joint
with the tuples from "users" who don't have a counterpart in "ticket",
using "not exists" and adding to them a zero count.
Hoping it will help
regards
P.Jacquot

From bouncefilter Tue Feb 8 06:29:25 2000
Received: from brianp.demon.co.uk (IDENT:brian@brianp.demon.co.uk
[158.152.38.192]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA01966
for <pgsql-general@postgresql.org>; Tue, 8 Feb 2000 06:29:18 -0500 (EST)
(envelope-from brian@brianp.demon.co.uk)
Received: from localhost (localhost [[UNIX: localhost]])
by brianp.demon.co.uk (8.9.3/8.8.7) id LAA00961
for pgsql-general@postgresql.org; Tue, 8 Feb 2000 11:29:09 GMT
From: Brian Piatkus <brian@brianp.demon.co.uk>
To: pgsql-general@postgresql.org
Subject: Large Database & Indexes (Indices?)
Date: Tue, 8 Feb 2000 11:22:42 +0000
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <00020811290902.00840@brianp>
Content-Transfer-Encoding: 8bit

I am constructing a large ( by some standards) database where the largest table
threatens to be about 6-10 Gb on a Linux system. I understand that postgresql
splits the tables into manageable chunks & I have no problem with that as a
workround for the 2 GB fs limit
.. My question concerns the indexes ,the first of which looks to be around
40 % of the table size. How is this
handled and how do I create subsequent indices on large tables given that I
can't interrupt the process, move and symbolically link chunks ?

From bouncefilter Tue Feb 8 07:29:26 2000
Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net
[194.217.242.41]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA15630
for <pgsql-general@postgresql.org>; Tue, 8 Feb 2000 07:28:34 -0500 (EST)
(envelope-from peter@retep.org.uk)
Received: from maidast.demon.co.uk ([158.152.22.37] helo=maidast.retep.org.uk)
by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1)
id 12I9kj-000Dot-0C; Tue, 8 Feb 2000 12:28:21 +0000
Received: from localhost (peter@localhost [127.0.0.1])
by maidast.retep.org.uk (8.9.3/8.9.3) with ESMTP id MAA05231;
Tue, 8 Feb 2000 12:26:13 GMT
Date: Tue, 8 Feb 2000 12:26:12 +0000 (GMT)
From: Peter Mount <peter@retep.org.uk>
To: Brian Piatkus <brian@brianp.demon.co.uk>
cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Large Database & Indexes (Indices?)
In-Reply-To: <00020811290902.00840@brianp>
Message-ID: <Pine.LNX.4.10.10002081224550.5227-100000@maidast.retep.org.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Tue, 8 Feb 2000, Brian Piatkus wrote:

I am constructing a large ( by some standards) database where the largest table
threatens to be about 6-10 Gb on a Linux system. I understand that postgresql
splits the tables into manageable chunks & I have no problem with that as a
workround for the 2 GB fs limit
.. My question concerns the indexes ,the first of which looks to be around
40 % of the table size. How is this
handled and how do I create subsequent indices on large tables given that I
can't interrupt the process, move and symbolically link chunks ?

IIRC Indices you the same storage manager as tables, so they should split
at the same intervals as tables (default is 1Gb). Someone correct me if
I'm wrong.

Peter

--
Peter T Mount peter@retep.org.uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf

From bouncefilter Tue Feb 8 08:25:27 2000
Received: from brianp.demon.co.uk (IDENT:brian@brianp.demon.co.uk
[158.152.38.192]) by hub.org (8.9.3/8.9.3) with ESMTP id IAA28467
for <pgsql-general@postgresql.org>; Tue, 8 Feb 2000 08:24:45 -0500 (EST)
(envelope-from brian@brianp.demon.co.uk)
Received: from localhost (localhost [[UNIX: localhost]])
by brianp.demon.co.uk (8.9.3/8.8.7) id NAA01389
for pgsql-general@postgresql.org; Tue, 8 Feb 2000 13:24:40 GMT
From: Brian Piatkus <brian@brianp.demon.co.uk>
To: pgsql-general@postgresql.org
Subject: Re: Large Database & Indexes (Indices?)
Date: Tue, 8 Feb 2000 13:22:35 +0000
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <00020811290902.00840@brianp>
In-Reply-To: <00020811290902.00840@brianp>
MIME-Version: 1.0
Message-Id: <00020813235403.00840@brianp>
Content-Transfer-Encoding: 8bit

Forget my last posting - sorry - I'm being stupid .fs size is, of course 4 Tb

From bouncefilter Tue Feb 8 10:15:28 2000
Received: from mail.rdc3.on.home.com (ha1.rdc3.on.home.com [24.2.9.68])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA58714
for <pgsql-general@postgresql.org>; Tue, 8 Feb 2000 10:14:50 -0500 (EST)
(envelope-from gouriathome@home.com)
Received: from home.com ([24.114.152.162]) by mail.rdc3.on.home.com
(InterMail v4.01.01.02 201-229-111-106) with ESMTP
id <20000208151230.GLQT10570.mail.rdc3.on.home.com@home.com>;
Tue, 8 Feb 2000 07:12:30 -0800
Sender: mailcheck
Message-ID: <38A03149.D55BBF86@home.com>
Date: Tue, 08 Feb 2000 10:07:53 -0500
From: gouri <gouriathome@home.com>
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: maillist@candle.pha.pa.us, pgsql-general@postgresql.org
Subject: initdb
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I am unable to start a new database or start postmaster on my system
with the following errors:

initdb:

syntax error 1061 : syntax errorinitdb: could not create template
database

initdb: cleaning up by wiping out /usr/local/pgsql/data/base/template1

Looks like the data directory in source is empty.

My installation does not show the .bki and template files (they don't
exist).

Any suggestions?

Thanks,

gk

From bouncefilter Tue Feb 8 10:54:42 2000
Received: from picasso.realtyideas.com (IDENT:kaiq@207-18-128-210.flex.net
[207.18.128.210] (may be forged))
by hub.org (8.9.3/8.9.3) with ESMTP id KAA77526
for <pgsql-general@postgreSQL.org>; Tue, 8 Feb 2000 10:53:54 -0500 (EST)
(envelope-from kaiq@picasso.realtyideas.com)
Received: from localhost (kaiq@localhost)
by picasso.realtyideas.com (8.9.3/8.9.3) with ESMTP id KAA16863;
Tue, 8 Feb 2000 10:46:33 -0600
Date: Tue, 8 Feb 2000 10:46:33 -0600 (CST)
From: <kaiq@realtyideas.com>
To: Marten Feldtmann <marten@feki.toppoint.de>
cc: Ed Loehr <eloehr@austin.rr.com>, sevo@ip23.net, davidb@vectormath.com,
pgsql-general@postgreSQL.org
Subject: Re: [GENERAL] using ID as a key
In-Reply-To: <200002071801.TAA03171@feki.toppoint.de>
Message-ID:
<Pine.LNX.4.10.10002081014440.14573-100000@picasso.realtyideas.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

sounds intriguing. although it still use db, but because it
does not need any special db feature (table-locking is
common), it qualifys as "programmatical" solution.

however, not totally understood yet, let's see:

comparing to file locking (e.g. perl's flock)
1) locking is enforced. safer than flock, which is just cooperative;
however, it need extra db session. seems flock is fast esp. if
each app connection session only need to get one id.
2) it gets a block of id's to the client to reduce traffic to the
"central control".
how about for each app connection session, usually only increase one?
overhead?
3) because 2) may create a lot of holes, to make it better, somehow (the
algorithm) it can return id's to the pool. (then, the id's assigned are
not monotonous) -- unless the client crashes.

is that understanding correct?

also, how many columns in the "central control" table, 2 or 3?

We need a special table on the database server. They have three
columns:

FX1 -- holding the next valid id within this session
FX2 -- holding the session number

######################################################################
On Mon, 7 Feb 2000, Marten Feldtmann wrote:

And here's the description of the "high-low" algorithm for
programs to create unique id's in a multi-user environement.

*** Structure of the identifier ***

Contents of the identifier:

a) session-id
b) current number within session
c) class id

These are three numbers. You may create a unique string to get
the id value into a single column.

In our product we decided to print each number to base 36 (to get well
defined ascii string. Fill the number a) and b) with special
characters (e.g. '#') to get strings with lengh of 6.

Then we do the same with c) but the max string length is here 3.

The total size of the id is stored in a column defined via
char(15). You will define an index on the column.

Very nice would be an index handling something like "right(id,3)",
because then you may not only query for a specific id value but
also for all instances of a special class.

*** Structure of the table doing the initial information transfer ***

We need a special table on the database server. They have three columns:

FX1 -- holding the next valid id within this session
FX2 -- holding the session number

A row can be written as (internal/session). These rows can be
seen as parameters which can be used from clients to generate unique
identifier.

*** How does it work ***

In the beginning the session table is empty or holds some session
informations. The starting client locks the table.

-> If the session-table is empty the client inserts a pair (0/2).
(session 2, id 0 within this session)

and uses 1 as it's own session number and 0 as the id number.

-> if the session-table is not empty is looks for the rows with the
highest (h) and lowest session number (l).

-> if both numbers are equal it stores a new row into the session
table the value-pair (0/h+1) and uses the row (h) for further
work. It removes the row (h) - or actually updates the row (h)
to become the row (h+1).

-> otherwise the application removes this row with session number
(l) and uses row (l) for further work.

The application unlocks the session-table.

*** After the initialization phase *

Now the application can create unique id's without doing a query
against the database (just be increment the id number within the
session). There may be the case where the application has created
so many objects that it uses all available numbers within a session:
ok, then it goesback to the initialization phase and calculates the
next session row.

If the application terminates is lockes the table and stores it's
actual values (?,session number) into the database. Other clients
may use this number in the future.

If the application crashes you may loose some id's -- but this is
not practically a problem.

If something is not clear - please ask.

Marten Feldtmann

************

From bouncefilter Tue Feb 8 12:13:29 2000
Received: from dcc.ufba.br (iansa.dcc.ufba.br [200.17.147.78])
by hub.org (8.9.3/8.9.3) with SMTP id MAA01425
for <pgsql-general@postgreSQL.org>; Tue, 8 Feb 2000 12:12:31 -0500 (EST)
(envelope-from flbeto@dcc.ufba.br)
From: flbeto@dcc.ufba.br
Received: from localhost by dcc.ufba.br (AIX 4.1/UCB 5.64/4.03)
id AA21650; Tue, 8 Feb 2000 14:33:59 -0400
Date: Tue, 8 Feb 2000 14:33:58 -0400 (AST)
To: pgsql-general@postgreSQL.org
Message-Id: <Pine.A41.3.96.1000208143103.19470A-100000@iansa.dcc.ufba.br>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

subscribe
end

#4Lars
lars@sscsinc.com
In reply to: Patrick JACQUOT (#3)
Re: [SQL] SubSelect as a column

Thanks, I will give that a try. Hopefully the NOT EXISTS will not be too
slow. It is my understanding, I could be very wrong, that NOT EXISTS will
not take advantage of my indexes.

On another note, any idea when PostgreSQL 7 will be released? It sure
would be nice to have the subselect as a colunm feature.

Thanks,

-Lars

On Tue, 8 Feb 2000, Patrick JACQUOT wrote:

Tom Lane wrote:

Lars <lars@sscsinc.com> writes:

I am trying to use a subselect as a column name, but it appears as if this
is not supported in Postgresql. Here is the query:

SELECT u.idnum, u.username,
(SELECT COUNT(t.techid)
FROM ticket t
WHERE t.techid = u.idnum)
FROM users u;

Nope, doesn't work in 6.5.*. It is there in current sources for the
upcoming 7.0 release. Can't think of any good workaround in 6.5...

regards, tom lane

************

i would do an UNION of the tuples coming from the joint
with the tuples from "users" who don't have a counterpart in "ticket",
using "not exists" and adding to them a zero count.
Hoping it will help
regards
P.Jacquot

************

From bouncefilter Tue Feb 8 22:02:37 2000
Received: from bender.toppoint.de (bender.toppoint.de [195.244.243.2])
by hub.org (8.9.3/8.9.3) with ESMTP id WAA62346
for <pgsql-general@postgreSQL.org>; Tue, 8 Feb 2000 22:01:48 -0500 (EST)
(envelope-from marten@feki.toppoint.de)
Received: (from uucp@localhost)
by bender.toppoint.de (8.9.3/8.9.3) id EAA25563;
Wed, 9 Feb 2000 04:01:13 +0100 (MET)

Received: (from marten@localhost)

by feki.toppoint.de (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id VAA06182;
Tue, 8 Feb 2000 21:23:11 +0100
From: Marten Feldtmann <marten@feki.toppoint.de>
Message-Id: <200002082023.VAA06182@feki.toppoint.de>
Subject: Re: [GENERAL] using ID as a key
In-Reply-To:
<Pine.LNX.4.10.10002081014440.14573-100000@picasso.realtyideas.com>
from "kaiq@realtyideas.com" at "Feb 8, 2000 10:46:33 am"
To: kaiq@realtyideas.com
Date: Tue, 8 Feb 2000 21:23:11 +0100 (CET)
CC: Ed Loehr <eloehr@austin.rr.com>, sevo@ip23.net, davidb@vectormath.com,
pgsql-general@postgreSQL.org
X-Mailer: ELM [version 2.4ME+ PL60 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII

sounds intriguing. although it still use db, but because it
does not need any special db feature (table-locking is
common), it qualifys as "programmatical" solution.

however, not totally understood yet, let's see:

comparing to file locking (e.g. perl's flock)
1) locking is enforced. safer than flock, which is just cooperative;
however, it need extra db session. seems flock is fast esp. if
each app connection session only need to get one id.
2) it gets a block of id's to the client to reduce traffic to the
"central control".
how about for each app connection session, usually only increase one?
overhead?
3) because 2) may create a lot of holes, to make it better, somehow (the
algorithm) it can return id's to the pool. (then, the id's assigned are
not monotonous) -- unless the client crashes.

is that understanding correct?

also, how many columns in the "central control" table, 2 or 3?

1)

The creation statement for the table is:

CREATE TABLE TX (FX1 int4, FX2 int4 not null)
CREATE UNIQUE INDEX FX2IND ON TX (FX2)

The table is locked via the following command in the start-up phase
of the application:

BEGIN
INSERT INTO TX (FX2) VALUES(-1)
COMMIT

If this statement does not produce an error, no other application
will get access to this table. Actually the application will try
to "lock" the table several times during start-up in case another
client has blocked it.

2) What happens for the first client.

No client has prior made a connection to the table. Therefore the client
get the internal value pair (session=1, id=0) and writes the following
value pair to the table (session=2,id=0). The client "unlocks" the
table via "delete ... where fx2=-1"

Now the client creates objects:

1 0 class-id
1 1 class-id
1 2 class-id
1 3 class-id

Now the application shuts down and writes back:

insert into ..... ( ) VALUES(1,4)

What happens with the second client ?

He now finds two rows with value pairs (1,4) and (2,0). He "locks"
the table and uses (1,4) for further work, remove the choosen value
pair from table and creates objects with:

1 4 class-id
1 5 class-id

Now the third client is coming.

He locks table, finds only (2,0), uses them, remove this pair from
table and insert (3,0), unlock the table and creates objects:

2 0 class-id
2 1 class-id
2 2 class-id

Now the second client terminates, writes back their value pair, then the
third client writes pack their value pair and we have the following pairs
within the table:

1 6
2 3
3 0

waiting for further clients to ask for values ...

3) Some further considerations about the work which has to be done on
the client. With the values above (6 digits to base 36) we can create
up to (36^6)-1 with a "fresh" value pair (x,0) without any further
communication to the database. (Therefore you may have up to
2.176.782.335 id for internal usage).

On the other side you may have up to (2^36)-1 sessions.

The client has to check for an overflow for each new id he creates

if newid >=2176782335 then
"get new session pair from database and forget your old one"

4) With the values below you may recognise 46.656 different classes
(or tables) which should be enough.

5) You may change these values (6/6/3) to other values which seems
to be better.

6) You may calculate how long it will take before you have no ids
available any longer ... it's quite a long time.

The idea behind this has been mentioned in several papers on the
Internet mentioned as "high-low" algorithm. Actually I've seen this
code in one wrapper product.

Marten

From bouncefilter Tue Feb 8 20:00:37 2000
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id UAA19818;
Tue, 8 Feb 2000 20:00:18 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id TAA54872;
Tue, 8 Feb 2000 19:42:29 -0500 (EST) (envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
From: "Javi Pi���ol" <enfris@wanadoo.es>
X-Newsgroups: 3b.misc, comp.databases.postgresql.hackers,
comp.databases.postgresql.interfaces,
comp.databases.postgresql.patches,
comp.databases.postgresql.ports,
comp.databases.postgresql.questions,
comp.databases.postgresql.sql, comp.databases.progress,
comp.dcom.la
Subject: POR FIN DINERO REAL SIN TRAMPAS
Lines: 321
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <QH2o4.2582$3U5.29987@m2newsread.uni2.es>
Date: Wed, 09 Feb 2000 00:40:16 GMT
X-Complaints-To: abuse@uni2.es
X-Trace: m2newsread.uni2.es 950056816 62.36.128.120 (Wed,
09 Feb 2000 01:40:16 MET)
Organization: Wanadoo WebNews - Visita http://www.wanadoo.es
To:
pgsql-hackers@postgresql.org.pgsql-interfaces@postgresql.org.pgsql-patches@postgresql.org.pgsql-ports@postgresql.org.pgsql-sql@postgresql.org.pgsql-questions@postgresql.org

!!!IMPRIME ESTA HOJA ...YAAAAAAAAAAA!!!

Perm���teme empezar diciendo que FINALMENTE LO ENCONTRE !!!. En serio!, lo
encontr���!. Y eso que odio todos esos
ESQUEMAS DE HACERTE RICO RAPIDO!!!. Odio esos esquemas de marketing con
varios niveles, o de hacer ���rdenes
por correo, o poniendo propaganda en sobre de correo, etc., la lista es
interminable.
Prob��� todos esos malditos esquemas de hacerte rico r���pido durante 5 a���os y
hasta quede "enganchado" en una lista de est���pidos que quieren hacer
dinero r���pido probando cualquier cosa. Pero bueno, son cosas de esa edad, y
esa
frase diciendo que podr���a ser rico r���pido me sonaba irresistible!.Estaba
desesperado por dinero!! Les di a cada uno de ellos un chance y todos y
cada uno de ellos fallaron!. Tal vez son buenos esquemas para algunos, pero
seguro no lo fue para m���. Eventualmente, tiraba todo eso a la basura
cuando recib��� este documento. Pude reconocerlo enseguida. Puedo "oler"
dinero a
un kil���metro de distancia estos d���as, sab���a que iba a ser relativamente
f���cil
y no estuve equivocado .... AMO EL INTERNET ... Estaba chequeando el
NEWSGROUP cuando vi un art���culo que dec���a de CONSEGUIR DINERO RAPIDO!!.
Pense ...
"EN EL INTERNET??. Bueno, tengo que ver que tipo de esquema pueden presentar
en
el Internet". Este art���culo describ���a la manera de mandar POR CORREO UN
BILLETE DE US$ 1.00 A SOLO SEIS PERSONAS Y GANAR US$ 50.000.00 EN EFECTIVO
EN 4>
SEMANAS!!!. Bueno, cuanto m���s pens��� acerca de esto m���s curioso me pon���a,?
por qu���?, por la manera en que esto trabajaba y PORQUE SOLO IBA A
COSTARME US$ 6.00 (Y SEIS ESTAMPILLAS), Y ESO ERA TODO LO QUE TENIA QUE
PAGAR ... Y
NADA MAS!!!. O.K., los US$ 50.000.00 en efectivo pod���a ser una punto alto
de alcanzar, pero era posible. Me figur��� que tal vez pod���a tener un alcance
de $1.000.00 mas o menos as��� que lo hice!!!. Como
dec���an las instrucciones en el art���culo, mand��� por correo un billete de un
d���lar a cada uno de las seis personas en la lista que conten���a el
articulo.
Inclu��� una peque���a nota que dec���a "POR FAVOR INCLUYAME EN SU LISTA" junto
con el d���lar. Luego rehice la lista en donde saque al primero, mov��� una
posici���n arriba a cada uno de los restantes e inclu��� mi nombre al final de
ella. Esta fue la forma de lograr que el dinero comenzara a llegarme!!.
Luego tom��� esta lista que acababa de modificar y la RE- PUBLIQUE EN TODOS
LOS NEWSGROUPS Y BBS LOCALES QUE CONOCIA y espere que el dinero empezara a
llegarme,preparada para recibir entre $1.000 y $1.500 en efectivo. Pero
que agradable sorpresa cuando todos esos sobres empezaron a llegarme !!!.
Supe
enseguida de que se trataban cuando vi que las direcciones de retorno
provenian de todas partes del mundo, la mayor���a de Estados Unidos, Canada
y Australia!. En mi primera semana hice unos 20.00 a 30.00 d���lares. Para el
final de la segunda semana ten���a hecho un total de m���s de US$ 1000.00!!!!!
En la tercera semana recib��� m���s de U$S 10,000.00 y todav���a segu���a llegando
m���s. Esta es mi cuarta semana y ya recib��� un total de US$ 23.343.00
!!!!!!FUE EXCITANTE!!! !!!No lo pod���a creer!!!
Tienes que seguirlo y re-publicarlo donde te sea posible, cuanto m���s se
publique y m���s gente lo vea, habr��� m���s posibilidades para todos de ganar
m���s dinero, esto determinar��� cu���nto te llegar��� por correo!!!. Es realmente
f���cil de pasarlo...
Revisemos las razones de por que hacerlo: los unicos gastos son 6
estampillas, 6 sobres y 6 d���lares (un billete de UN d���lar para cada uno en
la lista), luego re-publicar el artculo con tu nombre incluido en���todos
los NEWSGROUPS o BBS que se te ocurran (esto es gratis) y luego esperar por
los sobre que te lleguen. Todos tenemos 6 d���lares para gastar en una
inversi���n
f���cil y que no envuelve ning���n tipo de esfuerzo con UNA ESPECTACULAR
RECOMPENZA DE ENTRE US$ 15.000.00 Y US$ 120.000.00 en solo 3 a 5 semanas!.
As��� que private de jugar a la loteria hoy, o mejor come en casa en vez de
ir afuera e invierte esos 6 d���lares en esto que puede darte una grata
sorpresa!!!. No hay forma de perder !!! Como funciona esto exactamente???,
cuidadosamente proveo la m���s detalladas y simples instrucciones de como
vas a conseguir que te llegue dinero f���cil. Prep���rate para lograrlo, esta es
la forma...
************************************************************
LISTA DE NOMBRES -- LISTA DE NOMBRES -- LISTA DE NOMBRES
*********************************************************************
1. Nicolas Arancibia Roman
Lidice 749-B
Poblacion Esperanza
Rancagua
CHILE

2. Rodrigo G���mez Zamorano
Duble Almeyda # 3074 Departamento 201
���u���oa - Santiago
CHILE

3. Sergio Rodr���guez Asensio
C/Dr Mara������n 11 2A
03610 Petrer (Alicante)
ESPA���A

4. Nacho Escudero Fernandez
c/ Islas Cies 55 6��� G
28035 Madrid
ESPA���A

5. Rosa Company Valverde
c/ Perez Dolz n���7 6��� D
12003 Castell���n
ESPA���A

6. Javier Pi���ol Rey
Apartado de Correos 1148
25080 Lleida
ESPA���A

O.K. lee esto cuidadosamente. No es que sea necesario, pero es una buena
idea de imprimirlo como referencia en el caso de que tengas dudas.
INSTRUCCIONES
1. En una pagina en blanco escribe lo siguiente:
"POR FAVOR INCLUYA MI NOMBRE EN SU LISTA" ("PLASE ADD MY NAME TO YOUR
LIST"). Esto autom���ticamente genera un servicio y como tal, lo hace
COMPLETAMENTE
LEGAL.
A partir de ahora no estas mandandole UN DOLAR a alguna persona sin ning���n
motivo, estas pagando UN>
DOLAR por un legi���timo servicio.
Asegurate de incluir tu nombre y direcci���n. Te aseguro, de nuevo, que esto
es completamente legal!. Como un lindo detalle pon tambi���n en que posici���n
cada nombre figuraba cuando mandastes tu dolar: ("Estabas en la posici���n
3") o ("You were in slot 3") como para hacerlo mas completo!!!.De eso se
trata, de hacer dinero y pasarla bien al mismo tiempo.
2.Ahora dobla esta p���gina escrita alrededor del billete de UN DOLAR (no
mandes cheques ni otro tipo de pago, SOLO BILLETES DE UN DOLAR AMERICANO),
ponlo todo dentro de un sobre y mandalo a cada uno de las 6 personas
listadas. La idea de doblar el papel alrededor del billete es para
asegurar que va a llegar a destino y ESTO ES IMPORTANTE!!!. (De otra manera
la
gente que trabaja en el correo podr���a detectar que se trata de dinero y
quedarse
con los miles de sobre que van llegando!!!). para m���s seguridad, usa
tambi���n una hoja de papel carb���n para envolver el billete, de ese modo sera
mucho
mas dificil ver lo que va dentro.
3.Escucha con cuidado, esta es la forma de como vas a recibir dinero por
correo. Mira la lista de las seis personas, borra el primer nombre y
agrega el tuyo al final de ella, asi que el que era numero 2 pasa a ser
numero 1,
el que era 3 pasa a ser 2, el que era 4 pasa a ser 3, el que era 5 pasa a
ser 4 etc. y t��� eres ahora el numero seis. Incluye tu nombre, direcci���n,
c���digo postal y pa���s.
4. Ahora publica este articulo en por lo menos 200 "newsgroups" (existen
mas de 24,000 grupos). S���lo necesitas 200, pero cuanto m���s cantidad ponga,
m���s
dinero te llegar���!!!, si conoces BBS (Bulletin Board Systems) locales con
���reas de mensajes, etc., en donde se te ocurra (recuerda que es
LEGAL).Cuando publiques la descripci���n de este articulo, trata de darle un
nombre que "atrape", como: "NECESITA DINERO RAPIDO?, LEA ESTE ARTICULO",
"NECESITA DINERO PARA PAGAR SUS DEUDAS???", etc. Y cuanto m���s se publique
m���s posibilidades de recibir mas dinero vas a tener, adem���s les das la
oportunidad a otras personas que est���n interesadas de hacer dinero.
!!!HAGAMOS EL COMPROMISO DE SER HONESTOS Y CUMPLIR CON LO LEGAL,PONIENDO
UN 120 POR CIENTO DE NOSOTROS PARA QUE ESTE SISTEMA FUNCIONE !!!. Te
sorprender���s de
los beneficios, cr���eme!!!.
5. Si tienes problemas para publicarlo en tu BBS local simplemente
preg���ntale al SYSOP (Operador del Sistema) como publicar en ese NEWSGROUP,
lo mismo en el caso de publicarlo en el Internet. Si tratara de explicarlo
en este articulo seria para problemas, por hay demasiados programas
distintos y al detallar uno o dos de ellos, podr���a crearle problemas al
que tiene otro distinto. La descripci���n del articulo cuando se lo publique
deber���a decir algo as��� como:
"BAJE ESTE ARCHIVO Y LEA COMO PUEDE RECIBIR DINERO POR CORREO". No as���:
"GANE MILLONES DE DOLARES EN DOS DIAS POR CORREO" porque nadie te va a
responder ...
Aqu��� van a algunas indicaciones de c���mo introducirse en los "newsgroups":
COMO MANEJAR LOS "NEWSGROUPS"
No.1> Ud. no necesita redactar de nuevo toda esta carta para hacer la suya
propia. Solamente ponga su cursor al comienzo
de esta carta, haga click, lo deja presionado y b���jelo hasta el final de
la carta y l���rguelo. Toda la carta deber��� estar "sombreada". Entonces haga
click en "Edit"(Editar) arriba de su pantalla, aqu��� seleccione
"Copy"(Copiar). Esto har��� que toda la carta quede en la memoria de su
computador.
No.2> Abra una nueva p���gina en blanco y lleve el cursor al inicio.
Presione "Edit" y del men��� seleccione "Paste"(Pegar). Ahora tendr��� esta
carta en el
"notepad" y podr��� agregar su nombre y direcci���n en el lugar #6 siguiendo
las instrucciones de m���s arriba.
No.3> Grabe esta carta en su nuevo archivo del notepad como un .txt
file.(Archivo de Texto). Ycada vez que quiera cambiar algo lo podr��� hacer.
PARA LOS QUE MANEJAN NETSCAPE
No.4> Dentro del programa Netscape, vaya a "Communicator" y seleccione
"Grupo de noticias", luego vaya a "Archivo" y seleccionar "Suscribir". En
segundos una lista de todos los "Newsgroups" de su "server" aparecer���.
Haga click en cualquier newsgroup. De este newsgroup haga click debajo de
"TO
NEWS", el cual deberia estar arriba, en el extremo izquierdo de la p���gina
newsgroups. Esto le llevar��� a la caja de mensajes.
No.5> Llene este espacio. Este ser��� el t���tulo que ver���n todos cuando
recorran por la lista de un grupo en particular.
No.6> Marque el contenido completo del archivo y copie usando la misma
NEWS" y Ud. est��� creando y empastando esta carta dentro de su programa o
"posting".
No.7> Presione "send" que est��� en la parte superior izquierda. Y UD. HA
FINALIZADO CON SU PRIMERO!...FELICITACIONES!!! .
LOS QUE USAN INTERNET EXPLORER
PASO No. 4: Vaya al Newsgroups y seleccione "Post an Article". O en
Clasificados seleccione "poner un Anuncio". O en los
Foros de Discusion, etc.
PASO No. 5: Copie el art���culo del notepad y peguelo en el lugar del texto
que va a enviar o anunciar. Utilice la misma tecnica
anterior.
PASO No. 7: Presione el bot���n "Post", "Enviar" o "Poner", etc..
--------------------------------------------------------
ES TODO!. Todo lo que tiene que hacer es meterse en diferentes
"Newsgroups" y empastarlos, cuando ya tenga pr���ctica,
solo le tomar��� unos 30 segundos por cada newsgroup! **RECUERDE, CUANTOS
MAS NEWSGROUPS CONSIGA,
MAS RESPUESTAS (Y DINERO) RECIBIRA!! PERO DEBE DE ENTRAR EN POR LO MENOS
200** YA ESTA!!!.... Ud. estar��� recibiendo dinero de todo el mundo, de
lugares que
ni conoce y en unos pocos d���as!. Eventualmente
querr��� arrendar una casilla de correo por la cantidad de sobres que ir���
recibiendo.
**ASEGURESE DE QUE TODAS LAS DIRECCIONES ESTEN CORRECTAS**
Ahora el POR QUE de todo esto: De 200 enviados, digamos que recibo s���lo 5
respuestas (baj���simo ejemplo).Entonces hice US$ 5.00 con mi nombre en la
posici���n #6 de esta carta.
Ahora,cada uno de las 5 personas que ya me enviaron US$ 1.00 tambi���n hacen
un
m���nimo 200 newsgroups, cada uno con mi nombre en el #5 de la lista y s���lo
responden 5 personas a cada uno de los 5 originales, esto hace US$ 25.00 m���s
que yo
recibo, ahora estas 25 personas pone un m���nimo de
200 Newsgroups con mi nombre en el #4 y s���lo se recibe 5 respuesta de cada
uno. Estar���a haciendo otros US$ 125.00 adicionales. Ahora esta 125 personas
ponen sus m���nimo de 200 grupos con mi
nombre en el #3 y s���lo reciben 5 respuestas cada una, yo recibo un
adicional de US$ 625.00!. OK, aqu��� esta la parte m���s divertida, cada una de
estas
625 personas ponen sus cartas en otros 200 grupos con mi nombre en el #2 y
cada una recibe s���lo 5 respuestas, esto hace que yo reciba US$ 3,125.00!!!.
Estas 3,125 personas enviar���n este mensaje a un m���nimo de 200 Newsgroup nomb
re en
el #1 y si solo 5 personas reResponden de los 200 grupos, estar��� recibiendo
US$ 15,625.00!!. De una inversion original de US$6.00!! mas estampillas.
FABULOSO! Y como dije antes, que solo 5 personas respondan muy poca, el
promedio real seria 20 o 30 personas!. Asi que pongamos un n���mero m���s
grande
para calcular. Si solo 15 personas responden, esto hace:
En la #6---------US$ 15.00
En la #5---------US$ 225.00
En la #4---------US$ 3,375.00
En la #3---------US$ 50,625.00
En la #2---------US$ 759,375.00
En la #1---------US$ 11,390,625.00 s���, m���s de ONCE MILLONES DE D���LARES!!!.
Una vez que su nombre ya no est��� en la lista, saque el ultimo anuncio del
Newsgroup y envie otros US$ 6.00 a los nombres en
esa lista, poniendo su nombre en el #6 y repetir todo el proceso. Yempezar
a ponerlos en los Newsgroups otra vez. Lo que
debe recordar es que miles de personas mas, en todo el mundo, se conectanal
Internet cada d���a y leer���n estos art���culos todos
los d���as como USTED Y YO LO HACEMOS!!!. As��� que creo nadie tendria
problemas en invertir US$ 6 .00 y ver si realmente esto funciona. Algunas
personas
llegan a pensar..."y si nadie decide contestarme?" Que!! Cu���l es la
probabilidad de que esto pas��� cuando hay miles y miles de personas (como
nosotros) que buscan una manera de tener independencia financiera y pagar
sus deudas!!!., y est���n dispuestas a tratar, pues "No hay peor lucha de la
que no se hace". Se estima que existen de 20,000 a 50.000 nuevos usuarios
en Internet TODOS LOS DIAS!
*******OTRO SISTEMA PARA COMUNICARSE ES CONSIGUIENDO E-MAIL DE PERSONAS
PARTICULARES, DEBE SER POR LO MENOS 200 DIRECCIONES, PERO ESTO TIENE UNA
EFECTIVIDAD DE MINIMO 5% AL 15%.
SI SOLO BUSCAN PERSONAS QUE HABLAN EN ESPA���OL, VAYAN A UN PROVEEDOR DE
E-MAILS E IMPRIMAN UN APELLIDO LATINO Y YA!!!
Recuerde de hacerlo esto en forma CORRECTA , LIMPIA Y HONESTAMENTE y
funcionar��� con toda seguridad. Solamente tiene que ser honesto. Asegurese
de imprimir este art���culo AHORA, trate de mantener la lista de todos
los que les envian dinero y siempre f���jese en los Newsgroups y vea si
todos est���n participando limpiamente
Recuerde, HONESTIDAD ES EL MEJOR METODO..
No necesitas hacer trucos con la idea b���sica de hacer dinero en esto!
BENDICIONES PARA TODOS y suerte, juguemos limpio y aprovechar esta hermosa
oportunidad de hacer toneladas de dinero en Internet
.**Dicho sea de paso, si Ud. defrauda a las personas poniendo mensajes con
su nombre y no envia ning���n dinero a los dem���s
en esa lista, Ud. recibir��� casi NADA!.
"LOS FRUTOS DE LA HONESTIDAD SE RECOGEN EN MUY POCO TIEMPO Y DURAN PARA
SIEMPRE" PROVERVIO CHINO.
He conversado con personas que conocieron personas que hicieron eso y
llegaron a recibir US$ 15.00 en unas 7 semanas!!!
Algunos decidieron probar otra vez, haciendolo correctamente, y en 4 a 5
semanas recibieron m���s de $10.000. Esto es la mas
limpia y honesta manera de compartir fortuna que yo jam���s haya visto, sin
costarnos mucho excepto un poco de tiempo. El
TIEMPO ES IMPORTANTE!, no dejar pasar mas de 7 d���as del momento que vea
este art���culo!. Tambi���n puede conseguir
lista de E-MAIL para extra d���lares. Sigamos todos las reglas del negocio!
Recuerde mencionar esta ganancias extras en sus
declaraciones de impuestos.
6. Y este es el paso que mas me gusta. SIMPLEMENTE SI���NTATE Y DISFRUTA,
PORQUE EL EFECTIVO VIENE EN CAMINO!!!. Espera ver un poquito de dinero
durante la segunda semana, pero a partir de la tercera semana TORMENTA DE
SOBRES EN TU CORREO. Todo lo que tienes que hacer es recibirlo y trata de
no gritar muy fuerte cuando te des cuenta de que esta vez lo lograstes !!
7. Es tiempo de pagar lo que deb���as y comprar algo especial para t��� o para
esa persona especial en tu vida, un regalo que nunca olvidaras.Disfruta de
la vida !!!
8. Cuando te empieces a quedar corto de dinero, reactiva este archivo y
re-publicalo en los mismos lugares en que lo vas a hacer ahora y nuevos
lugares que conocer���s en el futuro. Siempre mantiene a mano una copia de
este art���culo, react���valo cada vez que necesites dinero. ES UNA
HERRAMIENTA INCREIBLE QUE PUEDES VOLVER A USAR CUANTAS VECES NECESITES
DINERO EN
EFECTIVO.

HONESTIDAD ES LO QUE HACE TRIUNFAR A ESTE PROGRAMA ...NO LO OLVIDES

!!!BUENA SUERTE!!!

From bouncefilter Wed Feb 9 16:31:34 2000
Received: from hotmail.com (f276.law7.hotmail.com [216.33.236.154])
by hub.org (8.9.3/8.9.3) with SMTP id QAA36381
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 16:31:21 -0500 (EST)
(envelope-from i_o_wd@hotmail.com)
Received: (qmail 71314 invoked by uid 0); 9 Feb 2000 21:30:49 -0000
Message-ID: <20000209213049.71313.qmail@hotmail.com>
Received: from 207.138.177.254 by www.hotmail.com with HTTP;
Wed, 09 Feb 2000 13:30:49 PST
X-Originating-IP: [207.138.177.254]
From: "Michael Poon" <i_o_wd@hotmail.com>
To: pgsql-general@postgresql.org
Subject: How can we do STORED PRECEDURE in PostgreSQL?
Date: Wed, 09 Feb 2000 13:30:49 PST
Mime-Version: 1.0
Content-Type: text/plain; format=flowed

How can we do STORED PRECEDURE in PostgreSQL?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

From bouncefilter Wed Feb 9 10:18:29 2000
Received: from ibm.cicnet.ro (IDENT:root@braila.cicnet.ro [193.231.113.254])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA06238
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 10:17:13 -0500 (EST)
(envelope-from liviu@cicnet.ro)
Received: from cicnet.ro (liviu@dtk.cicnet.ro [193.231.113.55])
by ibm.cicnet.ro (8.8.7/8.8.7) with ESMTP
id UAA32281 for <pgsql-general@postgreSQL.org>;
Wed, 9 Feb 2000 20:21:05 +0200
Sender: liviu@cicnet.ro
Message-ID: <38A186E5.75998B48@cicnet.ro>
Date: Wed, 09 Feb 2000 17:25:25 +0200
From: LIVIU ILIE <liviu@cicnet.ro>
Organization: DATA SYSTEMS
X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.5-15 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-general@postgreSQL.org
Subject: (no subject)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

unsubscribe pgsql-general

From bouncefilter Wed Feb 9 10:45:30 2000
Received: from mail.ratio.de (root@[212.12.42.85])
by hub.org (8.9.3/8.9.3) with ESMTP id KAA12859
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 10:44:25 -0500 (EST)
(envelope-from teg@ratio.de)
Received: from joe.ratio.intern (root@joe.ratio.de [192.168.76.253])
by mail.ratio.de (8.9.3/8.9.3) with ESMTP id QAA07322
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 16:52:05 +0100
Received: from Thomy (teg@thomy [192.168.76.152])
by joe.ratio.intern (8.8.8/8.8.8) with SMTP id QAA01970
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 16:41:07 +0100
From: Thomas Egge <teg@ratio.de>
Organization: Ratio Entwicklungen GmbH
To: pgsql-general@postgreSQL.org
Subject: Read values from Trigger out
Date: Wed, 9 Feb 2000 16:36:56 +0100
X-Mailer: KMail [version 1.0.17]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <00020916434500.16346@Thomy>
Content-Transfer-Encoding: 8bit

I have created a trigger function.

could somebody tell me how I get the values from the insert in the trigger
function.
I tried the function

SPI_getvalue(trigger,tupdesc,attnum)

but after starting the trigger, I become this terminating output:

pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
We have lost the connection to the backend, so further processing is impossible. Terminating.

thank's for your help
--
Thomas Egge

From bouncefilter Wed Feb 9 12:29:33 2000
Received: from csgrad.cs.vt.edu (csgrad.cs.vt.edu [128.173.41.41])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA44590
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 12:28:46 -0500 (EST)
(envelope-from nphadke@csgrad.cs.vt.edu)
Received: from localhost (nphadke@localhost)
by csgrad.cs.vt.edu (8.9.3/8.9.1) with ESMTP id MAA30624;
Wed, 9 Feb 2000 12:28:38 -0500 (EST)
Date: Wed, 9 Feb 2000 12:28:38 -0500 (EST)
From: "Nilesh A. Phadke" <nphadke@csgrad.cs.vt.edu>
To: Thomas Egge <teg@ratio.de>
cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Read values from Trigger out
In-Reply-To: <00020916434500.16346@Thomy>
Message-ID: <Pine.OSF.4.21.0002091225270.22846-100000@csgrad.cs.vt.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello Thomas,
I have used the same thing and it does work for me.... I was also getting
similar problems initially....

What does your trigger do? does it insert a tuple back into the table? if
yes then that is your problem ... coz the insert will fire another trigger
and this may continue endlessly....

Nilesh.

On Wed, 9 Feb 2000, Thomas Egge wrote:

I have created a trigger function.

could somebody tell me how I get the values from the insert in the trigger
function.
I tried the function

SPI_getvalue(trigger,tupdesc,attnum)

but after starting the trigger, I become this terminating output:

pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
We have lost the connection to the backend, so further processing is impossible. Terminating.

thank's for your help
--
Thomas Egge

************

-------------------------------------------------------------------
Your intellect is the best gift given to you by god |
How you use it decides your gift back to him........ |
-------------------------------------------------------------------
Nilesh Phadke | e-mail: nilesh@collegemail.com |
Graduate Research Asstt. | Phone : (540) 951 8399 |
Department of Computer Science | Addr : 1011 University City Blvd |
Virginia Tech. | Apt I-7 |
| Blacksburg, VA 24060 |
-------------------------------------------------------------------

From bouncefilter Wed Feb 9 13:00:31 2000
Received: from news.tht.net (news.hub.org [216.126.91.242])
by hub.org (8.9.3/8.9.3) with ESMTP id MAA52902
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 12:59:57 -0500 (EST)
(envelope-from news@news.tht.net)
Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id MAA25543
for pgsql-general@postgresql.org; Wed, 9 Feb 2000 12:49:26 -0500 (EST)
(envelope-from news)
X-Authentication-Warning: news.tht.net: news set sender to <news> using -f
From: "Sam Juvonen" <sjuvonen@bignet.net>
X-Newsgroups: comp.databases.postgresql.questions
Subject: Help needed with DBI and DBD::Pg
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <DMho4.34557$ox5.8449923@tw11.nn.bcandid.com>
X-Trace: tw11.nn.bcandid.com 950118563 207.74.178.128 (Wed,
09 Feb 2000 10:49:23 MST)
Organization: bCandid - Powering the world's discussions - http://bCandid.com
Date: Wed, 09 Feb 2000 17:49:23 GMT
To: pgsql-questions@postgresql.org

Hello there,

I am a new Linux user, Red Hat 6.1 trying to get up and running with
Postgresql
from the default Linux install. I'm trying to get the DBI interface so I
can access
this database with Perl.

I've successfully installed the DBI module via make, make test, make
install. Also, psql runs fine; I've created and populated a table or two.

I have a rather basic question when it comes to installing the DBD::Pg
module. The 'perl Makefile.PL' procedure requires that I set environment
variables for POSTGRES_LIB and POSTGRES_INCLUDE. I can't get this
accomplished correctly, so I can't complete the makefile.

Since Postgresql installed automatically, the directory isn't what the
documentation references, namely /usr/local/pgsql. I'm finding things are
in /var/lib/pgsql, /usr/lib/pgsql and /usr/include/pgsql. I don't know if
these directories contain what is necessary for the DBD::Pg makefile...

So, since I'm using bash, logged in as the 'postgres' user. I've tried
setting the environment variables like this:
POSTGRES_INCLUDE=/usr/include/pgsql
export POSTGRES_INCLUDE
POSTGRES_LIB=/usr/lib/pgsql
export POSTGRES_INCLUDE

Running 'perl Makefile.PL' simply tells me to set the environment variables,
so these values aren't being seen.

Can someone tell me how I can complete this installation of DBD::Pg?

Thanks in advance,

Sam Juvonen
sjuvonen@bignet.net

From bouncefilter Wed Feb 9 15:55:34 2000
Received: from ns1.w3workshop.com ([206.138.81.160])
by hub.org (8.9.3/8.9.3) with ESMTP id PAA13968
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 15:55:03 -0500 (EST)
(envelope-from mstrait@w3workshop.com)
Received: from iai-11 ([207.196.79.75])
by ns1.w3workshop.com (8.9.3/8.9.3) with ESMTP id OAA03991
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 14:54:59 -0600
Message-Id: <4.2.0.58.20000209155350.00a76dd0@mail.w3workshop.com>
X-Sender: mstrait@mail.w3workshop.com
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Wed, 09 Feb 2000 15:54:22 -0500
To: pgsql-general@postgreSQL.org
From: Michael <mstrait@w3workshop.com>
Subject: "document contains no data"
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed

I have just installed PHP on my new Cobalt RaQ3i, which came with
PostgreSQL already installed. Both PHP and PostgreSQL work
independently. I have created several sample databases using psql. My
test PHP scripts embedded in html work. But when I try to use PHP to
access a PostgreSQL all I get is the "document contains no data"
message. The PHP script I was trying to use is the one from the online
tutorial at http://cs.sau.edu/~cfisher/uw/018.html#06. I first created the
grocery database just as described in the tutorial, so I'm certain the
database is there and accessible through psql. The script looks like this:

View Database Records
item vendorname quantity
<?PHP $conn = pg_Connect("", "", "", "", "grocery"); if (!$conn) { echo "An
error occurred.\n"; exit; } $result = pg_Exec($conn, "SELECT list.item,
vendors.vendorname, list.quantity FROM list, vendors WHERE list.vendorcode
= vendors.vendorcode ORDER BY list.item;"); if (!$result) { echo "An error
occurred.\n"; exit; } $num = pg_NumRows($result); $i = 0; while ($i < $num)
{ echo "
"; echo pg_Result($result, $i, "item"); echo ""; echo pg_Result($result,
$i, "vendorname"); echo ""; echo pg_Result($result, $i, "quantity"); echo "
"; $i++; } pg_FreeResult($result); pg_Close($conn); ?>

My PostgreSQL was installed to require user authorization, so I've tried
modifying the pg_connect line in the tutorial script like so:
$conn = pg_Connect("dbname=grocery user=mstrait password=michael");
but it didn't make a difference.

I need some help on where else to look for the problem. If it matters, I'm
using PHP Version 3.0.14, PostgreSQL 6.5, and the web server is Apache
1.3.6. The platform is a Cobalt RaQ3i running Linux 2.2.

Thanks.
Michael Strait
mstrait@w3workshop.com

From bouncefilter Wed Feb 9 16:28:34 2000
Received: from hotmail.com (f255.law4.hotmail.com [216.33.148.133])
by hub.org (8.9.3/8.9.3) with SMTP id QAA35240
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 16:28:11 -0500 (EST)
(envelope-from what_s_michael@hotmail.com)
Received: (qmail 43689 invoked by uid 0); 9 Feb 2000 21:27:36 -0000
Message-ID: <20000209212736.43688.qmail@hotmail.com>
Received: from 207.138.177.254 by www.hotmail.com with HTTP;
Wed, 09 Feb 2000 13:27:36 PST
X-Originating-IP: [207.138.177.254]
From: "MICHAEL POON" <what_s_michael@hotmail.com>
To: pgsql-general@postgresql.org
Subject: how can we do STORED PROCEDURE in PostgreSQL?
Date: Wed, 09 Feb 2000 21:27:36 GMT
Mime-Version: 1.0
Content-Type: text/plain; format=flowed

how can we do STORED PROCEDURE in PostgreSQL?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

From bouncefilter Wed Feb 9 16:55:34 2000
Received: from aulne.infini.fr (aulne.infini.fr [212.208.100.11])
by hub.org (8.9.3/8.9.3) with ESMTP id QAA43200
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 16:55:19 -0500 (EST)
(envelope-from christophe.touze@infini.fr)
Received: from chris (ppptc02.infini.fr [212.208.100.62])
by aulne.infini.fr (8.9.1/8.9.1/R&D&B-990119) with SMTP id WAA16746
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 22:54:46 +0100
Message-ID: <01aa01bf7349$038025c0$0201a8c0@chris>
From: "=?iso-8859-1?Q?Christophe_Touz=E9?=" <christophe.touze@infini.fr>
To: <pgsql-general@postgresql.org>
Subject: [Smalltalk]
Date: Wed, 9 Feb 2000 22:59:59 +0100
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_01A7_01BF7351.64072BC0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.2106.4
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4

Message en plusieurs parties et au format MIME.

------=_NextPart_000_01A7_01BF7351.64072BC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I am looking for a tool which allows to use Postgres from a Smalltalk =
environment.
Has everyone heard of it ?

Thank you for your answers.
Regards,
------------------------------------
Christophe Touz=E9
email : christophe.touze@infini.fr
------------------------------------

------=_NextPart_000_01A7_01BF7351.64072BC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.2106.6"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hello,</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I am looking for a tool which allows to use Postgres =
from a=20
Smalltalk environment.</FONT></DIV>
<DIV><FONT size=3D2>Has everyone heard of it ?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thank you for your answers.</FONT></DIV>
<DIV><FONT size=3D2>Regards,</FONT></DIV>
<DIV><FONT color=3D#000000=20
size=3D2>------------------------------------<BR>Christophe =
Touz&eacute;<BR>email=20
: <A=20
href=3D"mailto:christophe.touze@infini.fr">christophe.touze@infini.fr</A>=
<BR>------------------------------------</FONT></DIV></BODY></HTML>

------=_NextPart_000_01A7_01BF7351.64072BC0--

From bouncefilter Wed Feb 9 17:04:34 2000
Received: from Mail.austin.rr.com (sm2.texas.rr.com [24.93.35.55])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA46067
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 17:04:02 -0500 (EST)
(envelope-from eloehr@austin.rr.com)
Received: from austin.rr.com ([24.93.36.157]) by Mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 9 Feb 2000 15:54:05 -0600
Sender: ed
Message-ID: <38A1E4D0.22CE2657@austin.rr.com>
Date: Wed, 09 Feb 2000 16:06:08 -0600
From: Ed Loehr <eloehr@austin.rr.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Michael Poon <i_o_wd@hotmail.com>
CC: pgsql-general@postgresql.org
Subject: Re: [GENERAL] How can we do STORED PRECEDURE in PostgreSQL?
References: <20000209213049.71313.qmail@hotmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Michael Poon wrote:

How can we do STORED PRECEDURE in PostgreSQL?

Several options exist (C, SQL, PL/pgSQL...). For starters, see CREATE
FUNCTION at

http://www.postgresql.org/docs/postgres/index.html

Cheers,
Ed Loehr

From bouncefilter Wed Feb 9 17:21:34 2000
Received: from twakcax1.twa.com (twakcax1.twa.com [207.238.241.218])
by hub.org (8.9.3/8.9.3) with ESMTP id RAA52693
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 17:20:54 -0500 (EST)
(envelope-from KJJACKS@twa.com)
Received: by twakcax1.twa.com with Internet Mail Service (5.5.2448.0)
id <1H74D2V1>; Wed, 9 Feb 2000 16:20:49 -0600
Message-ID: <9D546E233EDED21180EC0090273C5BAD01D6586F@twakcax2.twa.com>
From: "Jackson, Kevin J." <KJJACKS@twa.com>
To: pgsql-general@postgreSQL.org
Subject: FW: [GENERAL] "document contains no data"
Date: Wed, 9 Feb 2000 16:17:02 -0600
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain;
charset="iso-8859-1"

Michael,

I'm new to both PHP and PostgreSQL, and I had the same problem.

I fixed it by doing 2 things:

1) Requiring the database to be accessed by a username/passwd combination.
2) Connecting to the database with the username/passwd combination.

Here is my code:

<?php
require ('project.inc.php3');

$db=pg_connect("host=$hostdb port=$dbport user=$pguser password=$pgpasswd
dbname=$dbname");

$query = "INSERT INTO project_request (submit_date, contact, department,
telephone, email, project_name, completion, project_descrip, project_goal)
VALUES
('$submit_date','$contact','$department','$telephone','$email','$project_nam
e','$completion','$project_descrip','$project_goal')";

$doit=pg_exec($db,$query);

pg_close($db);
?>

(I put the hostname, username, passwd and database name into the
'project.inc.php3' include file and adjusted the permissions, so no one can
see the actual values for those.)

Hope this helps!

kjj

-----Original Message-----
From: Michael [mailto:mstrait@w3workshop.com]
Sent: Wednesday, February 09, 2000 2:54 PM
To: pgsql-general@postgreSQL.org
Subject: [GENERAL] "document contains no data"

I have just installed PHP on my new Cobalt RaQ3i, which came with
PostgreSQL already installed. Both PHP and PostgreSQL work
independently. I have created several sample databases using psql. My
test PHP scripts embedded in html work. But when I try to use PHP to
access a PostgreSQL all I get is the "document contains no data"
message. The PHP script I was trying to use is the one from the online
tutorial at http://cs.sau.edu/~cfisher/uw/018.html#06. I first created the
grocery database just as described in the tutorial, so I'm certain the
database is there and accessible through psql. The script looks like this:

View Database Records
item vendorname quantity
<?PHP $conn = pg_Connect("", "", "", "", "grocery"); if (!$conn) { echo "An
error occurred.\n"; exit; } $result = pg_Exec($conn, "SELECT list.item,
vendors.vendorname, list.quantity FROM list, vendors WHERE list.vendorcode
= vendors.vendorcode ORDER BY list.item;"); if (!$result) { echo "An error
occurred.\n"; exit; } $num = pg_NumRows($result); $i = 0; while ($i < $num)
{ echo "
"; echo pg_Result($result, $i, "item"); echo ""; echo pg_Result($result,
$i, "vendorname"); echo ""; echo pg_Result($result, $i, "quantity"); echo "
"; $i++; } pg_FreeResult($result); pg_Close($conn); ?>

My PostgreSQL was installed to require user authorization, so I've tried
modifying the pg_connect line in the tutorial script like so:
$conn = pg_Connect("dbname=grocery user=mstrait password=michael");
but it didn't make a difference.

I need some help on where else to look for the problem. If it matters, I'm
using PHP Version 3.0.14, PostgreSQL 6.5, and the web server is Apache
1.3.6. The platform is a Cobalt RaQ3i running Linux 2.2.

Thanks.
Michael Strait
mstrait@w3workshop.com

************

From bouncefilter Wed Feb 9 20:08:36 2000
Received: from web3002.mail.yahoo.com (web3002.mail.yahoo.com
[204.71.202.165])
by hub.org (8.9.3/8.9.3) with SMTP id UAA35509
for <pgsql-general@postgresql.org>; Wed, 9 Feb 2000 20:08:07 -0500 (EST)
(envelope-from jeff95350@yahoo.com)
Received: (qmail 11584 invoked by uid 60001); 10 Feb 2000 01:06:58 -0000
Message-ID: <20000210010658.11583.qmail@web3002.mail.yahoo.com>
Received: from [206.171.172.216] by web3002.mail.yahoo.com;
Wed, 09 Feb 2000 17:06:58 PST
Date: Wed, 9 Feb 2000 17:06:58 -0800 (PST)
From: Jeff Davis <jeff95350@yahoo.com>
Subject: Re: [GENERAL] formatting dates?
To: pgsql-general@postgresql.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

I don't know about the date formatting (although I
know that can always be done easily on the application
end, which is usually more convenient), but about the
regex:

They should work pretty much like perl (there may be a
few differences) except that you aren't retrieving
matches in PG or replacing, it is just a boolean test
to see if a pattern is found.

here is some brief documentation on perl regexes, to
get you started at least:
http://www.perl.com/pub/doc/manual/html/pod/perlre.html#Regular_Expressions

Hope it helps. You might also try documentation for
other programming languages that use regexes (PHP, Sed
& Awk, etc).

-Jeff Davis

--- Frank R Callaghan <f.callaghan@ieee.org> wrote:

Excuse my ignorance but is there anyway to
format a returned date aka 'mm/dd/yy' in a query
like
sybase dateformat(date, 'mm/dd/yy');
also is the a good document explaining the use
of regex in postgresql.

TIA,
Frank.

************

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

From bouncefilter Wed Feb 9 23:17:38 2000
Received: from mta1-rme.xtra.co.nz (mta1-rme.xtra.co.nz [203.96.92.1])
by hub.org (8.9.3/8.9.3) with ESMTP id XAA68300
for <pgsql-general@postgreSQL.org>; Wed, 9 Feb 2000 23:17:27 -0500 (EST)
(envelope-from john@mwk.co.nz)
Received: from castleanthrax ([210.55.118.196]) by mta1-rme.xtra.co.nz
(InterMail v4.01.01.00 201-229-111) with SMTP
id <20000210042520.UXNP6460852.mta1-rme@castleanthrax>;
Thu, 10 Feb 2000 17:25:20 +1300
Message-ID: <004001bf737d$a93e4580$ca5fa8c0@hisdad.org.nz>
From: "john huttley" <john@mwk.co.nz>
To: "Ed Loehr" <eloehr@austin.rr.com>
Cc: "PostgreSQL-general" <pgsql-general@postgreSQL.org>
References: <20000209213049.71313.qmail@hotmail.com>
<38A1E4D0.22CE2657@austin.rr.com>
Subject: Re: [GENERAL] How can we do STORED PRECEDURE in PostgreSQL?
Date: Thu, 10 Feb 2000 17:16:52 +1300
Organization: MWK Computers
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211

Ed, There is big difference between PG's functions and Stored Procedures,
as they are commonly used.

PG's functions return a single value, Stored Procedures return a record set.

This will require some substantial changes to things like pg_tables, to
support what are effectively
'virtual tables'. And the trick is to be able to pass parameters to them
and to use them as if they were 'real'.

Enough people have asked about this that it may appear in a later version,
almost certainly not in V7 (afaik)

Regards

can we do STORED PRECEDURE in PostgreSQL?

Michael Poon wrote:

How can we do STORED PRECEDURE in PostgreSQL?

Several options exist (C, SQL, PL/pgSQL...). For starters, see CREATE
FUNCTION at

http://www.postgresql.org/docs/postgres/index.html

From bouncefilter Thu Feb 10 00:37:39 2000
Received: from mail.austin.rr.com (sm1.texas.rr.com [24.93.35.54])
by hub.org (8.9.3/8.9.3) with ESMTP id AAA82610
for <pgsql-general@postgresql.org>;
Thu, 10 Feb 2000 00:36:48 -0500 (EST)
(envelope-from eloehr@austin.rr.com)
Received: from austin.rr.com ([24.93.36.157]) by mail.austin.rr.com with
Microsoft SMTPSVC(5.5.1877.197.19); Wed, 9 Feb 2000 23:37:18 -0600
Sender: ed
Message-ID: <38A24EE5.621C9A44@austin.rr.com>
Date: Wed, 09 Feb 2000 23:38:45 -0600
From: Ed Loehr <eloehr@austin.rr.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.12-20smp i686)
X-Accept-Language: en
MIME-Version: 1.0
To: john huttley <john@mwk.co.nz>
CC: PostgreSQL-general <pgsql-general@postgresql.org>
Subject: Re: [GENERAL] How can we do STORED PRECEDURE in PostgreSQL?
References: <20000209213049.71313.qmail@hotmail.com>
<38A1E4D0.22CE2657@austin.rr.com>
<004001bf737d$a93e4580$ca5fa8c0@hisdad.org.nz>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

john huttley wrote:

Ed, There is big difference between PG's functions and Stored Procedures,
as they are commonly used.

PG's functions return a single value, Stored Procedures return a record set.

I stand corrected. A *little* knowledge is a dangerous thing.

Cheers,
Ed Loehr

From bouncefilter Thu Feb 10 01:40:40 2000
Received: from goliath.camtech.net.au (goliath.camtech.net.au [203.5.73.2])
by hub.org (8.9.3/8.9.3) with SMTP id BAA92451
for <pgsql-general@hub.org>; Thu, 10 Feb 2000 01:39:47 -0500 (EST)
(envelope-from geoff@austrics.com.au)
Received: from postie.austrics.com.au ([203.28.4.186]) by
goliath.camtech.net.au ; Thu, 10 Feb 2000 17:09:38 +1030
Received: from blaze (blaze [143.216.69.2]) by postie.austrics.com.au
(8.8.5/8.8.2) with ESMTP id RAA04318 for
<pgsql-general@hub.org>; Thu, 10 Feb 2000 17:10:26 +1030 (CST)
Date: Thu, 10 Feb 2000 17:13:35 +1030 (CST)
From: Geoff Russell <geoff@austrics.com.au>
X-Sender: geoff@blaze
To: PostgreSQL List <pgsql-general@hub.org>
Subject: Copy Error Msgs
Message-ID: <Pine.GSO.4.05.10002101656100.25475-100000@blaze>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi,

I'm converting a data set from a btree file to a PostgreSQL file by
converting to text in COPY format and then using COPY.

My problem is that there is some bad data in the file. Not really bad, but
bad enough for the copy to fail.

e.g., trying to load a blank into a field I've declared as bool is
enough to cause the copy to fail - and nicely undo itself, so at the
end of loading 100000 records I find I have an empty data base.

I don't really object to the copy failing, but it does so silently. If
I try with a small file containing the offending record (the finding of
which was not easy!) then I get a brief (but adequate) error message,
but the message disappears when I embed the bad record in with 10000
or more other records.

I've got a file called XXX:

COPY "table" FROM stdin;
... data
... ~100000 records (I've been testing with 5000)
...
\.

and I say "psql -e dbname < XXX"

If someone can suggest a more friendly way of doing this, I'd be grateful.

Cheers,
Geoff Russell

P.S. Yes, I will clean up the data, but I always thought a blank was a
pretty good false value (yes, I do use perl!).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6 Fifth Ave +618-8332-5069 (Home) |
St Morris SA 5068 +618-8207-2029 (Work) | geoff@austrics.com.au
Adelaide, AUSTRALIA +618-8364-1543 (Fax-Home) |

From bouncefilter Thu Feb 10 04:33:42 2000
Received: from smtp-2.nordnet.fr (smtp-2.nordnet.fr [194.206.126.252])
by hub.org (8.9.3/8.9.3) with ESMTP id EAA25787
for <pgsql-general@hub.org>; Thu, 10 Feb 2000 04:33:23 -0500 (EST)
(envelope-from aflorent@iris-tech.fr)
Received: from scomm.iris-tech.fr (port9.adsl1.nordnet.fr [195.146.233.9])
by smtp-2.nordnet.fr (8.9.3/8.9.0) with ESMTP id KAA16938
for <pgsql-general@hub.org>; Thu, 10 Feb 2000 10:33:13 +0100
Received: from (mail@localhost)
by scomm.iris-tech.fr (8.9.3/jtpda-5.3) id KAA11432
for <pgsql-general@hub.org>; Thu, 10 Feb 2000 10:34:40 +0100
X-Authentication-Warning: scomm.iris-tech.fr: mail set sender to
<aflorent@iris-tech.fr> using -f
Received: from siris.iris-tech.fr(192.168.0.100) by scomm.iris-tech.fr via
smap (V2.1) id xma011429; Thu, 10 Feb 00 10:34:28 +0100
Received: from iris-tech.fr (aflorent@afl.iris-tech.fr [192.168.0.5])
by siris.iris-tech.fr (8.9.3/jtpda-5.3) with ESMTP id KAA05811
for <pgsql-general@hub.org>; Thu, 10 Feb 2000 10:31:17 +0100
Message-ID: <38A28565.B72BF288@iris-tech.fr>
Date: Thu, 10 Feb 2000 10:31:18 +0100
From: Arnaud FLORENT <aflorent@iris-tech.fr>
X-Mailer: Mozilla 4.7 [fr] (Win95; I)
X-Accept-Language: fr,en
MIME-Version: 1.0
To: PostgreSQL general ML <pgsql-general@hub.org>
Subject: view columm size.....
X-Priority: 1 (Highest)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

hi,

i 've create a view
one of the column is the result of col1 || col2.....
col1 is 8 char long
col 2 is 4 char long

but my column view is 254 char long........

so i can't UPDATE a 12 char length col using this view a table because
"Length is not equal to length of the target column"

what should i do to force the length of the view column to 12 char?

thanks

--
______________________________
Arnaud FLORENT
IRIS Technologies

phone: (33) 03 20 65 85 80
fax: (33) 03 20 65 85 81
GSM: (33) 06 15 14 32 90

mailto:aflorent@iris-tech.fr
______________________________