Re: [GENERAL] sintax error in script

2010-05-29 Thread Alban Hertroys
On 29 May 2010, at 3:09, Luis Daniel Lucio Quiroz wrote:

> pgsql is telling me /-- END has a sintax error,
> just to confirm, is it okay if i get rid of that line?


Yes, that's a syntax error alright, what did you intend to write there? A 
comment maybe? You should be fine just removing the '/' at the start of the 
line.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4c00decd10151812910245!



-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: [GENERAL] hi,for help!

2010-05-29 Thread Ashesh Vashi
[Adding pgsql-general...]
Please CC to pgsql-general..
(Use reply-all...)

On Sat, May 29, 2010 at 2:31 PM, zhenyang guo  wrote:

> hi,Ashesh,  i did as you said ,it still gives problem. information from the
> terminal is following:
>
> " postg...@guo-desktop:~$ psql -l
>
> psql: FATAL:  database "postgres" does not exist
>
What is the output of this command:
psql -l template1



> postg...@guo-desktop:~$ psql --version
> psql (PostgreSQL) 8.4.4
> contains support for command-line editing
> postg...@guo-desktop:~$
>
> "
> it's kind of contradictory.and  also in  the phppgadmin interface  i can't
> find the postgres either.
>
That's strange.

--
Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company


Re: [GENERAL] Error of text2ltree

2010-05-29 Thread Tom Lane
Vu Hong Thuan  writes:
> I can't use text2ltree. Any suggestion? Thanks.
> SELECT text2ltree('abc'). It's okay. But, got error if:

> SELECT text2ltree(to_char(243, '0999'))

>  Error **

> ERROR: syntax error at position 0 SQL state: 42601

I think ltree doesn't allow spaces in the input.

regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] there is a way to deactivate type validation on 8.3.1????

2010-05-29 Thread erobles



On 05/28/2010 04:58 PM, Adrian Klaver wrote:

On Friday 28 May 2010 1:34:24 pm erobles wrote:
   

On 05/28/2010 03:18 PM, alvherre wrote:
 

Excerpts from erobles's message of vie may 28 16:08:23 -0400 2010:
   

it did'nt work  :-(  , because the script is  for  pg 8.2 and i have pg
7.2 and the table  pg_cast doesn't exist.  whatever is a good idea but i
need  to know the   table or tables  on postgres 7.2.
 

Of course it didn't work if you tried to run it in 7.2; you're supposed
to run it in the 8.3 server, not the old one.  The point is to make 8.3
sort-of compatible with the old behavior.
   

did you see the script?

didn't  it work because the  first command is a psql  pointing a pg
server 8.2
the second command is a psql pointing a pg server 8.3
then  the command  are executed   and  get the differences
after that  made the  properly casting fucntions


this result ok , because the postgres 8.x.x have the same database
catalog in this case have the table pg_cast
so the query works  OK.



the problem in the postgres 7.2   doesn't exists  the table pg_cast so i
can't get the information need it to  get the differences

so, i need  modify the first command  run it and get the  info in the
same format to get it.
 

I believe you are looking at the wrong file; the shell script. Try instead the
other link http://wiki.postgresql.org/wiki/Image:Pg83-implicit-casts.sql It
contains the functions you need.

   

thanks!




--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Fedora 13 and yum.pgsqlrpms.org

2010-05-29 Thread Jerry LeVan
Will the repository be updated for Fedora 13 in the
near future :)

I had to disable the repo because yumex croaks when it
cannot find the repository.

Jerry 


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-05-29 Thread Bill Moran

On 5/28/10 8:43:48 PM, Tom Wilcox wrote:

I ran this query:

EXPLAIN ANALYZE UPDATE nlpg.match_data SET org = org;

And I got this result:

"Seq Scan on match_data  (cost=0.00..9762191.68 rows=32205168 width=206)
(actual time=76873.592..357450.519 rows=2961 loops=1)"
"Total runtime: 8028212.367 ms"


That would seem to indicate that the problem is in your Python
functions.

Some ideas for next steps:
* Perhaps it's just a few rows that have data in them that the
  function has difficulty with.  Add some debugging/logging to
  the function and see if the row it bombs on has anything unusual
  in it (such as a very large text field)
* While large, that function is fairly simplistic.  You may want
  to consider rewriting it as an SQL function, which should be
  more efficient in any event.




On 28 May 2010 19:39, Tom Wilcox mailto:hungry...@googlemail.com>> wrote:

Oops. Sorry about that.

I am having this problem with multiple queries however I am
confident that a fair number may involve the custom plpython
"normalise" function which I have made myself. I didn't think it
would be complicated enough to produce a memory problem.. here it is:

-- Normalises common address words (i.e. 'Ground' maps to 'grd')
CREATE OR REPLACE FUNCTION normalise(s text) RETURNS text AS $$
ADDR_FIELD_DELIM = ' '

# Returns distinct list without null or empty elements
def distinct_str(list):
 seen = set()
 return [x for x in list if x not in seen and not seen.add(x)
and x!=None and len(x)>0]

# normalise common words in given address string
def normalise(match_data):
 if match_data==None: return ''
 import re
 # Tokenise
 toks = distinct_str(re.split(r'\s', match_data.lower()))
 out = ''
 for tok in toks:
 ## full word replace
 if tok == 'house' : out += 'hse'+ADDR_FIELD_DELIM
 elif tok == 'ground' : out += 'grd'+ADDR_FIELD_DELIM
 elif tok == 'gnd' : out += 'grd'+ADDR_FIELD_DELIM
 elif tok == 'front' : out += 'fnt'+ADDR_FIELD_DELIM
 elif tok == 'floor' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'floors' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'flrs' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'fl' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'basement' : out += 'bst'+ADDR_FIELD_DELIM
 elif tok == 'subbasement' : out += 'sbst'+ADDR_FIELD_DELIM
 elif tok == 'bsmt' : out += 'bst'+ADDR_FIELD_DELIM
 elif tok == 'lbst' : out += 'lower bst'+ADDR_FIELD_DELIM
 elif tok == 'street' : out += 'st'+ADDR_FIELD_DELIM
 elif tok == 'road' : out += 'rd'+ADDR_FIELD_DELIM
 elif tok == 'lane' : out += 'ln'+ADDR_FIELD_DELIM
 elif tok == 'rooms' : out += 'rm'+ADDR_FIELD_DELIM
 elif tok == 'room' : out += 'rm'+ADDR_FIELD_DELIM
 elif tok == 'no' : pass
 elif tok == 'number' : pass
 elif tok == 'and' : out += '&'+ADDR_FIELD_DELIM
 elif tok == 'rear' : out += 'rr'+ADDR_FIELD_DELIM
 elif tok == 'part' : out += 'pt'+ADDR_FIELD_DELIM
 elif tok == 'south' : out += 's'+ADDR_FIELD_DELIM
 elif tok == 'sth' : out += 's'+ADDR_FIELD_DELIM
 elif tok == 'north' : out += 'n'+ADDR_FIELD_DELIM
 elif tok == 'nth' : out += 'n'+ADDR_FIELD_DELIM
 elif tok == 'west' : out += 'w'+ADDR_FIELD_DELIM
 elif tok == 'wst' : out += 'w'+ADDR_FIELD_DELIM
 elif tok == 'east' : out += 'e'+ADDR_FIELD_DELIM
 elif tok == 'est' : out += 'e'+ADDR_FIELD_DELIM
 elif tok == 'first' : out += '1st'+ADDR_FIELD_DELIM
 elif tok == 'second' : out += '2nd'+ADDR_FIELD_DELIM
 elif tok == 'third' : out += '3rd'+ADDR_FIELD_DELIM
 elif tok == 'fourth' : out += '4th'+ADDR_FIELD_DELIM
 elif tok == 'fifth' : out += '5th'+ADDR_FIELD_DELIM
 elif tok == 'sixth' : out += '6th'+ADDR_FIELD_DELIM
 elif tok == 'seventh' : out += '7th'+ADDR_FIELD_DELIM
 elif tok == 'eighth' : out += '8th'+ADDR_FIELD_DELIM
 elif tok == 'ninth' : out += '9th'+ADDR_FIELD_DELIM
 elif tok == 'tenth' : out += '10th'+ADDR_FIELD_DELIM
 elif tok == 'eleventh' : out += '11th'+ADDR_FIELD_DELIM
 elif tok == 'twelfth' : out += '12th'+ADDR_FIELD_DELIM
 elif tok == 'thirteenth' : out += '13th'+ADDR_FIELD_DELIM
 elif tok == 'fourteenth' : out += '14th'+ADDR_FIELD_DELIM
 elif tok == 'fifteenth' : out += '15th'+ADDR_FIELD_DELIM
 elif tok == 'sixteenth' : out += '16th'+ADDR_FIELD_DELIM
 elif tok == 'seventeenth' : out += '17th'+ADDR_FIELD_DELIM
 elif tok == 'eighteenth' : out += '18th'+ADDR_FIELD_DELIM
 elif tok == 'nineteenth' : out += '19

[GENERAL] child/parent creation

2010-05-29 Thread Dennis Gearon
Is it possible to create a complex schema object in one transaction, using 
prepared statements to protect(somewaht) against SQL injection?

Example: A 'family tree object' (having obvious relationships) consisting of:

Table grandparent
Table parent
table childA
table childB

If I have all the information for each 'sub-object' in the 'family tree 
object', but of course, the primary, integer, sequence keys.

So, using a script language, the procedure I'm doing now is creating one node, 
getting the id with another query (because of a (reported and actual) bug in 
the Doctrine ORM), and then creating the next level down.

My application has nothing to do with family trees, actually, just an example.


each of the (relevant) primary keys is a BIGSERIL, sequence backed, BIGINT.

Can the whole three level, 4 member hierarchy be created in one, prepared 
statement(to avoid SQL injection), transaction without shuttling any 
information back and forth between the database and the calling script?

Thanks in advance.

Dennis Gearon

Signature Warning

EARTH has a Right To Life,
  otherwise we all die.

Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] child/parent creation

2010-05-29 Thread Justin Graf
On 5/29/2010 1:05 PM, Dennis Gearon wrote:
> Is it possible to create a complex schema object in one transaction,
I'm not sure i understand what you mean by schema object

> using prepared statements to protect(somewaht) against SQL injection?
>

In short no

Prepared statements do  not protect from SQL injection.  Prepared 
statements are used to skip the planning stage of the query.

There are really only two ways to block SQL injection   parameterized 
queries or  check/remove command characters from the query sent to the DB


> Example: A 'family tree object' (having obvious relationships) consisting of:
>
> Table grandparent
> Table parent
> table childA
> table childB
>
> If I have all the information for each 'sub-object' in the 'family tree 
> object', but of course, the primary, integer, sequence keys.
>
> So, using a script language, the procedure I'm doing now is creating one 
> node, getting the id with another query (because of a (reported and actual) 
> bug in the Doctrine ORM), and then creating the next level down.
>
> My application has nothing to do with family trees, actually, just an example.
>
>
> each of the (relevant) primary keys is a BIGSERIL, sequence backed, BIGINT.
>
>

I do not understand what you are trying to do here, please clarify







All legitimate Magwerks Corporation quotations are sent in a .PDF file 
attachment with a unique ID number generated by our proprietary quotation 
system. Quotations received via any other form of communication will not be 
honored.

CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally 
privileged, confidential or other information proprietary to Magwerks 
Corporation and is intended solely for the use of the individual to whom it 
addresses. If the reader of this e-mail is not the intended recipient or 
authorized agent, the reader is hereby notified that any unauthorized viewing, 
dissemination, distribution or copying of this e-mail is strictly prohibited. 
If you have received this e-mail in error, please notify the sender by replying 
to this message and destroy all occurrences of this e-mail immediately.
Thank you.
<>
-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] child/parent creation

2010-05-29 Thread Richard Broersma
On Sat, May 29, 2010 at 11:05 AM, Dennis Gearon  wrote:

> Can the whole three level, 4 member hierarchy be created in one, prepared 
> statement(to avoid SQL injection), transaction without shuttling any 
> information back and forth between the database and the calling script?

Not yet, but possible in 9.1 this can be done using write-able CTEs if
they are accepted.

http://pgexperts.com/document.html?id=38

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread Richard Broersma
This might be a premature question considering write-able CTEs are not
in core, but...

I wondering if write-able CTE's will be the silver bullet that will
make rule based update-able views based multiple vertically
partitioned table robust.  By robust, I mean to elimination the update
anomalies that can occur from the view point client side optimistic
locking where the virtual row appears to be inconsistently updated.



-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Out of Memory and Configuration Problems (Big Computer)

2010-05-29 Thread Tom Wilcox

Thanks Bill,

That sounds like good advice. I am rerunning my query with the python 
function peppered with plpy.notice("msg") call.


Hopefully that'll shed some light on which inputs it's crashing on. Does 
anyone know of a way to measure the memory being consumed by the 
function/query so that I can spot any memory leak. I'm not very good at 
debugging memory leaks..


Failing that, perhaps it is time to rewrite the function in SQL or 
embrace the TSearch2 dictionaries. I was originally intending on 
figuring out a way to extend the ISpell dictionary to match and replace 
those keywords..


Thanks,
Tom

Bill Moran wrote:

On 5/28/10 8:43:48 PM, Tom Wilcox wrote:

I ran this query:

EXPLAIN ANALYZE UPDATE nlpg.match_data SET org = org;

And I got this result:

"Seq Scan on match_data  (cost=0.00..9762191.68 rows=32205168 width=206)
(actual time=76873.592..357450.519 rows=2961 loops=1)"
"Total runtime: 8028212.367 ms"


That would seem to indicate that the problem is in your Python
functions.

Some ideas for next steps:
* Perhaps it's just a few rows that have data in them that the
  function has difficulty with.  Add some debugging/logging to
  the function and see if the row it bombs on has anything unusual
  in it (such as a very large text field)
* While large, that function is fairly simplistic.  You may want
  to consider rewriting it as an SQL function, which should be
  more efficient in any event.




On 28 May 2010 19:39, Tom Wilcox mailto:hungry...@googlemail.com>> wrote:

Oops. Sorry about that.

I am having this problem with multiple queries however I am
confident that a fair number may involve the custom plpython
"normalise" function which I have made myself. I didn't think it
would be complicated enough to produce a memory problem.. here it 
is:


-- Normalises common address words (i.e. 'Ground' maps to 'grd')
CREATE OR REPLACE FUNCTION normalise(s text) RETURNS text AS $$
ADDR_FIELD_DELIM = ' '

# Returns distinct list without null or empty elements
def distinct_str(list):
 seen = set()
 return [x for x in list if x not in seen and not seen.add(x)
and x!=None and len(x)>0]

# normalise common words in given address string
def normalise(match_data):
 if match_data==None: return ''
 import re
 # Tokenise
 toks = distinct_str(re.split(r'\s', match_data.lower()))
 out = ''
 for tok in toks:
 ## full word replace
 if tok == 'house' : out += 'hse'+ADDR_FIELD_DELIM
 elif tok == 'ground' : out += 'grd'+ADDR_FIELD_DELIM
 elif tok == 'gnd' : out += 'grd'+ADDR_FIELD_DELIM
 elif tok == 'front' : out += 'fnt'+ADDR_FIELD_DELIM
 elif tok == 'floor' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'floors' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'flrs' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'fl' : out += 'flr'+ADDR_FIELD_DELIM
 elif tok == 'basement' : out += 'bst'+ADDR_FIELD_DELIM
 elif tok == 'subbasement' : out += 'sbst'+ADDR_FIELD_DELIM
 elif tok == 'bsmt' : out += 'bst'+ADDR_FIELD_DELIM
 elif tok == 'lbst' : out += 'lower bst'+ADDR_FIELD_DELIM
 elif tok == 'street' : out += 'st'+ADDR_FIELD_DELIM
 elif tok == 'road' : out += 'rd'+ADDR_FIELD_DELIM
 elif tok == 'lane' : out += 'ln'+ADDR_FIELD_DELIM
 elif tok == 'rooms' : out += 'rm'+ADDR_FIELD_DELIM
 elif tok == 'room' : out += 'rm'+ADDR_FIELD_DELIM
 elif tok == 'no' : pass
 elif tok == 'number' : pass
 elif tok == 'and' : out += '&'+ADDR_FIELD_DELIM
 elif tok == 'rear' : out += 'rr'+ADDR_FIELD_DELIM
 elif tok == 'part' : out += 'pt'+ADDR_FIELD_DELIM
 elif tok == 'south' : out += 's'+ADDR_FIELD_DELIM
 elif tok == 'sth' : out += 's'+ADDR_FIELD_DELIM
 elif tok == 'north' : out += 'n'+ADDR_FIELD_DELIM
 elif tok == 'nth' : out += 'n'+ADDR_FIELD_DELIM
 elif tok == 'west' : out += 'w'+ADDR_FIELD_DELIM
 elif tok == 'wst' : out += 'w'+ADDR_FIELD_DELIM
 elif tok == 'east' : out += 'e'+ADDR_FIELD_DELIM
 elif tok == 'est' : out += 'e'+ADDR_FIELD_DELIM
 elif tok == 'first' : out += '1st'+ADDR_FIELD_DELIM
 elif tok == 'second' : out += '2nd'+ADDR_FIELD_DELIM
 elif tok == 'third' : out += '3rd'+ADDR_FIELD_DELIM
 elif tok == 'fourth' : out += '4th'+ADDR_FIELD_DELIM
 elif tok == 'fifth' : out += '5th'+ADDR_FIELD_DELIM
 elif tok == 'sixth' : out += '6th'+ADDR_FIELD_DELIM
 elif tok == 'seventh' : out += '7th'+ADDR_FIELD_DELIM
 elif tok == 'eighth' : out += '8th'+ADDR_FIELD_DELIM
 elif tok == 'ninth' : out += '9th'+ADDR_FIELD_DELIM
 elif tok == 'tenth' : out += '

[GENERAL] Installing version 8.4

2010-05-29 Thread Bob Pawley
Hi

I'm having problems installing PostgreSQL 8.4 on Windows 7. (See below)

I downloaded the install from Enterprise DB.

I attempted to install the same app on Windows XP.

Both installs gave the same error message.

Can anyone point me to a PostgreSQL installation for Windows that works?

Can anyone suggest a way around these problems. (Enterprise support has yet to 
answer).

Bob

  
I just downloaded and installed Postgresql 8.4 on Windows 7. 

During the installation there were two error messages. 

One indicated that PGAgent returned and error and the other gave no info but it 
was installing the Stack Builder at the time. 

At the end of the installation I was informed that 2 installations were 
skipped. (no indication of which ones although I assume one was PGAgent) 

When I Attempted to connect the PG Admin to the server it refused the logon 
indicating the Server had not been started - System 5 error. 

I attempted to start the server by right clicking on 'Start' and clicking 'Run 
as administer'. I got a message that there was a Logon problem  = Catch 22. 

It seems that your firm is the only source for PostgreSQL downloads, so, 
perhaps you could suggest a way around these installation errors?? 

Bob Pawley 


Re: [GENERAL] Installing version 8.4

2010-05-29 Thread Adrian Klaver
On Saturday 29 May 2010 3:09:05 pm Bob Pawley wrote:
> Hi
>
> I'm having problems installing PostgreSQL 8.4 on Windows 7. (See below)
>
> I downloaded the install from Enterprise DB.
>
> I attempted to install the same app on Windows XP.
>
> Both installs gave the same error message.
>
> Can anyone point me to a PostgreSQL installation for Windows that works?
>
> Can anyone suggest a way around these problems. (Enterprise support has yet
> to answer).
>
> Bob
>

From here:
http://www.enterprisedb.com/learning/pginst_guide.do

Troubleshooting

If you encounter any problems during installation, please check the logfile 
that 
is created in /tmp on Linux or Mac OS X or %TEMP% on Windows. The file will be 
called install-postgresql.log. The logfile may contain the superuser password 
you specified during the installation, which should be replaced before sharing 
the log with anyone.


Did you look to see if there is anything in the above location that provides 
more information?


-- 
Adrian Klaver
adrian.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Installing version 8.4

2010-05-29 Thread Bob Pawley
Found it in XP it doesn't seem to exist in Windows 7. I can't even find Doc 
and Settings in 7.


It's a large file. I'm not sure what is needed but here is the latter part 
of the file.


Bob

--
From: "Adrian Klaver" 
Sent: Saturday, May 29, 2010 3:54 PM
To: 
Cc: "Bob Pawley" 
Subject: Re: [GENERAL] Installing version 8.4


On Saturday 29 May 2010 3:09:05 pm Bob Pawley wrote:

Hi

I'm having problems installing PostgreSQL 8.4 on Windows 7. (See below)

I downloaded the install from Enterprise DB.

I attempted to install the same app on Windows XP.

Both installs gave the same error message.

Can anyone point me to a PostgreSQL installation for Windows that works?

Can anyone suggest a way around these problems. (Enterprise support has 
yet

to answer).

Bob



From here:
http://www.enterprisedb.com/learning/pginst_guide.do

Troubleshooting

If you encounter any problems during installation, please check the 
logfile that
is created in /tmp on Linux or Mac OS X or %TEMP% on Windows. The file 
will be
called install-postgresql.log. The logfile may contain the superuser 
password
you specified during the installation, which should be replaced before 
sharing

the log with anyone.


Did you look to see if there is anything in the above location that 
provides

more information?


--
Adrian Klaver
adrian.kla...@gmail.com 



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Installing version 8.4

2010-05-29 Thread Adrian Klaver
On Saturday 29 May 2010 4:26:08 pm Bob Pawley wrote:
> Found it in XP it doesn't seem to exist in Windows 7. I can't even find Doc
> and Settings in 7.
>
> It's a large file. I'm not sure what is needed but here is the latter part
> of the file.
>
> Bob
>

Actually I was thinking you might want to browse the file to see if anything 
stands out. Most of the issues I have seen on this list relative to Windows 
installs relate to permissions, so that would be a good place to start. 


-- 
Adrian Klaver
adrian.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Installing version 8.4

2010-05-29 Thread Justin Graf
On 5/29/2010 6:26 PM, Bob Pawley wrote:
> Found it in XP it doesn't seem to exist in Windows 7. I can't even 
> find Doc and Settings in 7.
>
> It's a large file. I'm not sure what is needed but here is the latter 
> part of the file.
>
> Bob
>
***Snip***

Windows 7 and vista move lots of things around

Documents and Settings is in the root directory but normally hidden and 
secured turn on show hidden files/folders and show system 
files/folders.  form the start menu,  type the document name out and the 
OS will find it for you.

Windows Vista was/is the first real attempt by MS to setup a OS in a 
secure manner.  it kinda like having to run sudo in the linux world.  
Still allot of things need to be improved namely the click through 
interface, should be pass worded







All legitimate Magwerks Corporation quotations are sent in a .PDF file 
attachment with a unique ID number generated by our proprietary quotation 
system. Quotations received via any other form of communication will not be 
honored.

CONFIDENTIALITY NOTICE: This e-mail, including attachments, may contain legally 
privileged, confidential or other information proprietary to Magwerks 
Corporation and is intended solely for the use of the individual to whom it 
addresses. If the reader of this e-mail is not the intended recipient or 
authorized agent, the reader is hereby notified that any unauthorized viewing, 
dissemination, distribution or copying of this e-mail is strictly prohibited. 
If you have received this e-mail in error, please notify the sender by replying 
to this message and destroy all occurrences of this e-mail immediately.
Thank you.
<>
-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Installing version 8.4

2010-05-29 Thread Martin Gainty

in windows you'll want to make sure you have at least read access to the binary

%PG_HOME%\bin>attrib pg_ctl.exe


make sure you implement the postgres binaries with the same username that 
postgres used to install the binary..

%PG_HOME%\bin>cacls.exe pg_ctl.exe


Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

> From: adrian.kla...@gmail.com
> To: rjpaw...@shaw.ca
> Subject: Re: [GENERAL] Installing version 8.4
> Date: Sat, 29 May 2010 16:35:31 -0700
> CC: pgsql-general@postgresql.org
> 
> On Saturday 29 May 2010 4:26:08 pm Bob Pawley wrote:
> > Found it in XP it doesn't seem to exist in Windows 7. I can't even find Doc
> > and Settings in 7.
> >
> > It's a large file. I'm not sure what is needed but here is the latter part
> > of the file.
> >
> > Bob
> >
> 
> Actually I was thinking you might want to browse the file to see if anything 
> stands out. Most of the issues I have seen on this list relative to Windows 
> installs relate to permissions, so that would be a good place to start. 
> 
> 
> -- 
> Adrian Klaver
> adrian.kla...@gmail.com
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3

[GENERAL] Re: [GENERAL] hi,for help!

2010-05-29 Thread zhenyang guo
hi ,i got a problem , kinda don't know how to deal with it ,hoping can get
help here ,thanks !
 also to Ashesh  ,firstly, thanks for every favor you did. and  the postgres
must exist ,maybe just present itself for some reason. when i give the
command "
psql -l template1  "

 it was there.
<<<
 List of databases
   Name|  Owner   | Encoding |  Collation  |Ctype|   Access
privileges
---+--+--+-+-+---
 template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
 :
postgres=CTc/postgres
 template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
 :
postgres=CTc/postgres
 test  | guo1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/guo1
 : guo1=CTc/guo1
 test1 | guo1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/guo1
 : guo1=CTc/guo1
 :
test1=CTc/guo1
(4 rows)

>>>

2010/5/29 Ashesh Vashi 

> [Adding pgsql-general...]
> Please CC to pgsql-general..
> (Use reply-all...)
>
> On Sat, May 29, 2010 at 2:31 PM, zhenyang guo wrote:
>
>> hi,Ashesh,  i did as you said ,it still gives problem. information from
>> the terminal is following:
>>
>> " postg...@guo-desktop:~$ psql -l
>>
>> psql: FATAL:  database "postgres" does not exist
>>
> What is the output of this command:
> psql -l template1
>
>
>
>> postg...@guo-desktop:~$ psql --version
>> psql (PostgreSQL) 8.4.4
>> contains support for command-line editing
>> postg...@guo-desktop:~$
>>
>> "
>> it's kind of contradictory.and  also in  the phppgadmin interface  i can't
>> find the postgres either.
>>
> That's strange.
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise Postgres Company
>
>


Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread David Fetter
On Sat, May 29, 2010 at 01:29:50PM -0700, Richard Broersma wrote:
> This might be a premature question considering write-able CTEs are not
> in core, but...
> 
> I wondering if write-able CTE's will be the silver bullet that will
> make rule based update-able views based multiple vertically
> partitioned table robust.  By robust, I mean to elimination the
> update anomalies that can occur from the view point client side
> optimistic locking where the virtual row appears to be
> inconsistently updated.

I'm not sure I understand.  When the concurrency issues in writeable
CTEs get fixed, they could become a mechanism for doing what you
describe, but I suspect there would be significant work involved in
harnessing them to that task.

They'll be pretty nice even without the automated view stuff, though :)

Cheers,
David.
-- 
David Fetter  http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter  XMPP: david.fet...@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread Bruce Momjian
David Fetter wrote:
> On Sat, May 29, 2010 at 01:29:50PM -0700, Richard Broersma wrote:
> > This might be a premature question considering write-able CTEs are not
> > in core, but...
> > 
> > I wondering if write-able CTE's will be the silver bullet that will
> > make rule based update-able views based multiple vertically
> > partitioned table robust.  By robust, I mean to elimination the
> > update anomalies that can occur from the view point client side
> > optimistic locking where the virtual row appears to be
> > inconsistently updated.
> 
> I'm not sure I understand.  When the concurrency issues in writeable
> CTEs get fixed, they could become a mechanism for doing what you
> describe, but I suspect there would be significant work involved in
> harnessing them to that task.
> 
> They'll be pretty nice even without the automated view stuff, though :)

If the user wants to submit it, fine, but neither Tom nor I are excited
about it.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread David Fetter
On Sat, May 29, 2010 at 09:38:30PM -0400, Bruce Momjian wrote:
> David Fetter wrote:
> > On Sat, May 29, 2010 at 01:29:50PM -0700, Richard Broersma wrote:
> > > This might be a premature question considering write-able CTEs
> > > are not in core, but...
> > > 
> > > I wondering if write-able CTE's will be the silver bullet that
> > > will make rule based update-able views based multiple vertically
> > > partitioned table robust.  By robust, I mean to elimination the
> > > update anomalies that can occur from the view point client side
> > > optimistic locking where the virtual row appears to be
> > > inconsistently updated.
> > 
> > I'm not sure I understand.  When the concurrency issues in
> > writeable CTEs get fixed, they could become a mechanism for doing
> > what you describe, but I suspect there would be significant work
> > involved in harnessing them to that task.
> > 
> > They'll be pretty nice even without the automated view stuff,
> > though :)
> 
> If the user wants to submit it, fine, but neither Tom nor I are
> excited about it.

Could you clarify what you mean by, "it" in the sentence above?  At
the developer meeting, we put "Writeable CTEs" as one of the
achievable 9.1 targets, and Tom encouraged me to see that the patch
gets fixed up and resubmitted for the first reviewfest, i.e. the
middle of next month.

Cheers,
David.
-- 
David Fetter  http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter  XMPP: david.fet...@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread Bruce Momjian
David Fetter wrote:
> On Sat, May 29, 2010 at 09:38:30PM -0400, Bruce Momjian wrote:
> > David Fetter wrote:
> > > On Sat, May 29, 2010 at 01:29:50PM -0700, Richard Broersma wrote:
> > > > This might be a premature question considering write-able CTEs
> > > > are not in core, but...
> > > > 
> > > > I wondering if write-able CTE's will be the silver bullet that
> > > > will make rule based update-able views based multiple vertically
> > > > partitioned table robust.  By robust, I mean to elimination the
> > > > update anomalies that can occur from the view point client side
> > > > optimistic locking where the virtual row appears to be
> > > > inconsistently updated.
> > > 
> > > I'm not sure I understand.  When the concurrency issues in
> > > writeable CTEs get fixed, they could become a mechanism for doing
> > > what you describe, but I suspect there would be significant work
> > > involved in harnessing them to that task.
> > > 
> > > They'll be pretty nice even without the automated view stuff,
> > > though :)
> > 
> > If the user wants to submit it, fine, but neither Tom nor I are
> > excited about it.
> 
> Could you clarify what you mean by, "it" in the sentence above?  At
> the developer meeting, we put "Writeable CTEs" as one of the
> achievable 9.1 targets, and Tom encouraged me to see that the patch
> gets fixed up and resubmitted for the first reviewfest, i.e. the
> middle of next month.

Sorry, my mistake.  I thought I was commenting on the psql regression
test suite.  Please ignore.

-- 
  Bruce Momjian  http://momjian.us
  EnterpriseDB http://enterprisedb.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread Richard Broersma
On Sat, May 29, 2010 at 6:25 PM, David Fetter  wrote:

>> I wondering if write-able CTE's will be the silver bullet that will
>> make rule based update-able views based multiple vertically
>> partitioned table robust.  By robust, I mean to elimination the
>> update anomalies that can occur from the view point client side
>> optimistic locking where the virtual row appears to be
>> inconsistently updated.
>
> I'm not sure I understand.

Sorry about that, unreadable text is was happens when I don't proof
read before sending.

>  When the concurrency issues in writeable
> CTEs get fixed, they could become a mechanism for doing what you
> describe, but I suspect there would be significant work involved in
> harnessing them to that task.

Actually I wasn't aware of the concurrency issue of write-able CTE's.
The concern I have specifically relates to update-able views that were
based upon joined tables (using these views was an attempt to hide the
complexity of Generalization Hierarchies from the client side
application).  Updates to these kinds of views can give the appearance
of non-atom updates on the view's virtual row.  Also, if the view's
reported row update count doesn't match what the client side software
expects, the client automatically rolls back the transaction and
reports a concurrent update error.  However, when this happens some of
the underlying rule's update statements were in fact processed, so the
refreshed row in the view appears to have an non-atomic update even
though the client rolls back the transaction.

The following email was my first discovery that these kinds of
update-able view were not get-along well with client side optimistic
locking.

http://archives.postgresql.org/pgsql-odbc/2006-12/msg00029.php

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Write-able CTEs, Update-able views, Hierarchical data, and optimistic locking

2010-05-29 Thread Richard Broersma
On Sat, May 29, 2010 at 8:21 PM, Richard Broersma
 wrote:
> The following email was my first discovery that these kinds of
> update-able view were not get-along well with client side optimistic
> locking.
>
> http://archives.postgresql.org/pgsql-odbc/2006-12/msg00029.php

Actually this link better demonstrates the concern:

http://archives.postgresql.org/pgsql-odbc/2006-12/msg00039.php


-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Re: [GENERAL] hi,for help!

2010-05-29 Thread Ashesh Vashi
Hi,

Looks like, you accidentally deleted the postgresql database.
It can work without the postgres database, you just need to specify the
database name to work with.
i.e. psql test1

--
Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company
On Sun, May 30, 2010 at 6:05 AM, zhenyang guo  wrote:

> hi ,i got a problem , kinda don't know how to deal with it ,hoping can get
> help here ,thanks !
>  also to Ashesh  ,firstly, thanks for every favor you did. and  the
> postgres must exist ,maybe just present itself for some reason. when i give
> the command "
> psql -l template1  "
>
>  it was there.
> <<<
>  List of databases
>Name|  Owner   | Encoding |  Collation  |Ctype|   Access
> privileges
>
> ---+--+--+-+-+---
>  template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>  :
> postgres=CTc/postgres
>  template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>  :
> postgres=CTc/postgres
>  test  | guo1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/guo1
>  :
> guo1=CTc/guo1
>  test1 | guo1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/guo1
>  :
> guo1=CTc/guo1
>  :
> test1=CTc/guo1
> (4 rows)
>
> >>>
>
> 2010/5/29 Ashesh Vashi 
>
> [Adding pgsql-general...]
>> Please CC to pgsql-general..
>> (Use reply-all...)
>>
>> On Sat, May 29, 2010 at 2:31 PM, zhenyang guo wrote:
>>
>>> hi,Ashesh,  i did as you said ,it still gives problem. information from
>>> the terminal is following:
>>>
>>> " postg...@guo-desktop:~$ psql -l
>>>
>>> psql: FATAL:  database "postgres" does not exist
>>>
>> What is the output of this command:
>> psql -l template1
>>
>>
>>
>>> postg...@guo-desktop:~$ psql --version
>>> psql (PostgreSQL) 8.4.4
>>> contains support for command-line editing
>>> postg...@guo-desktop:~$
>>>
>>> "
>>> it's kind of contradictory.and  also in  the phppgadmin interface  i
>>> can't find the postgres either.
>>>
>> That's strange.
>>
>> --
>> Thanks & Regards,
>>
>> Ashesh Vashi
>> EnterpriseDB INDIA: Enterprise Postgres Company
>>
>>
>


[GENERAL] Re: [GENERAL] Re: [GENERAL] hi,for help!

2010-05-29 Thread Scott Marlowe
On Sat, May 29, 2010 at 6:35 PM, zhenyang guo  wrote:
> hi ,i got a problem , kinda don't know how to deal with it ,hoping can get
> help here ,thanks !
>  also to Ashesh  ,firstly, thanks for every favor you did. and  the postgres
> must exist ,maybe just present itself for some reason. when i give the
> command "
> psql -l template1  "
>
>  it was there.
> <<<
>  List of databases
>    Name    |  Owner   | Encoding |  Collation  |    Ctype    |   Access
> privileges
> ---+--+--+-+-+---
>  template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>  :
> postgres=CTc/postgres
>  template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
>  :
> postgres=CTc/postgres
>  test  | guo1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/guo1
>  : guo1=CTc/guo1
>  test1 | guo1 | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/guo1
>  : guo1=CTc/guo1
>  :
> test1=CTc/guo1
> (4 rows)


I think you're confusing the owner with the dbname.  there's not
postgres db.  you can create one:

psql template1
create database postgres;

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] vulnerability of COPY command

2010-05-29 Thread Dennis Gearon
I'm trying to build a way to bulk load from a script to a Dbase, postgres.

Using single, parameterized statements is a pretty good defense against SQL 
injection, so I use Symfony as the main user input.

But for this bulk loading, it's tooo slow.

If I build a text based, COPY file for bulk purposes, to be input via the 
command line, is Postgres vulnerable to SQL injection from that?


Dennis Gearon

Signature Warning

EARTH has a Right To Life,
  otherwise we all die.

Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general