[GENERAL] atttypmod encoding

2011-02-09 Thread RW Shore
Catalog pg_attribute contains interesting type-specific information in attribute atttypmod. Can someone verify that these encodings are correct? CHAR and VARCHAR: 4 + the declared length. Example: CHAR(5) - 9 in atttypmod NUMERIC(p,s): 4 + the long with p in the left-most 4 bytes and s in the

[GENERAL] Size of varchar in an array

2011-02-08 Thread RW Shore
I'm using the following type definition: create type typedef.BASIC_PEDIGREE as ( DATE_ADDED TIMESTAMP, DESCRIPTION VARCHAR(128) [10] )\c I understand that PostgreSQL doesn't enforce the array length [10]. However, I'd like to write an application that can retrieve this length AND

Re: [GENERAL] Idle in Transaction

2010-02-05 Thread RW
Normally I get Idle in Transaction when there is already a connection which is holding a lock on a database object (e.g. a table). You've to check if there is a query holding a lock which causes all the other transactions to go in Idle in Transaction state. Look for other locks than AccesShareLock

Re: [GENERAL] namespace in pgsql

2008-09-25 Thread RW
1) Is it possible to have namespace like in OOP, in pgsql query. means as I know we can reference table or its column with fashion like schema.table_name, but is it possible like db_name.schema.table_name ??? As far as I know this is only possible with dblink which is a contrib module.

Re: [GENERAL] Easy upgrade on Cpanel *without* downtime

2008-08-25 Thread RW
Normally we don't use the packages from the distributions. They're mostly outdated and installation ov two or more versions of Postgres isn't that easy normally in this case. We've a directory structure which allows us to install and startup two or more versions in parallel. I haven't tried

Re: [GENERAL] LIKE and SIMILAR TO

2008-08-22 Thread RW
Maybe you should give tsearch2 a try and create a GIN index. Regex searches are sometimes a option. Robert c k wrote: Hello all, As we are migrating our ERP application from MySQL to PostgreSQL we have some difficulties. One of them is use of Like and Similar to operators. We often use LIKE

[GENERAL] Need quick help with standalone mode

2007-07-31 Thread RW
Hi! I'm really in big trouble with a production database. It doesn't accept connections anymore: 2007-07-31 19:27:33 CEST WARNING: database userbase must be vacuumed within 999832 transactions 2007-07-31 19:27:33 CEST HINT: To avoid a database shutdown, execute a full-database VACUUM in

Re: [GENERAL] Need quick help with standalone mode

2007-07-31 Thread RW
Thanks a lot! That was a life saver :-) Greetings Robert Merlin Moncure wrote: On 7/31/07, RW [EMAIL PROTECTED] wrote: Hi! I'm really in big trouble with a production database. It doesn't accept connections anymore: 2007-07-31 19:27:33 CEST WARNING: database userbase must

Re: [GENERAL] Restoring 8.2 to 8.0

2007-06-01 Thread RW
I've never tried this but maybe it works if you use pg_dump from 8.0 to do the dump. Greetings Robert Robert Fitzpatrick wrote: I have a dump from 8.2 restored to file that was pg_dump'd with format c from a production server. I want to know if it is possible for me to restore this to a 8.0