Re: [BUGS] Cannot assign ROWTYPE, RECORD variables in PL/pgSQL

2002-11-07 Thread elein
Deep copy with User defined data types sometimes get a little wild, possibly with alignment and memory context. For example a UDT which is a char followed by an int might be tricky to recognize that alignment might be needed. It might even be better to have the UDT writer write their own dee

Re: [BUGS] Cannot assign ROWTYPE, RECORD variables in PL/pgSQL

2002-11-07 Thread Josh Berkus
Neil, > Unless anyone sees a problem with this, I'll work on this. I > definately think it's inappropriate for 7.3.1 though. Thank you! -Josh Berkus ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/use

Re: [BUGS] pg_ctl is fragile

2002-11-07 Thread Bruce Momjian
Neil Conway wrote: > Tom Lane <[EMAIL PROTECTED]> writes: > > Doesn't seem like kill's exit code is going to tell you enough. > > If you got, say, "Permission denied" rather than "No such process", > > you shouldn't report that the postmaster isn't running. > > Ok, fair enough -- so is there any w

Re: [BUGS] pg_ctl is fragile

2002-11-07 Thread Neil Conway
Tom Lane <[EMAIL PROTECTED]> writes: > Doesn't seem like kill's exit code is going to tell you enough. > If you got, say, "Permission denied" rather than "No such process", > you shouldn't report that the postmaster isn't running. Ok, fair enough -- so is there any way to improve this behavior? C

Re: [BUGS] pg_ctl is fragile

2002-11-07 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > After an unclean shutdown (e.g. a kernel crash), pg_ctl isn't smart > enough to realize that it won't be able to successfully shut down the > postmaster: > $ pg_ctl -D /pgsql/data stop > /pgsql/bin/pg_ctl: line 269: kill: (2039) - No such process > waiting

Re: [BUGS] Cannot assign ROWTYPE, RECORD variables in PL/pgSQL

2002-11-07 Thread Neil Conway
Josh Berkus <[EMAIL PROTECTED]> writes: > create or replace function rowtype_test () > returns text as ' > declare this_row candidates%rowtype; > that_row candidates%rowtype; > begin > select * into this_row > from candidates; > > that_row := this_row; > > return that_row.first_name; > > e

[BUGS] pg_ctl is fragile

2002-11-07 Thread Neil Conway
After an unclean shutdown (e.g. a kernel crash), pg_ctl isn't smart enough to realize that it won't be able to successfully shut down the postmaster: $ pg_ctl -D /pgsql/data stop /pgsql/bin/pg_ctl: line 269: kill: (2039) - No such process waiting for postmaster to shut down...

Re: [BUGS] Problem with a sequence being acted on by an on insert rule.

2002-11-07 Thread Tom Lane
Mark Le Huray <[EMAIL PROTECTED]> writes: > - create sequence autonumber increment 1 minvalue 0 start 0; > - create table testtable1 ( pk int primary key ); > - create table testtable2 ( fk int primary key references > testtable1(pk)); > - create rule updatetesttable2 as on insert to testtable1 do

Re: [BUGS] Sequence Start number not dumped correctly

2002-11-07 Thread Tom Lane
Reto Stamm <[EMAIL PROTECTED]> writes: > When I have a sequence like this: > CREATE SEQUENCE "test_id_seq" start -32768 increment 1 maxvalue 32767 minvalue > -32768 cache 1; > it will show up in schema.txt like this: > CREATE SEQUENCE "test_id_seq" start 1 increment 1 maxvalue 32767 minvalue -327

Re: [BUGS] Problem with a sequence being acted on by an on insert

2002-11-07 Thread Stephan Szabo
On 5 Nov 2002, Mark Le Huray wrote: > Apologies if this bug has already been reported and I am also reasonably > new to postgresql so I might be doing something stupid :-) > > Anyway to replicate the problem: > > Initial tables: > > - create sequence autonumber increment 1 minvalue 0 start 0; > -

[BUGS] Cannot assign ROWTYPE, RECORD variables in PL/pgSQL

2002-11-07 Thread Josh Berkus
Bug: Cannot assign ROWTYPE, RECORD variables in PL/pgSQL Affects: PL/pgSQL Severity: Annoyance Priority: Minor Enhancement Confirmed On: 7.3beta2, Linux Given the following function: === create or replace function rowtype_test () returns text as ' declare this

Re: [BUGS] like not using indexes in 7.3b5?

2002-11-07 Thread Tom Lane
Lars <[EMAIL PROTECTED]> writes: > Is that expected behavior in 7.3? It is if you initdb'd in a locale other than "C". Use pg_controldata to check. regards, tom lane ---(end of broadcast)--- TIP 1: subscribe and unsubscribe

[BUGS] Sequence Start number not dumped correctly

2002-11-07 Thread Reto Stamm
Hi, When I have a sequence like this: CREATE SEQUENCE "test_id_seq" start -32768 increment 1 maxvalue 32767 minvalue -32768 cache 1; and dump it using pg_dump -s -c -f schema.txt testdb it will show up in schema.txt like this: CREATE SEQUENCE "test_id_seq" start 1 increment 1 maxvalue 32767

[BUGS] Problem with a sequence being acted on by an on insert rule.

2002-11-07 Thread Mark Le Huray
Apologies if this bug has already been reported and I am also reasonably new to postgresql so I might be doing something stupid :-) Anyway to replicate the problem: Initial tables: - create sequence autonumber increment 1 minvalue 0 start 0; - create table testtable1 ( pk int primary key ); - cr

[BUGS] Bug #811: Using || with char and char varying

2002-11-07 Thread pgsql-bugs
John Lim ([EMAIL PROTECTED]) reports a bug with a severity of 2 The lower the number the more severe it is. Short Description Using || with char and char varying Long Description The following sql: select firstname||lastname from adoxyz; generates this error: PostgreSQL said: ERROR: Unable t

[BUGS] like not using indexes in 7.3b5?

2002-11-07 Thread Lars
I have a table with a bunch of varchar columns. In 7.2.3 Postgres would indexes on varchar column for certain like queries. This is a script from 7.2.3: lars=> \d agency Table "agency" Column | Type | Modifiers -+--