Re: [GENERAL] How to access a table from one database to another database

2006-07-14 Thread A. Kretschmer
am 15.07.2006, um 10:26:55 +0530 mailte VivekanandaSwamy R. folgendes: > Now i am in PAO database..now i want access table 'activity' in schema > 'cas' in CAS database. > How it is posible. > ... > How access table from one server to another server? 08:02 < akretschmer> ??dblink 08:02 < rtfm_ple

Re: [GENERAL] How to access a table from one database to another database

2006-07-14 Thread Gregory S. Williamson
Possible dblink, in the ./contrib directory would help ? I have never had to use it but it seems like it might be what you need. HTH, Greg Williamson DBA GlobeXplorer LLC -Original Message- From: [EMAIL PROTECTED] on behalf of VivekanandaSwamy R. Sent: Fri 7/14/2006 9:56 PM To:

Re: [GENERAL] How to access a table from one database to another

2006-07-14 Thread Tony Caduto
VivekanandaSwamy R. wrote: Hai all, I have 2 databases namee PAO and CAS. PAO contains 3 schemas named Public,pao,sts CAS contains 4 schemas named Public,cao,sts,reports Now i am in PAO database..now i want access table 'activity' in schema 'cas' in CAS database. How it is posible. 2nd t

Re: [GENERAL] How to access a table from one database to another

2006-07-14 Thread John Purser
On Sat, 15 Jul 2006 10:26:55 +0530 "VivekanandaSwamy R." <[EMAIL PROTECTED]> wrote: > > > Hai all, > I have 2 databases namee PAO and CAS. > PAO contains 3 schemas named Public,pao,sts > CAS contains 4 schemas named Public,cao,sts,reports > > Now i am in PAO database..now i want access table

[GENERAL] How to access a table from one database to another database

2006-07-14 Thread VivekanandaSwamy R.
  Hai all, I have 2 databases namee PAO and CAS. PAO contains 3 schemas named Public,pao,sts CAS contains 4 schemas named Public,cao,sts,reports   Now  i am in PAO database..now i want access table 'activity' in schema 'cas' in CAS database. How it is posible.   2nd thing is...   i have 2

Re: [GENERAL] apparent wraparound

2006-07-14 Thread Gregory S. Williamson
Reece -- The "number of slots needed exceeds" messages are telling you that the current FSM (Free Space Map) does not have enough space allocated to track all of the old tuples that are to be reused. I suspect that having such a situation would effect the wraparound issue, since you'd have "dea

Re: [GENERAL] apparent wraparound

2006-07-14 Thread Reece Hart
Tom Lane wrote: > I'd ask you the same question I asked Thomas: do you continue to get those > log messages > during subsequent checkpoints? No, I don't. The error did not reappear during ~2h of continuous inserts since my report, didn't reappear after a forced checkpoint (i.e., via psql), and d

Re: [GENERAL] Dynamic table with variable number of columns

2006-07-14 Thread Bruno Wolff III
On Wed, Jul 12, 2006 at 13:38:34 -0700, [EMAIL PROTECTED] wrote: > Hi, > Thanks again. > One more question. Will crosstab function work if i will not know the > number/names of columns before hand? Or I need to supply colum > headings? I checked a bit into this, and the actual contrib name is

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Sergio Duran
Ok, all the suggestions were good.I think I'll stick with Marcin Mank's query for now, I'll also try to work further with Richard Broersma's query later.Thank you guys, you were really helpful. On 7/14/06, Marcin Mank <[EMAIL PROTECTED]> wrote: - Original Message -From: "Sergio Duran" <[EMA

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Marcin Mank
- Original Message - From: "Sergio Duran" <[EMAIL PROTECTED]> To: Sent: Thursday, July 13, 2006 9:20 PM Subject: [GENERAL] I need help creating a query > Hello, > > I need a little help creating a query, I have two tables, worker and > position, for simplicity sake worker only has its

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Sergio Duran
This is what I did, I used plpgsql,create or replace function first_accum(anyelement, anyelement) returns anyelement as $$BEGIN   IF $1 IS NOT NULL THEN return $1;   ELSE return $2;   END IF; END' language plpgsql; then I created the aggregateCREATE AGGREGATE first(sfunc = first_accum, basetype = a

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Richard Broersma Jr
> create table worker( > name varchar(50), > position varchar(50), > startdate date, > salary numeric(9,2)); > insert into worker values ('Jon', 'boss', '2001-01-1', 1000.00); > insert into worker values ('Peter', 'cleaning', '2002-01-01', 100.00); > insert into worker values ('Pet

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Q
On 15/07/2006, at 2:07 AM, Sergio Duran wrote:How about if we make it simpler, only 1 tablecreate table worker(    name varchar(50),    position varchar(50),    startdate date,    salary numeric(9,2));insert into worker values ('Jon', 'boss', '2001-01-1', 1000.00);insert into worker values ('Peter'

Re: [GENERAL] cant connect to the database, even after doing start

2006-07-14 Thread Scott Marlowe
On Fri, 2006-07-14 at 02:48, surabhi.ahuja wrote: > this is what is happening > > stop(){ > echo "Stopping ${NAME} service: " > if [ "`uname`" = "Linux" ]; then >/bin/sh -c "$PGCTL stop -D $PGDATA -s -m fast" > /dev/null > 2>&1 > fi > ret=$? > i

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Sergio Duran
How about if we make it simpler, only 1 tablecreate table worker(    name varchar(50),    position varchar(50),    startdate date,    salary numeric(9,2));insert into worker values ('Jon', 'boss', '2001-01-1', 1000.00);insert into worker values ('Peter', 'cleaning', '2002-01-01', 100.00);insert in

Re: [GENERAL] I need help creating a query

2006-07-14 Thread Sergio Duran
Nice, Richard, but you use max(startdate), how about the salary? i cant use max(salary) how about if he got a pay cut?My current solution is to write the nested query on the field list, like SELECT worker.*,   (select salary FROM position where worker_id=worker.worker_id and fecha<='2006

Re: [GENERAL] apparent wraparound

2006-07-14 Thread Tom Lane
Reece Hart <[EMAIL PROTECTED]> writes: > After a system crash, postgresql 8.1.4 restarted but reported that I > have an apparent wraparound: > ... > 2006-07-13 14:03:40 PDT [10092] LOG: next MultiXactId: 5475264; next > MultiXactOffset: 13765525 > ... > 2006-07-13 14:03:40 PDT [10092] LOG: coul

Re: [GENERAL] Q: Table scans on set difference

2006-07-14 Thread Tom Lane
Alban Hertroys <[EMAIL PROTECTED]> writes: > G. Ralph Kuntz, MD wrote: >> explain select file_name from encounter_properties_table where file_name not >> in (select filename from xfiles); > What about: > explain select file_name from encounter_properties_table > where not exists ( > select f

Re: [GENERAL] Timestamp vs timestamptz

2006-07-14 Thread Florian Weimer
* Tom Lane: > Florian Weimer <[EMAIL PROTECTED]> writes: >> * Agent M.: >>> timestamp with time zone does not record the timezone you inserted it >>> with- it simply stores the GMT version and converts to whatever >>> timezone you like on demand. > >> Are you sure? This behavior is not documented

Re: [GENERAL] Is there a way to run tables in RAM?

2006-07-14 Thread Merlin Moncure
On 13 Jul 2006 14:32:42 -0700, Karen Hill <[EMAIL PROTECTED]> wrote: Roy Souther wrote: > I would like to know if there is anyway to move a section of some tables > into RAM to work on them. > > I have large table, about 700MB or so and growing. I also have a bizarre > collection of queries that

Antw: Re: [GENERAL] Problem with archive_command

2006-07-14 Thread Christian Rengstl
i made a pg_dump. Maybe it would help to delete the files in the pg_xlog/archive_status directory...anyway the server just has a sandbox status so far. >>> "Merlin Moncure" <[EMAIL PROTECTED]> 14.07.06 17.18 Uhr >>> On 7/14/06, Christian Rengstl <[EMAIL PROTECTED]> wrote: > Hi list, > > well now

Re: Antw: [GENERAL] Problem with archive_command

2006-07-14 Thread Martijn van Oosterhout
On Fri, Jul 14, 2006 at 03:22:43PM +0200, Christian Rengstl wrote: > Hi list, > > well now i know why it doesn't work. As the copy command did not work > for a while the wal-files where gathering like mad and, as a beginner, i > thought in order to clean up some disk space i should delete them. We

Re: [GENERAL] databases hidden in phppgadmin

2006-07-14 Thread Tom Lane
"Darren" <[EMAIL PROTECTED]> writes: > When I login to phppgadmin, the list of databases does not include any > databases that are owned by a 'group' (i.e. a role with NOLOGIN set). I'm betting that phppgadmin is using something like an inner join of pg_database and pg_user to produce its display.

Re: [GENERAL] Problem with archive_command

2006-07-14 Thread Merlin Moncure
On 7/14/06, Christian Rengstl <[EMAIL PROTECTED]> wrote: Hi list, well now i know why it doesn't work. As the copy command did not work for a while the wal-files where gathering like mad and, as a beginner, i thought in order to clean up some disk space i should delete them. Well, that was proba

Re: [GENERAL] Timestamp vs timestamptz

2006-07-14 Thread Tom Lane
Florian Weimer <[EMAIL PROTECTED]> writes: > * Agent M.: >> timestamp with time zone does not record the timezone you inserted it >> with- it simply stores the GMT version and converts to whatever >> timezone you like on demand. > Are you sure? This behavior is not documented, and I can't reprodu

Re: [GENERAL] Q: Table scans on set difference

2006-07-14 Thread Alban Hertroys
G. Ralph Kuntz, MD wrote: What's happening here? I have two tables, encounter_properties_table with about 10 rows and xfiles with about 50 rows. The structures of these tables is as follows: file_name | character varying(255) | Table "public.xfiles" Column

Re: [GENERAL] Performance problem with query

2006-07-14 Thread Merlin Moncure
On 7/14/06, Christian Rengstl <[EMAIL PROTECTED]> wrote: Hi, somehow my reply yesterday got lost, but nevertheless here comes the explain analyze again. It's the explain of the operation that causes this huge performance discrepancy. Unfortunately i had to perform the explain analyze with an emp

Antw: [GENERAL] Problem with archive_command

2006-07-14 Thread Christian Rengstl
Hi list, well now i know why it doesn't work. As the copy command did not work for a while the wal-files where gathering like mad and, as a beginner, i thought in order to clean up some disk space i should delete them. Well, that was probably the most stupid thing to do, because now pgsql tries to

Re: [GENERAL] table replication, without master-slave setup

2006-07-14 Thread Shoaib Mir
You can use 'pgpool' (http://pgpool.projects.postgresql.org/) for that purpose.Shoaib MirEnterpriseDBOn 7/14/06, Alexander Bluem <[EMAIL PROTECTED]> wrote: Hello,I have a certain setup, so that two computers are running nearlyidentical databases: identical setup, tables, users and permissions,only

[GENERAL] apparent wraparound

2006-07-14 Thread Reece Hart
After a system crash, postgresql 8.1.4 restarted but reported that I have an apparent wraparound: 2006-07-13 14:03:40 PDT [10092] LOG: database system was interrupted at 2006-07-13 13:22:19 PDT 2006-07-13 14:03:40 PDT [10092] LOG: checkpoint record is at 1DD/26283E18 2006-07-13 14:03:40 PDT [10

[GENERAL] Windows Local Security Policy Rights?

2006-07-14 Thread Leonard, Arah
    What are the exact specific Windows Local Security Policy Rights REAUIRED for the user created to run the PostgreSQL 8 service?  And what are the exact specific rights that this user absolutely CANNOT have?  Thanks in advance.   Sincerely, Arah Leonard  

[GENERAL] Q: Table scans on set difference

2006-07-14 Thread G. Ralph Kuntz, MD
What's happening here? I have two tables, encounter_properties_table with about 10 rows and xfiles with about 50 rows. The structures of these tables is as follows: Table "public.encounter_properties_table" Column | Type | Modifiers +-

Re: [GENERAL] Physical block structure in PostgreSQL

2006-07-14 Thread Patrick TJ McPhee
In article <[EMAIL PROTECTED]>, Spendius <[EMAIL PROTECTED]> wrote: % (I read the pages % http://www.postgresql.org/docs/8.1/interactive/storage.html % and saw things regarding files and "pages" that are "usually 8k"-big % etc. but % saw no further info about "blocks" - they speak of "items" here:

[GENERAL] databases hidden in phppgadmin

2006-07-14 Thread Darren
My apologies if this is not the correct group, but I did not find a 'phppgadmin' specific group. When I login to phppgadmin, the list of databases does not include any databases that are owned by a 'group' (i.e. a role with NOLOGIN set). Databases owned by postgres or any specific user do show up.

Antw: Re: [GENERAL] Performance problem with query

2006-07-14 Thread Christian Rengstl
Hi, somehow my reply yesterday got lost, but nevertheless here comes the explain analyze again. It's the explain of the operation that causes this huge performance discrepancy. Unfortunately i had to perform the explain analyze with an empty temp_table, because after the whole operation is done, i

[GENERAL] How to see function & triggers definition?

2006-07-14 Thread Hiren Gajjar
Hi,      Could anyone help me with this. I want to see the definition of functions & triggres for a perticular table of database. How do I do this? How do I find whether is it Postgres SQL block or implemented in C/C++?   Thanks & Regards,Hiren.

[GENERAL] Problem with archive_command

2006-07-14 Thread Christian Rengstl
Hi list, with the following archive_command (on Windows) archive_command = 'copy %p c:\\Archiv\\DBArchiv\\%f' I constantly have entries like the following in my log file: 2006-07-14 14:26:59 LOG: archive command "copy pg_xlog\000100020037 c:\Archiv\DBArchiv\000100020037" f

Re: [GENERAL] How to read cleartext user password from pgsql database

2006-07-14 Thread Berend Tober
Martijn van Oosterhout wrote: On Fri, Jul 14, 2006 at 03:21:01PM +0400, Eugene Prokopiev wrote: Is it possible to read cleartext user password from pgsql database? In this link http://www.postgresql.org/docs/8.1/interactive/view-pg-user.html explained that password always reads as . Bu

Re: [GENERAL] How to read cleartext user password from pgsql database

2006-07-14 Thread Martijn van Oosterhout
On Fri, Jul 14, 2006 at 03:21:01PM +0400, Eugene Prokopiev wrote: > Hi, > > Is it possible to read cleartext user password from pgsql database? In > this link > http://www.postgresql.org/docs/8.1/interactive/view-pg-user.html > explained that password always reads as . But I need to use

[GENERAL] table replication, without master-slave setup

2006-07-14 Thread Alexander Bluem
Hello, I have a certain setup, so that two computers are running nearly identical databases: identical setup, tables, users and permissions, only the contents differ. Now I'd like to keep them in sync, WITHOUT an extra machine, hence master-slave setup. The problem is, that either one could fail e

[GENERAL] How to read cleartext user password from pgsql database

2006-07-14 Thread Eugene Prokopiev
Hi, Is it possible to read cleartext user password from pgsql database? In this link http://www.postgresql.org/docs/8.1/interactive/view-pg-user.html explained that password always reads as . But I need to use pgsql login/password as authentication info for another service. -- Thank

Re: [GENERAL] Timestamp vs timestamptz

2006-07-14 Thread Antimon
Thanks for the replies, and thanks for mentioning the DST thing. So, i'm going to use tstz. I just don't want my data to be affected by timezone changes and dst etc. I had a game server which had a timer system, when i delay something it was creating an object with timestamp "now + delaytime" and

Re: [GENERAL] Timestamp vs timestamptz

2006-07-14 Thread Martijn van Oosterhout
On Thu, Jul 13, 2006 at 04:35:20PM -0700, Antimon wrote: > Hi, > I'm working on a web project with pgsql, i did use mysql before and > stored epoch in database so i'm not familiar with these datatypes. > > What i wanna ask is, if i don't need to display timestamps in different > timezones, shall i

Re: [GENERAL] cant connect to the database, even after doing start

2006-07-14 Thread surabhi.ahuja
Title: Re: [GENERAL] cant connect to the database, even after doing start this is what is happening   stop(){    echo "Stopping ${NAME} service: "    if [ "`uname`" = "Linux" ]; then   /bin/sh -c "$PGCTL stop -D $PGDATA -s -m fast" > /dev/null 2>&1    fi    ret

Re: [GENERAL] Timestamp vs timestamptz

2006-07-14 Thread Florian Weimer
* Agent M.: > timestamp with time zone does not record the timezone you inserted it > with- it simply stores the GMT version and converts to whatever > timezone you like on demand. Are you sure? This behavior is not documented, and I can't reproduce it with PostgresQL 8.1.4. -- Florian Weimer