niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » PostgreSQL
to_char bug?
Post new topic   Reply to topic Page 3 of 71 [1061 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2, 3, 4, 5, ..., 69, 70, 71 Next
Author Message
Terry Lee Tucker
*nix forums addict


Joined: 03 Mar 2005
Posts: 68

PostPosted: Thu Mar 03, 2005 3:07 pm    Post subject: Re: Disabling triggers in a transaction Reply with quote

This caught my eye the other day, but didn't take the time to examine it. I
find that I am now very interested in it. Could you please elaborate on your
method and how this works?

TIA

On Sunday 27 February 2005 05:37 pm, Jay Guerette saith:
Quote:
If I disable INSERT and UPDATE triggers inside a transaction; by
setting and resetting reltriggers in pg_class; am I correct in
thinking that this will disable triggers globally for that table for
the duration of that transaction? So an INSERT or UPDATE to this
table, outside of the transaction and within that precise timeframe,
would NOT fire the trigger? If so, would the 'serializable ' isolation
level be required in order to ensure this doesn't happen?

---------------------------(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 8: explain analyze is your friend
Back to top
Terry Lee Tucker
*nix forums addict


Joined: 03 Mar 2005
Posts: 68

PostPosted: Thu Mar 03, 2005 6:34 pm    Post subject: Re: Disabling triggers in a transaction Reply with quote

Tom,

Do you feel this is a safe method for disabling triggers in the rare cases
where one finds that it is prudent to do that? Do you think that the column,
"reltriggers", is permanent fixture in pg_class? What is your advice on this?

TIA

On Monday 28 February 2005 03:22 pm, Tom Lane saith:
Quote:
Jay Guerette <jayguerette@gmail.com> writes:
If I disable INSERT and UPDATE triggers inside a transaction; by
setting and resetting reltriggers in pg_class; am I correct in
thinking that this will disable triggers globally for that table for
the duration of that transaction?

Not if you never commit the pg_class row in that state.

regards, tom lane

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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
Back to top
Hrishikesh Deshmukh
*nix forums beginner


Joined: 01 Mar 2005
Posts: 48

PostPosted: Thu Mar 03, 2005 6:35 pm    Post subject: Re: GUI Reply with quote

Hi All,

A question about "joins" i have 17 tables in my postgres-DB how does
one perform a join on these many tables!!! :(

Thanks,
H


On Tue, 1 Mar 2005 08:42:57 -0600, James Thompson <jamest@ajrs.com> wrote:
Quote:
On Tuesday 01 March 2005 08:07 am, Hrishikesh Deshmukh wrote:
Hi All,

I want to spend less time coding and more time running queries against
the DB which i am building. What about QT from TrollTech!! Can that be
used to whip up gui real fast! Dreamweaver?

Hrishi

You could use gnue-designer and gnue-forms from www.gnuenterprise.org. It
lets you paint the input/query forms by drag and drop fields from the db.
You can create multi table master/details forms from existing tables in
seconds that give you insert, update, delete, query capabilities. You can
assign triggers to forms to do custom processing. And if you need more
customization you can write python scripts using the gnue-common library
which is the core of our other tools. I've done that to create custom apps
that tie our database access system to a ui built with pyqt and qt-designer.

Several of the developers hang out in #gnuenterprise on irc.freenode.net if
you'd like more info.

Take Care,
James


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

http://archives.postgresql.org
Back to top
Tino Wildenhain
*nix forums Guru Wannabe


Joined: 03 Mar 2005
Posts: 177

PostPosted: Thu Mar 03, 2005 8:36 pm    Post subject: Re: GUI Reply with quote

Am Donnerstag, den 03.03.2005, 14:35 -0500 schrieb Hrishikesh Deshmukh:
Quote:
Hi All,

A question about "joins" i have 17 tables in my postgres-DB how does
one perform a join on these many tables!!! Sad

you just use 16 times the word "JOIN" ?

HTH
Tino


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Back to top
Sean Davis
*nix forums Guru Wannabe


Joined: 01 Mar 2005
Posts: 172

PostPosted: Thu Mar 03, 2005 8:56 pm    Post subject: Re: GUI Reply with quote

On Mar 3, 2005, at 4:36 PM, Tino Wildenhain wrote:

Quote:
Am Donnerstag, den 03.03.2005, 14:35 -0500 schrieb Hrishikesh Deshmukh:
Hi All,

A question about "joins" i have 17 tables in my postgres-DB how does
one perform a join on these many tables!!! :(


What are you trying to do? You have 17 total tables and you want to
know how to join in general on several of them, or you need to do a
17-table join?

Sean


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Back to top
John Gray
*nix forums beginner


Joined: 03 Mar 2005
Posts: 11

PostPosted: Thu Mar 03, 2005 9:09 pm    Post subject: Re: PostgreSQL and XML Reply with quote

On Thu, 03 Mar 2005 07:59:14 +0000, Mario Splivalo wrote:

Quote:
Can I use XPath queries in any form to retrive data from XML documents and
'transfer' them to table-like sets?

Basically, yes - if you look at the README for contrib/xml2 in the

PostgreSQL source distribution (v8.0.1) there is an example using the
xpath_table function which allows you to run several XPath expressions in
parallel against a set of rows and turn the result into a table. To use
this functionality you will need to build the contrib/xml2 mocule - your
machine will need libxml (http://xmlsoft.org/)

Quote:
Something as MSSQL's OPENXML keyword?

In a way (from reading half a webpage) - I'm not a user of MSSQL so I

can't really compare against how their functions work!

Regards

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
Back to top
Hrishikesh Deshmukh
*nix forums beginner


Joined: 01 Mar 2005
Posts: 48

PostPosted: Thu Mar 03, 2005 10:00 pm    Post subject: Re: GUI Reply with quote

Hi,
I want to do a 17 table join! Sad But a general idea will help.

Thanks,
H


On Thu, 3 Mar 2005 16:56:13 -0500, Sean Davis <sdavis2@mail.nih.gov> wrote:
Quote:

On Mar 3, 2005, at 4:36 PM, Tino Wildenhain wrote:

Am Donnerstag, den 03.03.2005, 14:35 -0500 schrieb Hrishikesh Deshmukh:
Hi All,

A question about "joins" i have 17 tables in my postgres-DB how does
one perform a join on these many tables!!! :(


What are you trying to do? You have 17 total tables and you want to
know how to join in general on several of them, or you need to do a
17-table join?

Sean



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

http://archives.postgresql.org
Back to top
Robby Russell
*nix forums beginner


Joined: 03 Mar 2005
Posts: 17

PostPosted: Thu Mar 03, 2005 10:53 pm    Post subject: Re: GUI Reply with quote

On Thu, 2005-03-03 at 18:00 -0500, Hrishikesh Deshmukh wrote:
Quote:
Hi,
I want to do a 17 table join! Sad But a general idea will help.

Thanks,
H

Try here to start:

http://www.postgresql.org/docs/current/static/tutorial-join.html


Quote:
SELECT *
FROM weather LEFT OUTER JOIN cities ON (weather.city = cities.name);


Cheers,

Robby

--
/***************************************
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON | www.planetargon.com
* Portland, OR | robby@planetargon.com
* 503.351.4730 | blog.planetargon.com
* PHP/PostgreSQL Hosting & Development
* --- Now hosting Ruby on Rails Apps ---
****************************************/


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Back to top
Geoffrey
*nix forums beginner


Joined: 04 Mar 2005
Posts: 31

PostPosted: Fri Mar 04, 2005 1:28 am    Post subject: Re: Disabling triggers in a transaction Reply with quote

Terry Lee Tucker wrote:
Quote:
Tom,

Do you feel this is a safe method for disabling triggers in the rare cases
where one finds that it is prudent to do that? Do you think that the column,
"reltriggers", is permanent fixture in pg_class? What is your advice on this?

I'd be quite interested in this as well. Can one depend on this column
in the future? Even if not, as long as one verifies it still exists, is
this a viable option for trigger control within a transaction?

(This guy Tucker comes up with some interesting stuff...) :)

--
Until later, Geoffrey

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

http://archives.postgresql.org
Back to top
Bearden Barnes
*nix forums beginner


Joined: 04 Mar 2005
Posts: 1

PostPosted: Fri Mar 04, 2005 9:10 pm    Post subject: Re: [ADMIN] PostgreSQL installation problem on Windows XP Home Reply with quote

See the following article in Microsoft's Knowledgebase which describes how
to get to the system accounts in Windows XP Home. It specifically addresses
changing the Windows administrator password, but as long as you follow the
directions you should see the postgres account along with administrator and
other system accounts.

Cannot Change the Password for the Administrator Account in User Accounts in
Control Panel
Article ID : 298252
http://support.microsoft.com/default.aspx?scid=kb;en-us;298252
<http://support.microsoft.com/default.aspx?scid=kb;en-us;298252>

--Bearden Barnes


-----Original Message-----
From: Hagop H. [mailto:HagopH@hotpop.com]
Sent: Friday, March 04, 2005 4:08 PM
To: PGSQL-novice@postgresql.org; PGSQL-cygwin@postgresql.org;
PGSQL-admin@postgresql.org; PGSQL-general@postgresql.org
Subject: [ADMIN] PostgreSQL installation problem on Windows XP Home



I know that my problem is due to my carelessness and ignorance, but I didn't
think that installing PostgreSQL would cause a state of affairs not easily
reversed. Please excuse the length of the following narrative.



When installing PostgreSQL 8.0.1 on my laptop running Windows XP Home (SP2),
I let the installer create the postgres account and generate a password. I
didn't write down the password. I figured that if the installer was going to
generate a random password, it would store it in some configuration or log
file and not ask me for it. I was wrong. (Perhaps a warning for idiots like
me would be appropriate in the MSI installer file?) When I went to connect
to the template1 database, PGAdmin III asked me for the postgres account
password, which I was unable to provide.



Normally this wouldn't be a problem. I figured I'd just start up Control
Panel and change the postgres account password. Unfortunately, Windows XP
Home doesn't provide any obvious tools to change a system account password.
I only know how to change user account passwords. Control Panel's User
Accounts tool is useless for this problem.



I uninstalled PostgreSQL, thinking that reinstalling it might help. I tried
removing the postgres account to no avail. My only indication that the
postgres account still exists is the Windows Services administration
utility. I know of no method to delete the account. Microsoft's Knowledge
Base provided no help. Windows XP Professional contains a tool called Local
Users and Groups (lusrmgr.msc) that allows the administrator to change any
account's password. Windows XP Home cannot run that program.



When I reinstall PostgreSQL, I am asked for the postgres account password. I
know I could rename the postgres account name to postgres1 or something
else, but I don't know if that will create any further issues for me. I
could also upgrade the laptop's OS to XP Pro in order to change the postgres
account password, but that feels like using a sledgehammer to cut diamonds.



I certainly bear most of the blame. It would be too easy to bash Microsoft
for this. I also wish that PostgreSQL's installer did not auto-generate
passwords that cannot be changed. None of what I went through was necessary.



If someone could tell me either how to delete the postgres account or change
its password, I would appreciate the assistance.



Regards,



Hagop Hagopian
Back to top
Hagop Hagopian
*nix forums beginner


Joined: 06 Mar 2005
Posts: 1

PostPosted: Sun Mar 06, 2005 6:34 pm    Post subject: Re: [CYGWIN] PostgreSQL installation problem on Windows XP Home Reply with quote

Sorry.

I didn't know which list best served general installation questions for the
Windows version. My question has been answered. Thanks for your attention.

Regards,

Hagop

-----Original Message-----
From: Reini Urban [mailto:rurban@x-ray.at]
Sent: Sunday, March 06, 2005 7:27 AM
To: Hagop H.
Cc: PGSQL-cygwin@postgresql.org
Subject: Re: [CYGWIN] PostgreSQL installation problem on Windows XP Home

Please don't post to the cygwin list issues not related to cygwin.
You installed the native win32 version.

Installation problems should go to the general list only.
See http://www.postgresql.org/community/lists/

Hagop H. schrieb:
Quote:
I know that my problem is due to my carelessness and ignorance, but I
didn't think that installing PostgreSQL would cause a state of affairs
not easily reversed. Please excuse the length of the following narrative.



When installing PostgreSQL 8.0.1 on my laptop running Windows XP Home
(SP2), I let the installer create the postgres account and generate a
password. I didn't write down the password. I figured that if the
installer was going to generate a random password, it would store it in
some configuration or log file and not ask me for it. I was wrong.
(Perhaps a warning for idiots like me would be appropriate in the MSI
installer file?) When I went to connect to the template1 database,
PGAdmin III asked me for the postgres account password, which I was
unable to provide.



Normally this wouldn't be a problem. I figured I'd just start up Control
Panel and change the postgres account password. Unfortunately, Windows
XP Home doesn't provide any obvious tools to change a system account
password. I only know how to change user account passwords. Control
Panel's User Accounts tool is useless for this problem.



I uninstalled PostgreSQL, thinking that reinstalling it might help. I
tried removing the postgres account to no avail. My only indication that
the postgres account still exists is the Windows Services administration
utility. I know of no method to delete the account. Microsoft's
Knowledge Base provided no help. Windows XP Professional contains a tool
called Local Users and Groups (lusrmgr.msc) that allows the
administrator to change any account's password. Windows XP Home cannot
run that program.



When I reinstall PostgreSQL, I am asked for the postgres account
password. I know I could rename the postgres account name to postgres1
or something else, but I don't know if that will create any further
issues for me. I could also upgrade the laptop's OS to XP Pro in order
to change the postgres account password, but that feels like using a
sledgehammer to cut diamonds.



I certainly bear most of the blame. It would be too easy to bash
Microsoft for this. I also wish that PostgreSQL's installer did not
auto-generate passwords that cannot be changed. None of what I went
through was necessary.



If someone could tell me either how to delete the postgres account or
change its password, I would appreciate the assistance.



Regards,



Hagop Hagopian



--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban
http://phpwiki.org



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Back to top
NTPT
*nix forums beginner


Joined: 06 Mar 2005
Posts: 3

PostPosted: Sun Mar 06, 2005 7:07 pm    Post subject: Re: More concurent transaction over single connection Reply with quote

Ok. Let,s have a some model scenarios . Let it be a web server with some
embedded language like PHP.


1: Multiprocess server (Like Apache 1.x ) : Each process use one persistent
connection. Right ? One proces can serve only one request in present
time. Right ? When request is finished, process hold your connection open
and awaiting a new request. From the point of view of the transactions it is
OK, because transactions over one persistant connection are "serialized" by
nature.


2: One process, but multiple threads . If each thread have your separate db
connections, it is ok, it is like previous example, just substitute word
"process" by word "thread"

3: One process, multiple threads, all threads share the same one persitant
connection. Because one thread serve one request in present time, but
threads can run "concurently" (AFIAK ), I am affraid, that multiple
transactions over the single connection in this scenario will result a
complette mess. I am right ?


Please execuse my wrong english.







----- Original Message -----
From: "Richard Huxton" <dev@archonet.com>
To: "NTPT" <ntpt@seznam.cz>
Cc: "Postgres General" <pgsql-general@postgresql.org>
Sent: Wednesday, February 09, 2005 11:45 AM
Subject: Re: [GENERAL] More concurent transaction over single connection


Quote:
NTPT wrote:
AFAIK (7.4.x) there is one limitation in persistant connections to
postgresql from various frontends (
http://cz.php.net/manual/en/features.persistent-connections.php ),
because it can not use transactions in situation where more concurent
tasks use a single connection (execuse my wrong english)



I suggest to add some sort of "context" identificator to
frontend/backend protocol to overcome this limit. Ie frontend - ( like
PHP for example ) make ONE persistant connection and different scripts
are served over this connection. But frontend add for each instance of
script a unique "context" identificator and postgresql server will treat
different "contexts" as they was send by different connections. The
results wil be sorted by "context" by frontend and feeded to apprpriate
instance of the php script

You've just reinvented connections. The problem is at the application end
really, since PHP doesn't provide a middle-ware layer to manage this sort
of stuff. Typically, java-based application servers manage this sort of
thing for you.

I think it may add some benefit to avoiding connection starting costs,
especially in case where database and client are in greater network
distance and/or need to use some expensive procedure to start connection
and allow a relay simple and transparent connection pooling, may be a
some type od "spare servers" like in Apache (MinSpareServers and Max
SpareServers configuration directive )

Perhaps take a look at pgpool connection pooling.

--
Richard Huxton
Archonet Ltd

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




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

http://www.postgresql.org/docs/faq
Back to top
Magnus Hagander
*nix forums Guru Wannabe


Joined: 06 Mar 2005
Posts: 158

PostPosted: Sun Mar 06, 2005 7:08 pm    Post subject: Re: [ADMIN] PostgreSQL installation problem on Windows XP Home Reply with quote

A couple of comments:

pgadmin asked you for the postgres database account. NOT for the service
account. The postgres database account is never autogenerated, it is
always entered during the installation (on the initdb page).

To change a users password in any windows version, inculding XP Home,
run:
net user accountname newpassword

If it's a domain account, just add "/DOMAIN" at the end.

If you want to delete it, as others has pointed out already, just run
"net user accountname /delete".

I beleive there are also third-party tools available to do this in a
GUI, but I don't know of any specific tool I can point you at.

//Magnus



-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Hagop H.
Sent: den 4 mars 2005 22:08
To: PGSQL-novice@postgresql.org; PGSQL-cygwin@postgresql.org;
PGSQL-admin@postgresql.org; PGSQL-general@postgresql.org
Subject: [ADMIN] PostgreSQL installation problem on Windows XP
Home



I know that my problem is due to my carelessness and ignorance,
but I didn't think that installing PostgreSQL would cause a state of
affairs not easily reversed. Please excuse the length of the following
narrative.



When installing PostgreSQL 8.0.1 on my laptop running Windows XP
Home (SP2), I let the installer create the postgres account and generate
a password. I didn't write down the password. I figured that if the
installer was going to generate a random password, it would store it in
some configuration or log file and not ask me for it. I was wrong.
(Perhaps a warning for idiots like me would be appropriate in the MSI
installer file?) When I went to connect to the template1 database,
PGAdmin III asked me for the postgres account password, which I was
unable to provide.



Normally this wouldn't be a problem. I figured I'd just start up
Control Panel and change the postgres account password. Unfortunately,
Windows XP Home doesn't provide any obvious tools to change a system
account password. I only know how to change user account passwords.
Control Panel's User Accounts tool is useless for this problem.



I uninstalled PostgreSQL, thinking that reinstalling it might
help. I tried removing the postgres account to no avail. My only
indication that the postgres account still exists is the Windows
Services administration utility. I know of no method to delete the
account. Microsoft's Knowledge Base provided no help. Windows XP
Professional contains a tool called Local Users and Groups (lusrmgr.msc)
that allows the administrator to change any account's password. Windows
XP Home cannot run that program.



When I reinstall PostgreSQL, I am asked for the postgres account
password. I know I could rename the postgres account name to postgres1
or something else, but I don't know if that will create any further
issues for me. I could also upgrade the laptop's OS to XP Pro in order
to change the postgres account password, but that feels like using a
sledgehammer to cut diamonds.



I certainly bear most of the blame. It would be too easy to bash
Microsoft for this. I also wish that PostgreSQL's installer did not
auto-generate passwords that cannot be changed. None of what I went
through was necessary.



If someone could tell me either how to delete the postgres
account or change its password, I would appreciate the assistance.



Regards,



Hagop Hagopian
Back to top
Michael Fuhr
*nix forums Guru


Joined: 02 Mar 2005
Posts: 674

PostPosted: Mon Mar 07, 2005 3:30 am    Post subject: Re: Pg 8.01 big trouble with LIMIT (bug !?) Reply with quote

On Thu, Feb 24, 2005 at 04:20:03PM -0500, Bruce Momjian wrote:
Quote:

My guess is that you have not ANALYZEd the tables recently and the
optimizer is making a bad choice.

I think this problem is similar to one a couple of months ago:

http://archives.postgresql.org/pgsql-bugs/2005-01/msg00174.php

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
Back to top
Richard Huxton
*nix forums Guru


Joined: 01 Mar 2005
Posts: 522

PostPosted: Mon Mar 07, 2005 8:26 am    Post subject: Re: More concurent transaction over single connection Reply with quote

NTPT wrote:
Quote:

3: One process, multiple threads, all threads share the same one
persitant connection. Because one thread serve one request in present
time, but threads can run "concurently" (AFIAK ), I am affraid, that
multiple transactions over the single connection in this scenario will
result a complette mess. I am right ?

Yes - that's the definition of a connection really. Each connection
provides you with a set of configuration values and a context for
transactions.

--
Richard Huxton
Archonet Ltd

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

http://archives.postgresql.org
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 3 of 71 [1061 Posts] Goto page:  Previous  1, 2, 3, 4, 5, ..., 69, 70, 71 Next
View previous topic :: View next topic
The time now is Tue Dec 02, 2008 6:16 am | All times are GMT
navigation Forum index » Databases » PostgreSQL
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts to_char number format with optional decimal-point? Martin T. Oracle 3 Thu Jul 20, 2006 10:53 am
No new posts strange behaviour using to_char to return daynumber mich (at work) Oracle 4 Mon Apr 24, 2006 12:40 pm
No new posts to_char not returning 'day' value without leading zero Kevin Blount Oracle 3 Thu Apr 06, 2006 9:32 pm
No new posts to_char syntax Liz J Oracle 6 Thu Feb 23, 2006 12:10 am
No new posts to_char (33, '0009') adds an extra white space Günther De Vogelaere Oracle 2 Mon Jan 09, 2006 1:03 pm

Mobile Phones | Internet Advertising | Debt Help | Personal Loans | Myspace Layouts
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.9107s ][ Queries: 16 (0.7496s) ][ GZIP on - Debug on ]