The implementation of parser parsing postgres://.
More...
#include "pg_uri.h"
#include "../../dprint.h"
#include "../../mem/mem.h"
#include "../../ut.h"
#include "../../lib/srdb2/db_gen.h"
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Defines
-
#define cmpstr(s1, s2, f) ((s1)!=(s2)) && ((s1)==0 || (s2)==0 || (f)((s1), (s2))!=0)
- compare s1 & s2 with a function f (which should return 0 if ==); s1 & s2 can be null return 0 if match, 1 if not
Functions
-
static int dupl_string (char **dst, const char *begin, const char *end)
- Duplicate a string.
- static int parse_postgres_uri (struct pg_uri *res, str *uri)
- Parses postgres URI of form //[username[:password]@]hostname[:port]/database.
- int pg_uri (db_uri_t *uri)
- Create a new pg_uri structure and parse the URI in parameter.
-
static unsigned char pg_uri_cmp (db_uri_t *uri1, db_uri_t *uri2)
- Compare two connection URIs.
Detailed Description
. URIs.
Definition in file pg_uri.c.