Re: [GENERAL] function permissions question

2007-12-08 Thread Greg Steffensen
Excellent, thanks for the quick response. Greg On Dec 9, 2007 1:18 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Greg Steffensen" <[EMAIL PROTECTED]> writes: > > Hey, I'm slightly confused about how the permission checking is done > > when executing functions. Basically, users that I've never grant

Re: [GENERAL] function permissions question

2007-12-08 Thread Tom Lane
"Greg Steffensen" <[EMAIL PROTECTED]> writes: > Hey, I'm slightly confused about how the permission checking is done > when executing functions. Basically, users that I've never granted > execution permissions to are able to execute functions. You didn't read the part of the GRANT man page that s

[GENERAL] function permissions question

2007-12-08 Thread Greg Steffensen
Hey, I'm slightly confused about how the permission checking is done when executing functions. Basically, users that I've never granted execution permissions to are able to execute functions. Basically, why does this script (which I've tested on a fresh db, executing via psql as a superuser) succ

Re: [GENERAL] libpq messages language

2007-12-08 Thread Efraín López
Thank you very much for your help. It worked for me. I am using Visual C++ 2005 express I downloaded gettext-runtime-0.13.1.bin.woe32.zip and libiconv-1.9.1.bin.woe32.zip from http://sourceforge.net/project/showfiles.php?group_id=25167 Then I compiled libpq with ENABLE_NLS, gettext and libic

Re: [GENERAL] How to EXPLAIN statements inside a trigger function?

2007-12-08 Thread Tom Lane
"John D. Burger" <[EMAIL PROTECTED]> writes: > I'm developing some triggers for the first time, and I'm having > trouble analyzing their performance. Does anyone have any advice for > doing EXPLAIN and the like on statements involving NEW? The critical thing you're probably running into is th

Re: [GENERAL] wriring a file to a database

2007-12-08 Thread Greg Smith
On Sat, 8 Dec 2007, Roger Mason wrote: I want to write a file into a database from python using psycopg. You don't use lo_import directly for that. There is an example program included with psycopg that shows the right syntax to insert a file. For psycopg1, see bytea.py ; for psycopg2 look

[GENERAL] wriring a file to a database

2007-12-08 Thread Roger Mason
Hello, I want to write a file into a database from python using psycopg. I have tried several ways to insert the file, each gives a different error. File "write_images_to_db.py", line 43, in insert curs.execute("INSERT INTO diamonds VALUES (%s, lo_import %s)",(iname, image)) psycopg2.P

Re: [GENERAL] postgresql startup

2007-12-08 Thread Jan de Visser
On 12/8/07, Charles <[EMAIL PROTECTED]> wrote: > I am using Ubuntu 7.10. When trying to use Postgresql 8.2 I get the > following errors: > > [EMAIL PROTECTED]:~# su -c postgres > bash: postgres: command not found Ignoring an error and just charging on seems quite dangerous to me, especially when b

[GENERAL] postgresql startup

2007-12-08 Thread Charles
I am using Ubuntu 7.10. When trying to use Postgresql 8.2 I get the following errors: [EMAIL PROTECTED]:~# su -c postgres bash: postgres: command not found [EMAIL PROTECTED]:~# createuser -s -P dagon Enter password for new role: Enter it again: createuser: could not connect to database postgres:

Re: [GENERAL] SQL design pattern for a delta trigger?

2007-12-08 Thread Steve Atkins
On Dec 8, 2007, at 7:54 AM, John D. Burger wrote: So two design patterns for a makeshift UPSERT have been presented - one is to check beforehand, and only insert if the item isn't present already ... which will give the wrong results if there's any concurrent updates... , the other is

Re: [GENERAL] record-based log shipping

2007-12-08 Thread Joshua D. Drake
Alex Vinogradovs wrote: Now you're pointing out obvious problems. My company deals with data warehouses, we don't really need to delete/update stuff, only insert/select ;) But seriously, those issues can be handled if one doesn't just send plain tuples, but also includes the information about wha

Re: [GENERAL] SQL design pattern for a delta trigger?

2007-12-08 Thread John D. Burger
So two design patterns for a makeshift UPSERT have been presented - one is to check beforehand, and only insert if the item isn't present already, the other is to do the insert blindly and let PG check for you, and catch any exceptions. I'm also wondering what people's ideas are for a sort

Re: [GENERAL] Slony replication

2007-12-08 Thread Geoffrey
Pedro Doria Meunier wrote: Hi All, I would like to implement DB replication with Slony but with a slave that will not be always available. The master would have to check first of the slave's availability and then start syncing... Is this at all possible, or am I just raving? : ) I am quite ne

Re: [GENERAL] Returning columns from different tables, in plpgsql function

2007-12-08 Thread Merlin Moncure
On Dec 7, 2007 6:57 PM, Amit Phatarphekar <[EMAIL PROTECTED]> wrote: > Currently if I have to return columns from multiple tables, I have to define > my own TYPE and then return SETOF that type in the function. I've provided > an example below. > > Now, if I have to add a column to the select quer

Re: [GENERAL] list of roles

2007-12-08 Thread Alain Roger
Hi / Cau Pavel, It works great / funguje vyborne Alain On Dec 8, 2007 1:38 PM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > On 08/12/2007, Alain Roger <[EMAIL PROTECTED]> wrote: > > Hi, > > > > i would like to know how can i get the complete list of roles available > ? > > as i use phppgAdmin, it

Re: [GENERAL] list of roles

2007-12-08 Thread Pavel Stehule
On 08/12/2007, Alain Roger <[EMAIL PROTECTED]> wrote: > Hi, > > i would like to know how can i get the complete list of roles available ? > as i use phppgAdmin, it could be great to get it as a SQL query. > > thanks a lot, > Hello SELECT rolname FROM pg_roles; Regards Pavel Stehule > -- > Alain

[GENERAL] list of roles

2007-12-08 Thread Alain Roger
Hi, i would like to know how can i get the complete list of roles available ? as i use phppgAdmin, it could be great to get it as a SQL query. thanks a lot, -- Alain Windows XP SP2 PostgreSQL 8.2.3 Apache 2.2.4 PHP 5.2.3

[GENERAL] Slony replication

2007-12-08 Thread Pedro Doria Meunier
Hi All, I would like to implement DB replication with Slony but with a slave that will not be always available. The master would have to check first of the slave's availability and then start syncing... Is this at all possible, or am I just raving? : ) Kind regards, -- Pedro Doria Meunier Ips d

Re: [GENERAL] pgagent on a mac

2007-12-08 Thread Dave Page
> --- Original Message --- > From: "kelvan" <[EMAIL PROTECTED]> > To: pgsql-general@postgresql.org > Sent: 07/12/07, 22:58:38 > Subject: [GENERAL] pgagent on a mac > > now i want you all to trust me it was not my and never woudl be my choice to > use a mac server but i need pgagent to r

Re: [GENERAL] Column pgl.transaction does not exist in 8.3 beta 4

2007-12-08 Thread Dave Page
> --- Original Message --- > From: Tom Lane <[EMAIL PROTECTED]> > To: Shelby Cain <[EMAIL PROTECTED]> > Sent: 08/12/07, 01:21:08 > Subject: Re: [GENERAL] Column pgl.transaction does not exist in 8.3 beta 4 > > Most likely you want pg_locks.virtualtransaction, instead --- that's > the clo