| |
thread by: Josh Close |
last post Nov 23 '05 by: Josh Close
I'm having a problem with a value coming out of a loop.
CREATE OR REPLACE FUNCTION funmessagespermintotal()
RETURNS int8 AS
'
DECLARE
this_rServer record;
this_rSum record;
this_iSum bigint;
|
thread by: David Garamond |
last post Nov 23 '05 by: Tom Lane
When a timestamp string input contains a timezone abbreviation (CDT,
PST, etc), which timezone offset is used? The input date's or today
date's? The result on my computer suggests the latter.
# create table ts (ts timestamptz);
# insert into ts values ('2004-10-17 00:00:00 CDT'); -- UTC-5
# insert into ts values ('2004-11-17 00:00:00 CDT');...
|
thread by: Martijn van Oosterhout |
last post Nov 23 '05 by: Martijn van Oosterhout
Hi,
The operating system I run (Linux) comes with many, many timezone files
for many different places in the world. For example:
$ TZ='Australia/Sydney' date
Fri Oct 8 06:15:31 EST 2004
$ TZ='Europe/Amsterdam' date
Thu Oct 7 22:15:38 CEST 2004
$ TZ='Africa/Bissau' date
|
thread by: Mage |
last post Nov 23 '05 by: Scott Marlowe
Hi,
can pgsql acceppt invalid date values? Sometimes it would be nice to
convert 2003-02-29 to 2003-03-01 or to 2003-02-28 automatically instead
of throwing back an error message.
Mage
---------------------------(end of broadcast)---------------------------
|
thread by: snpe |
last post Nov 23 '05 by: Alvaro Herrera
Is it down ?
regards
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
|
thread by: Eric Parusel |
last post Nov 23 '05 by: Eric Parusel
Hello,
I've got a C++ library I need to use, and I want to use it from a pgsql
function.
Would anyone happen to have any examples of how to accomplish something
like this?
I see examples of C-based functions for pgsql (like dbsize, etc, in
contrib).
Which way should I go about this?
|
thread by: Eugeny Balakhonov |
last post Nov 23 '05 by: Gaetano Mendola
Hi!
How to change query priority dynamically?
I have a web site which uses PostgreSQL as a host database and a background
program which uses this database too.
|
| |
thread by: Greg Wickham |
last post Nov 23 '05 by: Greg Wickham
Hi All,
Earlier this year there was a discussion between Tom and Ezra regarding extending 'set session authorization' to facilitate changing
the identity of a connection. A synopsis of the discussion is that Tom felt this was bad and the web application should have more
responsibility for handling session security.
I need to implement some...
|
thread by: Leonardo Francalanci |
last post Nov 23 '05 by: Andrew Sullivan
I read "Chapter 23. Monitoring Database Activity" to monitor postgresql,
but on Solaris it doesn't work. I tried "/usr/ucb/ps", but it doesn't
work either (I only see the postmaster startup parameters). Isn't there
any other solution to see what postgresql instances are doing?
---------------------------(end of...
|
thread by: Thomas Yagel |
last post Nov 23 '05 by: Tom Lane
I have a situtation where a particular table includes a timestamp column and
a id column. The query I am working with right now filters based on
timestamp and orders based on ID.
I have not found enough information about how multicolumn indexes actually
work to determine if one will help me in this case, but I think that it
might.
Right...
|
thread by: Alexander Pucher |
last post Nov 23 '05 by: Marco Colombo
Hi,
given a table with some data, e.g. some monthly measures. Some of the
measures are missing though.
id m1 m2 m3 m4 m5 .... m12
----------------------------------------------
1 23 45 66 76 76 .... 12
|
thread by: Jerry LeVan |
last post Nov 23 '05 by: Jerry LeVan
Hi,
I am getting ready to release a new version of my postgresql
browser and regrettably no longer have access to any
version 7 of postgresql.
I have a static link against the 8.0.0b3 version of libpq
should this still work when accessing a version 7 database?
Thanks
|
thread by: Sim Zacks |
last post Nov 23 '05 by: Michael Fuhr
I am in the process of converting an existing database to PostGreSQL
and wrote a generic script to update all of the sequences as they default at 1.
I thought it would be useful to other people who are converting their
databases.
If anyone can write this script in using plpythonu, I would love to
see how it is done.
create or replace...
|
thread by: David Rysdam |
last post Nov 23 '05 by: Tom Lane
The README from 8.0-beta3 says "This distribution also contains several
language bindings, including C and Tcl" but I'm not finding libpgtcl
being built, nor can I find a way to tell it to. I see pgtcl is on
http://gborg.postgresql.org, so this mean that the README is out of date
and I need to download a separate piece? Does it currently...
|
thread by: Patrick Fiche |
last post Nov 23 '05 by: David Rysdam
Hi,
When I execute a function, I would like psql to show me only RAISE NOTICE
messages but not all function calls....
Indeed, I currently get some messages that I don't care about :
* PL/pgSQL function "adm_user" line 321......
* CONTEXT: SQL query "SELECT....."
|
| |
thread by: Keow Yeong Huat Joseph |
last post Nov 23 '05 by: Josh Close
Hi, Can anyone tell me how to unsubscribe my address from the mailing list.Thanks.
Regards
Joseph
|
thread by: Dev |
last post Nov 23 '05 by: Dev
Hello all,
I am trying to get a total number of rows returned form a query.
SELECT count(this) from table group by this
Currently it is returning x rows with a count of each of the group by.
I need the count of the rows returned!
|
thread by: Net Virtual Mailing Lists |
last post Nov 23 '05 by: Oleg Bartunov
Hello,
If I have a rule like this:
CREATE OR REPLACE RULE sometable_update AS ON UPDATE TO table2 DO UPDATE
cache SET updated_dt=NULL WHERE tablename='sometable';
CREATE OR REPLACE RULE sometable_insert AS ON INSERT TO table2 DO UPDATE
cache SET updated_dt=NULL WHERE tablename='sometable';
CREATE OR REPLACE RULE sometable_delete AS ON...
|
thread by: Stuart Bishop |
last post Nov 23 '05 by: Martijn van Oosterhout
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
I'm trying to determine the best way of saying 'The current time in UTC
with no time zone information'.
I'm currently using CURRENT_TIMESTAMP AT TIME ZONE 'UTC' and inserting
into columns defined as TIMESTAMP WITHOUT TIME ZONE which appears to
|
thread by: Mark Dexter |
last post Nov 23 '05 by: Richard Huxton
In Microsoft SQL Server, I can write an UPDATE query as follows:
update orders set RequiredDate =
(case when c.City IN ('Seattle','Portland') then o.OrderDate + 2 else
o.OrderDate + 1 end)
from orders o
join customers c on
o.Customerid = c.Customerid
where c.region in ('WA','OR')
|
thread by: Eric D. Nielsen |
last post Nov 23 '05 by: Michael Glaesemann
I'm in the process of adding more historic information to one of my
databases. I've liked the theoretical treatment of the concept in
"Temporal Data and the Relational Model", by Date, Darwen, & Lorentzos.
A lot of it is not realizable without a lot of user defined
types/functions/etc. I was wondering if anyone else has tried to use
their...
|
thread by: Mike Mascari |
last post Nov 23 '05 by: Tom Lane
Hello.
I'm writing SQL functions that take an action code and determine the
rows visible by accessing application-maintained privilege tables.
Here's an example:
CREATE FUNCTION sql_areas(bigint) RETURNS SETOF bigint AS '
SELECT _areas.area
FROM _members, _webgroups, _stores, _areas
|
thread by: Andreas |
last post Nov 23 '05 by: Andreas
Hi,
I'd like to store who changed records on some tables.
I'd prefer not to store the username but rather his/her ID.
Will I allways have to run
select usesysid from pg_user where usename=session_user;
or is there a complement to pg_get_userbyid() ?
Can I have this as a default-value for a created_by integer-collumn ?
...
|
| |
thread by: Bambero |
last post Nov 23 '05 by: Thomas F.O'Connell
Postgres returns me 't' or 'f' from boolean field
How to change that it returns me 'true' or 'false'
replace(its, 'f', 'false') AS its
doesn't work
Bambero
|
thread by: Josh Close |
last post Nov 23 '05 by: Bruce Momjian
Is there a way to do "dirty" reads on postgres?
If there is an insert of a million records or so, is there a way to
select from those records before it's committed?
-Josh
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
|