Hi everybody
I need to build an additional field (metakey) out of three fields in the
table.
SELECT a.a_kurzbez, a.a_ausgabenr, a.a_bundnr, a.a_nr, a.a_z_blaenge,
a.a_z_laenge, a.a_z_umfang FROM auftrag a
should be changed to something like
SELECT (a.a_kurzbez + a.a_ausgabenr + a.a_bundnr) as
On Wed, Mar 07, 2001 at 08:38:25AM -0800, Josh Berkus wrote:
> Thomas, Karel,
>
> > I agree with Karel's point that it may be a pain to use a procedural
> > language to manipulate a "stringy" interval value. If you use a C
> > function instead, you can get access to the internal manipulation
> >
Hi Juerg,
> I need to build an additional field (metakey) out of three fields in
> the table.
>
> SELECT a.a_kurzbez, a.a_ausgabenr, a.a_bundnr, a.a_nr, a.a_z_blaenge,
> a.a_z_laenge, a.a_z_umfang FROM auftrag a
>
> should be changed to something like
>
> SELECT (a.a_kurzbez + a.a_ausgabenr + a.
Christopher Sawtell <[EMAIL PROTECTED]> writes:
> It that a bug?
You could argue that. The handling of NULL arrays (not to mention NULLs
in arrays) is pretty brain-d^H^H^H^H^H^Hsimplistic; I don't think the
original designer thought about NULLs at all.
All of the array code could use an overhau
I've created quite a few foreign key constraints in the database that I
am currently working on, and now that I've altered the structure and
dropped a table that had a foreign key reference to a couple of other
tables, I need to get rid of those foreign keys (they weren't dropped
automagically wit
On Thu, Mar 08, 2001 at 04:42:46PM +0100, Frank Joerdens wrote:
> I've created quite a few foreign key constraints in the database that I
> am currently working on, and now that I've altered the structure and
> dropped a table that had a foreign key reference to a couple of other
> tables, I need
Roberto Mello wrote:
> On Thu, Mar 08, 2001 at 05:54:38PM -0500, Najm Hashmi wrote:
> > Hi all, I just want to know how to put quotes around a string. Is there a
> > function to do so?
> > If not how can I escape a single quote.
>
> Others have answered how to quote a single string. I wr
On Thu, Mar 08, 2001 at 05:06:29PM +0100, Frank Joerdens wrote:
> On Thu, Mar 08, 2001 at 04:42:46PM +0100, Frank Joerdens wrote:
> > I've created quite a few foreign key constraints in the database that I
> > am currently working on, and now that I've altered the structure and
> > dropped a table
Hi,
I want to write an SQL function in postgres that returns
row as a result.
The problem is the select statement inside the funtion has
a two table join. So I dont know what to put after SETOF
CREATE FUNCTION dummy()
RETURNS SETOF ?
AS 'select a.name,b.cc
from tblusers a,
Josh,
> > [ stuff deleted ]
> > CREATE FUNCTION metakey (text, int4, int4) returns text as
> > ' SELECT $1 || ' ' || text($2) || ' ' || text($3) '
> > LANGUAGE 'sql';
> >
> > || is the "concatenate text" operator.
> >
> > Change the param types and cast them as you need.
>
> ... But keep in mind
Frank Joerdens <[EMAIL PROTECTED]> writes:
>> Just an idea: Is it safe to just delete the corresponding row in
>> pg_trigger?
> No, it ain't: After deleting the rows corresponding to the offending
> triggers in pg_trigger, I can't vacuum, or dump.
You need to adjust the reltriggers counts in the
karel,
> Now I'm not writing to_char(interval), because current source (7.1)
> is
> freeze for new features and I'm waiting for 7.2 devel. cycle and I'm
> spending
> time with other things (PL/Python, the Mape project etc..).
>
> If it's *really important* for you I can write it next week(s)
Boulat Khakimov <[EMAIL PROTECTED]> said:
> I want to write an SQL function in postgres that returns
> row as a result.
>
> The problem is the select statement inside the funtion has
> a two table join. So I dont know what to put after SETOF
>
> CREATE FUNCTION dummy()
> RETURNS SETOF ?
>
I would like to create a pl/pgsql function that can select from a table
even though users can't select from the table directly. For example,
create a table and function that hits the table as the postgres user. Log
in as another user and select function_name();. This fails because the
user
Hello,
I'm looking for a better tutorial of how EXPLAIN works. I know Mr. Tom Lane
wrote a "quick & dirty explanation" and that "plan-reading is an art that
deserves a tutorial, and I haven't had time to write one". In which case I'd
like to know if there's any other tutorials/resources.
Tom Lane wrote:
> Here's another twist though. Is this a bug
too or is this just beyond our reach?
> psql:lead1.sql:64: ERROR: Unable to select an aggregate function
avg(date)
It's just that we don't have any avg() function for date --- nor for
timestamp, which is a little more surprising.
FY
Kyle <[EMAIL PROTECTED]> writes:
>> You could probably gin up a usable avg(timestamp) using the avg(float8)
>> routines, since a timestamp is really just a double under the hood.
> When you say "gin up" are you talking about C, PL/XXX, or just casts?
I was thinking of full-scale cheating: make a
my apologies if this is not the coreect list
but I cannot seem to install the
package DBD-Pg-0.73-1.i386.rpm
it complains that it needs libpq.so.1
i have the following installed from
a source package rebuild:
postgresql-7.0.3-2
..server
..devel
..perl
..tk
..odbc
..tcl
thanks as always
Ken
Folks,
I have an interesting problem. For purpose of presentation to users,
I'd like to concatinate a list of VARCHAR values from a subtable. To
simplify my actual situation:
CREATE TABLE clients (
client_id SERIAL PRIMARY KEY,
client_name VARCHAR(50) );
CREATE TABLE c
19 matches
Mail list logo