Re: [GENERAL] Getting Out Parameter in the application using libpq

2009-09-12 Thread Ehsan Haq
Hi,    First of all the below mentioned function can't be called with "SELECT * FROM getOutVarchar()". Since the Function signature does not match. CREATE OR REPLACE Function getOutVarchar(outvarchar OUT varchar2) RETURN NUMBER IS BEGIN    outvarchar:='This is Out String';    RETURN 1; END getOutV

Re: [GENERAL] Missing 8.2.14 source rpms

2009-09-12 Thread Clodoaldo Neto
2009/9/12 Devrim GÜNDÜZ : > On Sat, 2009-09-12 at 12:22 -0300, Clodoaldo Neto wrote: > >> Sorry if it is already known but just to be sure the 8.2.14 source >> rpms are missing from the yum repository. > > Because of bandwith issues on the master RPM build server, srpms are > uploaded a few days af

Re: [GENERAL] Missing 8.2.14 source rpms

2009-09-12 Thread Devrim GÜNDÜZ
On Sat, 2009-09-12 at 12:22 -0300, Clodoaldo Neto wrote: > Sorry if it is already known but just to be sure the 8.2.14 source > rpms are missing from the yum repository. Because of bandwith issues on the master RPM build server, srpms are uploaded a few days after the binary packages are uploaded

Re: [GENERAL] primary keys

2009-09-12 Thread Tom Lane
Grant Maxwell writes: > I don't know why it was done this way but it seems to me that the > email addresses are unique, non null and could be used as the primary > key. This would make the replication much faster and simpler. > Does anyone out there think the change (number to email address a

Re: [GENERAL] primary keys

2009-09-12 Thread Grant Maxwell
On 13/09/2009, at 2:46 AM, Tom Lane wrote: Grant Maxwell writes: I don't know why it was done this way but it seems to me that the email addresses are unique, non null and could be used as the primary key. This would make the replication much faster and simpler. Does anyone out there think

Re: [GENERAL] primary keys

2009-09-12 Thread Merlin Moncure
On Sat, Sep 12, 2009 at 2:11 PM, Bill Moran wrote: > On Sun, 13 Sep 2009 02:35:02 +1000 > Grant Maxwell wrote: > >> Hi Folks >> >> I'm looking for a bit of advice regarding alpha primary keys. >> >> I have a table (designed by someone else) that has a numeric primary >> key and also a unique non-

Re: [GENERAL] primary keys

2009-09-12 Thread Bill Moran
On Sun, 13 Sep 2009 02:35:02 +1000 Grant Maxwell wrote: > Hi Folks > > I'm looking for a bit of advice regarding alpha primary keys. > > I have a table (designed by someone else) that has a numeric primary > key and also a unique non-null email address field. > > The use of the primary key i

Re: [GENERAL] primary keys

2009-09-12 Thread Merlin Moncure
On Sat, Sep 12, 2009 at 12:35 PM, Grant Maxwell wrote: > Hi Folks > > I'm looking for a bit of advice regarding alpha primary keys. > > I have a table (designed by someone else) that has a numeric primary key and > also a unique non-null email address field. > > The use of the primary key is causi

Re: [GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Tom Lane
Denis BUCHER writes: > Tom Lane a écrit : >> What might be more practical is to create a group role that actually >> owns the table, and make everyone who needs to do this sort of thing >> a member of that group. > It's strange but after having tried it, it doesn't work ? Hmm, worksforme: regre

Re: [GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Denis BUCHER
Denis BUCHER a écrit : > Tom Lane a écrit : >> "Raymond O'Donnell" writes: >>> On 12/09/2009 16:44, Denis BUCHER wrote: ERROR: must be the owner of the mytable relation >>> The clue is in the error message :-) GRANTing ALL doesn't make them >>> the owner of the object as well. >>> For th

Re: [GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Denis BUCHER
Hello, Tom Lane a écrit : > "Raymond O'Donnell" writes: >> On 12/09/2009 16:44, Denis BUCHER wrote: >>> ERROR: must be the owner of the mytable relation > >> The clue is in the error message :-) GRANTing ALL doesn't make them >> the owner of the object as well. > >> For that, you have to d

Re: [GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Denis BUCHER
Tom Lane a écrit : >>> ERROR: must be the owner of the mytable relation > >> The clue is in the error message :-) GRANTing ALL doesn't make them >> the owner of the object as well. > >> For that, you have to do something like >> ALTER TABLE mytable OWNER TO mycolleague; > > What might be

[GENERAL] primary keys

2009-09-12 Thread Grant Maxwell
Hi Folks I'm looking for a bit of advice regarding alpha primary keys. I have a table (designed by someone else) that has a numeric primary key and also a unique non-null email address field. The use of the primary key is causing me some headaches in that in multiple database server envir

Re: [GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Tom Lane
"Raymond O'Donnell" writes: > On 12/09/2009 16:44, Denis BUCHER wrote: >> ERROR: must be the owner of the mytable relation > The clue is in the error message :-) GRANTing ALL doesn't make them > the owner of the object as well. > For that, you have to do something like > ALTER TABLE mytab

Re: [GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Raymond O'Donnell
On 12/09/2009 16:44, Denis BUCHER wrote: > Hello, > > A very annoying problem with Postgres is the following one : > > As postgres user, I give all rights to all objects of a database or > schema to a colleague : > GRANT ALL ON mytable TO mycolleague; > > But when he tries to modify something, e

[GENERAL] How to GRANT rights to modify a table ???

2009-09-12 Thread Denis BUCHER
Hello, A very annoying problem with Postgres is the following one : As postgres user, I give all rights to all objects of a database or schema to a colleague : GRANT ALL ON mytable TO mycolleague; But when he tries to modify something, even something really small like adding a column to a table

[GENERAL] Missing 8.2.14 source rpms

2009-09-12 Thread Clodoaldo Neto
Sorry if it is already known but just to be sure the 8.2.14 source rpms are missing from the yum repository. Regards, Clodoaldo -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Getting Out Parameter in the application using libpq

2009-09-12 Thread Merlin Moncure
On Fri, Sep 11, 2009 at 10:30 PM, Ehsan Haq wrote: > > Hi, >    I still don't get. How can I get the varchar OUT parameter in the > application? For Example > > CREATE OR REPLACE > Function getOutVarchar(outvarchar OUT varchar2) RETURN NUMBER if, from libpq: res = PQexec(conn, "SELECT * FROM ge

Re: [GENERAL] dblink & 4 master operation

2009-09-12 Thread Mohsen Pahlevanzadeh
Dear all, I use following command : su - su postgres cd ~ psql urldump urldump=# \i /usr/share/postgresql/8.4/contrib/dblink.sql . urldump=# select dblink_connect('my','dbname=urldump'); dblink_connect OK (1 row) urldump=# select dblink('my','INSERT INTO ipmap (ip,username

[GENERAL] dblink & 4 master operation

2009-09-12 Thread Mohsen Pahlevanzadeh
Dear all, My boss requested me that i use dblink even for a sample INSERT, now i have a INSERT query, But i don't know how to invoke insert query without select query. I have search for doc in this topic, But i just saw API ref in postgresql.org. Can u help me? Yours, Mohsen -- Sent via pgsql-

Re: [GENERAL] Loop

2009-09-12 Thread Alban Hertroys
On 12 Sep 2009, at 11:58, Alban Hertroys wrote: On 12 Sep 2009, at 24:17, db.subscripti...@shepherdhill.biz wrote: Hi, I have a loop of the form: FOR rec IN SELECT code FROM staff WHERE shiftgroup = NEW.groupe ORDER BY code LOOP WHILE sdate <= NEW.todate LOOP SELECT IN

Re: [GENERAL] Loop

2009-09-12 Thread Alban Hertroys
On 12 Sep 2009, at 24:17, db.subscripti...@shepherdhill.biz wrote: Hi, I have a loop of the form: FOR rec IN SELECT code FROM staff WHERE shiftgroup = NEW.groupe ORDER BY code LOOP WHILE sdate <= NEW.todate LOOP SELECT INTO starty,endy,nday resumetime,closetime,nextday F