On Tue, 2005-03-15 at 18:44 +, Graham Vickrage wrote:
> I am dropping a database with an additional scheme other than public on
> version 7.3.2.
>
> When I come to recreate the database with the same scheme it gives me
> the error:
>
> ERROR: namespace "xxx" already exists
does the scheme e
I am dropping a database with an additional scheme other than public on
version 7.3.2.
When I come to recreate the database with the same scheme it gives me
the error:
ERROR: namespace "xxx" already exists
Is this temp table issue, if so how do I get round it?
Many thanks in advance.
Graham
"Tambet Matiisen" <[EMAIL PROTECTED]> writes:
> How tough it would be to implement
> CREATE VIEW xxx PARAMETERS (yyy) AS zzz;
> as
> CREATE TYPE xxx;
> CREATE FUNCTION xxx(yyy) RETURNING SETOF xxx LANGUAGE sql AS 'zzz';
What's the point? It'd be nonstandard anyway, so just use the function.
You need a function like this :
CREATE OR REPLACE FUNCTION array_srf( integer[] ) RETURNS SETOF integer
LANGUAGE PLPGSQL etc... AS
$$
DECLARE
_data ALIAS FOR $1;
_i INTEGER;
BEGIN
FOR _i IN 1..icount(_data) LOOP
RETURN NEXT _data[_i];
Kenneth Gonsalves wrote:
>
> hi,
> i have set my datetype to 'European, SQL'. This correctly accepts
> dates of the form dd/mm/. However, the output is still in the
> '-mm-dd' format. How do i get the default output as dd/mm/?
> --
> regards
> kg
>
I have
select version();
Tambet Matiisen wrote:
>
> Another (possibly design?) problem of mine. I have a function
> product_cost(product_id, date), which does simple SELECT call. I
> declared it as STABLE, hoping that multiple invocations of the same
> function are replaced with one. Query is something like this:
>
> SEL
- Original Message -
From: <[EMAIL PROTECTED]>
To:
Sent: Monday, March 14, 2005 12:15 PM
Subject: [SQL] Generic Function
Hi,
Can I built a generic function like:
CREATE FUNCTION f (text) RETURNS TEXT as
$$
return 'select * from $1';
$$
I know its impossible as writed. Also I have lo
U K Laxmi wrote:
Thank you for the reply. Sorry for posting this
problem here. Thought SQL syntax for Ms Access and
PostgreSQL are similar. So, i posted here.
My problem is:
I've original version of a table called PMM (Product
Material Master). Thro' a web interface, user can
change that table co
Another (possibly design?) problem of mine. I have a function
product_cost(product_id, date), which does simple SELECT call. I
declared it as STABLE, hoping that multiple invocations of the same
function are replaced with one. Query is something like this:
SELECT
p.product_id,
avg(product_
Thank you for the reply. Sorry for posting this
problem here. Thought SQL syntax for Ms Access and
PostgreSQL are similar. So, i posted here.
My problem is:
I've original version of a table called PMM (Product
Material Master). Thro' a web interface, user can
change that table contents. Once cha
U K Laxmi wrote:
I've two Ms Access tables with the same structure.
This is a PostgreSQL list - you'd probably be better using a
Microsoft-Access list.
[snip]
Here what we should observe is, 1st row in table 1 not
present in table2. 2nd row in table1 is modified in
table2. 3rd row in table 2 is n
...
>
> I wonder if it could be possible to improve CREATE VIEW
> syntax by adding parameters? Something like this:
>
> CREATE VIEW product_sales(date,date) AS
> select p.product_id, coalesce(sum(s.amount), 0)
> from product p
> left join sales s on p.product_id = s.product_id and s.date
> bet
I've two Ms Access tables with the same structure.
Tablestructure is as follows:
Table table1
SbPartNo char(50)
PartDesc char(200)
manPartNo char(200)
manufacturer char(100)
vendor char(100)
refDesi char(200)
qty char(5)
My requirement is as follows:
table 1
partDesc1 11 xyz1 vendor1
Seems my remembrance was wrong, ::TEXT::BYTEA causes
ERROR: cannot cast type text to bytea
on my 7.4.5 version too.
Looking into "Other Binary String Functions" within the manual,
sheds light on how to do it:
::TEXT::BYTEA
Function decode(string text, type text) Return Type bytea
select deco
Richard,
So the solution can be:
(i)
either write a function to insert the values into the array one by one
(ii)
or else upgrade to 7.4 (or 8) to use the ARRAY syntax.
Thanks a lot.
Regards
Robert
Richard Huxton
03/15/2005 09:08 AM
To
[EMAIL PROTECTED]
cc
pgsql-sq
Luca Pireddu wrote:
Hello all. I'd like to write a query does a set subtraction A - B, but A is
is a set of constants that I need to provide in the query as immediate
values. I thought of something like
select a from (1,2,3.4)
except
select col_name from table;
richardh=> SELECT * FROM foo;
a
[EMAIL PROTECTED] wrote:
CREATE TABLE test ( details varchar[]);
CREATE TABLE test2 ( textvalue1 varchar, textvalue2 varchar);
INSERT INTO test2 VALUES ('Hello1', 'World1');
INSERT INTO test2 VALUES ('hello2', 'World2');
and I am expecting the following rows in test
{'Hello1', 'World1'}
{'Hello2',
17 matches
Mail list logo