Re: [GENERAL] cursor manipulation

2008-03-21 Thread Albe Laurenz
Justin wrote: Cursor manipulation with select statements This is something i did in foxpro and wonder if it is at all possible in pl/pgSQL. Yes, it is. See http://www.postgresql.org/docs/current/static/plpgsql-cursors.html Yours, Laurenz Albe -- Sent via pgsql-general mailing list

Re: [GENERAL] dynamically generated SQL and planner/performance

2008-03-21 Thread Albe Laurenz
Ivan Sergio Borgonovo wrote: I've a lot of code that should call different functions according to values in tables. something like: create table FuncName(Name varchar(10), arg int); insert into FuncName values('ciro',5); insert into FuncName values('pino',7); insert into FuncName

Re: [GENERAL] Get index information from information_schema?

2008-03-21 Thread Albe Laurenz
Dann Corbit wrote: I need a method of extracting information about indexes of any table from information_schema. Have you any suggestions? I am afraid that indexes are not covered by information_schema. You'd have to dig into pg_catalog.pg_index for this. Doesn't the

Re: [GENERAL] dynamically generated SQL and planner/performance

2008-03-21 Thread Ivan Sergio Borgonovo
On Fri, 21 Mar 2008 12:15:19 +0100 Albe Laurenz [EMAIL PROTECTED] wrote: The execution plan of dynamic queries from PL/pgSQL will not be cached; the query will be prepared at execution time every time you execute it. Pardon my ignorance but I really have a very vague idea of what the planner

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread John Smith
On Thu, Mar 20, 2008 at 2:16 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: John Smith wrote: guys, Please don't cross-post, especially since nobody on the PostGIS mailing list answered your previous question. On Thu, Mar 20, 2008 at 6:45 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: Dunno

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread Colin Wetherbee
John Smith wrote: On Thu, Mar 20, 2008 at 2:16 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: Please don't cross-post, especially since nobody on the PostGIS mailing list answered your previous question. please don't cross-post my cross-post. if i wanted to post it to the postgresql list, i

Re: [GENERAL] cast problem 8.3.1

2008-03-21 Thread Steve Clark
Charles Simard wrote: snip | | postgres error log: | ERROR: operator does not exist: text = integer | HINT: No operator matches the given name and argument type(s). You | might need to add explicit type casts. | STATEMENT: update T_MON_DEVICE_STATUS set device_ip = $1 :: inet | ,

Re: [GENERAL] Feature request/suggestion - CREATE SCHEMA LIKE

2008-03-21 Thread ipajor
On Mar 17, 4:01 pm, wstrzalka [EMAIL PROTECTED] wrote: Hi Features like CREATE DATABASE WITH TEMPLATE or CREATE TABLE LIKE are very usefull but it would be great to have such a feature on the mid-level too. I mean something CREATE SCHEMA LIKE that would copy all the template schema

[GENERAL] PGSQL database size question

2008-03-21 Thread Dan99
Hi, I am currently brainstorming ideas for a new RIA that I am planing to make. In the RIA there would be many different sections which do different things. Some of these sections would require data from other sections and some sections can sit on there own. Knowing that this RIA is meant to

[GENERAL] deadlock error messages

2008-03-21 Thread dan chak
When there's a deadlock detected, the error message recorded in the log prints out the query being aborted, and the process id of the other transaction involved in the deadlock. It would be great if more context was printed for the other query (e.g. the query itself), as opposed to just

[GENERAL] Table size

2008-03-21 Thread lak
I have two questions. How can I enter comments into a table? Where the comments are stored? In psql How can I know the size of a single table? If know pls replay. Thanks i advance -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Cast character to boolean

2008-03-21 Thread Gordon
I'm currently refactoring a database that somebody else designed. When the database was designed he used character columns with a length of 1 char to represent some values that really should have been represented as booleans. He used 'y' for true and 'n' for false. I want to cast these columns

Re: [GENERAL] Cast character to boolean

2008-03-21 Thread elbacon
On Mar 18, 9:18 am, Gordon [EMAIL PROTECTED] wrote: I'm currently refactoring a database that somebody else designed. When the database was designed he used character columns with a length of 1 char to represent some values that really should have been represented as booleans. He used 'y' for

Re: [GENERAL] Cast character to boolean

2008-03-21 Thread Gordon
On Mar 19, 5:52 pm, [EMAIL PROTECTED] wrote: On Mar 18, 9:18 am, Gordon [EMAIL PROTECTED] wrote: I'm currently refactoring a database that somebody else designed. When the database was designed he used character columns with a length of 1 char to represent some values that really should

[GENERAL] ecpg program getting stuck

2008-03-21 Thread Steve Clark
Hello List I have a program that worked fine in 7.4.19. I am in process of upgrading to 8.3.1 and my program runs for a while and then hangs. I used gdb to attach to the process and it shows the following backtrace which shows it going into the libpq library and getting stuck. Anybody have any

[GENERAL] Running function automatically on (unclean) disconnect

2008-03-21 Thread Stumo
Hi all. I'd like to get a function to run automatically on the server when a postgresql client disconnects (either all disconnections, or just unclean ones). This is to do some cleanup that can't be done with transactions easily from what I can tell. Is it possible? To give you an idea of why I

Re: [GENERAL] Cast character to boolean

2008-03-21 Thread Roberts, Jon
A case statement will work just fine: select case when sub.col1 = 'y' then true else false end as col1_boolean, sub.col1 from (select cast('y' as varchar) as col1) sub Jon -Original Message- From: [EMAIL PROTECTED] [mailto:pgsql-general- [EMAIL PROTECTED] On Behalf Of Gordon Sent:

Re: [GENERAL] Table size

2008-03-21 Thread Pavan Deolasee
On Fri, Mar 21, 2008 at 3:03 PM, lak [EMAIL PROTECTED] wrote: I have two questions. How can I enter comments into a table? Where the comments are stored? What do you mean by comments in a table ? In psql How can I know the size of a single table? Select pg_relation_size('mytable');

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
- Is there a way to turn it back to the old behaviour with a warning going to the logs? No. - Is there a way to get v8.2.x to warn on the dubious casts so we can tighten the application side while on v8.2? Seems to me the easiest way would be to try it out on an 8.3

Re: [GENERAL] ecpg program getting stuck

2008-03-21 Thread Tom Lane
Steve Clark [EMAIL PROTECTED] writes: I have a program that worked fine in 7.4.19. I am in process of upgrading to 8.3.1 and my program runs for a while and then hangs. I used gdb to attach to the process and it shows the following backtrace which shows it going into the libpq library and

[GENERAL] MySQL to Postgres question

2008-03-21 Thread Edward Blake
The table I have in MySQL is similar to below: 0 SET FOREIGN_KEY_CHECKS=0; 1 CREATE TABLE products ( 2 product_id integer(11) not null auto_increment, 3 product_name varchar(255) not null, 4 product_descrition varchar(255) not null, 5 class_id integer(11) not null, 6

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Mar 2008 12:15:05 -0400 Edward Blake [EMAIL PROTECTED] wrote: When I try and rewrite it as a Postgres statement (below), it fails at line 9. 0 SET CONSTRAINTS ALL DEFERRED; 1 CREATE TABLE products ( 2 product_id serial[11] not

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Rodrigo Gonzalez
Edward Blake escribió: The table I have in MySQL is similar to below: 0 SET FOREIGN_KEY_CHECKS=0; 1 CREATE TABLE products ( 2 product_id integer(11) not null auto_increment, 3 product_name varchar(255) not null, 4 product_descrition varchar(255) not null, 5 class_id

Re: [GENERAL] Table size

2008-03-21 Thread Erik Jones
On Mar 21, 2008, at 4:33 AM, lak wrote: I have two questions. How can I enter comments into a table? Where the comments are stored? Comments are created with the COMMENT sql command and, in pg, are stored in pg_description. In psql How can I know the size of a single table?

Re: [GENERAL] Table size

2008-03-21 Thread Craig Ringer
lak wrote: I have two questions. How can I enter comments into a table? Where the comments are stored? Assuming you want comments on the table schema definitions, use COMMENT ON. CREATE TABLE sometable ( -- definition ); COMMENT ON TABLE sometable IS This is a table; If that's not what

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Andreas 'ads' Scherbaum
Hello, On Fri, 21 Mar 2008 12:15:05 -0400 Edward Blake wrote: 9 KEY class_id (class_id), 10 KEY subclass_id (subclass_id), 11 KEY department_id (department_id) this should create an index, or? You want to do this later, after table creation. Kind regards --

Re: [GENERAL] Table size

2008-03-21 Thread Shane Ambler
Pavan Deolasee wrote: On Fri, Mar 21, 2008 at 3:03 PM, lak [EMAIL PROTECTED] wrote: I have two questions. How can I enter comments into a table? Where the comments are stored? What do you mean by comments in a table ? I think what you are referring to is detailed in

Re: [GENERAL] deadlock error messages

2008-03-21 Thread Craig Ringer
dan chak wrote: What would be really great would be to know what the other query is, as opposed to just the pid (not sure from this output if it's 4483 or 29245). Also not sure if this is the right list for this. But potentially someone on here may have a good tip on debugging deadlocking?

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Tom Lane
Edward Blake [EMAIL PROTECTED] writes: When I try and rewrite it as a Postgres statement (below), it fails at line 9. 0 SET CONSTRAINTS ALL DEFERRED; I don't think that does the same thing as mysql's foreign_key_checks = 0. 2 product_id serial[11] not null, This is trying to create

Re: [GENERAL] ecpg program getting stuck

2008-03-21 Thread Steve Clark
Tom Lane wrote: Steve Clark [EMAIL PROTECTED] writes: I have a program that worked fine in 7.4.19. I am in process of upgrading to 8.3.1 and my program runs for a while and then hangs. I used gdb to attach to the process and it shows the following backtrace which shows it going into the

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Justin
Edward Blake wrote: The table I have in MySQL is similar to below: 0 SET FOREIGN_KEY_CHECKS=0; 1 CREATE TABLE products ( 2 product_id integer(11) not null auto_increment, 3 product_name varchar(255) not null, 4 product_descrition varchar(255) not null, 5 class_id

Re: [GENERAL] Table size

2008-03-21 Thread Andreas Kretschmer
Pavan Deolasee [EMAIL PROTECTED] schrieb: On Fri, Mar 21, 2008 at 3:03 PM, lak [EMAIL PROTECTED] wrote: I have two questions. How can I enter comments into a table? Where the comments are stored? What do you mean by comments in a table ? Comments on a table or a column or on other

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Tom Lane
Anton Melser [EMAIL PROTECTED] writes: ... But it is COMPLETELY out of the question to redo the db abstraction layer, and without these implicit casts that is what will be needed. Is there REALLY no way to reenable it?

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Justin
Joshua D. Drake wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Mar 2008 12:38:49 -0500 Justin [EMAIL PROTECTED] wrote: Any ideas? Another way to do auto increment fields is create your own sequences. I would not suggest that. Why

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Mar 2008 12:38:49 -0500 Justin [EMAIL PROTECTED] wrote: Any ideas? Another way to do auto increment fields is create your own sequences. I would not suggest that. Sincerely, Joshua D. Drake - -- The PostgreSQL Company since 1997:

Re: [GENERAL] Table size

2008-03-21 Thread Pavan Deolasee
On Fri, Mar 21, 2008 at 10:12 PM, Andreas Kretschmer [EMAIL PROTECTED] wrote: Comments on objects can set by: comment on ... is 'comment'; Oh cool.. I did not such facility exists. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-general

Re: [GENERAL] Table size

2008-03-21 Thread Pavan Deolasee
On Fri, Mar 21, 2008 at 10:25 PM, Pavan Deolasee [EMAIL PROTECTED] wrote: Oh cool.. I did not such facility exists. I meant, I did not know such facility exists Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-general mailing list

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Mar 2008 12:47:38 -0500 Justin [EMAIL PROTECTED] wrote: Why I am not sure about 8.3 but certainly earlier releases of PostgreSQL would have specific dependency issues when a sequence was applied to a a column after the fact,

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
On 21/03/2008, Tom Lane [EMAIL PROTECTED] wrote: Anton Melser [EMAIL PROTECTED] writes: ... But it is COMPLETELY out of the question to redo the db abstraction layer, and without these implicit casts that is what will be needed. Is there REALLY no way to reenable it?

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Justin
Joshua D. Drake wrote: I am not sure about 8.3 but certainly earlier releases of PostgreSQL would have specific dependency issues when a sequence was applied to a a column after the fact, versus using the serial or bigserial psuedo-types. Sincerely, Joshua D. Drake - -- The PostgreSQL

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Alban Hertroys
On Mar 21, 2008, at 5:58 PM, Anton Melser wrote: Tom the Champion strikes again! Cheers Anton I have the suspicion that his mother is named Lois, his father is unknown and he has a sensitivity to Kryptonite. But that's just speculation of course... Alban Hertroys -- If you can't see

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Mar 2008 18:13:27 +0100 Alban Hertroys [EMAIL PROTECTED] wrote: On Mar 21, 2008, at 5:58 PM, Anton Melser wrote: Tom the Champion strikes again! Cheers Anton I have the suspicion that his mother is named Lois, his father is

Re: [GENERAL] PGSQL database size question

2008-03-21 Thread Shane Ambler
Dan99 wrote: Hi, I am currently brainstorming ideas for a new RIA that I am planing to make. In the RIA there would be many different sections which do different things. Some of these sections would require data from other sections and some sections can sit on there own. Knowing that this

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread John Smith
On Fri, Mar 21, 2008 at 10:17 AM, Colin Wetherbee [EMAIL PROTECTED] wrote: John Smith wrote: On Thu, Mar 20, 2008 at 2:16 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: Please don't cross-post, especially since nobody on the PostGIS mailing list answered your previous question. please

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Tom Lane
Joshua D. Drake [EMAIL PROTECTED] writes: Why I am not sure about 8.3 but certainly earlier releases of PostgreSQL would have specific dependency issues when a sequence was applied to a a column after the fact, versus using the serial or bigserial psuedo-types. As of (I think) 8.2, you

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Anton Melser
I have the suspicion that his mother is named Lois, his father is unknown and he has a sensitivity to Kryptonite. But that's just speculation of course... Alban Hertroys Superman married Lois, I hope that isn't his Mom's name. I got that he was the *son* of Superman... and

Re: [GENERAL] Table size

2008-03-21 Thread Webb Sprague
I meant, I did not know such facility exists When you use pgautodoc, it automatically grabs those comments and puts them in the web page it crreates... more coolness! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] Cast character to boolean

2008-03-21 Thread Edmund.Bacon
Roberts, Jon wrote: A case statement will work just fine: select case when sub.col1 = 'y' then true else false end as col1_boolean, sub.col1 from (select cast('y' as varchar) as col1) sub Be aware of the danger here. What happens if col1 is NULL? -- Sent via pgsql-general mailing list

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Adam Rich
I am not sure about 8.3 but certainly earlier releases of PostgreSQL would have specific dependency issues when a sequence was applied to a a column after the fact, versus using the serial or bigserial psuedo-types. I'd like to point out that using pg_dump does in fact apply sequences to

[GENERAL] begin-end blocks in psql

2008-03-21 Thread Gauthier, Dave
How do you do a simple begin-end statement block inside of a psql session? For Example, I want to... - begin - declare a variable x to be an integer. Set it = 5 - declare s to be a varchar(8). Set it to foo - insert into mytable

Re: [GENERAL] 8.3.0 upgrade

2008-03-21 Thread Adam Rich
Pick your OS/Arch from this list, and click to it: http://yum.pgsqlrpms.org/rpmchart.php Then click to C at the top, and download the compat package. Devrim, I clicked on my OS (RHEL/CentOS 4 - x86) Then on C as you said, But the RPM list still only contains the compat-postgresql-libs-3-2

Re: [GENERAL] Client-requested cast mode to emulate Pg8.2 on v8.3

2008-03-21 Thread Tom Lane
Anton Melser [EMAIL PROTECTED] writes: Anyway, maybe I spoke too soon :-(. ERROR: operator is not unique: integer || unknown I did, of course, not follow the instructions and just blinding applied them all, but from reading them it doesn't look like the issue here. Does this error mean

Re: [GENERAL] 8.3.0 upgrade

2008-03-21 Thread Devrim GÜNDÜZ
Hi, On Fri, 2008-03-21 at 14:13 -0500, Adam Rich wrote: I clicked on my OS (RHEL/CentOS 4 - x86) Then on C as you said, But the RPM list still only contains the compat-postgresql-libs-3-2 package, when I'm looking for compat-postgresql-libs-4-2 No, you need compat-3, not compat-4. For

Re: [GENERAL] 8.3.0 upgrade

2008-03-21 Thread Adam Rich
No, you need compat-3, not compat-4. For example: [EMAIL PROTECTED] ~]# yum install php-pgsql snip -- Processing Dependency: libpq.so.3 for package: php-pgsql I have applications that depend on libpq.so.4 Where do I get that, if not compat-postgresql-libs-4-2 ?? -- Sent via pgsql-general

Re: [GENERAL] begin-end blocks in psql

2008-03-21 Thread Rodrigo E. De León Plicet
On 3/21/08, Gauthier, Dave [EMAIL PROTECTED] wrote: I can do it in a formal declaration of a procedure, and then execute the procedure. But is there a less formal way? No. There are no anonymous blocks in PostgreSQL. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] 8.3.0 upgrade

2008-03-21 Thread Devrim GÜNDÜZ
Hi, On Fri, 2008-03-21 at 14:37 -0500, Adam Rich wrote: I have applications that depend on libpq.so.4 Where do I get that, if not compat-postgresql-libs-4-2 ?? I'll send you instructions for how to build custom compat package. Regards, -- Devrim GÜNDÜZ , RHCE PostgreSQL Replication,

[GENERAL] --enable-thread-safety bug

2008-03-21 Thread Steve Clark
Hello List, I am running 8.3.1 on FreeBSD 6.2 patch-7. The ports for Freebsd turn on --enable-thread-safety during configure of pg. When running my app after some time I have been getting a core dump - sig 11. #0 0x28333b96 in memcpy () from /lib/libc.so.6 (gdb) bt #0 0x28333b96 in

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread Andrej Ricnik-Bay
On 22/03/2008, John Smith [EMAIL PROTECTED] wrote: please don't cross-post my cross-post. if i wanted to post it to the postgresql list, i would have ;) That seems to be quite a silly request, considering you were asking for assistance on public lists. no seriously! if i wanted to

Re: [GENERAL] MySQL to Postgres question

2008-03-21 Thread Paul Boddie
On 21 Mar, 17:15, [EMAIL PROTECTED] (Edward Blake) wrote: When I try and rewrite it as a Postgres statement (below), it fails at line 9. 0 SET CONSTRAINTS ALL DEFERRED; 1 CREATE TABLE products ( 2 product_id serial[11] not null, 3 product_name varchar[255] not null, 4

[GENERAL] MySQL to Postgres question

2008-03-21 Thread Edward Blake
The table I have in MySQL is similar to below: 0 SET FOREIGN_KEY_CHECKS=0; 1 CREATE TABLE products ( 2 product_id integer(11) not null auto_increment, 3 product_name varchar(255) not null, 4 product_descrition varchar(255) not null, 5 class_id integer(11) not null, 6

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Markus Wollny
Hi! Just some more info, hoping that it helps with a diagnosis: 1: datname (typeid = 19, len = 64, typmod = -1, byval = f) 2: age (typeid = 23, len = 4, typmod = -1, byval = t) 3: datfrozenxid(typeid = 28, len = 4, typmod = -1, byval = t) 1:

[GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Markus Wollny
Hi! My database cluster has just stopped working. I get the following message: psql: FATAL: Datenbank nimmt keine Befehle an, um Datenverlust in Datenbank »postgres« wegen Transaktionsnummernüberlauf zu vermeiden TIP: Halten Sie den Postmaster an und verwenden Sie ein Standalone-Backend, um

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Mar 2008 21:50:57 +0100 Markus Wollny [EMAIL PROTECTED] wrote: That's what I just did, but the problem persists. Whenever I issue a 'vacuum', the number of transactions simply decreases. This is PostgreSQL 8.2.4 on

Re: [GENERAL] [postgis-users] how many min. floating-points?

2008-03-21 Thread John Smith
On Fri, Mar 21, 2008 at 4:24 PM, Andrej Ricnik-Bay [EMAIL PROTECTED] wrote: On 22/03/2008, John Smith [EMAIL PROTECTED] wrote: please don't cross-post my cross-post. if i wanted to post it to the postgresql list, i would have ;) That seems to be quite a silly request, considering

Re: [GENERAL] --enable-thread-safety bug

2008-03-21 Thread Tom Lane
Steve Clark [EMAIL PROTECTED] writes: The return from malloc should be checked to make sure it succeeds - right??? Probably, but what do you expect the code to do if it doesn't succeed? This function seems not to have any defined error-return convention. regards, tom

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Andreas 'ads' Scherbaum
Hello, On Fri, 21 Mar 2008 21:50:57 +0100 Markus Wollny wrote: My database cluster has just stopped working. I get the following message: psql: FATAL: Datenbank nimmt keine Befehle an, um Datenverlust in Datenbank »postgres« wegen Transaktionsnummernüberlauf zu vermeiden TIP: Halten Sie

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Tom Lane
Markus Wollny [EMAIL PROTECTED] writes: Just some more info, hoping that it helps with a diagnosis: 1: datname (typeid = 19, len = 64, typmod = -1, byval = f) 2: age (typeid = 23, len = 4, typmod = -1, byval = t) 3: datfrozenxid(typeid = 28, len = 4, typmod =

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Markus Wollny
Hi! Sorry for the quick updates to my own messages, but I didn't want to lean back and wait - so I took to more aggressive measures. All my other databases in this cluster are fine - and the 'postgres' database doesn't seem to do anything really useful except being the default database. I

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Markus Wollny
Hi! Thanks for all the quick replies :) Tom Lane wrote: Markus Wollny [EMAIL PROTECTED] writes: Just some more info, hoping that it helps with a diagnosis: 1: datname (typeid = 19, len = 64, typmod = -1, byval = f) 2: age (typeid = 23, len = 4, typmod = -1, byval = t)

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Tom Lane
Markus Wollny [EMAIL PROTECTED] writes: Sorry for the quick updates to my own messages, but I didn't want to lean back and wait - so I took to more aggressive measures. All my other databases in this cluster are fine - and the 'postgres' database doesn't seem to do anything really useful

[GENERAL] C function and enum types parameters

2008-03-21 Thread Edoardo Panfili
I use a C function in my database from 2002, all goes well also with postgresql 8.3 but with 8.3.1 it no longer works, the problem is with this line: text *hibrid = (PG_ARGISNULL( 0) || VARSIZE(PG_GETARG_TEXT_P( 0))==VARHDRSZ ?NULL:PG_GETARG_TEXT_P(0)); the argument number 0 is an enum

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Markus Wollny
Andreas 'ads' Scherbaum wrote: Hello, First of all, it would help you and most of the readers on this list, if you have the error messages in english. There is a german mailinglist too, if you want to ask in german. Sorry, I tried to describe the issue as best as I could and included the

Re: [GENERAL] Transaction wraparound problem with database postgres

2008-03-21 Thread Markus Wollny
Tom Lane wrote: Markus Wollny [EMAIL PROTECTED] writes: I'd still like to find out what exactly happened here so I can prevent the same from happening again in the future. Me too. It would seem that something did a vacuum of postgres with a strange choice of xid cutoff, but I can't think

[GENERAL] Postgresql partitioning

2008-03-21 Thread Ram Ravichandran
Hey, Suppose I have a table with the following fields: CREATE TABLE distributors ( id DECIMAL(3) PRIMARY KEY, nameVARCHAR(40), status INTEGER ); I would ike to partition this table based on status which can be [0,1,2,3,4]. I was wondering if the records can change their

Re: [GENERAL] Postgresql partitioning

2008-03-21 Thread Erik Jones
On Mar 21, 2008, at 7:15 PM, Ram Ravichandran wrote: Hey, Suppose I have a table with the following fields: CREATE TABLE distributors ( id DECIMAL(3) PRIMARY KEY, nameVARCHAR(40), status INTEGER ); I would ike to partition this table based on status which can be

[GENERAL] Trigger transactions

2008-03-21 Thread Postgres User
if a function includes this SQL: Update Table1 Set field_1 = 'ab'; Insert Table2(field_2) VALUES('cd'); and I create an update trigger on Table1: Create Trigger Table1_Update AFTER Update On Table1 FOR EACH ROW: Select * From Table2 will the Select statement in the trigger see

Re: [GENERAL] Trigger transactions

2008-03-21 Thread Postgres User
Question answered- needed to move Insert statement before Update in main function. On Fri, Mar 21, 2008 at 6:42 PM, Postgres User [EMAIL PROTECTED] wrote: if a function includes this SQL: Update Table1 Set field_1 = 'ab'; Insert Table2(field_2) VALUES('cd'); and I create an update

Re: [GENERAL] Postgresql partitioning

2008-03-21 Thread Ram Ravichandran
Thanks for the quick response. And I assume that primary key uniqueness is not tested across tables. Right? Thanks, Ram On Fri, Mar 21, 2008 at 8:59 PM, Erik Jones [EMAIL PROTECTED] wrote: On Mar 21, 2008, at 7:15 PM, Ram Ravichandran wrote: Hey, Suppose I have a table with the

[GENERAL] Installing on Windows without using msi Installer

2008-03-21 Thread Jeff Williams
I would like to install PostgreSQL manually as part of my applications install using InnoSetup. Is there anywhere the steps required to do this and if so where would I find them? Many thanks Jeff -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your