Hi guys, I'm a newbie using PostgreSQL. I know that can use one-row tables but, I'd like to know if it's possible to define variables attached to one specific database, & saveables when the database tables are dumped. Glus
Hi, On Tuesday 20 April 2010 15.50:35 Glus Xof wrote: > I know that can use one-row tables but, > > I'd like to know if it's possible to define variables attached to one > specific database, Yes, one row tables :-) What I usually do for those random values is a table like "GlobalParameters" or similar (with three text rows: key, value, type) so I can avoid having 20 separate one row, one column tables for various settings. Defining a trigger to coerce the value to the desired type is trivial, so your application can depend on not having completely bogus values in these settings. A more esoteric possibility would be to define functions that return a constant value. > & saveables when the database tables are dumped. Not exactly sure what you mean here. If you use pg_dump, usually the whole db is dumped (table definition, data, sequences, functions, ...) cheers -- vbi -- Wenn ein englisches Flugzeug mit deutschen Passagieren über der Grenze zwischen Frankreich und Spanien abstürzt ... wo werden dann die Überlebenden begraben?
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера