Re: [GENERAL] cast name to oid

2012-08-14 Thread Sergey Konoplev
Hi, On Wed, Aug 15, 2012 at 1:02 AM, Little, Douglas wrote: > Can someone let me know the correct way to do this? > > This is failing >where p.oid = cast(proname as regproc); > > NOTICE: found dba_work.pg_get_functiondef2 > WARNING: sqlstate 42846 > WARNING: sqlerrm cannot cast type text t

Re: [GENERAL] Regarding pc-lint on PostgreSQL code

2012-08-14 Thread Peter Eisentraut
On Tue, 2012-08-14 at 11:44 -0400, Bruce Momjian wrote: > On Tue, Aug 14, 2012 at 04:58:13AM +, Rajeev rastogi wrote: > > We are in process of evaluating the PostgreSQL static report. So wanted to > > know > > if there is any available result for pc-lint on latest source code of > > PostgreSQL

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Dario Beraldi
Many thanks to everybody for advice! I'll give it a go to the tools you suggested. Dario On 14 August 2012 09:54, Dario Beraldi wrote: > Hello, > > Apologies if this question has been asked before, but I couldn't come up > with a decent solution... > > Can anyone advice about a tool to visualiz

[GENERAL] cast name to oid

2012-08-14 Thread Little, Douglas
I got my function dump function to work. Enhancing to handle errors if the object doesn't exist. I want to add an exception block, to trap the object not found error. But when I changed the input parameter type from regproc to text, I was no longer getting matches. I am trying to explicitly c

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Merlin Moncure
On Tue, Aug 14, 2012 at 12:14 PM, Wolfgang Keller wrote: >> Can anyone advice about a tool to visualize a database schema? > > SQLalchemy, a Python module, can produce dot (Graphviz) output which you > can load into your favourite diagramming application such as e.g. > Omnigraffle, yEd or Dia: > >

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Edson Richter
Em 14/08/2012 15:47, Scott Mead escreveu: On Tue, Aug 14, 2012 at 5:24 AM, Robert Gravsjö mailto:robert.grav...@imano.se>> wrote: > Can anyone advice about a tool to visualize a database schema? Ideally, I would like something that takes the SQL definition of a schema or databas

Re: [GENERAL] Determining a table column by the view column.

2012-08-14 Thread John R Pierce
On 08/14/12 7:18 AM, Dmitriy Igrishin wrote: Hey all, Is there way to determine a table column referenced by a view column via SQL? I want to create an universal function to determine mandatoriness of some column of the view (i.e. check the not null constraint of underlying table column). no

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Scott Mead
On Tue, Aug 14, 2012 at 5:24 AM, Robert Gravsjö wrote: > > > Can anyone advice about a tool to visualize a database schema? Ideally, > I would like something that takes the SQL definition of a schema or database > > (essentially the output of pg_dump) and produces a graphical > representation of t

Re: [GENERAL] Indexing question

2012-08-14 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of amit sehas > Sent: Tuesday, August 14, 2012 12:55 PM > To: pgsql-...@postgresql.org; pgsql-general@postgresql.org > Subject: [GENERAL] Indexing question > > In SQL, g

Re: [GENERAL] Indexing question

2012-08-14 Thread Andreas Kretschmer
amit sehas wrote: > In SQL, given a table T, with two fields f1, f2, > > is it possible to create an index such that the same record is indexed > in the index, once with field f1 and once with field f2. (I am not > looking for a compound index in which the key would look like f2>, instead the

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Wolfgang Keller
> Can anyone advice about a tool to visualize a database schema? SQLalchemy, a Python module, can produce dot (Graphviz) output which you can load into your favourite diagramming application such as e.g. Omnigraffle, yEd or Dia: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SchemaDisplay Sinc

[GENERAL] Indexing question

2012-08-14 Thread amit sehas
In SQL, given a table T, with two fields f1, f2, is it possible to create an index such that the same record is indexed in the index, once with field f1 and once with field f2. (I am not looking for a compound index in which the key would look like , instead there should be two entries in the

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Dann Corbit
This is nice: http://sourceforge.net/projects/mogwai/?source=directory The install is fiddly, and the interface is JDBC. But it does a very good job of reverse engineering a schema and graphically displaying it. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.o

Re: [GENERAL] Regarding pc-lint on PostgreSQL code

2012-08-14 Thread Bruce Momjian
On Tue, Aug 14, 2012 at 04:58:13AM +, Rajeev rastogi wrote: > Dear Sir, > > > > We are in process of evaluating the PostgreSQL static report. So wanted to > know > if there is any available result for pc-lint on latest source code of > PostgreSQL (preferably on 9.2 Beta 3). Not that I kno

Re: [GENERAL] Determining a table column by the view column.

2012-08-14 Thread raghu ram
On Tue, Aug 14, 2012 at 7:48 PM, Dmitriy Igrishin wrote: > Hey all, > > Is there way to determine a table column referenced by > a view column via SQL? > > I want to create an universal function to determine > mandatoriness of some column of the view (i.e. > check the not null constraint of under

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Sébastien Lorion
Concerning auto-layout, most if not all tools I have used up to now make a mess for anything that is not dead simple. One exception I found is Embarcadero Data Architect ( http://www.embarcadero.com/products/er-studio-data-architect). It's not free, but there is a trial you can use and then you can

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Zdeněk Bělehrádek
Hello, Apologies if this question has been asked before, but I couldn't come up with a decent solution... Can anyone advice about a tool to visualize a database schema? Ideally, I would like something that takes the SQL definition of a schema or database (essentially the output of pg_dump) and

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread Steve Crawford
On 08/14/2012 06:34 AM, José Pedro Santos wrote: I'm working with vector but is like that. I just add a new column them I will copy the XML file into their..let me see if work. You can store XML in a text field but if the data is truly well-formed XML you may be better off defining the column

[GENERAL] Determining a table column by the view column.

2012-08-14 Thread Dmitriy Igrishin
Hey all, Is there way to determine a table column referenced by a view column via SQL? I want to create an universal function to determine mandatoriness of some column of the view (i.e. check the not null constraint of underlying table column). Thanks. -- // Dmitriy.

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread José Pedro Santos
I'm working with vector but is like that. I just add a new column them I will copy the XML file into their..let me see if work. Thanks, Best R. JP > Date: Tue, 14 Aug 2012 04:52:30 -0700 > From: pie...@hogranch.com > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Add Metadata to Pos

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread John R Pierce
On 08/14/12 4:32 AM, José Pedro Santos wrote: With the files should came metadata to describe what is inside the file. I can't put in the comment options because is not ISO standart that allow to produce metadata. I'm rookie with Postgre what do you mean by "stored in a text field of a table"

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread Pavel Stehule
2012/8/14 José Pedro Santos : > With the files should came metadata to describe what is inside the file. I > can't put in the comment options because is not ISO standart that allow to > produce metadata. > > I'm rookie with Postgre what do you mean by "stored in a text field of a > table"? comment

[GENERAL] pg_dump on hot standby canceled despite hot_standby_feedback=on

2012-08-14 Thread Stuart Bishop
Hi. I've found a situation on one of my PG 9.1 servers where pg_dump running on a hot standby gets terminated when a tble on the master is vacuumed. This is PostgreSQL 9.1.4, and purely streaming replication. pg_dump: Error message from server: ERROR: canceling statement due to conflict with rec

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread José Pedro Santos
With the files should came metadata to describe what is inside the file. I can't put in the comment options because is not ISO standart that allow to produce metadata. I'm rookie with Postgre what do you mean by "stored in a text field of a table"? comment option? If exist one option in the

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread John R Pierce
On 08/14/12 2:55 AM, José Pedro Santos wrote: Not comments. In comments i can't use the ISO that rules Metadata XML. Basically put XML Metadata files inside the schemas. Is possible? not sure what the International Standards Organization has to do with this, but XML is just text, and can be st

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread José Pedro Santos
Hi, Not comments. In comments i can't use the ISO that rules Metadata XML. Basically put XML Metadata files inside the schemas. Is possible? Best regards, José Santos > Date: Tue, 14 Aug 2012 11:25:55 +0200 > From: andr...@a-kretschmer.de > To: pgsql-general@postgresql.org; zpsant...@hotmai

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Johann Spies
On Tue, Aug 14, 2012 at 09:54:34AM +0100, Dario Beraldi wrote: > Can anyone advice about a tool to visualize a database schema? > Ideally, I would like something that takes the SQL definition of a > schema or database In addition to other suggestions: postgresql-autodoc is another option. Regard

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread John R Pierce
On 08/14/12 2:15 AM, José Pedro Santos wrote: Dear Postgre Community, I would like to know if is possible to add metadata to Schemas. I have shemas with raster layers and I would like to add to them matadata. Is possbile in Postgre? If not how can I solve this problem? raster layers/images

Re: [GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread Andreas Kretschmer
"José Pedro Santos" hat am 14. August 2012 um 11:15 geschrieben: > > Dear Postgre Community, > > I would like to know if is possible to add metadata to Schemas. I have shemas > with raster layers and I would like to add to them matadata. Is possbile in > Postgre? If not how can I solve this prob

Re: [GENERAL] Visualize database schema

2012-08-14 Thread Robert Gravsjö
> Can anyone advice about a tool to visualize a database schema? Ideally, I > would like something that takes the SQL definition of a schema or database > (essentially the output of pg_dump) and produces a graphical representation > of the tables, constraints and indexes which can be moved aroun

[GENERAL] Add Metadata to Postgre SQL

2012-08-14 Thread José Pedro Santos
Dear Postgre Community, I would like to know if is possible to add metadata to Schemas. I have shemas with raster layers and I would like to add to them matadata. Is possbile in Postgre? If not how can I solve this problem? Many thanks in advance. Best Regards, José Santos

Re: [GENERAL] Visualize database schema

2012-08-14 Thread José Pedro Santos
Hi, I use to visualize a database schema Quantum GIS or UDIG. Both are open source software and very esay to add a database schema. Best Regards, José Santos Date: Tue, 14 Aug 2012 09:54:34 +0100 Subject: [GENERAL] Visualize database schema From: dario.bera...@gmail.com To: pgsql-general@postg

Re: [GENERAL] Visualize database schema

2012-08-14 Thread John R Pierce
On 08/14/12 1:54 AM, Dario Beraldi wrote: Hello, Apologies if this question has been asked before, but I couldn't come up with a decent solution... Can anyone advice about a tool to visualize a database schema? Ideally, I would like something that takes the SQL definition of a schema or dat

[GENERAL] Visualize database schema

2012-08-14 Thread Dario Beraldi
Hello, Apologies if this question has been asked before, but I couldn't come up with a decent solution... Can anyone advice about a tool to visualize a database schema? Ideally, I would like something that takes the SQL definition of a schema or database (essentially the output of pg_dump) and pr