Re: [SQL] domains and serial

2006-12-29 Thread Bruce Momjian
BillR wrote: > Is it not possible to set up a domain using this construct? I will have > a lot of tables using integer and big integer types as primary key > identifier fields. It would make things simpler if I can use the serial > construct in a domain instead of using an int or bigint in the

Re: [SQL] help with version checking

2006-12-29 Thread Chris Dunworth
I'd probably make a small change to make this a little cleaner. Specifically, change check_version() to take an argument, which is the needed version, and check this against the current value in agenda_version, throwing the exception if they don't match. Once you've written this, you'll never

[SQL] domains and serial

2006-12-29 Thread BillR
Is it not possible to set up a domain using this construct? I will have a lot of tables using integer and big integer types as primary key identifier fields. It would make things simpler if I can use the serial construct in a domain instead of using an int or bigint in the domain, and then ch

Re: [SQL] [GENERAL] NEED URGENT HELP....

2006-12-29 Thread Harpreet Dhaliwal
select * from sp_get_phase ('sandip', 'oms', '1,4') this return a Blank record it would match ur query against '1,4' for the corressponding field in the table. do u really have one such value for that field in your table, i mean '1,4' ?? it won't search for 1 and 4 separately if that is what you

[SQL] I would like to alter the COPY command

2006-12-29 Thread Mason
What I have is data with two different characters for "start quote" and "end quote". In my case it's '[' and ']', but it could be anything from "smart quotes", to parentheses, to brackets, braces, ^/$ in regexps, etc. I think this isn't too unreasonable a feature to have to make copy more functi

Re: [SQL] How to reduce a database

2006-12-29 Thread Ragnar
On fös, 2006-12-29 at 07:09 -0800, Mario Behring wrote: > Anyway, the openNMS database is very large now, more than 25GB > (considering all tables) and I am starting to have disk space issues. > The openNMS product has a vacuumdb procedure that runs every 24 hours > and reads a vacuumd-configurati

[SQL] How to reduce a database

2006-12-29 Thread Mario Behring
Hi list, I have an openNMS server that uses a Postgres database. For those who are not familiar, openNMS is an open source network management product. Anyway, the openNMS database is very large now, more than 25GB (considering all tables) and I am starting to have disk space issues. The openNMS

Re: [SQL] help with version checking

2006-12-29 Thread Arnau
Hi all, Thanks for all replies, taking into account all your suggestions and my google research I arrived to the next script. I'd like to know your opinion. Hopefully this will be useful for somebody else. --used to stop the script execution on any error

Re: [SQL] help with version checking

2006-12-29 Thread Karsten Hilbert
In GNUmed we have created a function gm_concat_table_structure() in http://cvs.savannah.gnu.org/viewcvs/gnumed/gnumed/server/sql/gmSchemaRevisionViews.sql?rev=1.6&root=gnumed&view=log which returns a reproducable, human-readable TEXT concatenation of all the relevant parts of t