On Tue, Dec 20, 2011 at 05:29:15AM -0700, Scott Marlowe wrote:
On Tue, Dec 20, 2011 at 2:05 AM, Louis-David Mitterrand
vindex+lists-pgsql-gene...@apartia.org wrote:
Hi,
To provide my forum users with a 'timezeone' preference in their profile
how can I use postgresql's internal table
Hi,
To provide my forum users with a 'timezeone' preference in their profile
how can I use postgresql's internal table of timezones ?
I found a reference to it here:
http://www.postgresql.org/docs/7.2/static/timezones.html
but not in recent versions docs.
Thanks,
--
Sent via pgsql-general
Hi,
I have an empty parent 'price' table with several partitioned child
tables that contain the actual data.
How can I reference the parent 'price' table in a FK? When I try I get a
FK violation. Is that expected behavior? Is there another way to do it?
Thanks,
--
Sent via pgsql-general
Hi,
I noticed that in a pl/pgsql function FOUND is not set after an
EXECUTE ... into var;
Bug or feature?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, Sep 16, 2010 at 10:12:57AM -0400, Tom Lane wrote:
Louis-David Mitterrand vindex+lists-pgsql-gene...@apartia.org writes:
I noticed that in a pl/pgsql function FOUND is not set after an
EXECUTE ... into var;
Bug or feature?
It's behaving as documented:
http
Hi,
This works:
critik=# select current_timestamp::abstime::int4 as score order by
score;
This doesn't:
critik=# select current_timestamp::abstime::int4 as score order by
score + 1;
ERROR: column score does not exist
LINE 1:
On Wed, Jan 14, 2009 at 06:31:55PM +0700, dbalinglung wrote:
what for of the syntax command +1 on order by ? maybe just wrong to
given result about the error query on order by, it's BUG ?
*PARSE ERROR*
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to
On Wed, Jan 14, 2009 at 12:06:47PM +0100, A. Kretschmer wrote:
In response to Louis-David Mitterrand :
Hi,
This works:
critik=# select current_timestamp::abstime::int4 as score order by
score;
This doesn't:
critik=# select current_timestamp::abstime::int4 as score
On Wed, Jan 14, 2009 at 05:53:57AM -0800, Lennin Caro wrote:
--- On Wed, 1/14/09, Louis-David Mitterrand
vindex+lists-pgsql-gene...@apartia.org wrote:
From: Louis-David Mitterrand vindex+lists-pgsql-gene...@apartia.org
Subject: Re: [GENERAL] inconsistency in aliasing
To: pgsql-general
Hello,
When changing a view in my mod_perl (mason) application I typically get
this error if I don't restart apache:
DBD::Pg::st execute failed: ERROR: cached plan must not change result
type
Is there a way to avoid having to restart apache?
Thanks,
--
http://www.critikart.net
--
Hi,
Running this query:
critik=# select distinct pt.type_fr,sum(e2.id_event) from person_type
pt natural join person_to_event join event e using (id_event) LEFT JOIN event
e2 ON e.id_event = e2.id_event AND e2.id_event=219 join event_type et ON
e.id_event_type = et.id_event_type where
On Thu, Sep 25, 2008 at 11:01:08AM -0400, Tom Lane wrote:
Louis-David Mitterrand [EMAIL PROTECTED] writes:
critik=# select distinct pt.type_fr,sum(e2.id_event) from person_type
pt natural join person_to_event join event e using (id_event) LEFT JOIN
event e2 ON e.id_event = e2.id_event
On Fri, Jan 25, 2008 at 12:17:16AM -0500, Tom Lane wrote:
Louis-David Mitterrand [EMAIL PROTECTED] writes:
CREATE UNIQUE INDEX visit_idx ON visit_buffer USING btree (id_session,
id_story, created_on::date);
psql:visit_pkey.sql:5: ERROR: syntax error at or near
Hi,
To constraint unique'ness of my visitors to a 24h periode I tried
created a index including the 'date' part of the created_on timestamp:
CREATE UNIQUE INDEX visit_idx ON visit_buffer USING btree (id_session,
id_story, created_on::date);
psql:visit_pkey.sql:5:
On Wed, Dec 19, 2007 at 08:14:17PM -0500, Tom Lane wrote:
Richard Huxton [EMAIL PROTECTED] writes:
I'm not sure that (CURRENT_DATE AT TIME ZONE 'UTC') does what you think
it does. Try setting your timezone to various offsets and exploring.
In fact, I think it's adjusting in exactly the
Hi,
when trying:
psql template1 -c select date_part('epoch',current_date at time zone 'UTC');
date_part
1198015200
the result is different from
perl -MDateTime -le 'print DateTime-today(time_zone = UTC)-epoch;'
1198022400
Is there an issue with postgresql?
This new query of mine pegs beta4, it doesn't return and CPU is at 100%:
select l.id_location,l.name,
a.city
from location l, address a, show_date x, show s, show s2
where (l.id_address = a.id_address
On Sat, Dec 15, 2007 at 12:39:30PM -0500, Tom Lane wrote:
Louis-David Mitterrand [EMAIL PROTECTED] writes:
This new query of mine pegs beta4, it doesn't return and CPU is at 100%:
select l.id_location,l.name,
a.city
from location l, address
Hi,
While upgrading from 8.3-beta3 to beta4, postgres complained that the
database format was not supported. I had to restore from backup.
Was that intended? I didn't see any beta4 announcement on -general or
-hackers.
---(end of broadcast)---
On Fri, Aug 10, 2007 at 04:59:52PM -0400, Tom Lane wrote:
Karsten Hilbert [EMAIL PROTECTED] writes:
On Fri, Aug 10, 2007 at 10:11:29AM +0200, Louis-David Mitterrand wrote:
So if I understand correctly, a timestamp_tz is ...
... stored as UTC in the backend
... sent to clients shifted
On Thu, Aug 09, 2007 at 10:49:38AM -0500, Scott Marlowe wrote:
On 8/9/07, Louis-David Mitterrand
[EMAIL PROTECTED] wrote:
Hi,
After our 7.4 to 8.2 upgrade using debian tools, we realized that some
of our timestamps with tz had shifted:
For example '2007-04-01 00:00:00+02' became
Hi,
After our 7.4 to 8.2 upgrade using debian tools, we realized that some
of our timestamps with tz had shifted:
For example '2007-04-01 00:00:00+02' became '2007-03-31 23:00:00+01'
which is on a different month. Some of our applications were severely
disturbed by that.
Has anyone noticed
On Fri, Jul 06, 2007 at 08:02:54PM +0400, Viatcheslav Kalinin wrote:
Louis-David Mitterrand wrote:
# select start_date from show_date
# order by
# case when start_date CURRENT_DATE then start_date end desc,
# case when start_date = CURRENT_DATE then start_date end asc;
But... this works
On Fri, Jul 06, 2007 at 08:02:54PM +0400, Viatcheslav Kalinin wrote:
# select start_date from show_date
# order by
# case when start_date CURRENT_DATE then start_date end desc,
# case when start_date = CURRENT_DATE then start_date end asc;
The strange thing is when I try:
select
Hi,
I am trying the following:
critik=# select start_date from show_date order by case when start_date
CURRENT_DATE then start_date desc else start_date asc end;
ERROR: syntax error at or near desc
LINE 1: ...se when start_date CURRENT_DATE then start_date desc else
Hello,
To support a forum application I have a forum table:
Column|Type
-+-
created_by | integer
created_on | timestamp without time zone
modified_by | integer
modified_on |
Hi,
I'm trying to implement a forum with mason and postgresql. What is the
typical database schema of a forum (threaded or flat) application?
Thanks,
---(end of broadcast)---
TIP 6: explain analyze is your friend
Hello,
For a select array(...) as col1, col2, col3 from table I'd like the DBI
driver to output col1 as a perl array instead of a scalar
{res1,res2,etc.} representation of it.
Is that somehow possible? I looked at the docs without finding anything.
Thanks,
---(end of
Hello,
We tried upgrading a 7.4 base to 8.2 and found many issues with the
triggers. What are the main changes in the pl/pgsql syntax or contraints
checking between these two version?
Thanks,
---(end of broadcast)---
TIP 2: Don't 'kill -9' the
Hi,
Is there a way (from DBI) to deduce a sequence name from the table and
column it is attached to?
For instance:
Column| Type |Modifiers
On Tue, Dec 20, 2005 at 10:31:46AM -0500, Tom Lane wrote:
Louis-David Mitterrand [EMAIL PROTECTED] writes:
Is there a way (from DBI) to deduce a sequence name from the table and
column it is attached to?
Since 8.0 you can use pg_get_serial_sequence(), see
http://www.postgresql.org/docs
Is it against the SQL standard to accept a trailing comma in a table
declaration?
CREATE TABLE "currency" (
currency_id varchar(3),
rate float, BOOM! parse error
);
As in perl, it would make life easier to simply ignore/accept a trailing
comma on table declarations.
On Fri, Apr 20, 2001 at 03:42:24PM -0400, [EMAIL PROTECTED] wrote:
Hey folks, I sent out this question a while back without
ever getting an answer, so here I go again :)
Has anyone managed to compile a trusted plperl interpreter
into postgres? The Opcode stuff which blocks the use of
On Mon, Feb 26, 2001 at 11:53:51AM -0800, Norman J. Clarke wrote:
Hello,
I am attempting to write a trigger function or rule in pl/pgsql that runs
on UPDATE to a table named "nodes". From inside this trigger, I would like
to UPDATE the same "nodes" table. How can I do this without entering
With 7.1b4:
test=# create table auction_type(id serial,login text,birthday timestamp);
test=# create table auction(unique(login)) inherits("auction_type");
ERROR: inherited attribute "login" cannot be a PRIMARY KEY because it is not marked
NOT NULL
But I didn't ask that "login" be a PRIMARY
Why does a SELECT apply to all tables, including inherited ones and not
UPDATEs or DELETEs? Is there a way to UPDATE a whole table hierarchy in
one fell swoop?
TIA
--
HIPPOLYTE: Donnerai-je l'exemple à la témérité ?
Et dans un fol amour ma jeunesse embarquée...
On Thu, Feb 22, 2001 at 02:45:46PM +0100, Louis-David Mitterrand wrote:
Why does a SELECT apply to all tables, including inherited ones and not
UPDATEs or DELETEs? Is there a way to UPDATE a whole table hierarchy in
one fell swoop?
Oops, I take that back; indeed it UPDATEs and DELETEs apply
Inside a plpgsql function trigger, is it possible to a loop over all
fields of the NEW record (and inspect their value) without knowing in
advance from which table NEW will come?
I am trying the following:
DROP FUNCTION arch_func();
CREATE FUNCTION arch_func() RETURNS opaque AS '
DECLARE
Hello,
In our app we must keep a trace of all changes (UPDATEs) done to an
important_table, so that it's possible to get a snapshot of a given
record at a given date.
The implementation strategy we are thinking about:
1. create an important_table_archive which inherits from
important_table,
In the app we are developing the concept of an address will occur very
often on many tables (vendor, clients, employees, etc.) so we are
looking to avoid code duplication by centralizing the addresses in one
table. However I once read on one of the pgsql- lists that one could use
a table name as
in perl (even better: mod_perl),
- uses the DBI interface,
Does such a beast exist? I am in the process of writing one, so I
thought I'd check first...
Thanks in advance,
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org
"Kill a man, and you are an assassin. Kill mil
t for NULL, then run DatumGetFloat64() on it? Isn't there a
simpler way?
Thanks in advance for your help, cheers,
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org
Hand, n.:
A singular instrument worn at the end of a human arm and
commonly thrust in
of programming such tasks? Write a backend
function (in pl/sql or C) and call it from a cron job? From a mod_perl
handler?
Thanks in advance for any insight, cheers,
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org
178562 | vindex| 57500 | 2000-08-17 12:26:25+02
178592 | papy | 6 | 2000-08-17 12:26:52+02
178593 | vindex| 62500 | 2000-08-17 12:26:52+02
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org
Linux: The Ultimate NT Service Pack
On Sat, Aug 12, 2000 at 12:15:26PM -0400, Tom Lane wrote:
Louis-David Mitterrand [EMAIL PROTECTED] writes:
When "seller_locale" is, for instance, "de_DE", then I get theses
errors:
ERROR: Bad float8 input format '0.05'
Is Postgres expecting the float as 0,
not always!) from a C trigger.
Thanks in advance for any help,
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.org
"Kill a man, and you are an assassin. Kill millions of men, and you
are a conqueror. Kill everyone, and you are a god." -- Jean Rostand
to this function to open a LOB?
The aim is to be able to read a LOB from a postgres DB without having to
lo_export the object to a file first. Can that be done with the
$dbh-func() interface? (using lo_open, lo_read, etc ..)
TIA
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr
Hi, I am
On Sun, Jun 04, 2000 at 03:46:53AM +0200, Peter Eisentraut wrote:
Louis-David Mitterrand writes:
When creating a child (through CREATE TABLE ... INHERIT (parent)) it
seems the child gets all of the parent's contraints _except_ its PRIMARY
KEY. Is this normal?
It's kind of a bug
When creating a child (through CREATE TABLE ... INHERIT (parent)) it
seems the child gets all of the parent's contraints _except_ its PRIMARY
KEY. Is this normal? Should I add a PRIMARY KEY(id) statement each time
I create an inherited table?
Cheers,
--
Louis-David Mitterrand - [EMAIL
On Sat, Jun 03, 2000 at 05:22:56PM +0200, Louis-David Mitterrand wrote:
When creating a child (through CREATE TABLE ... INHERIT (parent)) it
seems the child gets all of the parent's contraints _except_ its PRIMARY
KEY. Is this normal? Should I add a PRIMARY KEY(id) statement each time
I
help,
PS: I noticed the mbox downloads are broken in the mailing-list archives
on postgresql.org and there is no search interface. I'd be willing to
host one but first I need to be able to download the mboxes ;-)
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr
After creating a trigger on an insert I get this error:
auction= insert into bid values('mito',3,354);
NOTICE: you bid the exact increment of 5
ERROR: fmgr_info: function 38667: cache lookup failed
And the insert is not performed as it should. What does this error mean?
TIA
--
Louis-David
Is this a known problem?
template1= \copy
psql: xstrdup: cannot duplicate null pointer (internal error)
styx:~%
using PG 7.0-beta5 on Linux
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr
d table would be set to 0.1 _except_ the
newly inserted row.
Am I missing something obvious?
TIA
--
Louis-David Mitterrand - [EMAIL PROTECTED] - http://www.apartia.fr
54 matches
Mail list logo