[HACKERS] Bug in ADD COLUMN with REFERENCES

2001-07-25 Thread Christopher Kings-Lynne
Try this: test=# create table parent(a int4 primary key); NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index 'parent_pkey' for table 'parent' CREATE test=# alter table parent add column "b" int4 references parent(c) on delete set null; ALTER test=# \d test Did not find any relation name

[HACKERS] Re: Slow Performance in PostgreSQL

2001-07-25 Thread Thomas Lockhart
> How many rows are returned by the query in reality ? > Does the table *table1* have an index on the column *var1* > in your centura sqlbase ? ... and did you do a "vacuum analyze"? What is the schema? What is the query? What is the result of "explain" for that query? All of these things are re

[HACKERS] LIBPQ on Windows and large Queries

2001-07-25 Thread Steve Howe
Hello all, Is anybody trying to solve the 8191 bytes query limit from libpq windows port ??? We've discussed this topic on "Large queries - again" thread and it seems like nobody got interested on fixing it. All Windows applications that rely on libpq are broken because of

[HACKERS] Re: Slow Performance in PostgreSQL

2001-07-25 Thread Hiroshi Inoue
pgsql-odbc doesn't seem a right place to post. I forwarded my reply to pgsql-hackers also. Michael Rudolph wrote: > > Hi, > > I have a performance-problem with my Postgresql-database: up to now I > had centura sqlbase but for some reasons I have to change to Postgres. > After copying the data of

Re: [HACKERS] Bad timestamp external representation

2001-07-25 Thread Nathan Myers
On Wed, Jul 25, 2001 at 06:53:21PM -0400, Bruce Momjian wrote: > > I can confirm that current CVS sources have the same bug. > > > It's a bug in timestamp output. > > > > # select '2001-07-24 15:55:59.999'::timestamp; > > ?column? > > --- > > 2001-07-

[HACKERS] Re: [GENERAL] Bad timestamp external representation

2001-07-25 Thread Bruce Momjian
I can confirm that current CVS sources have the same bug. > It's a bug in timestamp output. > > # select '2001-07-24 15:55:59.999'::timestamp; > ?column? > --- > 2001-07-24 15:55:60.00-04 > (1 row) > > Richard Huxton wrote: > > > > From: "tamsin" <[

Re: [HACKERS] Bug in psql tab completion

2001-07-25 Thread Bruce Momjian
I just checked and putting any text in place of 'te' generates 'SET'. This is becausee the tab completion code thinks 'UPDATE ON te' is an update on table ON. The tasble comletion stuff is pretty good, but not perfect. > Try this: > > test=# create table test (a int4); > CREATE > test=# gran

[HACKERS] Re: Re: Storing XML in PostgreSQL

2001-07-25 Thread John Gray
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Gunnar =?iso-8859-1?q?R=F8nning?=) wrote: > Do you have any documentation on your C functions ? I'm just interested > in knowing what functions they provide. > There are only two (so far). They're very basic. I have: pgxml_parse(text) returns

[HACKERS] Can Postgres handle 2-phase commits ?

2001-07-25 Thread Howard Williams
I can't seem to find any posts or docs on the subject ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [HACKERS] Re: plpgsql: Debug function?

2001-07-25 Thread Tom Lane
> Is there a way to debug a PL/pgSQL function? It's behaving very > irradic! > Joel> It's crude, but you can output debugging statements w/ RAISE > Joel> NOTICE or catch flawed assumptions by RAISE EXCEPTION. Also try turning on query logging, so you can see in the postmaster log the que

[HACKERS] Re: plpgsql: Debug function?

2001-07-25 Thread Joel Burton
On 25 Jul 2001, Turbo Fredriksson wrote: > > "Joel" == Joel Burton <[EMAIL PROTECTED]> writes: > > Joel> On 25 Jul 2001, Turbo Fredriksson wrote: > >> Is there a way to debug a PL/pgSQL function? It's behaving very > >> irradic! > > Joel> It's crude, but you can output debug

Re: [HACKERS] PostgreSQL 7.0 problem (may be bug?)

2001-07-25 Thread Tom Lane
"Vladimir V. Zolotych" <[EMAIL PROTECTED]> writes: > proba=# insert into bb select id,val,count(val) from aa group by id,val; > pqReadData() -- backend closed the channel unexpectedly. Try 7.1. Prior releases tend to have problems with implicit datatype conversions in INSERT ... SELECT.

[HACKERS] Re: plpgsql: Debug function?

2001-07-25 Thread Joel Burton
On 25 Jul 2001, Turbo Fredriksson wrote: > Is there a way to debug a PL/pgSQL function? It's behaving very irradic! It's crude, but you can output debugging statements w/ RAISE NOTICE or catch flawed assumptions by RAISE EXCEPTION. -- Joel Burton <[EMAIL PROTECTED]> Director of Information S

[HACKERS] Re: plpgsql: Debug function?

2001-07-25 Thread Turbo Fredriksson
> "Joel" == Joel Burton <[EMAIL PROTECTED]> writes: Joel> On 25 Jul 2001, Turbo Fredriksson wrote: >> Is there a way to debug a PL/pgSQL function? It's behaving very >> irradic! Joel> It's crude, but you can output debugging statements w/ RAISE Joel> NOTICE or catch flawe

[HACKERS] PostgreSQL 7.0 problem (may be bug?)

2001-07-25 Thread Vladimir V. Zolotych
Hello Consider two simple tables: AA, BB. proba=# \d aa Table "aa" Attribute | Type | Modifier ---+-+-- id| bigint | val | integer | proba=# select * from aa; id | val +- 1 | 1 2 | 2 2 | 2 3 | 3 3 | 3 3 |

[HACKERS] plpgsql: Debug function?

2001-07-25 Thread Turbo Fredriksson
Is there a way to debug a PL/pgSQL function? It's behaving very irradic! I have two function, one that works and one that doesn't. The part that don't work in func2 is 'SELECT INTO ... ...' and I can't figgure out why it doesnt't work! -- Turbo __ _ Debian GNU Unix _IS_ user friend

Re: [HACKERS] Re: Storing XML in PostgreSQL

2001-07-25 Thread Gunnar Rønning
* "John Gray" <[EMAIL PROTECTED]> wrote: | | OR, depending on what these fwbuilder objects involve, you can of | course just store XML documents in fields of type text (especially if | you use 7.1 which has TOAST, so you can store long documents). IT's | not difficult to hook up a parser (I'm

[HACKERS] Has anybody gop PL/Python to work on linux/pg7.1.2 ?

2001-07-25 Thread Hannu Krosing
Hi. Has anybody gop plpython to work on linux/pg7.1.2 ? I built it as instructed in the README, but calling the first plpython function (stupid() from the test suite) causes immediate closedown. there is nothing in the logs either ... I tried it first with python2.1 and then python 1.5 with

Re: [HACKERS] plpgsql: Checking status on a 'INSERT INTO ...'

2001-07-25 Thread Reinoud van Leeuwen
> I'm porting some stored procedures from a MSSQL server, and thought I'd > use PL/pgSQL. > > The original code is checking the insert with the line: > >if (@@Error != 0) You might want to use something like: SELECT INTO variable_name * FROM table WHERE field = some_value; IF FOUND

[HACKERS] plpgsql: Checking status on a 'INSERT INTO ...'

2001-07-25 Thread Turbo Fredriksson
I'm porting some stored procedures from a MSSQL server, and thought I'd use PL/pgSQL. The original code is checking the insert with the line: if (@@Error != 0) How do I do the same thing in PL/pgSQL? -- Turbo __ _ Debian GNU Unix _IS_ user friendly - it's just ^

[HACKERS] Re: Storing XML in PostgreSQL

2001-07-25 Thread John Gray
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jean-Michel POURE) wrote: > Hello friends, > > What is the best way to parse and store an XML document in PostgreSQL? I > would like to store fwbuilder (http://www.fwbuilder.org) objects in > PostgreSQL. > I think the best way depends on what

Re: [HACKERS] Question about porting the PostgreSQL

2001-07-25 Thread Tom Lane
"Hsin Lee" <[EMAIL PROTECTED]> writes: > We would like to get your feedback about this aproach - are we on the > right track or is it a waste of time? Impossible to tell, since you haven't said word one about what this box is or what it can do. If it were plain storage hardware, why do you need