Hello Alex,
DBLink is located in the PostgreSQL source under $POSTGRES_SOURCE/contrib/dblink
Just do a make and make install (assuming you installed PostgreSQL
from source). The docs are also located in the same directory. You
have to execute dblink.sql against your database to implement the
func
Looks like a great idea, but alas I cannot actualy find any files..
CVS is empy, FTP is unaccesible, home page goes nowhere, no messages
in forums.. Some more clues to the enigmatic whereabouts of this
project would be appreciated if you have them. Google even suggests I
try dblink postgresql inst
Check out dbi-link ... not sure how far into what you are looking for it
is, but from David's description to me today, it sounds like it makes
things transparent to the end user (ie. the 'links' look like extra
schema's within your database) ... haven't played with it yet, just going
by David's
I am trying to find out some information on how to set up a cross
database links so that I can have queries and foreign keys that cross
a physical database. This is not just a technical requirement, but a
legal one (The client requires that we do not co-mingle data). I have
a new database that ha
On Wed, Jan 05, 2005 at 05:35:18PM -0500, Terry Lee Tucker wrote:
> On Wednesday 05 January 2005 05:09 pm, Alex Turner saith:
> >
> > Maybe what you want is a stored procedure, not a trigger.
>
> Now why didn't I think of that? That's exactly what I need to do.
This is a good example of why it's b
On Wed, 2005-01-05 at 12:34 -0800, Jeff Davis wrote:
> Benefits of multiple instances:
> (1) Let's say you're using the one-instance method and one of your web
> users is a less-than-talented developer, and makes an infinite loop that
> fills the database with garbage. Not only will that hurt perfo
Ragnar Hafstað wrote:
On Wed, 2005-01-05 at 13:03 -0800, Jeff Davis wrote:
On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote:
On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote:
[snip]
PostgreSQL
doesn't have materialized views per se but it does have function
On Wednesday 05 January 2005 2:51 pm, [EMAIL PROTECTED]
wrote:
> Thanks, Ragnar,
>
> You are right in what is happening. The code was supposed to be
> sending '' but it is sending NULL instead. I see now -- in
> PostgreSQL to look for any record without the 'X' I have to use a
> combined condition
Thanks, Ragnar,
You are right in what is happening. The code was supposed to be sending ''
but it is sending NULL instead. I see now -- in PostgreSQL to look for any
record without the 'X' I have to use a combined condition because a NULL is
not included in a != statement.
select count(*) from re
On Wed, 2005-01-05 at 22:32 +, Ragnar Hafstað wrote:
> select count(*) from resource where reengine is NULL 'X';
typo. I meant of course:
select count(*) from resource where reengine is NULL;
gnari
---(end of broadcast)---
TIP 5: Have you
[EMAIL PROTECTED] writes:
> I have a small table in which I have a Character(1) field called reengine.
> The field either has an "X" or is empty. This field does not have NULL
> values. There are 27 records in the table, 25 are marked with an 'X' in
> reengine.
> When I write
> select count(*) fro
Now why didn't I think of that? That's exactly what I need to do. Thanks to
all who responded ;o)
On Wednesday 05 January 2005 05:09 pm, Alex Turner saith:
> Maybe what you want is a stored procedure, not a trigger. A trigger
> will only have the data that is available from the insert operation,
On Wed, 2005-01-05 at 13:03 -0800, Jeff Davis wrote:
> On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote:
> > On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote:
>
> [snip]
>
> > PostgreSQL
> > doesn't have materialized views per se but it does have functionality
> > that can i
On Wed, 2005-01-05 at 13:51 -0800, [EMAIL PROTECTED] wrote:
> I have a small table in which I have a Character(1) field called reengine.
> The field either has an "X" or is empty. This field does not have NULL
> values. There are 27 records in the table, 25 are marked with an 'X' in
> reengine.
>
Try:
select count(*) from resource where reengine <> 'X';
Alex Turner
NetEconomist
On Wed, 5 Jan 2005 13:51:58 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I have a small table in which I have a Character(1) field called reengine.
> The field either has an "X" or is empty. This field
Terry Lee Tucker wrote:
1) INSERT INTO logs (carr_code, ..., ..., ...) VALUES('ABCDEFG', ..., ...);
logs is table A in my question
2) logs_insert fires (This is a AFTER INSERT trigger)
3) in this trigger, I need to do the following:
update avlds set carr_code = new.carr_code where avlds
Maybe what you want is a stored procedure, not a trigger. A trigger
will only have the data that is available from the insert operation,
and the rest of the row that was modified (It really can't have
anything else if you think about it)
Stored procedures are an exellent way to guarantee atomic a
I have a small table in which I have a Character(1) field called reengine.
The field either has an "X" or is empty. This field does not have NULL
values. There are 27 records in the table, 25 are marked with an 'X' in
reengine.
I am querying the table from pgadmin v1.1.0 for windows.
When I write
1) INSERT INTO logs (carr_code, ..., ..., ...) VALUES('ABCDEFG', ..., ...);
logs is table A in my question
2) logs_insert fires (This is a AFTER INSERT trigger)
3) in this trigger, I need to do the following:
update avlds set carr_code = new.carr_code where avlds.recid = ??;
Jeff Davis wrote:
On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote:
On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote:
[snip]
PostgreSQL
doesn't have materialized views per se but it does have functionality
that can implement them.
Can you tell me what you mean by that?
You
On Wed, Jan 05, 2005 at 03:25:08PM -0500, Terry Lee Tucker wrote:
> When I assign a value to a certain column in a table A, I want to be able to
> assign a value in table A to table B and then to assign a value in table B to
> table C.
What do you mean by "assign a value to a certain column"?
how about to have only one DB with multiple DB shcemas and assign a
DB user per schema?
Will this solution use the multiple CPUs ? - I think it should
this is my 2cents.
--- Jeff Davis <[EMAIL PROTECTED]> wrote:
> Benefits of multiple instances:
> (1) Let's say you're using the one-instance
On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote:
> On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote:
[snip]
> PostgreSQL
> doesn't have materialized views per se but it does have functionality
> that can implement them.
>
Can you tell me what you mean by that?
Regards,
On Wed, 2005-01-05 at 13:52 -0500, Jeff wrote:
[snip]
> You'd have to have separate shared buffers for each which would eat
> away from the filesystem cache. Not to mention overhead of having
> many more PG's running (in terms of just processes htat need to be
> managed and memory used by each
Benefits of multiple instances:
(1) Let's say you're using the one-instance method and one of your web
users is a less-than-talented developer, and makes an infinite loop that
fills the database with garbage. Not only will that hurt performance,
but if it fills the disk than no other users can even
When I assign a value to a certain column in a table A, I want to be able to
assign a value in table A to table B and then to assign a value in table B to
table C. I was wanting to do this from the trigger level in an AFTER UPDATE
trigger to ensure it gets done. I would like to be able to pass t
On Wed, Jan 05, 2005 at 02:56:27PM -0500, Terry Lee Tucker wrote:
>
> Is there any way to pass dynamic data into a trigger function? I think the
> answer is no, but just in case...
What do you mean by "dynamic data"? What problem are you trying
to solve?
--
Michael Fuhr
http://www.fuhr.org/~mf
On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote:
>
> Is it possible to create an index on a view?
Querying a view should use indexes if the underlying tables have
indexes and the planner can figure out how to use them. For complex
queries you might need to use a materialized vie
Greetings:
Is there any way to pass dynamic data into a trigger function? I think the
answer is no, but just in case...
TIA
--
Work: 1-336-372-6812
Cell: 1-336-363-4719
email: [EMAIL PROTECTED]
---(end of broadcast)---
TIP 9: the planner will i
No, you can only create an index on the underlying tables. A view is a
virtual realtion, not a physical one, so what would the index point to?
Any functionality you need you should be able to get with functional
indexes.
Perhaps if/when postgresql gets materialized views an index on a view
might
hi steven,
here's another file where the actual SQL query (the one in the error
message) is defined. it's in the forum_get_forums() function. bruno
noticed that the IF (via pl/pgsql) might not like the boolean casting
to "2" since 7.4 is more strict about casting? does this help?
/**
* @file
hi bruno,
would it be useful to see the IF PLSQL function, or would you recommend
a modification to the database.pgsql.inc file?
On Jan 5, 2005, at 10:52 AM, Bruno Wolff III wrote:
On Wed, Jan 05, 2005 at 10:17:39 -0800,
Aaron Steele <[EMAIL PROTECTED]> wrote:
hi,
warning: pg_query(): Query fai
Hi all,
Is it possible to create an index on a view?
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: [EMAIL PROTECTED]
web: www.askesis.nl
---(end of broadcast)---
On Jan 5, 2005, at 9:49 AM, Alan Garrison wrote:
Out of curiosity, what kind of performance hit (whether CPU, memory,
disk activity) is incurred with having a lot of postmasters running in
this kind of a setup versus one postmaster with lots of databases? We
typically run one postmaster for a l
On Wed, 5 Jan 2005, Mage wrote:
> "order by a asc b desc"
>
> how can I create an index for this?
You need to create an operator class for reversed comparison of whatever
type b is and then use it on b in the index definition.
Something like (however, you should really use a C function for the
On Wed, Jan 05, 2005 at 10:17:39 -0800,
Aaron Steele <[EMAIL PROTECTED]> wrote:
> hi,
>
> warning: pg_query(): Query failed: ERROR: invalid input syntax for type
> boolean: "2"
> CONTEXT: PL/pgSQL function "if" line 2 at if in
> /Library/WebServer/Documents/dmap/includes/database.pgsql.inc on
The MSI installer for RC3 is not yet ready. We expect it to
go out in the next couple of days.
//Magnus
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
DoggettSent: Wednesday, January 05, 2005 6:13 PMTo:
pgsql-general@postgresql.orgSubject: [GENERAL] prob
On Wed, Jan 05, 2005 at 15:35:22 +0100,
Mage <[EMAIL PROTECTED]> wrote:
> Hello,
>
> "order by a asc b desc"
>
> how can I create an index for this?
Currently you can't directly.
In recent versions of Postgres you have some options:
If one of the types has a normal minus operator, then
# i'm setting up a forum that's connected to postgresql 7.4.2 (via
# drupal.org framework) and i'm getting some errors. here's the link,
# followed by the errors verbatim: http://128.32.146.140/dmap/?q=forum
We would have to see database.pgsql.inc to tell you what's wrong with
it.
--
Steven Klas
On Tue, Jan 04, 2005 at 09:50:18AM +0200, Sim Zacks wrote:
> Are there any differences between text and varchar? I found the following in
> the docs, which leads me to believe that there are no differences at all.
> Can someone please confirm this before I switch all my varchars to text?
Correct.
hi,
i'm setting up a forum that's connected to postgresql 7.4.2 (via
drupal.org framework) and i'm getting some errors. here's the link,
followed by the errors verbatim:
http://128.32.146.140/dmap/?q=forum
warning: pg_query(): Query failed: ERROR: invalid input syntax for type
boolean: "2"
CONT
Wow, 8.0 isn't even out yet and you're looking for 8.0.3?
I think you misread something somewhere. You are probably looking for 8.0rc3 (quite different from 8.0.3), which is the 3rd "release candidate" for 8.0.
An rc3 installer does not seem to be available yet; there is an rc2 installer, howeve
hello
everyone!
I'm new to
PostgresSQL and I am having trouble finding the 8.0.3RC. (for windows). I have
tried teh FTP mirrors but the directory listings on those mirrors do not contain
a folder for version 8.0.3. Many subfolders require a UID PWD, which I don't
have.
The bittorrent
d
On Wed, Jan 05, 2005 at 05:04:03AM -0800, Eric Brown wrote:
> I'm trying to write a function that takes a %ROWTYPE as an argument.
The code you posted works in 8.0. Here's an item from the 8.0
Release Notes:
* More support for composite types (row and record variables) in PL/pgSQL
For examp
> Out of curiosity, what value of sort_mem were you using?
>
> (In PG 8.0, the sort memory setting used by CREATE INDEX will be
> maintenance_work_mem not work_mem, which should help in getting larger
> values to be used. But in existing releases you usually need to think
> about a manual tweak.)
Hello,
"order by a asc b desc"
how can I create an index for this?
Mage
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Eric Brown <[EMAIL PROTECTED]> writes:
> CREATE OR REPLACE FUNCTION g2(int) RETURNS int LANGUAGE plpgsql AS '
> DECLARE item t1%ROWTYPE;
> BEGIN
> SELECT INTO item * FROM t1 WHERE x = $1;
> RETURN g1(item);
> END';
This works in 8.0 but not earlier releases --- there was not support in
p
Jeff Davis wrote:
However, for truly good seperation, I recommend that you run a seperate
instance of postgresql (with a seperate $PGDATA directory) for each
user, and run it under the UID of that user. It requires a little more
disk space per account, but in a dollar amount it's virtually zero wit
I'm trying to write a function that takes a %ROWTYPE as an argument. I'm just not sure how to call it from another function.
This is what I tried:
CREATE TABLE t1 (x int, y int);
INSERT INTO t1 VALUES (1, 2);
CREATE OR REPLACE FUNCTION g1(t1) RETURNS int LANGUAGE plpgsql AS '
BEGIN
RETURN $1.y;
END
In a typical setup, you might do:
Edit pg_hba.conf to allow connections to the database "sameuser" which
is a special word meaning that the user can only connect to a database
of the same name.
Then, for each webhosting account you make (let's say the user is named
"foo" with password "bar"), exe
50 matches
Mail list logo