i am doing j2ee project .I am getting list from the user i want to insert
that list into array in postgres DB
by doing this i cannot caste an instance object pgemail to type Type ARRAY
Can we caste the object to array .please tell me
We recently found a couple of rows in a production database
that had identical values in the columns constituting the primary key
(The problem surfaced because a pg_dump could not be restored).
Now I'm looking for explanations how this could happen.
The rows originate from around the time when
On Tue, Feb 23, 2010 at 6:48 AM, Scott Marlowe scott.marl...@gmail.com wrote:
I'm relieved that Postgresql itself does not, in fact, suck, but
slightly disappointed in the behavior of psql. I suppose it needs to
buffer everything in memory to properly format its tabular output,
among other
beulah prasanthi wrote:
i am doing j2ee project .I am getting list from the user i want to
insert that list into array in postgres DB
by doing this i cannot caste an instance object pgemail to type Type
ARRAY
Can we caste the object to array .please tell me
normally, you would want to store
Hi,
I am trying to upgrade to 8.4.2 but my usual compile from source failed
$ ./configure --prefix=/usr/local/pgsql_8.4 --with-pgport=6235 --with-perl
--with-openssl --with-libraries=/usr/local/ssl/lib/
--with-includes=/usr/local/ssl/include/
$ make
$ make check
..
==
Why am I keep getting error with version issues I am trying to restore a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.
[postg...@localhost ~]$ pg_restore -C -d postgres -i isamdb.backup
pg_restore.bin: [archiver] unsupported version (1.11) in file header
On Tue, Feb
I am under the impression that MySQL does not have anything resembling
Postgres' support for regular expressions. Though some might think
that regular expressions are a sort of poor man's SQL, in any
application which manages large amounts of text they are crucial.
Postgres definitely
I realize update operation speed in PostgreSQL doesn't meet my speed
expectation.
Is there any fast alternative to UPDATE? as using fast COPY to INSERT operation.
Thanks!
I am using update in the following case :
CREATE OR REPLACE FUNCTION update_or_insert_statistic(integer, text[], text[],
Hello,
May I take a lull between PG releases to ask an upgrade Q? Documentation and
people often recommend that when doing a major version upgrade, to dump data
from the old server with the new version of pg_dump, since the new pg_dump may
have bugfixes not available to the old.
I've never
Greg Stark wrote:
You can do \set FETCH_COUNT to have psql use a cursor automatically.
It seems like a big win in this case. What would be the downside of
having a fetch_count set default in psql?
regards
Yeb Havinga
--
Sent via pgsql-general mailing list
I am keep getting error of mismatch of pg_dump version. how should one
dealing with different version of pg_dump normally?
C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h 192.168.222.129 -p 5433 -U
postgres -F c -b -v -f C:\Documents and
Settings\steven\Desktop\template.backup template_postgis
2010/2/23 Net Tree Inc. nettree...@gmail.com:
I am keep getting error of mismatch of pg_dump version. how should one
dealing with different version of pg_dump normally?
C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h 192.168.222.129 -p 5433 -U
postgres -F c -b -v -f C:\Documents and
You are correct Tom that I want to perform some portion of function as
postgres user and other portion as current user.
As per you suggestion I did refactor and separated the portion that needs to
be executed as superuser to another function. But the thing is PostGreSQL
recognize when I call this
Hi *,
I have a question according to the implementation of a new index access method
in Postgres. Is it necessary to implement a new resource manager for XLog when
I am trying to achieve a stable new index access method?
I actually don't know how to register a new ressource manager (if I would
On Tue, Feb 23, 2010 at 9:48 AM, Yeb Havinga yebhavi...@gmail.com wrote:
Greg Stark wrote:
You can do \set FETCH_COUNT to have psql use a cursor automatically.
It seems like a big win in this case. What would be the downside of having a
fetch_count set default in psql?
They were mentioned
On Tue, Feb 23, 2010 at 10:00 AM, Carsten Kropf ckro...@fh-hof.de wrote:
I have a question according to the implementation of a new index access
method in Postgres. Is it necessary to implement a new resource manager for
XLog when I am trying to achieve a stable new index access method?
Thanks..
This is what I am confused about. I installed a ver. 8.4 postgresql, why
it's pg_dump is 8.3.9?? For first one, how could this possibly having
problem using pg_dump that comes with the server install??
the first one I backup using pgAdmin III ver. 1.8.4 on a ver 8.3.9
postgreSQL server
Ok, thanks so far.
The main question for me now is how to support all the XLog stuff in my own
access method. I cannot set it up using the WAL recovery procedure. So, what do
I have to insert when doing a XLogInsert for example? I don't know which values
to put in there or doesn't it just
2010/2/23 Net Tree Inc. nettree...@gmail.com:
Thanks..
This is what I am confused about. I installed a ver. 8.4 postgresql, why it's
pg_dump is 8.3.9?? For first one, how could this possibly having problem
using pg_dump that comes with the server install??
Comes with what server install? It
Hi, could anyone please help me to sort out below error. I have spent lot of
time but couldn't resolved it.
mydb= CREATE OR REPLACE FUNCTION test_create()
RETURNS void AS
$BODY$
$cmd = CREATE TABLE test-table(col varchar not null);;
spi_exec_query(CREATE OR REPLACE FUNCTION my_tmp_func()
Hi there,
gush, shouldn't be that complicated. But neither in Postgres, nor in
Access I succeed in getting the result I wish.
I have a couple of times for the Environmental Conventions (Kyoto,
Montreal, CITES etc.). They look like this:
id_country,year,value
4,1992,0
4,1993,0
4,1994,0
On 23 February 2010 11:44, Stefan Schwarzer
stefan.schwar...@grid.unep.ch wrote:
Hi there,
gush, shouldn't be that complicated. But neither in Postgres, nor in Access
I succeed in getting the result I wish.
I have a couple of times for the Environmental Conventions (Kyoto, Montreal,
CITES
On 23/02/10 11:25, dipti shah wrote:
Hi, could anyone please help me to sort out below error. I have spent lot of
time but couldn't resolved it.
ERROR: error from Perl function test_create: syntax error at or near
CREATE at line 3.
spi_exec_query(CREATE OR REPLACE FUNCTION my_tmp_func()
In response to Stefan Schwarzer :
Hi there,
gush, shouldn't be that complicated. But neither in Postgres, nor in Access I
succeed in getting the result I wish.
I have a couple of times for the Environmental Conventions (Kyoto, Montreal,
CITES etc.). They look like this:
On 23 Feb 2010, at 10:26, Yan Cheng CHEOK wrote:
I realize update operation speed in PostgreSQL doesn't meet my speed
expectation.
Is there any fast alternative to UPDATE? as using fast COPY to INSERT
operation.
Well, since an UPDATE is just a DELETE + INSERT and you're already doing
On 23 Feb 2010, at 10:45, Oliver Kohll - Mailing Lists wrote:
Hello,
May I take a lull between PG releases to ask an upgrade Q? Documentation and
people often recommend that when doing a major version upgrade, to dump data
from the old server with the new version of pg_dump, since the new
Select countries.name, basel.year, basel.value, cites.year,
cites.value
From countries
Left Join basel on basel.id_country = countries.id_country and
basel.value=1
Left Join cites on cites.id_country = countries.id_country and
cites.value=1
I would have thought so, but the query turns
On 23 February 2010 13:23, Stefan Schwarzer
stefan.schwar...@grid.unep.ch wrote:
Select countries.name, basel.year, basel.value, cites.year, cites.value
From countries
Left Join basel on basel.id_country = countries.id_country and
basel.value=1
Left Join cites on cites.id_country =
On 23/02/10 09:26, Yan Cheng CHEOK wrote:
I realize update operation speed in PostgreSQL doesn't meet my speed
expectation.
Is there any fast alternative to UPDATE? as using fast COPY to INSERT operation.
No. But you haven't said where the limit is on your operation.
EXECUTE
Select countries.name, basel.year, basel.value, cites.year,
cites.value
From countries
Left Join basel on basel.id_country = countries.id_country and
basel.value=1
Left Join cites on cites.id_country = countries.id_country and
cites.value=1
I would have thought so, but the query turns
On 23 February 2010 13:43, Stefan Schwarzer
stefan.schwar...@grid.unep.ch wrote:
Select countries.name, basel.year, basel.value, cites.year, cites.value
From countries
Left Join basel on basel.id_country = countries.id_country and
basel.value=1
Left Join cites on cites.id_country =
In response to Stefan Schwarzer :
You may also wish to review Andreas' suggestions as they propose a
more sensible table structure rather than having a table for each
convention.
The table proposal really looks nice. But our database is structured
by variable - so each convention has its
Select countries.name, basel.year, basel.value, cites.year,
cites.value
From countries
Left Join basel on basel.id_country = countries.id_country and
basel.value=1
Left Join cites on cites.id_country = countries.id_country and
cites.value=1
I would have thought so, but the query turns
On 23/02/10 09:17, Net Tree Inc. wrote:
Why am I keep getting error with version issues I am trying to restore a
backup file from a 8.4 postgresql server to a 8.3 postgresql server.
Well, an 8.4 dump isn't always going to be compatible with an 8.3
server, is it? If there weren't
In response to Thom Brown :
On 23 February 2010 13:43, Stefan Schwarzer
stefan.schwar...@grid.unep.ch wrote:
Select countries.name, basel.year, basel.value, cites.year, cites.value
From countries
Left Join basel on basel.id_country = countries.id_country and
basel.value=1
Left Join
In response to A. Kretschmer :
In response to Thom Brown :
On 23 February 2010 13:43, Stefan Schwarzer
stefan.schwar...@grid.unep.ch wrote:
Select countries.name, basel.year, basel.value, cites.year, cites.value
From countries
Left Join basel on basel.id_country =
You may also wish to review Andreas' suggestions as they propose a
more sensible table structure rather than having a table for each
convention.
The table proposal really looks nice. But our database is structured
by variable - so each convention has its own table.
It is a really bad design -
dipti shah escribió:
For your reference I did something like this:
1. Create Function foo1 (this is without SECURITY DEFINER where I am
using SET ROLE to current user).
2. Create Function foo2 with SECURITY DEFINER ...
spi_exe_query(select foo1()); == Here it throws the
Oliver Kohll - Mailing Lists oliver.li...@gtwm.co.uk writes:
May I take a lull between PG releases to ask an upgrade Q? Documentation and
people often recommend that when doing a major version upgrade, to dump data
from the old server with the new version of pg_dump, since the new pg_dump
Richard Huxton d...@archonet.com writes:
You're interpolating $cmd here but not quoting it, so you end up with:
... RETURNS void AS CREATE TABLE test-table...
whereas you want:
... RETURNS void AS 'CREATE TABLE test-table...'...
Probably best to use dollar-quoting: $TMP$ or similar, but
On Feb 22, 2010, at 6:47 PM, Greg Smith wrote:
Ben Chobot wrote:
Is it reading it correctly to say that the bgwriter probably wouldn't help
much, because a majority of the dirty pages appear to be popular?
Yes. The background writer cleaner process only does something useful if
there
yeah that's what I means to do.
How do I use 8.4 pg_restore? the DB server I am trying to restore is using
8.3. Do you mean do pg_restore on the same machine that I did pg_dump?? I am
thinking of doing that too, but I am not sure how to do the command.
Is this correct? pg_restore -h (my target
Thanks. Is it by doing these steps I can avoid constrain restriction? for
step 3, how should I modify the schema? and which schema? the target DB's
schema that I am trying to dump the schema and data in? But this is the
problem, I am not sure whats different between the two schema's, there are
I'm not clear when you said that old pg_dump should work fine for this purpose
in practically all cases, so it's not worth your trouble to try to figure out a
workaround. Did you mean that it's OK to use the old version of pg_dump when
you are doing a major version upgrade when working with a
On Tue, Feb 23, 2010 at 00:02, Yang Zhang yanghates...@gmail.com wrote:
Thing is, this is how I got here:
- ran complex query that does SELECT INTO.
- that never terminated, so killed it and tried a simpler SELECT (the
subject of this thread) from psql to see how long that would take.
You
Hi everyone!
Is there a way to construct FOREIGN KEYs from parts of composite-typed field?
The code returns an error:
-
create table aaa (
a_id integer primary key,
a_str varchar)
;
create type content_of_bbb (a_id integer, b_str varchar);
create table
Thanks. Putting $cmd in single quote resolve the error but it generated
other error. :(
mydb= CREATE OR REPLACE FUNCTION test_create()
RETURNS void AS
$BODY$
$cmd = CREATE TABLE testtable(col varchar not null);;
spi_exec_query(CREATE OR REPLACE FUNCTION myfunc() RETURNS void AS
'$cmd'LANGUAGE
Ben Chobot wrote:
Hm, my shared_buffers is already 10GB, but I'm using about 80GB for filesystem
cache. Would a larger shared_buffers make sense? I thought I read somewhere
that 10GB is on the high end of the useful size for shared_buffers.
Yeah, I figured that out when I was analyzing your
No, I tried that but that can't be done in my requirements because my
function has to be run in super user context to create the table in schema
where normal users have only USAGE permissions. If I remove SECURITY DEFINER
then my stored procedure will be failed for all users by saying permission
Belka Lambda lambda-be...@yandex.ru writes:
Is there a way to construct FOREIGN KEYs from parts of composite-typed field?
No, and even if the system let you do it, the performance would probably
suck. Composite-type fields are not something to be used with abandon.
To me your example looks
adam_pgsql adam_pg...@witneyweb.org writes:
I am trying to upgrade to 8.4.2 but my usual compile from source failed
$ make check
== shutting down postmaster ==
On 23 Feb 2010, at 17:41, Tom Lane wrote:
adam_pgsql adam_pg...@witneyweb.org writes:
I am trying to upgrade to 8.4.2 but my usual compile from source failed
$ make check
== shutting down postmaster ==
On 23/02/10 17:15, dipti shah wrote:
Thanks. Putting $cmd in single quote resolve the error but it generated
other error. :(
mydb= CREATE OR REPLACE FUNCTION test_create()
RETURNS void AS
$BODY$
$cmd = CREATE TABLE testtable(col varchar not null);;
spi_exec_query(CREATE OR REPLACE FUNCTION
All
do you clean up the server file by removing them
use
find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print -exec rm -f {} \;
in postgres ?
How to remove the archive log files in postgres ? is the same way as remove
backup files and server log files ?
thanks
Amy
All
do you clean up the server file by removing them
use
find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print -exec rm -f {} \;
in postgres ?
How to remove the archive log files in postgres ? is the same way as remove
backup files and server log files ?
thanks
Amy
Greetings!
I have found references on the Internet to a connection string designer for
npgsql, but I haven't found where to get it. I don't seem to have it with my
download of npgsq. Or am I just looking in the wrong place?
For example,
As Tom says, this doesn't really address my original issue, which was
not that I read the material on encoding and misunderstood it, but that
I didn't even see that material because it was mixed in with a bunch of
other notes on all sorts of random subjects.
To address this issue in the
On Feb 23, 2010, at 11:49 AM, Amy Smith wrote:
All
do you clean up the server file by removing them
use
find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print -exec rm -f {} \;
in postgres ?
How to remove the archive log files in postgres ? is the same way as remove
backup
On Tue, 2010-02-23 at 13:50 -0500, Shu Ho wrote:
All
do you clean up the server file by removing them
use
find $logfile -mtime +$NUMBER_DAYS_TO_KEEP -type f -print -exec rm -f
{} \;
in postgres ?
How to remove the archive log files in postgres ? is the same way as
remove
On Tue, 2010-02-23 at 13:49 -0500, Amy Smith wrote:
All
do you clean up the server file by removing them
use
google logrotate
man logrotate
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
adam_pgsql adam_pg...@witneyweb.org writes:
On 23 Feb 2010, at 17:41, Tom Lane wrote:
That's very peculiar. It looks more like dynamic linker breakage than
Postgres' fault, though. What platform is this (no, the kernel version
doesn't do it for me)? What have you changed since you last
Peter Headland wrote:
In respect of Bruce's proposed changes, I prefer the original wording
(for the same reasons as Tom), but with the addition of the mention of
the server - ... read from or written to a file directly by the
server.
OK, done with the attached patch.
--
Bruce Momjian
I'm looking at the usage count column of pg_buffercache's info, and I'm
confused. Several buffers that supposed have LRU values of 5 belong to
non-unique indices which supposedly have never been used. As I understand
things, that shouldn't happen. Am I missing something?
--
Sent via
On Feb 23, 2010, at 3:06 PM, Ben Chobot wrote:
I'm looking at the usage count column of pg_buffercache's info, and I'm
confused. Several buffers that supposed have LRU values of 5 belong to
non-unique indices which supposedly have never been used. As I understand
things, that shouldn't
Hello,
I have a very simple function that I've created. I can compile it in linux
without any problems. However, I've tried creating a dll for windows and am
not having much luck.
I first tried MSVC 2008 but after seeing some comments have tried compiling
it in MSVC 2005 as well.
In both I get
hi,
i've just noticed the following behaviour and was wondering
if there's any documentation to explain what it's for.
create table tbl(id serial primary key, a text, b text, c text);
insert into tbl(a, b, c) values ('abc', 'def', 'ghi');
insert into tbl(a, b, c) values ('jkl', 'mno',
Quote: However if you have to modify table definitions, you will probably
not be able to import data in that new schema and it will be necesary to
look for a new strategy.
For schema, are we talking about attribute columns (structure of table) and
table definitions referraled you talking about
I see something related with Deferrable and Initially deferrable that seems
like something could avoid constraints when dumping and restore, but it has
to modify the table or re-create all of them to have such option (maybe is
what you referraled table definitions). Is it what it can be use for to
On 02/23/2010 05:07 PM, raf wrote:
i've just noticed the following behaviour and was wondering
if there's any documentation to explain what it's for.
create table tbl(id serial primary key, a text, b text, c text);
insert into tbl(a, b, c) values ('abc', 'def', 'ghi');
insert into
Hi,
On Tue, Feb 23, 2010 at 12:51 AM, Yang Zhang yanghates...@gmail.com wrote:
When running the query in MySQL InnoDB:
$ vmstat 10
procs ---memory-- ---swap-- -io --system--
-cpu--
r b swpd free buff cache si so bi bo in cs us sy id wa
I have tried like this.
But in my case it is not working when trying to access a column that is not
exists in the table.
Example:
CREATE TABLE test_str (te_id text);
INSERT INTO test_str VALUES ('a');
INSERT INTO test_str VALUES ('b');
INSERT INTO test_str VALUES ('c');
SELECT t.name from
Wonderful! Thanks.
On Wed, Feb 24, 2010 at 2:03 AM, Richard Huxton d...@archonet.com wrote:
On 23/02/10 17:15, dipti shah wrote:
Thanks. Putting $cmd in single quote resolve the error but it generated
other error. :(
mydb= CREATE OR REPLACE FUNCTION test_create()
RETURNS void AS
This issue is driving me crazy. Could any one please suggest me any
workaround?
For summary of issue,
1. I don't want any users to perform any action on mydb schema without
using my stored procedure. So I revoke ALL permissions from mydb schema and
assigned only USAGE permissions.
2. As my
Hi,
could you tell me what could be the issue in below command. I could see that
there is an option for changing OWNER of function but not sure why it is
giving this error.
techdb=# ALTER FUNCTION test_create() SET OWNER TO masanip;
ERROR: unrecognized configuration parameter owner
techdb=#
Hi,
Is there any way to get the set of permissions list assigned to user? I want
to know whether user has create table permissions on particular schema or
not?
Thanks in advance,
Jack
Hey, I have read it and current user is 'postgres' and the new_user is also
looks fine but still the same error.
techdb=# select current_user;
current_user
--
postgres
(1 row)
techdb=# CREATE OR REPLACE FUNCTION test_create()
RETURNS void AS
$BODY$
$cmd = CREATE TABLE
Skip the SET-keyword:
ALTER FUNCTION test_create() OWNER TO masanip;
Regards,
Frank
Op 24 feb 2010, om 07:14 heeft Jignesh Shah het volgende geschreven:
Hi,
could you tell me what could be the issue in below command. I could
see that there is an option for changing OWNER of function but
Thanks :) I am going crazy at times.
On Wed, Feb 24, 2010 at 12:04 PM, Frank Heikens frankheik...@mac.comwrote:
Skip the SET-keyword:
ALTER FUNCTION test_create() OWNER TO masanip;
Regards,
Frank
Op 24 feb 2010, om 07:14 heeft Jignesh Shah het volgende geschreven:
Hi,
could you
This is a two-part question:
1) I have a source_text that I want to divide into smaller subunits
that will be contained in rows in a column in a new table. Is it
absolutely certain that the initial order of the rows in the resultant
table after this operation:
CREATE TABLE new_table AS
On Wed, Feb 24, 2010 at 07:51:54AM +0100, John Gage wrote:
This is a two-part question:
1) I have a source_text that I want to divide into smaller subunits
that will be contained in rows in a column in a new table. Is it
absolutely certain that the initial order of the rows in the
2010/2/23 Bryan Montgomery mo...@english.net:
Hello,
I have a very simple function that I've created. I can compile it in linux
without any problems. However, I've tried creating a dll for windows and am
not having much luck.
I first tried MSVC 2008 but after seeing some comments have
John Gage jsmg...@numericable.fr writes:
This is a two-part question:
1) I have a source_text that I want to divide into smaller subunits
that will be contained in rows in a column in a new table. Is it
absolutely certain that the initial order of the rows in the resultant
table after
Thank you very much for this explanation/reply. It precisely answers
my question.
Unfortunately, it prompts a new question. I am using 8.4.2 which I
assume is new enough to trigger a yes response to If you have a
version new enough to have synchronize_seqscans I have
absolutely no
beulah prasanthi wrote:
i [sic] am doing j2ee project .I am getting list from the user i want to
insert that list into array in postgres DB
by doing this i cannot caste an instance object pgemail to type Type
ARRAY
Can we caste the object to array .please tell me
John R Pierce wrote:
84 matches
Mail list logo