[ADMIN] Relationship beween sequences (serial) and tables

2005-09-08 Thread Thusitha Kodikara
Hi,   I use Postgres 7.4.5 on Linux   In many of my tables the primary key is bigserial for which sequences are automatcially generated. Through pg_catalog tables how can I find the relationship petween each table and its corresponding sequence ?   Thanks.   -Thusitha Click here to donate to th

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Adam Witney
On 7/9/05 6:12 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > I wrote >> Adam Witney <[EMAIL PROTECTED]> writes: >>> I think I have found the offending row in measured_bioassay_base... The >>> entry in its toast table looks like this > >>> bugasbase2=# select chunk_id, chunk_seq, length(chunk_data)

Re: [ADMIN] Please help - libpq API

2005-09-08 Thread Guido Barosio
Hi, I think that this is the wrong list for your problem. My suggestions: contact pgsql-hackers or check the lists in the postgresql.org page, you will prolly find one list to suit with this. or irc.freenode.net, join #postgresql . Good boys lurking there, you will have to fight, but help will be

Re: [ADMIN] Relationship beween sequences (serial) and tables

2005-09-08 Thread Michael Fuhr
On Thu, Sep 08, 2005 at 01:03:26AM -0700, Thusitha Kodikara wrote: > In many of my tables the primary key is bigserial for which > sequences are automatcially generated. Through pg_catalog tables > how can I find the relationship petween each table and its corresponding > sequence ? Depending on w

Re: [ADMIN] Please help - libpq API

2005-09-08 Thread Alvaro Herrera
On Wed, Sep 07, 2005 at 11:40:57PM -0700, Pradeepkumar, Pyatalo (IE10) wrote: > I have already posted my query regarding libpq functions and wide character > support. Pls somebody help me. I am using libpq API functions in my C code > to do operations on the database. But the problem I m facing is

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Alvaro Herrera
On Thu, Sep 08, 2005 at 10:32:41AM +0100, Adam Witney wrote: > Unfortunately the pg_filedump you requested gives an error: > > pg_filedump -R 165390 165392 134401986 > > *** > * PostgreSQL File/Block Formatted Dump Utility - Version

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Adam Witney
On 8/9/05 2:38 pm, "Alvaro Herrera" <[EMAIL PROTECTED]> wrote: > On Thu, Sep 08, 2005 at 10:32:41AM +0100, Adam Witney wrote: > >> Unfortunately the pg_filedump you requested gives an error: >> >> pg_filedump -R 165390 165392 134401986 >> >> *

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > Unfortunately the pg_filedump you requested gives an error: > Error: Premature end of file encountered. > (there is a .1 file also for this table, do I have to stick the two together > or something?) Yeah. Each file contains 131072 pages, so the correct p

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > Ah thanks. > pg_filedump-3.0/pg_filedump -R 34318 34320 134401986.1 Could we see this with -i -f options please? At this level of detail there's nothing obviously wrong ... regards, tom lane ---(end of

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Tom Lane
Adam Witney <[EMAIL PROTECTED]> writes: > Here you go > pg_filedump-3.0/pg_filedump -i -f -R 34318 34320 134401986.1 Thanks. What it looks like to me is that block 34320 (really 165392) is data from some other file altogether. It's evidently still Postgres heap data, but instead of having 3

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Adam Witney
On 8/9/05 3:46 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > Adam Witney <[EMAIL PROTECTED]> writes: >> Here you go > >> pg_filedump-3.0/pg_filedump -i -f -R 34318 34320 134401986.1 > > Thanks. What it looks like to me is that block 34320 (really 165392) > is data from some other file altoget

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Alvaro Herrera
On Thu, Sep 08, 2005 at 04:26:16PM +0100, Adam Witney wrote: > On 8/9/05 3:46 pm, "Tom Lane" <[EMAIL PROTECTED]> wrote: > > > Adam Witney <[EMAIL PROTECTED]> writes: > >> Here you go > > > >> pg_filedump-3.0/pg_filedump -i -f -R 34318 34320 134401986.1 > > > > Thanks. What it looks like to

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Adam Witney
> How many columns does that table have? It has 77 columns. INSERTS are always done on both this table and the table that had the toast table error within the same transaction if that matters? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed

Re: [ADMIN] pg_dump error... Follow up

2005-09-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > To Tom: could this be caused by a WAL recovery that wrote a page image > to the wrong table? I guess it is very unlikely because the CRC of the > WAL record would likely not match, but it's an idea. I don't see any reason to think that WAL recovery wou

Re: [ADMIN] Please help - libpq API

2005-09-08 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Wed, Sep 07, 2005 at 11:40:57PM -0700, Pradeepkumar, Pyatalo (IE10) wrote: >> Even if somehow if I convert wchar_t * to char * and provide it to >> Postgres, how will it differentiate between chinese characters and normal >> characters ?? > Please n

Re: [ADMIN] Linking Oracle DB from postgresql

2005-09-08 Thread Jim C. Nasby
DBI-Link (http://pgfoundry.org/projects/dbi-link/) is probably your best bet. There's been some talk of expanding dblink, but nothing's happened on that yet. On Thu, Sep 08, 2005 at 10:37:23AM +0900, [EMAIL PROTECTED] wrote: > Hi, > I am new to pgsql. > At present i ma having Oracle database and u

Re: [HACKERS] [ADMIN] How to determine date / time of last postmaster restart

2005-09-08 Thread Jim C. Nasby
On Wed, Sep 07, 2005 at 09:22:55PM -0400, Tom Lane wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > On Wed, Sep 07, 2005 at 12:38:44AM -0500, Jim C. Nasby wrote: > >> Is it too late to add a function that returns last reset time as well? > >> That would cover all bases and force some less co

[ADMIN] triggers

2005-09-08 Thread Kailash Vyas
hi I have a query regarding triggers. On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another database on postgres sever. how can I do this operation. Thanks in advance, Kailash Vyas

Re: [ADMIN] triggers

2005-09-08 Thread Guido Barosio
http://www.google.co.uk/search?hl=en&q=TRIGGER+%2B+postgresql+%2B+8&meta=   which actually will guide you to:   http://www.postgresql.org/docs/current/static/sql-createtrigger.html   ..that actually is the pgsql man.   rtfm :)   Best wishes, Guido  On 9/8/05, Kailash Vyas <[EMAIL PROTECTED]> wrote:

Re: [ADMIN] triggers

2005-09-08 Thread Stephan Szabo
On Thu, 8 Sep 2005, Kailash Vyas wrote: > hi > > I have a query regarding triggers. > On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another > database on postgres sever. > how can I do this operation. This is tricky, because you probably want to have the same transactional oc

Re: [ADMIN] triggers

2005-09-08 Thread Chris Browne
[EMAIL PROTECTED] (Kailash Vyas) writes: > hi > I have a query regarding triggers. > On INSERT, UPDATE, DELETE I want to fire a trigger to relect it to another > database on postgres sever. > how can I do this operation. > Thanks in advance, > Kailash Vyas If you wish the trigger to result in som

[ADMIN] Stats turned on but not being updated

2005-09-08 Thread adey
Please tell me what I'm missing? My stats Postgres 7.4 parameters are as follows:-   stats_start_collector = truestats_command_string = truestats_block_level = truestats_row_level = truestats_reset_on_server_start = true  After turning all of these on, I restarted Postgres, then ran a table query a

Re: [ADMIN] Stats turned on but not being updated

2005-09-08 Thread Tom Lane
adey <[EMAIL PROTECTED]> writes: > However, since that first test query yesterday (and I've run several since= > =20 > on different tables today - some of them repeated to ensure the buffer=20 > should be populated), the statistics haven't changed. That seems pretty odd. Look in the postmaster l