Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
d63805a4
Commit
d63805a4
authored
Oct 31, 2001
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A little reformatting for better print appearance.
parent
8e144b09
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
47 deletions
+51
-47
doc/src/sgml/libpq.sgml
doc/src/sgml/libpq.sgml
+16
-17
doc/src/sgml/odbc.sgml
doc/src/sgml/odbc.sgml
+31
-28
doc/src/sgml/spi.sgml
doc/src/sgml/spi.sgml
+4
-2
No files found.
doc/src/sgml/libpq.sgml
View file @
d63805a4
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.7
3 2001/10/12 23:32:34 momjian
Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.7
4 2001/10/31 20:39:30 petere
Exp $
-->
-->
<chapter id="libpq">
<chapter id="libpq">
...
@@ -29,11 +29,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.73 2001/10/12 23:32:34 momji
...
@@ -29,11 +29,10 @@ $Header: /cvsroot/pgsql/doc/src/sgml/libpq.sgml,v 1.73 2001/10/12 23:32:34 momji
complete examples of <filename>libpq</filename> applications in the
complete examples of <filename>libpq</filename> applications in the
following directories:
following directories:
<programlisting>
<simplelist>
../src/test/regress
<member><filename>src/test/examples</filename></member>
../src/test/examples
<member><filename>src/bin/psql</filename></member>
../src/bin/psql
</simplelist>
</programlisting>
</para>
</para>
<para>
<para>
...
@@ -382,8 +381,8 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn)
...
@@ -382,8 +381,8 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn)
particular order, or at all, or on the status always being one of these
particular order, or at all, or on the status always being one of these
documented values. An application may do something like this:
documented values. An application may do something like this:
<programlisting>
<programlisting>
switch(PQstatus(conn))
switch(PQstatus(conn))
{
{
case CONNECTION_STARTED:
case CONNECTION_STARTED:
feedback = "Connecting...";
feedback = "Connecting...";
break;
break;
...
@@ -396,7 +395,7 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn)
...
@@ -396,7 +395,7 @@ PostgresPollingStatusType PQconnectPoll(PGconn *conn)
.
.
default:
default:
feedback = "Connecting...";
feedback = "Connecting...";
}
}
</programlisting>
</programlisting>
</para>
</para>
...
...
doc/src/sgml/odbc.sgml
View file @
d63805a4
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.2
5 2001/10/09 22:32:32
petere Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/odbc.sgml,v 1.2
6 2001/10/31 20:39:30
petere Exp $
-->
-->
<chapter id="odbc">
<chapter id="odbc">
...
@@ -380,18 +380,18 @@ InstallDir = /opt/applix/axdata/axshlib
...
@@ -380,18 +380,18 @@ InstallDir = /opt/applix/axdata/axshlib
At the bottom of <filename>axnet.cnf</filename>,
At the bottom of <filename>axnet.cnf</filename>,
find the line that starts with
find the line that starts with
<programlisting>
<programlisting>
#libFor elfodbc /ax/<replaceable>...</replaceable>
#libFor elfodbc /ax/<replaceable>...</replaceable>
</programlisting>
</programlisting>
</para>
</para>
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Change line to read
Change line to read
<programlisting>
<programlisting>
libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
</programlisting>
</programlisting>
which will tell <literal>elfodbc</literal> to look in this directory
which will tell <literal>elfodbc</literal> to look in this directory
for the <acronym>ODBC</acronym> support library.
for the <acronym>ODBC</acronym> support library.
...
@@ -410,9 +410,9 @@ libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
...
@@ -410,9 +410,9 @@ libFor elfodbc <replaceable>applixroot</replaceable>/applix/axdata/axshlib/lib
Create <filename>.odbc.ini</filename> as
Create <filename>.odbc.ini</filename> as
described above. You may also want to add the flag
described above. You may also want to add the flag
<programlisting>
<programlisting>
TextAsLongVarchar=0
TextAsLongVarchar=0
</programlisting>
</programlisting>
to the database-specific portion of <filename>.odbc.ini</filename>
to the database-specific portion of <filename>.odbc.ini</filename>
so that text fields will not be shown as <literal>**BLOB**</literal>.
so that text fields will not be shown as <literal>**BLOB**</literal>.
...
@@ -438,34 +438,34 @@ TextAsLongVarchar=0
...
@@ -438,34 +438,34 @@ TextAsLongVarchar=0
<step performance="required">
<step performance="required">
<para>
<para>
Select <
command>Query->Choose Server</command
>.
Select <
menuchoice><guimenu>Query</guimenu><guimenuitem>Choose Server</guimenuitem></menuchoice
>.
</para>
</para>
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Select <
acronym>ODBC</acronym>, and click <command>Browse</command
>.
Select <
guimenuitem>ODBC</guimenuitem>, and click <guibutton>Browse</guibutton
>.
The database you configured in <filename>.odbc.ini</filename>
The database you configured in <filename>.odbc.ini</filename>
should be shown. Make sure that the <
option>Host: field</option>
should be shown. Make sure that the <
guilabel>Host:</guilabel> field
is empty (if it is not, <literal>axnet</> will try to contact <literal>axnet</> on another machine
is empty (if it is not, <literal>axnet</> will try to contact <literal>axnet</> on another machine
to look for the database).
to look for the database).
</para>
</para>
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Select the database in the box that was launched by <
command>Browse</command
>,
Select the database in the box that was launched by <
guibutton>Browse</guibutton
>,
then click <
command>OK</command
>.
then click <
guibutton>OK</guibutton
>.
</para>
</para>
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Enter user name and password in the login identification dialog,
Enter user name and password in the login identification dialog,
and click <
command>OK</command
>.
and click <
guibutton>OK</guibutton
>.
</para>
</para>
</step>
</step>
</substeps>
</substeps>
<para>
<para>
You should see <
literal>Starting elfodbc server</litera
l>
You should see <
guilabel>Starting elfodbc server</guilabe
l>
in the lower left corner of the
in the lower left corner of the
data window. If you get an error dialog box, see the debugging section
data window. If you get an error dialog box, see the debugging section
below.
below.
...
@@ -479,9 +479,12 @@ TextAsLongVarchar=0
...
@@ -479,9 +479,12 @@ TextAsLongVarchar=0
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Select a table from Query->Choose tables, and then select Query->Query
Select a table from
to access the database. The first 50 or so rows from the table should
<menuchoice><guimenu>Query</><guimenuitem>Choose
appear.
tables</></menuchoice>, and then select
<menuchoice><guimenu>Query</><guimenuitem>Query</></menuchoice>
to access the database. The first 50 or so rows from the table
should appear.
</para>
</para>
</step>
</step>
</procedure>
</procedure>
...
@@ -530,7 +533,7 @@ TextAsLongVarchar=0
...
@@ -530,7 +533,7 @@ TextAsLongVarchar=0
<para>
<para>
The driver process has terminated due to some other
The driver process has terminated due to some other
problem. You might not have an up-to-date version
problem. You might not have an up-to-date version
of the <productname>Postgre
s
</productname>
of the <productname>Postgre
SQL
</productname>
<acronym>ODBC</acronym> package.
<acronym>ODBC</acronym> package.
</para>
</para>
</listitem>
</listitem>
...
@@ -595,24 +598,24 @@ TextAsLongVarchar=0
...
@@ -595,24 +598,24 @@ TextAsLongVarchar=0
Start an <application>strace</application> on
Start an <application>strace</application> on
the <literal>axnet</literal> process. For example, if
the <literal>axnet</literal> process. For example, if
<programlisting
>
<screen
>
% ps -aucx | grep ax
<prompt>$</prompt> <userinput>ps -aucx | grep ax</userinput>
</programlisting
>
</screen
>
shows
shows
<programlisting
>
<screen
>
cary 10432 0.0 2.6 1740 392 ? S Oct 9 0:00 axnet
cary 10432 0.0 2.6 1740 392 ? S Oct 9 0:00 axnet
cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain
cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain
</programlisting
>
</screen
>
</para>
</para>
<para>
<para>
Then run
Then run
<programlisting
>
<screen
>
% strace -f -s 1024 -p 10432
<prompt>$</prompt> <userinput>strace -f -s 1024 -p 10432</userinput>
</programlisting
>
</screen
>
</para>
</para>
</step>
</step>
...
@@ -638,14 +641,14 @@ cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain
...
@@ -638,14 +641,14 @@ cary 27883 0.9 31.0 12692 4596 ? S 10:24 0:04 axmain
a <literal>Cannot launch gateway on server</literal>,
a <literal>Cannot launch gateway on server</literal>,
I ran <command>strace</command> on <literal>axnet</literal> and got
I ran <command>strace</command> on <literal>axnet</literal> and got
<
programlisting
>
<
screen
>
[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
(No such file or directory)
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT
(No such file or directory)
(No such file or directory)
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc:
can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)
</
programlisting
>
</
screen
>
So what is happening is that <literal>applix elfodbc</literal> is searching for <filename>libodbc.so</filename>, but it
So what is happening is that <literal>applix elfodbc</literal> is searching for <filename>libodbc.so</filename>, but it
cannot find it. That is why <filename>axnet.cnf</filename> needed to be changed.
cannot find it. That is why <filename>axnet.cnf</filename> needed to be changed.
</para>
</para>
...
...
doc/src/sgml/spi.sgml
View file @
d63805a4
...
@@ -2821,11 +2821,13 @@ execq(text *sql, int cnt)
...
@@ -2821,11 +2821,13 @@ execq(text *sql, int cnt)
Now, compile and create the function:
Now, compile and create the function:
<ProgramListing>
<ProgramListing>
CREATE FUNCTION execq (TEXT, INT4) RETURNS INT4 AS '...path_to_so' LANGUAGE 'c';
CREATE FUNCTION execq (text, integer) RETURNS integer
AS '...path_to_so'
LANGUAGE C;
</ProgramListing>
</ProgramListing>
<ProgramListing>
<ProgramListing>
vac=> SELECT execq('CREATE TABLE a (x INT
4
)', 0);
vac=> SELECT execq('CREATE TABLE a (x INT
EGER
)', 0);
execq
execq
-----
-----
0
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment