Re: [GENERAL] Database reverse engineering

2007-10-14 Thread vladimir konrad
> I am trying to use postgresql-autodoc. The autodoc finds all the Perl > modules and compiles but when I go to /usr/local/bin and run > postgresql_autodoc like this I had a good luck with schema-spy (done in java)... http://schemaspy.sourceforge.net/ Vlad ps: the command I use is (all on one

Re: [GENERAL] corrupt database?

2007-10-14 Thread vladimir konrad
> > Any ideas what to do next? Well, I am going to try the same with 8.3 beta1, will see what happens... Vlad ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining

[GENERAL] corrupt database?

2007-10-14 Thread vladimir konrad
Hello! Running postgresql 8.2.5 (build from source on debian testing, amd64) i run into following error when running "vacuum full analyze": ERROR: invalid page header in block 1995925 of relation "data_pkey" The database was freshly initialized and contains around 1.4 billion records in the ma

[GENERAL] [OT] "advanced" database design (long)

2008-02-02 Thread vladimir konrad
Hello, I think that I understand basic relational theory but then I had an idea. What I would like to know if this is sometimes done or that I am possibly mad... Also, I do not know the terminology for this kind of thing so I do not know where and what to look for. Basically, instead of adding f

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-02 Thread vladimir konrad
> Yes, this is known as eg. Entity-Attribute-Value model (cf. > wikipedia). Thank you for the pointer and term. This will get me started. > IMO most times its disadvantages (it can be very hard to write > performant queries compared to the traditional row based model) weigh > higher than you gain

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-02 Thread vladimir konrad
> Basically, you would be creating your own data dictionary (i.e. > system catalog) on top of the db data dictionary. The database > already comes with a way to easily add columns: ddl. I have seen > newbie database designers reinvent this method a hundred times. The > performance hits and compl

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-02 Thread vladimir konrad
> If you have some part of your app that needs to "select" the list of > columns in a table you should look at > http://www.postgresql.org/docs/8.2/interactive/catalogs.html > particularly pg_class and pg_attribute Thanks, this could come handy. Vlad ---(end of broadcast

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-03 Thread vladimir konrad
Hello, >> vladimir konrad wrote: >>> I think that I understand basic relational theory but > Clearly, you'll have to revisit that thought. Usually I have one table per "entity" modelled (and the table holds fields describing that entity). E.g. subject w

Re: [GENERAL] [OT] "advanced" database design (long)

2008-02-03 Thread vladimir konrad
Hello, and thanks > Are the tests that different that you need to segregate the data? > I see them both as being the time taken to travel a distance. The > only difference is whether the time or distance is used to end the > measurement. Good point (I have realised this after posting, when I dug

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Vladimir Konrad
> Is there a definative HOWTO that I can follow, if not does someone > have a set of instructions that will work? What about running "iconv" command on the dumped .sql file and transform it to the utf8? Vlad PS: man iconv for manual -- Sent via pgsql-general mailing list (pgsql-general@postgre

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Vladimir Konrad
> iconv does not change the database encodings embedded in the file > (and it is quite large). Have you read the manual? file A pathname of an input file. If no file operands are specified, or if a file operand is '-', the standard input shall be used. cat the-source-dump

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Vladimir Konrad
> You have not understood what I said. I ran iconv, and it changes the > encoding of the data, but not the ENCODING= statements that are > embedded in the datastream. Yes I can change those with sed, but > I do not know what else I need to change. There must be an easier > way. Oops, please a

Re: [GENERAL] problem converting database to UTF-8

2009-01-22 Thread Vladimir Konrad
> > cat the-source-dump.sql | iconv -t utf8 - > my-converted.sql > > > > Size should not matter in this case... > > Yeah it does. iconv buffers everything in memory, as I recall. Just found an alternative - "uconv" command (part of ICU project): http://www.icu-project.org/userguide/intro.html