Hello, I have a table defined as:
CREATE TABLE demo AS
(
id serial PRIMARY KEY,
start_time timestamp without timezone,
duration integer
)
A sample data set I am working with is:
start_time | duration | end_time
On Sep 10, 9:08 am, jgo...@gmail.com (Jorge Godoy) wrote:
Have you checked the OVERLAPS operator in the documentation?
http://www.postgresql.org/docs/8.4/interactive/functions-datetime.html
--
Jorge Godoy jgo...@gmail.com
On Fri, Sep 10, 2010 at 10:03, Ketema Harris ket...@gmail.com
On Fri, Sep 10, 2010 at 9:40 AM, Ketema ket...@gmail.com wrote:
On Sep 10, 9:08 am, jgo...@gmail.com (Jorge Godoy) wrote:
Have you checked the OVERLAPS operator in the documentation?
http://www.postgresql.org/docs/8.4/interactive/functions-datetime.html
--
Jorge Godoy jgo
Never kill -9. Use kill -INT, whatever signal num that is, 11?
Sent from my iPhone
On Aug 5, 2010, at 3:14 AM, 백승엽 syb...@seriends.com wrote:
Hi.
I am korean database engineer.
my english skill is very poor.
but i desire that you teach this situation.
um...
I am
pg_encoding_to_char
If you see these thigns set to NO even after PostgreSQL support says yes, then
you know you wont be getting all the functions.
Ketema J. Harris
ket...@ketema.net
ket...@jabber.ketema.net (Jabber)
http://www.ketema.net
ket...@voip.ketema.net - VoIP
407-459-4809- main
I have a table defined as
CREATE TABLE mytable
(
carrier varchar,
start_time timestamp with time zone,
call_date date,
cost numeric,
call_length numeric
)
I want to create a query that will generate a the following columns:
carrier, week, sum(call_length) as totallength, sum(cost) as
don't get merged together
Ketema Harris wrote:
I have a table defined as
CREATE TABLE mytable
(
carrier varchar,
start_time timestamp with time zone,
call_date date,
cost numeric,
call_length numeric
)
I want to create a query that will generate a the following columns:
carrier, week, sum
Use dollar quoting around your fiction body I'd double up on the
single quotes around the dash
Sent from my iPhone
On Feb 20, 2009, at 8:14 AM, Eus e...@member.fsf.org wrote:
Hi Ho!
Sorry, let me revise the query a bit. I copied and pasted the
original one from another big query.
---
at or near (
I have tried removing the () and it fails with syntax error at or
near new
non composite column can be assigned to in the trigger just fine:
new.other_columm := 5; --gives no issues
How can a composite column be assigned to inside a trigger?
Thanks
Ketema J. Harris
www.ketema.net
On Dec 18, 2008, at 4:19 PM, Ketema Harris wrote:
The following is a snippet from a trigger i am using:
_mycompositeType.user_id = (OLD).mycompositeType.user_id;
...do some stuff... --notice that assigning from the trigger record
works
but later on...
(new).mycompositeType.transaction_id
, but not
null.
Thanks for the feedback.
Ketema J. Harris
www.ketema.net
ket...@ketema.net
ketemaj on iChat
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Dec 16, 10:31 am, Ivan Pavlov ivan.pav...@gmail.com wrote:
I can't answer your question but I think you may have a serious
database design issue at hand.
Why not try to accomplish your goals in a simpler way?
Regards,
Ivan Pavlov
On Dec 15, 12:49 pm, ket...@ketema.net (Ketema Harris
How often are you using the bank balance value?
I have no data on this as of yet, but it obviously needs to be correct
for when the user looks at it.
The opposite argument, is how long does the computation take?
The computation is simple, however the amount of data that goes into
it
in the end select balance from view or select balance from
table ?
What are the pros cons ?
Thanks
Ketema J. Harris
www.ketema.net
ket...@ketema.net
ketemaj on iChat
inline: kmail.png
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription
not an endless loop)
Table A will have its Before Trig fire again and this time the
criteria causes it to finish with a return new.
Will the second insert into table A commit before the first insert
into table A? What order does the insert into table B finish up?
Ketema J. Harris
www.ketema.net
On Dec 15, 11:25 am, r...@iol.ie (Raymond O'Donnell) wrote:
On 15/12/2008 16:14, Ketema Harris wrote:
if i have a column that is a calculation, say a bank balance - sum of
all the debits and credits...is it more efficient to make a view that
executes the underlying calc query doing
I have the following table set up:
CREATE TABLE states
(
state_id integer NOT NULL DEFAULT nextval
('state_province_id_seq'::regclass),
state character(2),
full_name character varying,
timezone character varying,
CONSTRAINT PK_state_id PRIMARY KEY (state_id)
)
CREATE TABLE
Hello. I performed a pg_dumpall of my 8.1 db cluster and upgraded to
8.2.4. the dump went fine and the script file appears to be fine. I
have a mixture of UTF8 and SQL_ASCII databases in the dump. However I
am not able to restore my data after the upgrade. I performed from
the command line
On May 1, 10:48 pm, [EMAIL PROTECTED] (Tom Lane) wrote:
Ketema [EMAIL PROTECTED] writes:
Is it possible to access a subarray of a multi dimensional array as a
whole?
I think you want an array slice (ie, something with some colons in the
subscripts). See the
manual:http
Is it possible to access a subarray of a multi dimensional array as a
whole?
example:
'{
{
{1,2,3}, {11,22,33}, {111,222,333}
},
{
{4,5,6}, {44,55,66}, {444,555,666}
},
{
{7,8,9}, {77,88,99}, {777,888,999}
i have a record set like below:
num_prods|num_open_issues|num_provisioned|num_canceled
1|0|1|0
2|0|0|2
3|0|1|1
2|0|1|1
1|0|01
2|0|0|0
3|3|0|0
3|0|0|3
3|1|0|2
3|2|0|1
2|0|2|0
Of the list above only row 3 and row 6 should be returned.
Plain english definition:
With a result set like above
Man so simple! is your solution the same as:
num_provisioned num_products AND (num_open_issues + num_provisioned
+ num_canceled) num_prods
which is what i finally came up with
---(end of broadcast)---
TIP 5: don't forget to increase your
On Apr 16, 6:24 pm, [EMAIL PROTECTED] (Tom Lane) wrote:
Ketema [EMAIL PROTECTED] writes:
I have an example were I have to build a string in the below manner:
values (' || new.tpv_success_id || ',''' || new.order_date || ''',' ||
new.tpv_id || ',' || new.ver_code || ',''' || new.agent_name
On Apr 17, 11:19 am, Ketema [EMAIL PROTECTED] wrote:
On Apr 17, 7:35 am, Ketema [EMAIL PROTECTED] wrote:
On Apr 16, 6:24 pm, [EMAIL PROTECTED] (Tom Lane) wrote:
Ketema [EMAIL PROTECTED] writes:
I have an example were I have to build a string in the below manner:
values
On Apr 17, 7:35 am, Ketema [EMAIL PROTECTED] wrote:
On Apr 16, 6:24 pm, [EMAIL PROTECTED] (Tom Lane) wrote:
Ketema [EMAIL PROTECTED] writes:
I have an example were I have to build a string in the below manner:
values (' || new.tpv_success_id || ',''' || new.order_date
create or replace function schema.insert_function(_schema text, _table
text) returns integer
as
$BODY$
declare
_affected integer;
begin
set search_path to _schema;
insert into _table (columns) values(vals);
return 0;
end;
$BODY$ language plpgsql;
is there any whay to get
On Apr 16, 4:47 pm, [EMAIL PROTECTED] (Martijn van Oosterhout) wrote:
On Mon, Apr 16, 2007 at 01:37:43PM -0700, Ketema wrote:
create or replace function schema.insert_function(_schema text, _table
text) returns integer
snip
set search_path to _schema;
insert into _table (columns
I created a view as:
CREATE OR REPLACE VIEW caviar_schemas AS
SELECT n.oid::integer AS schema_id,
n.nspname::information_schema.sql_identifier::text AS schema_name
FROM pg_namespace n, pg_authid u
WHERE n.nspowner = u.oid AND pg_has_role(n.nspowner, 'MEMBER'::text)
AND
It would be easier if we could see the context in which you are doing
the select into. However I think this may help. Try putting the
select into in a loop:
declare
_result record;
_rows integer;
begin
_rows := 0;
for _result in select statement here loop
in here
Hi, I would like to store binary data from a tcpdump (libpcap) file in
a table. What is the best type to use? i have read posts saying lo,
oid, and bytea. Which one would be best for this scenario?Thanks, ketema
30 matches
Mail list logo