Hello again, please 1 more question:
can I have a SELECT statement inside of an IF-conditional?
The doc
http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html
does not list such an example.
I'm asking, because I'd like to get rid of the has_vip
variable in my rewritten procedu
On Fri, Dec 30, 2011 at 07:35, dhaval jaiswal wrote:
>
> Might be discussed but not clear for the below query.
>
> In async. streaming replication do I need to run VACUUM & ANALYZE on both
> master & slave.
> Bec, while querying on master getting below result, but slave's system table
> is not upd
On 29 Dec 2011, at 19:15, Alexander Farber wrote:
> I'm trying to create PL/pgSQL procedure allowing
> players with enough vip status left
> to give a week of it to other users, as a "gift":
>
> create or replace function pref_move_week(_from varchar,
>_to varchar) returns void as $BODY$
>
I need to convert timestamp to a format with a time zone offset, like this:
select clock_timestamp()::text;
and it returns the following value:
"2011-12-30 11:59:06.538+01"
What is the default format for timestamp::text conversion? I've tried this:
select to_char(clock_timestamp(), '-MM-D
Hello I am trying to migrate a database from 8.4.0 to 9.1.2 on a test
server before updating the production server. When piping the dump file
created with pg_dump in psql I am getting duplicate key errors and the
primary keys on several large tables do not get created. I have read all
the migrati
On Friday, December 30, 2011 6:32:56 am Culley Harrelson wrote:
> Hello I am trying to migrate a database from 8.4.0 to 9.1.2 on a test
> server before updating the production server. When piping the dump file
> created with pg_dump in psql I am getting duplicate key errors and the
> primary keys
They are just your standard sql errors seen in the output of psql mydb <
backup.sql
ALTER TABLE
ERROR: could not create unique index "ht_user_pkey"
DETAIL: Key (user_id)=(653009) is duplicated.
There is a unique index on user_id in the 8..4.0 system and, of course,
only one record for 653009.
On Friday, December 30, 2011 7:49:31 am Culley Harrelson wrote:
> They are just your standard sql errors seen in the output of psql mydb <
> backup.sql
>
>
> ALTER TABLE
> ERROR: could not create unique index "ht_user_pkey"
> DETAIL: Key (user_id)=(653009) is duplicated.
>
> There is a unique
There is not any data in the new database. I have dropped the database,
created the database and then piped in the backup every time.
On Fri, Dec 30, 2011 at 8:06 AM, Adrian Klaver wrote:
> On Friday, December 30, 2011 7:49:31 am Culley Harrelson wrote:
> > They are just your standard sql error
On Friday, December 30, 2011 6:18:05 am Cezariusz Marek wrote:
> I need to convert timestamp to a format with a time zone offset, like this:
>
> select clock_timestamp()::text;
>
> and it returns the following value:
>
> "2011-12-30 11:59:06.538+01"
>
> What is the default format for timestamp:
On 11-12-30 10:49 AM, Culley Harrelson wrote:
They are just your standard sql errors seen in the output of psql mydb
< backup.sql
ALTER TABLE
ERROR: could not create unique index "ht_user_pkey"
DETAIL: Key (user_id)=(653009) is duplicated.
There is a unique index on user_id in the 8..4.0
Adrian Klaver wrote:
> On Friday, December 30, 2011 6:18:05 am Cezariusz Marek wrote:
>> I need to convert timestamp to a format with a time zone offset, like this:
>> select clock_timestamp()::text;
>> and it returns the following value:
>> "2011-12-30 11:59:06.538+01"
>> What is the default forma
On Friday, December 30, 2011 8:12:27 am Culley Harrelson wrote:
> There is not any data in the new database. I have dropped the database,
> created the database and then piped in the backup every time.
>
Well another fine theory shot in the :)
Questions:
1) Have you gone through the plain text
Hi!
> Are you sure there is just one record?
What happens if you grep the backup file for "653009"?
If you do have more than one such record, the quickest way out is to
manually clean it.
Bèrto
--
==
If Pac-Man had affected us as kids, we'd all be running around
On Friday, December 30, 2011 8:19:51 am Cezariusz Marek wrote:
>
> Because I need more control. In this case I need the date in XML format, so
> it will be something like this:
>
> select to_char(clock_timestamp(), '-MM-DD"T"HH24:MI:SSTZ');
So something like this:
test(5432)postgres=#select
I've been asked to stand up a dedicated database server for a new
office. They're only requirement is the server run RHEL 6.2 64-bit. I
told them no problem as I'm very familiar with Linux and installing /
configuring PostgreSQL. So after I've installed RHEL 6.2, I then
installed PostgreSQL and the
This is just the first of many duplicate key errors that cause primary key
creation statements to fail on other tables. I grepped for the key but it
is hard to tell where the problem is with 888 matches.
I will try pg_dump --inserts. It is a 17G file with copy statements so...
this should be int
On Friday, December 30, 2011 8:19:51 am Cezariusz Marek wrote:
>
> Is the timestamp::text format always the same, regardless of the current
> locale and language settings?
Now I have an answer. It can be changed via the DateStyle setting in
postgresql.conf
http://www.postgresql.org/docs/9.1/in
On Friday, December 30, 2011 8:51:17 am Culley Harrelson wrote:
> This is just the first of many duplicate key errors that cause primary key
> creation statements to fail on other tables. I grepped for the key but it
> is hard to tell where the problem is with 888 matches.
>
> I will try pg_dump
I need to convert timestamp to a format with a time zone offset, like this:
select clock_timestamp()::text;
which returns:
"2011-12-30 11:59:06.538+01"
What is the default format for timestamp::text conversion? I've tried this:
select to_char(clock_timestamp(), '-MM-DD HH24:MI:SSTZ');
Bu
Hi:
I am moving my data from windows-mssql to Linux-postgresql, but I'am
still accessing the data from windows using pgoledb - in order to have
compatibility with he old system. Everything is working ok, except when
transactions are involved.
Examining in this list I found the same kind o
I need to convert timestamp to a format with a time zone offset, like this:
select clock_timestamp()::text;
which returns:
"2011-12-30 11:59:06.538+01"
What is the default format for timestamp::text conversion? I've tried this:
select to_char(clock_timestamp(), '-MM-DD HH24:MI:SSTZ');
But
I need to convert timestamp to a format with a time zone offset, like this:
select clock_timestamp()::text;
which returns:
"2011-12-30 11:59:06.538+01"
What is the default format for timestamp::text conversion? I've tried this:
select to_char(clock_timestamp(), '-MM-DD HH24:MI:SSTZ');
But
I need to convert timestamp to a format with a time zone offset, like this:
select clock_timestamp()::text;
which returns:
"2011-12-30 11:59:06.538+01"
What is the default format for timestamp::text conversion? I've tried this:
select to_char(clock_timestamp(), '-MM-DD HH24:MI:SSTZ');
But
Yeah I absolutely despise Gentoo for that exact reason. I don't have
that kind of time and patience to spend on keeping my system up and
running. I've spoken with the team and we've agreed to install Debian
Linux which is my distribution of choice and it supports 9.1.2.
Thanks!
On Fri, Dec 30, 20
I need to convert timestamp to a format with a time zone offset, like this:
select clock_timestamp()::text;
which returns:
"2011-12-30 11:59:06.538+01"
What is the default format for timestamp::text conversion? I've tried this:
select to_char(clock_timestamp(), '-MM-DD HH24:MI:SSTZ');
Bu
Hi,
On Fri, 2011-12-30 at 11:50 -0500, Carlos Mennens wrote:
> My question is how exactly would I
> install the latest version of PostgreSQL (9.1.2) on RHEL 6.2?
We have PostgreSQL yum repository:
http://yum.postgresql.org
Install repository RPM first:
http://yum.postgresql.org/9.1/redhat/rhe
I'm trying to understand what is the recommended data type for $ in
PostgreSQL. I've done some research and from what I've gathered, there
are a few options:
1. decimal
2. money
I've read the 'money' data type is non-standard and I should avoid
using this. I see it a bunch of Microsoft SQL Server
2011/12/30 Devrim GÜNDÜZ :
> Hi,
>
> On Fri, 2011-12-30 at 11:50 -0500, Carlos Mennens wrote:
>> My question is how exactly would I
>> install the latest version of PostgreSQL (9.1.2) on RHEL 6.2?
>
> We have PostgreSQL yum repository:
>
> http://yum.postgresql.org
>
> Install repository RPM first:
This message has been digitally signed by the sender.
Re___GENERAL__Dated_Version_of_PostgreSQL.eml
Description: Binary data
-
Hi-Tech Gears Ltd, Gurgaon, India
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscr
On Friday, December 30, 2011 9:41:18 am Carlos Mennens wrote:
> I'm trying to understand what is the recommended data type for $ in
> PostgreSQL. I've done some research and from what I've gathered, there
> are a few options:
>
> 1. decimal
> 2. money
>
> I've read the 'money' data type is non-st
On Fri, 2011-12-30 at 12:42 -0500, Carlos Mennens wrote:
> Question, how do you keep this package updated?
> Does it auto update when a new version is released and I run the 'yum
> upgrade postgresql' command or do I need to run a special command to
> update off this special repository?
yum updat
Cezariusz Marek wrote:
> I need to convert timestamp to a format with a time zone offset, like this:
> [...]
I'm very sorry for multiple posting, those messages were holded because of some
filters,
and now apparently someone approved them.
--
This message has been digitally signed by the sender.
Re___GENERAL__Dated_Version_of_PostgreSQL.eml
Description: Binary data
-
Hi-Tech Gears Ltd, Gurgaon, India
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscr
On Fri, Dec 30, 2011 at 12:46 PM, Adrian Klaver wrote:
> My guess is it is listed as numeric which is equivalent to decimal:
>
> http://www.postgresql.org/docs/9.1/interactive/datatype-numeric.html
Thanks. I just for some reason can't see or understand the difference
between 'decimal' & 'numeric'
Carlos Mennens writes:
> Thanks. I just for some reason can't see or understand the difference
> between 'decimal' & 'numeric'. Why have two data types for the same
> values? Am I missing something?
There isn't any difference, in Postgres. There are two type names
because the SQL standard requir
Awesome advices here.
Thank you and happy new year.
On Fri, Dec 30, 2011 at 2:07 PM, Alban Hertroys wrote:
> select 1 from pref_users where id=_from and vip > current_timestamp +
> interval '1 week';
>
> if not found then
> return;
> end if;
>
> "found" is a special pl/psql keyword that tel
Whoever you are, you are forging Devrim Gunduz's name to "signed"
reposts of all his posts in pgsql-general. This is at best impolite to
Devrim, and it's annoying everybody else. If it continues I will see
to it that you get removed from this mailing list.
[ latest example attached ]
From:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms710150(v=vs.85).aspx
ODBC type SQL_DECIMAL maps to SQL type DECIMAL(p,s)
Signed, exact, numeric value with a precision of at least p and scale s. (The
maximum precision is driver-defined.) (1 <= p <= 15; s <= p).[4]
ODBC type SQL_N
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of gato pardo
Sent: Friday, December 30, 2011 8:39 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] pgoledb transaction error
Hi:
I am moving my data from windows-mss
Hello,
I have an 8.4.9 table, where users can
assess other users (i.e. "nice" vs. "not nice"):
# \d pref_rep
Table "public.pref_rep"
Column |Type | Modifiers
+-+
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber
Sent: Friday, December 30, 2011 6:16 PM
To: pgsql-general
Subject: [GENERAL] join and having clause
Hello,
I have an 8.4.9 table, where users can
assess ot
Hi
I am struggling with the volume and number of XML files a new application is
storing. The table pg_largeobjects is growing fast, and despite the efforts
of vacuumlo, vacuum and auto-vacuum it keeps on growing in size.
The main tables that hold large objects are partitioned and every few
On Fri, Dec 30, 2011 at 5:03 AM, Magnus Hagander wrote:
> On Fri, Dec 30, 2011 at 07:35, dhaval jaiswal wrote:
>>
>> Might be discussed but not clear for the below query.
>>
>> In async. streaming replication do I need to run VACUUM & ANALYZE on both
>> master & slave.
>> Bec, while querying on m
On Sat, Dec 31, 2011 at 12:06 AM, Scott Marlowe wrote:
> On Fri, Dec 30, 2011 at 5:03 AM, Magnus Hagander wrote:
>> On Fri, Dec 30, 2011 at 07:35, dhaval jaiswal wrote:
>>>
>>> Might be discussed but not clear for the below query.
>>>
>>> In async. streaming replication do I need to run VACUUM &
Hello again,
> On Fri, Dec 30, 2011 at 2:07 PM, Alban Hertroys wrote:
>> select 1 from pref_users where id=_from and vip > current_timestamp +
>> interval '1 week';
>>
>> if not found then
>> return;
>> end if;
>>
unfortunately I get the error in PostgreSQL 8.4.9:
# select pref_move_week('D
Is it because my procedure is declared as "void"?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
47 matches
Mail list logo