[SQL] Timestamp accuracy

2001-02-03 Thread Florian Steffen
Hi, The user manual said the Timestamp type has a microsecond accuracy, but how can I display the results of a query with microseconds ? Without formatting the output has an accuracy of 10^-2 second, and with formatting it is even worse since the formatting strings do not accept anything under

Re: [SQL] Suggestion for psql: --file -

2001-02-03 Thread Albert REINER
On Fri, Feb 02, 2001 at 04:16:05PM +0100, Peter Eisentraut wrote: Albert REINER writes: ... P.S: BTW, the man page (7.0.2) of psql is not very clear: it took me some experimentation to find out that you have to do "\set VARIABLE" interactively or give "--set VARIABLE=" to set a variable

Re: [SQL] Bug with rules in 7.0.3?

2001-02-03 Thread Tom Lane
Tod McQuillin [EMAIL PROTECTED] writes: How the heck can one insert and update generate three rows? Looks like a rule rewriter bug to me. It seems to be fixed in 7.1; I get regression=# SELECT * FROM orders; order_id | menu_id | price --+-+--- 1 | 2 |-1

Re: [SQL] Suggestion for psql: --file -

2001-02-03 Thread Peter Eisentraut
Albert REINER writes: Suggested new wording? What about: Works for me. Thanks. -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/

Re: [SQL] PL/pgSQL: possible parsing or documentation bug?

2001-02-03 Thread Tom Lane
"Albert REINER" [EMAIL PROTECTED] writes: create Function IdOfPossiblyNewAuthor(text) returns int4 as ' declare id int4; begin select id into id from author where name = $1; raise notice ''ID found: %'', id; if id is null then insert into author (name) values

Re: [SQL] Bug with rules in 7.0.3?

2001-02-03 Thread Tod McQuillin
On Sat, 3 Feb 2001, Tom Lane wrote: I get regression=# SELECT * FROM orders; order_id | menu_id | price --+-+--- 1 | 2 |-1 (1 row) which is the correct result given that rules are executed before the original query. (Which is why you need a

[SQL] Fw: C function for use from PLpgSQL trigger

2001-02-03 Thread Joe Conway
Hello all, I posted this (see below) Friday to the interfaces list with no response. Does anyone know if what I'm trying to do is possible, or should I just write the entire thing in a C function trigger? The latter would be unfortunate because I think it would be nice to be able to extend