Re: [GENERAL] sequences in transaction blocks

2005-12-18 Thread A. Kretschmer
am 19.12.2005, um 9:39:11 - mailte Marian Naghen folgendes: > I want to insert records inside a transaction block (BEGIN - > COMMIT/ROLLBACK). If the transaction fails, > the sequence do not rollback and retain the new value. > > This is the default behavior of sequences ? Yes. HTH, An

[GENERAL] sequences in transaction blocks

2005-12-18 Thread Marian Naghen
I want to insert records inside a transaction block (BEGIN - COMMIT/ROLLBACK). If the transaction fails, the sequence do not rollback and retain the new value.   This is the default behavior of sequences ?     I use the following table:   CREATE TABLE proceduri(  procedura_id int4 NOT NUL

Re: [GENERAL] Select list of table names for particular DB

2005-12-18 Thread Michael Fuhr
On Sun, Dec 18, 2005 at 12:18:04PM -0500, [EMAIL PROTECTED] wrote: > I am trying to figure out how to get (select) a list of all the names of > the tables in a database when given the name of the database. ie., > Select table_name from ??? where datbase name = "XYZ"; Except for a few shared tables

Re: [GENERAL] One DB not backed up by pg_dumpall

2005-12-18 Thread Michael Fuhr
On Sun, Dec 18, 2005 at 11:29:13PM -0500, Francisco Reyes wrote: > Any reason why a database would not get dumped by pg_dumpall? > Always run pg_dumpall as the superuser. As the operating system superuser or as a database superuser? There's a difference. > I do a nightly dump and have checked sev

Re: [GENERAL] sequence rollback?

2005-12-18 Thread Michael Fuhr
On Sun, Dec 18, 2005 at 02:02:49PM +0100, stig erikson wrote: > it seems like a sequence is always moving forward and cannot be rolled > back. is this correct? Yes. > if it is correct, where in the docs do i find information about this > behavior? http://www.postgresql.org/docs/faqs.FAQ.html#i

[GENERAL] sequence rollback?

2005-12-18 Thread stig erikson
hello. is it possible to rollback sequences in postgresql 8.1.1? (tested om FC4 with official rpms). it seems like a sequence is always moving forward and cannot be rolled back. is this correct? if it is correct, where in the docs do i find information about this behavior? /stig testcase:

[GENERAL] installing tsearch 2 error no user "root"

2005-12-18 Thread David Ang
Hi guys... very new to postgres. just downloaded latest stable postgres release. need to install tsearch2, and i see the tsearch2 is already on the /contrib folder of postgres. http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/tsearch-V2-intro.html followed the instruction there o

[GENERAL] synchronization of news.postgresql.org and news.fr.postgresql.org

2005-12-18 Thread stig erikson
hi, information to the news masters. it seems like messages from news.fr.postgresql.org are not reaching news.postgresql.org. (the other way around seems to work though). end of message ---(end of broadcast)--- TIP 9: In versions below 8.0, the

[GENERAL] Select list of table names for particular DB

2005-12-18 Thread webbj2
Hi I am trying to figure out how to get (select) a list of all the names of the tables in a database when given the name of the database. ie., Select table_name from ??? where datbase name = "XYZ"; I can easily select names of tables in current db like this: SELECT datname FROM pg_database; But, i

[GENERAL] One DB not backed up by pg_dumpall

2005-12-18 Thread Francisco Reyes
Any reason why a database would not get dumped by pg_dumpall? Always run pg_dumpall as the superuser. I do a nightly dump and have checked several days so far and the database is missing in all so far. :-( The only thing, for that DB, that got backed up was the database, but not a single tabl

Re: [GENERAL] Views

2005-12-18 Thread Bob Pawley
Thanks Michael Bob - Original Message - From: "Michael Fuhr" <[EMAIL PROTECTED]> To: "Bob Pawley" <[EMAIL PROTECTED]> Cc: "Postgre General" Sent: Sunday, December 18, 2005 4:49 PM Subject: Re: [GENERAL] Views On Sun, Dec 18, 2005 at 02:52:23PM -0800, Bob Pawley wrote: Thanks for the

Re: [GENERAL] Views

2005-12-18 Thread Michael Fuhr
On Sun, Dec 18, 2005 at 02:52:23PM -0800, Bob Pawley wrote: > Thanks for the help. Could you point me to some documentation on the use of > parentheses? Perhaps something that describes what action the parentheses > accomplishes? See "Lexical Precedence" and "Value Expressions" in the "SQL Synta

Re: [GENERAL] Views

2005-12-18 Thread Bob Pawley
Michael That worked fine. Thanks for the help. Could you point me to some documentation on the use of parentheses? Perhaps something that describes what action the parentheses accomplishes? Bob - Original Message - From: "Michael Fuhr" <[EMAIL PROTECTED]> To: "Bob Pawley" <[EMAIL

[GENERAL] Access bool integer solution

2005-12-18 Thread Sim Zacks
I've been having problems with bools in my Access frontend and PostGreSQL backend. The problem is that Access uses -1 for true and 0 for false and when it does a select it uses those numbers instead of the true or false values. PostGreSQL does not have an implicit conversion from int to bool, s

Re: [GENERAL] convert integer to bool implicitly

2005-12-18 Thread Sim Zacks
I got it working. This has been bothering me for a long time, but now that it was listed as an official bug in my system, I had to deal with it. I'll post the solution under a new post, because I think this will help a lot of people. Sim Zacks wrote: I know I can do it explicitly, I need to

Re: [GENERAL] convert integer to bool implicitly

2005-12-18 Thread Sim Zacks
I know I can do it explicitly, I need to do it implicitly. I am having a problem with a Microsoft Access front-end , that uses -1 as true and 0 as false. I have everything worked around all the places where I could find it by using a cbool(), but this doesn't work with filters, which probably ca

Re: [GENERAL] convert integer to bool implicitly

2005-12-18 Thread Andreas Kretschmer
Sim Zacks <[EMAIL PROTECTED]> schrieb: > How easy would it be to write a small type extension to have integer > automatically convert to bool? > For example, I want an implicit conversion that 0 is false and everything > else is true. test=# \d foo; Table "public.foo" Column | Type |

[GENERAL] convert integer to bool implicitly

2005-12-18 Thread Sim Zacks
How easy would it be to write a small type extension to have integer automatically convert to bool? For example, I want an implicit conversion that 0 is false and everything else is true. Is this C programming or can you do it with a local procedural language? Thanks Sim -

Re: [GENERAL] is this a bug or I am blind?

2005-12-18 Thread Karsten Hilbert
On Sat, Dec 17, 2005 at 10:30:04PM +0100, Martijn van Oosterhout wrote: > I think the real solution is to implement COLLATE support. Then we can > define all sorts of collations, like: ... > My patch was halfway there (the grammer was sorted, as were the SQL > propgation rules) but there was some

Re: [GENERAL] update count

2005-12-18 Thread John DeSoi
On Dec 18, 2005, at 3:50 AM, Chris Velevitch wrote: (for v7.4.5) How do I get the number of rows updated by an update command? In general, the UPDATE command tells you the number of updated rows: Outputs On successful completion, an UPDATE command returns a command tag of the form UPDA

[GENERAL] update count

2005-12-18 Thread Chris Velevitch
(for v7.4.5) How do I get the number of rows updated by an update command? Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster