Hi,
I have a query of the form select min(tab1.a) over(partition by tab1.b
tab2.a tab1.c) from .
in db2. What will be the corresponding query for postgres. Does Postgres
have a function which provides the same functionality??
Regards,
Vinita Bansal
Thank you for the feedback. I am considering just centralizing pk
generation to the HQ. Basically, every so often, the branch will connect
back to HQ to get back a block of pk for each table. This way, performance
impact is limited and maintainence is simple.
thanks.
From: Joe Conway
On Thu, Jan 06, 2005 at 08:00:13AM +, vinita bansal wrote:
Hi,
I have a query of the form select min(tab1.a) over(partition by tab1.b
tab2.a tab1.c) from .
in db2. What will be the corresponding query for postgres. Does Postgres
have a function which provides the same
Hello,
My hosting provider is unwilling to install postgresql-contrib package,
fearing that it will negatively impact other users, brake their sites, or
security flaws and so on.
Are there any risks involved?
I need pgcrypto digest function. Is there a no risk install procedure.
If he installs
Generally, the stuff in pgcontrib, when installed, only affect a single
database. Any external C code is implemented as shared libraries and is
loaded on demand. For databases not configured, they won't even see
them.
As for security risks, this is the only real issue. The code is not in
the main
unsubscribe
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
Hi all,
I have 2 tables:
table1 with the columns objectid, refobjectid, commonvaluecol and value1.
table2 with the columns objectid, refobjectid, commonvaluecol and value2.
A select * from table2 where commonvaluecol = 123 and value2 0 returns no
rows.
I create a view:
create view
On Wed, 2005-01-05 at 18:23, Alex Turner wrote:
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
Joost Kraaijeveld [EMAIL PROTECTED] writes:
Hi all,
I have 2 tables:
table1 with the columns objectid, refobjectid, commonvaluecol and value1.
table2 with the columns objectid, refobjectid, commonvaluecol and value2.
A select * from table2 where commonvaluecol = 123 and value2 0
Hi Tom,
I could give you access to the database itself if needed. But these are the
actual tables and view. I hope I will never make any tpo's again to upset you
this way.
CREATE TABLE abo_his
(
klantnummer int4,
abonnement int2,
artikelnummer int4,
omschrijving char(40),
Hi all,
I have a question about pg_dump. I am backing up a database using
pg_dump in text mode, which works perfectly for me, with one exception.
I have a view vwDependentView which references another view,
vwIndependentView. However, when I feed my dump script to psql, it is
attempting
Title: Question about varchar and text
What is the difference between varchar and text?
I have heard that you can use text instead of varchar and this could speed up your tables.
Robert Stewart
Network Eng
Governor's Office of Technology
101 Cold Harbor
Work # 502 564 9696
Cell # 502
Title: functions in postgresql
Is there a way to write a function in postgresql and have the database run it on a schedule?
I would like the database to run a function on every Friday.
Thanks
Robert Stewart
Network Eng
Governor's Office of Technology
101 Cold Harbor
Work # 502 564
[EMAIL PROTECTED] wrote:
Is there a way to write a function in postgresql and have the database run
it on a schedule?
I would like the database to run a function on every Friday.
Use cron or windows scheduler.
J
Thanks
Robert Stewart
Network Eng
Governor's Office of Technology
101 Cold Harbor
On Thu, Jan 06, 2005 at 12:10:26PM -0500, Eric E wrote:
I have a question about pg_dump. I am backing up a database using
pg_dump in text mode, which works perfectly for me, with one exception.
I have a view vwDependentView which references another view,
vwIndependentView. However,
I don't know about running faster, but I believe the only difference between
the two in postgres is that a varchar has a limit on input. They are stored
and indexed the same.
On January 6, 2005 12:25 pm, Stewart, Robert D (COT) wrote:
What is the difference between varchar and text?
I have
Hi!
Stewart, Robert D (COT) wrote:
What is the difference between varchar and text?
I have heard that you can use text instead of varchar and this could
speed up your tables.
http://www.postgresql.org/docs/7.4/interactive/datatype-character.html
Quote: Tip: There are no performance
You haven't given the complete information but the following is just a guess.
It seems that abonnement is in both tables.
The view is stating
abo_his.abonnement = 238
I assume that your initial query was
WHERE abo_klt.abonnement = 238 and
AND abo_klt.afgewerkt 2
My guess is that you are
I use emacs and syntax highlighting is great -- except that because
stored procedures are completely enclosed between two single quotes,
all the coloring is off for that portion. Is there a way to not
surround stored procedures by quotes or does anybody have a solution
that works for them?
Derik Barclay wrote:
I don't know about running faster, but I believe the only difference between
the two in postgres is that a varchar has a limit on input. They are stored
and indexed the same.
There is a theory that text is faster than varchar, because postgresql
doesn't have to check text.
Hi Michael,
Well, I dumped the database from two different versions of Postgres
(on different machines), using both pg_dump 8.0.0beta2 and pg_dump 7.4.2
(which correspond to the respective server versions). I only restored
on the 8.0.0beta machine, though. Would that make a difference?
I
Joost Kraaijeveld [EMAIL PROTECTED] writes:
CREATE OR REPLACE VIEW even AS
SELECT DISTINCT abo_his.klantnummer, abo_his.artikelnummer,
abo_his.code_retour, abo_klt.aantal_abonnementen, abo_klt.afgewerkt
FROM abo_his
JOIN abo_klt ON abo_his.klantnummer = abo_klt.klantnummer
WHERE
Michael Fuhr [EMAIL PROTECTED] writes:
On Thu, Jan 06, 2005 at 12:10:26PM -0500, Eric E wrote:
I have a question about pg_dump. I am backing up a database using
pg_dump in text mode, which works perfectly for me, with one exception.
I have a view vwDependentView which references another
Hi Tom,
[EMAIL PROTECTED] schreef:
Joost Kraaijeveld [EMAIL PROTECTED] writes:
CREATE OR REPLACE VIEW even AS
SELECT DISTINCT abo_his.klantnummer,
abo_his.artikelnummer, abo_his.code_retour,
abo_klt.aantal_abonnementen, abo_klt.afgewerkt
FROM abo_his
JOIN abo_klt ON
Hello,
I'm using ltree but I have a requirement to use the - character in the
text of a node. Can I just change (in ltree.h) the following line:
#define ISALNUM(x) ( isalnum((unsigned char)(x)) || (x) == '_')
to:
#define ISALNUM(x) ( isalnum((unsigned char)(x)) || (x) == '_' ||
(x)
Joost Kraaijeveld [EMAIL PROTECTED] writes:
CREATE OR REPLACE VIEW even AS
SELECT DISTINCT abo_his.klantnummer,
abo_his.artikelnummer, abo_his.code_retour,
abo_klt.aantal_abonnementen, abo_klt.afgewerkt
FROM abo_his
JOIN abo_klt ON abo_his.klantnummer = abo_klt.klantnummer
WHERE
I think I stated in my previous post but in order to make your view
consistent with your original query I think you should do:
CREATE OR REPLACE VIEW even AS
SELECT DISTINCT abo_his.klantnummer,
abo_his.artikelnummer, abo_his.code_retour,
abo_klt.aantal_abonnementen, abo_klt.afgewerkt
FROM
I think there is an echo in here :) It's probably me. I pass for the rest
of this thread.
Joost Kraaijeveld [EMAIL PROTECTED] writes:
CREATE OR REPLACE VIEW even AS
SELECT DISTINCT abo_his.klantnummer,
abo_his.artikelnummer, abo_his.code_retour,
abo_klt.aantal_abonnementen, abo_klt.afgewerkt
Eric Brown wrote:
I use emacs and syntax highlighting is great -- except that because
stored procedures are completely enclosed between two single quotes,
all the coloring is off for that portion. Is there a way to not
surround stored procedures by quotes or does anybody have a solution
On Jan 6, 2005, at 11:43 AM, Bruce Momjian wrote:
Eric Brown wrote:
I use emacs and syntax highlighting is great -- except that because
stored procedures are completely enclosed between two single quotes,
all the coloring is off for that portion. Is there a way to not
surround stored procedures by
Dear all,
I was setting up plpythonu with port system on FreeBSD.
All ports related plpythonu are installed well.
But there was an error when I issued createlang plpythonu template1
with postgres user account.
It said like bellow.
$ createlang plpythonu template1
createlang: language
Can a trigger, written in plperl, write to the OS when it fires? I want
to write a trigger, in plperl, that builds an RSS feed file with each
row that gets added to one of my tables. My database (8 rc 3, on Redhat
9) seems to choke (terminated on signal 11) each time I try to write to
the OS
Dunc wrote:
Can a trigger, written in plperl, write to the OS when it fires? I want
to write a trigger, in plperl, that builds an RSS feed file with each
row that gets added to one of my tables. My database (8 rc 3, on Redhat
9) seems to choke (terminated on signal 11) each time I try to
On Thu, 2005-01-06 at 17:57 +0100, Joost Kraaijeveld wrote:
Hi Tom,
I could give you access to the database itself if needed. But these are the
actual tables and view.
I hope I will never make any tpo's again to upset you this way.
no-one was upset. the point is just that you are more
I wrote:
Can a trigger, written in plperl, write to the OS when it fires? I
want to write a trigger, in plperl, that builds an RSS feed file with
each row that gets added to one of my tables. My database (8 rc 3, on
Redhat 9) seems to choke (terminated on signal 11) each time I try to
write
Dunc [EMAIL PROTECTED] writes:
Can a trigger, written in plperl, write to the OS when it fires?
No, but a plperlu trigger can.
My database (8 rc 3, on Redhat
9) seems to choke (terminated on signal 11) each time I try to write to
the OS - I would imagine because it's a major security
In thinking about this I'm wondering if I'm making this harder then it
needs to be. If I could write a function that builds, and returns the
RSS file that would accomplish what I want - assuming that I could call
the function from a webpage. Can Postgres functions be called from a
URL,
I'm analysing a conversion of a system from Oracle to PG. The system in
case uses a lot of PL/SQL packages and lots of them uses public/static
global/persistent variables declared inside its package specification or
body.
AFAIK PG doesn't have packages - this is not a problem since I can
unsubscribe
---(end of broadcast)---
TIP 6: Have you searched our list archives?
http://archives.postgresql.org
Ronnie Meier Ramos [EMAIL PROTECTED] writes:
AFAIK PG doesn't have packages - this is not a problem since I can
handle it with different schemas or some naming convention, but is there
a way to declare persistent variables (that would be visible to any
function up to the end of the session)
Hi both,
Thanks for taking the trouble to help me. Based on your responses I realized
that a multi key join should do what I wanted and it does.
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: [EMAIL PROTECTED]
AFAIK PG doesn't have packages - this is not a problem since I can
handle it with different schemas or some naming convention, but is there
a way to declare persistent variables (that would be visible to any
function up to the end of the session) ?
AFAIK you'd have to fake it using a temp
On Wed, Jan 05, 2005 at 11:16:29 -0800,
Aaron Steele [EMAIL PROTECTED] wrote:
would it be useful to see the IF PLSQL function, or would you recommend
a modification to the database.pgsql.inc file?
You should probably try looking at the IF function first to see if you
can spot it using 2 as
I understand your pain, because PL/SQL is so close to plpgsql the functions
should just drop into quotes with renamed parameters, but they don't.
Using another language makes the port more difficult.
Have you considered functions that store the variable value in the database
and read it back from
On Thu, Jan 06, 2005 at 15:09:54 +0100,
Martijn van Oosterhout kleptog@svana.org wrote:
One question though, if you are granted filesystem access to the
server, there's no reason why you couldn't just get the pgcrypto module
in your home directory and load it into the server yourself. I
On Thu, Jan 06, 2005 at 14:38:53 -0800,
Aaron Steele [EMAIL PROTECTED] wrote:
hi bruno,
Please copy replies to the list so that other people can help and learn
from your problem.
here's the IF() from psql, although i'm not familiar enough to really
know what to look for. do you see
Ronnie Meier Ramos wrote:
AFAIK PG doesn't have packages - this is not a problem since I can
handle it with different schemas or some naming convention, but is there
a way to declare persistent variables (that would be visible to any
function up to the end of the session) ?
You might be able to
hi bruno,
turns out that l.last_comment_uid and l.last_comment_name are integer
and char var respectively. since i'm using 7.4.1 with strict boolean
casting, is there a better alternative to instantiating a different
version of pgsql on my server?
In the php code you showed the following
On Sunday 02 January 2005 08:24, Martijn van Oosterhout wrote:
On Sat, Jan 01, 2005 at 06:35:30PM -0800, Jeff Davis wrote:
On Sun, 2004-12-12 at 20:25 -0800, Lonni J Friedman wrote:
OK, thanks. So is there any real benefit in doing this in a generic
(non-dspam) sense, or is it just a
Eric,
On Jan 6, 2005, at 2:51 PM, Eric Brown wrote:
Great! Well, I had to move to 8.0 anyway to get better support for
passing around composite types. So where is the $$ quoting stuff
documented? How do I use it?
In the 8.0 beta html documentation you can find at this path
Suppose I have two tables:
create table t1 (
idserialnot null
);
create table t2 (
idserialnot null,
t1integernot null,
foreign key (t1) references t1 (id)
);
Should the t1 integer actually be a bigint? I ask because when I do
select * from t1_id_serial the
unsubscribe
attachment: winmail.dat
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
On Thu, Jan 06, 2005 at 17:32:30 -0800,
Aaron Steele [EMAIL PROTECTED] wrote:
hi bruno,
turns out that l.last_comment_uid and l.last_comment_name are integer
and char var respectively. since i'm using 7.4.1 with strict boolean
casting, is there a better alternative to instantiating a
On Jan 7, 2005, at 14:45, Jonathan Stafford wrote:
Suppose I have two tables:
create table t1 (
idserialnot null
);
create table t2 (
idserialnot null,
t1integernot null,
foreign key (t1) references t1 (id)
);
Should the t1 integer actually be a bigint? I ask
54 matches
Mail list logo