Re: Help me about postgreSql code

From: Mark Morgan Lloyd <markMLl(dot)pgsql-general(at)telemetry(dot)co(dot)uk>
To: pgsql-general(at)PostgreSQL(dot)org
Subject: Re: Help me about postgreSql code
Date: 2010-01-22 08:56:06
Message-ID: hjbp78$uqc$1@pye-srv-01.telemetry.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John R Pierce wrote:
> Elian Laura wrote:
>> i understand, but why my teacher wrote in his paper.."Probably the
>> most obvious case is a database engine where the user defines, at run
>> time, if a field is integer, char, float, etc. but, it is not
>> necessary to compile the program again. All this felxibility must be
>> ........."

I am not a PostgreSQL developer but I think the thing to understand here
is that there are two stages involved. If I say much more I think I'll
be guilty of doing your homework for you, I suggest that you look very
carefully at the examples John gave you earlier and consider that from
the viewpoint of the database engine they are being entered at runtime.

>>> CREATE TABLE users (uid INTEGER, username TEXT, firstname TEXT,
>>> lastname TEXT);
>>>
>>> INSERT INTO users (uid, username) VALUES (103, 'jpierce', 'John',
>>> 'Pierce'), ('104', 'elaura', 'Elian', 'Laura');
>>>
>>> SELECT username,firstname,lastname FROM users WHERE uid=103;

If you think about it one of those statements is giving the system
information which it can store (I'm not sure the way it does this is
really important) and re-use.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alex - 2010-01-22 09:00:34 Re: Slow Query / Check Point Segments
Previous Message Windows 7 Compatibility 2010-01-22 08:16:39 Application compatibility with Windows7