[SQL] where-used function

2008-12-29 Thread Kevin Duffy
Hello All: Hope everyone is enjoying a peaceful holiday season. I am using this quite time between the holidays to get my dev and production environment back into sync. It would be very helpful, if I had a where-used function. This function, given an object name, would determine if th

[SQL] Object create date

2008-12-29 Thread Fernando Hevia
Hi list, I'm having a hard time trying to find out if the latest patches have been applied to my application (uses lots of pgplsql functions). Does Postgres store creation date and/or modification date for tables, functions and other objects? It would help me a lot if I could query each object

Re: [SQL] Object create date

2008-12-29 Thread Scott Marlowe
On Mon, Dec 29, 2008 at 11:23 AM, Fernando Hevia wrote: > Hi list, > > I'm having a hard time trying to find out if the latest patches have been > applied to my application (uses lots of pgplsql functions). > Does Postgres store creation date and/or modification date for tables, > functions and ot

Re: [SQL] Object create date

2008-12-29 Thread Alvaro Herrera
Fernando Hevia escribió: Hi, > I'm having a hard time trying to find out if the latest patches have > been applied to my application (uses lots of pgplsql functions). > Does Postgres store creation date and/or modification date for tables, > functions and other objects? No. -- Alvaro Herrera

Re: [SQL] where-used function

2008-12-29 Thread Tom Lane
"Kevin Duffy" writes: > It would be very helpful, if I had a where-used function. This > function, given an object name, would determine > if the object exists in the database ( i.e. is it a table or a view) > and then, most important, what other objects are dependant on the > object. The tradit

Re: [SQL] Object create date

2008-12-29 Thread George Pavlov
1. not exactly what you were looking for, but i answer this partially by putting a commented-out CVS expansion tag (e.g. $Id:) in the body of the function so that it gets into the catalog and can be searched: CREATE OR REPLACE FUNCTION foo () RETURNS void AS $BODY$ -- $Id: foo.sql,v 1.6

Re: [SQL] Object create date

2008-12-29 Thread Fernando Hevia
> -Mensaje original- > De: pgsql-sql-ow...@postgresql.org > [mailto:pgsql-sql-ow...@postgresql.org] En nombre de Scott Marlowe > > On Mon, Dec 29, 2008 at 11:23 AM, Fernando Hevia > wrote: > > Hi list, > > > > I'm having a hard time trying to find out if the latest > patches have > >

Re: [SQL] Object create date

2008-12-29 Thread Fernando Hevia
Thanks Pavlov for your response. > -Mensaje original- > De: George Pavlov [mailto:gpav...@mynewplace.com] > wrote: > > Hi list, > > > > I'm having a hard time trying to find out if the latest > patches have > > been applied to my application (uses lots of pgplsql functions). > > Does P

Re: [SQL] Object create date

2008-12-29 Thread Alvaro Herrera
Fernando Hevia escribió: > Thanks Pavlov for your response. > > CREATE OR REPLACE FUNCTION foo () > > RETURNS void AS > > $BODY$ > > -- $Id: foo.sql,v 1.6 2008/12/23 00:06:52 gpavlov Exp $ > > BEGIN > > ... > > > > I am already doing this. Sadly I've found it to be very fragile in >

[SQL] Copy question

2008-12-29 Thread Judith Altamirano
Hello every body I'm trying to extract a query as follows: copy (select * from clientes where id_cliente = 7895) to '/home/paso/sel.copy'; But it returns the next error: ERROR: error de sintaxis en o cerca de «(» at character 6 LINE 1: copy (select * from clientes where id_cliente = 7895) to

Re: [SQL] Copy question

2008-12-29 Thread Guillaume Lelarge
Judith Altamirano a écrit : > Hello every body I'm trying to extract a query as follows: > > copy (select * from clientes where id_cliente = 7895) to > '/home/paso/sel.copy'; > > But it returns the next error: > > ERROR: error de sintaxis en o cerca de «(» at character 6 > LINE 1: copy (select