Re: [GENERAL] Users and session ids

2003-12-11 Thread Shridhar Daithankar
C G wrote:

Dear All,

I wonder if anyone can advise me with this problem.

1. A user logs into the database (through web, webservice, some other 
piece of software) - connect(user="joe",passwd="blogs")
2. We generate a random session key which will expire in 1 hour. Put 
this in table (user, SessKey, time).
3. Give key to user.
4. User wants to do something else, so passes us the session key.
5. How do we use this session key to log the user into the database, 
i.e. how do we get the username and passwd to enable: 
connect(user="joe",passwd="blogs").
It is involved at multiple steps.

1. Use a connection pool, all connecting as superuser
2. Authenticate user with opening a new connection
3. Store a map of user session key v/s username/userid in application.
4. Use set session authorization after verifying the key.
It could have been good if postgresql could authenticate over an existing 
connection or make set session authorisation accept username/password. But 
anyways.. that is not such a big hassle except for the fact that each 
authorisation costs starting/killing one connection

 HTH

 Shridhar

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


[GENERAL] Storing Snapshot Data

2003-12-11 Thread John Gibson
Hi, all.

I have a table which is continually updated with the latest totals.  I 
would like to take snapshots of some of the data in that table and store 
it in a second table to run statistics on it later.  What might some 
ways of doing this be?

Illustrative (I hope) example using fruit-qty-on-hand at a grocery store:

Fruit_table   {constantly updated by other processes}

CREATE TABLE "fruit_table" (
   "fruit_name"varchar(20),
   "fruit_qty"int4
 );
***TABLE DATA***
fruit name fruit_qty
apple  5
orange8
pear3


monitor_table {stores snapshots of fruit table from time to time}

CREATE TABLE "monitor_table" (
   "monitor_time" timestamp,
   "mon_apples_qty"int4,
   "mon_oranges_qty"int4,
   "mon_pears_qty"int4
);
I got the following to timestamp a single row from the fruit_table and 
put the results into the monitor_table:

insert into monitor_table(monitor_time, mon_apples_qty)
select now(), fruit_table.fruit_qty
where fruit_name = 'apple';
Unfortunately, I am stuck on how to get all three into the monitor table 
with the same timestamp.  Since the times will be relatively long 
between snapshots some type of variables or functions could be used (I 
guess) to store the current time ( curr_time := now(); ) and then run 
the query three times with first an insert and then two updates using 
the variable time stamp on the updates to locate the record to update.

That doesn't sound very elegant to me.  Please help if you have any ideas.  

I am definately a newbie, so forgive me if this is trivial.  Also, if 
another forum would be better for this, I would appreciate a nudge in 
that direction.   :)

...john

---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


Re: [GENERAL] datestyle in postgresql.conf, version 7.4

2003-12-11 Thread Jean-Max Reymond
Oliver Elphick wrote:

On Wed, 2003-12-10 at 23:01, Jean-Max Reymond wrote:
 

I stop the postmaster (/usr/local/pgsql/bin/pg_ctl stop) and restart the 
postmaster (/usr/local/pgsql/bin/pg_ctl  -D /home/local/BasePostgres/ -l 
logfile -o -i start).

I have tried with and without blanks near = (

datestyle='Postgres, European'
and
datestyle = 'Postgres, European'
but not successfull
   

Are you editing the right postgresql.conf file?  It should be in
$PGDATA.
 

Oups, you're right. I'am very confused. I have two repositories (one for 
7.3 and one for 7.4) and it was not the good one!!!
thanks a lot. NOw, it works like a charm

--
Jean-Max Reymond email: [EMAIL PROTECTED] tel: 33 (0)6 16 94 25 11
http://jmreymond.free.fr/Etna2002
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


Re: [GENERAL] Any commercial shopping cart packages using

2003-12-11 Thread Csaba Nagy
Mike,

You could take a look at:
http://www.oscommerce.com/
While it is not written for postgres but for mySql, it has all data base
access abstracted to a single include file, so it (potentially) could be
easy to adapt to postgres.
It is also not a finished project, but I think it's good enough already
for production usage.
Worths a look.

Just my 2c.

Csaba.


On Thu, 2003-12-11 at 03:39, Mike Nolan wrote:
> I may need to move a web store to another hosting facility or rewrite it.
> 
> I will need to be able to tie it to the in-house order entry system 
> (which is/will be in Postgresql) for inventory status information.
> 
> Are there any commercial web store/shopping cart packages or host sites 
> that run under PostgreSQL?  I found one web store package in the pgsql 
> project archives, but it looks like it may need a lot of tinkering to get 
> it working.
> --
> Mike Nolan
> 
> 
> 
> 
> ---(end of broadcast)---
> TIP 9: the planner will ignore your desire to choose an index scan if your
>   joining column's datatypes do not match


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


[GENERAL] ERROR: did not find '}' at end of input node (again)

2003-12-11 Thread Andrei Ivanov

This happend again, but now, postgresql tells me where it happens:

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  did not find '}' at end of 
input node
pg_dump: The command was: select (select usename from pg_user where 
usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding, 
datpath from pg_database where datname = 'dc'
pg_dumpall: pg_dump failed on database "dc", exiting


template1=# select usename from pg_user;
ERROR:  did not find '}' at end of input node


\d pg_user
* QUERY **
SELECT c.oid,
  n.nspname,
  c.relname
FROM pg_catalog.pg_class c
 LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE pg_catalog.pg_table_is_visible(c.oid)
  AND c.relname ~ '^pg_user$'
ORDER BY 2, 3;
**

* QUERY **
SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules
FROM pg_catalog.pg_class WHERE oid = '16683'
**

* QUERY **
SELECT a.attname,
  pg_catalog.format_type(a.atttypid, a.atttypmod),
  (SELECT substring(d.adsrc for 128) FROM pg_catalog.pg_attrdef d
   WHERE d.adrelid = a.attrelid AND d.adnum = a.attnum AND a.atthasdef),
  a.attnotnull, a.attnum
FROM pg_catalog.pg_attribute a
WHERE a.attrelid = '16683' AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
**

* QUERY **
SELECT pg_catalog.pg_get_viewdef('16683'::pg_catalog.oid, true)
**

ERROR:  did not find '}' at end of input node


I think (hope) I can save the data by copying the data on another computer 
and start postgresql there and then dump it (just like I did last time).

The problem is, why does this happen and how can I prevent it ? Maybe this 
is caused by an unproper shutdown of postgresql ?

SELECT VERSION();
 version
--
 PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2 20031022 (Gentoo 
Linux 3.3.2-r2, propolice)


---(end of broadcast)---
TIP 6: Have you searched our list archives?

   http://archives.postgresql.org


[GENERAL] tablespaces in 7.5?

2003-12-11 Thread Brian Maguire
I am curious if tablespaces are going to be seriously targeted for the next version. 
It really opens up new levels of scalability and is a killer feature from an 
administration perspective.

Thanks,

Brian

 

 


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [GENERAL] [NOVICE] PostgreSQL Training

2003-12-11 Thread Chris Travers
Before I begin, I think that most of us agree on the following points:

1:  The PostgreSQL project is not in a position at the moment to bless
any attempt to create an official curriculum or certification.

2:  The idea of patterning PostgreSQL certifications on Microsoft exams
is patently offensive as a paper PostgreSQL Certified DBA could do a
whole lot more damage than a paper MCSE.

3:  We are all for leveraging as many advocacy tools as possible.

4:  It is not easy to get PostgreSQL-specific training at the moment for
many people on this list.

On Thu, 2003-12-11 at 04:49, Stephan Szabo wrote:
> On Wed, 10 Dec 2003, Tom Lane wrote:

> > I think there *would* be resistance to labeling anything as "official
> > PostgreSQL certification", mainly because of the problem of who gets
> > to decide which things are "official".  No one will object if companies
> 
> If we wanted something like that, it'd presumably end up being the
> community's responsibility to be doing some level of oversight. Possibly
> initial test/class material creation would be done that way too.  I don't
> really think we have people that could put in the effort necessary to
> build and then maintain such a system at the moment though, but I'm not
> sure that such a thing would necessarily be impossible.
> 
Obviously, it is impossible to set up an official
curriculum/certification at this stage.  But I still think it could be
done in a gradual way.  Here is how we *could* do it.  Note that this is
NOT an overnight fix and will probably take years or decades to get to
the point where we have community approved standard certification.  We
may never even get there.  I think that is OK and things that are worth
doing are worth doing well and a graduated approach will mean that there
is some benefit to be had well before we get to the end-game.

Here is a clearer picture of what I am proposing:

1:  The development of a community curriculum project officially
separate from the PostgreSQL project, but working closely with the
PostgreSQL advocacy community.  This would lead to:

2:  The development of a community approved curriculum outline.  The
outline would not specify a temporal but rather a logical order covering
all topics the community feels must be covered in order to be considered
proficient with PostgreSQL.  Much of the information could be
product-inspecific.  This would lead to:

3:  The development of curriculums derivative of the outline by members
and third parties.  It could also lead to online tutorials, references
(above and beyond the Postgrsql documentation).  At some point a
non-profit organization may need to be formed to manage the ability of
others to claim that their curriculums complied with the outline.  Third
parties, such as Brainbench may be persuaded to offer some
certifications of this sort as well.

4:  Eventually such an organization may wish to create a certification
process for PostgreSQL skill.  This would likely include an exam similar
to the CCIE or RHCE-- a theory written test, an installation/database
design hands-on test, and a troubleshooting/fix this install hands on
test.  This would likely be a LONG way away and would be predicated on
having a large community of trainers and examiners around the world.

I think that it is WAY to early to be contemplating creating an official
PostgreSQL certification.  But it is not to early to start laying the
groundwork for community-maintained curriculum outlines, etc. that can
be extremely useful as an advocacy tool.  And if the PostgreSQL project
wanted to bless such an effort as being official, I think that would be
great.  It is not, strictly speaking, necessary however.

> > (Disclaimer: I have no reason to think that Red Hat might offer any
> > such certification program for Postgres in the foreseeable future.
> > Too bad.)
> It is, because they're probably the closest group we have to being able to
> offer a reasonably large scale centralized training/testing program.
> 
Not to mention:  The RHCE is a good exam because it tests hands-on skill
rather than the ability to pass multiple-guess tests.  It is expensive
and when I get a chance, I will likely take it.

As a footnote-- when I worked at Microsoft, I was required to pass a
certain number of MCP exams every year, so I have a reasonable feel for
what is wrong with that system, but also how it has helped Microsoft
continue to build market share in the server market.  Certifications and
well thought-out curriculums ARE important advocacy tools and they also
help companies reduce training costs, and though whether this results in
a net benefit is not clear, it tends to be a successful marketing
strategy.

One thing I noticed in the MCP exams that I took was that most of them
were simply multiple-guess and many of them served either to point out
the flaws in the test designer's mind or the OS (NDA prohibits providing
examples, but the NT4 Server in the Enterprise is a test that comes to
mind).  There was,

Re: [GENERAL] Moving a database between servers

2003-12-11 Thread Tom Lane
"Michael ." <[EMAIL PROTECTED]> writes:
> [ SQL function that references a TEMP table ]

> How do I get these functions to import correctly if it
> fails due to this "current_transaction" table not
> being found?

I don't think there is any good solution in 7.3, because it will insist
on trying to validate the function body.  A hack workaround is to create
the "current_transaction" table (as a plain, not TEMP, table), then
import your dump, then drop the table.

7.4 has a better solution (you can turn off function body checking in
CREATE FUNCTION), and 7.4's pg_dump will use it.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Storing Snapshot Data

2003-12-11 Thread Adrian Klaver
On Thursday 11 December 2003 12:42 am, John Gibson wrote:
> Hi, all.
>
> I have a table which is continually updated with the latest totals.  I
> would like to take snapshots of some of the data in that table and store
> it in a second table to run statistics on it later.  What might some
> ways of doing this be?
>
> Illustrative (I hope) example using fruit-qty-on-hand at a grocery store:
>
> Fruit_table   {constantly updated by other processes}
>
> CREATE TABLE "fruit_table" (
> "fruit_name"varchar(20),
> "fruit_qty"int4
>   );
>
>
> ***TABLE DATA***
> fruit name fruit_qty
> apple  5
> orange8
> pear3
>
>
>
> monitor_table {stores snapshots of fruit table from time to time}
>
> CREATE TABLE "monitor_table" (
> "monitor_time" timestamp,
> "mon_apples_qty"int4,
> "mon_oranges_qty"int4,
> "mon_pears_qty"int4
> );
>
>
> I got the following to timestamp a single row from the fruit_table and
> put the results into the monitor_table:
>
> insert into monitor_table(monitor_time, mon_apples_qty)
> select now(), fruit_table.fruit_qty
> where fruit_name = 'apple';
>
> Unfortunately, I am stuck on how to get all three into the monitor table
> with the same timestamp.  Since the times will be relatively long
> between snapshots some type of variables or functions could be used (I
> guess) to store the current time ( curr_time := now(); ) and then run
> the query three times with first an insert and then two updates using
> the variable time stamp on the updates to locate the record to update.
>
> That doesn't sound very elegant to me.  Please help if you have any ideas.
>
> I am definately a newbie, so forgive me if this is trivial.  Also, if
> another forum would be better for this, I would appreciate a nudge in
> that direction.   :)
>
> ...john
>
>
> ---(end of broadcast)---
> TIP 9: the planner will ignore your desire to choose an index scan if your
>   joining column's datatypes do not match

First I would create a monitor table as follows 

CREATE TABLE "fruit_table_moinitor" (
 "fruit_name"varchar(20),
 "fruit_qty"int4,
 "t_stamp"  timestamp   
);

Then use the following transaction-

BEGIN;

INSERT INTO fruit_table_monitor(fruit_name,fruit_qty,t_stamp) SELECT 
fruit_name,fruit_qty,now() from fruit_table;

COMMIT;

Calling the function now() inside a transaction locks the timestamp to the 
time at the beginning of the transaction.
-- 
Adrian Klaver   
[EMAIL PROTECTED]

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


[GENERAL] Weird Problem With PostgreSQL 7.3.1 and VB.Net Datagrid

2003-12-11 Thread Greenwich Support
Hi All,

I have a very weird problem which is occurring with a VB.Net app and
PostgreSQL 7.3.1. There is a form that has a standard .Net datagrid on it
that contains some data from a table in PostgreSQL.

Now, the datagrid has functionality to allow the developer to
programmatically determine what changes (if any) that have been made to the
grid by the user -- i.e. determine if any new rows has been added, any rows
modified or deleted.

These changes are then written back into the database by simply calling an
update function on a DataAdapter object.

Now here's the problem.the application is working fine for a couple of
months with all inserts, updates and deletes carried out on the database
table without any problems. Now updates do not work with the dataAdapter
update where a 'DBConcurrencyException' is thrown -- i.e. the dataAdapter
object will check that the underlying row(s) to be updated (in the database)
have not been changed since the dataGrid was populated with the data. This
you can imagine, can be an issue if there are a number of users working on
the same data / form, however, I am getting this problem with only *ONE*
user. This problem seems to be isolated to a particular table as I have had
no problems with any of the other datagrids in the application that perform
insert / update / delete operations.

The bizarre thing is that if I backup the database, drop it, and recreate it
from the backup, then the application works fine again.what is up with
that!?!?

This lead me to think it may have been a maintenance thing, so I tried to
VACUUM-ANALYZE the table in question, but that has had no effect.

Does anyone have any thoughts, suggestions?
TIA
-simon

---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [GENERAL] Storing Snapshot Data

2003-12-11 Thread Tino Wildenhain
Hi John,

John Gibson schrieb:
Hi, all.

I have a table which is continually updated with the latest totals.  I 
would like to take snapshots of some of the data in that table and store 
it in a second table to run statistics on it later.  What might some 
ways of doing this be?

Illustrative (I hope) example using fruit-qty-on-hand at a grocery store:

Fruit_table   {constantly updated by other processes}

CREATE TABLE "fruit_table" (
   "fruit_name"varchar(20),
   "fruit_qty"int4
 );
***TABLE DATA***
fruit name fruit_qty
apple  5
orange8
pear3


monitor_table {stores snapshots of fruit table from time to time}

CREATE TABLE "monitor_table" (
   "monitor_time" timestamp,
   "mon_apples_qty"int4,
   "mon_oranges_qty"int4,
   "mon_pears_qty"int4
);
I got the following to timestamp a single row from the fruit_table and 
put the results into the monitor_table:

insert into monitor_table(monitor_time, mon_apples_qty)
select now(), fruit_table.fruit_qty
where fruit_name = 'apple';
Unfortunately, I am stuck on how to get all three into the monitor table 
with the same timestamp.  Since the times will be relatively long 
between snapshots some type of variables or functions could be used (I 
guess) to store the current time ( curr_time := now(); ) and then run 
the query three times with first an insert and then two updates using 
the variable time stamp on the updates to locate the record to update.
Id use a third table to just store the snapshot times and a sequence
number:
CREATE SEQUENCE monitor_snapshots_id_seq;

CREATE TABLE monitor_snapshots (
   monitor_time timestamp,
   monitor_id int8 DEFAULT nextval('monitor_snapshots_id_seq'::text) 
NOT NULL
   );

and then use the following code to take your snapshots:

INSERT INTO monitor_snapshots (monitor_time) VALUES (now());
INSERT INTO monitor_table
SELECT currval('monitor_snapshots_id_seq'::text) as monitor_id,
   fruit_name,
   fruit_qty
FROM fruit_table;
Provided you modify your monitor_table
to have monitor_id, fruit_name (perhaps fruit_id is better here),
fruit_qty
If you got a table with fruit_id:fruit_name, you can always retrive
your information via LEFT OUTER JOIN, otherwise you would only get
the kind of fruits available in the given snapshot.
HTH
Tino Wildenhain
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] Storing Snapshot Data

2003-12-11 Thread Tom Lane
John Gibson <[EMAIL PROTECTED]> writes:
> Unfortunately, I am stuck on how to get all three into the monitor table 
> with the same timestamp.

Do all the work in a single SERIALIZABLE transaction.  That gives you a
static, consistent view of the database for as long as you need.

regards, tom lane

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] add column sillyness

2003-12-11 Thread Shridhar Daithankar
Hi,

I think it is time to create a pgsql-humour list where such mails can be directed..

No point wasting energy answering such questions especially when they do not
appear sincere..
Thomas Zehetbauer wrote:

Why do I have to use FOUR queries to accomplish the same result I can
get from MySQL with only ONE query:
alter table users add column $ColumnName text;
alter table users alter column $ColumnName set default '';
update users set t_shirt_size='' where $ColumnName is null;
alter table users alter column $ColumnName set not null;
MySQL is CLEARLY SUPERIOR in terms of
- usability
  - see above
- performance
  - uses index for for min()/max()
- reliability
  - no need to use vacuum
  - no need to dump and restore databases for version upgrade
  - never screwed up any of my databases
Lucky you..:-)

I would therefore urgently recommend that
1) development of postgresql shall be immediately ceased
2) any resources gained thereby (developers, mirrors)  shall be donated
  to MySQL
3) code produced by the former postgresql developers shall be subject to
  a mandatory peer review before it is included in MySQL
Shridhar

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] ERROR: did not find '}' at end of input node (again)

2003-12-11 Thread Tom Lane
Andrei Ivanov <[EMAIL PROTECTED]> writes:
> On Thu, 11 Dec 2003, Tom Lane wrote:
>> Andrei Ivanov <[EMAIL PROTECTED]> writes:
>>> template1=# select usename from pg_user;
>>> ERROR:  did not find '}' at end of input node
>> 
>> There's something wrong with the ON SELECT rule for the pg_user view,
>> evidently.  Could we see the output of
>> 
>> select * from pg_rewrite where ev_class = 16683;

> The ouput is attached...

Well, that's interesting, because it's no different from what I get.
So it seems the fault is not in your database but in the rule-reading
routines.  Are you sure you have a clean build of PG 7.4?  I'm wondering
about having a slightly out-of-sync version that's expecting slightly
different contents of the rule structures.  We make such changes
regularly, but they're supposed to go along with catversion.h changes
that prevent you from running the wrong server version against a
database ...

regards, tom lane

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


Re: [GENERAL] add column sillyness

2003-12-11 Thread Rick Gigger
On a more serious note though I stopped doing comparisons between postgres
and mysql a long time ago.  As soon as I realized that it didn't have unions
(yes I know that it does now) I never took it seriously again.  But I have
noticed some very good things about firebird.  Namely:

tested, solid, native replication both syncronous and asyncronous (at least
they list this as a feature, I assume it works as advertised)
native windows versions
scales down better for embedded apps

The first feature is something that is not a huge deal to me right now but
it probably will be someday.  Right now I do a full backup every 15 minutes
and rsync it to a backup db server.  As my databases are small right now
this is not much of a problem.  I'm hoping that this feature will pop up in
postgres before it becomes a must have.

The last two combined woudl be nice because we have code that runs on both
our web apps running on linux but the same code is also embedded into some
desktop apps that need to run on windows.  Right now we just use sqlite and
it works great but it would be nice to know that if I write some code for
the server that it will "just work" on the desktop version because it is the
exact same piece of software.

Of course I'm sure there are many things that postgres has that firebird
doesn't.  I think that anyone who knows anything starts investigating open
source databases is going to narrow it down to postgres and firebird.  As
important as it might be to have postgers vs mysql comparisons for those who
are aren't aware of mysql's limitations I think it would be very useful to
have a postgres vs firebird comparison.

Does anyone have a link to such a comparison?  Also can anyone elaborate on
the features that postgres has that firebird lacks?  If there were some
obvious show stoppers in firebird it would save me the time of having to do
a trial port of an app to firebird before I find them on my own.

thanks,

rg


- Original Message - 
From: "Shridhar Daithankar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 11, 2003 8:50 AM
Subject: Re: [GENERAL] add column sillyness


> Hi,
>
> I think it is time to create a pgsql-humour list where such mails can be
directed..
>
> No point wasting energy answering such questions especially when they do
not
> appear sincere..
>
> Thomas Zehetbauer wrote:
>
> > Why do I have to use FOUR queries to accomplish the same result I can
> > get from MySQL with only ONE query:
> >
> > alter table users add column $ColumnName text;
> > alter table users alter column $ColumnName set default '';
> > update users set t_shirt_size='' where $ColumnName is null;
> > alter table users alter column $ColumnName set not null;
> >
> > MySQL is CLEARLY SUPERIOR in terms of
> > - usability
> >   - see above
> > - performance
> >   - uses index for for min()/max()
> > - reliability
> >   - no need to use vacuum
> >   - no need to dump and restore databases for version upgrade
> >   - never screwed up any of my databases
>
> Lucky you..:-)
>
> >
> > I would therefore urgently recommend that
> > 1) development of postgresql shall be immediately ceased
> > 2) any resources gained thereby (developers, mirrors)  shall be donated
> >   to MySQL
> > 3) code produced by the former postgresql developers shall be subject to
> >   a mandatory peer review before it is included in MySQL
>
> Shridhar
>
>
> ---(end of broadcast)---
> TIP 7: don't forget to increase your free space map settings
>


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] ERROR: did not find '}' at end of input node (again)

2003-12-11 Thread Tom Lane
Andrei Ivanov <[EMAIL PROTECTED]> writes:
> It's an almost clean build (it has 
> http://gppl.terminal.ru/hier-Pg7.4-0.3.tar.gz in it)...

That's your problem, then; it makes incompatible changes in stored
rules.  The patch should have included a catversion.h change to force
you to initdb after applying it.

regards, tom lane

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])


Re: [GENERAL] ERROR: JOIN/USING types 'integer' and 'character

2003-12-11 Thread Oliver Elphick
On Thu, 2003-12-11 at 20:14, Michael . wrote:
> I had an error before involving a temporary table, and
> that has been taken care of...
> The last message I wrote where it seemed to have
> needed it after I added it was because of different
> \connects.  Could someone please help me with this
> next error as I'm importing to a new server?
> I am getting quite a few of these...
> 
> 
> CREATE VIEW care_plan_note_state AS
> SELECT p.firm_id, p.patient_id, p.visit_id,
> p.problem_id, p.patient_problem_id, p.note,
> p."sequence", p.deleted, p.created, p.mo
> dified, p.edited_by, p.inked, i.visit_id AS visit_in,
> v.inked AS "_inked" FROM ((care_plan_note_history p
> JOIN (SELECT vh.firm_id, v
> h.patient_id, vh.visit_id, vh.disci
...snip...
> ERROR:  JOIN/USING types 'integer' and 'character
> varying' not matched

I gave up on trying to follow all the nested brackets - I think you
would help both yourself and us if you formatted such a query!

I think the error means that you are joining on columns of differing
types.  (E.g.: SELECT * FROM a JOIN b ON a.id = b.id, where a.id and
b.id are of different types.) That suggests an error in the query or a
discrepancy in the data structures; but if it is intentional, cast one
of them to match the other.

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
 
 "The spirit of the Lord GOD is upon me; because the 
  LORD hath anointed me to preach good tidings unto the 
  meek; he hath sent me to bind up the brokenhearted, to
  proclaim liberty to the captives, and the opening of 
  the prison to them that are bound." 
Isaiah 61:1 


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [GENERAL] ERROR: did not find '}' at end of input node (again)

2003-12-11 Thread Andrei Ivanov


I've recompiled without the patch and all is fine now. I'm sorry for 
waisting your time...


On Thu, 11 Dec 2003, Tom Lane wrote:

> Andrei Ivanov <[EMAIL PROTECTED]> writes:
> > It's an almost clean build (it has 
> > http://gppl.terminal.ru/hier-Pg7.4-0.3.tar.gz in it)...
> 
> That's your problem, then; it makes incompatible changes in stored
> rules.  The patch should have included a catversion.h change to force
> you to initdb after applying it.
> 
>   regards, tom lane
> 

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [GENERAL] [NOVICE] PostgreSQL Training

2003-12-11 Thread Rick Gigger
> Ok, I see what you're trying to do.  In looking at this it occurs to me
that one
>  of the way to aid in this effort is through more tech documents.  For
instance,
> I have asked before what is the recommended procedure or stategy for
recovering
> a database that has "crashed".  Something like that is wide open (and
might not
> even be the correct language) but several tech notes addressing specific
> scenarios would not only aid in actually helping someone but would also
document
> real situation that could then be tested on.  Extending that scenario to
other
> area would build a nice library/knowledge base for the community which was
be
> more formalize and more efficient that searching through the newsgroups.

It think this would be great not because I want some sort of certification
but rather because it would be nice to have a nice organized way of learning
(or teaching a new employee or something) both basic and advanced postgres
features.

rg


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] cancel query

2003-12-11 Thread Kris Jurka


On Tue, 9 Dec 2003, H A Prahalad wrote:

>
> Hello,
>   I want to know whether PostgreSQL support cancel() [cancel
> JDBCStatement]. I want to abort a long running query issued/executed by a
> java application using JDBC driver to connect to the database. Thanks.
>

The JDBC driver does support Statement.cancel(), but the tricky part is
that you need to have access to the Statement object that issued the
original query.  You can't just open a new connection and cancel another
query.

Kris Jurka


---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [GENERAL] make error Mac OS X (ar: illegal option -- s)

2003-12-11 Thread Joel Rodrigues
Thanks Tom. That got rid of the 'ar' error, but here's the new one that 
subsequently occurs :

-
/var/tmp/ccECcaaa.s:2139:Parameter error: r0 not allowed for parameter 2 
(code as 0 not r0)
make[4]: *** [xlog.o] Error 1
make[3]: *** [transam-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
-

I found this, which may be relevant:

http://www.simdtech.org/apps/group_public/email/altivec/msg00663.html

I don't have much of a clue with regard to C programming.

Cheers,
Joel
On Friday, December 12, 2003, at 03:21 , Tom Lane wrote:

Joel Rodrigues <[EMAIL PROTECTED]> writes:
Hi, I get the following error when I run make on Mac OS X v 10.1.5  Any
ideas ?
Try setting AROPT = cr (not crs) in Makefile.darwin.

			regards, tom lane
_
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France
---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
 joining column's datatypes do not match


[GENERAL] Build Problem in 7.3.5 version

2003-12-11 Thread Saravanan A
Hello All,

I am having the following problem in PostgreSQL build
process. If anyone came across this, pls give me a
solution to solve this.

I followed the steps below given at the build time.

1) postgresql-7.3.5 source files are downloaded from
postgresql.org
2) Issued the commands from that location.
 ./configure --prefix=/home/sara/test-
Result is Passed
 gmake
  - Result is failed.

 gmake error :

/usr/ccs/bin/ld +h libecpg.sl.3 -b +b
/home/saa/opensrc/ixpress/lib execute.o typename.o
descriptor.o data.o error.o prepare.o memory.o
connect.o misc.o  -L../../../../src/interfaces/libpq
-lpq  -o libecpg.sl.3
ld: Invalid non-PIC relocation for symbol "sqlca" in
file "error.o" (section index 1, offset 0x392).
ld: Invalid non-PIC relocation for symbol "sqlca" in
file "error.o" (section index 1, offset 0x3c2).

Then tried to solve this by compiling error.c without
-o2 option.

gcc -Wall -Wmissing-prototypes
-Wmissing-declarations\
-fPIC -I../../../../src/interfaces/ecpg/include\>
-fPIC -I../../../../src/interfaces/ecpg/include\
>
-I../../../../src/interfaces/libpq\-I../../../../src/interfaces/libpq\
> -I../../../../src/include
-I/usr/include\-I../../../../src/include
-I/usr/include\
> -c -o error.o error.c-c -o error.o error.c

Error :

ld: Unsatisfied symbol "ECPGlog" in file
/var/tmp//ccTF3q7b.o
ld: Unsatisfied symbol "sqlca" in file
/var/tmp//ccTF3q7b.o
ld: Unsatisfied symbol "main" in file 
ld: Unsatisfied symbol "ECPGfree_auto_mem" in file
/var/tmp//ccTF3q7b.o

Then tried to find out the symbol "ECPGlog" in
/usr/lib and also in all libraries. But cann't find
this symbol.

It will be great when i get the solution for this.

Regards,
-Saravanan


BT Yahoo! Broadband - Save £80 when you order online today. Hurry! Offer ends 21st 
December 2003. The way the internet was meant to be. 
http://uk.rd.yahoo.com/evt=21064/*http://btyahoo.yahoo.co.uk

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


Re: [GENERAL] cancel query

2003-12-11 Thread H A Prahalad

Thanks. I have access to the Statement object that issued the original
query. I used the latest JDBC driver for PostgreSQl7.3 and JDK1.4 and I
used threads to achieve it. Thanks once again.

prahalad



On Thu, 11 Dec 2003, Kris Jurka wrote:

>
>
> On Tue, 9 Dec 2003, H A Prahalad wrote:
>
> >
> > Hello,
> > I want to know whether PostgreSQL support cancel() [cancel
> > JDBCStatement]. I want to abort a long running query issued/executed by a
> > java application using JDBC driver to connect to the database. Thanks.
> >
>
> The JDBC driver does support Statement.cancel(), but the tricky part is
> that you need to have access to the Statement object that issued the
> original query.  You can't just open a new connection and cancel another
> query.
>
> Kris Jurka
>


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster