[GENERAL] Design question about partitioning order information across tables

2009-10-22 Thread Mike Christensen
Hi - I have a fairly simple design question that I'd like some input on. I have a table called "Orders" which, along with various order information, contains an "OrderState" column. OrderState can contain one of the following values: 1 - Order is in preview mode and has not been committed yet.

Re: [GENERAL] Design question about partitioning order information across tables

2009-10-22 Thread Peter Eisentraut
On Thu, 2009-10-22 at 03:13 -0700, Mike Christensen wrote: > It has occurred to me that there might be some advantages of creating > a separate table called "OrderArchive" which would be used to store > order states 3 or 4. This would allow me to get rid of an index on > order state as well as pro

[GENERAL] Incompatible library : Missing Magic Block

2009-10-22 Thread A.Bhattacharya
Hi, I am trying to write a C function (using Postgres external methods) in windows XP and am using Postgres 8.3.7 version and creating a dll using Microsoft Visual Studio 2005. However I have included all the required headers and PG_MODULE_MAGIC in my code. (Please find below the example code

Re: [GENERAL] Incompatible library : Missing Magic Block

2009-10-22 Thread Massa, Harald Armin
Ambarsih, > // add.cpp : Defines the entry point for the DLL application. are you sure that you using the C-Compiler and not the c++ compiler? As much as I know about defaults, that will be a C++ compiled function, which is something totally different then a C compiled function. (and, to my knowl

[GENERAL] FATAL error could not find function "alt_to_mic" in file cyrillic_and_mic.so

2009-10-22 Thread Jayaraman, Rajaram (STSD)
Hi I have compiled PostgreSQL version 8.4.1 on HPUX 11iV3 (HPUX 11.31) on a ia64 hp server BL870c. When I try to start the database it creates the data directory and while initializing it gets till creating conversions and then throws a FATAL error "could not find function "alt_to_mic" in file

[GENERAL] FATAL error "could not find function "alt_to_mic" in file cyrillic_and_mic.so

2009-10-22 Thread Jayaraman, Rajaram (STSD)
Hi I have compiled PostgreSQL version 8.4.1 on HPUX 11iV3 (HPUX 11.31) on a ia64 hp server BL870c. When I try to start the database it creates the data directory and while initializing it gets till creating conversions and then throws a FATAL error "could not find function "alt_to_mic" in file

[GENERAL] FW: Incompatible library : Missing Magic Block

2009-10-22 Thread A.Bhattacharya
One more thing to add here...I am using the Postgres 8.3.7 headers to compile my program and have added PG_MODULE_MAGIC but still error is persisting. From: Bhattacharya, A Sent: Thursday, October 22, 2009 10:46 AM To: 'pgsql-general@postgresql.org' Subj

Re: [GENERAL] auto-filling a field on insert

2009-10-22 Thread semi-ambivalent
On Oct 21, 8:54 pm, da...@fetter.org (David Fetter) wrote: > On Wed, Oct 21, 2009 at 07:17:44PM -0700, semi-ambivalent wrote: > > If I have a table with fields A, B, C and D how could I do something > > such that if I insert values in fields A, B and C field D would be > > auto-filled with the valu

[GENERAL] Incompatible library : Missing Magic Block

2009-10-22 Thread A.Bhattacharya
Hi, I am trying to code Postgres external C function in windows XP and am using Postgres 8.3 version. However I have included all the required things in the code to run (Please find below the example code which I am compiling using MSVC and generating the dll) __

Re: [GENERAL] leak in libpq, getpwuid

2009-10-22 Thread Michael Nacos
just to say I have run into related problems on debian lenny amd64 (postgres 8.3.5, libc-2.7) and centos 5.2 (postgres 8.4.1, libc-2.5) code as simple as this: #include int main() { PGconn *connection = PQconnectdb("user=postgres"); PQfinish(connection); return 0; } gives

[GENERAL] PostgreSQL Conference 2009 Japan : Schedule available and registration open

2009-10-22 Thread Kaori Inaba
PostgreSQL Conference 2009 Japan announcement    22 October 2009, Tokyo The PostgreSQL Conference 2009 Tokyo Executive Committee are proud to announce that the two days programme sessions, JPUG 10th Anniversary Conference, are going to be held on 20th and 21st November, 2009,

Re: [GENERAL] auto-filling a field on insert

2009-10-22 Thread Richard Broersma
On Wed, Oct 21, 2009 at 8:54 PM, semi-ambivalent wrote: > At first blush that looks good but I need an index on that concatted > value and I don't seem to be able to index a field in a view. I'll > check the docs on views to see if I'm missing something. To create an index on a computed value yo

[GENERAL] question about pg_dump

2009-10-22 Thread Scot Kreienkamp
Hi everyone, I have a question about pg_dump backups. Will changes made in the database made during a pg_dump operation be reflected in the dumped datafile? Or is the data the exact dataset that was in the database as of the start of the backup? >From what I understand of the documentatio

Re: [GENERAL] auto-filling a field on insert

2009-10-22 Thread Roderick A. Anderson
semi-ambivalent wrote: On Oct 21, 8:54 pm, da...@fetter.org (David Fetter) wrote: On Wed, Oct 21, 2009 at 07:17:44PM -0700, semi-ambivalent wrote: If I have a table with fields A, B, C and D how could I do something such that if I insert values in fields A, B and C field D would be auto-filled

Re: [GENERAL] FATAL error "could not find function "alt_to_mic" in file cyrillic_and_mic.so

2009-10-22 Thread Tom Lane
"Jayaraman, Rajaram (STSD)" writes: > I have compiled PostgreSQL version 8.4.1 on HPUX 11iV3 (HPUX 11.31) on a ia64 > hp server BL870c. When I try to start the database it creates the data > directory and while initializing it gets till creating conversions and then > throws a FATAL error "coul

Re: [GENERAL] question about pg_dump

2009-10-22 Thread Grzegorz Jaśkiewicz
On Thu, Oct 22, 2009 at 3:42 PM, Scot Kreienkamp wrote: > Hi everyone, > > > > I have a question about pg_dump backups. Will changes made in the database > made during a pg_dump operation be reflected in the dumped datafile? Or is > the data the exact dataset that was in the database as of the

Re: [GENERAL] leak in libpq, getpwuid

2009-10-22 Thread Tom Lane
Michael Nacos writes: > just to say I have run into related problems on debian lenny amd64 (postgres > 8.3.5, libc-2.7) and centos 5.2 (postgres 8.4.1, libc-2.5) This is not a Postgres bug. You can try filing it against glibc, but I wouldn't be too surprised if they tell you it's not worth fixin

Re: [GENERAL] leak in libpq, getpwuid

2009-10-22 Thread Grzegorz Jaśkiewicz
On Thu, Oct 22, 2009 at 3:46 PM, Tom Lane wrote: > Michael Nacos writes: > > just to say I have run into related problems on debian lenny amd64 > (postgres > > 8.3.5, libc-2.7) and centos 5.2 (postgres 8.4.1, libc-2.5) > > This is not a Postgres bug. You can try filing it against glibc, but > I

Re: [GENERAL] leak in libpq, getpwuid

2009-10-22 Thread Michael Nacos
I have just run some tests, the number of lost bytes is always 292, no matter how many connections are opened and closed. I guess it's ok, then. M.

Re: [GENERAL] leak in libpq, getpwuid

2009-10-22 Thread Tom Lane
Michael Nacos writes: > I have just run some tests, the number of lost bytes is always 292, no > matter how many connections are opened and closed. > I guess it's ok, then. Yeah. I suspect the memory is in fact not "leaked", but valgrind is somehow missing the link that points to it. You'd have

[GENERAL] PGDay.EU 2009 - registration deadline extended

2009-10-22 Thread Dave Page
I'm pleased to announce that the registration deadline for PGDay.EU 2009 on November 6th & 7th in Paris has been extended to the 31st October, allowing attendees an extra eight days to benefit from the cheapest pricing. Attendees registering after the 31st October will be charged the 'on the door'

[GENERAL] Problem calling C function in PostgreSQL

2009-10-22 Thread A.Bhattacharya
Hi, I am new to PostgreSQL and could anyone please suggest me any windows based C compiler which will successfully create a dll on windows and which can be callable by PostgreSQL. I am facing a problem with the below code compiled and created dll in MSVC 2005. __

[GENERAL] Getting rid of UNION

2009-10-22 Thread Viktor Rosenfeld
Hi, the following query takes 13 seconds to run vs. 31 milliseconds for an (almost) equivalent query using UNION. The main penalty comes from two nestloops in the plan (http://explain.depesz.com/s/2o). Is this approach feasable and if so, what am I doing wrong? Also, is there a shorter idiom fo

[GENERAL] Right Join Question

2009-10-22 Thread Bierbryer, Andrew
I am trying to solve the following problem. I have a certain column, to_state, that can take a finite set of values. I want to make sure that my query always returns those sets of finite values, even if not all of the values are represented in the results. In essence, I am looking to expand the res

Re: [GENERAL] Reversing flow of WAL shipping

2009-10-22 Thread Yaroslav Tykhiy
Hi David, On 22/10/2009, at 2:52 PM, David Jantzen wrote: I want to run a warm standby scenario by you. I'm pretty sure it'll work, but it's a very large database so even the slightest mistake can mean a major setback. Scenario: Server A is the provider node, shipping WAL files to Server B.

Re: [GENERAL] Right Join Question

2009-10-22 Thread Scott Marlowe
On Thu, Oct 22, 2009 at 12:43 PM, Bierbryer, Andrew wrote: > I am trying to solve the following problem. I have a certain column, > to_state, that can take a finite set of values. I want to make sure that my > query always returns those sets of finite values, even if not all of the > values are re

Re: [GENERAL] question about pg_dump

2009-10-22 Thread Scott Marlowe
2009/10/22 Grzegorz Jaśkiewicz : > > > On Thu, Oct 22, 2009 at 3:42 PM, Scot Kreienkamp > wrote: >> >> Hi everyone, >> >> >> >> I have a question about pg_dump backups.  Will changes made in the >> database made during a pg_dump operation be reflected in the dumped >> datafile?  Or is the data the

Re: [GENERAL] Problem calling C function in PostgreSQL

2009-10-22 Thread Magnus Hagander
2009/10/22 A.Bhattacharya : > Hi, > > I am new to PostgreSQL  and could  anyone please suggest me any windows based > C compiler which will successfully create a dll on windows and which can be > callable by PostgreSQL. > > > I am facing a problem with the below code compiled and created dll in M

[GENERAL] drop view and recreate - for sync

2009-10-22 Thread Sydney Puente
Hello, I have a requirement to pull 2 tables of data from an unreliable db and stash the data in postgres on redhat. Dont imagine the initial load will be be too difficult, gonna use perl DBD to get the data. < 100 000 records in total , 10 -15 fields. needs sync-ing regularly - every 12 hours