I see v_dt is not initialized before comparison, there should be some value
in it before it is useful.
--Imad
On Tue, Sep 9, 2008 at 8:47 AM, Adrian Klaver <[EMAIL PROTECTED]> wrote:
>
> -- Original message --
> From: "Ruben Gouveia"
ter: ((boolcol1 IS TRUE) AND (boolcol2" IS FALSE))"
> -> Index Scan using tablee_atextfield_idx on tablee m
> (cost=0.00..14.28 rows=1 width=39) (actual time=0.883..0.883 rows=0
> loops=228)
> Index Cond: (u.atextfield = m.atextfield)
>
>
>
t; pgslekt=> select array_to_string(array(select given, patronym, toponym
> from persons where person_id=57), ' ');
> ERROR: subquery must return only one column
Try concatenating your columns using the '||' operator or 'concat' function
and project only
ror.
Yeah ... valid point.
e.g. As Imad gives in his example ...
CREATE FUNCTION xyz() RETURNS record AS
$$
declare
abc RECORD;
begin
abc := (1, 2);
return abc;
end;
$$
language plpgsql;
And execute the function in this fashion:
select a, b from xyz() as (a int, b int);
The only p
create a function with return type as a RECORD.
CREATE FUNCTION xyz() RETURNS record AS
$$
declare
abc RECORD;
begin
abc := (1, 2);
return abc;
end;
$$
language plpgsql;
And execute the function in this fashion:
select a, b from xyz() as (a int, b int);
Do you like that ... :-)
--Imad
You might be looking for PostgreSQL RECORD data type.
--Imad
www.EnterpriseDB.com
On 5/11/07, Gábriel Ákos <[EMAIL PROTECTED]> wrote:
Hi,
How should I define a record type (there is no table with this record
type) programmatically in pl/pgsql?
I'd like to return a record wi
Change it in the postgresql.conf file only if you want to make it permanent.
Otherwise just set the variable for your current session without a
server restart.
--Imad
www.EnterpriseDB.com
On 1/31/07, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
It was commented. Thank you Shoa
You did not grant access privileges to schema.
Also GRANT administrators on the base schema as you did for the table.
--Imad
www.EnterpriseDB.com
On 12/1/06, Ezequias Rodrigues da Rocha <[EMAIL PROTECTED]> wrote:
Hi list,
I am having problem with grants and users on PostgreSQL.
I am
Check this one
http://archives.postgresql.org/pgsql-patches/2004-04/msg00280.php
I have not personally worked on what is described in this page but someone will
correct you in the community if anything is going wrong here.
--Imad
www.EnterpriseDB.com
On 11/19/06, Rajesh Kumar Mallah <[EM
Why dont you try to make 'username' part of your query.
While auditing updates and inserts, the username can be some how made
a part of the tuple being inserted. Just a thought!
--Imad
www.EnterpriseDB.com
On 11/18/06, Rajesh Kumar Mallah <[EMAIL PROTECTED]> wrote:
Hi ,
Is
.
--Imad
www.EnterpriseDB.com
On 11/14/06, Rodrigo Sakai <[EMAIL PROTECTED]> wrote:
I know that if I create a table salary that references my employee table
works! But I'm trying to work with the composite type concept!
Thinking in Object-Oriented Programming (OOP) I have a class em
max (timestamptz, timestamptz) does not exist already. You need to
create a simple function in PLpgSQL something like
if a > b
return a;
else
return b;
Even an sql function will do the job here using case statement.
--Imad
www.EntepriseDB.com
On 11/13/06, A. Kretschmer <[EMAIL PRO
I am able to do this thing with the following query:
insert into employee (a, name, s) values(1, 'emp name', ((1,
'(01/01/2000, 01/01/2000)')));
--Imad
www.EnterpriseDB.com
On 11/13/06, Rodrigo Sakai <[EMAIL PROTECTED]> wrote:
Hi, I have a question a
What else do you want to know about it? (keeping in mind the example you gave)
Because, apparently this is just a matter of min and max.
--Imad
On 11/1/06, Raghuraman K <[EMAIL PROTECTED]> wrote:
Hi,
I have a table like this: create
table(xyz char(10), answer number(4)). There are a
This is *not* a good practice to handle elements of a composite data
type seperately because they all build it up together and without one
of it, the data type is meaningless.
Secondly, If you are going to base our application on this principle,
you better rethink your design.
--Imad
Can you write the error message here?
--Imad
www.EnterpriseDB.com
On 11/6/06, Hubert Retif <[EMAIL PROTECTED]> wrote:
Hi,
I am migrating my application from MySQL to Postgresql and have met
following situation:
SELECT
(sum(sold_price)/(select sum(sold_price) from car_archive
You can return a record:
create function thing(text) returns record as 'select * from whatever
where id=$1' language sql;
Hope this helps.
--Imad
www.EnterpriseDB.com
On 11/5/06, Mark Simon <[EMAIL PROTECTED]> wrote:
I am trying to create a simple function using SQL rathe
PostgreSQL. Get it from pgFoundry.
--Imad
www.EnterpriseDB.com
On 11/4/06, Dylan Lorimer <[EMAIL PROTECTED]> wrote:
So I kicked off a SQL transaction that has been running for 30+ minutes. Is
there any way to monitor it to know if it has possibly hanged or not? To be
fair, it is an updat
When you select from views, you are infact selecting from the
underlying tables. Indexes created on those tables are used
ultimately.
--Imad
www.EnterpriseDB.com
On 11/4/06, Dylan Lorimer <[EMAIL PROTECTED]> wrote:
Hi,
If I've got several tables, each with their own indexes. I
Yeah, and EnterpriseDB Management Server is a community project and
can be used for free, off course!
--Imad
www.EnterpriseDB.com
On 11/3/06, A. Kretschmer <[EMAIL PROTECTED]> wrote:
am Fri, dem 03.11.2006, um 0:04:50 +0500 mailte imad folgendes:
> Or you can probably use a P
Or you can probably use a PostgreSQL administration tool for scheduled
jobs. I know a number of such tools which provide this feature and
EnterpriseDB Management Server is one of them.
--Imad
www.EnterpriseDB.com
On 11/2/06, A. Kretschmer <[EMAIL PROTECTED]> wrote:
am Thu, dem 02.11.20
hi,
I want to know is there any way to execute an anonymous PL/pgSQL block
in PostgreSQL.
Thanx
--
Regards
Imad
---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings
22 matches
Mail list logo