Re: [SQL] Trigger on select :-(

2010-03-11 Thread Jaime Casanova
On Mon, Mar 1, 2010 at 9:10 PM, Ray Madigan wrote: > > What I want to do is when I do a SELECT on the Catalog and deliver the > result to the user, I want to check to see if the FooKey is in the users > ToDo table and set the value of a column isToDo to true or false depending > on if the FooKey e

Re: [SQL] Remote monitoring of Postgres w/minimal grants

2010-03-11 Thread Tony Wasson
On Wed, Mar 10, 2010 at 12:26 AM, Bryce Nesbitt wrote: > I'm setting up remote monitoring of postgres, but running into an > uncomfortable situation with permissions. > Basically it seems hard to set up a secure "read only" role, yet also allow > proper monitoring. > > A brief writeup of that is h

Re: [SQL] Help : insert a bytea data into new table

2010-03-11 Thread Ben Morrow
[quoting fixed] Quoth dennis : > Ben Morrow wrote: > > Quoth dennis: > >> Dear Ben > >> > >> thanks for you anwser. > >> I try to add function quote_literal on my sql statement . > >> > >> but it raise other error message (quote_literal not support bytea format): > >>function quote_li

Re: [SQL] Trigger on select :-(

2010-03-11 Thread Garrett Murphy
Are you able to set up a SELECT query to get the result you want? If you are, it's as simple as putting "CREATE VIEW viewname AS ", followed by your query. Garrett Murphy _ From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On

[SQL] Trigger on select :-(

2010-03-11 Thread Ray Madigan
What I want is to have a trigger on select, but since I have searched the archives I know that is not possible. I also read that view rules is the technology is whats available. Having never used views before I can't seem to get my mind to figure out what I need to do to solve my problem. I have

Re: [SQL] Selecting names of indexes that are not dependent on constraints.

2010-03-11 Thread Tom Lane
Dmitriy Igrishin writes: > How can I select names of indexes of table (or even whole schema) that are > not dependent on constraints? Right at the moment, the only reliable way to tell whether an index is associated with a constraint is to look for a pg_depend entry linking the two. Be careful t

Re: [SQL] Selecting names of indexes that are not dependent on constraints.

2010-03-11 Thread Dmitriy Igrishin
Of course, I meant the indexes of which constraints do not depend. :) 2010/3/11 Dmitriy Igrishin > Hey all, > > How can I select names of indexes of table (or even whole schema) that are > not dependent on constraints? > > Unfortunately there is no way to select only "independent" indexes from >

[SQL] Selecting names of indexes that are not dependent on constraints.

2010-03-11 Thread Dmitriy Igrishin
Hey all, How can I select names of indexes of table (or even whole schema) that are not dependent on constraints? Unfortunately there is no way to select only "independent" indexes from pg_indexes view. How can I do it? Regards, Dmitriy Igrishin

Re: [SQL] Help : insert a bytea data into new table

2010-03-11 Thread Ben Morrow
Quoth dennis : > Dear Ben > > thanks for you anwser. > I try to add function quote_literal on my sql statement . > > but it raise other error message (quote_literal not support bytea format): > function quote_literal(bytea) does not exist Which Postgres version are you using? Ben --

Re: [SQL] Clarification With Money data type

2010-03-11 Thread Jasen Betts
On 2010-03-10, Navanethan Muthusamy wrote: > --0016e68e9a5510f1f504816d1fcb > Content-Type: text/plain; charset=ISO-8859-1 > > Hi, > > I am using Postgresql 8.4, Can you tell me How Can I use Money data type? it's best not to, "money" is a fixed-point fromat based on 32 bit integers, abn it's